universal-mcp-applications 0.1.32__py3-none-any.whl → 0.1.36rc2__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.
- universal_mcp/applications/ahrefs/app.py +52 -198
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +111 -464
- universal_mcp/applications/asana/app.py +417 -1567
- universal_mcp/applications/aws_s3/app.py +36 -103
- universal_mcp/applications/bill/app.py +546 -1957
- universal_mcp/applications/box/app.py +1068 -3981
- universal_mcp/applications/braze/app.py +364 -1430
- universal_mcp/applications/browser_use/app.py +2 -8
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +61 -200
- universal_mcp/applications/canva/app.py +45 -110
- universal_mcp/applications/clickup/app.py +207 -674
- universal_mcp/applications/coda/app.py +146 -426
- universal_mcp/applications/confluence/app.py +310 -1098
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +28 -107
- universal_mcp/applications/dialpad/app.py +283 -756
- universal_mcp/applications/digitalocean/app.py +1766 -5777
- universal_mcp/applications/domain_checker/app.py +3 -54
- universal_mcp/applications/e2b/app.py +14 -64
- universal_mcp/applications/elevenlabs/app.py +9 -47
- universal_mcp/applications/exa/app.py +6 -17
- universal_mcp/applications/falai/app.py +24 -101
- universal_mcp/applications/figma/app.py +53 -137
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +51 -152
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +91 -528
- universal_mcp/applications/fpl/utils/fixtures.py +15 -49
- universal_mcp/applications/fpl/utils/helper.py +25 -89
- universal_mcp/applications/fpl/utils/league_utils.py +20 -64
- universal_mcp/applications/ghost_content/app.py +52 -161
- universal_mcp/applications/github/app.py +19 -56
- universal_mcp/applications/gong/app.py +88 -248
- universal_mcp/applications/google_calendar/app.py +16 -68
- universal_mcp/applications/google_docs/app.py +85 -189
- universal_mcp/applications/google_drive/app.py +141 -463
- universal_mcp/applications/google_gemini/app.py +12 -64
- universal_mcp/applications/google_mail/app.py +28 -157
- universal_mcp/applications/google_searchconsole/app.py +15 -48
- universal_mcp/applications/google_sheet/app.py +100 -581
- universal_mcp/applications/google_sheet/helper.py +10 -37
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +44 -122
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
- universal_mcp/applications/hubspot/app.py +23 -87
- universal_mcp/applications/jira/app.py +2071 -7986
- universal_mcp/applications/klaviyo/app.py +494 -1376
- universal_mcp/applications/linkedin/README.md +9 -2
- universal_mcp/applications/linkedin/app.py +240 -181
- universal_mcp/applications/mailchimp/app.py +450 -1605
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +217 -699
- universal_mcp/applications/ms_teams/app.py +64 -186
- universal_mcp/applications/neon/app.py +86 -192
- universal_mcp/applications/notion/app.py +21 -36
- universal_mcp/applications/onedrive/app.py +16 -38
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/app.py +24 -84
- universal_mcp/applications/perplexity/app.py +4 -19
- universal_mcp/applications/pipedrive/app.py +832 -3142
- universal_mcp/applications/posthog/app.py +163 -432
- universal_mcp/applications/reddit/app.py +40 -139
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +14 -41
- universal_mcp/applications/rocketlane/app.py +221 -934
- universal_mcp/applications/scraper/README.md +7 -4
- universal_mcp/applications/scraper/app.py +50 -109
- universal_mcp/applications/semanticscholar/app.py +22 -64
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +512 -1262
- universal_mcp/applications/sentry/app.py +271 -906
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +17 -39
- universal_mcp/applications/shopify/app.py +1551 -4287
- universal_mcp/applications/shortcut/app.py +155 -417
- universal_mcp/applications/slack/app.py +33 -115
- universal_mcp/applications/spotify/app.py +126 -325
- universal_mcp/applications/supabase/app.py +104 -213
- universal_mcp/applications/tavily/app.py +1 -1
- universal_mcp/applications/trello/app.py +693 -2656
- universal_mcp/applications/twilio/app.py +14 -50
- universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
- universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
- universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
- universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
- universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
- universal_mcp/applications/whatsapp/app.py +35 -186
- universal_mcp/applications/whatsapp/audio.py +2 -6
- universal_mcp/applications/whatsapp/whatsapp.py +17 -51
- universal_mcp/applications/whatsapp_business/app.py +70 -283
- universal_mcp/applications/wrike/app.py +45 -118
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +75 -261
- universal_mcp/applications/zenquotes/app.py +2 -2
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/RECORD +105 -105
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.32.dist-info → universal_mcp_applications-0.1.36rc2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from typing import Any
|
|
2
|
-
|
|
3
2
|
from loguru import logger
|
|
4
3
|
from universal_mcp.applications.application import APIApplication
|
|
5
4
|
from universal_mcp.integrations import Integration
|
|
@@ -16,35 +15,18 @@ class RocketlaneApp(APIApplication):
|
|
|
16
15
|
Overrides the base class method to use 'api-key'.
|
|
17
16
|
"""
|
|
18
17
|
if not self.integration:
|
|
19
|
-
logger.warning(
|
|
20
|
-
"RocketlaneApp: No integration configured, returning empty headers."
|
|
21
|
-
)
|
|
18
|
+
logger.warning("RocketlaneApp: No integration configured, returning empty headers.")
|
|
22
19
|
return {}
|
|
23
|
-
|
|
24
20
|
credentials = self.integration.get_credentials()
|
|
25
|
-
|
|
26
|
-
api_key = (
|
|
27
|
-
credentials.get("api_key")
|
|
28
|
-
or credentials.get("API_KEY")
|
|
29
|
-
or credentials.get("apiKey")
|
|
30
|
-
)
|
|
31
|
-
|
|
21
|
+
api_key = credentials.get("api_key") or credentials.get("API_KEY") or credentials.get("apiKey")
|
|
32
22
|
if not api_key:
|
|
33
23
|
logger.error("RocketlaneApp: API key not found in integration credentials.")
|
|
34
24
|
return {"Content-Type": "application/json", "Cache-Control": "no-cache"}
|
|
35
|
-
|
|
36
25
|
logger.debug("RocketlaneApp: Using 'api-key' for authentication.")
|
|
37
|
-
return {
|
|
38
|
-
"api-key": api_key, # Correct header name for Rocketlane
|
|
39
|
-
"Content-Type": "application/json",
|
|
40
|
-
"Cache-Control": "no-cache",
|
|
41
|
-
}
|
|
26
|
+
return {"api-key": api_key, "Content-Type": "application/json", "Cache-Control": "no-cache"}
|
|
42
27
|
|
|
43
|
-
def get_time_entry(
|
|
44
|
-
self,
|
|
45
|
-
timeEntryId: str,
|
|
46
|
-
includeFields: list[str] | None = None,
|
|
47
|
-
includeAllFields: bool | None = None,
|
|
28
|
+
async def get_time_entry(
|
|
29
|
+
self, timeEntryId: str, includeFields: list[str] | None = None, includeAllFields: bool | None = None
|
|
48
30
|
) -> dict[str, Any]:
|
|
49
31
|
"""
|
|
50
32
|
Get a time entry
|
|
@@ -67,28 +49,17 @@ class RocketlaneApp(APIApplication):
|
|
|
67
49
|
if timeEntryId is None:
|
|
68
50
|
raise ValueError("Missing required parameter 'timeEntryId'.")
|
|
69
51
|
url = f"{self.base_url}/1.0/time-entries/{timeEntryId}"
|
|
70
|
-
query_params = {
|
|
71
|
-
k: v
|
|
72
|
-
for k, v in [
|
|
73
|
-
("includeFields", includeFields),
|
|
74
|
-
("includeAllFields", includeAllFields),
|
|
75
|
-
]
|
|
76
|
-
if v is not None
|
|
77
|
-
}
|
|
52
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
78
53
|
response = self._get(url, params=query_params)
|
|
79
54
|
response.raise_for_status()
|
|
80
|
-
if (
|
|
81
|
-
response.status_code == 204
|
|
82
|
-
or not response.content
|
|
83
|
-
or not response.text.strip()
|
|
84
|
-
):
|
|
55
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
85
56
|
return None
|
|
86
57
|
try:
|
|
87
58
|
return response.json()
|
|
88
59
|
except ValueError:
|
|
89
60
|
return None
|
|
90
61
|
|
|
91
|
-
def update_time_entry(
|
|
62
|
+
async def update_time_entry(
|
|
92
63
|
self,
|
|
93
64
|
timeEntryId: str,
|
|
94
65
|
includeFields: list[str] | None = None,
|
|
@@ -138,37 +109,19 @@ class RocketlaneApp(APIApplication):
|
|
|
138
109
|
"category": category,
|
|
139
110
|
"billable": billable,
|
|
140
111
|
}
|
|
141
|
-
request_body_data = {
|
|
142
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
143
|
-
}
|
|
112
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
144
113
|
url = f"{self.base_url}/1.0/time-entries/{timeEntryId}"
|
|
145
|
-
query_params = {
|
|
146
|
-
|
|
147
|
-
for k, v in [
|
|
148
|
-
("includeFields", includeFields),
|
|
149
|
-
("includeAllFields", includeAllFields),
|
|
150
|
-
]
|
|
151
|
-
if v is not None
|
|
152
|
-
}
|
|
153
|
-
response = self._put(
|
|
154
|
-
url,
|
|
155
|
-
data=request_body_data,
|
|
156
|
-
params=query_params,
|
|
157
|
-
content_type="application/json",
|
|
158
|
-
)
|
|
114
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
115
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
159
116
|
response.raise_for_status()
|
|
160
|
-
if (
|
|
161
|
-
response.status_code == 204
|
|
162
|
-
or not response.content
|
|
163
|
-
or not response.text.strip()
|
|
164
|
-
):
|
|
117
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
165
118
|
return None
|
|
166
119
|
try:
|
|
167
120
|
return response.json()
|
|
168
121
|
except ValueError:
|
|
169
122
|
return None
|
|
170
123
|
|
|
171
|
-
def delete_time_entry(self, timeEntryId: str) -> Any:
|
|
124
|
+
async def delete_time_entry(self, timeEntryId: str) -> Any:
|
|
172
125
|
"""
|
|
173
126
|
Delete a time entry
|
|
174
127
|
|
|
@@ -191,23 +144,14 @@ class RocketlaneApp(APIApplication):
|
|
|
191
144
|
query_params = {}
|
|
192
145
|
response = self._delete(url, params=query_params)
|
|
193
146
|
response.raise_for_status()
|
|
194
|
-
if (
|
|
195
|
-
response.status_code == 204
|
|
196
|
-
or not response.content
|
|
197
|
-
or not response.text.strip()
|
|
198
|
-
):
|
|
147
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
199
148
|
return None
|
|
200
149
|
try:
|
|
201
150
|
return response.json()
|
|
202
151
|
except ValueError:
|
|
203
152
|
return None
|
|
204
153
|
|
|
205
|
-
def get_task(
|
|
206
|
-
self,
|
|
207
|
-
taskId: str,
|
|
208
|
-
includeFields: list[str] | None = None,
|
|
209
|
-
includeAllFields: bool | None = None,
|
|
210
|
-
) -> dict[str, Any]:
|
|
154
|
+
async def get_task(self, taskId: str, includeFields: list[str] | None = None, includeAllFields: bool | None = None) -> dict[str, Any]:
|
|
211
155
|
"""
|
|
212
156
|
Get task by Id
|
|
213
157
|
|
|
@@ -229,28 +173,17 @@ class RocketlaneApp(APIApplication):
|
|
|
229
173
|
if taskId is None:
|
|
230
174
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
231
175
|
url = f"{self.base_url}/1.0/tasks/{taskId}"
|
|
232
|
-
query_params = {
|
|
233
|
-
k: v
|
|
234
|
-
for k, v in [
|
|
235
|
-
("includeFields", includeFields),
|
|
236
|
-
("includeAllFields", includeAllFields),
|
|
237
|
-
]
|
|
238
|
-
if v is not None
|
|
239
|
-
}
|
|
176
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
240
177
|
response = self._get(url, params=query_params)
|
|
241
178
|
response.raise_for_status()
|
|
242
|
-
if (
|
|
243
|
-
response.status_code == 204
|
|
244
|
-
or not response.content
|
|
245
|
-
or not response.text.strip()
|
|
246
|
-
):
|
|
179
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
247
180
|
return None
|
|
248
181
|
try:
|
|
249
182
|
return response.json()
|
|
250
183
|
except ValueError:
|
|
251
184
|
return None
|
|
252
185
|
|
|
253
|
-
def update_task(
|
|
186
|
+
async def update_task(
|
|
254
187
|
self,
|
|
255
188
|
taskId: str,
|
|
256
189
|
includeFields: list[str] | None = None,
|
|
@@ -321,37 +254,19 @@ class RocketlaneApp(APIApplication):
|
|
|
321
254
|
"externalReferenceId": externalReferenceId,
|
|
322
255
|
"private": private,
|
|
323
256
|
}
|
|
324
|
-
request_body_data = {
|
|
325
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
326
|
-
}
|
|
257
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
327
258
|
url = f"{self.base_url}/1.0/tasks/{taskId}"
|
|
328
|
-
query_params = {
|
|
329
|
-
|
|
330
|
-
for k, v in [
|
|
331
|
-
("includeFields", includeFields),
|
|
332
|
-
("includeAllFields", includeAllFields),
|
|
333
|
-
]
|
|
334
|
-
if v is not None
|
|
335
|
-
}
|
|
336
|
-
response = self._put(
|
|
337
|
-
url,
|
|
338
|
-
data=request_body_data,
|
|
339
|
-
params=query_params,
|
|
340
|
-
content_type="application/json",
|
|
341
|
-
)
|
|
259
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
260
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
342
261
|
response.raise_for_status()
|
|
343
|
-
if (
|
|
344
|
-
response.status_code == 204
|
|
345
|
-
or not response.content
|
|
346
|
-
or not response.text.strip()
|
|
347
|
-
):
|
|
262
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
348
263
|
return None
|
|
349
264
|
try:
|
|
350
265
|
return response.json()
|
|
351
266
|
except ValueError:
|
|
352
267
|
return None
|
|
353
268
|
|
|
354
|
-
def delete_task(self, taskId: str) -> Any:
|
|
269
|
+
async def delete_task(self, taskId: str) -> Any:
|
|
355
270
|
"""
|
|
356
271
|
Delete task by Id
|
|
357
272
|
|
|
@@ -374,18 +289,14 @@ class RocketlaneApp(APIApplication):
|
|
|
374
289
|
query_params = {}
|
|
375
290
|
response = self._delete(url, params=query_params)
|
|
376
291
|
response.raise_for_status()
|
|
377
|
-
if (
|
|
378
|
-
response.status_code == 204
|
|
379
|
-
or not response.content
|
|
380
|
-
or not response.text.strip()
|
|
381
|
-
):
|
|
292
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
382
293
|
return None
|
|
383
294
|
try:
|
|
384
295
|
return response.json()
|
|
385
296
|
except ValueError:
|
|
386
297
|
return None
|
|
387
298
|
|
|
388
|
-
def get_space(self, spaceId: str) -> dict[str, Any]:
|
|
299
|
+
async def get_space(self, spaceId: str) -> dict[str, Any]:
|
|
389
300
|
"""
|
|
390
301
|
Get space by Id
|
|
391
302
|
|
|
@@ -408,20 +319,14 @@ class RocketlaneApp(APIApplication):
|
|
|
408
319
|
query_params = {}
|
|
409
320
|
response = self._get(url, params=query_params)
|
|
410
321
|
response.raise_for_status()
|
|
411
|
-
if (
|
|
412
|
-
response.status_code == 204
|
|
413
|
-
or not response.content
|
|
414
|
-
or not response.text.strip()
|
|
415
|
-
):
|
|
322
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
416
323
|
return None
|
|
417
324
|
try:
|
|
418
325
|
return response.json()
|
|
419
326
|
except ValueError:
|
|
420
327
|
return None
|
|
421
328
|
|
|
422
|
-
def update_space(
|
|
423
|
-
self, spaceId: str, spaceName: str | None = None
|
|
424
|
-
) -> dict[str, Any]:
|
|
329
|
+
async def update_space(self, spaceId: str, spaceName: str | None = None) -> dict[str, Any]:
|
|
425
330
|
"""
|
|
426
331
|
Update space by Id
|
|
427
332
|
|
|
@@ -442,33 +347,20 @@ class RocketlaneApp(APIApplication):
|
|
|
442
347
|
if spaceId is None:
|
|
443
348
|
raise ValueError("Missing required parameter 'spaceId'.")
|
|
444
349
|
request_body_data = None
|
|
445
|
-
request_body_data = {
|
|
446
|
-
|
|
447
|
-
}
|
|
448
|
-
request_body_data = {
|
|
449
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
450
|
-
}
|
|
350
|
+
request_body_data = {"spaceName": spaceName}
|
|
351
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
451
352
|
url = f"{self.base_url}/1.0/spaces/{spaceId}"
|
|
452
353
|
query_params = {}
|
|
453
|
-
response = self._put(
|
|
454
|
-
url,
|
|
455
|
-
data=request_body_data,
|
|
456
|
-
params=query_params,
|
|
457
|
-
content_type="application/json",
|
|
458
|
-
)
|
|
354
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
459
355
|
response.raise_for_status()
|
|
460
|
-
if (
|
|
461
|
-
response.status_code == 204
|
|
462
|
-
or not response.content
|
|
463
|
-
or not response.text.strip()
|
|
464
|
-
):
|
|
356
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
465
357
|
return None
|
|
466
358
|
try:
|
|
467
359
|
return response.json()
|
|
468
360
|
except ValueError:
|
|
469
361
|
return None
|
|
470
362
|
|
|
471
|
-
def delete_space(self, spaceId: str) -> Any:
|
|
363
|
+
async def delete_space(self, spaceId: str) -> Any:
|
|
472
364
|
"""
|
|
473
365
|
Delete space by Id
|
|
474
366
|
|
|
@@ -491,18 +383,14 @@ class RocketlaneApp(APIApplication):
|
|
|
491
383
|
query_params = {}
|
|
492
384
|
response = self._delete(url, params=query_params)
|
|
493
385
|
response.raise_for_status()
|
|
494
|
-
if (
|
|
495
|
-
response.status_code == 204
|
|
496
|
-
or not response.content
|
|
497
|
-
or not response.text.strip()
|
|
498
|
-
):
|
|
386
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
499
387
|
return None
|
|
500
388
|
try:
|
|
501
389
|
return response.json()
|
|
502
390
|
except ValueError:
|
|
503
391
|
return None
|
|
504
392
|
|
|
505
|
-
def get_space_document(self, spaceDocumentId: str) -> dict[str, Any]:
|
|
393
|
+
async def get_space_document(self, spaceDocumentId: str) -> dict[str, Any]:
|
|
506
394
|
"""
|
|
507
395
|
Get space document by Id
|
|
508
396
|
|
|
@@ -525,23 +413,15 @@ class RocketlaneApp(APIApplication):
|
|
|
525
413
|
query_params = {}
|
|
526
414
|
response = self._get(url, params=query_params)
|
|
527
415
|
response.raise_for_status()
|
|
528
|
-
if (
|
|
529
|
-
response.status_code == 204
|
|
530
|
-
or not response.content
|
|
531
|
-
or not response.text.strip()
|
|
532
|
-
):
|
|
416
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
533
417
|
return None
|
|
534
418
|
try:
|
|
535
419
|
return response.json()
|
|
536
420
|
except ValueError:
|
|
537
421
|
return None
|
|
538
422
|
|
|
539
|
-
def update_space_document(
|
|
540
|
-
self,
|
|
541
|
-
spaceDocumentId: str,
|
|
542
|
-
spaceDocumentId_body: int | None = None,
|
|
543
|
-
spaceDocumentName: str | None = None,
|
|
544
|
-
url: str | None = None,
|
|
423
|
+
async def update_space_document(
|
|
424
|
+
self, spaceDocumentId: str, spaceDocumentId_body: int | None = None, spaceDocumentName: str | None = None, url: str | None = None
|
|
545
425
|
) -> dict[str, Any]:
|
|
546
426
|
"""
|
|
547
427
|
Update space document by Id
|
|
@@ -565,35 +445,20 @@ class RocketlaneApp(APIApplication):
|
|
|
565
445
|
if spaceDocumentId is None:
|
|
566
446
|
raise ValueError("Missing required parameter 'spaceDocumentId'.")
|
|
567
447
|
request_body_data = None
|
|
568
|
-
request_body_data = {
|
|
569
|
-
|
|
570
|
-
"spaceDocumentName": spaceDocumentName,
|
|
571
|
-
"url": url,
|
|
572
|
-
}
|
|
573
|
-
request_body_data = {
|
|
574
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
575
|
-
}
|
|
448
|
+
request_body_data = {"spaceDocumentId": spaceDocumentId_body, "spaceDocumentName": spaceDocumentName, "url": url}
|
|
449
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
576
450
|
url = f"{self.base_url}/1.0/space-documents/{spaceDocumentId}"
|
|
577
451
|
query_params = {}
|
|
578
|
-
response = self._put(
|
|
579
|
-
url,
|
|
580
|
-
data=request_body_data,
|
|
581
|
-
params=query_params,
|
|
582
|
-
content_type="application/json",
|
|
583
|
-
)
|
|
452
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
584
453
|
response.raise_for_status()
|
|
585
|
-
if (
|
|
586
|
-
response.status_code == 204
|
|
587
|
-
or not response.content
|
|
588
|
-
or not response.text.strip()
|
|
589
|
-
):
|
|
454
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
590
455
|
return None
|
|
591
456
|
try:
|
|
592
457
|
return response.json()
|
|
593
458
|
except ValueError:
|
|
594
459
|
return None
|
|
595
460
|
|
|
596
|
-
def delete_space_document(self, spaceDocumentId: str) -> Any:
|
|
461
|
+
async def delete_space_document(self, spaceDocumentId: str) -> Any:
|
|
597
462
|
"""
|
|
598
463
|
Delete space document by Id
|
|
599
464
|
|
|
@@ -616,22 +481,15 @@ class RocketlaneApp(APIApplication):
|
|
|
616
481
|
query_params = {}
|
|
617
482
|
response = self._delete(url, params=query_params)
|
|
618
483
|
response.raise_for_status()
|
|
619
|
-
if (
|
|
620
|
-
response.status_code == 204
|
|
621
|
-
or not response.content
|
|
622
|
-
or not response.text.strip()
|
|
623
|
-
):
|
|
484
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
624
485
|
return None
|
|
625
486
|
try:
|
|
626
487
|
return response.json()
|
|
627
488
|
except ValueError:
|
|
628
489
|
return None
|
|
629
490
|
|
|
630
|
-
def get_project(
|
|
631
|
-
self,
|
|
632
|
-
projectId: str,
|
|
633
|
-
includeFields: list[str] | None = None,
|
|
634
|
-
includeAllFields: bool | None = None,
|
|
491
|
+
async def get_project(
|
|
492
|
+
self, projectId: str, includeFields: list[str] | None = None, includeAllFields: bool | None = None
|
|
635
493
|
) -> dict[str, Any]:
|
|
636
494
|
"""
|
|
637
495
|
Get project by Id
|
|
@@ -654,28 +512,17 @@ class RocketlaneApp(APIApplication):
|
|
|
654
512
|
if projectId is None:
|
|
655
513
|
raise ValueError("Missing required parameter 'projectId'.")
|
|
656
514
|
url = f"{self.base_url}/1.0/projects/{projectId}"
|
|
657
|
-
query_params = {
|
|
658
|
-
k: v
|
|
659
|
-
for k, v in [
|
|
660
|
-
("includeFields", includeFields),
|
|
661
|
-
("includeAllFields", includeAllFields),
|
|
662
|
-
]
|
|
663
|
-
if v is not None
|
|
664
|
-
}
|
|
515
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
665
516
|
response = self._get(url, params=query_params)
|
|
666
517
|
response.raise_for_status()
|
|
667
|
-
if (
|
|
668
|
-
response.status_code == 204
|
|
669
|
-
or not response.content
|
|
670
|
-
or not response.text.strip()
|
|
671
|
-
):
|
|
518
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
672
519
|
return None
|
|
673
520
|
try:
|
|
674
521
|
return response.json()
|
|
675
522
|
except ValueError:
|
|
676
523
|
return None
|
|
677
524
|
|
|
678
|
-
def update_project(
|
|
525
|
+
async def update_project(
|
|
679
526
|
self,
|
|
680
527
|
projectId: str,
|
|
681
528
|
includeFields: list[str] | None = None,
|
|
@@ -740,37 +587,19 @@ class RocketlaneApp(APIApplication):
|
|
|
740
587
|
"budgetedHours": budgetedHours,
|
|
741
588
|
"externalReferenceId": externalReferenceId,
|
|
742
589
|
}
|
|
743
|
-
request_body_data = {
|
|
744
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
745
|
-
}
|
|
590
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
746
591
|
url = f"{self.base_url}/1.0/projects/{projectId}"
|
|
747
|
-
query_params = {
|
|
748
|
-
|
|
749
|
-
for k, v in [
|
|
750
|
-
("includeFields", includeFields),
|
|
751
|
-
("includeAllFields", includeAllFields),
|
|
752
|
-
]
|
|
753
|
-
if v is not None
|
|
754
|
-
}
|
|
755
|
-
response = self._put(
|
|
756
|
-
url,
|
|
757
|
-
data=request_body_data,
|
|
758
|
-
params=query_params,
|
|
759
|
-
content_type="application/json",
|
|
760
|
-
)
|
|
592
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
593
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
761
594
|
response.raise_for_status()
|
|
762
|
-
if (
|
|
763
|
-
response.status_code == 204
|
|
764
|
-
or not response.content
|
|
765
|
-
or not response.text.strip()
|
|
766
|
-
):
|
|
595
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
767
596
|
return None
|
|
768
597
|
try:
|
|
769
598
|
return response.json()
|
|
770
599
|
except ValueError:
|
|
771
600
|
return None
|
|
772
601
|
|
|
773
|
-
def delete_project(self, projectId: str) -> Any:
|
|
602
|
+
async def delete_project(self, projectId: str) -> Any:
|
|
774
603
|
"""
|
|
775
604
|
Delete project by Id
|
|
776
605
|
|
|
@@ -793,23 +622,14 @@ class RocketlaneApp(APIApplication):
|
|
|
793
622
|
query_params = {}
|
|
794
623
|
response = self._delete(url, params=query_params)
|
|
795
624
|
response.raise_for_status()
|
|
796
|
-
if (
|
|
797
|
-
response.status_code == 204
|
|
798
|
-
or not response.content
|
|
799
|
-
or not response.text.strip()
|
|
800
|
-
):
|
|
625
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
801
626
|
return None
|
|
802
627
|
try:
|
|
803
628
|
return response.json()
|
|
804
629
|
except ValueError:
|
|
805
630
|
return None
|
|
806
631
|
|
|
807
|
-
def get_phase(
|
|
808
|
-
self,
|
|
809
|
-
phaseId: str,
|
|
810
|
-
includeFields: list[str] | None = None,
|
|
811
|
-
includeAllFields: bool | None = None,
|
|
812
|
-
) -> dict[str, Any]:
|
|
632
|
+
async def get_phase(self, phaseId: str, includeFields: list[str] | None = None, includeAllFields: bool | None = None) -> dict[str, Any]:
|
|
813
633
|
"""
|
|
814
634
|
Get phase by Id
|
|
815
635
|
|
|
@@ -831,28 +651,17 @@ class RocketlaneApp(APIApplication):
|
|
|
831
651
|
if phaseId is None:
|
|
832
652
|
raise ValueError("Missing required parameter 'phaseId'.")
|
|
833
653
|
url = f"{self.base_url}/1.0/phases/{phaseId}"
|
|
834
|
-
query_params = {
|
|
835
|
-
k: v
|
|
836
|
-
for k, v in [
|
|
837
|
-
("includeFields", includeFields),
|
|
838
|
-
("includeAllFields", includeAllFields),
|
|
839
|
-
]
|
|
840
|
-
if v is not None
|
|
841
|
-
}
|
|
654
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
842
655
|
response = self._get(url, params=query_params)
|
|
843
656
|
response.raise_for_status()
|
|
844
|
-
if (
|
|
845
|
-
response.status_code == 204
|
|
846
|
-
or not response.content
|
|
847
|
-
or not response.text.strip()
|
|
848
|
-
):
|
|
657
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
849
658
|
return None
|
|
850
659
|
try:
|
|
851
660
|
return response.json()
|
|
852
661
|
except ValueError:
|
|
853
662
|
return None
|
|
854
663
|
|
|
855
|
-
def update_phase(
|
|
664
|
+
async def update_phase(
|
|
856
665
|
self,
|
|
857
666
|
phaseId: str,
|
|
858
667
|
includeFields: list[str] | None = None,
|
|
@@ -889,44 +698,20 @@ class RocketlaneApp(APIApplication):
|
|
|
889
698
|
if phaseId is None:
|
|
890
699
|
raise ValueError("Missing required parameter 'phaseId'.")
|
|
891
700
|
request_body_data = None
|
|
892
|
-
request_body_data = {
|
|
893
|
-
|
|
894
|
-
"startDate": startDate,
|
|
895
|
-
"dueDate": dueDate,
|
|
896
|
-
"status": status,
|
|
897
|
-
"private": private,
|
|
898
|
-
}
|
|
899
|
-
request_body_data = {
|
|
900
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
901
|
-
}
|
|
701
|
+
request_body_data = {"phaseName": phaseName, "startDate": startDate, "dueDate": dueDate, "status": status, "private": private}
|
|
702
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
902
703
|
url = f"{self.base_url}/1.0/phases/{phaseId}"
|
|
903
|
-
query_params = {
|
|
904
|
-
|
|
905
|
-
for k, v in [
|
|
906
|
-
("includeFields", includeFields),
|
|
907
|
-
("includeAllFields", includeAllFields),
|
|
908
|
-
]
|
|
909
|
-
if v is not None
|
|
910
|
-
}
|
|
911
|
-
response = self._put(
|
|
912
|
-
url,
|
|
913
|
-
data=request_body_data,
|
|
914
|
-
params=query_params,
|
|
915
|
-
content_type="application/json",
|
|
916
|
-
)
|
|
704
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
705
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
917
706
|
response.raise_for_status()
|
|
918
|
-
if (
|
|
919
|
-
response.status_code == 204
|
|
920
|
-
or not response.content
|
|
921
|
-
or not response.text.strip()
|
|
922
|
-
):
|
|
707
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
923
708
|
return None
|
|
924
709
|
try:
|
|
925
710
|
return response.json()
|
|
926
711
|
except ValueError:
|
|
927
712
|
return None
|
|
928
713
|
|
|
929
|
-
def delete_phase(self, phaseId: str) -> Any:
|
|
714
|
+
async def delete_phase(self, phaseId: str) -> Any:
|
|
930
715
|
"""
|
|
931
716
|
Delete phase by Id
|
|
932
717
|
|
|
@@ -949,23 +734,14 @@ class RocketlaneApp(APIApplication):
|
|
|
949
734
|
query_params = {}
|
|
950
735
|
response = self._delete(url, params=query_params)
|
|
951
736
|
response.raise_for_status()
|
|
952
|
-
if (
|
|
953
|
-
response.status_code == 204
|
|
954
|
-
or not response.content
|
|
955
|
-
or not response.text.strip()
|
|
956
|
-
):
|
|
737
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
957
738
|
return None
|
|
958
739
|
try:
|
|
959
740
|
return response.json()
|
|
960
741
|
except ValueError:
|
|
961
742
|
return None
|
|
962
743
|
|
|
963
|
-
def get_field(
|
|
964
|
-
self,
|
|
965
|
-
fieldId: str,
|
|
966
|
-
includeFields: list[str] | None = None,
|
|
967
|
-
includeAllFields: bool | None = None,
|
|
968
|
-
) -> dict[str, Any]:
|
|
744
|
+
async def get_field(self, fieldId: str, includeFields: list[str] | None = None, includeAllFields: bool | None = None) -> dict[str, Any]:
|
|
969
745
|
"""
|
|
970
746
|
Get field by Id
|
|
971
747
|
|
|
@@ -987,28 +763,17 @@ class RocketlaneApp(APIApplication):
|
|
|
987
763
|
if fieldId is None:
|
|
988
764
|
raise ValueError("Missing required parameter 'fieldId'.")
|
|
989
765
|
url = f"{self.base_url}/1.0/fields/{fieldId}"
|
|
990
|
-
query_params = {
|
|
991
|
-
k: v
|
|
992
|
-
for k, v in [
|
|
993
|
-
("includeFields", includeFields),
|
|
994
|
-
("includeAllFields", includeAllFields),
|
|
995
|
-
]
|
|
996
|
-
if v is not None
|
|
997
|
-
}
|
|
766
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
998
767
|
response = self._get(url, params=query_params)
|
|
999
768
|
response.raise_for_status()
|
|
1000
|
-
if (
|
|
1001
|
-
response.status_code == 204
|
|
1002
|
-
or not response.content
|
|
1003
|
-
or not response.text.strip()
|
|
1004
|
-
):
|
|
769
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1005
770
|
return None
|
|
1006
771
|
try:
|
|
1007
772
|
return response.json()
|
|
1008
773
|
except ValueError:
|
|
1009
774
|
return None
|
|
1010
775
|
|
|
1011
|
-
def update_field(
|
|
776
|
+
async def update_field(
|
|
1012
777
|
self,
|
|
1013
778
|
fieldId: str,
|
|
1014
779
|
includeFields: list[str] | None = None,
|
|
@@ -1043,43 +808,20 @@ class RocketlaneApp(APIApplication):
|
|
|
1043
808
|
if fieldId is None:
|
|
1044
809
|
raise ValueError("Missing required parameter 'fieldId'.")
|
|
1045
810
|
request_body_data = None
|
|
1046
|
-
request_body_data = {
|
|
1047
|
-
|
|
1048
|
-
"fieldDescription": fieldDescription,
|
|
1049
|
-
"enabled": enabled,
|
|
1050
|
-
"private": private,
|
|
1051
|
-
}
|
|
1052
|
-
request_body_data = {
|
|
1053
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1054
|
-
}
|
|
811
|
+
request_body_data = {"fieldLabel": fieldLabel, "fieldDescription": fieldDescription, "enabled": enabled, "private": private}
|
|
812
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1055
813
|
url = f"{self.base_url}/1.0/fields/{fieldId}"
|
|
1056
|
-
query_params = {
|
|
1057
|
-
|
|
1058
|
-
for k, v in [
|
|
1059
|
-
("includeFields", includeFields),
|
|
1060
|
-
("includeAllFields", includeAllFields),
|
|
1061
|
-
]
|
|
1062
|
-
if v is not None
|
|
1063
|
-
}
|
|
1064
|
-
response = self._put(
|
|
1065
|
-
url,
|
|
1066
|
-
data=request_body_data,
|
|
1067
|
-
params=query_params,
|
|
1068
|
-
content_type="application/json",
|
|
1069
|
-
)
|
|
814
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
815
|
+
response = self._put(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1070
816
|
response.raise_for_status()
|
|
1071
|
-
if (
|
|
1072
|
-
response.status_code == 204
|
|
1073
|
-
or not response.content
|
|
1074
|
-
or not response.text.strip()
|
|
1075
|
-
):
|
|
817
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1076
818
|
return None
|
|
1077
819
|
try:
|
|
1078
820
|
return response.json()
|
|
1079
821
|
except ValueError:
|
|
1080
822
|
return None
|
|
1081
823
|
|
|
1082
|
-
def delete_field(self, fieldId: str) -> Any:
|
|
824
|
+
async def delete_field(self, fieldId: str) -> Any:
|
|
1083
825
|
"""
|
|
1084
826
|
Delete field by Id
|
|
1085
827
|
|
|
@@ -1102,18 +844,14 @@ class RocketlaneApp(APIApplication):
|
|
|
1102
844
|
query_params = {}
|
|
1103
845
|
response = self._delete(url, params=query_params)
|
|
1104
846
|
response.raise_for_status()
|
|
1105
|
-
if (
|
|
1106
|
-
response.status_code == 204
|
|
1107
|
-
or not response.content
|
|
1108
|
-
or not response.text.strip()
|
|
1109
|
-
):
|
|
847
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1110
848
|
return None
|
|
1111
849
|
try:
|
|
1112
850
|
return response.json()
|
|
1113
851
|
except ValueError:
|
|
1114
852
|
return None
|
|
1115
853
|
|
|
1116
|
-
def get_all_timeoffs(
|
|
854
|
+
async def get_all_timeoffs(
|
|
1117
855
|
self,
|
|
1118
856
|
pageSize: float | None = None,
|
|
1119
857
|
pageToken: str | None = None,
|
|
@@ -1209,18 +947,14 @@ class RocketlaneApp(APIApplication):
|
|
|
1209
947
|
}
|
|
1210
948
|
response = self._get(url, params=query_params)
|
|
1211
949
|
response.raise_for_status()
|
|
1212
|
-
if (
|
|
1213
|
-
response.status_code == 204
|
|
1214
|
-
or not response.content
|
|
1215
|
-
or not response.text.strip()
|
|
1216
|
-
):
|
|
950
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1217
951
|
return None
|
|
1218
952
|
try:
|
|
1219
953
|
return response.json()
|
|
1220
954
|
except ValueError:
|
|
1221
955
|
return None
|
|
1222
956
|
|
|
1223
|
-
def create_timeoff(
|
|
957
|
+
async def create_timeoff(
|
|
1224
958
|
self,
|
|
1225
959
|
includeFields: list[str] | None = None,
|
|
1226
960
|
includeAllFields: bool | None = None,
|
|
@@ -1269,37 +1003,19 @@ class RocketlaneApp(APIApplication):
|
|
|
1269
1003
|
"notifyUsers": notifyUsers,
|
|
1270
1004
|
"durationInMinutes": durationInMinutes,
|
|
1271
1005
|
}
|
|
1272
|
-
request_body_data = {
|
|
1273
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1274
|
-
}
|
|
1006
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1275
1007
|
url = f"{self.base_url}/1.0/time-offs"
|
|
1276
|
-
query_params = {
|
|
1277
|
-
|
|
1278
|
-
for k, v in [
|
|
1279
|
-
("includeFields", includeFields),
|
|
1280
|
-
("includeAllFields", includeAllFields),
|
|
1281
|
-
]
|
|
1282
|
-
if v is not None
|
|
1283
|
-
}
|
|
1284
|
-
response = self._post(
|
|
1285
|
-
url,
|
|
1286
|
-
data=request_body_data,
|
|
1287
|
-
params=query_params,
|
|
1288
|
-
content_type="application/json",
|
|
1289
|
-
)
|
|
1008
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
1009
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1290
1010
|
response.raise_for_status()
|
|
1291
|
-
if (
|
|
1292
|
-
response.status_code == 204
|
|
1293
|
-
or not response.content
|
|
1294
|
-
or not response.text.strip()
|
|
1295
|
-
):
|
|
1011
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1296
1012
|
return None
|
|
1297
1013
|
try:
|
|
1298
1014
|
return response.json()
|
|
1299
1015
|
except ValueError:
|
|
1300
1016
|
return None
|
|
1301
1017
|
|
|
1302
|
-
def get_all_time_entries(
|
|
1018
|
+
async def get_all_time_entries(
|
|
1303
1019
|
self,
|
|
1304
1020
|
pageSize: float | None = None,
|
|
1305
1021
|
pageToken: str | None = None,
|
|
@@ -1455,18 +1171,14 @@ class RocketlaneApp(APIApplication):
|
|
|
1455
1171
|
}
|
|
1456
1172
|
response = self._get(url, params=query_params)
|
|
1457
1173
|
response.raise_for_status()
|
|
1458
|
-
if (
|
|
1459
|
-
response.status_code == 204
|
|
1460
|
-
or not response.content
|
|
1461
|
-
or not response.text.strip()
|
|
1462
|
-
):
|
|
1174
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1463
1175
|
return None
|
|
1464
1176
|
try:
|
|
1465
1177
|
return response.json()
|
|
1466
1178
|
except ValueError:
|
|
1467
1179
|
return None
|
|
1468
1180
|
|
|
1469
|
-
def create_time_entry(
|
|
1181
|
+
async def create_time_entry(
|
|
1470
1182
|
self,
|
|
1471
1183
|
includeFields: list[str] | None = None,
|
|
1472
1184
|
includeAllFields: bool | None = None,
|
|
@@ -1524,39 +1236,19 @@ class RocketlaneApp(APIApplication):
|
|
|
1524
1236
|
"notes": notes,
|
|
1525
1237
|
"category": category,
|
|
1526
1238
|
}
|
|
1527
|
-
request_body_data = {
|
|
1528
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1529
|
-
}
|
|
1239
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1530
1240
|
url = f"{self.base_url}/1.0/time-entries"
|
|
1531
|
-
query_params = {
|
|
1532
|
-
|
|
1533
|
-
for k, v in [
|
|
1534
|
-
("includeFields", includeFields),
|
|
1535
|
-
("includeAllFields", includeAllFields),
|
|
1536
|
-
]
|
|
1537
|
-
if v is not None
|
|
1538
|
-
}
|
|
1539
|
-
response = self._post(
|
|
1540
|
-
url,
|
|
1541
|
-
data=request_body_data,
|
|
1542
|
-
params=query_params,
|
|
1543
|
-
content_type="application/json",
|
|
1544
|
-
)
|
|
1241
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
1242
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1545
1243
|
response.raise_for_status()
|
|
1546
|
-
if (
|
|
1547
|
-
response.status_code == 204
|
|
1548
|
-
or not response.content
|
|
1549
|
-
or not response.text.strip()
|
|
1550
|
-
):
|
|
1244
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1551
1245
|
return None
|
|
1552
1246
|
try:
|
|
1553
1247
|
return response.json()
|
|
1554
1248
|
except ValueError:
|
|
1555
1249
|
return None
|
|
1556
1250
|
|
|
1557
|
-
def remove_followers_from_task(
|
|
1558
|
-
self, taskId: str, members: list[dict[str, Any]] | None = None
|
|
1559
|
-
) -> dict[str, Any]:
|
|
1251
|
+
async def remove_followers_from_task(self, taskId: str, members: list[dict[str, Any]] | None = None) -> dict[str, Any]:
|
|
1560
1252
|
"""
|
|
1561
1253
|
Remove followers from a task by Id
|
|
1562
1254
|
|
|
@@ -1577,35 +1269,20 @@ class RocketlaneApp(APIApplication):
|
|
|
1577
1269
|
if taskId is None:
|
|
1578
1270
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
1579
1271
|
request_body_data = None
|
|
1580
|
-
request_body_data = {
|
|
1581
|
-
|
|
1582
|
-
}
|
|
1583
|
-
request_body_data = {
|
|
1584
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1585
|
-
}
|
|
1272
|
+
request_body_data = {"members": members}
|
|
1273
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1586
1274
|
url = f"{self.base_url}/1.0/tasks/{taskId}/remove-followers"
|
|
1587
1275
|
query_params = {}
|
|
1588
|
-
response = self._post(
|
|
1589
|
-
url,
|
|
1590
|
-
data=request_body_data,
|
|
1591
|
-
params=query_params,
|
|
1592
|
-
content_type="application/json",
|
|
1593
|
-
)
|
|
1276
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1594
1277
|
response.raise_for_status()
|
|
1595
|
-
if (
|
|
1596
|
-
response.status_code == 204
|
|
1597
|
-
or not response.content
|
|
1598
|
-
or not response.text.strip()
|
|
1599
|
-
):
|
|
1278
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1600
1279
|
return None
|
|
1601
1280
|
try:
|
|
1602
1281
|
return response.json()
|
|
1603
1282
|
except ValueError:
|
|
1604
1283
|
return None
|
|
1605
1284
|
|
|
1606
|
-
def remove_dependencies_from_task(
|
|
1607
|
-
self, taskId: str, dependencies: list[dict[str, Any]] | None = None
|
|
1608
|
-
) -> dict[str, Any]:
|
|
1285
|
+
async def remove_dependencies_from_task(self, taskId: str, dependencies: list[dict[str, Any]] | None = None) -> dict[str, Any]:
|
|
1609
1286
|
"""
|
|
1610
1287
|
Remove dependencies from a task by Id
|
|
1611
1288
|
|
|
@@ -1626,37 +1303,21 @@ class RocketlaneApp(APIApplication):
|
|
|
1626
1303
|
if taskId is None:
|
|
1627
1304
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
1628
1305
|
request_body_data = None
|
|
1629
|
-
request_body_data = {
|
|
1630
|
-
|
|
1631
|
-
}
|
|
1632
|
-
request_body_data = {
|
|
1633
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1634
|
-
}
|
|
1306
|
+
request_body_data = {"dependencies": dependencies}
|
|
1307
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1635
1308
|
url = f"{self.base_url}/1.0/tasks/{taskId}/remove-dependencies"
|
|
1636
1309
|
query_params = {}
|
|
1637
|
-
response = self._post(
|
|
1638
|
-
url,
|
|
1639
|
-
data=request_body_data,
|
|
1640
|
-
params=query_params,
|
|
1641
|
-
content_type="application/json",
|
|
1642
|
-
)
|
|
1310
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1643
1311
|
response.raise_for_status()
|
|
1644
|
-
if (
|
|
1645
|
-
response.status_code == 204
|
|
1646
|
-
or not response.content
|
|
1647
|
-
or not response.text.strip()
|
|
1648
|
-
):
|
|
1312
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1649
1313
|
return None
|
|
1650
1314
|
try:
|
|
1651
1315
|
return response.json()
|
|
1652
1316
|
except ValueError:
|
|
1653
1317
|
return None
|
|
1654
1318
|
|
|
1655
|
-
def remove_assignees_from_task(
|
|
1656
|
-
self,
|
|
1657
|
-
taskId: str,
|
|
1658
|
-
members: list[dict[str, Any]] | None = None,
|
|
1659
|
-
placeholders: list[dict[str, Any]] | None = None,
|
|
1319
|
+
async def remove_assignees_from_task(
|
|
1320
|
+
self, taskId: str, members: list[dict[str, Any]] | None = None, placeholders: list[dict[str, Any]] | None = None
|
|
1660
1321
|
) -> dict[str, Any]:
|
|
1661
1322
|
"""
|
|
1662
1323
|
Remove assignees from a task by Id
|
|
@@ -1680,36 +1341,20 @@ class RocketlaneApp(APIApplication):
|
|
|
1680
1341
|
if taskId is None:
|
|
1681
1342
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
1682
1343
|
request_body_data = None
|
|
1683
|
-
request_body_data = {
|
|
1684
|
-
|
|
1685
|
-
"placeholders": placeholders,
|
|
1686
|
-
}
|
|
1687
|
-
request_body_data = {
|
|
1688
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1689
|
-
}
|
|
1344
|
+
request_body_data = {"members": members, "placeholders": placeholders}
|
|
1345
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1690
1346
|
url = f"{self.base_url}/1.0/tasks/{taskId}/remove-assignees"
|
|
1691
1347
|
query_params = {}
|
|
1692
|
-
response = self._post(
|
|
1693
|
-
url,
|
|
1694
|
-
data=request_body_data,
|
|
1695
|
-
params=query_params,
|
|
1696
|
-
content_type="application/json",
|
|
1697
|
-
)
|
|
1348
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1698
1349
|
response.raise_for_status()
|
|
1699
|
-
if (
|
|
1700
|
-
response.status_code == 204
|
|
1701
|
-
or not response.content
|
|
1702
|
-
or not response.text.strip()
|
|
1703
|
-
):
|
|
1350
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1704
1351
|
return None
|
|
1705
1352
|
try:
|
|
1706
1353
|
return response.json()
|
|
1707
1354
|
except ValueError:
|
|
1708
1355
|
return None
|
|
1709
1356
|
|
|
1710
|
-
def move_task_to_given_phase(
|
|
1711
|
-
self, taskId: str, phase: dict[str, Any] | None = None
|
|
1712
|
-
) -> dict[str, Any]:
|
|
1357
|
+
async def move_task_to_given_phase(self, taskId: str, phase: dict[str, Any] | None = None) -> dict[str, Any]:
|
|
1713
1358
|
"""
|
|
1714
1359
|
Move a task to the phase by Id
|
|
1715
1360
|
|
|
@@ -1730,35 +1375,20 @@ class RocketlaneApp(APIApplication):
|
|
|
1730
1375
|
if taskId is None:
|
|
1731
1376
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
1732
1377
|
request_body_data = None
|
|
1733
|
-
request_body_data = {
|
|
1734
|
-
|
|
1735
|
-
}
|
|
1736
|
-
request_body_data = {
|
|
1737
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1738
|
-
}
|
|
1378
|
+
request_body_data = {"phase": phase}
|
|
1379
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1739
1380
|
url = f"{self.base_url}/1.0/tasks/{taskId}/move-phase"
|
|
1740
1381
|
query_params = {}
|
|
1741
|
-
response = self._post(
|
|
1742
|
-
url,
|
|
1743
|
-
data=request_body_data,
|
|
1744
|
-
params=query_params,
|
|
1745
|
-
content_type="application/json",
|
|
1746
|
-
)
|
|
1382
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1747
1383
|
response.raise_for_status()
|
|
1748
|
-
if (
|
|
1749
|
-
response.status_code == 204
|
|
1750
|
-
or not response.content
|
|
1751
|
-
or not response.text.strip()
|
|
1752
|
-
):
|
|
1384
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1753
1385
|
return None
|
|
1754
1386
|
try:
|
|
1755
1387
|
return response.json()
|
|
1756
1388
|
except ValueError:
|
|
1757
1389
|
return None
|
|
1758
1390
|
|
|
1759
|
-
def add_followers_to_task(
|
|
1760
|
-
self, taskId: str, members: list[dict[str, Any]] | None = None
|
|
1761
|
-
) -> dict[str, Any]:
|
|
1391
|
+
async def add_followers_to_task(self, taskId: str, members: list[dict[str, Any]] | None = None) -> dict[str, Any]:
|
|
1762
1392
|
"""
|
|
1763
1393
|
Add followers to a task by Id
|
|
1764
1394
|
|
|
@@ -1779,35 +1409,20 @@ class RocketlaneApp(APIApplication):
|
|
|
1779
1409
|
if taskId is None:
|
|
1780
1410
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
1781
1411
|
request_body_data = None
|
|
1782
|
-
request_body_data = {
|
|
1783
|
-
|
|
1784
|
-
}
|
|
1785
|
-
request_body_data = {
|
|
1786
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1787
|
-
}
|
|
1412
|
+
request_body_data = {"members": members}
|
|
1413
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1788
1414
|
url = f"{self.base_url}/1.0/tasks/{taskId}/add-followers"
|
|
1789
1415
|
query_params = {}
|
|
1790
|
-
response = self._post(
|
|
1791
|
-
url,
|
|
1792
|
-
data=request_body_data,
|
|
1793
|
-
params=query_params,
|
|
1794
|
-
content_type="application/json",
|
|
1795
|
-
)
|
|
1416
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1796
1417
|
response.raise_for_status()
|
|
1797
|
-
if (
|
|
1798
|
-
response.status_code == 204
|
|
1799
|
-
or not response.content
|
|
1800
|
-
or not response.text.strip()
|
|
1801
|
-
):
|
|
1418
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1802
1419
|
return None
|
|
1803
1420
|
try:
|
|
1804
1421
|
return response.json()
|
|
1805
1422
|
except ValueError:
|
|
1806
1423
|
return None
|
|
1807
1424
|
|
|
1808
|
-
def add_dependencies_to_task(
|
|
1809
|
-
self, taskId: str, dependencies: list[dict[str, Any]] | None = None
|
|
1810
|
-
) -> dict[str, Any]:
|
|
1425
|
+
async def add_dependencies_to_task(self, taskId: str, dependencies: list[dict[str, Any]] | None = None) -> dict[str, Any]:
|
|
1811
1426
|
"""
|
|
1812
1427
|
Add dependencies to a task by Id
|
|
1813
1428
|
|
|
@@ -1828,37 +1443,21 @@ class RocketlaneApp(APIApplication):
|
|
|
1828
1443
|
if taskId is None:
|
|
1829
1444
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
1830
1445
|
request_body_data = None
|
|
1831
|
-
request_body_data = {
|
|
1832
|
-
|
|
1833
|
-
}
|
|
1834
|
-
request_body_data = {
|
|
1835
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1836
|
-
}
|
|
1446
|
+
request_body_data = {"dependencies": dependencies}
|
|
1447
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1837
1448
|
url = f"{self.base_url}/1.0/tasks/{taskId}/add-dependencies"
|
|
1838
1449
|
query_params = {}
|
|
1839
|
-
response = self._post(
|
|
1840
|
-
url,
|
|
1841
|
-
data=request_body_data,
|
|
1842
|
-
params=query_params,
|
|
1843
|
-
content_type="application/json",
|
|
1844
|
-
)
|
|
1450
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1845
1451
|
response.raise_for_status()
|
|
1846
|
-
if (
|
|
1847
|
-
response.status_code == 204
|
|
1848
|
-
or not response.content
|
|
1849
|
-
or not response.text.strip()
|
|
1850
|
-
):
|
|
1452
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1851
1453
|
return None
|
|
1852
1454
|
try:
|
|
1853
1455
|
return response.json()
|
|
1854
1456
|
except ValueError:
|
|
1855
1457
|
return None
|
|
1856
1458
|
|
|
1857
|
-
def add_assignee_to_task(
|
|
1858
|
-
self,
|
|
1859
|
-
taskId: str,
|
|
1860
|
-
members: list[dict[str, Any]] | None = None,
|
|
1861
|
-
placeholders: list[dict[str, Any]] | None = None,
|
|
1459
|
+
async def add_assignee_to_task(
|
|
1460
|
+
self, taskId: str, members: list[dict[str, Any]] | None = None, placeholders: list[dict[str, Any]] | None = None
|
|
1862
1461
|
) -> dict[str, Any]:
|
|
1863
1462
|
"""
|
|
1864
1463
|
Add assignees to a task by Id
|
|
@@ -1882,34 +1481,20 @@ class RocketlaneApp(APIApplication):
|
|
|
1882
1481
|
if taskId is None:
|
|
1883
1482
|
raise ValueError("Missing required parameter 'taskId'.")
|
|
1884
1483
|
request_body_data = None
|
|
1885
|
-
request_body_data = {
|
|
1886
|
-
|
|
1887
|
-
"placeholders": placeholders,
|
|
1888
|
-
}
|
|
1889
|
-
request_body_data = {
|
|
1890
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
1891
|
-
}
|
|
1484
|
+
request_body_data = {"members": members, "placeholders": placeholders}
|
|
1485
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
1892
1486
|
url = f"{self.base_url}/1.0/tasks/{taskId}/add-assignees"
|
|
1893
1487
|
query_params = {}
|
|
1894
|
-
response = self._post(
|
|
1895
|
-
url,
|
|
1896
|
-
data=request_body_data,
|
|
1897
|
-
params=query_params,
|
|
1898
|
-
content_type="application/json",
|
|
1899
|
-
)
|
|
1488
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
1900
1489
|
response.raise_for_status()
|
|
1901
|
-
if (
|
|
1902
|
-
response.status_code == 204
|
|
1903
|
-
or not response.content
|
|
1904
|
-
or not response.text.strip()
|
|
1905
|
-
):
|
|
1490
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
1906
1491
|
return None
|
|
1907
1492
|
try:
|
|
1908
1493
|
return response.json()
|
|
1909
1494
|
except ValueError:
|
|
1910
1495
|
return None
|
|
1911
1496
|
|
|
1912
|
-
def get_all_tasks(
|
|
1497
|
+
async def get_all_tasks(
|
|
1913
1498
|
self,
|
|
1914
1499
|
pageSize: float | None = None,
|
|
1915
1500
|
pageToken: str | None = None,
|
|
@@ -2104,18 +1689,14 @@ class RocketlaneApp(APIApplication):
|
|
|
2104
1689
|
}
|
|
2105
1690
|
response = self._get(url, params=query_params)
|
|
2106
1691
|
response.raise_for_status()
|
|
2107
|
-
if (
|
|
2108
|
-
response.status_code == 204
|
|
2109
|
-
or not response.content
|
|
2110
|
-
or not response.text.strip()
|
|
2111
|
-
):
|
|
1692
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2112
1693
|
return None
|
|
2113
1694
|
try:
|
|
2114
1695
|
return response.json()
|
|
2115
1696
|
except ValueError:
|
|
2116
1697
|
return None
|
|
2117
1698
|
|
|
2118
|
-
def create_task(
|
|
1699
|
+
async def create_task(
|
|
2119
1700
|
self,
|
|
2120
1701
|
includeFields: list[str] | None = None,
|
|
2121
1702
|
includeAllFields: bool | None = None,
|
|
@@ -2197,37 +1778,19 @@ class RocketlaneApp(APIApplication):
|
|
|
2197
1778
|
"externalReferenceId": externalReferenceId,
|
|
2198
1779
|
"private": private,
|
|
2199
1780
|
}
|
|
2200
|
-
request_body_data = {
|
|
2201
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2202
|
-
}
|
|
1781
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2203
1782
|
url = f"{self.base_url}/1.0/tasks"
|
|
2204
|
-
query_params = {
|
|
2205
|
-
|
|
2206
|
-
for k, v in [
|
|
2207
|
-
("includeFields", includeFields),
|
|
2208
|
-
("includeAllFields", includeAllFields),
|
|
2209
|
-
]
|
|
2210
|
-
if v is not None
|
|
2211
|
-
}
|
|
2212
|
-
response = self._post(
|
|
2213
|
-
url,
|
|
2214
|
-
data=request_body_data,
|
|
2215
|
-
params=query_params,
|
|
2216
|
-
content_type="application/json",
|
|
2217
|
-
)
|
|
1783
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
1784
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2218
1785
|
response.raise_for_status()
|
|
2219
|
-
if (
|
|
2220
|
-
response.status_code == 204
|
|
2221
|
-
or not response.content
|
|
2222
|
-
or not response.text.strip()
|
|
2223
|
-
):
|
|
1786
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2224
1787
|
return None
|
|
2225
1788
|
try:
|
|
2226
1789
|
return response.json()
|
|
2227
1790
|
except ValueError:
|
|
2228
1791
|
return None
|
|
2229
1792
|
|
|
2230
|
-
def get_all_spaces(
|
|
1793
|
+
async def get_all_spaces(
|
|
2231
1794
|
self,
|
|
2232
1795
|
projectId: int,
|
|
2233
1796
|
pageSize: float | None = None,
|
|
@@ -2311,23 +1874,15 @@ class RocketlaneApp(APIApplication):
|
|
|
2311
1874
|
}
|
|
2312
1875
|
response = self._get(url, params=query_params)
|
|
2313
1876
|
response.raise_for_status()
|
|
2314
|
-
if (
|
|
2315
|
-
response.status_code == 204
|
|
2316
|
-
or not response.content
|
|
2317
|
-
or not response.text.strip()
|
|
2318
|
-
):
|
|
1877
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2319
1878
|
return None
|
|
2320
1879
|
try:
|
|
2321
1880
|
return response.json()
|
|
2322
1881
|
except ValueError:
|
|
2323
1882
|
return None
|
|
2324
1883
|
|
|
2325
|
-
def create_space(
|
|
2326
|
-
self,
|
|
2327
|
-
spaceId: int | None = None,
|
|
2328
|
-
spaceName: str | None = None,
|
|
2329
|
-
project: dict[str, Any] | None = None,
|
|
2330
|
-
private: bool | None = None,
|
|
1884
|
+
async def create_space(
|
|
1885
|
+
self, spaceId: int | None = None, spaceName: str | None = None, project: dict[str, Any] | None = None, private: bool | None = None
|
|
2331
1886
|
) -> dict[str, Any]:
|
|
2332
1887
|
"""
|
|
2333
1888
|
Create a space
|
|
@@ -2349,36 +1904,20 @@ class RocketlaneApp(APIApplication):
|
|
|
2349
1904
|
Spaces
|
|
2350
1905
|
"""
|
|
2351
1906
|
request_body_data = None
|
|
2352
|
-
request_body_data = {
|
|
2353
|
-
|
|
2354
|
-
"spaceName": spaceName,
|
|
2355
|
-
"project": project,
|
|
2356
|
-
"private": private,
|
|
2357
|
-
}
|
|
2358
|
-
request_body_data = {
|
|
2359
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2360
|
-
}
|
|
1907
|
+
request_body_data = {"spaceId": spaceId, "spaceName": spaceName, "project": project, "private": private}
|
|
1908
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2361
1909
|
url = f"{self.base_url}/1.0/spaces"
|
|
2362
1910
|
query_params = {}
|
|
2363
|
-
response = self._post(
|
|
2364
|
-
url,
|
|
2365
|
-
data=request_body_data,
|
|
2366
|
-
params=query_params,
|
|
2367
|
-
content_type="application/json",
|
|
2368
|
-
)
|
|
1911
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2369
1912
|
response.raise_for_status()
|
|
2370
|
-
if (
|
|
2371
|
-
response.status_code == 204
|
|
2372
|
-
or not response.content
|
|
2373
|
-
or not response.text.strip()
|
|
2374
|
-
):
|
|
1913
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2375
1914
|
return None
|
|
2376
1915
|
try:
|
|
2377
1916
|
return response.json()
|
|
2378
1917
|
except ValueError:
|
|
2379
1918
|
return None
|
|
2380
1919
|
|
|
2381
|
-
def get_all_space_documents(
|
|
1920
|
+
async def get_all_space_documents(
|
|
2382
1921
|
self,
|
|
2383
1922
|
projectId: int,
|
|
2384
1923
|
pageSize: float | None = None,
|
|
@@ -2465,18 +2004,14 @@ class RocketlaneApp(APIApplication):
|
|
|
2465
2004
|
}
|
|
2466
2005
|
response = self._get(url, params=query_params)
|
|
2467
2006
|
response.raise_for_status()
|
|
2468
|
-
if (
|
|
2469
|
-
response.status_code == 204
|
|
2470
|
-
or not response.content
|
|
2471
|
-
or not response.text.strip()
|
|
2472
|
-
):
|
|
2007
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2473
2008
|
return None
|
|
2474
2009
|
try:
|
|
2475
2010
|
return response.json()
|
|
2476
2011
|
except ValueError:
|
|
2477
2012
|
return None
|
|
2478
2013
|
|
|
2479
|
-
def create_space_document(
|
|
2014
|
+
async def create_space_document(
|
|
2480
2015
|
self,
|
|
2481
2016
|
spaceDocumentId: int | None = None,
|
|
2482
2017
|
spaceDocumentName: str | None = None,
|
|
@@ -2515,32 +2050,19 @@ class RocketlaneApp(APIApplication):
|
|
|
2515
2050
|
"url": url,
|
|
2516
2051
|
"source": source,
|
|
2517
2052
|
}
|
|
2518
|
-
request_body_data = {
|
|
2519
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2520
|
-
}
|
|
2053
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2521
2054
|
url = f"{self.base_url}/1.0/space-documents"
|
|
2522
2055
|
query_params = {}
|
|
2523
|
-
response = self._post(
|
|
2524
|
-
url,
|
|
2525
|
-
data=request_body_data,
|
|
2526
|
-
params=query_params,
|
|
2527
|
-
content_type="application/json",
|
|
2528
|
-
)
|
|
2056
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2529
2057
|
response.raise_for_status()
|
|
2530
|
-
if (
|
|
2531
|
-
response.status_code == 204
|
|
2532
|
-
or not response.content
|
|
2533
|
-
or not response.text.strip()
|
|
2534
|
-
):
|
|
2058
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2535
2059
|
return None
|
|
2536
2060
|
try:
|
|
2537
2061
|
return response.json()
|
|
2538
2062
|
except ValueError:
|
|
2539
2063
|
return None
|
|
2540
2064
|
|
|
2541
|
-
def unassign_placeholders(
|
|
2542
|
-
self, projectId: str, items: list[dict[str, Any]]
|
|
2543
|
-
) -> dict[str, Any]:
|
|
2065
|
+
async def unassign_placeholders(self, projectId: str, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2544
2066
|
"""
|
|
2545
2067
|
Un assign placeholders from an user in a project
|
|
2546
2068
|
|
|
@@ -2560,31 +2082,19 @@ class RocketlaneApp(APIApplication):
|
|
|
2560
2082
|
if projectId is None:
|
|
2561
2083
|
raise ValueError("Missing required parameter 'projectId'.")
|
|
2562
2084
|
request_body_data = None
|
|
2563
|
-
# Using array parameter 'items' directly as request body
|
|
2564
2085
|
request_body_data = items
|
|
2565
2086
|
url = f"{self.base_url}/1.0/projects/{projectId}/unassign-placeholders"
|
|
2566
2087
|
query_params = {}
|
|
2567
|
-
response = self._post(
|
|
2568
|
-
url,
|
|
2569
|
-
data=request_body_data,
|
|
2570
|
-
params=query_params,
|
|
2571
|
-
content_type="application/json",
|
|
2572
|
-
)
|
|
2088
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2573
2089
|
response.raise_for_status()
|
|
2574
|
-
if (
|
|
2575
|
-
response.status_code == 204
|
|
2576
|
-
or not response.content
|
|
2577
|
-
or not response.text.strip()
|
|
2578
|
-
):
|
|
2090
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2579
2091
|
return None
|
|
2580
2092
|
try:
|
|
2581
2093
|
return response.json()
|
|
2582
2094
|
except ValueError:
|
|
2583
2095
|
return None
|
|
2584
2096
|
|
|
2585
|
-
def remove_members(
|
|
2586
|
-
self, projectId: str, members: list[dict[str, Any]]
|
|
2587
|
-
) -> dict[str, Any]:
|
|
2097
|
+
async def remove_members(self, projectId: str, members: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2588
2098
|
"""
|
|
2589
2099
|
Remove members from a project
|
|
2590
2100
|
|
|
@@ -2605,35 +2115,20 @@ class RocketlaneApp(APIApplication):
|
|
|
2605
2115
|
if projectId is None:
|
|
2606
2116
|
raise ValueError("Missing required parameter 'projectId'.")
|
|
2607
2117
|
request_body_data = None
|
|
2608
|
-
request_body_data = {
|
|
2609
|
-
|
|
2610
|
-
}
|
|
2611
|
-
request_body_data = {
|
|
2612
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2613
|
-
}
|
|
2118
|
+
request_body_data = {"members": members}
|
|
2119
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2614
2120
|
url = f"{self.base_url}/1.0/projects/{projectId}/remove-members"
|
|
2615
2121
|
query_params = {}
|
|
2616
|
-
response = self._post(
|
|
2617
|
-
url,
|
|
2618
|
-
data=request_body_data,
|
|
2619
|
-
params=query_params,
|
|
2620
|
-
content_type="application/json",
|
|
2621
|
-
)
|
|
2122
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2622
2123
|
response.raise_for_status()
|
|
2623
|
-
if (
|
|
2624
|
-
response.status_code == 204
|
|
2625
|
-
or not response.content
|
|
2626
|
-
or not response.text.strip()
|
|
2627
|
-
):
|
|
2124
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2628
2125
|
return None
|
|
2629
2126
|
try:
|
|
2630
2127
|
return response.json()
|
|
2631
2128
|
except ValueError:
|
|
2632
2129
|
return None
|
|
2633
2130
|
|
|
2634
|
-
def import_template(
|
|
2635
|
-
self, projectId: str, items: list[dict[str, Any]]
|
|
2636
|
-
) -> dict[str, Any]:
|
|
2131
|
+
async def import_template(self, projectId: str, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2637
2132
|
"""
|
|
2638
2133
|
Import a template to a project
|
|
2639
2134
|
|
|
@@ -2653,31 +2148,19 @@ class RocketlaneApp(APIApplication):
|
|
|
2653
2148
|
if projectId is None:
|
|
2654
2149
|
raise ValueError("Missing required parameter 'projectId'.")
|
|
2655
2150
|
request_body_data = None
|
|
2656
|
-
# Using array parameter 'items' directly as request body
|
|
2657
2151
|
request_body_data = items
|
|
2658
2152
|
url = f"{self.base_url}/1.0/projects/{projectId}/import-template"
|
|
2659
2153
|
query_params = {}
|
|
2660
|
-
response = self._post(
|
|
2661
|
-
url,
|
|
2662
|
-
data=request_body_data,
|
|
2663
|
-
params=query_params,
|
|
2664
|
-
content_type="application/json",
|
|
2665
|
-
)
|
|
2154
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2666
2155
|
response.raise_for_status()
|
|
2667
|
-
if (
|
|
2668
|
-
response.status_code == 204
|
|
2669
|
-
or not response.content
|
|
2670
|
-
or not response.text.strip()
|
|
2671
|
-
):
|
|
2156
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2672
2157
|
return None
|
|
2673
2158
|
try:
|
|
2674
2159
|
return response.json()
|
|
2675
2160
|
except ValueError:
|
|
2676
2161
|
return None
|
|
2677
2162
|
|
|
2678
|
-
def assign_placeholders(
|
|
2679
|
-
self, projectId: str, items: list[dict[str, Any]]
|
|
2680
|
-
) -> dict[str, Any]:
|
|
2163
|
+
async def assign_placeholders(self, projectId: str, items: list[dict[str, Any]]) -> dict[str, Any]:
|
|
2681
2164
|
"""
|
|
2682
2165
|
Assign placeholders to an user in a project
|
|
2683
2166
|
|
|
@@ -2697,29 +2180,19 @@ class RocketlaneApp(APIApplication):
|
|
|
2697
2180
|
if projectId is None:
|
|
2698
2181
|
raise ValueError("Missing required parameter 'projectId'.")
|
|
2699
2182
|
request_body_data = None
|
|
2700
|
-
# Using array parameter 'items' directly as request body
|
|
2701
2183
|
request_body_data = items
|
|
2702
2184
|
url = f"{self.base_url}/1.0/projects/{projectId}/assign-placeholders"
|
|
2703
2185
|
query_params = {}
|
|
2704
|
-
response = self._post(
|
|
2705
|
-
url,
|
|
2706
|
-
data=request_body_data,
|
|
2707
|
-
params=query_params,
|
|
2708
|
-
content_type="application/json",
|
|
2709
|
-
)
|
|
2186
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2710
2187
|
response.raise_for_status()
|
|
2711
|
-
if (
|
|
2712
|
-
response.status_code == 204
|
|
2713
|
-
or not response.content
|
|
2714
|
-
or not response.text.strip()
|
|
2715
|
-
):
|
|
2188
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2716
2189
|
return None
|
|
2717
2190
|
try:
|
|
2718
2191
|
return response.json()
|
|
2719
2192
|
except ValueError:
|
|
2720
2193
|
return None
|
|
2721
2194
|
|
|
2722
|
-
def archive_project(self, projectId: str) -> Any:
|
|
2195
|
+
async def archive_project(self, projectId: str) -> Any:
|
|
2723
2196
|
"""
|
|
2724
2197
|
Archive project by Id
|
|
2725
2198
|
|
|
@@ -2741,29 +2214,17 @@ class RocketlaneApp(APIApplication):
|
|
|
2741
2214
|
request_body_data = None
|
|
2742
2215
|
url = f"{self.base_url}/1.0/projects/{projectId}/archive"
|
|
2743
2216
|
query_params = {}
|
|
2744
|
-
response = self._post(
|
|
2745
|
-
url,
|
|
2746
|
-
data=request_body_data,
|
|
2747
|
-
params=query_params,
|
|
2748
|
-
content_type="application/json",
|
|
2749
|
-
)
|
|
2217
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2750
2218
|
response.raise_for_status()
|
|
2751
|
-
if (
|
|
2752
|
-
response.status_code == 204
|
|
2753
|
-
or not response.content
|
|
2754
|
-
or not response.text.strip()
|
|
2755
|
-
):
|
|
2219
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2756
2220
|
return None
|
|
2757
2221
|
try:
|
|
2758
2222
|
return response.json()
|
|
2759
2223
|
except ValueError:
|
|
2760
2224
|
return None
|
|
2761
2225
|
|
|
2762
|
-
def add_members(
|
|
2763
|
-
self,
|
|
2764
|
-
projectId: str,
|
|
2765
|
-
members: list[dict[str, Any]] | None = None,
|
|
2766
|
-
customers: list[dict[str, Any]] | None = None,
|
|
2226
|
+
async def add_members(
|
|
2227
|
+
self, projectId: str, members: list[dict[str, Any]] | None = None, customers: list[dict[str, Any]] | None = None
|
|
2767
2228
|
) -> dict[str, Any]:
|
|
2768
2229
|
"""
|
|
2769
2230
|
Add members to a project
|
|
@@ -2786,34 +2247,20 @@ class RocketlaneApp(APIApplication):
|
|
|
2786
2247
|
if projectId is None:
|
|
2787
2248
|
raise ValueError("Missing required parameter 'projectId'.")
|
|
2788
2249
|
request_body_data = None
|
|
2789
|
-
request_body_data = {
|
|
2790
|
-
|
|
2791
|
-
"customers": customers,
|
|
2792
|
-
}
|
|
2793
|
-
request_body_data = {
|
|
2794
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
2795
|
-
}
|
|
2250
|
+
request_body_data = {"members": members, "customers": customers}
|
|
2251
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
2796
2252
|
url = f"{self.base_url}/1.0/projects/{projectId}/add-members"
|
|
2797
2253
|
query_params = {}
|
|
2798
|
-
response = self._post(
|
|
2799
|
-
url,
|
|
2800
|
-
data=request_body_data,
|
|
2801
|
-
params=query_params,
|
|
2802
|
-
content_type="application/json",
|
|
2803
|
-
)
|
|
2254
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
2804
2255
|
response.raise_for_status()
|
|
2805
|
-
if (
|
|
2806
|
-
response.status_code == 204
|
|
2807
|
-
or not response.content
|
|
2808
|
-
or not response.text.strip()
|
|
2809
|
-
):
|
|
2256
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
2810
2257
|
return None
|
|
2811
2258
|
try:
|
|
2812
2259
|
return response.json()
|
|
2813
2260
|
except ValueError:
|
|
2814
2261
|
return None
|
|
2815
2262
|
|
|
2816
|
-
def get_all_projects(
|
|
2263
|
+
async def get_all_projects(
|
|
2817
2264
|
self,
|
|
2818
2265
|
pageSize: float | None = None,
|
|
2819
2266
|
pageToken: str | None = None,
|
|
@@ -3089,18 +2536,14 @@ class RocketlaneApp(APIApplication):
|
|
|
3089
2536
|
}
|
|
3090
2537
|
response = self._get(url, params=query_params)
|
|
3091
2538
|
response.raise_for_status()
|
|
3092
|
-
if (
|
|
3093
|
-
response.status_code == 204
|
|
3094
|
-
or not response.content
|
|
3095
|
-
or not response.text.strip()
|
|
3096
|
-
):
|
|
2539
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3097
2540
|
return None
|
|
3098
2541
|
try:
|
|
3099
2542
|
return response.json()
|
|
3100
2543
|
except ValueError:
|
|
3101
2544
|
return None
|
|
3102
2545
|
|
|
3103
|
-
def create_project(
|
|
2546
|
+
async def create_project(
|
|
3104
2547
|
self,
|
|
3105
2548
|
includeFields: list[str] | None = None,
|
|
3106
2549
|
includeAllFields: bool | None = None,
|
|
@@ -3192,37 +2635,19 @@ class RocketlaneApp(APIApplication):
|
|
|
3192
2635
|
"currency": currency,
|
|
3193
2636
|
"externalReferenceId": externalReferenceId,
|
|
3194
2637
|
}
|
|
3195
|
-
request_body_data = {
|
|
3196
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3197
|
-
}
|
|
2638
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3198
2639
|
url = f"{self.base_url}/1.0/projects"
|
|
3199
|
-
query_params = {
|
|
3200
|
-
|
|
3201
|
-
for k, v in [
|
|
3202
|
-
("includeFields", includeFields),
|
|
3203
|
-
("includeAllFields", includeAllFields),
|
|
3204
|
-
]
|
|
3205
|
-
if v is not None
|
|
3206
|
-
}
|
|
3207
|
-
response = self._post(
|
|
3208
|
-
url,
|
|
3209
|
-
data=request_body_data,
|
|
3210
|
-
params=query_params,
|
|
3211
|
-
content_type="application/json",
|
|
3212
|
-
)
|
|
2640
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
2641
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3213
2642
|
response.raise_for_status()
|
|
3214
|
-
if (
|
|
3215
|
-
response.status_code == 204
|
|
3216
|
-
or not response.content
|
|
3217
|
-
or not response.text.strip()
|
|
3218
|
-
):
|
|
2643
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3219
2644
|
return None
|
|
3220
2645
|
try:
|
|
3221
2646
|
return response.json()
|
|
3222
2647
|
except ValueError:
|
|
3223
2648
|
return None
|
|
3224
2649
|
|
|
3225
|
-
def get_all_phases(
|
|
2650
|
+
async def get_all_phases(
|
|
3226
2651
|
self,
|
|
3227
2652
|
projectId: int,
|
|
3228
2653
|
pageSize: float | None = None,
|
|
@@ -3372,18 +2797,14 @@ class RocketlaneApp(APIApplication):
|
|
|
3372
2797
|
}
|
|
3373
2798
|
response = self._get(url, params=query_params)
|
|
3374
2799
|
response.raise_for_status()
|
|
3375
|
-
if (
|
|
3376
|
-
response.status_code == 204
|
|
3377
|
-
or not response.content
|
|
3378
|
-
or not response.text.strip()
|
|
3379
|
-
):
|
|
2800
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3380
2801
|
return None
|
|
3381
2802
|
try:
|
|
3382
2803
|
return response.json()
|
|
3383
2804
|
except ValueError:
|
|
3384
2805
|
return None
|
|
3385
2806
|
|
|
3386
|
-
def create_phase(
|
|
2807
|
+
async def create_phase(
|
|
3387
2808
|
self,
|
|
3388
2809
|
includeFields: list[str] | None = None,
|
|
3389
2810
|
includeAllFields: bool | None = None,
|
|
@@ -3429,42 +2850,20 @@ class RocketlaneApp(APIApplication):
|
|
|
3429
2850
|
"status": status,
|
|
3430
2851
|
"private": private,
|
|
3431
2852
|
}
|
|
3432
|
-
request_body_data = {
|
|
3433
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3434
|
-
}
|
|
2853
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3435
2854
|
url = f"{self.base_url}/1.0/phases"
|
|
3436
|
-
query_params = {
|
|
3437
|
-
|
|
3438
|
-
for k, v in [
|
|
3439
|
-
("includeFields", includeFields),
|
|
3440
|
-
("includeAllFields", includeAllFields),
|
|
3441
|
-
]
|
|
3442
|
-
if v is not None
|
|
3443
|
-
}
|
|
3444
|
-
response = self._post(
|
|
3445
|
-
url,
|
|
3446
|
-
data=request_body_data,
|
|
3447
|
-
params=query_params,
|
|
3448
|
-
content_type="application/json",
|
|
3449
|
-
)
|
|
2855
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
2856
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3450
2857
|
response.raise_for_status()
|
|
3451
|
-
if (
|
|
3452
|
-
response.status_code == 204
|
|
3453
|
-
or not response.content
|
|
3454
|
-
or not response.text.strip()
|
|
3455
|
-
):
|
|
2858
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3456
2859
|
return None
|
|
3457
2860
|
try:
|
|
3458
2861
|
return response.json()
|
|
3459
2862
|
except ValueError:
|
|
3460
2863
|
return None
|
|
3461
2864
|
|
|
3462
|
-
def update_field_option(
|
|
3463
|
-
self,
|
|
3464
|
-
fieldId: str,
|
|
3465
|
-
optionValue: int | None = None,
|
|
3466
|
-
optionColor: str | None = None,
|
|
3467
|
-
optionLabel: str | None = None,
|
|
2865
|
+
async def update_field_option(
|
|
2866
|
+
self, fieldId: str, optionValue: int | None = None, optionColor: str | None = None, optionLabel: str | None = None
|
|
3468
2867
|
) -> dict[str, Any]:
|
|
3469
2868
|
"""
|
|
3470
2869
|
Update field Option
|
|
@@ -3488,40 +2887,20 @@ class RocketlaneApp(APIApplication):
|
|
|
3488
2887
|
if fieldId is None:
|
|
3489
2888
|
raise ValueError("Missing required parameter 'fieldId'.")
|
|
3490
2889
|
request_body_data = None
|
|
3491
|
-
request_body_data = {
|
|
3492
|
-
|
|
3493
|
-
"optionColor": optionColor,
|
|
3494
|
-
"optionLabel": optionLabel,
|
|
3495
|
-
}
|
|
3496
|
-
request_body_data = {
|
|
3497
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3498
|
-
}
|
|
2890
|
+
request_body_data = {"optionValue": optionValue, "optionColor": optionColor, "optionLabel": optionLabel}
|
|
2891
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3499
2892
|
url = f"{self.base_url}/1.0/fields/{fieldId}/update-option"
|
|
3500
2893
|
query_params = {}
|
|
3501
|
-
response = self._post(
|
|
3502
|
-
url,
|
|
3503
|
-
data=request_body_data,
|
|
3504
|
-
params=query_params,
|
|
3505
|
-
content_type="application/json",
|
|
3506
|
-
)
|
|
2894
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3507
2895
|
response.raise_for_status()
|
|
3508
|
-
if (
|
|
3509
|
-
response.status_code == 204
|
|
3510
|
-
or not response.content
|
|
3511
|
-
or not response.text.strip()
|
|
3512
|
-
):
|
|
2896
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3513
2897
|
return None
|
|
3514
2898
|
try:
|
|
3515
2899
|
return response.json()
|
|
3516
2900
|
except ValueError:
|
|
3517
2901
|
return None
|
|
3518
2902
|
|
|
3519
|
-
def add_field_option(
|
|
3520
|
-
self,
|
|
3521
|
-
fieldId: str,
|
|
3522
|
-
optionColor: str | None = None,
|
|
3523
|
-
optionLabel: str | None = None,
|
|
3524
|
-
) -> dict[str, Any]:
|
|
2903
|
+
async def add_field_option(self, fieldId: str, optionColor: str | None = None, optionLabel: str | None = None) -> dict[str, Any]:
|
|
3525
2904
|
"""
|
|
3526
2905
|
Add field Option
|
|
3527
2906
|
|
|
@@ -3543,34 +2922,20 @@ class RocketlaneApp(APIApplication):
|
|
|
3543
2922
|
if fieldId is None:
|
|
3544
2923
|
raise ValueError("Missing required parameter 'fieldId'.")
|
|
3545
2924
|
request_body_data = None
|
|
3546
|
-
request_body_data = {
|
|
3547
|
-
|
|
3548
|
-
"optionLabel": optionLabel,
|
|
3549
|
-
}
|
|
3550
|
-
request_body_data = {
|
|
3551
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3552
|
-
}
|
|
2925
|
+
request_body_data = {"optionColor": optionColor, "optionLabel": optionLabel}
|
|
2926
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3553
2927
|
url = f"{self.base_url}/1.0/fields/{fieldId}/add-option"
|
|
3554
2928
|
query_params = {}
|
|
3555
|
-
response = self._post(
|
|
3556
|
-
url,
|
|
3557
|
-
data=request_body_data,
|
|
3558
|
-
params=query_params,
|
|
3559
|
-
content_type="application/json",
|
|
3560
|
-
)
|
|
2929
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3561
2930
|
response.raise_for_status()
|
|
3562
|
-
if (
|
|
3563
|
-
response.status_code == 204
|
|
3564
|
-
or not response.content
|
|
3565
|
-
or not response.text.strip()
|
|
3566
|
-
):
|
|
2931
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3567
2932
|
return None
|
|
3568
2933
|
try:
|
|
3569
2934
|
return response.json()
|
|
3570
2935
|
except ValueError:
|
|
3571
2936
|
return None
|
|
3572
2937
|
|
|
3573
|
-
def get_all_fields(
|
|
2938
|
+
async def get_all_fields(
|
|
3574
2939
|
self,
|
|
3575
2940
|
pageSize: float | None = None,
|
|
3576
2941
|
pageToken: str | None = None,
|
|
@@ -3660,18 +3025,14 @@ class RocketlaneApp(APIApplication):
|
|
|
3660
3025
|
}
|
|
3661
3026
|
response = self._get(url, params=query_params)
|
|
3662
3027
|
response.raise_for_status()
|
|
3663
|
-
if (
|
|
3664
|
-
response.status_code == 204
|
|
3665
|
-
or not response.content
|
|
3666
|
-
or not response.text.strip()
|
|
3667
|
-
):
|
|
3028
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3668
3029
|
return None
|
|
3669
3030
|
try:
|
|
3670
3031
|
return response.json()
|
|
3671
3032
|
except ValueError:
|
|
3672
3033
|
return None
|
|
3673
3034
|
|
|
3674
|
-
def create_field(
|
|
3035
|
+
async def create_field(
|
|
3675
3036
|
self,
|
|
3676
3037
|
includeFields: list[str] | None = None,
|
|
3677
3038
|
includeAllFields: bool | None = None,
|
|
@@ -3723,42 +3084,19 @@ class RocketlaneApp(APIApplication):
|
|
|
3723
3084
|
"enabled": enabled,
|
|
3724
3085
|
"private": private,
|
|
3725
3086
|
}
|
|
3726
|
-
request_body_data = {
|
|
3727
|
-
k: v for k, v in request_body_data.items() if v is not None
|
|
3728
|
-
}
|
|
3087
|
+
request_body_data = {k: v for k, v in request_body_data.items() if v is not None}
|
|
3729
3088
|
url = f"{self.base_url}/1.0/fields"
|
|
3730
|
-
query_params = {
|
|
3731
|
-
|
|
3732
|
-
for k, v in [
|
|
3733
|
-
("includeFields", includeFields),
|
|
3734
|
-
("includeAllFields", includeAllFields),
|
|
3735
|
-
]
|
|
3736
|
-
if v is not None
|
|
3737
|
-
}
|
|
3738
|
-
response = self._post(
|
|
3739
|
-
url,
|
|
3740
|
-
data=request_body_data,
|
|
3741
|
-
params=query_params,
|
|
3742
|
-
content_type="application/json",
|
|
3743
|
-
)
|
|
3089
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
3090
|
+
response = self._post(url, data=request_body_data, params=query_params, content_type="application/json")
|
|
3744
3091
|
response.raise_for_status()
|
|
3745
|
-
if (
|
|
3746
|
-
response.status_code == 204
|
|
3747
|
-
or not response.content
|
|
3748
|
-
or not response.text.strip()
|
|
3749
|
-
):
|
|
3092
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3750
3093
|
return None
|
|
3751
3094
|
try:
|
|
3752
3095
|
return response.json()
|
|
3753
3096
|
except ValueError:
|
|
3754
3097
|
return None
|
|
3755
3098
|
|
|
3756
|
-
def get_user(
|
|
3757
|
-
self,
|
|
3758
|
-
userId: str,
|
|
3759
|
-
includeFields: list[str] | None = None,
|
|
3760
|
-
includeAllFields: bool | None = None,
|
|
3761
|
-
) -> dict[str, Any]:
|
|
3099
|
+
async def get_user(self, userId: str, includeFields: list[str] | None = None, includeAllFields: bool | None = None) -> dict[str, Any]:
|
|
3762
3100
|
"""
|
|
3763
3101
|
Get user by Id
|
|
3764
3102
|
|
|
@@ -3780,28 +3118,17 @@ class RocketlaneApp(APIApplication):
|
|
|
3780
3118
|
if userId is None:
|
|
3781
3119
|
raise ValueError("Missing required parameter 'userId'.")
|
|
3782
3120
|
url = f"{self.base_url}/1.0/users/{userId}"
|
|
3783
|
-
query_params = {
|
|
3784
|
-
k: v
|
|
3785
|
-
for k, v in [
|
|
3786
|
-
("includeFields", includeFields),
|
|
3787
|
-
("includeAllFields", includeAllFields),
|
|
3788
|
-
]
|
|
3789
|
-
if v is not None
|
|
3790
|
-
}
|
|
3121
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
3791
3122
|
response = self._get(url, params=query_params)
|
|
3792
3123
|
response.raise_for_status()
|
|
3793
|
-
if (
|
|
3794
|
-
response.status_code == 204
|
|
3795
|
-
or not response.content
|
|
3796
|
-
or not response.text.strip()
|
|
3797
|
-
):
|
|
3124
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3798
3125
|
return None
|
|
3799
3126
|
try:
|
|
3800
3127
|
return response.json()
|
|
3801
3128
|
except ValueError:
|
|
3802
3129
|
return None
|
|
3803
3130
|
|
|
3804
|
-
def get_all_users(
|
|
3131
|
+
async def get_all_users(
|
|
3805
3132
|
self,
|
|
3806
3133
|
pageSize: float | None = None,
|
|
3807
3134
|
pageToken: str | None = None,
|
|
@@ -3954,22 +3281,15 @@ class RocketlaneApp(APIApplication):
|
|
|
3954
3281
|
}
|
|
3955
3282
|
response = self._get(url, params=query_params)
|
|
3956
3283
|
response.raise_for_status()
|
|
3957
|
-
if (
|
|
3958
|
-
response.status_code == 204
|
|
3959
|
-
or not response.content
|
|
3960
|
-
or not response.text.strip()
|
|
3961
|
-
):
|
|
3284
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
3962
3285
|
return None
|
|
3963
3286
|
try:
|
|
3964
3287
|
return response.json()
|
|
3965
3288
|
except ValueError:
|
|
3966
3289
|
return None
|
|
3967
3290
|
|
|
3968
|
-
def get_timeoff(
|
|
3969
|
-
self,
|
|
3970
|
-
timeOffId: str,
|
|
3971
|
-
includeFields: list[str] | None = None,
|
|
3972
|
-
includeAllFields: bool | None = None,
|
|
3291
|
+
async def get_timeoff(
|
|
3292
|
+
self, timeOffId: str, includeFields: list[str] | None = None, includeAllFields: bool | None = None
|
|
3973
3293
|
) -> dict[str, Any]:
|
|
3974
3294
|
"""
|
|
3975
3295
|
Get time-off by Id
|
|
@@ -3992,28 +3312,17 @@ class RocketlaneApp(APIApplication):
|
|
|
3992
3312
|
if timeOffId is None:
|
|
3993
3313
|
raise ValueError("Missing required parameter 'timeOffId'.")
|
|
3994
3314
|
url = f"{self.base_url}/1.0/time-offs/{timeOffId}"
|
|
3995
|
-
query_params = {
|
|
3996
|
-
k: v
|
|
3997
|
-
for k, v in [
|
|
3998
|
-
("includeFields", includeFields),
|
|
3999
|
-
("includeAllFields", includeAllFields),
|
|
4000
|
-
]
|
|
4001
|
-
if v is not None
|
|
4002
|
-
}
|
|
3315
|
+
query_params = {k: v for k, v in [("includeFields", includeFields), ("includeAllFields", includeAllFields)] if v is not None}
|
|
4003
3316
|
response = self._get(url, params=query_params)
|
|
4004
3317
|
response.raise_for_status()
|
|
4005
|
-
if (
|
|
4006
|
-
response.status_code == 204
|
|
4007
|
-
or not response.content
|
|
4008
|
-
or not response.text.strip()
|
|
4009
|
-
):
|
|
3318
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
4010
3319
|
return None
|
|
4011
3320
|
try:
|
|
4012
3321
|
return response.json()
|
|
4013
3322
|
except ValueError:
|
|
4014
3323
|
return None
|
|
4015
3324
|
|
|
4016
|
-
def delete_timeoff(self, timeOffId: str) -> Any:
|
|
3325
|
+
async def delete_timeoff(self, timeOffId: str) -> Any:
|
|
4017
3326
|
"""
|
|
4018
3327
|
Delete a time-off
|
|
4019
3328
|
|
|
@@ -4036,18 +3345,14 @@ class RocketlaneApp(APIApplication):
|
|
|
4036
3345
|
query_params = {}
|
|
4037
3346
|
response = self._delete(url, params=query_params)
|
|
4038
3347
|
response.raise_for_status()
|
|
4039
|
-
if (
|
|
4040
|
-
response.status_code == 204
|
|
4041
|
-
or not response.content
|
|
4042
|
-
or not response.text.strip()
|
|
4043
|
-
):
|
|
3348
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
4044
3349
|
return None
|
|
4045
3350
|
try:
|
|
4046
3351
|
return response.json()
|
|
4047
3352
|
except ValueError:
|
|
4048
3353
|
return None
|
|
4049
3354
|
|
|
4050
|
-
def search_time_entries(
|
|
3355
|
+
async def search_time_entries(
|
|
4051
3356
|
self,
|
|
4052
3357
|
pageSize: float | None = None,
|
|
4053
3358
|
pageToken: str | None = None,
|
|
@@ -4140,20 +3445,14 @@ class RocketlaneApp(APIApplication):
|
|
|
4140
3445
|
}
|
|
4141
3446
|
response = self._get(url, params=query_params)
|
|
4142
3447
|
response.raise_for_status()
|
|
4143
|
-
if (
|
|
4144
|
-
response.status_code == 204
|
|
4145
|
-
or not response.content
|
|
4146
|
-
or not response.text.strip()
|
|
4147
|
-
):
|
|
3448
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
4148
3449
|
return None
|
|
4149
3450
|
try:
|
|
4150
3451
|
return response.json()
|
|
4151
3452
|
except ValueError:
|
|
4152
3453
|
return None
|
|
4153
3454
|
|
|
4154
|
-
def get_time_entry_categories(
|
|
4155
|
-
self, pageSize: float | None = None, pageToken: str | None = None
|
|
4156
|
-
) -> dict[str, Any]:
|
|
3455
|
+
async def get_time_entry_categories(self, pageSize: float | None = None, pageToken: str | None = None) -> dict[str, Any]:
|
|
4157
3456
|
"""
|
|
4158
3457
|
Get time entry categories
|
|
4159
3458
|
|
|
@@ -4172,25 +3471,17 @@ class RocketlaneApp(APIApplication):
|
|
|
4172
3471
|
Time Tracking
|
|
4173
3472
|
"""
|
|
4174
3473
|
url = f"{self.base_url}/1.0/time-entries/categories"
|
|
4175
|
-
query_params = {
|
|
4176
|
-
k: v
|
|
4177
|
-
for k, v in [("pageSize", pageSize), ("pageToken", pageToken)]
|
|
4178
|
-
if v is not None
|
|
4179
|
-
}
|
|
3474
|
+
query_params = {k: v for k, v in [("pageSize", pageSize), ("pageToken", pageToken)] if v is not None}
|
|
4180
3475
|
response = self._get(url, params=query_params)
|
|
4181
3476
|
response.raise_for_status()
|
|
4182
|
-
if (
|
|
4183
|
-
response.status_code == 204
|
|
4184
|
-
or not response.content
|
|
4185
|
-
or not response.text.strip()
|
|
4186
|
-
):
|
|
3477
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
4187
3478
|
return None
|
|
4188
3479
|
try:
|
|
4189
3480
|
return response.json()
|
|
4190
3481
|
except ValueError:
|
|
4191
3482
|
return None
|
|
4192
3483
|
|
|
4193
|
-
def get_all_resource_allocations(
|
|
3484
|
+
async def get_all_resource_allocations(
|
|
4194
3485
|
self,
|
|
4195
3486
|
startDate: str,
|
|
4196
3487
|
endDate: str,
|
|
@@ -4271,11 +3562,7 @@ class RocketlaneApp(APIApplication):
|
|
|
4271
3562
|
}
|
|
4272
3563
|
response = self._get(url, params=query_params)
|
|
4273
3564
|
response.raise_for_status()
|
|
4274
|
-
if (
|
|
4275
|
-
response.status_code == 204
|
|
4276
|
-
or not response.content
|
|
4277
|
-
or not response.text.strip()
|
|
4278
|
-
):
|
|
3565
|
+
if response.status_code == 204 or not response.content or (not response.text.strip()):
|
|
4279
3566
|
return None
|
|
4280
3567
|
try:
|
|
4281
3568
|
return response.json()
|