universal-mcp-applications 0.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- universal_mcp/applications/ahrefs/README.md +51 -0
- universal_mcp/applications/ahrefs/__init__.py +1 -0
- universal_mcp/applications/ahrefs/app.py +2291 -0
- universal_mcp/applications/airtable/README.md +22 -0
- universal_mcp/applications/airtable/__init__.py +1 -0
- universal_mcp/applications/airtable/app.py +479 -0
- universal_mcp/applications/apollo/README.md +44 -0
- universal_mcp/applications/apollo/__init__.py +1 -0
- universal_mcp/applications/apollo/app.py +1847 -0
- universal_mcp/applications/asana/README.md +199 -0
- universal_mcp/applications/asana/__init__.py +1 -0
- universal_mcp/applications/asana/app.py +9509 -0
- universal_mcp/applications/aws-s3/README.md +0 -0
- universal_mcp/applications/aws-s3/__init__.py +1 -0
- universal_mcp/applications/aws-s3/app.py +552 -0
- universal_mcp/applications/bill/README.md +0 -0
- universal_mcp/applications/bill/__init__.py +1 -0
- universal_mcp/applications/bill/app.py +8705 -0
- universal_mcp/applications/box/README.md +307 -0
- universal_mcp/applications/box/__init__.py +1 -0
- universal_mcp/applications/box/app.py +15987 -0
- universal_mcp/applications/braze/README.md +106 -0
- universal_mcp/applications/braze/__init__.py +1 -0
- universal_mcp/applications/braze/app.py +4754 -0
- universal_mcp/applications/cal-com-v2/README.md +150 -0
- universal_mcp/applications/cal-com-v2/__init__.py +1 -0
- universal_mcp/applications/cal-com-v2/app.py +5541 -0
- universal_mcp/applications/calendly/README.md +53 -0
- universal_mcp/applications/calendly/__init__.py +1 -0
- universal_mcp/applications/calendly/app.py +1436 -0
- universal_mcp/applications/canva/README.md +43 -0
- universal_mcp/applications/canva/__init__.py +1 -0
- universal_mcp/applications/canva/app.py +941 -0
- universal_mcp/applications/clickup/README.md +135 -0
- universal_mcp/applications/clickup/__init__.py +1 -0
- universal_mcp/applications/clickup/app.py +5009 -0
- universal_mcp/applications/coda/README.md +108 -0
- universal_mcp/applications/coda/__init__.py +1 -0
- universal_mcp/applications/coda/app.py +3671 -0
- universal_mcp/applications/confluence/README.md +198 -0
- universal_mcp/applications/confluence/__init__.py +1 -0
- universal_mcp/applications/confluence/app.py +6273 -0
- universal_mcp/applications/contentful/README.md +17 -0
- universal_mcp/applications/contentful/__init__.py +1 -0
- universal_mcp/applications/contentful/app.py +364 -0
- universal_mcp/applications/crustdata/README.md +25 -0
- universal_mcp/applications/crustdata/__init__.py +1 -0
- universal_mcp/applications/crustdata/app.py +586 -0
- universal_mcp/applications/dialpad/README.md +202 -0
- universal_mcp/applications/dialpad/__init__.py +1 -0
- universal_mcp/applications/dialpad/app.py +5949 -0
- universal_mcp/applications/digitalocean/README.md +463 -0
- universal_mcp/applications/digitalocean/__init__.py +1 -0
- universal_mcp/applications/digitalocean/app.py +20835 -0
- universal_mcp/applications/domain-checker/README.md +13 -0
- universal_mcp/applications/domain-checker/__init__.py +1 -0
- universal_mcp/applications/domain-checker/app.py +265 -0
- universal_mcp/applications/e2b/README.md +12 -0
- universal_mcp/applications/e2b/__init__.py +1 -0
- universal_mcp/applications/e2b/app.py +187 -0
- universal_mcp/applications/elevenlabs/README.md +88 -0
- universal_mcp/applications/elevenlabs/__init__.py +1 -0
- universal_mcp/applications/elevenlabs/app.py +3235 -0
- universal_mcp/applications/exa/README.md +15 -0
- universal_mcp/applications/exa/__init__.py +1 -0
- universal_mcp/applications/exa/app.py +221 -0
- universal_mcp/applications/falai/README.md +17 -0
- universal_mcp/applications/falai/__init__.py +1 -0
- universal_mcp/applications/falai/app.py +331 -0
- universal_mcp/applications/figma/README.md +49 -0
- universal_mcp/applications/figma/__init__.py +1 -0
- universal_mcp/applications/figma/app.py +1090 -0
- universal_mcp/applications/firecrawl/README.md +20 -0
- universal_mcp/applications/firecrawl/__init__.py +1 -0
- universal_mcp/applications/firecrawl/app.py +514 -0
- universal_mcp/applications/fireflies/README.md +25 -0
- universal_mcp/applications/fireflies/__init__.py +1 -0
- universal_mcp/applications/fireflies/app.py +506 -0
- universal_mcp/applications/fpl/README.md +23 -0
- universal_mcp/applications/fpl/__init__.py +1 -0
- universal_mcp/applications/fpl/app.py +1327 -0
- universal_mcp/applications/fpl/utils/api.py +142 -0
- universal_mcp/applications/fpl/utils/fixtures.py +629 -0
- universal_mcp/applications/fpl/utils/helper.py +982 -0
- universal_mcp/applications/fpl/utils/league_utils.py +546 -0
- universal_mcp/applications/fpl/utils/position_utils.py +68 -0
- universal_mcp/applications/ghost-content/README.md +25 -0
- universal_mcp/applications/ghost-content/__init__.py +1 -0
- universal_mcp/applications/ghost-content/app.py +654 -0
- universal_mcp/applications/github/README.md +1049 -0
- universal_mcp/applications/github/__init__.py +1 -0
- universal_mcp/applications/github/app.py +50600 -0
- universal_mcp/applications/gong/README.md +63 -0
- universal_mcp/applications/gong/__init__.py +1 -0
- universal_mcp/applications/gong/app.py +2297 -0
- universal_mcp/applications/google-ads/README.md +0 -0
- universal_mcp/applications/google-ads/__init__.py +1 -0
- universal_mcp/applications/google-ads/app.py +23 -0
- universal_mcp/applications/google-calendar/README.md +21 -0
- universal_mcp/applications/google-calendar/__init__.py +1 -0
- universal_mcp/applications/google-calendar/app.py +574 -0
- universal_mcp/applications/google-docs/README.md +25 -0
- universal_mcp/applications/google-docs/__init__.py +1 -0
- universal_mcp/applications/google-docs/app.py +760 -0
- universal_mcp/applications/google-drive/README.md +68 -0
- universal_mcp/applications/google-drive/__init__.py +1 -0
- universal_mcp/applications/google-drive/app.py +4936 -0
- universal_mcp/applications/google-gemini/README.md +25 -0
- universal_mcp/applications/google-gemini/__init__.py +1 -0
- universal_mcp/applications/google-gemini/app.py +663 -0
- universal_mcp/applications/google-mail/README.md +31 -0
- universal_mcp/applications/google-mail/__init__.py +1 -0
- universal_mcp/applications/google-mail/app.py +1354 -0
- universal_mcp/applications/google-searchconsole/README.md +21 -0
- universal_mcp/applications/google-searchconsole/__init__.py +1 -0
- universal_mcp/applications/google-searchconsole/app.py +320 -0
- universal_mcp/applications/google-sheet/README.md +36 -0
- universal_mcp/applications/google-sheet/__init__.py +1 -0
- universal_mcp/applications/google-sheet/app.py +1941 -0
- universal_mcp/applications/hashnode/README.md +20 -0
- universal_mcp/applications/hashnode/__init__.py +1 -0
- universal_mcp/applications/hashnode/app.py +455 -0
- universal_mcp/applications/heygen/README.md +44 -0
- universal_mcp/applications/heygen/__init__.py +1 -0
- universal_mcp/applications/heygen/app.py +961 -0
- universal_mcp/applications/http-tools/README.md +16 -0
- universal_mcp/applications/http-tools/__init__.py +1 -0
- universal_mcp/applications/http-tools/app.py +153 -0
- universal_mcp/applications/hubspot/README.md +239 -0
- universal_mcp/applications/hubspot/__init__.py +1 -0
- universal_mcp/applications/hubspot/app.py +416 -0
- universal_mcp/applications/jira/README.md +600 -0
- universal_mcp/applications/jira/__init__.py +1 -0
- universal_mcp/applications/jira/app.py +28804 -0
- universal_mcp/applications/klaviyo/README.md +313 -0
- universal_mcp/applications/klaviyo/__init__.py +1 -0
- universal_mcp/applications/klaviyo/app.py +11236 -0
- universal_mcp/applications/linkedin/README.md +15 -0
- universal_mcp/applications/linkedin/__init__.py +1 -0
- universal_mcp/applications/linkedin/app.py +243 -0
- universal_mcp/applications/mailchimp/README.md +281 -0
- universal_mcp/applications/mailchimp/__init__.py +1 -0
- universal_mcp/applications/mailchimp/app.py +10937 -0
- universal_mcp/applications/markitdown/README.md +12 -0
- universal_mcp/applications/markitdown/__init__.py +1 -0
- universal_mcp/applications/markitdown/app.py +63 -0
- universal_mcp/applications/miro/README.md +151 -0
- universal_mcp/applications/miro/__init__.py +1 -0
- universal_mcp/applications/miro/app.py +5429 -0
- universal_mcp/applications/ms-teams/README.md +42 -0
- universal_mcp/applications/ms-teams/__init__.py +1 -0
- universal_mcp/applications/ms-teams/app.py +1823 -0
- universal_mcp/applications/neon/README.md +74 -0
- universal_mcp/applications/neon/__init__.py +1 -0
- universal_mcp/applications/neon/app.py +2018 -0
- universal_mcp/applications/notion/README.md +30 -0
- universal_mcp/applications/notion/__init__.py +1 -0
- universal_mcp/applications/notion/app.py +527 -0
- universal_mcp/applications/openai/README.md +22 -0
- universal_mcp/applications/openai/__init__.py +1 -0
- universal_mcp/applications/openai/app.py +759 -0
- universal_mcp/applications/outlook/README.md +20 -0
- universal_mcp/applications/outlook/__init__.py +1 -0
- universal_mcp/applications/outlook/app.py +444 -0
- universal_mcp/applications/perplexity/README.md +12 -0
- universal_mcp/applications/perplexity/__init__.py +1 -0
- universal_mcp/applications/perplexity/app.py +65 -0
- universal_mcp/applications/pipedrive/README.md +284 -0
- universal_mcp/applications/pipedrive/__init__.py +1 -0
- universal_mcp/applications/pipedrive/app.py +12924 -0
- universal_mcp/applications/posthog/README.md +132 -0
- universal_mcp/applications/posthog/__init__.py +1 -0
- universal_mcp/applications/posthog/app.py +7125 -0
- universal_mcp/applications/reddit/README.md +135 -0
- universal_mcp/applications/reddit/__init__.py +1 -0
- universal_mcp/applications/reddit/app.py +4652 -0
- universal_mcp/applications/replicate/README.md +18 -0
- universal_mcp/applications/replicate/__init__.py +1 -0
- universal_mcp/applications/replicate/app.py +495 -0
- universal_mcp/applications/resend/README.md +40 -0
- universal_mcp/applications/resend/__init__.py +1 -0
- universal_mcp/applications/resend/app.py +881 -0
- universal_mcp/applications/retell/README.md +21 -0
- universal_mcp/applications/retell/__init__.py +1 -0
- universal_mcp/applications/retell/app.py +333 -0
- universal_mcp/applications/rocketlane/README.md +70 -0
- universal_mcp/applications/rocketlane/__init__.py +1 -0
- universal_mcp/applications/rocketlane/app.py +4346 -0
- universal_mcp/applications/semanticscholar/README.md +25 -0
- universal_mcp/applications/semanticscholar/__init__.py +1 -0
- universal_mcp/applications/semanticscholar/app.py +482 -0
- universal_mcp/applications/semrush/README.md +44 -0
- universal_mcp/applications/semrush/__init__.py +1 -0
- universal_mcp/applications/semrush/app.py +2081 -0
- universal_mcp/applications/sendgrid/README.md +362 -0
- universal_mcp/applications/sendgrid/__init__.py +1 -0
- universal_mcp/applications/sendgrid/app.py +9752 -0
- universal_mcp/applications/sentry/README.md +186 -0
- universal_mcp/applications/sentry/__init__.py +1 -0
- universal_mcp/applications/sentry/app.py +7471 -0
- universal_mcp/applications/serpapi/README.md +14 -0
- universal_mcp/applications/serpapi/__init__.py +1 -0
- universal_mcp/applications/serpapi/app.py +293 -0
- universal_mcp/applications/sharepoint/README.md +0 -0
- universal_mcp/applications/sharepoint/__init__.py +1 -0
- universal_mcp/applications/sharepoint/app.py +215 -0
- universal_mcp/applications/shopify/README.md +321 -0
- universal_mcp/applications/shopify/__init__.py +1 -0
- universal_mcp/applications/shopify/app.py +15392 -0
- universal_mcp/applications/shortcut/README.md +128 -0
- universal_mcp/applications/shortcut/__init__.py +1 -0
- universal_mcp/applications/shortcut/app.py +4478 -0
- universal_mcp/applications/slack/README.md +0 -0
- universal_mcp/applications/slack/__init__.py +1 -0
- universal_mcp/applications/slack/app.py +570 -0
- universal_mcp/applications/spotify/README.md +91 -0
- universal_mcp/applications/spotify/__init__.py +1 -0
- universal_mcp/applications/spotify/app.py +2526 -0
- universal_mcp/applications/supabase/README.md +87 -0
- universal_mcp/applications/supabase/__init__.py +1 -0
- universal_mcp/applications/supabase/app.py +2970 -0
- universal_mcp/applications/tavily/README.md +12 -0
- universal_mcp/applications/tavily/__init__.py +1 -0
- universal_mcp/applications/tavily/app.py +51 -0
- universal_mcp/applications/trello/README.md +266 -0
- universal_mcp/applications/trello/__init__.py +1 -0
- universal_mcp/applications/trello/app.py +10875 -0
- universal_mcp/applications/twillo/README.md +0 -0
- universal_mcp/applications/twillo/__init__.py +1 -0
- universal_mcp/applications/twillo/app.py +269 -0
- universal_mcp/applications/twitter/README.md +100 -0
- universal_mcp/applications/twitter/__init__.py +1 -0
- universal_mcp/applications/twitter/api_segments/__init__.py +0 -0
- universal_mcp/applications/twitter/api_segments/api_segment_base.py +51 -0
- universal_mcp/applications/twitter/api_segments/compliance_api.py +122 -0
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +255 -0
- universal_mcp/applications/twitter/api_segments/dm_events_api.py +140 -0
- universal_mcp/applications/twitter/api_segments/likes_api.py +159 -0
- universal_mcp/applications/twitter/api_segments/lists_api.py +395 -0
- universal_mcp/applications/twitter/api_segments/openapi_json_api.py +34 -0
- universal_mcp/applications/twitter/api_segments/spaces_api.py +309 -0
- universal_mcp/applications/twitter/api_segments/trends_api.py +40 -0
- universal_mcp/applications/twitter/api_segments/tweets_api.py +1403 -0
- universal_mcp/applications/twitter/api_segments/usage_api.py +40 -0
- universal_mcp/applications/twitter/api_segments/users_api.py +1498 -0
- universal_mcp/applications/twitter/app.py +46 -0
- universal_mcp/applications/unipile/README.md +28 -0
- universal_mcp/applications/unipile/__init__.py +1 -0
- universal_mcp/applications/unipile/app.py +829 -0
- universal_mcp/applications/whatsapp/README.md +23 -0
- universal_mcp/applications/whatsapp/__init__.py +1 -0
- universal_mcp/applications/whatsapp/app.py +595 -0
- universal_mcp/applications/whatsapp-business/README.md +34 -0
- universal_mcp/applications/whatsapp-business/__init__.py +1 -0
- universal_mcp/applications/whatsapp-business/app.py +1065 -0
- universal_mcp/applications/wrike/README.md +46 -0
- universal_mcp/applications/wrike/__init__.py +1 -0
- universal_mcp/applications/wrike/app.py +1583 -0
- universal_mcp/applications/youtube/README.md +57 -0
- universal_mcp/applications/youtube/__init__.py +1 -0
- universal_mcp/applications/youtube/app.py +1696 -0
- universal_mcp/applications/zenquotes/README.md +12 -0
- universal_mcp/applications/zenquotes/__init__.py +1 -0
- universal_mcp/applications/zenquotes/app.py +31 -0
- universal_mcp_applications-0.1.1.dist-info/METADATA +172 -0
- universal_mcp_applications-0.1.1.dist-info/RECORD +268 -0
- universal_mcp_applications-0.1.1.dist-info/WHEEL +4 -0
- universal_mcp_applications-0.1.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,941 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from universal_mcp.applications.application import APIApplication
|
|
4
|
+
from universal_mcp.integrations import Integration
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CanvaApp(APIApplication):
|
|
8
|
+
def __init__(self, integration: Integration = None, **kwargs) -> None:
|
|
9
|
+
super().__init__(name="canva", integration=integration, **kwargs)
|
|
10
|
+
self.base_url = "https://api.canva.com/rest"
|
|
11
|
+
|
|
12
|
+
def v1_apps_appid_jwks(self, appId) -> dict[str, Any]:
|
|
13
|
+
"""
|
|
14
|
+
Retrieves the JSON Web Key Set (JWKS) containing public keys for verifying JWTs associated with the specified application.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
appId (string): appId
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
dict[str, Any]: OK
|
|
21
|
+
|
|
22
|
+
Tags:
|
|
23
|
+
app
|
|
24
|
+
"""
|
|
25
|
+
if appId is None:
|
|
26
|
+
raise ValueError("Missing required parameter 'appId'")
|
|
27
|
+
url = f"{self.base_url}/v1/apps/{appId}/jwks"
|
|
28
|
+
query_params = {}
|
|
29
|
+
response = self._get(url, params=query_params)
|
|
30
|
+
response.raise_for_status()
|
|
31
|
+
return response.json()
|
|
32
|
+
|
|
33
|
+
def v1_assets_assetid1(self, assetId) -> dict[str, Any]:
|
|
34
|
+
"""
|
|
35
|
+
Retrieves the details of a specific asset using the provided assetId and returns the asset data.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
assetId (string): assetId
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
dict[str, Any]: OK
|
|
42
|
+
|
|
43
|
+
Tags:
|
|
44
|
+
asset
|
|
45
|
+
"""
|
|
46
|
+
if assetId is None:
|
|
47
|
+
raise ValueError("Missing required parameter 'assetId'")
|
|
48
|
+
url = f"{self.base_url}/v1/assets/{assetId}"
|
|
49
|
+
query_params = {}
|
|
50
|
+
response = self._get(url, params=query_params)
|
|
51
|
+
response.raise_for_status()
|
|
52
|
+
return response.json()
|
|
53
|
+
|
|
54
|
+
def v1_assets_assetid3(self, assetId, name=None, tags=None) -> dict[str, Any]:
|
|
55
|
+
"""
|
|
56
|
+
Updates an asset using the "POST" method at the "/v1/assets/{assetId}" endpoint and returns a status message.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
assetId (string): assetId
|
|
60
|
+
name (string): name Example: '<string>'.
|
|
61
|
+
tags (array): tags
|
|
62
|
+
Example:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"name": "<string>",
|
|
66
|
+
"tags": [
|
|
67
|
+
"<string>",
|
|
68
|
+
"<string>"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
dict[str, Any]: OK
|
|
75
|
+
|
|
76
|
+
Tags:
|
|
77
|
+
asset
|
|
78
|
+
"""
|
|
79
|
+
if assetId is None:
|
|
80
|
+
raise ValueError("Missing required parameter 'assetId'")
|
|
81
|
+
request_body = {
|
|
82
|
+
"name": name,
|
|
83
|
+
"tags": tags,
|
|
84
|
+
}
|
|
85
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
86
|
+
url = f"{self.base_url}/v1/assets/{assetId}"
|
|
87
|
+
query_params = {}
|
|
88
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
89
|
+
response.raise_for_status()
|
|
90
|
+
return response.json()
|
|
91
|
+
|
|
92
|
+
def v1_assets_assetid(self, assetId) -> Any:
|
|
93
|
+
"""
|
|
94
|
+
Deletes an asset by its unique identifier and returns a success status upon completion.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
assetId (string): assetId
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
Any: OK
|
|
101
|
+
|
|
102
|
+
Tags:
|
|
103
|
+
asset
|
|
104
|
+
"""
|
|
105
|
+
if assetId is None:
|
|
106
|
+
raise ValueError("Missing required parameter 'assetId'")
|
|
107
|
+
url = f"{self.base_url}/v1/assets/{assetId}"
|
|
108
|
+
query_params = {}
|
|
109
|
+
response = self._delete(url, params=query_params)
|
|
110
|
+
response.raise_for_status()
|
|
111
|
+
return response.json()
|
|
112
|
+
|
|
113
|
+
def v1_assets_assetid2(self, assetId, name=None, tags=None) -> dict[str, Any]:
|
|
114
|
+
"""
|
|
115
|
+
Updates specific properties of an asset identified by its ID and returns the operation status.
|
|
116
|
+
|
|
117
|
+
Args:
|
|
118
|
+
assetId (string): assetId
|
|
119
|
+
name (string): name Example: '<string>'.
|
|
120
|
+
tags (array): tags
|
|
121
|
+
Example:
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"name": "<string>",
|
|
125
|
+
"tags": [
|
|
126
|
+
"<string>",
|
|
127
|
+
"<string>"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
dict[str, Any]: OK
|
|
134
|
+
|
|
135
|
+
Tags:
|
|
136
|
+
asset
|
|
137
|
+
"""
|
|
138
|
+
if assetId is None:
|
|
139
|
+
raise ValueError("Missing required parameter 'assetId'")
|
|
140
|
+
request_body = {
|
|
141
|
+
"name": name,
|
|
142
|
+
"tags": tags,
|
|
143
|
+
}
|
|
144
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
145
|
+
url = f"{self.base_url}/v1/assets/{assetId}"
|
|
146
|
+
query_params = {}
|
|
147
|
+
response = self._patch(url, data=request_body, params=query_params)
|
|
148
|
+
response.raise_for_status()
|
|
149
|
+
return response.json()
|
|
150
|
+
|
|
151
|
+
def v1_assets_upload(self, request_body=None) -> dict[str, Any]:
|
|
152
|
+
"""
|
|
153
|
+
Uploads an asset with provided metadata to the server and returns a success or error status.
|
|
154
|
+
|
|
155
|
+
Args:
|
|
156
|
+
request_body (dict | None): Optional dictionary for arbitrary request body data.
|
|
157
|
+
|
|
158
|
+
Returns:
|
|
159
|
+
dict[str, Any]: OK
|
|
160
|
+
|
|
161
|
+
Tags:
|
|
162
|
+
asset
|
|
163
|
+
"""
|
|
164
|
+
url = f"{self.base_url}/v1/assets/upload"
|
|
165
|
+
query_params = {}
|
|
166
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
167
|
+
response.raise_for_status()
|
|
168
|
+
return response.json()
|
|
169
|
+
|
|
170
|
+
def v1_asset_uploads(self, request_body=None) -> dict[str, Any]:
|
|
171
|
+
"""
|
|
172
|
+
Initiates an asset upload using the "POST" method at the "/v1/asset-uploads" path, accepting asset metadata in the header and handling responses for successful and failed uploads.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
request_body (dict | None): Optional dictionary for arbitrary request body data.
|
|
176
|
+
|
|
177
|
+
Returns:
|
|
178
|
+
dict[str, Any]: OK
|
|
179
|
+
|
|
180
|
+
Tags:
|
|
181
|
+
asset
|
|
182
|
+
"""
|
|
183
|
+
url = f"{self.base_url}/v1/asset-uploads"
|
|
184
|
+
query_params = {}
|
|
185
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
186
|
+
response.raise_for_status()
|
|
187
|
+
return response.json()
|
|
188
|
+
|
|
189
|
+
def v1_asset_uploads_jobid(self, jobId) -> dict[str, Any]:
|
|
190
|
+
"""
|
|
191
|
+
Retrieves the status and results of an asset upload job identified by the job ID.
|
|
192
|
+
|
|
193
|
+
Args:
|
|
194
|
+
jobId (string): jobId
|
|
195
|
+
|
|
196
|
+
Returns:
|
|
197
|
+
dict[str, Any]: OK
|
|
198
|
+
|
|
199
|
+
Tags:
|
|
200
|
+
asset
|
|
201
|
+
"""
|
|
202
|
+
if jobId is None:
|
|
203
|
+
raise ValueError("Missing required parameter 'jobId'")
|
|
204
|
+
url = f"{self.base_url}/v1/asset-uploads/{jobId}"
|
|
205
|
+
query_params = {}
|
|
206
|
+
response = self._get(url, params=query_params)
|
|
207
|
+
response.raise_for_status()
|
|
208
|
+
return response.json()
|
|
209
|
+
|
|
210
|
+
def v1_autofills(
|
|
211
|
+
self, brand_template_id=None, data=None, preview=None, title=None
|
|
212
|
+
) -> dict[str, Any]:
|
|
213
|
+
"""
|
|
214
|
+
Triggers an autofill operation using the API at the "/v1/autofills" path, sending data via the POST method, and returns a response indicating success or failure.
|
|
215
|
+
|
|
216
|
+
Args:
|
|
217
|
+
brand_template_id (string): brand_template_id Example: '<string>'.
|
|
218
|
+
data (object): data
|
|
219
|
+
preview (string): preview Example: '<boolean>'.
|
|
220
|
+
title (string): title
|
|
221
|
+
Example:
|
|
222
|
+
```json
|
|
223
|
+
{
|
|
224
|
+
"brand_template_id": "<string>",
|
|
225
|
+
"data": {
|
|
226
|
+
"ipsum_a5": {
|
|
227
|
+
"asset_id": "<string>",
|
|
228
|
+
"type": "image"
|
|
229
|
+
},
|
|
230
|
+
"laboris3": {
|
|
231
|
+
"asset_id": "<string>",
|
|
232
|
+
"type": "image"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"preview": "<boolean>",
|
|
236
|
+
"title": "<string>"
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Returns:
|
|
241
|
+
dict[str, Any]: OK
|
|
242
|
+
|
|
243
|
+
Tags:
|
|
244
|
+
autofill
|
|
245
|
+
"""
|
|
246
|
+
request_body = {
|
|
247
|
+
"brand_template_id": brand_template_id,
|
|
248
|
+
"data": data,
|
|
249
|
+
"preview": preview,
|
|
250
|
+
"title": title,
|
|
251
|
+
}
|
|
252
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
253
|
+
url = f"{self.base_url}/v1/autofills"
|
|
254
|
+
query_params = {}
|
|
255
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
256
|
+
response.raise_for_status()
|
|
257
|
+
return response.json()
|
|
258
|
+
|
|
259
|
+
def v1_autofills_jobid(self, jobId) -> dict[str, Any]:
|
|
260
|
+
"""
|
|
261
|
+
Retrieves autofill data for a job identified by the specified jobId using the GET method at the "/v1/autofills/{jobId}" endpoint.
|
|
262
|
+
|
|
263
|
+
Args:
|
|
264
|
+
jobId (string): jobId
|
|
265
|
+
|
|
266
|
+
Returns:
|
|
267
|
+
dict[str, Any]: OK
|
|
268
|
+
|
|
269
|
+
Tags:
|
|
270
|
+
autofill
|
|
271
|
+
"""
|
|
272
|
+
if jobId is None:
|
|
273
|
+
raise ValueError("Missing required parameter 'jobId'")
|
|
274
|
+
url = f"{self.base_url}/v1/autofills/{jobId}"
|
|
275
|
+
query_params = {}
|
|
276
|
+
response = self._get(url, params=query_params)
|
|
277
|
+
response.raise_for_status()
|
|
278
|
+
return response.json()
|
|
279
|
+
|
|
280
|
+
def v1_brand_templates(
|
|
281
|
+
self, query=None, continuation=None, ownership=None, sort_by=None
|
|
282
|
+
) -> dict[str, Any]:
|
|
283
|
+
"""
|
|
284
|
+
Retrieves a list of brand templates based on query parameters such as ownership and sorting options using the "GET" method at the "/v1/brand-templates" path.
|
|
285
|
+
|
|
286
|
+
Args:
|
|
287
|
+
query (string): Lets you search the brand templates available to the user using a search term or terms. Example: '<string>'.
|
|
288
|
+
continuation (string): If the success response contains a continuation token, the user has access to more
|
|
289
|
+
brand templates you can list. You can use this token as a query parameter and retrieve
|
|
290
|
+
more templates from the list, for example
|
|
291
|
+
`/v1/brand-templates?continuation={continuation}`.
|
|
292
|
+
To retrieve all the brand templates available to the user, you might need to make
|
|
293
|
+
multiple requests. Example: '<string>'.
|
|
294
|
+
ownership (string): Filter the brand templates to only show templates created by a particular user.
|
|
295
|
+
Provide a Canva user ID and it will filter the list to only show brand templates
|
|
296
|
+
created by that user. The 'owner' of a template is the user who created the design,
|
|
297
|
+
and the owner can't be changed. Example: '<string>'.
|
|
298
|
+
sort_by (string): Sort the list of brand templates. This can be one of the following:
|
|
299
|
+
- `RELEVANCE`: (Default) Sort results using a relevance algorithm.
|
|
300
|
+
- `MODIFIED_DESCENDING`: Sort results by the date last modified in descending order.
|
|
301
|
+
- `MODIFIED_ASCENDING`: Sort results by the date last modified in ascending order.
|
|
302
|
+
- `TITLE_DESCENDING`: Sort results by title in descending order.
|
|
303
|
+
- `TITLE_ASCENDING`: Sort results by title in ascending order. Example: '<string>'.
|
|
304
|
+
|
|
305
|
+
Returns:
|
|
306
|
+
dict[str, Any]: OK
|
|
307
|
+
|
|
308
|
+
Tags:
|
|
309
|
+
brand_template, important
|
|
310
|
+
"""
|
|
311
|
+
url = f"{self.base_url}/v1/brand-templates"
|
|
312
|
+
query_params = {
|
|
313
|
+
k: v
|
|
314
|
+
for k, v in [
|
|
315
|
+
("query", query),
|
|
316
|
+
("continuation", continuation),
|
|
317
|
+
("ownership", ownership),
|
|
318
|
+
("sort_by", sort_by),
|
|
319
|
+
]
|
|
320
|
+
if v is not None
|
|
321
|
+
}
|
|
322
|
+
response = self._get(url, params=query_params)
|
|
323
|
+
response.raise_for_status()
|
|
324
|
+
return response.json()
|
|
325
|
+
|
|
326
|
+
def v1_brand_templates_brandtemplateid(self, brandTemplateId) -> dict[str, Any]:
|
|
327
|
+
"""
|
|
328
|
+
Retrieves metadata for a specific brand template using its unique identifier.
|
|
329
|
+
|
|
330
|
+
Args:
|
|
331
|
+
brandTemplateId (string): brandTemplateId
|
|
332
|
+
|
|
333
|
+
Returns:
|
|
334
|
+
dict[str, Any]: OK
|
|
335
|
+
|
|
336
|
+
Tags:
|
|
337
|
+
brand_template
|
|
338
|
+
"""
|
|
339
|
+
if brandTemplateId is None:
|
|
340
|
+
raise ValueError("Missing required parameter 'brandTemplateId'")
|
|
341
|
+
url = f"{self.base_url}/v1/brand-templates/{brandTemplateId}"
|
|
342
|
+
query_params = {}
|
|
343
|
+
response = self._get(url, params=query_params)
|
|
344
|
+
response.raise_for_status()
|
|
345
|
+
return response.json()
|
|
346
|
+
|
|
347
|
+
def v1_brand_templates_brandtemplateid_dataset(
|
|
348
|
+
self, brandTemplateId
|
|
349
|
+
) -> dict[str, Any]:
|
|
350
|
+
"""
|
|
351
|
+
Retrieves the dataset definition of a brand template, including data field names and types, allowing for the identification of autofillable fields.
|
|
352
|
+
|
|
353
|
+
Args:
|
|
354
|
+
brandTemplateId (string): brandTemplateId
|
|
355
|
+
|
|
356
|
+
Returns:
|
|
357
|
+
dict[str, Any]: OK
|
|
358
|
+
|
|
359
|
+
Tags:
|
|
360
|
+
brand_template
|
|
361
|
+
"""
|
|
362
|
+
if brandTemplateId is None:
|
|
363
|
+
raise ValueError("Missing required parameter 'brandTemplateId'")
|
|
364
|
+
url = f"{self.base_url}/v1/brand-templates/{brandTemplateId}/dataset"
|
|
365
|
+
query_params = {}
|
|
366
|
+
response = self._get(url, params=query_params)
|
|
367
|
+
response.raise_for_status()
|
|
368
|
+
return response.json()
|
|
369
|
+
|
|
370
|
+
def v1_comments(
|
|
371
|
+
self, assignee_id=None, attached_to=None, message=None
|
|
372
|
+
) -> dict[str, Any]:
|
|
373
|
+
"""
|
|
374
|
+
Creates a new comment and returns a status message.
|
|
375
|
+
|
|
376
|
+
Args:
|
|
377
|
+
assignee_id (string): assignee_id Example: '<string>'.
|
|
378
|
+
attached_to (object): attached_to
|
|
379
|
+
message (string): message
|
|
380
|
+
Example:
|
|
381
|
+
```json
|
|
382
|
+
{
|
|
383
|
+
"assignee_id": "<string>",
|
|
384
|
+
"attached_to": {
|
|
385
|
+
"design_id": "<string>",
|
|
386
|
+
"type": "design"
|
|
387
|
+
},
|
|
388
|
+
"message": "<string>"
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Returns:
|
|
393
|
+
dict[str, Any]: OK
|
|
394
|
+
|
|
395
|
+
Tags:
|
|
396
|
+
comment
|
|
397
|
+
"""
|
|
398
|
+
request_body = {
|
|
399
|
+
"assignee_id": assignee_id,
|
|
400
|
+
"attached_to": attached_to,
|
|
401
|
+
"message": message,
|
|
402
|
+
}
|
|
403
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
404
|
+
url = f"{self.base_url}/v1/comments"
|
|
405
|
+
query_params = {}
|
|
406
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
407
|
+
response.raise_for_status()
|
|
408
|
+
return response.json()
|
|
409
|
+
|
|
410
|
+
def v1_comments_commentid_replies(
|
|
411
|
+
self, commentId, attached_to=None, message=None
|
|
412
|
+
) -> dict[str, Any]:
|
|
413
|
+
"""
|
|
414
|
+
Creates a new reply to a comment using the "POST" method.
|
|
415
|
+
|
|
416
|
+
Args:
|
|
417
|
+
commentId (string): commentId
|
|
418
|
+
attached_to (object): attached_to
|
|
419
|
+
message (string): message
|
|
420
|
+
Example:
|
|
421
|
+
```json
|
|
422
|
+
{
|
|
423
|
+
"attached_to": {
|
|
424
|
+
"design_id": "<string>",
|
|
425
|
+
"type": "design"
|
|
426
|
+
},
|
|
427
|
+
"message": "<string>"
|
|
428
|
+
}
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
Returns:
|
|
432
|
+
dict[str, Any]: OK
|
|
433
|
+
|
|
434
|
+
Tags:
|
|
435
|
+
comment
|
|
436
|
+
"""
|
|
437
|
+
if commentId is None:
|
|
438
|
+
raise ValueError("Missing required parameter 'commentId'")
|
|
439
|
+
request_body = {
|
|
440
|
+
"attached_to": attached_to,
|
|
441
|
+
"message": message,
|
|
442
|
+
}
|
|
443
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
444
|
+
url = f"{self.base_url}/v1/comments/{commentId}/replies"
|
|
445
|
+
query_params = {}
|
|
446
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
447
|
+
response.raise_for_status()
|
|
448
|
+
return response.json()
|
|
449
|
+
|
|
450
|
+
def v1_designs_designid_comments_commentid(
|
|
451
|
+
self, designId, commentId
|
|
452
|
+
) -> dict[str, Any]:
|
|
453
|
+
"""
|
|
454
|
+
Retrieves a specific comment from a design using the provided design ID and comment ID.
|
|
455
|
+
|
|
456
|
+
Args:
|
|
457
|
+
designId (string): designId
|
|
458
|
+
commentId (string): commentId
|
|
459
|
+
|
|
460
|
+
Returns:
|
|
461
|
+
dict[str, Any]: OK
|
|
462
|
+
|
|
463
|
+
Tags:
|
|
464
|
+
comment
|
|
465
|
+
"""
|
|
466
|
+
if designId is None:
|
|
467
|
+
raise ValueError("Missing required parameter 'designId'")
|
|
468
|
+
if commentId is None:
|
|
469
|
+
raise ValueError("Missing required parameter 'commentId'")
|
|
470
|
+
url = f"{self.base_url}/v1/designs/{designId}/comments/{commentId}"
|
|
471
|
+
query_params = {}
|
|
472
|
+
response = self._get(url, params=query_params)
|
|
473
|
+
response.raise_for_status()
|
|
474
|
+
return response.json()
|
|
475
|
+
|
|
476
|
+
def v1_connect_keys(self) -> dict[str, Any]:
|
|
477
|
+
"""
|
|
478
|
+
Retrieves a list of connection keys associated with the current user or application.
|
|
479
|
+
|
|
480
|
+
Returns:
|
|
481
|
+
dict[str, Any]: OK
|
|
482
|
+
|
|
483
|
+
Tags:
|
|
484
|
+
connect
|
|
485
|
+
"""
|
|
486
|
+
url = f"{self.base_url}/v1/connect/keys"
|
|
487
|
+
query_params = {}
|
|
488
|
+
response = self._get(url, params=query_params)
|
|
489
|
+
response.raise_for_status()
|
|
490
|
+
return response.json()
|
|
491
|
+
|
|
492
|
+
def v1_designs(
|
|
493
|
+
self, query=None, continuation=None, ownership=None, sort_by=None
|
|
494
|
+
) -> dict[str, Any]:
|
|
495
|
+
"""
|
|
496
|
+
Retrieves a list of designs based on query parameters, including query, continuation, ownership, and sort order, using the GET method at the "/v1/designs" endpoint.
|
|
497
|
+
|
|
498
|
+
Args:
|
|
499
|
+
query (string): Lets you search the user's designs, and designs shared with the user, using a search term or terms. Example: '<string>'.
|
|
500
|
+
continuation (string): If the success response contains a continuation token, the list contains more designs
|
|
501
|
+
you can list. You can use this token as a query parameter and retrieve more
|
|
502
|
+
designs from the list, for example
|
|
503
|
+
`/v1/designs?continuation={continuation}`. To retrieve all of a user's designs, you might need to make multiple requests. Example: '<string>'.
|
|
504
|
+
ownership (string): Filter the list of designs based on the user's ownership of the designs.
|
|
505
|
+
This can be one of the following: - `owned`: Designs owned by the user.
|
|
506
|
+
- `shared`: Designs shared with the user.
|
|
507
|
+
- `any`: Designs owned by and shared with the user. Example: '<string>'.
|
|
508
|
+
sort_by (string): Sort the list of designs.
|
|
509
|
+
This can be one of the following: - `relevance`: (Default) Sort results using a relevance algorithm.
|
|
510
|
+
- `modified_descending`: Sort results by the date last modified in descending order.
|
|
511
|
+
- `modified_ascending`: Sort results by the date last modified in ascending order.
|
|
512
|
+
- `title_descending`: Sort results by title in descending order.
|
|
513
|
+
- `title_ascending`: Sort results by title in ascending order. Example: '<string>'.
|
|
514
|
+
|
|
515
|
+
Returns:
|
|
516
|
+
dict[str, Any]: OK
|
|
517
|
+
|
|
518
|
+
Tags:
|
|
519
|
+
design, important
|
|
520
|
+
"""
|
|
521
|
+
url = f"{self.base_url}/v1/designs"
|
|
522
|
+
query_params = {
|
|
523
|
+
k: v
|
|
524
|
+
for k, v in [
|
|
525
|
+
("query", query),
|
|
526
|
+
("continuation", continuation),
|
|
527
|
+
("ownership", ownership),
|
|
528
|
+
("sort_by", sort_by),
|
|
529
|
+
]
|
|
530
|
+
if v is not None
|
|
531
|
+
}
|
|
532
|
+
response = self._get(url, params=query_params)
|
|
533
|
+
response.raise_for_status()
|
|
534
|
+
return response.json()
|
|
535
|
+
|
|
536
|
+
def v1_designs1(
|
|
537
|
+
self, asset_id=None, design_type=None, title=None
|
|
538
|
+
) -> dict[str, Any]:
|
|
539
|
+
"""
|
|
540
|
+
Creates a new design resource and returns the result of the operation.
|
|
541
|
+
|
|
542
|
+
Args:
|
|
543
|
+
asset_id (string): asset_id Example: '<string>'.
|
|
544
|
+
design_type (object): design_type
|
|
545
|
+
title (string): title
|
|
546
|
+
Example:
|
|
547
|
+
```json
|
|
548
|
+
{
|
|
549
|
+
"asset_id": "<string>",
|
|
550
|
+
"design_type": {
|
|
551
|
+
"name": "doc",
|
|
552
|
+
"type": "preset"
|
|
553
|
+
},
|
|
554
|
+
"title": "<string>"
|
|
555
|
+
}
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
Returns:
|
|
559
|
+
dict[str, Any]: OK
|
|
560
|
+
|
|
561
|
+
Tags:
|
|
562
|
+
design
|
|
563
|
+
"""
|
|
564
|
+
request_body = {
|
|
565
|
+
"asset_id": asset_id,
|
|
566
|
+
"design_type": design_type,
|
|
567
|
+
"title": title,
|
|
568
|
+
}
|
|
569
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
570
|
+
url = f"{self.base_url}/v1/designs"
|
|
571
|
+
query_params = {}
|
|
572
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
573
|
+
response.raise_for_status()
|
|
574
|
+
return response.json()
|
|
575
|
+
|
|
576
|
+
def v1_designs_designid(self, designId) -> dict[str, Any]:
|
|
577
|
+
"""
|
|
578
|
+
Retrieves a specific design by its ID using the GET method at the "/v1/designs/{designId}" endpoint.
|
|
579
|
+
|
|
580
|
+
Args:
|
|
581
|
+
designId (string): designId
|
|
582
|
+
|
|
583
|
+
Returns:
|
|
584
|
+
dict[str, Any]: OK
|
|
585
|
+
|
|
586
|
+
Tags:
|
|
587
|
+
design
|
|
588
|
+
"""
|
|
589
|
+
if designId is None:
|
|
590
|
+
raise ValueError("Missing required parameter 'designId'")
|
|
591
|
+
url = f"{self.base_url}/v1/designs/{designId}"
|
|
592
|
+
query_params = {}
|
|
593
|
+
response = self._get(url, params=query_params)
|
|
594
|
+
response.raise_for_status()
|
|
595
|
+
return response.json()
|
|
596
|
+
|
|
597
|
+
def v1_imports(self, request_body=None) -> dict[str, Any]:
|
|
598
|
+
"""
|
|
599
|
+
Initiates a data import process with the provided metadata in the request header and returns an appropriate response.
|
|
600
|
+
|
|
601
|
+
Args:
|
|
602
|
+
request_body (dict | None): Optional dictionary for arbitrary request body data.
|
|
603
|
+
|
|
604
|
+
Returns:
|
|
605
|
+
dict[str, Any]: OK
|
|
606
|
+
|
|
607
|
+
Tags:
|
|
608
|
+
design_import
|
|
609
|
+
"""
|
|
610
|
+
url = f"{self.base_url}/v1/imports"
|
|
611
|
+
query_params = {}
|
|
612
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
613
|
+
response.raise_for_status()
|
|
614
|
+
return response.json()
|
|
615
|
+
|
|
616
|
+
def v1_imports_jobid(self, jobId) -> dict[str, Any]:
|
|
617
|
+
"""
|
|
618
|
+
Retrieves the status and details of a specific import job identified by its job ID.
|
|
619
|
+
|
|
620
|
+
Args:
|
|
621
|
+
jobId (string): jobId
|
|
622
|
+
|
|
623
|
+
Returns:
|
|
624
|
+
dict[str, Any]: OK
|
|
625
|
+
|
|
626
|
+
Tags:
|
|
627
|
+
design_import
|
|
628
|
+
"""
|
|
629
|
+
if jobId is None:
|
|
630
|
+
raise ValueError("Missing required parameter 'jobId'")
|
|
631
|
+
url = f"{self.base_url}/v1/imports/{jobId}"
|
|
632
|
+
query_params = {}
|
|
633
|
+
response = self._get(url, params=query_params)
|
|
634
|
+
response.raise_for_status()
|
|
635
|
+
return response.json()
|
|
636
|
+
|
|
637
|
+
def v1_exports(self, design_id=None, format=None) -> dict[str, Any]:
|
|
638
|
+
"""
|
|
639
|
+
Initiates an export process through the API and returns status codes for success or failure.
|
|
640
|
+
|
|
641
|
+
Args:
|
|
642
|
+
design_id (string): design_id Example: '<string>'.
|
|
643
|
+
format (object): format
|
|
644
|
+
Example:
|
|
645
|
+
```json
|
|
646
|
+
{
|
|
647
|
+
"design_id": "<string>",
|
|
648
|
+
"format": {
|
|
649
|
+
"export_quality": "regular",
|
|
650
|
+
"pages": [
|
|
651
|
+
"<integer>",
|
|
652
|
+
"<integer>"
|
|
653
|
+
],
|
|
654
|
+
"size": "letter",
|
|
655
|
+
"type": "pdf"
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
```
|
|
659
|
+
|
|
660
|
+
Returns:
|
|
661
|
+
dict[str, Any]: OK
|
|
662
|
+
|
|
663
|
+
Tags:
|
|
664
|
+
export
|
|
665
|
+
"""
|
|
666
|
+
request_body = {
|
|
667
|
+
"design_id": design_id,
|
|
668
|
+
"format": format,
|
|
669
|
+
}
|
|
670
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
671
|
+
url = f"{self.base_url}/v1/exports"
|
|
672
|
+
query_params = {}
|
|
673
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
674
|
+
response.raise_for_status()
|
|
675
|
+
return response.json()
|
|
676
|
+
|
|
677
|
+
def v1_exports_exportid(self, exportId) -> dict[str, Any]:
|
|
678
|
+
"""
|
|
679
|
+
Retrieves export details by ID using the "GET" method at the path "/v1/exports/{exportId}" and returns a response.
|
|
680
|
+
|
|
681
|
+
Args:
|
|
682
|
+
exportId (string): exportId
|
|
683
|
+
|
|
684
|
+
Returns:
|
|
685
|
+
dict[str, Any]: OK
|
|
686
|
+
|
|
687
|
+
Tags:
|
|
688
|
+
export
|
|
689
|
+
"""
|
|
690
|
+
if exportId is None:
|
|
691
|
+
raise ValueError("Missing required parameter 'exportId'")
|
|
692
|
+
url = f"{self.base_url}/v1/exports/{exportId}"
|
|
693
|
+
query_params = {}
|
|
694
|
+
response = self._get(url, params=query_params)
|
|
695
|
+
response.raise_for_status()
|
|
696
|
+
return response.json()
|
|
697
|
+
|
|
698
|
+
def v1_folders_folderid1(self, folderId) -> dict[str, Any]:
|
|
699
|
+
"""
|
|
700
|
+
Retrieves information about a folder with the specified ID using the "GET" method at the "/v1/folders/{folderId}" endpoint.
|
|
701
|
+
|
|
702
|
+
Args:
|
|
703
|
+
folderId (string): folderId
|
|
704
|
+
|
|
705
|
+
Returns:
|
|
706
|
+
dict[str, Any]: OK
|
|
707
|
+
|
|
708
|
+
Tags:
|
|
709
|
+
folder
|
|
710
|
+
"""
|
|
711
|
+
if folderId is None:
|
|
712
|
+
raise ValueError("Missing required parameter 'folderId'")
|
|
713
|
+
url = f"{self.base_url}/v1/folders/{folderId}"
|
|
714
|
+
query_params = {}
|
|
715
|
+
response = self._get(url, params=query_params)
|
|
716
|
+
response.raise_for_status()
|
|
717
|
+
return response.json()
|
|
718
|
+
|
|
719
|
+
def v1_folders_folderid(self, folderId) -> Any:
|
|
720
|
+
"""
|
|
721
|
+
Deletes a folder with the specified ID, including all of its contents, using the DELETE method and returns a status code indicating success or failure.
|
|
722
|
+
|
|
723
|
+
Args:
|
|
724
|
+
folderId (string): folderId
|
|
725
|
+
|
|
726
|
+
Returns:
|
|
727
|
+
Any: OK
|
|
728
|
+
|
|
729
|
+
Tags:
|
|
730
|
+
folder
|
|
731
|
+
"""
|
|
732
|
+
if folderId is None:
|
|
733
|
+
raise ValueError("Missing required parameter 'folderId'")
|
|
734
|
+
url = f"{self.base_url}/v1/folders/{folderId}"
|
|
735
|
+
query_params = {}
|
|
736
|
+
response = self._delete(url, params=query_params)
|
|
737
|
+
response.raise_for_status()
|
|
738
|
+
return response.json()
|
|
739
|
+
|
|
740
|
+
def v1_folders_folderid2(self, folderId, name=None) -> dict[str, Any]:
|
|
741
|
+
"""
|
|
742
|
+
Updates an existing folder using the specified `folderId` and returns a status message upon successful modification.
|
|
743
|
+
|
|
744
|
+
Args:
|
|
745
|
+
folderId (string): folderId
|
|
746
|
+
name (string): name
|
|
747
|
+
Example:
|
|
748
|
+
```json
|
|
749
|
+
{
|
|
750
|
+
"name": "<string>"
|
|
751
|
+
}
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
Returns:
|
|
755
|
+
dict[str, Any]: OK
|
|
756
|
+
|
|
757
|
+
Tags:
|
|
758
|
+
folder
|
|
759
|
+
"""
|
|
760
|
+
if folderId is None:
|
|
761
|
+
raise ValueError("Missing required parameter 'folderId'")
|
|
762
|
+
request_body = {
|
|
763
|
+
"name": name,
|
|
764
|
+
}
|
|
765
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
766
|
+
url = f"{self.base_url}/v1/folders/{folderId}"
|
|
767
|
+
query_params = {}
|
|
768
|
+
response = self._patch(url, data=request_body, params=query_params)
|
|
769
|
+
response.raise_for_status()
|
|
770
|
+
return response.json()
|
|
771
|
+
|
|
772
|
+
def v1_folders_folderid_items(
|
|
773
|
+
self, folderId, continuation=None, item_types=None
|
|
774
|
+
) -> dict[str, Any]:
|
|
775
|
+
"""
|
|
776
|
+
Retrieves a paginated list of items within a specified folder, filtered by type, using continuation tokens for pagination.
|
|
777
|
+
|
|
778
|
+
Args:
|
|
779
|
+
folderId (string): folderId
|
|
780
|
+
continuation (string): If the success response contains a continuation token, the folder contains more items
|
|
781
|
+
you can list. You can use this token as a query parameter and retrieve more
|
|
782
|
+
items from the list, for example
|
|
783
|
+
`/v1/folders/{folderId}/items?continuation={continuation}`. To retrieve all the items in a folder, you might need to make multiple requests. Example: '<string>'.
|
|
784
|
+
item_types (string): Filter the folder items to only return specified types. The available types are:
|
|
785
|
+
`asset`, `design`, `folder`, and `template`. To filter for more than one item type,
|
|
786
|
+
provide a comma-delimited list. Example: '<string>'.
|
|
787
|
+
|
|
788
|
+
Returns:
|
|
789
|
+
dict[str, Any]: OK
|
|
790
|
+
|
|
791
|
+
Tags:
|
|
792
|
+
folder
|
|
793
|
+
"""
|
|
794
|
+
if folderId is None:
|
|
795
|
+
raise ValueError("Missing required parameter 'folderId'")
|
|
796
|
+
url = f"{self.base_url}/v1/folders/{folderId}/items"
|
|
797
|
+
query_params = {
|
|
798
|
+
k: v
|
|
799
|
+
for k, v in [("continuation", continuation), ("item_types", item_types)]
|
|
800
|
+
if v is not None
|
|
801
|
+
}
|
|
802
|
+
response = self._get(url, params=query_params)
|
|
803
|
+
response.raise_for_status()
|
|
804
|
+
return response.json()
|
|
805
|
+
|
|
806
|
+
def v1_folders_move(
|
|
807
|
+
self, from_folder_id=None, item_id=None, to_folder_id=None
|
|
808
|
+
) -> Any:
|
|
809
|
+
"""
|
|
810
|
+
Moves folders to a new location using the "POST" method at the "/v1/folders/move" endpoint and returns status messages based on the operation's success or failure.
|
|
811
|
+
|
|
812
|
+
Args:
|
|
813
|
+
from_folder_id (string): from_folder_id Example: '<string>'.
|
|
814
|
+
item_id (string): item_id Example: '<string>'.
|
|
815
|
+
to_folder_id (string): to_folder_id
|
|
816
|
+
Example:
|
|
817
|
+
```json
|
|
818
|
+
{
|
|
819
|
+
"from_folder_id": "<string>",
|
|
820
|
+
"item_id": "<string>",
|
|
821
|
+
"to_folder_id": "<string>"
|
|
822
|
+
}
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
Returns:
|
|
826
|
+
Any: OK
|
|
827
|
+
|
|
828
|
+
Tags:
|
|
829
|
+
folder
|
|
830
|
+
"""
|
|
831
|
+
request_body = {
|
|
832
|
+
"from_folder_id": from_folder_id,
|
|
833
|
+
"item_id": item_id,
|
|
834
|
+
"to_folder_id": to_folder_id,
|
|
835
|
+
}
|
|
836
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
837
|
+
url = f"{self.base_url}/v1/folders/move"
|
|
838
|
+
query_params = {}
|
|
839
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
840
|
+
response.raise_for_status()
|
|
841
|
+
return response.json()
|
|
842
|
+
|
|
843
|
+
def v1_folders(self, name=None, parent_folder_id=None) -> dict[str, Any]:
|
|
844
|
+
"""
|
|
845
|
+
Creates a new folder in the system and returns a success or error status.
|
|
846
|
+
|
|
847
|
+
Args:
|
|
848
|
+
name (string): name Example: '<string>'.
|
|
849
|
+
parent_folder_id (string): parent_folder_id
|
|
850
|
+
Example:
|
|
851
|
+
```json
|
|
852
|
+
{
|
|
853
|
+
"name": "<string>",
|
|
854
|
+
"parent_folder_id": "<string>"
|
|
855
|
+
}
|
|
856
|
+
```
|
|
857
|
+
|
|
858
|
+
Returns:
|
|
859
|
+
dict[str, Any]: OK
|
|
860
|
+
|
|
861
|
+
Tags:
|
|
862
|
+
folder
|
|
863
|
+
"""
|
|
864
|
+
request_body = {
|
|
865
|
+
"name": name,
|
|
866
|
+
"parent_folder_id": parent_folder_id,
|
|
867
|
+
}
|
|
868
|
+
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
869
|
+
url = f"{self.base_url}/v1/folders"
|
|
870
|
+
query_params = {}
|
|
871
|
+
response = self._post(url, data=request_body, params=query_params)
|
|
872
|
+
response.raise_for_status()
|
|
873
|
+
return response.json()
|
|
874
|
+
|
|
875
|
+
def v1_users_me(self) -> dict[str, Any]:
|
|
876
|
+
"""
|
|
877
|
+
Retrieves information about the currently authenticated user using the GET method at the "/v1/users/me" endpoint.
|
|
878
|
+
|
|
879
|
+
Returns:
|
|
880
|
+
dict[str, Any]: OK
|
|
881
|
+
|
|
882
|
+
Tags:
|
|
883
|
+
user, important
|
|
884
|
+
"""
|
|
885
|
+
url = f"{self.base_url}/v1/users/me"
|
|
886
|
+
query_params = {}
|
|
887
|
+
response = self._get(url, params=query_params)
|
|
888
|
+
response.raise_for_status()
|
|
889
|
+
return response.json()
|
|
890
|
+
|
|
891
|
+
def v1_users_me_profile(self) -> dict[str, Any]:
|
|
892
|
+
"""
|
|
893
|
+
Retrieves the authenticated user's profile information.
|
|
894
|
+
|
|
895
|
+
Returns:
|
|
896
|
+
dict[str, Any]: OK
|
|
897
|
+
|
|
898
|
+
Tags:
|
|
899
|
+
user
|
|
900
|
+
"""
|
|
901
|
+
url = f"{self.base_url}/v1/users/me/profile"
|
|
902
|
+
query_params = {}
|
|
903
|
+
response = self._get(url, params=query_params)
|
|
904
|
+
response.raise_for_status()
|
|
905
|
+
return response.json()
|
|
906
|
+
|
|
907
|
+
def list_tools(self):
|
|
908
|
+
return [
|
|
909
|
+
self.v1_apps_appid_jwks,
|
|
910
|
+
self.v1_assets_assetid1,
|
|
911
|
+
self.v1_assets_assetid3,
|
|
912
|
+
self.v1_assets_assetid,
|
|
913
|
+
self.v1_assets_assetid2,
|
|
914
|
+
self.v1_assets_upload,
|
|
915
|
+
self.v1_asset_uploads,
|
|
916
|
+
self.v1_asset_uploads_jobid,
|
|
917
|
+
self.v1_autofills,
|
|
918
|
+
self.v1_autofills_jobid,
|
|
919
|
+
self.v1_brand_templates,
|
|
920
|
+
self.v1_brand_templates_brandtemplateid,
|
|
921
|
+
self.v1_brand_templates_brandtemplateid_dataset,
|
|
922
|
+
self.v1_comments,
|
|
923
|
+
self.v1_comments_commentid_replies,
|
|
924
|
+
self.v1_designs_designid_comments_commentid,
|
|
925
|
+
self.v1_connect_keys,
|
|
926
|
+
self.v1_designs,
|
|
927
|
+
self.v1_designs1,
|
|
928
|
+
self.v1_designs_designid,
|
|
929
|
+
self.v1_imports,
|
|
930
|
+
self.v1_imports_jobid,
|
|
931
|
+
self.v1_exports,
|
|
932
|
+
self.v1_exports_exportid,
|
|
933
|
+
self.v1_folders_folderid1,
|
|
934
|
+
self.v1_folders_folderid,
|
|
935
|
+
self.v1_folders_folderid2,
|
|
936
|
+
self.v1_folders_folderid_items,
|
|
937
|
+
self.v1_folders_move,
|
|
938
|
+
self.v1_folders,
|
|
939
|
+
self.v1_users_me,
|
|
940
|
+
self.v1_users_me_profile,
|
|
941
|
+
]
|