codapact-confluence 0.1.0__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.
- codapact_confluence/__init__.py +6 -0
- codapact_confluence/__main__.py +6 -0
- codapact_confluence/_docformat.py +161 -0
- codapact_confluence/_model.json +53465 -0
- codapact_confluence/cli.py +3347 -0
- codapact_confluence/client.py +3544 -0
- codapact_confluence/py.typed +0 -0
- codapact_confluence/skill/SKILL.md +39 -0
- codapact_confluence/types.py +4795 -0
- codapact_confluence-0.1.0.dist-info/METADATA +121 -0
- codapact_confluence-0.1.0.dist-info/RECORD +14 -0
- codapact_confluence-0.1.0.dist-info/WHEEL +4 -0
- codapact_confluence-0.1.0.dist-info/entry_points.txt +3 -0
- codapact_confluence-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,3544 @@
|
|
|
1
|
+
"""Client generated from the library surface. Do not edit."""
|
|
2
|
+
|
|
3
|
+
# ruff: noqa: E501
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import builtins
|
|
7
|
+
from collections.abc import Mapping, Sequence
|
|
8
|
+
from functools import cache
|
|
9
|
+
from importlib.resources import files
|
|
10
|
+
from typing import Any, cast
|
|
11
|
+
|
|
12
|
+
from codapact.runtime import (
|
|
13
|
+
AuthProvider,
|
|
14
|
+
Middleware,
|
|
15
|
+
RuntimeClient,
|
|
16
|
+
Transport,
|
|
17
|
+
load_model,
|
|
18
|
+
)
|
|
19
|
+
from codapact.runtime.arguments import UNSET, Unset, call_args
|
|
20
|
+
|
|
21
|
+
from . import types as _t
|
|
22
|
+
|
|
23
|
+
PROTOCOLS: dict[str, Any] = {}
|
|
24
|
+
"""Custom protocol handlers (``module:attribute``) this client registers by default."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@cache
|
|
28
|
+
def _model() -> Any:
|
|
29
|
+
return load_model(files(__package__).joinpath("_model.json"))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class _AdminKeyResource:
|
|
33
|
+
"""Operations under ``admin_key``."""
|
|
34
|
+
|
|
35
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
36
|
+
self._runtime = runtime
|
|
37
|
+
|
|
38
|
+
def get(self) -> _t.AdminKeyResponse:
|
|
39
|
+
"""
|
|
40
|
+
Get Admin Key
|
|
41
|
+
|
|
42
|
+
Returns information about the admin key if one is currently enabled for the calling user within the site.
|
|
43
|
+
|
|
44
|
+
**[Permissions](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Centralized-user-management-content) required**:
|
|
45
|
+
User must be an organization or site admin.
|
|
46
|
+
"""
|
|
47
|
+
return cast('_t.AdminKeyResponse', self._runtime.call('get_admin_key', call_args({})))
|
|
48
|
+
|
|
49
|
+
def enable(self, *, duration_in_minutes: int | Unset = UNSET) -> _t.AdminKeyResponse:
|
|
50
|
+
"""
|
|
51
|
+
Enable Admin Key
|
|
52
|
+
|
|
53
|
+
Enables admin key access for the calling user within the site. If an admin key already exists for the user, a new one will be issued with an updated expiration time.
|
|
54
|
+
|
|
55
|
+
**Note:** The `durationInMinutes` field within the request body is optional. If the request body is empty or if the `durationInMinutes` is set to 0 minutes, a new admin key will be issued to the calling user with a default duration of 10 minutes.
|
|
56
|
+
|
|
57
|
+
**[Permissions](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Centralized-user-management-content) required**:
|
|
58
|
+
User must be an organization or site admin.
|
|
59
|
+
"""
|
|
60
|
+
return cast('_t.AdminKeyResponse', self._runtime.call('enable_admin_key', call_args({}, {'body': {'duration_in_minutes': duration_in_minutes}})))
|
|
61
|
+
|
|
62
|
+
def disable(self) -> None:
|
|
63
|
+
"""
|
|
64
|
+
Disable Admin Key
|
|
65
|
+
|
|
66
|
+
Disables admin key access for the calling user within the site.
|
|
67
|
+
|
|
68
|
+
**[Permissions](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Centralized-user-management-content) required**:
|
|
69
|
+
User must be an organization or site admin.
|
|
70
|
+
"""
|
|
71
|
+
self._runtime.call('disable_admin_key', call_args({}))
|
|
72
|
+
|
|
73
|
+
class _AncestorsResource:
|
|
74
|
+
"""Operations under ``ancestors``."""
|
|
75
|
+
|
|
76
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
77
|
+
self._runtime = runtime
|
|
78
|
+
|
|
79
|
+
def list_whiteboard(self, *, id: int, limit: int | Unset = UNSET) -> _t.GetWhiteboardAncestorsResponse:
|
|
80
|
+
"""
|
|
81
|
+
Get all ancestors of whiteboard
|
|
82
|
+
|
|
83
|
+
Returns all ancestors for a given whiteboard by ID in top-to-bottom order (that is, the highest ancestor is the first
|
|
84
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
85
|
+
will be available by calling this endpoint with the ID of first ancestor in the response payload.
|
|
86
|
+
|
|
87
|
+
This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such
|
|
88
|
+
as [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
89
|
+
|
|
90
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
91
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
92
|
+
Permission to view the whiteboard and its corresponding space
|
|
93
|
+
"""
|
|
94
|
+
return cast('_t.GetWhiteboardAncestorsResponse', self._runtime.call('get_whiteboard_ancestors', call_args({'id': id, 'limit': limit})))
|
|
95
|
+
|
|
96
|
+
def list_database(self, *, id: int, limit: int | Unset = UNSET) -> _t.GetDatabaseAncestorsResponse:
|
|
97
|
+
"""
|
|
98
|
+
Get all ancestors of database
|
|
99
|
+
|
|
100
|
+
Returns all ancestors for a given database by ID in top-to-bottom order (that is, the highest ancestor is the first
|
|
101
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
102
|
+
will be available by calling this endpoint with the ID of first ancestor in the response payload.
|
|
103
|
+
|
|
104
|
+
This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such
|
|
105
|
+
as [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get).
|
|
106
|
+
|
|
107
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
108
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
109
|
+
Permission to view the database and its corresponding space
|
|
110
|
+
"""
|
|
111
|
+
return cast('_t.GetDatabaseAncestorsResponse', self._runtime.call('get_database_ancestors', call_args({'id': id, 'limit': limit})))
|
|
112
|
+
|
|
113
|
+
def list_smart_link(self, *, id: int, limit: int | Unset = UNSET) -> _t.GetSmartLinkAncestorsResponse:
|
|
114
|
+
"""
|
|
115
|
+
Get all ancestors of Smart Link in content tree
|
|
116
|
+
|
|
117
|
+
Returns all ancestors for a given Smart Link in the content tree by ID in top-to-bottom order (that is, the highest ancestor is
|
|
118
|
+
the first item in the response payload). The number of results is limited by the `limit` parameter and additional results
|
|
119
|
+
(if available) will be available by calling this endpoint with the ID of first ancestor in the response payload.
|
|
120
|
+
|
|
121
|
+
This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such
|
|
122
|
+
as [Get Smart Link in the content tree by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get).
|
|
123
|
+
|
|
124
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
125
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
126
|
+
Permission to view the Smart Link in the content tree and its corresponding space
|
|
127
|
+
"""
|
|
128
|
+
return cast('_t.GetSmartLinkAncestorsResponse', self._runtime.call('get_smart_link_ancestors', call_args({'id': id, 'limit': limit})))
|
|
129
|
+
|
|
130
|
+
def list_folder(self, *, id: int, limit: int | Unset = UNSET) -> _t.GetFolderAncestorsResponse:
|
|
131
|
+
"""
|
|
132
|
+
Get all ancestors of folder
|
|
133
|
+
|
|
134
|
+
Returns all ancestors for a given folder by ID in top-to-bottom order (that is, the highest ancestor is
|
|
135
|
+
the first item in the response payload). The number of results is limited by the `limit` parameter and additional results
|
|
136
|
+
(if available) will be available by calling this endpoint with the ID of first ancestor in the response payload.
|
|
137
|
+
|
|
138
|
+
This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such
|
|
139
|
+
as [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-folders-id-get).
|
|
140
|
+
|
|
141
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
142
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
143
|
+
Permission to view the folder and its corresponding space
|
|
144
|
+
"""
|
|
145
|
+
return cast('_t.GetFolderAncestorsResponse', self._runtime.call('get_folder_ancestors', call_args({'id': id, 'limit': limit})))
|
|
146
|
+
|
|
147
|
+
def list_page(self, *, id: int, limit: int | Unset = UNSET) -> _t.GetPageAncestorsResponse:
|
|
148
|
+
"""
|
|
149
|
+
Get all ancestors of page
|
|
150
|
+
|
|
151
|
+
Returns all ancestors for a given page by ID in top-to-bottom order (that is, the highest ancestor is the first
|
|
152
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
153
|
+
will be available by calling this endpoint with the ID of first ancestor in the response payload.
|
|
154
|
+
|
|
155
|
+
This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such
|
|
156
|
+
as [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get).
|
|
157
|
+
|
|
158
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
159
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
160
|
+
"""
|
|
161
|
+
return cast('_t.GetPageAncestorsResponse', self._runtime.call('get_page_ancestors', call_args({'id': id, 'limit': limit})))
|
|
162
|
+
|
|
163
|
+
class _AppPropertiesResource:
|
|
164
|
+
"""Operations under ``app_properties``."""
|
|
165
|
+
|
|
166
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
167
|
+
self._runtime = runtime
|
|
168
|
+
|
|
169
|
+
def list(self, *, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetForgeAppPropertiesResponse:
|
|
170
|
+
"""
|
|
171
|
+
Get Forge app properties.
|
|
172
|
+
|
|
173
|
+
Gets Forge app properties. This API can only be accessed using **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** requests from Forge.
|
|
174
|
+
"""
|
|
175
|
+
return cast('_t.GetForgeAppPropertiesResponse', self._runtime.call('get_forge_app_properties', call_args({'cursor': cursor, 'limit': limit})))
|
|
176
|
+
|
|
177
|
+
def get(self, *, property_key: str) -> _t.GetForgeAppPropertyResponse:
|
|
178
|
+
"""
|
|
179
|
+
Get a Forge app property by key.
|
|
180
|
+
|
|
181
|
+
Gets a Forge app property by property key. This API can only be accessed using **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** requests from Forge.
|
|
182
|
+
"""
|
|
183
|
+
return cast('_t.GetForgeAppPropertyResponse', self._runtime.call('get_forge_app_property', call_args({'property_key': property_key})))
|
|
184
|
+
|
|
185
|
+
def put(self, *, property_key: str, body: builtins.dict[str, Any]) -> None:
|
|
186
|
+
"""
|
|
187
|
+
Create or update a Forge app property.
|
|
188
|
+
|
|
189
|
+
Creates or updates a Forge app property. This API can only be accessed using **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** requests from Forge.
|
|
190
|
+
"""
|
|
191
|
+
self._runtime.call('put_forge_app_property', call_args({'property_key': property_key, 'body': body}))
|
|
192
|
+
|
|
193
|
+
def delete(self, *, property_key: str) -> None:
|
|
194
|
+
"""
|
|
195
|
+
Deletes a Forge app property.
|
|
196
|
+
|
|
197
|
+
Deletes a Forge app property. This API can only be accessed using **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** requests from Forge.
|
|
198
|
+
"""
|
|
199
|
+
self._runtime.call('delete_forge_app_property', call_args({'property_key': property_key}))
|
|
200
|
+
|
|
201
|
+
class _AttachmentResource:
|
|
202
|
+
"""Operations under ``attachment``."""
|
|
203
|
+
|
|
204
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
205
|
+
self._runtime = runtime
|
|
206
|
+
|
|
207
|
+
def list_attachments(self, *, sort: _t.AttachmentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, status: builtins.list[_t.GetAttachmentsStatusItem] | Unset = UNSET, media_type: str | Unset = UNSET, filename: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetAttachmentsResponse:
|
|
208
|
+
"""
|
|
209
|
+
Get attachments
|
|
210
|
+
|
|
211
|
+
Returns all attachments. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
212
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
213
|
+
|
|
214
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
215
|
+
Permission to view the container of the attachment.
|
|
216
|
+
"""
|
|
217
|
+
return cast('_t.GetAttachmentsResponse', self._runtime.call('get_attachments', call_args({'sort': sort, 'cursor': cursor, 'status': status, 'media_type': media_type, 'filename': filename, 'limit': limit})))
|
|
218
|
+
|
|
219
|
+
def get(self, *, id: str, version: int | Unset = UNSET, include_labels: bool | Unset = UNSET, include_properties: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_versions: bool | Unset = UNSET, include_version: bool | Unset = UNSET, include_collaborators: bool | Unset = UNSET) -> _t.GetAttachmentByIdResponse:
|
|
220
|
+
"""
|
|
221
|
+
Get attachment by id
|
|
222
|
+
|
|
223
|
+
Returns a specific attachment.
|
|
224
|
+
|
|
225
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
226
|
+
Permission to view the attachment's container.
|
|
227
|
+
"""
|
|
228
|
+
return cast('_t.GetAttachmentByIdResponse', self._runtime.call('get_attachment_by_id', call_args({'id': id, 'version': version, 'include_labels': include_labels, 'include_properties': include_properties, 'include_operations': include_operations, 'include_versions': include_versions, 'include_version': include_version, 'include_collaborators': include_collaborators})))
|
|
229
|
+
|
|
230
|
+
def delete(self, *, id: int, purge: bool | Unset = UNSET) -> None:
|
|
231
|
+
"""
|
|
232
|
+
Delete attachment
|
|
233
|
+
|
|
234
|
+
Delete an attachment by id.
|
|
235
|
+
|
|
236
|
+
Deleting an attachment moves the attachment to the trash, where it can be restored later. To permanently delete an attachment (or "purge" it),
|
|
237
|
+
the endpoint must be called on a **trashed** attachment with the following param `purge=true`.
|
|
238
|
+
|
|
239
|
+
**[Permissions](https://support.atlassian.com/confluence-cloud/docs/what-are-confluences-roles/) required**:
|
|
240
|
+
Permission to view the container of the attachment.
|
|
241
|
+
Permission to delete attachments in the space.
|
|
242
|
+
[`manage/content`](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) permission for the space (if attempting to purge).
|
|
243
|
+
|
|
244
|
+
**Note:** To find the display name for each permission ID, call the [Get available space permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) API.
|
|
245
|
+
"""
|
|
246
|
+
self._runtime.call('delete_attachment', call_args({'id': id, 'purge': purge}))
|
|
247
|
+
|
|
248
|
+
def list_blogpost_attachments(self, *, id: int, sort: _t.AttachmentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, status: builtins.list[_t.GetBlogpostAttachmentsStatusItem] | Unset = UNSET, media_type: str | Unset = UNSET, filename: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogpostAttachmentsResponse:
|
|
249
|
+
"""
|
|
250
|
+
Get attachments for blog post
|
|
251
|
+
|
|
252
|
+
Returns the attachments of specific blog post. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
253
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
254
|
+
|
|
255
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
256
|
+
Permission to view the content of the blog post and its corresponding space.
|
|
257
|
+
"""
|
|
258
|
+
return cast('_t.GetBlogpostAttachmentsResponse', self._runtime.call('get_blogpost_attachments', call_args({'id': id, 'sort': sort, 'cursor': cursor, 'status': status, 'media_type': media_type, 'filename': filename, 'limit': limit})))
|
|
259
|
+
|
|
260
|
+
def list_custom_content_attachments(self, *, id: int, sort: _t.AttachmentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, status: builtins.list[_t.GetCustomContentAttachmentsStatusItem] | Unset = UNSET, media_type: str | Unset = UNSET, filename: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetCustomContentAttachmentsResponse:
|
|
261
|
+
"""
|
|
262
|
+
Get attachments for custom content
|
|
263
|
+
|
|
264
|
+
Returns the attachments of specific custom content. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
265
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
266
|
+
|
|
267
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
268
|
+
Permission to view the content of the custom content and its corresponding space.
|
|
269
|
+
"""
|
|
270
|
+
return cast('_t.GetCustomContentAttachmentsResponse', self._runtime.call('get_custom_content_attachments', call_args({'id': id, 'sort': sort, 'cursor': cursor, 'status': status, 'media_type': media_type, 'filename': filename, 'limit': limit})))
|
|
271
|
+
|
|
272
|
+
def list_label_attachments(self, *, id: int, sort: _t.AttachmentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetLabelAttachmentsResponse:
|
|
273
|
+
"""
|
|
274
|
+
Get attachments for label
|
|
275
|
+
|
|
276
|
+
Returns the attachments of specified label. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
277
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
278
|
+
|
|
279
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
280
|
+
Permission to view the attachment and its corresponding space.
|
|
281
|
+
"""
|
|
282
|
+
return cast('_t.GetLabelAttachmentsResponse', self._runtime.call('get_label_attachments', call_args({'id': id, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
283
|
+
|
|
284
|
+
def list_page_attachments(self, *, id: int, sort: _t.AttachmentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, status: builtins.list[_t.GetPageAttachmentsStatusItem] | Unset = UNSET, media_type: str | Unset = UNSET, filename: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPageAttachmentsResponse:
|
|
285
|
+
"""
|
|
286
|
+
Get attachments for page
|
|
287
|
+
|
|
288
|
+
Returns the attachments of specific page. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
289
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
290
|
+
|
|
291
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
292
|
+
Permission to view the content of the page and its corresponding space.
|
|
293
|
+
"""
|
|
294
|
+
return cast('_t.GetPageAttachmentsResponse', self._runtime.call('get_page_attachments', call_args({'id': id, 'sort': sort, 'cursor': cursor, 'status': status, 'media_type': media_type, 'filename': filename, 'limit': limit})))
|
|
295
|
+
|
|
296
|
+
def get_thumbnail(self, *, id: str, version: int | Unset = UNSET, height: int | Unset = UNSET, width: int | Unset = UNSET) -> None:
|
|
297
|
+
"""
|
|
298
|
+
Download attachment thumbnail by id
|
|
299
|
+
|
|
300
|
+
Redirects the client to a URL that serves an attachment thumbnail's binary data.
|
|
301
|
+
|
|
302
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
303
|
+
Permission to view the attachment's container.
|
|
304
|
+
"""
|
|
305
|
+
self._runtime.call('get_attachment_thumbnail_by_id', call_args({'id': id, 'version': version, 'height': height, 'width': width}))
|
|
306
|
+
|
|
307
|
+
class _BlogPostResource:
|
|
308
|
+
"""Operations under ``blog_post``."""
|
|
309
|
+
|
|
310
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
311
|
+
self._runtime = runtime
|
|
312
|
+
|
|
313
|
+
def list_blog_posts(self, *, id: builtins.list[int] | Unset = UNSET, space_id: builtins.list[int] | Unset = UNSET, sort: _t.BlogPostSortOrder | Unset = UNSET, status: builtins.list[_t.GetBlogPostsStatusItem] | Unset = UNSET, title: str | Unset = UNSET, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogPostsResponse:
|
|
314
|
+
"""
|
|
315
|
+
Get blog posts
|
|
316
|
+
|
|
317
|
+
Returns all blog posts. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
318
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
319
|
+
|
|
320
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
321
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
322
|
+
Only blog posts that the user has permission to view will be returned.
|
|
323
|
+
"""
|
|
324
|
+
return cast('_t.GetBlogPostsResponse', self._runtime.call('get_blog_posts', call_args({'id': id, 'space_id': space_id, 'sort': sort, 'status': status, 'title': title, 'body_format': body_format, 'cursor': cursor, 'limit': limit})))
|
|
325
|
+
|
|
326
|
+
def create(self, *, space_id: str, private: bool | Unset = UNSET, status: _t.CreateBlogPostBodyStatus | Unset = UNSET, title: str | Unset = UNSET, body: _t.CreateBlogPostBodyBody | Unset = UNSET, created_at: str | Unset = UNSET) -> _t.CreateBlogPostResponse:
|
|
327
|
+
"""
|
|
328
|
+
Create blog post
|
|
329
|
+
|
|
330
|
+
Creates a new blog post in the space specified by the spaceId.
|
|
331
|
+
|
|
332
|
+
By default this will create the blog post as a non-draft, unless the status is specified as draft.
|
|
333
|
+
If creating a non-draft, the title must not be empty.
|
|
334
|
+
|
|
335
|
+
Currently only supports the storage representation specified in the body.representation enums below
|
|
336
|
+
"""
|
|
337
|
+
return cast('_t.CreateBlogPostResponse', self._runtime.call('create_blog_post', call_args({'private': private}, {'body': {'space_id': space_id, 'status': status, 'title': title, 'body': body, 'created_at': created_at}}, required=frozenset({'body'}))))
|
|
338
|
+
|
|
339
|
+
def get(self, *, id: int, body_format: _t.PrimaryBodyRepresentationSingle | Unset = UNSET, get_draft: bool | Unset = UNSET, status: builtins.list[_t.GetBlogPostByIdStatusItem] | Unset = UNSET, version: int | Unset = UNSET, include_labels: bool | Unset = UNSET, include_properties: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_likes: bool | Unset = UNSET, include_versions: bool | Unset = UNSET, include_version: bool | Unset = UNSET, include_favorited_by_current_user_status: bool | Unset = UNSET, include_webresources: bool | Unset = UNSET, include_collaborators: bool | Unset = UNSET) -> _t.GetBlogPostByIdResponse:
|
|
340
|
+
"""
|
|
341
|
+
Get blog post by id
|
|
342
|
+
|
|
343
|
+
Returns a specific blog post.
|
|
344
|
+
|
|
345
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
346
|
+
Permission to view the blog post and its corresponding space.
|
|
347
|
+
"""
|
|
348
|
+
return cast('_t.GetBlogPostByIdResponse', self._runtime.call('get_blog_post_by_id', call_args({'id': id, 'body_format': body_format, 'get_draft': get_draft, 'status': status, 'version': version, 'include_labels': include_labels, 'include_properties': include_properties, 'include_operations': include_operations, 'include_likes': include_likes, 'include_versions': include_versions, 'include_version': include_version, 'include_favorited_by_current_user_status': include_favorited_by_current_user_status, 'include_webresources': include_webresources, 'include_collaborators': include_collaborators})))
|
|
349
|
+
|
|
350
|
+
def update(self, *, id: int, body: _t.UpdateBlogPostBody) -> _t.UpdateBlogPostResponse:
|
|
351
|
+
"""
|
|
352
|
+
Update blog post
|
|
353
|
+
|
|
354
|
+
Update a blog post by id.
|
|
355
|
+
|
|
356
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
357
|
+
Permission to view the blog post and its corresponding space. Permission to update blog posts in the space.
|
|
358
|
+
"""
|
|
359
|
+
return cast('_t.UpdateBlogPostResponse', self._runtime.call('update_blog_post', call_args({'id': id, 'body': body})))
|
|
360
|
+
|
|
361
|
+
def delete(self, *, id: int, purge: bool | Unset = UNSET, draft: bool | Unset = UNSET) -> None:
|
|
362
|
+
"""
|
|
363
|
+
Delete blog post
|
|
364
|
+
|
|
365
|
+
Delete a blog post by id.
|
|
366
|
+
|
|
367
|
+
By default this will delete blog posts that are non-drafts. To delete a blog post that is a draft, the endpoint must be called on a
|
|
368
|
+
draft with the following param `draft=true`. Discarded drafts are not sent to the trash and are permanently deleted.
|
|
369
|
+
|
|
370
|
+
Deleting a blog post that is not a draft moves the blog post to the trash, where it can be restored later.
|
|
371
|
+
To permanently delete a blog post (or "purge" it), the endpoint must be called on a **trashed** blog post with the following param `purge=true`.
|
|
372
|
+
|
|
373
|
+
**[Permissions](https://support.atlassian.com/confluence-cloud/docs/what-are-confluences-roles/) required**:
|
|
374
|
+
Permission to view the blog post and its corresponding space.
|
|
375
|
+
Permission to delete blog posts in the space.
|
|
376
|
+
[`manage/content`](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) permission for the space (if attempting to purge).
|
|
377
|
+
|
|
378
|
+
**Note:** To find the display name for each permission ID, call the [Get available space permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) API.
|
|
379
|
+
"""
|
|
380
|
+
self._runtime.call('delete_blog_post', call_args({'id': id, 'purge': purge, 'draft': draft}))
|
|
381
|
+
|
|
382
|
+
def list_label_blog_posts(self, *, id: int, space_id: builtins.list[int] | Unset = UNSET, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, sort: _t.BlogPostSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetLabelBlogPostsResponse:
|
|
383
|
+
"""
|
|
384
|
+
Get blog posts for label
|
|
385
|
+
|
|
386
|
+
Returns the blogposts of specified label. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
387
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
388
|
+
|
|
389
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
390
|
+
Permission to view the content of the page and its corresponding space.
|
|
391
|
+
"""
|
|
392
|
+
return cast('_t.GetLabelBlogPostsResponse', self._runtime.call('get_label_blog_posts', call_args({'id': id, 'space_id': space_id, 'body_format': body_format, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
393
|
+
|
|
394
|
+
def get_blog_posts_in_space(self, *, id: int, sort: _t.BlogPostSortOrder | Unset = UNSET, status: builtins.list[_t.GetBlogPostsInSpaceStatusItem] | Unset = UNSET, title: str | Unset = UNSET, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogPostsInSpaceResponse:
|
|
395
|
+
"""
|
|
396
|
+
Get blog posts in space
|
|
397
|
+
|
|
398
|
+
Returns all blog posts in a space. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
399
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
400
|
+
|
|
401
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
402
|
+
Permission to access the Confluence site ('Can use' global permission) and view the space.
|
|
403
|
+
Only blog posts that the user has permission to view will be returned.
|
|
404
|
+
"""
|
|
405
|
+
return cast('_t.GetBlogPostsInSpaceResponse', self._runtime.call('get_blog_posts_in_space', call_args({'id': id, 'sort': sort, 'status': status, 'title': title, 'body_format': body_format, 'cursor': cursor, 'limit': limit})))
|
|
406
|
+
|
|
407
|
+
class _ChildrenResource:
|
|
408
|
+
"""Operations under ``children``."""
|
|
409
|
+
|
|
410
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
411
|
+
self._runtime = runtime
|
|
412
|
+
|
|
413
|
+
def get_whiteboard_direct(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: str | Unset = UNSET) -> _t.GetWhiteboardDirectChildrenResponse:
|
|
414
|
+
"""
|
|
415
|
+
Get direct children of a whiteboard
|
|
416
|
+
|
|
417
|
+
Returns all children for given whiteboard id in the content tree. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
418
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
419
|
+
|
|
420
|
+
The following types of content will be returned:
|
|
421
|
+
- Database
|
|
422
|
+
- Embed
|
|
423
|
+
- Folder
|
|
424
|
+
- Page
|
|
425
|
+
- Whiteboard
|
|
426
|
+
|
|
427
|
+
This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on the content type, such
|
|
428
|
+
as:
|
|
429
|
+
|
|
430
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
431
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
432
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
433
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
434
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
435
|
+
|
|
436
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
437
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
438
|
+
Only content that the user has permission to view will be returned.
|
|
439
|
+
"""
|
|
440
|
+
return cast('_t.GetWhiteboardDirectChildrenResponse', self._runtime.call('get_whiteboard_direct_children', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
441
|
+
|
|
442
|
+
def get_database_direct(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: str | Unset = UNSET) -> _t.GetDatabaseDirectChildrenResponse:
|
|
443
|
+
"""
|
|
444
|
+
Get direct children of a database
|
|
445
|
+
|
|
446
|
+
Returns all children for given database id in the content tree. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
447
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
448
|
+
|
|
449
|
+
The following types of content will be returned:
|
|
450
|
+
- Database
|
|
451
|
+
- Embed
|
|
452
|
+
- Folder
|
|
453
|
+
- Page
|
|
454
|
+
- Whiteboard
|
|
455
|
+
|
|
456
|
+
This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on the content type, such
|
|
457
|
+
as:
|
|
458
|
+
|
|
459
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
460
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
461
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
462
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
463
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
464
|
+
|
|
465
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
466
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
467
|
+
Only content that the user has permission to view will be returned.
|
|
468
|
+
"""
|
|
469
|
+
return cast('_t.GetDatabaseDirectChildrenResponse', self._runtime.call('get_database_direct_children', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
470
|
+
|
|
471
|
+
def get_smart_link_direct(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: str | Unset = UNSET) -> _t.GetSmartLinkDirectChildrenResponse:
|
|
472
|
+
"""
|
|
473
|
+
Get direct children of a Smart Link
|
|
474
|
+
|
|
475
|
+
Returns all children for given smart link id in the content tree. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
476
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
477
|
+
|
|
478
|
+
The following types of content will be returned:
|
|
479
|
+
- Database
|
|
480
|
+
- Embed
|
|
481
|
+
- Folder
|
|
482
|
+
- Page
|
|
483
|
+
- Whiteboard
|
|
484
|
+
|
|
485
|
+
This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on the content type, such
|
|
486
|
+
as:
|
|
487
|
+
|
|
488
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
489
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
490
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
491
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
492
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
493
|
+
|
|
494
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
495
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
496
|
+
Only content that the user has permission to view will be returned.
|
|
497
|
+
"""
|
|
498
|
+
return cast('_t.GetSmartLinkDirectChildrenResponse', self._runtime.call('get_smart_link_direct_children', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
499
|
+
|
|
500
|
+
def get_folder_direct(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: str | Unset = UNSET) -> _t.GetFolderDirectChildrenResponse:
|
|
501
|
+
"""
|
|
502
|
+
Get direct children of a folder
|
|
503
|
+
|
|
504
|
+
Returns all children for given folder id in the content tree. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
505
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
506
|
+
|
|
507
|
+
The following types of content will be returned:
|
|
508
|
+
- Database
|
|
509
|
+
- Embed
|
|
510
|
+
- Folder
|
|
511
|
+
- Page
|
|
512
|
+
- Whiteboard
|
|
513
|
+
|
|
514
|
+
This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on the content type, such
|
|
515
|
+
as:
|
|
516
|
+
|
|
517
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
518
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
519
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
520
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
521
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
522
|
+
|
|
523
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
524
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
525
|
+
Only content that the user has permission to view will be returned.
|
|
526
|
+
"""
|
|
527
|
+
return cast('_t.GetFolderDirectChildrenResponse', self._runtime.call('get_folder_direct_children', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
528
|
+
|
|
529
|
+
def list_child_pages(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: str | Unset = UNSET) -> _t.GetChildPagesResponse:
|
|
530
|
+
"""
|
|
531
|
+
Get child pages
|
|
532
|
+
|
|
533
|
+
Returns all child pages for given page id. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
534
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
535
|
+
|
|
536
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
537
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
538
|
+
Only pages that the user has permission to view will be returned.
|
|
539
|
+
|
|
540
|
+
Deprecated.
|
|
541
|
+
"""
|
|
542
|
+
return cast('_t.GetChildPagesResponse', self._runtime.call('get_child_pages', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
543
|
+
|
|
544
|
+
def get_child_custom_content(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: str | Unset = UNSET) -> _t.GetChildCustomContentResponse:
|
|
545
|
+
"""
|
|
546
|
+
Get child custom content
|
|
547
|
+
|
|
548
|
+
Returns all child custom content for given custom content id. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
549
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
550
|
+
|
|
551
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
552
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
553
|
+
Only custom content that the user has permission to view will be returned.
|
|
554
|
+
"""
|
|
555
|
+
return cast('_t.GetChildCustomContentResponse', self._runtime.call('get_child_custom_content', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
556
|
+
|
|
557
|
+
def get_page_direct(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: str | Unset = UNSET) -> _t.GetPageDirectChildrenResponse:
|
|
558
|
+
"""
|
|
559
|
+
Get direct children of a page
|
|
560
|
+
|
|
561
|
+
Returns all children for given page id in the content tree. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
562
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
563
|
+
|
|
564
|
+
The following types of content will be returned:
|
|
565
|
+
- Database
|
|
566
|
+
- Embed
|
|
567
|
+
- Folder
|
|
568
|
+
- Page
|
|
569
|
+
- Whiteboard
|
|
570
|
+
|
|
571
|
+
This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on the content type, such
|
|
572
|
+
as:
|
|
573
|
+
|
|
574
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
575
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
576
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
577
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
578
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
579
|
+
|
|
580
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
581
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
582
|
+
Only content that the user has permission to view will be returned.
|
|
583
|
+
"""
|
|
584
|
+
return cast('_t.GetPageDirectChildrenResponse', self._runtime.call('get_page_direct_children', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
585
|
+
|
|
586
|
+
class _ClassificationLevelResource:
|
|
587
|
+
"""Operations under ``classification_level``."""
|
|
588
|
+
|
|
589
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
590
|
+
self._runtime = runtime
|
|
591
|
+
|
|
592
|
+
def list_classification_levels(self) -> builtins.list[_t.ClassificationLevel]:
|
|
593
|
+
"""
|
|
594
|
+
Get list of classification levels
|
|
595
|
+
|
|
596
|
+
Returns a list of [classification levels](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
597
|
+
available.
|
|
598
|
+
|
|
599
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
600
|
+
'Permission to access the Confluence site ('Can use' global permission).
|
|
601
|
+
"""
|
|
602
|
+
return cast('builtins.list[_t.ClassificationLevel]', self._runtime.call('get_classification_levels', call_args({})))
|
|
603
|
+
|
|
604
|
+
def get_space_default(self, *, id: int) -> _t.ClassificationLevel:
|
|
605
|
+
"""
|
|
606
|
+
Get space default classification level
|
|
607
|
+
|
|
608
|
+
Returns the [default classification level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/)
|
|
609
|
+
for a specific space.
|
|
610
|
+
|
|
611
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
612
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the space.
|
|
613
|
+
"""
|
|
614
|
+
return cast('_t.ClassificationLevel', self._runtime.call('get_space_default_classification_level', call_args({'id': id})))
|
|
615
|
+
|
|
616
|
+
def put_space_default(self, *, id: int, body: _t.PutSpaceDefaultClassificationLevelBody) -> None:
|
|
617
|
+
"""
|
|
618
|
+
Update space default classification level
|
|
619
|
+
|
|
620
|
+
Update the [default classification level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/)
|
|
621
|
+
for a specific space.
|
|
622
|
+
|
|
623
|
+
**[Permissions](https://support.atlassian.com/confluence-cloud/docs/what-are-confluences-roles/) required**:
|
|
624
|
+
Permission to access the Confluence site ('Can use' global permission) and
|
|
625
|
+
[`manage/space`](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) permission for the space.
|
|
626
|
+
|
|
627
|
+
**Note:** To find the display name for each permission ID, call the [Get available space permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) API.
|
|
628
|
+
"""
|
|
629
|
+
self._runtime.call('put_space_default_classification_level', call_args({'id': id, 'body': body}))
|
|
630
|
+
|
|
631
|
+
def delete(self, *, id: int) -> None:
|
|
632
|
+
"""
|
|
633
|
+
Delete space default classification level
|
|
634
|
+
|
|
635
|
+
Returns the [default classification level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/)
|
|
636
|
+
for a specific space.
|
|
637
|
+
|
|
638
|
+
**[Permissions](https://support.atlassian.com/confluence-cloud/docs/what-are-confluences-roles/) required**:
|
|
639
|
+
Permission to access the Confluence site ('Can use' global permission) and
|
|
640
|
+
[`manage/space`](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) permission for the space.
|
|
641
|
+
|
|
642
|
+
**Note:** To find the display name for each permission ID, call the [Get available space permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) API.
|
|
643
|
+
"""
|
|
644
|
+
self._runtime.call('delete_space_default_classification_level', call_args({'id': id}))
|
|
645
|
+
|
|
646
|
+
def get_page(self, *, id: int, status: _t.GetPageClassificationLevelStatus | Unset = UNSET) -> _t.ClassificationLevel:
|
|
647
|
+
"""
|
|
648
|
+
Get page classification level
|
|
649
|
+
|
|
650
|
+
Returns the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
651
|
+
for a specific page.
|
|
652
|
+
|
|
653
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
654
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the page.
|
|
655
|
+
'Permission to edit the page is required if trying to view classification level for a draft.
|
|
656
|
+
"""
|
|
657
|
+
return cast('_t.ClassificationLevel', self._runtime.call('get_page_classification_level', call_args({'id': id, 'status': status})))
|
|
658
|
+
|
|
659
|
+
def put_page(self, *, id: int, body: _t.PutPageClassificationLevelBody) -> None:
|
|
660
|
+
"""
|
|
661
|
+
Update page classification level
|
|
662
|
+
|
|
663
|
+
Updates the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
664
|
+
for a specific page.
|
|
665
|
+
|
|
666
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
667
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to edit the page.
|
|
668
|
+
"""
|
|
669
|
+
self._runtime.call('put_page_classification_level', call_args({'id': id, 'body': body}))
|
|
670
|
+
|
|
671
|
+
def post_page(self, *, id: int, status: _t.PostPageClassificationLevelBodyStatus) -> None:
|
|
672
|
+
"""
|
|
673
|
+
Reset page classification level
|
|
674
|
+
|
|
675
|
+
Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
676
|
+
for a specific page for the space
|
|
677
|
+
[default classification level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/).
|
|
678
|
+
|
|
679
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
680
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the page.
|
|
681
|
+
"""
|
|
682
|
+
self._runtime.call('post_page_classification_level', call_args({'id': id}, {'body': {'status': status}}, required=frozenset({'body'})))
|
|
683
|
+
|
|
684
|
+
def get_blog_post(self, *, id: int, status: _t.GetBlogPostClassificationLevelStatus | Unset = UNSET) -> _t.ClassificationLevel:
|
|
685
|
+
"""
|
|
686
|
+
Get blog post classification level
|
|
687
|
+
|
|
688
|
+
Returns the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
689
|
+
for a specific blog post.
|
|
690
|
+
|
|
691
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
692
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the blog post.
|
|
693
|
+
'Permission to edit the blog post is required if trying to view classification level for a draft.
|
|
694
|
+
"""
|
|
695
|
+
return cast('_t.ClassificationLevel', self._runtime.call('get_blog_post_classification_level', call_args({'id': id, 'status': status})))
|
|
696
|
+
|
|
697
|
+
def put_blog_post(self, *, id: int, body: _t.PutBlogPostClassificationLevelBody) -> None:
|
|
698
|
+
"""
|
|
699
|
+
Update blog post classification level
|
|
700
|
+
|
|
701
|
+
Updates the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
702
|
+
for a specific blog post.
|
|
703
|
+
|
|
704
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
705
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to edit the blog post.
|
|
706
|
+
"""
|
|
707
|
+
self._runtime.call('put_blog_post_classification_level', call_args({'id': id, 'body': body}))
|
|
708
|
+
|
|
709
|
+
def post_blog_post(self, *, id: int, status: _t.PostBlogPostClassificationLevelBodyStatus) -> None:
|
|
710
|
+
"""
|
|
711
|
+
Reset blog post classification level
|
|
712
|
+
|
|
713
|
+
Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
714
|
+
for a specific blog post for the space
|
|
715
|
+
[default classification level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/).
|
|
716
|
+
|
|
717
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
718
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the blog post.
|
|
719
|
+
"""
|
|
720
|
+
self._runtime.call('post_blog_post_classification_level', call_args({'id': id}, {'body': {'status': status}}, required=frozenset({'body'})))
|
|
721
|
+
|
|
722
|
+
def get_whiteboard(self, *, id: int) -> _t.ClassificationLevel:
|
|
723
|
+
"""
|
|
724
|
+
Get whiteboard classification level
|
|
725
|
+
|
|
726
|
+
Returns the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
727
|
+
for a specific whiteboard.
|
|
728
|
+
|
|
729
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
730
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the whiteboard.
|
|
731
|
+
"""
|
|
732
|
+
return cast('_t.ClassificationLevel', self._runtime.call('get_whiteboard_classification_level', call_args({'id': id})))
|
|
733
|
+
|
|
734
|
+
def put_whiteboard(self, *, id: int, body: _t.PutWhiteboardClassificationLevelBody) -> None:
|
|
735
|
+
"""
|
|
736
|
+
Update whiteboard classification level
|
|
737
|
+
|
|
738
|
+
Updates the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
739
|
+
for a specific whiteboard.
|
|
740
|
+
|
|
741
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
742
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to edit the whiteboard.
|
|
743
|
+
"""
|
|
744
|
+
self._runtime.call('put_whiteboard_classification_level', call_args({'id': id, 'body': body}))
|
|
745
|
+
|
|
746
|
+
def post_whiteboard(self, *, id: int, status: _t.PostWhiteboardClassificationLevelBodyStatus) -> None:
|
|
747
|
+
"""
|
|
748
|
+
Reset whiteboard classification level
|
|
749
|
+
|
|
750
|
+
Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
751
|
+
for a specific whiteboard for the space
|
|
752
|
+
[default classification level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/).
|
|
753
|
+
|
|
754
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
755
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the whiteboard.
|
|
756
|
+
"""
|
|
757
|
+
self._runtime.call('post_whiteboard_classification_level', call_args({'id': id}, {'body': {'status': status}}, required=frozenset({'body'})))
|
|
758
|
+
|
|
759
|
+
def get_database(self, *, id: int) -> _t.ClassificationLevel:
|
|
760
|
+
"""
|
|
761
|
+
Get database classification level
|
|
762
|
+
|
|
763
|
+
Returns the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
764
|
+
for a specific database.
|
|
765
|
+
|
|
766
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
767
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the database.
|
|
768
|
+
"""
|
|
769
|
+
return cast('_t.ClassificationLevel', self._runtime.call('get_database_classification_level', call_args({'id': id})))
|
|
770
|
+
|
|
771
|
+
def put_database(self, *, id: int, body: _t.PutDatabaseClassificationLevelBody) -> None:
|
|
772
|
+
"""
|
|
773
|
+
Update database classification level
|
|
774
|
+
|
|
775
|
+
Updates the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
776
|
+
for a specific database.
|
|
777
|
+
|
|
778
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
779
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to edit the database.
|
|
780
|
+
"""
|
|
781
|
+
self._runtime.call('put_database_classification_level', call_args({'id': id, 'body': body}))
|
|
782
|
+
|
|
783
|
+
def post_database(self, *, id: int, status: _t.PostDatabaseClassificationLevelBodyStatus) -> None:
|
|
784
|
+
"""
|
|
785
|
+
Reset database classification level
|
|
786
|
+
|
|
787
|
+
Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level)
|
|
788
|
+
for a specific database for the space
|
|
789
|
+
[default classification level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/).
|
|
790
|
+
|
|
791
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
792
|
+
'Permission to access the Confluence site ('Can use' global permission) and permission to view the database.
|
|
793
|
+
"""
|
|
794
|
+
self._runtime.call('post_database_classification_level', call_args({'id': id}, {'body': {'status': status}}, required=frozenset({'body'})))
|
|
795
|
+
|
|
796
|
+
class _CommentResource:
|
|
797
|
+
"""Operations under ``comment``."""
|
|
798
|
+
|
|
799
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
800
|
+
self._runtime = runtime
|
|
801
|
+
|
|
802
|
+
def list_attachment_comments(self, *, id: str, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, version: int | Unset = UNSET) -> _t.GetAttachmentCommentsResponse:
|
|
803
|
+
"""
|
|
804
|
+
Get attachment comments
|
|
805
|
+
|
|
806
|
+
Returns the comments of the specific attachment.
|
|
807
|
+
The number of results is limited by the `limit` parameter and additional results (if available) will be available through
|
|
808
|
+
the `next` URL present in the `Link` response header.
|
|
809
|
+
|
|
810
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
811
|
+
Permission to view the attachment and its corresponding containers.
|
|
812
|
+
"""
|
|
813
|
+
return cast('_t.GetAttachmentCommentsResponse', self._runtime.call('get_attachment_comments', call_args({'id': id, 'body_format': body_format, 'cursor': cursor, 'limit': limit, 'sort': sort, 'version': version})))
|
|
814
|
+
|
|
815
|
+
def list_custom_content_comments(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET) -> _t.GetCustomContentCommentsResponse:
|
|
816
|
+
"""
|
|
817
|
+
Get custom content comments
|
|
818
|
+
|
|
819
|
+
Returns the comments of the specific custom content.
|
|
820
|
+
The number of results is limited by the `limit` parameter and additional results (if available) will be available through
|
|
821
|
+
the `next` URL present in the `Link` response header.
|
|
822
|
+
|
|
823
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
824
|
+
Permission to view the custom content and its corresponding containers.
|
|
825
|
+
"""
|
|
826
|
+
return cast('_t.GetCustomContentCommentsResponse', self._runtime.call('get_custom_content_comments', call_args({'id': id, 'body_format': body_format, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
827
|
+
|
|
828
|
+
def list_page_footer_comments(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, status: builtins.list[_t.GetPageFooterCommentsStatusItem] | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPageFooterCommentsResponse:
|
|
829
|
+
"""
|
|
830
|
+
Get footer comments for page
|
|
831
|
+
|
|
832
|
+
Returns the root footer comments of specific page. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
833
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
834
|
+
|
|
835
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
836
|
+
Permission to view the content of the page and its corresponding space.
|
|
837
|
+
"""
|
|
838
|
+
return cast('_t.GetPageFooterCommentsResponse', self._runtime.call('get_page_footer_comments', call_args({'id': id, 'body_format': body_format, 'status': status, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
839
|
+
|
|
840
|
+
def list_page_inline_comments(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, status: builtins.list[_t.GetPageInlineCommentsStatusItem] | Unset = UNSET, resolution_status: builtins.list[_t.GetPageInlineCommentsResolutionStatusItem] | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPageInlineCommentsResponse:
|
|
841
|
+
"""
|
|
842
|
+
Get inline comments for page
|
|
843
|
+
|
|
844
|
+
Returns the root inline comments of specific page. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
845
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
846
|
+
|
|
847
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
848
|
+
Permission to view the content of the page and its corresponding space.
|
|
849
|
+
"""
|
|
850
|
+
return cast('_t.GetPageInlineCommentsResponse', self._runtime.call('get_page_inline_comments', call_args({'id': id, 'body_format': body_format, 'status': status, 'resolution_status': resolution_status, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
851
|
+
|
|
852
|
+
def list_blog_post_footer_comments(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, status: builtins.list[_t.GetBlogPostFooterCommentsStatusItem] | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogPostFooterCommentsResponse:
|
|
853
|
+
"""
|
|
854
|
+
Get footer comments for blog post
|
|
855
|
+
|
|
856
|
+
Returns the root footer comments of specific blog post. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
857
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
858
|
+
|
|
859
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
860
|
+
Permission to view the content of the blog post and its corresponding space.
|
|
861
|
+
"""
|
|
862
|
+
return cast('_t.GetBlogPostFooterCommentsResponse', self._runtime.call('get_blog_post_footer_comments', call_args({'id': id, 'body_format': body_format, 'status': status, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
863
|
+
|
|
864
|
+
def list_blog_post_inline_comments(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, status: builtins.list[_t.GetBlogPostInlineCommentsStatusItem] | Unset = UNSET, resolution_status: builtins.list[_t.GetBlogPostInlineCommentsResolutionStatusItem] | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogPostInlineCommentsResponse:
|
|
865
|
+
"""
|
|
866
|
+
Get inline comments for blog post
|
|
867
|
+
|
|
868
|
+
Returns the root inline comments of specific blog post. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
869
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
870
|
+
|
|
871
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
872
|
+
Permission to view the content of the blog post and its corresponding space.
|
|
873
|
+
"""
|
|
874
|
+
return cast('_t.GetBlogPostInlineCommentsResponse', self._runtime.call('get_blog_post_inline_comments', call_args({'id': id, 'body_format': body_format, 'status': status, 'resolution_status': resolution_status, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
875
|
+
|
|
876
|
+
def list_footer_comments(self, *, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetFooterCommentsResponse:
|
|
877
|
+
"""
|
|
878
|
+
Get footer comments
|
|
879
|
+
|
|
880
|
+
Returns all footer comments. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
881
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
882
|
+
|
|
883
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
884
|
+
Permission to view the content of the container and its corresponding space.
|
|
885
|
+
"""
|
|
886
|
+
return cast('_t.GetFooterCommentsResponse', self._runtime.call('get_footer_comments', call_args({'body_format': body_format, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
887
|
+
|
|
888
|
+
def create_footer(self, *, blog_post_id: str | Unset = UNSET, page_id: str | Unset = UNSET, parent_comment_id: str | Unset = UNSET, attachment_id: str | Unset = UNSET, custom_content_id: str | Unset = UNSET, body: _t.CreateFooterCommentModelBody | Unset = UNSET) -> _t.CreateFooterCommentResponse:
|
|
889
|
+
"""
|
|
890
|
+
Create footer comment
|
|
891
|
+
|
|
892
|
+
Create a footer comment.
|
|
893
|
+
|
|
894
|
+
The footer comment can be made against several locations:
|
|
895
|
+
- at the top level (specifying pageId or blogPostId in the request body)
|
|
896
|
+
- as a reply (specifying parentCommentId in the request body)
|
|
897
|
+
- against an attachment (note: this is different than the comments added via the attachment properties page on the UI, which are referred to as version comments)
|
|
898
|
+
- against a custom content
|
|
899
|
+
|
|
900
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
901
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.
|
|
902
|
+
"""
|
|
903
|
+
return cast('_t.CreateFooterCommentResponse', self._runtime.call('create_footer_comment', call_args({}, {'body': {'blog_post_id': blog_post_id, 'page_id': page_id, 'parent_comment_id': parent_comment_id, 'attachment_id': attachment_id, 'custom_content_id': custom_content_id, 'body': body}})))
|
|
904
|
+
|
|
905
|
+
def get_footer(self, *, comment_id: int, body_format: _t.PrimaryBodyRepresentationSingle | Unset = UNSET, version: int | Unset = UNSET, include_properties: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_likes: bool | Unset = UNSET, include_versions: bool | Unset = UNSET, include_version: bool | Unset = UNSET) -> _t.GetFooterCommentByIdResponse:
|
|
906
|
+
"""
|
|
907
|
+
Get footer comment by id
|
|
908
|
+
|
|
909
|
+
Retrieves a footer comment by id
|
|
910
|
+
|
|
911
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
912
|
+
Permission to view the content of the container and its corresponding space.
|
|
913
|
+
"""
|
|
914
|
+
return cast('_t.GetFooterCommentByIdResponse', self._runtime.call('get_footer_comment_by_id', call_args({'comment_id': comment_id, 'body_format': body_format, 'version': version, 'include_properties': include_properties, 'include_operations': include_operations, 'include_likes': include_likes, 'include_versions': include_versions, 'include_version': include_version})))
|
|
915
|
+
|
|
916
|
+
def update_footer(self, *, comment_id: int, version: _t.UpdateFooterCommentModelVersion | Unset = UNSET, body: _t.UpdateFooterCommentModelBody | Unset = UNSET, links: _t.UpdateFooterCommentBodyLinks | Unset = UNSET) -> _t.FooterCommentModel:
|
|
917
|
+
"""
|
|
918
|
+
Update footer comment
|
|
919
|
+
|
|
920
|
+
Update a footer comment. This can be used to update the body text of a comment.
|
|
921
|
+
|
|
922
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
923
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.
|
|
924
|
+
"""
|
|
925
|
+
return cast('_t.FooterCommentModel', self._runtime.call('update_footer_comment', call_args({'comment_id': comment_id}, {'body': {'version': version, 'body': body, 'links': links}})))
|
|
926
|
+
|
|
927
|
+
def delete_footer(self, *, comment_id: int) -> None:
|
|
928
|
+
"""
|
|
929
|
+
Delete footer comment
|
|
930
|
+
|
|
931
|
+
Deletes a footer comment. This is a permanent deletion and cannot be reverted.
|
|
932
|
+
|
|
933
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
934
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to delete comments in the space.
|
|
935
|
+
"""
|
|
936
|
+
self._runtime.call('delete_footer_comment', call_args({'comment_id': comment_id}))
|
|
937
|
+
|
|
938
|
+
def get_footer_children(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetFooterCommentChildrenResponse:
|
|
939
|
+
"""
|
|
940
|
+
Get children footer comments
|
|
941
|
+
|
|
942
|
+
Returns the children footer comments of specific comment. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
943
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
944
|
+
|
|
945
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
946
|
+
Permission to view the content of the page and its corresponding space.
|
|
947
|
+
"""
|
|
948
|
+
return cast('_t.GetFooterCommentChildrenResponse', self._runtime.call('get_footer_comment_children', call_args({'id': id, 'body_format': body_format, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
949
|
+
|
|
950
|
+
def list_inline_comments(self, *, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetInlineCommentsResponse:
|
|
951
|
+
"""
|
|
952
|
+
Get inline comments
|
|
953
|
+
|
|
954
|
+
Returns all inline comments. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
955
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
956
|
+
|
|
957
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
958
|
+
Permission to view the content of the page and its corresponding space.
|
|
959
|
+
"""
|
|
960
|
+
return cast('_t.GetInlineCommentsResponse', self._runtime.call('get_inline_comments', call_args({'body_format': body_format, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
961
|
+
|
|
962
|
+
def create_inline(self, *, blog_post_id: str | Unset = UNSET, page_id: str | Unset = UNSET, parent_comment_id: str | Unset = UNSET, body: _t.CreateInlineCommentModelBody | Unset = UNSET, inline_comment_properties: _t.CreateInlineCommentModelInlineCommentProperties | Unset = UNSET) -> _t.CreateInlineCommentResponse:
|
|
963
|
+
"""
|
|
964
|
+
Create inline comment
|
|
965
|
+
|
|
966
|
+
Create an inline comment. This can be at the top level (specifying pageId or blogPostId in the request body)
|
|
967
|
+
or as a reply (specifying parentCommentId in the request body). Note the inlineCommentProperties object in the
|
|
968
|
+
request body is used to select the text the inline comment should be tied to. This is what determines the text
|
|
969
|
+
highlighting when viewing a page in Confluence.
|
|
970
|
+
|
|
971
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
972
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.
|
|
973
|
+
"""
|
|
974
|
+
return cast('_t.CreateInlineCommentResponse', self._runtime.call('create_inline_comment', call_args({}, {'body': {'blog_post_id': blog_post_id, 'page_id': page_id, 'parent_comment_id': parent_comment_id, 'body': body, 'inline_comment_properties': inline_comment_properties}})))
|
|
975
|
+
|
|
976
|
+
def get_inline(self, *, comment_id: int, body_format: _t.PrimaryBodyRepresentationSingle | Unset = UNSET, version: int | Unset = UNSET, include_properties: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_likes: bool | Unset = UNSET, include_versions: bool | Unset = UNSET, include_version: bool | Unset = UNSET) -> _t.GetInlineCommentByIdResponse:
|
|
977
|
+
"""
|
|
978
|
+
Get inline comment by id
|
|
979
|
+
|
|
980
|
+
Retrieves an inline comment by id
|
|
981
|
+
|
|
982
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
983
|
+
Permission to view the content of the page or blogpost and its corresponding space.
|
|
984
|
+
"""
|
|
985
|
+
return cast('_t.GetInlineCommentByIdResponse', self._runtime.call('get_inline_comment_by_id', call_args({'comment_id': comment_id, 'body_format': body_format, 'version': version, 'include_properties': include_properties, 'include_operations': include_operations, 'include_likes': include_likes, 'include_versions': include_versions, 'include_version': include_version})))
|
|
986
|
+
|
|
987
|
+
def update_inline(self, *, comment_id: int, version: _t.UpdateInlineCommentModelVersion | Unset = UNSET, body: _t.UpdateInlineCommentModelBody | Unset = UNSET, resolved: bool | Unset = UNSET) -> _t.UpdateInlineCommentResponse:
|
|
988
|
+
"""
|
|
989
|
+
Update inline comment
|
|
990
|
+
|
|
991
|
+
Update an inline comment. This can be used to update the body text of a comment and/or to resolve the comment
|
|
992
|
+
|
|
993
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
994
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to create comments in the space.
|
|
995
|
+
"""
|
|
996
|
+
return cast('_t.UpdateInlineCommentResponse', self._runtime.call('update_inline_comment', call_args({'comment_id': comment_id}, {'body': {'version': version, 'body': body, 'resolved': resolved}})))
|
|
997
|
+
|
|
998
|
+
def delete_inline(self, *, comment_id: int) -> None:
|
|
999
|
+
"""
|
|
1000
|
+
Delete inline comment
|
|
1001
|
+
|
|
1002
|
+
Deletes an inline comment. This is a permanent deletion and cannot be reverted.
|
|
1003
|
+
|
|
1004
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1005
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to delete comments in the space.
|
|
1006
|
+
"""
|
|
1007
|
+
self._runtime.call('delete_inline_comment', call_args({'comment_id': comment_id}))
|
|
1008
|
+
|
|
1009
|
+
def get_inline_children(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, sort: _t.CommentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetInlineCommentChildrenResponse:
|
|
1010
|
+
"""
|
|
1011
|
+
Get children inline comments
|
|
1012
|
+
|
|
1013
|
+
Returns the children inline comments of specific comment. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
1014
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
1015
|
+
|
|
1016
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1017
|
+
Permission to view the content of the page and its corresponding space.
|
|
1018
|
+
"""
|
|
1019
|
+
return cast('_t.GetInlineCommentChildrenResponse', self._runtime.call('get_inline_comment_children', call_args({'id': id, 'body_format': body_format, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1020
|
+
|
|
1021
|
+
class _ContentResource:
|
|
1022
|
+
"""Operations under ``content``."""
|
|
1023
|
+
|
|
1024
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
1025
|
+
self._runtime = runtime
|
|
1026
|
+
|
|
1027
|
+
def convert_ids_to_content_types(self, *, content_ids: builtins.list[_t.ConvertContentIdsToContentTypesBodyContentIdsItem]) -> _t.ContentIdToContentTypeResponse:
|
|
1028
|
+
"""
|
|
1029
|
+
Convert content ids to content types
|
|
1030
|
+
|
|
1031
|
+
Converts a list of content ids into their associated content types. This is useful for users migrating from v1 to v2
|
|
1032
|
+
who may have stored just content ids without their associated type. This will return types as they should be used in v2.
|
|
1033
|
+
Notably, this will return `inline-comment` for inline comments and `footer-comment` for footer comments, which is distinct from them
|
|
1034
|
+
both being represented by `comment` in v1.
|
|
1035
|
+
|
|
1036
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1037
|
+
Permission to view the requested content. Any content that the user does not have permission to view or does not exist will map to `null` in the response.
|
|
1038
|
+
"""
|
|
1039
|
+
return cast('_t.ContentIdToContentTypeResponse', self._runtime.call('convert_content_ids_to_content_types', call_args({}, {'body': {'content_ids': content_ids}}, required=frozenset({'body'}))))
|
|
1040
|
+
|
|
1041
|
+
class _ContentPermissionsResource:
|
|
1042
|
+
"""Operations under ``content_permissions``."""
|
|
1043
|
+
|
|
1044
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
1045
|
+
self._runtime = runtime
|
|
1046
|
+
|
|
1047
|
+
def get_page_restriction_state(self, *, id: int) -> _t.RestrictionStateResponse:
|
|
1048
|
+
"""
|
|
1049
|
+
Get page restriction state
|
|
1050
|
+
|
|
1051
|
+
Returns the restriction state of a page.
|
|
1052
|
+
|
|
1053
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1054
|
+
Permission to view the page.
|
|
1055
|
+
"""
|
|
1056
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('get_page_restriction_state', call_args({'id': id})))
|
|
1057
|
+
|
|
1058
|
+
def set_page_restriction_state(self, *, id: int, state: _t.ContentRestrictionState, allow_self_lockout: bool | Unset = UNSET) -> _t.RestrictionStateResponse:
|
|
1059
|
+
"""
|
|
1060
|
+
Set page restriction state
|
|
1061
|
+
|
|
1062
|
+
Sets the restriction state of a page.
|
|
1063
|
+
|
|
1064
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1065
|
+
Permission to edit the page or administer the space.
|
|
1066
|
+
"""
|
|
1067
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('set_page_restriction_state', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'state': state}}, required=frozenset({'body'}))))
|
|
1068
|
+
|
|
1069
|
+
def get_blog_post_restriction_state(self, *, id: int) -> _t.RestrictionStateResponse:
|
|
1070
|
+
"""
|
|
1071
|
+
Get blog post restriction state
|
|
1072
|
+
|
|
1073
|
+
Returns the restriction state of a blog post.
|
|
1074
|
+
|
|
1075
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1076
|
+
Permission to view the blog post.
|
|
1077
|
+
"""
|
|
1078
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('get_blog_post_restriction_state', call_args({'id': id})))
|
|
1079
|
+
|
|
1080
|
+
def set_blog_post_restriction_state(self, *, id: int, state: _t.ContentRestrictionState, allow_self_lockout: bool | Unset = UNSET) -> _t.RestrictionStateResponse:
|
|
1081
|
+
"""
|
|
1082
|
+
Set blog post restriction state
|
|
1083
|
+
|
|
1084
|
+
Sets the restriction state of a blog post.
|
|
1085
|
+
|
|
1086
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1087
|
+
Permission to edit the blog post or administer the space.
|
|
1088
|
+
"""
|
|
1089
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('set_blog_post_restriction_state', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'state': state}}, required=frozenset({'body'}))))
|
|
1090
|
+
|
|
1091
|
+
def get_database_restriction_state(self, *, id: int) -> _t.RestrictionStateResponse:
|
|
1092
|
+
"""
|
|
1093
|
+
Get database restriction state
|
|
1094
|
+
|
|
1095
|
+
Returns the restriction state of a database.
|
|
1096
|
+
|
|
1097
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1098
|
+
Permission to view the database.
|
|
1099
|
+
"""
|
|
1100
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('get_database_restriction_state', call_args({'id': id})))
|
|
1101
|
+
|
|
1102
|
+
def set_database_restriction_state(self, *, id: int, state: _t.ContentRestrictionState, allow_self_lockout: bool | Unset = UNSET) -> _t.RestrictionStateResponse:
|
|
1103
|
+
"""
|
|
1104
|
+
Set database restriction state
|
|
1105
|
+
|
|
1106
|
+
Sets the restriction state of a database.
|
|
1107
|
+
|
|
1108
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1109
|
+
Permission to edit the database or administer the space.
|
|
1110
|
+
"""
|
|
1111
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('set_database_restriction_state', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'state': state}}, required=frozenset({'body'}))))
|
|
1112
|
+
|
|
1113
|
+
def get_whiteboard_restriction_state(self, *, id: int) -> _t.RestrictionStateResponse:
|
|
1114
|
+
"""
|
|
1115
|
+
Get whiteboard restriction state
|
|
1116
|
+
|
|
1117
|
+
Returns the restriction state of a whiteboard.
|
|
1118
|
+
|
|
1119
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1120
|
+
Permission to view the whiteboard.
|
|
1121
|
+
"""
|
|
1122
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('get_whiteboard_restriction_state', call_args({'id': id})))
|
|
1123
|
+
|
|
1124
|
+
def set_whiteboard_restriction_state(self, *, id: int, state: _t.ContentRestrictionState, allow_self_lockout: bool | Unset = UNSET) -> _t.RestrictionStateResponse:
|
|
1125
|
+
"""
|
|
1126
|
+
Set whiteboard restriction state
|
|
1127
|
+
|
|
1128
|
+
Sets the restriction state of a whiteboard.
|
|
1129
|
+
|
|
1130
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1131
|
+
Permission to edit the whiteboard or administer the space.
|
|
1132
|
+
"""
|
|
1133
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('set_whiteboard_restriction_state', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'state': state}}, required=frozenset({'body'}))))
|
|
1134
|
+
|
|
1135
|
+
def get_folder_restriction_state(self, *, id: int) -> _t.RestrictionStateResponse:
|
|
1136
|
+
"""
|
|
1137
|
+
Get folder restriction state
|
|
1138
|
+
|
|
1139
|
+
Returns the restriction state of a folder.
|
|
1140
|
+
|
|
1141
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1142
|
+
Permission to view the folder.
|
|
1143
|
+
"""
|
|
1144
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('get_folder_restriction_state', call_args({'id': id})))
|
|
1145
|
+
|
|
1146
|
+
def set_folder_restriction_state(self, *, id: int, state: _t.ContentRestrictionState, allow_self_lockout: bool | Unset = UNSET) -> _t.RestrictionStateResponse:
|
|
1147
|
+
"""
|
|
1148
|
+
Set folder restriction state
|
|
1149
|
+
|
|
1150
|
+
Sets the restriction state of a folder.
|
|
1151
|
+
|
|
1152
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1153
|
+
Permission to edit the folder or administer the space.
|
|
1154
|
+
"""
|
|
1155
|
+
return cast('_t.RestrictionStateResponse', self._runtime.call('set_folder_restriction_state', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'state': state}}, required=frozenset({'body'}))))
|
|
1156
|
+
|
|
1157
|
+
def list_page_permissions(self, *, id: int, operation: _t.GetPagePermissionsOperation | Unset = UNSET, principal_type: _t.GetPagePermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPagePermissionsResponse:
|
|
1158
|
+
"""
|
|
1159
|
+
Get page permissions
|
|
1160
|
+
|
|
1161
|
+
Returns the direct content permissions on a page with optional filtering by operation, principal-type, and principal-id.
|
|
1162
|
+
Results are cursor-paginated (max 250 per page).
|
|
1163
|
+
|
|
1164
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1165
|
+
Permission to view the page.
|
|
1166
|
+
"""
|
|
1167
|
+
return cast('_t.GetPagePermissionsResponse', self._runtime.call('get_page_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'cursor': cursor, 'limit': limit})))
|
|
1168
|
+
|
|
1169
|
+
def set_page_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1170
|
+
"""
|
|
1171
|
+
Set page permissions
|
|
1172
|
+
|
|
1173
|
+
Replaces all direct content permissions on a page with the provided set. Any permissions not included in the request body are removed.
|
|
1174
|
+
|
|
1175
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1176
|
+
Permission to edit the page or administer the space.
|
|
1177
|
+
"""
|
|
1178
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('set_page_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1179
|
+
|
|
1180
|
+
def add_page_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1181
|
+
"""
|
|
1182
|
+
Add page permissions
|
|
1183
|
+
|
|
1184
|
+
Adds or replaces direct content permissions for the specified principals on a page. Permissions for other principals are preserved; use `PUT` to replace all permissions at once.
|
|
1185
|
+
|
|
1186
|
+
A principal can hold only one `read` or `update` permission. Adding `read` for a principal that currently has `update` downgrades that principal to `read`; adding `update` upgrades them. If the same request contains both operations for a principal, `update` takes precedence.
|
|
1187
|
+
|
|
1188
|
+
Reasserting a principal's existing permission is idempotent and returns a successful response without creating a duplicate entry.
|
|
1189
|
+
|
|
1190
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1191
|
+
Permission to edit the page or administer the space.
|
|
1192
|
+
"""
|
|
1193
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('add_page_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1194
|
+
|
|
1195
|
+
def delete_page_permissions(self, *, id: int, operation: _t.DeletePagePermissionsOperation | Unset = UNSET, principal_type: _t.DeletePagePermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, allow_self_lockout: bool | Unset = UNSET) -> None:
|
|
1196
|
+
"""
|
|
1197
|
+
Delete page permissions
|
|
1198
|
+
|
|
1199
|
+
Deletes direct content permissions from a page. Filters narrow the deletion scope; omitting all filters deletes all direct permissions.
|
|
1200
|
+
|
|
1201
|
+
The following filter combinations are supported:
|
|
1202
|
+
- No filters: deletes all direct permissions.
|
|
1203
|
+
- `principal-type` + `principal-id`: deletes the principal's direct `read` or `update` permission.
|
|
1204
|
+
- `operation` + `principal-type` + `principal-id`: deletes the permission only when its operation matches.
|
|
1205
|
+
|
|
1206
|
+
Providing `operation` without `principal-type`/`principal-id`, or providing only one of `principal-type`/`principal-id`, returns a 400 error.
|
|
1207
|
+
|
|
1208
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1209
|
+
Permission to edit the page or administer the space.
|
|
1210
|
+
"""
|
|
1211
|
+
self._runtime.call('delete_page_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'allow_self_lockout': allow_self_lockout}))
|
|
1212
|
+
|
|
1213
|
+
def list_blog_post_permissions(self, *, id: int, operation: _t.GetBlogPostPermissionsOperation | Unset = UNSET, principal_type: _t.GetBlogPostPermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogPostPermissionsResponse:
|
|
1214
|
+
"""
|
|
1215
|
+
Get blog post permissions
|
|
1216
|
+
|
|
1217
|
+
Returns the direct content permissions on a blog post with optional filtering by operation, principal-type, and principal-id.
|
|
1218
|
+
Results are cursor-paginated (max 250 per page).
|
|
1219
|
+
|
|
1220
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1221
|
+
Permission to view the blog post.
|
|
1222
|
+
"""
|
|
1223
|
+
return cast('_t.GetBlogPostPermissionsResponse', self._runtime.call('get_blog_post_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'cursor': cursor, 'limit': limit})))
|
|
1224
|
+
|
|
1225
|
+
def set_blog_post_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1226
|
+
"""
|
|
1227
|
+
Set blog post permissions
|
|
1228
|
+
|
|
1229
|
+
Replaces all direct content permissions on a blog post with the provided set. Any permissions not included in the request body are removed.
|
|
1230
|
+
|
|
1231
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1232
|
+
Permission to edit the blog post or administer the space.
|
|
1233
|
+
"""
|
|
1234
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('set_blog_post_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1235
|
+
|
|
1236
|
+
def add_blog_post_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1237
|
+
"""
|
|
1238
|
+
Add blog post permissions
|
|
1239
|
+
|
|
1240
|
+
Adds or replaces direct content permissions for the specified principals on a blog post. Permissions for other principals are preserved; use `PUT` to replace all permissions at once.
|
|
1241
|
+
|
|
1242
|
+
A principal can hold only one `read` or `update` permission. Adding `read` for a principal that currently has `update` downgrades that principal to `read`; adding `update` upgrades them. If the same request contains both operations for a principal, `update` takes precedence.
|
|
1243
|
+
|
|
1244
|
+
Reasserting a principal's existing permission is idempotent and returns a successful response without creating a duplicate entry.
|
|
1245
|
+
|
|
1246
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1247
|
+
Permission to edit the blog post or administer the space.
|
|
1248
|
+
"""
|
|
1249
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('add_blog_post_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1250
|
+
|
|
1251
|
+
def delete_blog_post_permissions(self, *, id: int, operation: _t.DeleteBlogPostPermissionsOperation | Unset = UNSET, principal_type: _t.DeleteBlogPostPermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, allow_self_lockout: bool | Unset = UNSET) -> None:
|
|
1252
|
+
"""
|
|
1253
|
+
Delete blog post permissions
|
|
1254
|
+
|
|
1255
|
+
Deletes direct content permissions from a blog post. See `DELETE /pages/{id}/permissions` for filter semantics.
|
|
1256
|
+
|
|
1257
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1258
|
+
Permission to edit the blog post or administer the space.
|
|
1259
|
+
"""
|
|
1260
|
+
self._runtime.call('delete_blog_post_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'allow_self_lockout': allow_self_lockout}))
|
|
1261
|
+
|
|
1262
|
+
def list_database_permissions(self, *, id: int, operation: _t.GetDatabasePermissionsOperation | Unset = UNSET, principal_type: _t.GetDatabasePermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetDatabasePermissionsResponse:
|
|
1263
|
+
"""
|
|
1264
|
+
Get database permissions
|
|
1265
|
+
|
|
1266
|
+
Returns the direct content permissions on a database with optional filtering.
|
|
1267
|
+
Results are cursor-paginated (max 250 per page).
|
|
1268
|
+
|
|
1269
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1270
|
+
Permission to view the database.
|
|
1271
|
+
"""
|
|
1272
|
+
return cast('_t.GetDatabasePermissionsResponse', self._runtime.call('get_database_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'cursor': cursor, 'limit': limit})))
|
|
1273
|
+
|
|
1274
|
+
def set_database_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1275
|
+
"""
|
|
1276
|
+
Set database permissions
|
|
1277
|
+
|
|
1278
|
+
Replaces all direct content permissions on a database with the provided set.
|
|
1279
|
+
|
|
1280
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1281
|
+
Permission to edit the database or administer the space.
|
|
1282
|
+
"""
|
|
1283
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('set_database_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1284
|
+
|
|
1285
|
+
def add_database_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1286
|
+
"""
|
|
1287
|
+
Add database permissions
|
|
1288
|
+
|
|
1289
|
+
Adds or replaces direct content permissions for the specified principals on a database. Permissions for other principals are preserved; use `PUT` to replace all permissions at once.
|
|
1290
|
+
|
|
1291
|
+
A principal can hold only one `read` or `update` permission. Adding `read` for a principal that currently has `update` downgrades that principal to `read`; adding `update` upgrades them. If the same request contains both operations for a principal, `update` takes precedence.
|
|
1292
|
+
|
|
1293
|
+
Reasserting a principal's existing permission is idempotent and returns a successful response without creating a duplicate entry.
|
|
1294
|
+
|
|
1295
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1296
|
+
Permission to edit the database or administer the space.
|
|
1297
|
+
"""
|
|
1298
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('add_database_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1299
|
+
|
|
1300
|
+
def delete_database_permissions(self, *, id: int, operation: _t.DeleteDatabasePermissionsOperation | Unset = UNSET, principal_type: _t.DeleteDatabasePermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, allow_self_lockout: bool | Unset = UNSET) -> None:
|
|
1301
|
+
"""
|
|
1302
|
+
Delete database permissions
|
|
1303
|
+
|
|
1304
|
+
Deletes direct content permissions from a database. See `DELETE /pages/{id}/permissions` for filter semantics.
|
|
1305
|
+
|
|
1306
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1307
|
+
Permission to edit the database or administer the space.
|
|
1308
|
+
"""
|
|
1309
|
+
self._runtime.call('delete_database_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'allow_self_lockout': allow_self_lockout}))
|
|
1310
|
+
|
|
1311
|
+
def list_whiteboard_permissions(self, *, id: int, operation: _t.GetWhiteboardPermissionsOperation | Unset = UNSET, principal_type: _t.GetWhiteboardPermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetWhiteboardPermissionsResponse:
|
|
1312
|
+
"""
|
|
1313
|
+
Get whiteboard permissions
|
|
1314
|
+
|
|
1315
|
+
Returns the direct content permissions on a whiteboard with optional filtering.
|
|
1316
|
+
Results are cursor-paginated (max 250 per page).
|
|
1317
|
+
|
|
1318
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1319
|
+
Permission to view the whiteboard.
|
|
1320
|
+
"""
|
|
1321
|
+
return cast('_t.GetWhiteboardPermissionsResponse', self._runtime.call('get_whiteboard_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'cursor': cursor, 'limit': limit})))
|
|
1322
|
+
|
|
1323
|
+
def set_whiteboard_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1324
|
+
"""
|
|
1325
|
+
Set whiteboard permissions
|
|
1326
|
+
|
|
1327
|
+
Replaces all direct content permissions on a whiteboard with the provided set.
|
|
1328
|
+
|
|
1329
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1330
|
+
Permission to edit the whiteboard or administer the space.
|
|
1331
|
+
"""
|
|
1332
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('set_whiteboard_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1333
|
+
|
|
1334
|
+
def add_whiteboard_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1335
|
+
"""
|
|
1336
|
+
Add whiteboard permissions
|
|
1337
|
+
|
|
1338
|
+
Adds or replaces direct content permissions for the specified principals on a whiteboard. Permissions for other principals are preserved; use `PUT` to replace all permissions at once.
|
|
1339
|
+
|
|
1340
|
+
A principal can hold only one `read` or `update` permission. Adding `read` for a principal that currently has `update` downgrades that principal to `read`; adding `update` upgrades them. If the same request contains both operations for a principal, `update` takes precedence.
|
|
1341
|
+
|
|
1342
|
+
Reasserting a principal's existing permission is idempotent and returns a successful response without creating a duplicate entry.
|
|
1343
|
+
|
|
1344
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1345
|
+
Permission to edit the whiteboard or administer the space.
|
|
1346
|
+
"""
|
|
1347
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('add_whiteboard_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1348
|
+
|
|
1349
|
+
def delete_whiteboard_permissions(self, *, id: int, operation: _t.DeleteWhiteboardPermissionsOperation | Unset = UNSET, principal_type: _t.DeleteWhiteboardPermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, allow_self_lockout: bool | Unset = UNSET) -> None:
|
|
1350
|
+
"""
|
|
1351
|
+
Delete whiteboard permissions
|
|
1352
|
+
|
|
1353
|
+
Deletes direct content permissions from a whiteboard. See `DELETE /pages/{id}/permissions` for filter semantics.
|
|
1354
|
+
|
|
1355
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1356
|
+
Permission to edit the whiteboard or administer the space.
|
|
1357
|
+
"""
|
|
1358
|
+
self._runtime.call('delete_whiteboard_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'allow_self_lockout': allow_self_lockout}))
|
|
1359
|
+
|
|
1360
|
+
def list_folder_permissions(self, *, id: int, operation: _t.GetFolderPermissionsOperation | Unset = UNSET, principal_type: _t.GetFolderPermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetFolderPermissionsResponse:
|
|
1361
|
+
"""
|
|
1362
|
+
Get folder permissions
|
|
1363
|
+
|
|
1364
|
+
Returns the direct content permissions on a folder with optional filtering.
|
|
1365
|
+
Results are cursor-paginated (max 250 per page).
|
|
1366
|
+
|
|
1367
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1368
|
+
Permission to view the folder.
|
|
1369
|
+
"""
|
|
1370
|
+
return cast('_t.GetFolderPermissionsResponse', self._runtime.call('get_folder_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'cursor': cursor, 'limit': limit})))
|
|
1371
|
+
|
|
1372
|
+
def set_folder_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1373
|
+
"""
|
|
1374
|
+
Set folder permissions
|
|
1375
|
+
|
|
1376
|
+
Replaces all direct content permissions on a folder with the provided set.
|
|
1377
|
+
|
|
1378
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1379
|
+
Permission to edit the folder or administer the space.
|
|
1380
|
+
"""
|
|
1381
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('set_folder_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1382
|
+
|
|
1383
|
+
def add_folder_permissions(self, *, id: int, permissions: builtins.list[_t.OperationPermissionsInput], allow_self_lockout: bool | Unset = UNSET) -> _t.ContentPermissionsResponse:
|
|
1384
|
+
"""
|
|
1385
|
+
Add folder permissions
|
|
1386
|
+
|
|
1387
|
+
Adds or replaces direct content permissions for the specified principals on a folder. Permissions for other principals are preserved; use `PUT` to replace all permissions at once.
|
|
1388
|
+
|
|
1389
|
+
A principal can hold only one `read` or `update` permission. Adding `read` for a principal that currently has `update` downgrades that principal to `read`; adding `update` upgrades them. If the same request contains both operations for a principal, `update` takes precedence.
|
|
1390
|
+
|
|
1391
|
+
Reasserting a principal's existing permission is idempotent and returns a successful response without creating a duplicate entry.
|
|
1392
|
+
|
|
1393
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1394
|
+
Permission to edit the folder or administer the space.
|
|
1395
|
+
"""
|
|
1396
|
+
return cast('_t.ContentPermissionsResponse', self._runtime.call('add_folder_permissions', call_args({'id': id, 'allow_self_lockout': allow_self_lockout}, {'body': {'permissions': permissions}}, required=frozenset({'body'}))))
|
|
1397
|
+
|
|
1398
|
+
def delete_folder_permissions(self, *, id: int, operation: _t.DeleteFolderPermissionsOperation | Unset = UNSET, principal_type: _t.DeleteFolderPermissionsPrincipalType | Unset = UNSET, principal_id: str | Unset = UNSET, allow_self_lockout: bool | Unset = UNSET) -> None:
|
|
1399
|
+
"""
|
|
1400
|
+
Delete folder permissions
|
|
1401
|
+
|
|
1402
|
+
Deletes direct content permissions from a folder. See `DELETE /pages/{id}/permissions` for filter semantics.
|
|
1403
|
+
|
|
1404
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1405
|
+
Permission to edit the folder or administer the space.
|
|
1406
|
+
"""
|
|
1407
|
+
self._runtime.call('delete_folder_permissions', call_args({'id': id, 'operation': operation, 'principal_type': principal_type, 'principal_id': principal_id, 'allow_self_lockout': allow_self_lockout}))
|
|
1408
|
+
|
|
1409
|
+
class _ContentPropertiesResource:
|
|
1410
|
+
"""Operations under ``content_properties``."""
|
|
1411
|
+
|
|
1412
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
1413
|
+
self._runtime = runtime
|
|
1414
|
+
|
|
1415
|
+
def list_attachment(self, *, attachment_id: str, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetAttachmentContentPropertiesResponse:
|
|
1416
|
+
"""
|
|
1417
|
+
Get content properties for attachment
|
|
1418
|
+
|
|
1419
|
+
Retrieves all Content Properties tied to a specified attachment.
|
|
1420
|
+
|
|
1421
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1422
|
+
Permission to view the attachment.
|
|
1423
|
+
"""
|
|
1424
|
+
return cast('_t.GetAttachmentContentPropertiesResponse', self._runtime.call('get_attachment_content_properties', call_args({'attachment_id': attachment_id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1425
|
+
|
|
1426
|
+
def create_attachment_property(self, *, attachment_id: str, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1427
|
+
"""
|
|
1428
|
+
Create content property for attachment
|
|
1429
|
+
|
|
1430
|
+
Creates a new content property for an attachment.
|
|
1431
|
+
|
|
1432
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1433
|
+
Permission to update the attachment.
|
|
1434
|
+
"""
|
|
1435
|
+
return cast('_t.ContentProperty', self._runtime.call('create_attachment_property', call_args({'attachment_id': attachment_id}, {'body': {'key': key, 'value': value}})))
|
|
1436
|
+
|
|
1437
|
+
def get_attachment_by_id(self, *, attachment_id: str, property_id: int) -> _t.ContentProperty:
|
|
1438
|
+
"""
|
|
1439
|
+
Get content property for attachment by id
|
|
1440
|
+
|
|
1441
|
+
Retrieves a specific Content Property by ID that is attached to a specified attachment.
|
|
1442
|
+
|
|
1443
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1444
|
+
Permission to view the attachment.
|
|
1445
|
+
"""
|
|
1446
|
+
return cast('_t.ContentProperty', self._runtime.call('get_attachment_content_properties_by_id', call_args({'attachment_id': attachment_id, 'property_id': property_id})))
|
|
1447
|
+
|
|
1448
|
+
def update_attachment_property(self, *, attachment_id: str, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1449
|
+
"""
|
|
1450
|
+
Update content property for attachment by id
|
|
1451
|
+
|
|
1452
|
+
Update a content property for attachment by its id.
|
|
1453
|
+
|
|
1454
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1455
|
+
Permission to edit the attachment.
|
|
1456
|
+
"""
|
|
1457
|
+
return cast('_t.ContentProperty', self._runtime.call('update_attachment_property_by_id', call_args({'attachment_id': attachment_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1458
|
+
|
|
1459
|
+
def delete_attachment_property(self, *, attachment_id: str, property_id: int) -> None:
|
|
1460
|
+
"""
|
|
1461
|
+
Delete content property for attachment by id
|
|
1462
|
+
|
|
1463
|
+
Deletes a content property for an attachment by its id.
|
|
1464
|
+
|
|
1465
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1466
|
+
Permission to attachment the page.
|
|
1467
|
+
"""
|
|
1468
|
+
self._runtime.call('delete_attachment_property_by_id', call_args({'attachment_id': attachment_id, 'property_id': property_id}))
|
|
1469
|
+
|
|
1470
|
+
def list_blogpost(self, *, blogpost_id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogpostContentPropertiesResponse:
|
|
1471
|
+
"""
|
|
1472
|
+
Get content properties for blog post
|
|
1473
|
+
|
|
1474
|
+
Retrieves all Content Properties tied to a specified blog post.
|
|
1475
|
+
|
|
1476
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1477
|
+
Permission to view the blog post.
|
|
1478
|
+
"""
|
|
1479
|
+
return cast('_t.GetBlogpostContentPropertiesResponse', self._runtime.call('get_blogpost_content_properties', call_args({'blogpost_id': blogpost_id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1480
|
+
|
|
1481
|
+
def create_blogpost_property(self, *, blogpost_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1482
|
+
"""
|
|
1483
|
+
Create content property for blog post
|
|
1484
|
+
|
|
1485
|
+
Creates a new property for a blogpost.
|
|
1486
|
+
|
|
1487
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1488
|
+
Permission to update the blog post.
|
|
1489
|
+
"""
|
|
1490
|
+
return cast('_t.ContentProperty', self._runtime.call('create_blogpost_property', call_args({'blogpost_id': blogpost_id}, {'body': {'key': key, 'value': value}})))
|
|
1491
|
+
|
|
1492
|
+
def get_blogpost_by_id(self, *, blogpost_id: int, property_id: int) -> _t.ContentProperty:
|
|
1493
|
+
"""
|
|
1494
|
+
Get content property for blog post by id
|
|
1495
|
+
|
|
1496
|
+
Retrieves a specific Content Property by ID that is attached to a specified blog post.
|
|
1497
|
+
|
|
1498
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1499
|
+
Permission to view the blog post.
|
|
1500
|
+
"""
|
|
1501
|
+
return cast('_t.ContentProperty', self._runtime.call('get_blogpost_content_properties_by_id', call_args({'blogpost_id': blogpost_id, 'property_id': property_id})))
|
|
1502
|
+
|
|
1503
|
+
def update_blogpost_property(self, *, blogpost_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1504
|
+
"""
|
|
1505
|
+
Update content property for blog post by id
|
|
1506
|
+
|
|
1507
|
+
Update a content property for blog post by its id.
|
|
1508
|
+
|
|
1509
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1510
|
+
Permission to edit the blog post.
|
|
1511
|
+
"""
|
|
1512
|
+
return cast('_t.ContentProperty', self._runtime.call('update_blogpost_property_by_id', call_args({'blogpost_id': blogpost_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1513
|
+
|
|
1514
|
+
def delete_blogpost_property(self, *, blogpost_id: int, property_id: int) -> None:
|
|
1515
|
+
"""
|
|
1516
|
+
Delete content property for blogpost by id
|
|
1517
|
+
|
|
1518
|
+
Deletes a content property for a blogpost by its id.
|
|
1519
|
+
|
|
1520
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1521
|
+
Permission to edit the blog post.
|
|
1522
|
+
"""
|
|
1523
|
+
self._runtime.call('delete_blogpost_property_by_id', call_args({'blogpost_id': blogpost_id, 'property_id': property_id}))
|
|
1524
|
+
|
|
1525
|
+
def list_custom_content(self, *, custom_content_id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetCustomContentContentPropertiesResponse:
|
|
1526
|
+
"""
|
|
1527
|
+
Get content properties for custom content
|
|
1528
|
+
|
|
1529
|
+
Retrieves Content Properties tied to a specified custom content.
|
|
1530
|
+
|
|
1531
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1532
|
+
Permission to view the custom content.
|
|
1533
|
+
"""
|
|
1534
|
+
return cast('_t.GetCustomContentContentPropertiesResponse', self._runtime.call('get_custom_content_content_properties', call_args({'custom_content_id': custom_content_id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1535
|
+
|
|
1536
|
+
def create(self, *, custom_content_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1537
|
+
"""
|
|
1538
|
+
Create content property for custom content
|
|
1539
|
+
|
|
1540
|
+
Creates a new content property for a piece of custom content.
|
|
1541
|
+
|
|
1542
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1543
|
+
Permission to update the custom content.
|
|
1544
|
+
"""
|
|
1545
|
+
return cast('_t.ContentProperty', self._runtime.call('create_custom_content_property', call_args({'custom_content_id': custom_content_id}, {'body': {'key': key, 'value': value}})))
|
|
1546
|
+
|
|
1547
|
+
def get_custom_content_by_id(self, *, custom_content_id: int, property_id: int) -> _t.ContentProperty:
|
|
1548
|
+
"""
|
|
1549
|
+
Get content property for custom content by id
|
|
1550
|
+
|
|
1551
|
+
Retrieves a specific Content Property by ID that is attached to a specified custom content.
|
|
1552
|
+
|
|
1553
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1554
|
+
Permission to view the page.
|
|
1555
|
+
"""
|
|
1556
|
+
return cast('_t.ContentProperty', self._runtime.call('get_custom_content_content_properties_by_id', call_args({'custom_content_id': custom_content_id, 'property_id': property_id})))
|
|
1557
|
+
|
|
1558
|
+
def update(self, *, custom_content_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1559
|
+
"""
|
|
1560
|
+
Update content property for custom content by id
|
|
1561
|
+
|
|
1562
|
+
Update a content property for a piece of custom content by its id.
|
|
1563
|
+
|
|
1564
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1565
|
+
Permission to edit the custom content.
|
|
1566
|
+
"""
|
|
1567
|
+
return cast('_t.ContentProperty', self._runtime.call('update_custom_content_property_by_id', call_args({'custom_content_id': custom_content_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1568
|
+
|
|
1569
|
+
def delete(self, *, custom_content_id: int, property_id: int) -> None:
|
|
1570
|
+
"""
|
|
1571
|
+
Delete content property for custom content by id
|
|
1572
|
+
|
|
1573
|
+
Deletes a content property for a piece of custom content by its id.
|
|
1574
|
+
|
|
1575
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1576
|
+
Permission to edit the custom content.
|
|
1577
|
+
"""
|
|
1578
|
+
self._runtime.call('delete_custom_content_property_by_id', call_args({'custom_content_id': custom_content_id, 'property_id': property_id}))
|
|
1579
|
+
|
|
1580
|
+
def list_page(self, *, page_id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPageContentPropertiesResponse:
|
|
1581
|
+
"""
|
|
1582
|
+
Get content properties for page
|
|
1583
|
+
|
|
1584
|
+
Retrieves Content Properties tied to a specified page.
|
|
1585
|
+
|
|
1586
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1587
|
+
Permission to view the page.
|
|
1588
|
+
"""
|
|
1589
|
+
return cast('_t.GetPageContentPropertiesResponse', self._runtime.call('get_page_content_properties', call_args({'page_id': page_id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1590
|
+
|
|
1591
|
+
def create_page_property(self, *, page_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1592
|
+
"""
|
|
1593
|
+
Create content property for page
|
|
1594
|
+
|
|
1595
|
+
Creates a new content property for a page.
|
|
1596
|
+
|
|
1597
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1598
|
+
Permission to update the page.
|
|
1599
|
+
"""
|
|
1600
|
+
return cast('_t.ContentProperty', self._runtime.call('create_page_property', call_args({'page_id': page_id}, {'body': {'key': key, 'value': value}})))
|
|
1601
|
+
|
|
1602
|
+
def get_page_by_id(self, *, page_id: int, property_id: int) -> _t.ContentProperty:
|
|
1603
|
+
"""
|
|
1604
|
+
Get content property for page by id
|
|
1605
|
+
|
|
1606
|
+
Retrieves a specific Content Property by ID that is attached to a specified page.
|
|
1607
|
+
|
|
1608
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1609
|
+
Permission to view the page.
|
|
1610
|
+
"""
|
|
1611
|
+
return cast('_t.ContentProperty', self._runtime.call('get_page_content_properties_by_id', call_args({'page_id': page_id, 'property_id': property_id})))
|
|
1612
|
+
|
|
1613
|
+
def update_page_property(self, *, page_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1614
|
+
"""
|
|
1615
|
+
Update content property for page by id
|
|
1616
|
+
|
|
1617
|
+
Update a content property for a page by its id.
|
|
1618
|
+
|
|
1619
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1620
|
+
Permission to edit the page.
|
|
1621
|
+
"""
|
|
1622
|
+
return cast('_t.ContentProperty', self._runtime.call('update_page_property_by_id', call_args({'page_id': page_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1623
|
+
|
|
1624
|
+
def delete_page_property(self, *, page_id: int, property_id: int) -> None:
|
|
1625
|
+
"""
|
|
1626
|
+
Delete content property for page by id
|
|
1627
|
+
|
|
1628
|
+
Deletes a content property for a page by its id.
|
|
1629
|
+
|
|
1630
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1631
|
+
Permission to edit the page.
|
|
1632
|
+
"""
|
|
1633
|
+
self._runtime.call('delete_page_property_by_id', call_args({'page_id': page_id, 'property_id': property_id}))
|
|
1634
|
+
|
|
1635
|
+
def list_whiteboard(self, *, id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetWhiteboardContentPropertiesResponse:
|
|
1636
|
+
"""
|
|
1637
|
+
Get content properties for whiteboard
|
|
1638
|
+
|
|
1639
|
+
Retrieves Content Properties tied to a specified whiteboard.
|
|
1640
|
+
|
|
1641
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1642
|
+
Permission to view the whiteboard.
|
|
1643
|
+
"""
|
|
1644
|
+
return cast('_t.GetWhiteboardContentPropertiesResponse', self._runtime.call('get_whiteboard_content_properties', call_args({'id': id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1645
|
+
|
|
1646
|
+
def create_whiteboard_property(self, *, id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1647
|
+
"""
|
|
1648
|
+
Create content property for whiteboard
|
|
1649
|
+
|
|
1650
|
+
Creates a new content property for a whiteboard.
|
|
1651
|
+
|
|
1652
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1653
|
+
Permission to update the whiteboard.
|
|
1654
|
+
"""
|
|
1655
|
+
return cast('_t.ContentProperty', self._runtime.call('create_whiteboard_property', call_args({'id': id}, {'body': {'key': key, 'value': value}})))
|
|
1656
|
+
|
|
1657
|
+
def get_whiteboard_by_id(self, *, whiteboard_id: int, property_id: int) -> _t.ContentProperty:
|
|
1658
|
+
"""
|
|
1659
|
+
Get content property for whiteboard by id
|
|
1660
|
+
|
|
1661
|
+
Retrieves a specific Content Property by ID that is attached to a specified whiteboard.
|
|
1662
|
+
|
|
1663
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1664
|
+
Permission to view the whiteboard.
|
|
1665
|
+
"""
|
|
1666
|
+
return cast('_t.ContentProperty', self._runtime.call('get_whiteboard_content_properties_by_id', call_args({'whiteboard_id': whiteboard_id, 'property_id': property_id})))
|
|
1667
|
+
|
|
1668
|
+
def update_whiteboard_property(self, *, whiteboard_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1669
|
+
"""
|
|
1670
|
+
Update content property for whiteboard by id
|
|
1671
|
+
|
|
1672
|
+
Update a content property for a whiteboard by its id.
|
|
1673
|
+
|
|
1674
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1675
|
+
Permission to edit the whiteboard.
|
|
1676
|
+
"""
|
|
1677
|
+
return cast('_t.ContentProperty', self._runtime.call('update_whiteboard_property_by_id', call_args({'whiteboard_id': whiteboard_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1678
|
+
|
|
1679
|
+
def delete_whiteboard_property(self, *, whiteboard_id: int, property_id: int) -> None:
|
|
1680
|
+
"""
|
|
1681
|
+
Delete content property for whiteboard by id
|
|
1682
|
+
|
|
1683
|
+
Deletes a content property for a whiteboard by its id.
|
|
1684
|
+
|
|
1685
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1686
|
+
Permission to edit the whiteboard.
|
|
1687
|
+
"""
|
|
1688
|
+
self._runtime.call('delete_whiteboard_property_by_id', call_args({'whiteboard_id': whiteboard_id, 'property_id': property_id}))
|
|
1689
|
+
|
|
1690
|
+
def list_database(self, *, id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetDatabaseContentPropertiesResponse:
|
|
1691
|
+
"""
|
|
1692
|
+
Get content properties for database
|
|
1693
|
+
|
|
1694
|
+
Retrieves Content Properties tied to a specified database.
|
|
1695
|
+
|
|
1696
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1697
|
+
Permission to view the database.
|
|
1698
|
+
"""
|
|
1699
|
+
return cast('_t.GetDatabaseContentPropertiesResponse', self._runtime.call('get_database_content_properties', call_args({'id': id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1700
|
+
|
|
1701
|
+
def create_database_property(self, *, id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1702
|
+
"""
|
|
1703
|
+
Create content property for database
|
|
1704
|
+
|
|
1705
|
+
Creates a new content property for a database.
|
|
1706
|
+
|
|
1707
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1708
|
+
Permission to update the database.
|
|
1709
|
+
"""
|
|
1710
|
+
return cast('_t.ContentProperty', self._runtime.call('create_database_property', call_args({'id': id}, {'body': {'key': key, 'value': value}})))
|
|
1711
|
+
|
|
1712
|
+
def get_database_by_id(self, *, database_id: int, property_id: int) -> _t.ContentProperty:
|
|
1713
|
+
"""
|
|
1714
|
+
Get content property for database by id
|
|
1715
|
+
|
|
1716
|
+
Retrieves a specific Content Property by ID that is attached to a specified database.
|
|
1717
|
+
|
|
1718
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1719
|
+
Permission to view the database.
|
|
1720
|
+
"""
|
|
1721
|
+
return cast('_t.ContentProperty', self._runtime.call('get_database_content_properties_by_id', call_args({'database_id': database_id, 'property_id': property_id})))
|
|
1722
|
+
|
|
1723
|
+
def update_database_property(self, *, database_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1724
|
+
"""
|
|
1725
|
+
Update content property for database by id
|
|
1726
|
+
|
|
1727
|
+
Update a content property for a database by its id.
|
|
1728
|
+
|
|
1729
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1730
|
+
Permission to edit the database.
|
|
1731
|
+
"""
|
|
1732
|
+
return cast('_t.ContentProperty', self._runtime.call('update_database_property_by_id', call_args({'database_id': database_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1733
|
+
|
|
1734
|
+
def delete_database_property(self, *, database_id: int, property_id: int) -> None:
|
|
1735
|
+
"""
|
|
1736
|
+
Delete content property for database by id
|
|
1737
|
+
|
|
1738
|
+
Deletes a content property for a database by its id.
|
|
1739
|
+
|
|
1740
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1741
|
+
Permission to edit the database.
|
|
1742
|
+
"""
|
|
1743
|
+
self._runtime.call('delete_database_property_by_id', call_args({'database_id': database_id, 'property_id': property_id}))
|
|
1744
|
+
|
|
1745
|
+
def list_smart_link(self, *, id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetSmartLinkContentPropertiesResponse:
|
|
1746
|
+
"""
|
|
1747
|
+
Get content properties for Smart Link in the content tree
|
|
1748
|
+
|
|
1749
|
+
Retrieves Content Properties tied to a specified Smart Link in the content tree.
|
|
1750
|
+
|
|
1751
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1752
|
+
Permission to view the Smart Link in the content tree.
|
|
1753
|
+
"""
|
|
1754
|
+
return cast('_t.GetSmartLinkContentPropertiesResponse', self._runtime.call('get_smart_link_content_properties', call_args({'id': id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1755
|
+
|
|
1756
|
+
def create_smart_link_property(self, *, id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1757
|
+
"""
|
|
1758
|
+
Create content property for Smart Link in the content tree
|
|
1759
|
+
|
|
1760
|
+
Creates a new content property for a Smart Link in the content tree.
|
|
1761
|
+
|
|
1762
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1763
|
+
Permission to update the Smart Link in the content tree.
|
|
1764
|
+
"""
|
|
1765
|
+
return cast('_t.ContentProperty', self._runtime.call('create_smart_link_property', call_args({'id': id}, {'body': {'key': key, 'value': value}})))
|
|
1766
|
+
|
|
1767
|
+
def get_smart_link_by_id(self, *, embed_id: int, property_id: int) -> _t.ContentProperty:
|
|
1768
|
+
"""
|
|
1769
|
+
Get content property for Smart Link in the content tree by id
|
|
1770
|
+
|
|
1771
|
+
Retrieves a specific Content Property by ID that is attached to a specified Smart Link in the content tree.
|
|
1772
|
+
|
|
1773
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1774
|
+
Permission to view the Smart Link in the content tree.
|
|
1775
|
+
"""
|
|
1776
|
+
return cast('_t.ContentProperty', self._runtime.call('get_smart_link_content_properties_by_id', call_args({'embed_id': embed_id, 'property_id': property_id})))
|
|
1777
|
+
|
|
1778
|
+
def update_smart_link_property(self, *, embed_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1779
|
+
"""
|
|
1780
|
+
Update content property for Smart Link in the content tree by id
|
|
1781
|
+
|
|
1782
|
+
Update a content property for a Smart Link in the content tree by its id.
|
|
1783
|
+
|
|
1784
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1785
|
+
Permission to edit the Smart Link in the content tree.
|
|
1786
|
+
"""
|
|
1787
|
+
return cast('_t.ContentProperty', self._runtime.call('update_smart_link_property_by_id', call_args({'embed_id': embed_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1788
|
+
|
|
1789
|
+
def delete_smart_link_property(self, *, embed_id: int, property_id: int) -> None:
|
|
1790
|
+
"""
|
|
1791
|
+
Delete content property for Smart Link in the content tree by id
|
|
1792
|
+
|
|
1793
|
+
Deletes a content property for a Smart Link in the content tree by its id.
|
|
1794
|
+
|
|
1795
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1796
|
+
Permission to edit the Smart Link in the content tree.
|
|
1797
|
+
"""
|
|
1798
|
+
self._runtime.call('delete_smart_link_property_by_id', call_args({'embed_id': embed_id, 'property_id': property_id}))
|
|
1799
|
+
|
|
1800
|
+
def list_folder(self, *, id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetFolderContentPropertiesResponse:
|
|
1801
|
+
"""
|
|
1802
|
+
Get content properties for folder
|
|
1803
|
+
|
|
1804
|
+
Retrieves Content Properties tied to a specified folder.
|
|
1805
|
+
|
|
1806
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1807
|
+
Permission to view the folder.
|
|
1808
|
+
"""
|
|
1809
|
+
return cast('_t.GetFolderContentPropertiesResponse', self._runtime.call('get_folder_content_properties', call_args({'id': id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1810
|
+
|
|
1811
|
+
def create_folder_property(self, *, id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1812
|
+
"""
|
|
1813
|
+
Create content property for folder
|
|
1814
|
+
|
|
1815
|
+
Creates a new content property for a folder.
|
|
1816
|
+
|
|
1817
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1818
|
+
Permission to update the folder.
|
|
1819
|
+
"""
|
|
1820
|
+
return cast('_t.ContentProperty', self._runtime.call('create_folder_property', call_args({'id': id}, {'body': {'key': key, 'value': value}})))
|
|
1821
|
+
|
|
1822
|
+
def get_folder_by_id(self, *, folder_id: int, property_id: int) -> _t.ContentProperty:
|
|
1823
|
+
"""
|
|
1824
|
+
Get content property for folder by id
|
|
1825
|
+
|
|
1826
|
+
Retrieves a specific Content Property by ID that is attached to a specified folder.
|
|
1827
|
+
|
|
1828
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1829
|
+
Permission to view the folder.
|
|
1830
|
+
"""
|
|
1831
|
+
return cast('_t.ContentProperty', self._runtime.call('get_folder_content_properties_by_id', call_args({'folder_id': folder_id, 'property_id': property_id})))
|
|
1832
|
+
|
|
1833
|
+
def update_folder_property(self, *, folder_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1834
|
+
"""
|
|
1835
|
+
Update content property for folder by id
|
|
1836
|
+
|
|
1837
|
+
Update a content property for a folder by its id.
|
|
1838
|
+
|
|
1839
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1840
|
+
Permission to edit the folder.
|
|
1841
|
+
"""
|
|
1842
|
+
return cast('_t.ContentProperty', self._runtime.call('update_folder_property_by_id', call_args({'folder_id': folder_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1843
|
+
|
|
1844
|
+
def delete_folder_property(self, *, folder_id: int, property_id: int) -> None:
|
|
1845
|
+
"""
|
|
1846
|
+
Delete content property for folder by id
|
|
1847
|
+
|
|
1848
|
+
Deletes a content property for a folder by its id.
|
|
1849
|
+
|
|
1850
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1851
|
+
Permission to edit the folder.
|
|
1852
|
+
"""
|
|
1853
|
+
self._runtime.call('delete_folder_property_by_id', call_args({'folder_id': folder_id, 'property_id': property_id}))
|
|
1854
|
+
|
|
1855
|
+
def list_comment(self, *, comment_id: int, key: str | Unset = UNSET, sort: _t.ContentPropertySortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetCommentContentPropertiesResponse:
|
|
1856
|
+
"""
|
|
1857
|
+
Get content properties for comment
|
|
1858
|
+
|
|
1859
|
+
Retrieves Content Properties attached to a specified comment.
|
|
1860
|
+
|
|
1861
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1862
|
+
Permission to view the comment.
|
|
1863
|
+
"""
|
|
1864
|
+
return cast('_t.GetCommentContentPropertiesResponse', self._runtime.call('get_comment_content_properties', call_args({'comment_id': comment_id, 'key': key, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
1865
|
+
|
|
1866
|
+
def create_comment_property(self, *, comment_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.ContentProperty:
|
|
1867
|
+
"""
|
|
1868
|
+
Create content property for comment
|
|
1869
|
+
|
|
1870
|
+
Creates a new content property for a comment.
|
|
1871
|
+
|
|
1872
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1873
|
+
Permission to update the comment.
|
|
1874
|
+
"""
|
|
1875
|
+
return cast('_t.ContentProperty', self._runtime.call('create_comment_property', call_args({'comment_id': comment_id}, {'body': {'key': key, 'value': value}})))
|
|
1876
|
+
|
|
1877
|
+
def get_comment_by_id(self, *, comment_id: int, property_id: int) -> _t.ContentProperty:
|
|
1878
|
+
"""
|
|
1879
|
+
Get content property for comment by id
|
|
1880
|
+
|
|
1881
|
+
Retrieves a specific Content Property by ID that is attached to a specified comment.
|
|
1882
|
+
|
|
1883
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1884
|
+
Permission to view the comment.
|
|
1885
|
+
"""
|
|
1886
|
+
return cast('_t.ContentProperty', self._runtime.call('get_comment_content_properties_by_id', call_args({'comment_id': comment_id, 'property_id': property_id})))
|
|
1887
|
+
|
|
1888
|
+
def update_comment_property(self, *, comment_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.ContentPropertyUpdateRequestVersion | Unset = UNSET) -> _t.ContentProperty:
|
|
1889
|
+
"""
|
|
1890
|
+
Update content property for comment by id
|
|
1891
|
+
|
|
1892
|
+
Update a content property for a comment by its id.
|
|
1893
|
+
|
|
1894
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1895
|
+
Permission to edit the comment.
|
|
1896
|
+
"""
|
|
1897
|
+
return cast('_t.ContentProperty', self._runtime.call('update_comment_property_by_id', call_args({'comment_id': comment_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
1898
|
+
|
|
1899
|
+
def delete_comment_property(self, *, comment_id: int, property_id: int) -> None:
|
|
1900
|
+
"""
|
|
1901
|
+
Delete content property for comment by id
|
|
1902
|
+
|
|
1903
|
+
Deletes a content property for a comment by its id.
|
|
1904
|
+
|
|
1905
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1906
|
+
Permission to edit the comment.
|
|
1907
|
+
"""
|
|
1908
|
+
self._runtime.call('delete_comment_property_by_id', call_args({'comment_id': comment_id, 'property_id': property_id}))
|
|
1909
|
+
|
|
1910
|
+
class _CustomContentResource:
|
|
1911
|
+
"""Operations under ``custom_content``."""
|
|
1912
|
+
|
|
1913
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
1914
|
+
self._runtime = runtime
|
|
1915
|
+
|
|
1916
|
+
def get_by_type_in_blog_post(self, *, id: int, type_: str, sort: _t.CustomContentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, body_format: _t.CustomContentBodyRepresentation | Unset = UNSET) -> _t.GetCustomContentByTypeInBlogPostResponse:
|
|
1917
|
+
"""
|
|
1918
|
+
Get custom content by type in blog post
|
|
1919
|
+
|
|
1920
|
+
Returns all custom content for a given type within a given blogpost. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
1921
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
1922
|
+
|
|
1923
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1924
|
+
Permission to view the custom content, the container of the custom content (blog post), and the corresponding space.
|
|
1925
|
+
"""
|
|
1926
|
+
return cast('_t.GetCustomContentByTypeInBlogPostResponse', self._runtime.call('get_custom_content_by_type_in_blog_post', call_args({'id': id, 'type': type_, 'sort': sort, 'cursor': cursor, 'limit': limit, 'body_format': body_format})))
|
|
1927
|
+
|
|
1928
|
+
def get_by_type(self, *, type_: str, id: builtins.list[int] | Unset = UNSET, space_id: builtins.list[int] | Unset = UNSET, sort: _t.CustomContentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, body_format: _t.CustomContentBodyRepresentation | Unset = UNSET) -> _t.GetCustomContentByTypeResponse:
|
|
1929
|
+
"""
|
|
1930
|
+
Get custom content by type
|
|
1931
|
+
|
|
1932
|
+
Returns all custom content for a given type. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
1933
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
1934
|
+
|
|
1935
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1936
|
+
Permission to view the custom content, the container of the custom content, and the corresponding space (if different from the container).
|
|
1937
|
+
"""
|
|
1938
|
+
return cast('_t.GetCustomContentByTypeResponse', self._runtime.call('get_custom_content_by_type', call_args({'type': type_, 'id': id, 'space_id': space_id, 'sort': sort, 'cursor': cursor, 'limit': limit, 'body_format': body_format})))
|
|
1939
|
+
|
|
1940
|
+
def create(self, *, type_: str, title: str, body: _t.CreateCustomContentBodyBody, status: _t.CreateCustomContentBodyStatus | Unset = UNSET, space_id: str | Unset = UNSET, page_id: str | Unset = UNSET, blog_post_id: str | Unset = UNSET, custom_content_id: str | Unset = UNSET) -> _t.CreateCustomContentResponse:
|
|
1941
|
+
"""
|
|
1942
|
+
Create custom content
|
|
1943
|
+
|
|
1944
|
+
Creates a new custom content in the given space, page, blogpost or other custom content.
|
|
1945
|
+
|
|
1946
|
+
Only one of `spaceId`, `pageId`, `blogPostId`, or `customContentId` is required in the request body.
|
|
1947
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1948
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to create custom content in the space.
|
|
1949
|
+
"""
|
|
1950
|
+
return cast('_t.CreateCustomContentResponse', self._runtime.call('create_custom_content', call_args({}, {'body': {'type': type_, 'status': status, 'space_id': space_id, 'page_id': page_id, 'blog_post_id': blog_post_id, 'custom_content_id': custom_content_id, 'title': title, 'body': body}}, required=frozenset({'body'}))))
|
|
1951
|
+
|
|
1952
|
+
def get(self, *, id: int, body_format: _t.CustomContentBodyRepresentationSingle | Unset = UNSET, version: int | Unset = UNSET, include_labels: bool | Unset = UNSET, include_properties: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_versions: bool | Unset = UNSET, include_version: bool | Unset = UNSET, include_collaborators: bool | Unset = UNSET) -> _t.GetCustomContentByIdResponse:
|
|
1953
|
+
"""
|
|
1954
|
+
Get custom content by id
|
|
1955
|
+
|
|
1956
|
+
Returns a specific piece of custom content.
|
|
1957
|
+
|
|
1958
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1959
|
+
Permission to view the custom content, the container of the custom content, and the corresponding space (if different from the container).
|
|
1960
|
+
"""
|
|
1961
|
+
return cast('_t.GetCustomContentByIdResponse', self._runtime.call('get_custom_content_by_id', call_args({'id': id, 'body_format': body_format, 'version': version, 'include_labels': include_labels, 'include_properties': include_properties, 'include_operations': include_operations, 'include_versions': include_versions, 'include_version': include_version, 'include_collaborators': include_collaborators})))
|
|
1962
|
+
|
|
1963
|
+
def update(self, *, id: int, body: _t.UpdateCustomContentBody) -> _t.UpdateCustomContentResponse:
|
|
1964
|
+
"""
|
|
1965
|
+
Update custom content
|
|
1966
|
+
|
|
1967
|
+
Update a custom content by id.
|
|
1968
|
+
At most one of `spaceId`, `pageId`, `blogPostId`, or `customContentId` is allowed in the request body.
|
|
1969
|
+
Note that if `spaceId` is specified, it must be the same as the `spaceId` used for creating the custom content
|
|
1970
|
+
as moving custom content to a different space is not supported.
|
|
1971
|
+
|
|
1972
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
1973
|
+
Permission to view the content of the page or blogpost and its corresponding space. Permission to update custom content in the space.
|
|
1974
|
+
"""
|
|
1975
|
+
return cast('_t.UpdateCustomContentResponse', self._runtime.call('update_custom_content', call_args({'id': id, 'body': body})))
|
|
1976
|
+
|
|
1977
|
+
def delete(self, *, id: int, purge: bool | Unset = UNSET) -> None:
|
|
1978
|
+
"""
|
|
1979
|
+
Delete custom content
|
|
1980
|
+
|
|
1981
|
+
Delete a custom content by id.
|
|
1982
|
+
|
|
1983
|
+
Deleting a custom content will either move it to the trash or permanently delete it (purge it), depending on the apiSupport.
|
|
1984
|
+
To permanently delete a **trashed** custom content, the endpoint must be called with the following param `purge=true`.
|
|
1985
|
+
|
|
1986
|
+
**[Permissions](https://support.atlassian.com/confluence-cloud/docs/what-are-confluences-roles/) required**:
|
|
1987
|
+
Permission to view the content of the page or blogpost and its corresponding space.
|
|
1988
|
+
Permission to delete custom content in the space.
|
|
1989
|
+
[`manage/content`](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) permission for the space (if attempting to purge).
|
|
1990
|
+
|
|
1991
|
+
**Note:** To find the display name for each permission ID, call the [Get available space permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) API.
|
|
1992
|
+
"""
|
|
1993
|
+
self._runtime.call('delete_custom_content', call_args({'id': id, 'purge': purge}))
|
|
1994
|
+
|
|
1995
|
+
def get_by_type_in_page(self, *, id: int, type_: str, sort: _t.CustomContentSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, body_format: _t.CustomContentBodyRepresentation | Unset = UNSET) -> _t.GetCustomContentByTypeInPageResponse:
|
|
1996
|
+
"""
|
|
1997
|
+
Get custom content by type in page
|
|
1998
|
+
|
|
1999
|
+
Returns all custom content for a given type within a given page. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2000
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2001
|
+
|
|
2002
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2003
|
+
Permission to view the custom content, the container of the custom content (page), and the corresponding space.
|
|
2004
|
+
"""
|
|
2005
|
+
return cast('_t.GetCustomContentByTypeInPageResponse', self._runtime.call('get_custom_content_by_type_in_page', call_args({'id': id, 'type': type_, 'sort': sort, 'cursor': cursor, 'limit': limit, 'body_format': body_format})))
|
|
2006
|
+
|
|
2007
|
+
def get_by_type_in_space(self, *, id: int, type_: str, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, body_format: _t.CustomContentBodyRepresentation | Unset = UNSET) -> _t.GetCustomContentByTypeInSpaceResponse:
|
|
2008
|
+
"""
|
|
2009
|
+
Get custom content by type in space
|
|
2010
|
+
|
|
2011
|
+
Returns all custom content for a given type within a given space. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2012
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2013
|
+
|
|
2014
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2015
|
+
Permission to view the custom content and the corresponding space.
|
|
2016
|
+
"""
|
|
2017
|
+
return cast('_t.GetCustomContentByTypeInSpaceResponse', self._runtime.call('get_custom_content_by_type_in_space', call_args({'id': id, 'type': type_, 'cursor': cursor, 'limit': limit, 'body_format': body_format})))
|
|
2018
|
+
|
|
2019
|
+
class _DataPoliciesResource:
|
|
2020
|
+
"""Operations under ``data_policies``."""
|
|
2021
|
+
|
|
2022
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2023
|
+
self._runtime = runtime
|
|
2024
|
+
|
|
2025
|
+
def get_metadata(self) -> _t.DataPolicyMetadata:
|
|
2026
|
+
"""
|
|
2027
|
+
Get data policy metadata for the workspace
|
|
2028
|
+
|
|
2029
|
+
Returns data policy metadata for the workspace.
|
|
2030
|
+
|
|
2031
|
+
**[Permissions](#permissions) required:**
|
|
2032
|
+
Only apps can make this request.
|
|
2033
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2034
|
+
"""
|
|
2035
|
+
return cast('_t.DataPolicyMetadata', self._runtime.call('get_data_policy_metadata', call_args({})))
|
|
2036
|
+
|
|
2037
|
+
def list_spaces(self, *, ids: builtins.list[int] | Unset = UNSET, keys: builtins.list[str] | Unset = UNSET, sort: _t.SpaceSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetDataPolicySpacesResponse:
|
|
2038
|
+
"""
|
|
2039
|
+
Get spaces with data policies
|
|
2040
|
+
|
|
2041
|
+
Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the `limit` parameter and
|
|
2042
|
+
additional results (if available) will be available through the `next` URL present in the `Link` response header.
|
|
2043
|
+
|
|
2044
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2045
|
+
Only apps can make this request.
|
|
2046
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2047
|
+
Only spaces that the app has permission to view will be returned.
|
|
2048
|
+
"""
|
|
2049
|
+
return cast('_t.GetDataPolicySpacesResponse', self._runtime.call('get_data_policy_spaces', call_args({'ids': ids, 'keys': keys, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2050
|
+
|
|
2051
|
+
class _DatabaseResource:
|
|
2052
|
+
"""Operations under ``database``."""
|
|
2053
|
+
|
|
2054
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2055
|
+
self._runtime = runtime
|
|
2056
|
+
|
|
2057
|
+
def create(self, *, space_id: str, private: bool | Unset = UNSET, title: str | Unset = UNSET, parent_id: str | Unset = UNSET) -> _t.CreateDatabaseResponse:
|
|
2058
|
+
"""
|
|
2059
|
+
Create database
|
|
2060
|
+
|
|
2061
|
+
Creates a database in the space.
|
|
2062
|
+
|
|
2063
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2064
|
+
Permission to view the corresponding space. Permission to create a database in the space.
|
|
2065
|
+
"""
|
|
2066
|
+
return cast('_t.CreateDatabaseResponse', self._runtime.call('create_database', call_args({'private': private}, {'body': {'space_id': space_id, 'title': title, 'parent_id': parent_id}}, required=frozenset({'body'}))))
|
|
2067
|
+
|
|
2068
|
+
def get(self, *, id: int, include_collaborators: bool | Unset = UNSET, include_direct_children: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_properties: bool | Unset = UNSET) -> _t.GetDatabaseByIdResponse:
|
|
2069
|
+
"""
|
|
2070
|
+
Get database by id
|
|
2071
|
+
|
|
2072
|
+
Returns a specific database.
|
|
2073
|
+
|
|
2074
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2075
|
+
Permission to view the database and its corresponding space.
|
|
2076
|
+
"""
|
|
2077
|
+
return cast('_t.GetDatabaseByIdResponse', self._runtime.call('get_database_by_id', call_args({'id': id, 'include_collaborators': include_collaborators, 'include_direct_children': include_direct_children, 'include_operations': include_operations, 'include_properties': include_properties})))
|
|
2078
|
+
|
|
2079
|
+
def delete(self, *, id: int) -> None:
|
|
2080
|
+
"""
|
|
2081
|
+
Delete database
|
|
2082
|
+
|
|
2083
|
+
Delete a database by id.
|
|
2084
|
+
|
|
2085
|
+
Deleting a database moves the database to the trash, where it can be restored later
|
|
2086
|
+
|
|
2087
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2088
|
+
Permission to view the database and its corresponding space.
|
|
2089
|
+
Permission to delete databases in the space.
|
|
2090
|
+
"""
|
|
2091
|
+
self._runtime.call('delete_database', call_args({'id': id}))
|
|
2092
|
+
|
|
2093
|
+
def list_fields(self, *, id: str, limit: int | Unset = UNSET, cursor: str | Unset = UNSET, if_none_match: str | Unset = UNSET) -> _t.DatabaseFieldListResponse:
|
|
2094
|
+
"""
|
|
2095
|
+
Get fields for database
|
|
2096
|
+
|
|
2097
|
+
Returns the field definitions (schema) for a database, ordered by the
|
|
2098
|
+
user-defined column order, using cursor-based pagination.
|
|
2099
|
+
|
|
2100
|
+
> **Consistency:** Responses may not immediately reflect recent changes.
|
|
2101
|
+
Clients requiring read-after-write confirmation should poll with bounded backoff.
|
|
2102
|
+
|
|
2103
|
+
> **Experimental:** This operation is experimental and may change in backwards-incompatible ways without notice.
|
|
2104
|
+
|
|
2105
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2106
|
+
Permission to view the database and its corresponding space.
|
|
2107
|
+
"""
|
|
2108
|
+
return cast('_t.DatabaseFieldListResponse', self._runtime.call('get_database_fields', call_args({'id': id, 'limit': limit, 'cursor': cursor, 'if_none_match': if_none_match})))
|
|
2109
|
+
|
|
2110
|
+
def list_views(self, *, id: str, limit: int | Unset = UNSET, cursor: str | Unset = UNSET, if_none_match: str | Unset = UNSET) -> _t.DatabaseViewListResponse:
|
|
2111
|
+
"""
|
|
2112
|
+
Get views for database
|
|
2113
|
+
|
|
2114
|
+
Returns the views defined on a database using cursor-based pagination.
|
|
2115
|
+
Only view IDs, names, and types are returned; view configuration is not exposed.
|
|
2116
|
+
|
|
2117
|
+
> **Consistency:** Responses may not immediately reflect recent changes.
|
|
2118
|
+
Clients requiring read-after-write confirmation should poll with bounded backoff.
|
|
2119
|
+
|
|
2120
|
+
> **Experimental:** This operation is experimental and may change in backwards-incompatible ways without notice.
|
|
2121
|
+
|
|
2122
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2123
|
+
Permission to view the database and its corresponding space.
|
|
2124
|
+
"""
|
|
2125
|
+
return cast('_t.DatabaseViewListResponse', self._runtime.call('get_database_views', call_args({'id': id, 'limit': limit, 'cursor': cursor, 'if_none_match': if_none_match})))
|
|
2126
|
+
|
|
2127
|
+
def list_entries(self, *, id: str, limit: int | Unset = UNSET, cursor: str | Unset = UNSET, if_none_match: str | Unset = UNSET, sort: str | Unset = UNSET, filter: builtins.dict[str, Any] | Unset = UNSET) -> _t.DatabaseEntryListResponse:
|
|
2128
|
+
"""
|
|
2129
|
+
Get entries for database
|
|
2130
|
+
|
|
2131
|
+
Returns the entries (rows) of a database, with optional filtering, sorting,
|
|
2132
|
+
and cursor-based pagination. Entry values are keyed by field ID; use
|
|
2133
|
+
Get fields for database (`GET /databases/{id}/fields`) to map field IDs to
|
|
2134
|
+
names.
|
|
2135
|
+
|
|
2136
|
+
Filtering is expressed with bracket-scoped query parameters keyed on field
|
|
2137
|
+
ID. The exact operators vary by field type and are documented on the
|
|
2138
|
+
`filter` parameter. Multiple filters are combined with AND. Unsupported
|
|
2139
|
+
operators and non-filterable fields return distinct structured `400`
|
|
2140
|
+
responses.
|
|
2141
|
+
|
|
2142
|
+
Pagination uses opaque, offset-based continuation tokens and is best effort
|
|
2143
|
+
while a database is changing. Concurrent inserts, deletes, or changes to a
|
|
2144
|
+
sort value can cause duplicate or omitted rows across pages. Restart from
|
|
2145
|
+
the first page when a consistent export is required.
|
|
2146
|
+
|
|
2147
|
+
Results are based on the database, not a particular view. A view's filters,
|
|
2148
|
+
sorting, grouping, and field visibility do not affect the response.
|
|
2149
|
+
|
|
2150
|
+
> **Consistency:** Responses may not immediately reflect recent changes.
|
|
2151
|
+
Clients requiring read-after-write confirmation should poll with bounded backoff.
|
|
2152
|
+
|
|
2153
|
+
> **Experimental:** This operation is experimental and may change in backwards-incompatible ways without notice.
|
|
2154
|
+
|
|
2155
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2156
|
+
Permission to view the database and its corresponding space.
|
|
2157
|
+
"""
|
|
2158
|
+
return cast('_t.DatabaseEntryListResponse', self._runtime.call('get_database_entries', call_args({'id': id, 'limit': limit, 'cursor': cursor, 'if_none_match': if_none_match, 'sort': sort, 'filter': filter})))
|
|
2159
|
+
|
|
2160
|
+
def get_entry(self, *, id: str, entry_id: str, if_none_match: str | Unset = UNSET) -> _t.DatabaseEntrySingleResponse:
|
|
2161
|
+
"""
|
|
2162
|
+
Get entry by id
|
|
2163
|
+
|
|
2164
|
+
Returns a single entry (row) from a database by ID.
|
|
2165
|
+
|
|
2166
|
+
> **Consistency:** Responses may not immediately reflect recent changes.
|
|
2167
|
+
Clients requiring read-after-write confirmation should poll with bounded backoff.
|
|
2168
|
+
|
|
2169
|
+
> **Experimental:** This operation is experimental and may change in backwards-incompatible ways without notice.
|
|
2170
|
+
|
|
2171
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2172
|
+
Permission to view the database and its corresponding space.
|
|
2173
|
+
"""
|
|
2174
|
+
return cast('_t.DatabaseEntrySingleResponse', self._runtime.call('get_database_entry_by_id', call_args({'id': id, 'entry_id': entry_id, 'if_none_match': if_none_match})))
|
|
2175
|
+
|
|
2176
|
+
class _DescendantsResource:
|
|
2177
|
+
"""Operations under ``descendants``."""
|
|
2178
|
+
|
|
2179
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2180
|
+
self._runtime = runtime
|
|
2181
|
+
|
|
2182
|
+
def list_whiteboard(self, *, id: int, limit: int | Unset = UNSET, depth: int | Unset = UNSET, cursor: str | Unset = UNSET) -> _t.GetWhiteboardDescendantsResponse:
|
|
2183
|
+
"""
|
|
2184
|
+
Get descendants of a whiteboard
|
|
2185
|
+
|
|
2186
|
+
Returns descendants in the content tree for a given whiteboard by ID in top-to-bottom order (that is, the highest descendant is the first
|
|
2187
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2188
|
+
will be available by calling this endpoint with the cursor in the response payload. There is also a `depth` parameter specifying depth
|
|
2189
|
+
of descendants to be fetched.
|
|
2190
|
+
|
|
2191
|
+
The following types of content will be returned:
|
|
2192
|
+
- Database
|
|
2193
|
+
- Embed
|
|
2194
|
+
- Folder
|
|
2195
|
+
- Page
|
|
2196
|
+
- Whiteboard
|
|
2197
|
+
|
|
2198
|
+
This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based on the content type, such
|
|
2199
|
+
as:
|
|
2200
|
+
|
|
2201
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
2202
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
2203
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
2204
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
2205
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
2206
|
+
|
|
2207
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2208
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2209
|
+
Permission to view the whiteboard and its corresponding space
|
|
2210
|
+
"""
|
|
2211
|
+
return cast('_t.GetWhiteboardDescendantsResponse', self._runtime.call('get_whiteboard_descendants', call_args({'id': id, 'limit': limit, 'depth': depth, 'cursor': cursor})))
|
|
2212
|
+
|
|
2213
|
+
def list_database(self, *, id: int, limit: int | Unset = UNSET, depth: int | Unset = UNSET, cursor: str | Unset = UNSET) -> _t.GetDatabaseDescendantsResponse:
|
|
2214
|
+
"""
|
|
2215
|
+
Get descendants of a database
|
|
2216
|
+
|
|
2217
|
+
Returns descendants in the content tree for a given database by ID in top-to-bottom order (that is, the highest descendant is the first
|
|
2218
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2219
|
+
will be available by calling this endpoint with the cursor in the response payload. There is also a `depth` parameter specifying depth
|
|
2220
|
+
of descendants to be fetched.
|
|
2221
|
+
|
|
2222
|
+
The following types of content will be returned:
|
|
2223
|
+
- Database
|
|
2224
|
+
- Embed
|
|
2225
|
+
- Folder
|
|
2226
|
+
- Page
|
|
2227
|
+
- Whiteboard
|
|
2228
|
+
|
|
2229
|
+
This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based on the content type, such
|
|
2230
|
+
as:
|
|
2231
|
+
|
|
2232
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
2233
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
2234
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
2235
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
2236
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
2237
|
+
|
|
2238
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2239
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2240
|
+
Permission to view the database and its corresponding space
|
|
2241
|
+
"""
|
|
2242
|
+
return cast('_t.GetDatabaseDescendantsResponse', self._runtime.call('get_database_descendants', call_args({'id': id, 'limit': limit, 'depth': depth, 'cursor': cursor})))
|
|
2243
|
+
|
|
2244
|
+
def list_smart_link(self, *, id: int, limit: int | Unset = UNSET, depth: int | Unset = UNSET, cursor: str | Unset = UNSET) -> _t.GetSmartLinkDescendantsResponse:
|
|
2245
|
+
"""
|
|
2246
|
+
Get descendants of a smart link
|
|
2247
|
+
|
|
2248
|
+
Returns descendants in the content tree for a given smart link by ID in top-to-bottom order (that is, the highest descendant is the first
|
|
2249
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2250
|
+
will be available by calling this endpoint with the cursor in the response payload. There is also a `depth` parameter specifying depth
|
|
2251
|
+
of descendants to be fetched.
|
|
2252
|
+
|
|
2253
|
+
The following types of content will be returned:
|
|
2254
|
+
- Database
|
|
2255
|
+
- Embed
|
|
2256
|
+
- Folder
|
|
2257
|
+
- Page
|
|
2258
|
+
- Whiteboard
|
|
2259
|
+
|
|
2260
|
+
|
|
2261
|
+
This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based on the content type, such
|
|
2262
|
+
as:
|
|
2263
|
+
|
|
2264
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
2265
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
2266
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
2267
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
2268
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
2269
|
+
|
|
2270
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2271
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2272
|
+
Permission to view the smart link and its corresponding space
|
|
2273
|
+
"""
|
|
2274
|
+
return cast('_t.GetSmartLinkDescendantsResponse', self._runtime.call('get_smart_link_descendants', call_args({'id': id, 'limit': limit, 'depth': depth, 'cursor': cursor})))
|
|
2275
|
+
|
|
2276
|
+
def list_folder(self, *, id: int, limit: int | Unset = UNSET, depth: int | Unset = UNSET, cursor: str | Unset = UNSET) -> _t.GetFolderDescendantsResponse:
|
|
2277
|
+
"""
|
|
2278
|
+
Get descendants of folder
|
|
2279
|
+
|
|
2280
|
+
Returns descendants in the content tree for a given folder by ID in top-to-bottom order (that is, the highest descendant is the first
|
|
2281
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2282
|
+
will be available by calling this endpoint with the cursor in the response payload. There is also a `depth` parameter specifying depth
|
|
2283
|
+
of descendants to be fetched.
|
|
2284
|
+
|
|
2285
|
+
The following types of content will be returned:
|
|
2286
|
+
- Database
|
|
2287
|
+
- Embed
|
|
2288
|
+
- Folder
|
|
2289
|
+
- Page
|
|
2290
|
+
- Whiteboard
|
|
2291
|
+
|
|
2292
|
+
This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based on the content type, such
|
|
2293
|
+
as:
|
|
2294
|
+
|
|
2295
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
2296
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
2297
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
2298
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
2299
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
2300
|
+
|
|
2301
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2302
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2303
|
+
Permission to view the and its corresponding space
|
|
2304
|
+
"""
|
|
2305
|
+
return cast('_t.GetFolderDescendantsResponse', self._runtime.call('get_folder_descendants', call_args({'id': id, 'limit': limit, 'depth': depth, 'cursor': cursor})))
|
|
2306
|
+
|
|
2307
|
+
def list_page(self, *, id: int, limit: int | Unset = UNSET, depth: int | Unset = UNSET, cursor: str | Unset = UNSET) -> _t.GetPageDescendantsResponse:
|
|
2308
|
+
"""
|
|
2309
|
+
Get descendants of page
|
|
2310
|
+
|
|
2311
|
+
Returns descendants in the content tree for a given page by ID in top-to-bottom order (that is, the highest descendant is the first
|
|
2312
|
+
item in the response payload). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2313
|
+
will be available by calling this endpoint with the cursor in the response payload. There is also a `depth` parameter specifying depth
|
|
2314
|
+
of descendants to be fetched.
|
|
2315
|
+
|
|
2316
|
+
The following types of content will be returned:
|
|
2317
|
+
- Database
|
|
2318
|
+
- Embed
|
|
2319
|
+
- Folder
|
|
2320
|
+
- Page
|
|
2321
|
+
- Whiteboard
|
|
2322
|
+
|
|
2323
|
+
This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based on the content type, such
|
|
2324
|
+
as:
|
|
2325
|
+
|
|
2326
|
+
- [Get database by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get)
|
|
2327
|
+
- [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get)
|
|
2328
|
+
- [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get)
|
|
2329
|
+
- [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get)
|
|
2330
|
+
- [Get whiteboard by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get).
|
|
2331
|
+
|
|
2332
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2333
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2334
|
+
Permission to view the page and its corresponding space
|
|
2335
|
+
"""
|
|
2336
|
+
return cast('_t.GetPageDescendantsResponse', self._runtime.call('get_page_descendants', call_args({'id': id, 'limit': limit, 'depth': depth, 'cursor': cursor})))
|
|
2337
|
+
|
|
2338
|
+
class _FolderResource:
|
|
2339
|
+
"""Operations under ``folder``."""
|
|
2340
|
+
|
|
2341
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2342
|
+
self._runtime = runtime
|
|
2343
|
+
|
|
2344
|
+
def create(self, *, space_id: str, title: str | Unset = UNSET, parent_id: str | Unset = UNSET) -> _t.CreateFolderResponse:
|
|
2345
|
+
"""
|
|
2346
|
+
Create folder
|
|
2347
|
+
|
|
2348
|
+
Creates a folder in the space.
|
|
2349
|
+
|
|
2350
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2351
|
+
Permission to view the corresponding space. Permission to create a folder in the space.
|
|
2352
|
+
"""
|
|
2353
|
+
return cast('_t.CreateFolderResponse', self._runtime.call('create_folder', call_args({}, {'body': {'space_id': space_id, 'title': title, 'parent_id': parent_id}}, required=frozenset({'body'}))))
|
|
2354
|
+
|
|
2355
|
+
def get(self, *, id: int, include_collaborators: bool | Unset = UNSET, include_direct_children: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_properties: bool | Unset = UNSET) -> _t.GetFolderByIdResponse:
|
|
2356
|
+
"""
|
|
2357
|
+
Get folder by id
|
|
2358
|
+
|
|
2359
|
+
Returns a specific folder.
|
|
2360
|
+
|
|
2361
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2362
|
+
Permission to view the folder and its corresponding space.
|
|
2363
|
+
"""
|
|
2364
|
+
return cast('_t.GetFolderByIdResponse', self._runtime.call('get_folder_by_id', call_args({'id': id, 'include_collaborators': include_collaborators, 'include_direct_children': include_direct_children, 'include_operations': include_operations, 'include_properties': include_properties})))
|
|
2365
|
+
|
|
2366
|
+
def delete(self, *, id: int) -> None:
|
|
2367
|
+
"""
|
|
2368
|
+
Delete folder
|
|
2369
|
+
|
|
2370
|
+
Delete a folder by id.
|
|
2371
|
+
|
|
2372
|
+
Deleting a folder moves the folder to the trash, where it can be restored later
|
|
2373
|
+
|
|
2374
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2375
|
+
Permission to view the folder and its corresponding space.
|
|
2376
|
+
Permission to delete folders in the space.
|
|
2377
|
+
"""
|
|
2378
|
+
self._runtime.call('delete_folder', call_args({'id': id}))
|
|
2379
|
+
|
|
2380
|
+
class _LabelResource:
|
|
2381
|
+
"""Operations under ``label``."""
|
|
2382
|
+
|
|
2383
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2384
|
+
self._runtime = runtime
|
|
2385
|
+
|
|
2386
|
+
def list_attachment_labels(self, *, id: int, prefix: _t.GetAttachmentLabelsPrefix | Unset = UNSET, sort: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetAttachmentLabelsResponse:
|
|
2387
|
+
"""
|
|
2388
|
+
Get labels for attachment
|
|
2389
|
+
|
|
2390
|
+
Returns the labels of specific attachment. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2391
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2392
|
+
|
|
2393
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2394
|
+
Permission to view the parent content of the attachment and its corresponding space.
|
|
2395
|
+
Only labels that the user has permission to view will be returned.
|
|
2396
|
+
"""
|
|
2397
|
+
return cast('_t.GetAttachmentLabelsResponse', self._runtime.call('get_attachment_labels', call_args({'id': id, 'prefix': prefix, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2398
|
+
|
|
2399
|
+
def list_blog_post_labels(self, *, id: int, prefix: _t.GetBlogPostLabelsPrefix | Unset = UNSET, sort: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogPostLabelsResponse:
|
|
2400
|
+
"""
|
|
2401
|
+
Get labels for blog post
|
|
2402
|
+
|
|
2403
|
+
Returns the labels of specific blog post. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2404
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2405
|
+
|
|
2406
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2407
|
+
Permission to view the content of the blog post and its corresponding space.
|
|
2408
|
+
Only labels that the user has permission to view will be returned.
|
|
2409
|
+
"""
|
|
2410
|
+
return cast('_t.GetBlogPostLabelsResponse', self._runtime.call('get_blog_post_labels', call_args({'id': id, 'prefix': prefix, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2411
|
+
|
|
2412
|
+
def list_custom_content_labels(self, *, id: int, prefix: _t.GetCustomContentLabelsPrefix | Unset = UNSET, sort: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetCustomContentLabelsResponse:
|
|
2413
|
+
"""
|
|
2414
|
+
Get labels for custom content
|
|
2415
|
+
|
|
2416
|
+
Returns the labels for a specific piece of custom content. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2417
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2418
|
+
|
|
2419
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2420
|
+
Permission to view the custom content and its corresponding space.
|
|
2421
|
+
Only labels that the user has permission to view will be returned.
|
|
2422
|
+
"""
|
|
2423
|
+
return cast('_t.GetCustomContentLabelsResponse', self._runtime.call('get_custom_content_labels', call_args({'id': id, 'prefix': prefix, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2424
|
+
|
|
2425
|
+
def list_labels(self, *, label_id: builtins.list[int] | Unset = UNSET, prefix: builtins.list[str] | Unset = UNSET, cursor: str | Unset = UNSET, sort: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetLabelsResponse:
|
|
2426
|
+
"""
|
|
2427
|
+
Get labels
|
|
2428
|
+
|
|
2429
|
+
Returns all labels. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2430
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2431
|
+
|
|
2432
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2433
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2434
|
+
Only labels that the user has permission to view will be returned.
|
|
2435
|
+
"""
|
|
2436
|
+
return cast('_t.GetLabelsResponse', self._runtime.call('get_labels', call_args({'label_id': label_id, 'prefix': prefix, 'cursor': cursor, 'sort': sort, 'limit': limit})))
|
|
2437
|
+
|
|
2438
|
+
def list_page_labels(self, *, id: int, prefix: _t.GetPageLabelsPrefix | Unset = UNSET, sort: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPageLabelsResponse:
|
|
2439
|
+
"""
|
|
2440
|
+
Get labels for page
|
|
2441
|
+
|
|
2442
|
+
Returns the labels of specific page. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2443
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2444
|
+
|
|
2445
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2446
|
+
Permission to view the content of the page and its corresponding space.
|
|
2447
|
+
Only labels that the user has permission to view will be returned.
|
|
2448
|
+
"""
|
|
2449
|
+
return cast('_t.GetPageLabelsResponse', self._runtime.call('get_page_labels', call_args({'id': id, 'prefix': prefix, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2450
|
+
|
|
2451
|
+
def list_space_labels(self, *, id: int, prefix: _t.GetSpaceLabelsPrefix | Unset = UNSET, sort: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetSpaceLabelsResponse:
|
|
2452
|
+
"""
|
|
2453
|
+
Get labels for space
|
|
2454
|
+
|
|
2455
|
+
Returns the labels of specific space. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2456
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2457
|
+
|
|
2458
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2459
|
+
Permission to view the space.
|
|
2460
|
+
Only labels that the user has permission to view will be returned.
|
|
2461
|
+
"""
|
|
2462
|
+
return cast('_t.GetSpaceLabelsResponse', self._runtime.call('get_space_labels', call_args({'id': id, 'prefix': prefix, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2463
|
+
|
|
2464
|
+
def list_space_content_labels(self, *, id: int, prefix: _t.GetSpaceContentLabelsPrefix | Unset = UNSET, sort: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetSpaceContentLabelsResponse:
|
|
2465
|
+
"""
|
|
2466
|
+
Get labels for space content
|
|
2467
|
+
|
|
2468
|
+
Returns the labels of space content (pages, blogposts etc). The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2469
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2470
|
+
|
|
2471
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2472
|
+
Permission to view the space.
|
|
2473
|
+
Only labels that the user has permission to view will be returned.
|
|
2474
|
+
"""
|
|
2475
|
+
return cast('_t.GetSpaceContentLabelsResponse', self._runtime.call('get_space_content_labels', call_args({'id': id, 'prefix': prefix, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2476
|
+
|
|
2477
|
+
class _LikeResource:
|
|
2478
|
+
"""Operations under ``like``."""
|
|
2479
|
+
|
|
2480
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2481
|
+
self._runtime = runtime
|
|
2482
|
+
|
|
2483
|
+
def get_blog_post_count(self, *, id: int) -> _t.GetBlogPostLikeCountResponse:
|
|
2484
|
+
"""
|
|
2485
|
+
Get like count for blog post
|
|
2486
|
+
|
|
2487
|
+
Returns the count of likes of specific blog post.
|
|
2488
|
+
|
|
2489
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2490
|
+
Permission to view the content of the blog post and its corresponding space.
|
|
2491
|
+
"""
|
|
2492
|
+
return cast('_t.GetBlogPostLikeCountResponse', self._runtime.call('get_blog_post_like_count', call_args({'id': id})))
|
|
2493
|
+
|
|
2494
|
+
def list_blog_post_users(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetBlogPostLikeUsersResponse:
|
|
2495
|
+
"""
|
|
2496
|
+
Get account IDs of likes for blog post
|
|
2497
|
+
|
|
2498
|
+
Returns the account IDs of likes of specific blog post.
|
|
2499
|
+
|
|
2500
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2501
|
+
Permission to view the content of the blog post and its corresponding space.
|
|
2502
|
+
"""
|
|
2503
|
+
return cast('_t.GetBlogPostLikeUsersResponse', self._runtime.call('get_blog_post_like_users', call_args({'id': id, 'cursor': cursor, 'limit': limit})))
|
|
2504
|
+
|
|
2505
|
+
def get_page_count(self, *, id: int) -> _t.GetPageLikeCountResponse:
|
|
2506
|
+
"""
|
|
2507
|
+
Get like count for page
|
|
2508
|
+
|
|
2509
|
+
Returns the count of likes of specific page.
|
|
2510
|
+
|
|
2511
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2512
|
+
Permission to view the content of the page and its corresponding space.
|
|
2513
|
+
"""
|
|
2514
|
+
return cast('_t.GetPageLikeCountResponse', self._runtime.call('get_page_like_count', call_args({'id': id})))
|
|
2515
|
+
|
|
2516
|
+
def list_page_users(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPageLikeUsersResponse:
|
|
2517
|
+
"""
|
|
2518
|
+
Get account IDs of likes for page
|
|
2519
|
+
|
|
2520
|
+
Returns the account IDs of likes of specific page.
|
|
2521
|
+
|
|
2522
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2523
|
+
Permission to view the content of the page and its corresponding space.
|
|
2524
|
+
"""
|
|
2525
|
+
return cast('_t.GetPageLikeUsersResponse', self._runtime.call('get_page_like_users', call_args({'id': id, 'cursor': cursor, 'limit': limit})))
|
|
2526
|
+
|
|
2527
|
+
def get_footer_count(self, *, id: int) -> _t.GetFooterLikeCountResponse:
|
|
2528
|
+
"""
|
|
2529
|
+
Get like count for footer comment
|
|
2530
|
+
|
|
2531
|
+
Returns the count of likes of specific footer comment.
|
|
2532
|
+
|
|
2533
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2534
|
+
Permission to view the content of the page/blogpost and its corresponding space.
|
|
2535
|
+
"""
|
|
2536
|
+
return cast('_t.GetFooterLikeCountResponse', self._runtime.call('get_footer_like_count', call_args({'id': id})))
|
|
2537
|
+
|
|
2538
|
+
def list_footer_users(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetFooterLikeUsersResponse:
|
|
2539
|
+
"""
|
|
2540
|
+
Get account IDs of likes for footer comment
|
|
2541
|
+
|
|
2542
|
+
Returns the account IDs of likes of specific footer comment.
|
|
2543
|
+
|
|
2544
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2545
|
+
Permission to view the content of the page/blogpost and its corresponding space.
|
|
2546
|
+
"""
|
|
2547
|
+
return cast('_t.GetFooterLikeUsersResponse', self._runtime.call('get_footer_like_users', call_args({'id': id, 'cursor': cursor, 'limit': limit})))
|
|
2548
|
+
|
|
2549
|
+
def get_inline_count(self, *, id: int) -> _t.GetInlineLikeCountResponse:
|
|
2550
|
+
"""
|
|
2551
|
+
Get like count for inline comment
|
|
2552
|
+
|
|
2553
|
+
Returns the count of likes of specific inline comment.
|
|
2554
|
+
|
|
2555
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2556
|
+
Permission to view the content of the page/blogpost and its corresponding space.
|
|
2557
|
+
"""
|
|
2558
|
+
return cast('_t.GetInlineLikeCountResponse', self._runtime.call('get_inline_like_count', call_args({'id': id})))
|
|
2559
|
+
|
|
2560
|
+
def list_inline_users(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetInlineLikeUsersResponse:
|
|
2561
|
+
"""
|
|
2562
|
+
Get account IDs of likes for inline comment
|
|
2563
|
+
|
|
2564
|
+
Returns the account IDs of likes of specific inline comment.
|
|
2565
|
+
|
|
2566
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2567
|
+
Permission to view the content of the page/blogpost and its corresponding space.
|
|
2568
|
+
"""
|
|
2569
|
+
return cast('_t.GetInlineLikeUsersResponse', self._runtime.call('get_inline_like_users', call_args({'id': id, 'cursor': cursor, 'limit': limit})))
|
|
2570
|
+
|
|
2571
|
+
class _OperationResource:
|
|
2572
|
+
"""Operations under ``operation``."""
|
|
2573
|
+
|
|
2574
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2575
|
+
self._runtime = runtime
|
|
2576
|
+
|
|
2577
|
+
def list_attachment_operations(self, *, id: str) -> _t.PermittedOperationsResponse:
|
|
2578
|
+
"""
|
|
2579
|
+
Get permitted operations for attachment
|
|
2580
|
+
|
|
2581
|
+
Returns the permitted operations on specific attachment.
|
|
2582
|
+
|
|
2583
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2584
|
+
Permission to view the parent content of the attachment and its corresponding space.
|
|
2585
|
+
"""
|
|
2586
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_attachment_operations', call_args({'id': id})))
|
|
2587
|
+
|
|
2588
|
+
def list_blog_post_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2589
|
+
"""
|
|
2590
|
+
Get permitted operations for blog post
|
|
2591
|
+
|
|
2592
|
+
Returns the permitted operations on specific blog post.
|
|
2593
|
+
|
|
2594
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2595
|
+
Permission to view the parent content of the blog post and its corresponding space.
|
|
2596
|
+
"""
|
|
2597
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_blog_post_operations', call_args({'id': id})))
|
|
2598
|
+
|
|
2599
|
+
def list_custom_content_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2600
|
+
"""
|
|
2601
|
+
Get permitted operations for custom content
|
|
2602
|
+
|
|
2603
|
+
Returns the permitted operations on specific custom content.
|
|
2604
|
+
|
|
2605
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2606
|
+
Permission to view the parent content of the custom content and its corresponding space.
|
|
2607
|
+
"""
|
|
2608
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_custom_content_operations', call_args({'id': id})))
|
|
2609
|
+
|
|
2610
|
+
def list_page_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2611
|
+
"""
|
|
2612
|
+
Get permitted operations for page
|
|
2613
|
+
|
|
2614
|
+
Returns the permitted operations on specific page.
|
|
2615
|
+
|
|
2616
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2617
|
+
Permission to view the parent content of the page and its corresponding space.
|
|
2618
|
+
"""
|
|
2619
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_page_operations', call_args({'id': id})))
|
|
2620
|
+
|
|
2621
|
+
def list_whiteboard_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2622
|
+
"""
|
|
2623
|
+
Get permitted operations for a whiteboard
|
|
2624
|
+
|
|
2625
|
+
Returns the permitted operations on specific whiteboard.
|
|
2626
|
+
|
|
2627
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2628
|
+
Permission to view the whiteboard and its corresponding space.
|
|
2629
|
+
"""
|
|
2630
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_whiteboard_operations', call_args({'id': id})))
|
|
2631
|
+
|
|
2632
|
+
def list_database_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2633
|
+
"""
|
|
2634
|
+
Get permitted operations for a database
|
|
2635
|
+
|
|
2636
|
+
Returns the permitted operations on specific database.
|
|
2637
|
+
|
|
2638
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2639
|
+
Permission to view the database and its corresponding space.
|
|
2640
|
+
"""
|
|
2641
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_database_operations', call_args({'id': id})))
|
|
2642
|
+
|
|
2643
|
+
def list_smart_link_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2644
|
+
"""
|
|
2645
|
+
Get permitted operations for a Smart Link in the content tree
|
|
2646
|
+
|
|
2647
|
+
Returns the permitted operations on specific Smart Link in the content tree.
|
|
2648
|
+
|
|
2649
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2650
|
+
Permission to view the Smart Link in the content tree and its corresponding space.
|
|
2651
|
+
"""
|
|
2652
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_smart_link_operations', call_args({'id': id})))
|
|
2653
|
+
|
|
2654
|
+
def list_folder_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2655
|
+
"""
|
|
2656
|
+
Get permitted operations for a folder
|
|
2657
|
+
|
|
2658
|
+
Returns the permitted operations on specific folder.
|
|
2659
|
+
|
|
2660
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2661
|
+
Permission to view the folder and its corresponding space.
|
|
2662
|
+
"""
|
|
2663
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_folder_operations', call_args({'id': id})))
|
|
2664
|
+
|
|
2665
|
+
def list_space_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2666
|
+
"""
|
|
2667
|
+
Get permitted operations for space
|
|
2668
|
+
|
|
2669
|
+
Returns the permitted operations on specific space.
|
|
2670
|
+
|
|
2671
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2672
|
+
Permission to view the corresponding space.
|
|
2673
|
+
"""
|
|
2674
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_space_operations', call_args({'id': id})))
|
|
2675
|
+
|
|
2676
|
+
def list_footer_comment_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2677
|
+
"""
|
|
2678
|
+
Get permitted operations for footer comment
|
|
2679
|
+
|
|
2680
|
+
Returns the permitted operations on specific footer comment.
|
|
2681
|
+
|
|
2682
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2683
|
+
Permission to view the parent content of the footer comment and its corresponding space.
|
|
2684
|
+
"""
|
|
2685
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_footer_comment_operations', call_args({'id': id})))
|
|
2686
|
+
|
|
2687
|
+
def list_inline_comment_operations(self, *, id: int) -> _t.PermittedOperationsResponse:
|
|
2688
|
+
"""
|
|
2689
|
+
Get permitted operations for inline comment
|
|
2690
|
+
|
|
2691
|
+
Returns the permitted operations on specific inline comment.
|
|
2692
|
+
|
|
2693
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2694
|
+
Permission to view the parent content of the inline comment and its corresponding space.
|
|
2695
|
+
"""
|
|
2696
|
+
return cast('_t.PermittedOperationsResponse', self._runtime.call('get_inline_comment_operations', call_args({'id': id})))
|
|
2697
|
+
|
|
2698
|
+
class _PageResource:
|
|
2699
|
+
"""Operations under ``page``."""
|
|
2700
|
+
|
|
2701
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2702
|
+
self._runtime = runtime
|
|
2703
|
+
|
|
2704
|
+
def list_label_pages(self, *, id: int, space_id: builtins.list[int] | Unset = UNSET, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, sort: _t.PageSortOrder | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetLabelPagesResponse:
|
|
2705
|
+
"""
|
|
2706
|
+
Get pages for label
|
|
2707
|
+
|
|
2708
|
+
Returns the pages of specified label. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2709
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2710
|
+
|
|
2711
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2712
|
+
Permission to view the content of the page and its corresponding space.
|
|
2713
|
+
"""
|
|
2714
|
+
return cast('_t.GetLabelPagesResponse', self._runtime.call('get_label_pages', call_args({'id': id, 'space_id': space_id, 'body_format': body_format, 'sort': sort, 'cursor': cursor, 'limit': limit})))
|
|
2715
|
+
|
|
2716
|
+
def list_pages(self, *, id: builtins.list[int] | Unset = UNSET, space_id: builtins.list[int] | Unset = UNSET, sort: _t.PageSortOrder | Unset = UNSET, status: builtins.list[_t.GetPagesStatusItem] | Unset = UNSET, title: str | Unset = UNSET, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, subtype: _t.GetPagesSubtype | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPagesResponse:
|
|
2717
|
+
"""
|
|
2718
|
+
Get pages
|
|
2719
|
+
|
|
2720
|
+
Returns all pages. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2721
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2722
|
+
|
|
2723
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2724
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2725
|
+
Only pages that the user has permission to view will be returned.
|
|
2726
|
+
"""
|
|
2727
|
+
return cast('_t.GetPagesResponse', self._runtime.call('get_pages', call_args({'id': id, 'space_id': space_id, 'sort': sort, 'status': status, 'title': title, 'body_format': body_format, 'subtype': subtype, 'cursor': cursor, 'limit': limit})))
|
|
2728
|
+
|
|
2729
|
+
def create(self, *, space_id: str, embedded: bool | Unset = UNSET, private: bool | Unset = UNSET, root_level: bool | Unset = UNSET, status: _t.CreatePageBodyStatus | Unset = UNSET, title: str | Unset = UNSET, parent_id: str | Unset = UNSET, body: _t.CreatePageBodyBody | Unset = UNSET, subtype: _t.CreatePageBodySubtype | Unset = UNSET) -> _t.CreatePageResponse:
|
|
2730
|
+
"""
|
|
2731
|
+
Create page
|
|
2732
|
+
|
|
2733
|
+
Creates a page in the space.
|
|
2734
|
+
|
|
2735
|
+
Pages are created as published by default unless specified as a draft in the status field. If creating a published page, the title must be specified.
|
|
2736
|
+
|
|
2737
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2738
|
+
Permission to view the corresponding space. Permission to create a page in the space.
|
|
2739
|
+
"""
|
|
2740
|
+
return cast('_t.CreatePageResponse', self._runtime.call('create_page', call_args({'embedded': embedded, 'private': private, 'root_level': root_level}, {'body': {'space_id': space_id, 'status': status, 'title': title, 'parent_id': parent_id, 'body': body, 'subtype': subtype}}, required=frozenset({'body'}))))
|
|
2741
|
+
|
|
2742
|
+
def get(self, *, id: int, body_format: _t.PrimaryBodyRepresentationSingle | Unset = UNSET, get_draft: bool | Unset = UNSET, status: builtins.list[_t.GetPageByIdStatusItem] | Unset = UNSET, version: int | Unset = UNSET, include_labels: bool | Unset = UNSET, include_properties: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_likes: bool | Unset = UNSET, include_versions: bool | Unset = UNSET, include_version: bool | Unset = UNSET, include_favorited_by_current_user_status: bool | Unset = UNSET, include_webresources: bool | Unset = UNSET, include_collaborators: bool | Unset = UNSET, include_direct_children: bool | Unset = UNSET) -> _t.GetPageByIdResponse:
|
|
2743
|
+
"""
|
|
2744
|
+
Get page by id
|
|
2745
|
+
|
|
2746
|
+
Returns a specific page.
|
|
2747
|
+
|
|
2748
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2749
|
+
Permission to view the page and its corresponding space.
|
|
2750
|
+
"""
|
|
2751
|
+
return cast('_t.GetPageByIdResponse', self._runtime.call('get_page_by_id', call_args({'id': id, 'body_format': body_format, 'get_draft': get_draft, 'status': status, 'version': version, 'include_labels': include_labels, 'include_properties': include_properties, 'include_operations': include_operations, 'include_likes': include_likes, 'include_versions': include_versions, 'include_version': include_version, 'include_favorited_by_current_user_status': include_favorited_by_current_user_status, 'include_webresources': include_webresources, 'include_collaborators': include_collaborators, 'include_direct_children': include_direct_children})))
|
|
2752
|
+
|
|
2753
|
+
def update(self, *, id: int, body: _t.UpdatePageBody) -> _t.UpdatePageResponse:
|
|
2754
|
+
"""
|
|
2755
|
+
Update page
|
|
2756
|
+
|
|
2757
|
+
Update a page by id.
|
|
2758
|
+
|
|
2759
|
+
When the "current" version is updated, the provided body content is considered as the latest version. This latest body content
|
|
2760
|
+
will be attempted to be merged into the draft version through a content reconciliation algorithm. If two versions are significantly diverged,
|
|
2761
|
+
the latest provided content may entirely override what was previously in the draft.
|
|
2762
|
+
|
|
2763
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2764
|
+
Permission to view the page and its corresponding space. Permission to update pages in the space.
|
|
2765
|
+
"""
|
|
2766
|
+
return cast('_t.UpdatePageResponse', self._runtime.call('update_page', call_args({'id': id, 'body': body})))
|
|
2767
|
+
|
|
2768
|
+
def delete(self, *, id: int, purge: bool | Unset = UNSET, draft: bool | Unset = UNSET) -> None:
|
|
2769
|
+
"""
|
|
2770
|
+
Delete page
|
|
2771
|
+
|
|
2772
|
+
Delete a page by id.
|
|
2773
|
+
|
|
2774
|
+
By default this will delete pages that are non-drafts. To delete a page that is a draft, the endpoint must be called on a
|
|
2775
|
+
draft with the following param `draft=true`. Discarded drafts are not sent to the trash and are permanently deleted.
|
|
2776
|
+
|
|
2777
|
+
Deleting a page moves the page to the trash, where it can be restored later. To permanently delete a page (or "purge" it),
|
|
2778
|
+
the endpoint must be called on a **trashed** page with the following param `purge=true`.
|
|
2779
|
+
|
|
2780
|
+
**[Permissions](https://support.atlassian.com/confluence-cloud/docs/what-are-confluences-roles/) required**:
|
|
2781
|
+
Permission to view the page and its corresponding space.
|
|
2782
|
+
Permission to delete pages in the space.
|
|
2783
|
+
[`manage/content`](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) permission for the space (if attempting to purge).
|
|
2784
|
+
|
|
2785
|
+
**Note:** To find the display name for each permission ID, call the [Get available space permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) API.
|
|
2786
|
+
"""
|
|
2787
|
+
self._runtime.call('delete_page', call_args({'id': id, 'purge': purge, 'draft': draft}))
|
|
2788
|
+
|
|
2789
|
+
def update_title(self, *, id: int, status: _t.UpdatePageTitleBodyStatus, title: str) -> _t.UpdatePageTitleResponse:
|
|
2790
|
+
"""
|
|
2791
|
+
Update page title
|
|
2792
|
+
|
|
2793
|
+
Updates the title of a specified page.
|
|
2794
|
+
|
|
2795
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2796
|
+
Permission to view the page and its corresponding space. Permission to update pages in the space.
|
|
2797
|
+
"""
|
|
2798
|
+
return cast('_t.UpdatePageTitleResponse', self._runtime.call('update_page_title', call_args({'id': id}, {'body': {'status': status, 'title': title}}, required=frozenset({'body'}))))
|
|
2799
|
+
|
|
2800
|
+
def get_pages_in_space(self, *, id: int, depth: _t.GetPagesInSpaceDepth | Unset = UNSET, sort: _t.PageSortOrder | Unset = UNSET, status: builtins.list[_t.GetPagesInSpaceStatusItem] | Unset = UNSET, title: str | Unset = UNSET, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetPagesInSpaceResponse:
|
|
2801
|
+
"""
|
|
2802
|
+
Get pages in space
|
|
2803
|
+
|
|
2804
|
+
Returns all pages in a space. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
2805
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
2806
|
+
|
|
2807
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2808
|
+
Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space.
|
|
2809
|
+
Only pages that the user has permission to view will be returned.
|
|
2810
|
+
"""
|
|
2811
|
+
return cast('_t.GetPagesInSpaceResponse', self._runtime.call('get_pages_in_space', call_args({'id': id, 'depth': depth, 'sort': sort, 'status': status, 'title': title, 'body_format': body_format, 'cursor': cursor, 'limit': limit})))
|
|
2812
|
+
|
|
2813
|
+
class _RedactionsResource:
|
|
2814
|
+
"""Operations under ``redactions``."""
|
|
2815
|
+
|
|
2816
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2817
|
+
self._runtime = runtime
|
|
2818
|
+
|
|
2819
|
+
def post_redact_page(self, *, id: int, created_at: str | Unset = UNSET, clean_history: bool | None | Unset = UNSET, version_number: int | None | Unset = UNSET, body: _t.PostRedactPageBodyBody | Unset = UNSET, title: _t.PostRedactPageBodyTitle | Unset = UNSET) -> _t.RedactionResponse:
|
|
2820
|
+
"""
|
|
2821
|
+
Redact Content in a Confluence Page
|
|
2822
|
+
|
|
2823
|
+
Redacts sensitive content in a Confluence page by replacing specified text ranges with redaction markers.
|
|
2824
|
+
Each redaction in the response includes a unique UUID for restoration (except code block redactions).
|
|
2825
|
+
The response metadata items maintain the same order as the input redaction pointers, and completely
|
|
2826
|
+
overlapping redactions are merged into a single redaction with one UUID.
|
|
2827
|
+
|
|
2828
|
+
**Note**: This endpoint requires **Atlassian Guard Premium**.
|
|
2829
|
+
"""
|
|
2830
|
+
return cast('_t.RedactionResponse', self._runtime.call('post_redact_page', call_args({'id': id}, {'body': {'created_at': created_at, 'clean_history': clean_history, 'version_number': version_number, 'body': body, 'title': title}})))
|
|
2831
|
+
|
|
2832
|
+
def post_redact_blog(self, *, id: int, created_at: str | Unset = UNSET, clean_history: bool | None | Unset = UNSET, version_number: int | None | Unset = UNSET, body: _t.PostRedactBlogBodyBody | Unset = UNSET, title: _t.PostRedactBlogBodyTitle | Unset = UNSET) -> _t.RedactionResponse:
|
|
2833
|
+
"""
|
|
2834
|
+
Redact Content in a Confluence Blog Post
|
|
2835
|
+
|
|
2836
|
+
Redacts sensitive content in a Confluence blog post by replacing specified text ranges with redaction markers.
|
|
2837
|
+
Each redaction in the response includes a unique UUID for restoration (except code block redactions).
|
|
2838
|
+
The response metadata items maintain the same order as the input redaction pointers, and completely
|
|
2839
|
+
overlapping redactions are merged into a single redaction with one UUID.
|
|
2840
|
+
|
|
2841
|
+
**Note**: This endpoint requires **Atlassian Guard Premium**.
|
|
2842
|
+
"""
|
|
2843
|
+
return cast('_t.RedactionResponse', self._runtime.call('post_redact_blog', call_args({'id': id}, {'body': {'created_at': created_at, 'clean_history': clean_history, 'version_number': version_number, 'body': body, 'title': title}})))
|
|
2844
|
+
|
|
2845
|
+
class _SmartLinkResource:
|
|
2846
|
+
"""Operations under ``smart_link``."""
|
|
2847
|
+
|
|
2848
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2849
|
+
self._runtime = runtime
|
|
2850
|
+
|
|
2851
|
+
def create(self, *, space_id: str, title: str | Unset = UNSET, parent_id: str | Unset = UNSET, embed_url: str | Unset = UNSET) -> _t.CreateSmartLinkResponse:
|
|
2852
|
+
"""
|
|
2853
|
+
Create Smart Link in the content tree
|
|
2854
|
+
|
|
2855
|
+
Creates a Smart Link in the content tree in the space.
|
|
2856
|
+
|
|
2857
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2858
|
+
Permission to view the corresponding space. Permission to create a Smart Link in the content tree in the space.
|
|
2859
|
+
"""
|
|
2860
|
+
return cast('_t.CreateSmartLinkResponse', self._runtime.call('create_smart_link', call_args({}, {'body': {'space_id': space_id, 'title': title, 'parent_id': parent_id, 'embed_url': embed_url}}, required=frozenset({'body'}))))
|
|
2861
|
+
|
|
2862
|
+
def get(self, *, id: int, include_collaborators: bool | Unset = UNSET, include_direct_children: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_properties: bool | Unset = UNSET) -> _t.GetSmartLinkByIdResponse:
|
|
2863
|
+
"""
|
|
2864
|
+
Get Smart Link in the content tree by id
|
|
2865
|
+
|
|
2866
|
+
Returns a specific Smart Link in the content tree.
|
|
2867
|
+
|
|
2868
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2869
|
+
Permission to view the Smart Link in the content tree and its corresponding space.
|
|
2870
|
+
"""
|
|
2871
|
+
return cast('_t.GetSmartLinkByIdResponse', self._runtime.call('get_smart_link_by_id', call_args({'id': id, 'include_collaborators': include_collaborators, 'include_direct_children': include_direct_children, 'include_operations': include_operations, 'include_properties': include_properties})))
|
|
2872
|
+
|
|
2873
|
+
def delete(self, *, id: int) -> None:
|
|
2874
|
+
"""
|
|
2875
|
+
Delete Smart Link in the content tree
|
|
2876
|
+
|
|
2877
|
+
Delete a Smart Link in the content tree by id.
|
|
2878
|
+
|
|
2879
|
+
Deleting a Smart Link in the content tree moves the Smart Link to the trash, where it can be restored later
|
|
2880
|
+
|
|
2881
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2882
|
+
Permission to view the Smart Link in the content tree and its corresponding space.
|
|
2883
|
+
Permission to delete Smart Links in the content tree in the space.
|
|
2884
|
+
"""
|
|
2885
|
+
self._runtime.call('delete_smart_link', call_args({'id': id}))
|
|
2886
|
+
|
|
2887
|
+
class _SpaceResource:
|
|
2888
|
+
"""Operations under ``space``."""
|
|
2889
|
+
|
|
2890
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2891
|
+
self._runtime = runtime
|
|
2892
|
+
|
|
2893
|
+
def list_spaces(self, *, ids: builtins.list[int] | Unset = UNSET, keys: builtins.list[str] | Unset = UNSET, type_: _t.GetSpacesType | Unset = UNSET, status: _t.GetSpacesStatus | Unset = UNSET, labels: builtins.list[str] | Unset = UNSET, favorited_by: str | Unset = UNSET, not_favorited_by: str | Unset = UNSET, sort: _t.SpaceSortOrder | Unset = UNSET, description_format: _t.SpaceDescriptionBodyRepresentation | Unset = UNSET, include_icon: bool | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetSpacesResponse:
|
|
2894
|
+
"""
|
|
2895
|
+
Get spaces
|
|
2896
|
+
|
|
2897
|
+
Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the `limit` parameter and
|
|
2898
|
+
additional results (if available) will be available through the `next` URL present in the `Link` response header.
|
|
2899
|
+
|
|
2900
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2901
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
2902
|
+
Only spaces that the user has permission to view will be returned.
|
|
2903
|
+
"""
|
|
2904
|
+
return cast('_t.GetSpacesResponse', self._runtime.call('get_spaces', call_args({'ids': ids, 'keys': keys, 'type': type_, 'status': status, 'labels': labels, 'favorited_by': favorited_by, 'not_favorited_by': not_favorited_by, 'sort': sort, 'description_format': description_format, 'include_icon': include_icon, 'cursor': cursor, 'limit': limit})))
|
|
2905
|
+
|
|
2906
|
+
def create(self, *, name: str, key: str | Unset = UNSET, alias: str | Unset = UNSET, description: _t.CreateSpaceBodyDescription | Unset = UNSET, role_assignments: builtins.list[_t.CreateSpaceBodyRoleAssignmentsItem] | Unset = UNSET, copy_space_access_configuration: int | Unset = UNSET, create_private_space: bool | Unset = UNSET, template_key: str | Unset = UNSET) -> _t.CreateSpaceResponse:
|
|
2907
|
+
"""
|
|
2908
|
+
Create space
|
|
2909
|
+
|
|
2910
|
+
Creates a Space as specified in the payload.
|
|
2911
|
+
|
|
2912
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
2913
|
+
|
|
2914
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2915
|
+
Permission to create spaces.
|
|
2916
|
+
"""
|
|
2917
|
+
return cast('_t.CreateSpaceResponse', self._runtime.call('create_space', call_args({}, {'body': {'name': name, 'key': key, 'alias': alias, 'description': description, 'role_assignments': role_assignments, 'copy_space_access_configuration': copy_space_access_configuration, 'create_private_space': create_private_space, 'template_key': template_key}}, required=frozenset({'body'}))))
|
|
2918
|
+
|
|
2919
|
+
def get(self, *, id: int, description_format: _t.SpaceDescriptionBodyRepresentation | Unset = UNSET, include_icon: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_properties: bool | Unset = UNSET, include_permissions: bool | Unset = UNSET, include_role_assignments: bool | Unset = UNSET, include_labels: bool | Unset = UNSET) -> _t.GetSpaceByIdResponse:
|
|
2920
|
+
"""
|
|
2921
|
+
Get space by id
|
|
2922
|
+
|
|
2923
|
+
Returns a specific space.
|
|
2924
|
+
|
|
2925
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2926
|
+
Permission to view the space.
|
|
2927
|
+
"""
|
|
2928
|
+
return cast('_t.GetSpaceByIdResponse', self._runtime.call('get_space_by_id', call_args({'id': id, 'description_format': description_format, 'include_icon': include_icon, 'include_operations': include_operations, 'include_properties': include_properties, 'include_permissions': include_permissions, 'include_role_assignments': include_role_assignments, 'include_labels': include_labels})))
|
|
2929
|
+
|
|
2930
|
+
class _SpacePermissionTransitionResource:
|
|
2931
|
+
"""Operations under ``space_permission_transition``."""
|
|
2932
|
+
|
|
2933
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
2934
|
+
self._runtime = runtime
|
|
2935
|
+
|
|
2936
|
+
def list_space_permission_combinations(self, *, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.ListSpacePermissionCombinationsResponse:
|
|
2937
|
+
"""
|
|
2938
|
+
List unassigned space permission combinations
|
|
2939
|
+
|
|
2940
|
+
Lists the unique unassigned space permission combinations currently present on the tenant.
|
|
2941
|
+
Combinations that already map to a space role are filtered out server-side. Each row carries
|
|
2942
|
+
the decoded set of space permissions and the principal types that currently hold the
|
|
2943
|
+
combination — these inform which `principalType` values are valid to include in the matching
|
|
2944
|
+
bulk role-assignments request.
|
|
2945
|
+
|
|
2946
|
+
Results are always sorted by `principalCount` descending. Sort field and sort order are not
|
|
2947
|
+
configurable; page size is controlled by the `limit` query parameter (default 25, min 1,
|
|
2948
|
+
max 250). Use the `cursor` field to page through additional results. The `generatedAt` field
|
|
2949
|
+
reflects the last audit run that populated the combinations table — call the
|
|
2950
|
+
generate-combinations endpoint to refresh stale data.
|
|
2951
|
+
|
|
2952
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2953
|
+
User must be a Confluence administrator.
|
|
2954
|
+
"""
|
|
2955
|
+
return cast('_t.ListSpacePermissionCombinationsResponse', self._runtime.call('list_space_permission_combinations', call_args({'cursor': cursor, 'limit': limit})))
|
|
2956
|
+
|
|
2957
|
+
def generate_space_permission_combinations(self) -> _t.BulkTransitionTaskResponse:
|
|
2958
|
+
"""
|
|
2959
|
+
Generate space permission combinations
|
|
2960
|
+
|
|
2961
|
+
Submits a task to refresh the space permission combinations in the database, which identifies
|
|
2962
|
+
all unique permission combinations across the site. This provides permission combination IDs
|
|
2963
|
+
that can be used with the assign-roles and remove-access endpoints.
|
|
2964
|
+
|
|
2965
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2966
|
+
User must be a Confluence administrator.
|
|
2967
|
+
"""
|
|
2968
|
+
return cast('_t.BulkTransitionTaskResponse', self._runtime.call('generate_space_permission_combinations', call_args({})))
|
|
2969
|
+
|
|
2970
|
+
def bulk_assign_space_permission_roles(self, *, assignments: builtins.list[_t.BulkTransitionRoleAssignment], space_selection: _t.BulkTransitionSpaceSelection) -> _t.BulkTransitionTaskResponse:
|
|
2971
|
+
"""
|
|
2972
|
+
Bulk assign space permission roles
|
|
2973
|
+
|
|
2974
|
+
Bulk assigns roles for one or more permission combination IDs obtained from the space permission
|
|
2975
|
+
combinations. Supports targeting all spaces, specific spaces, or excluding specific spaces.
|
|
2976
|
+
|
|
2977
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2978
|
+
User must be a Confluence administrator.
|
|
2979
|
+
"""
|
|
2980
|
+
return cast('_t.BulkTransitionTaskResponse', self._runtime.call('bulk_assign_space_permission_roles', call_args({}, {'body': {'assignments': assignments, 'space_selection': space_selection}}, required=frozenset({'body'}))))
|
|
2981
|
+
|
|
2982
|
+
def bulk_remove_space_permission_access(self, *, permission_combination_ids: builtins.list[str], space_selection: _t.BulkTransitionSpaceSelection) -> _t.BulkTransitionTaskResponse:
|
|
2983
|
+
"""
|
|
2984
|
+
Bulk remove space permission access
|
|
2985
|
+
|
|
2986
|
+
Bulk removes access for one or more permission combination IDs obtained from the space permission
|
|
2987
|
+
combinations. This removes all space permissions for the specified combinations across
|
|
2988
|
+
the targeted spaces.
|
|
2989
|
+
|
|
2990
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
2991
|
+
User must be a Confluence administrator.
|
|
2992
|
+
"""
|
|
2993
|
+
return cast('_t.BulkTransitionTaskResponse', self._runtime.call('bulk_remove_space_permission_access', call_args({}, {'body': {'permission_combination_ids': permission_combination_ids, 'space_selection': space_selection}}, required=frozenset({'body'}))))
|
|
2994
|
+
|
|
2995
|
+
def get_task_status(self, *, task_id: str) -> _t.BulkTransitionTaskStatusResponse:
|
|
2996
|
+
"""
|
|
2997
|
+
Get space permission transition task status
|
|
2998
|
+
|
|
2999
|
+
Retrieves the status of an async space permission transition task. Use the taskId returned
|
|
3000
|
+
from the generate-combinations, assign-roles, or remove-access endpoints to poll for
|
|
3001
|
+
progress and completion.
|
|
3002
|
+
|
|
3003
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3004
|
+
User must be a Confluence administrator.
|
|
3005
|
+
"""
|
|
3006
|
+
return cast('_t.BulkTransitionTaskStatusResponse', self._runtime.call('get_space_permission_transition_task_status', call_args({'task_id': task_id})))
|
|
3007
|
+
|
|
3008
|
+
class _SpacePermissionsResource:
|
|
3009
|
+
"""Operations under ``space_permissions``."""
|
|
3010
|
+
|
|
3011
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
3012
|
+
self._runtime = runtime
|
|
3013
|
+
|
|
3014
|
+
def list_assignments(self, *, id: int, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetSpacePermissionsAssignmentsResponse:
|
|
3015
|
+
"""
|
|
3016
|
+
Get space permissions assignments
|
|
3017
|
+
|
|
3018
|
+
Returns space permission assignments for a specific space.
|
|
3019
|
+
|
|
3020
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3021
|
+
Permission to view the space.
|
|
3022
|
+
"""
|
|
3023
|
+
return cast('_t.GetSpacePermissionsAssignmentsResponse', self._runtime.call('get_space_permissions_assignments', call_args({'id': id, 'cursor': cursor, 'limit': limit})))
|
|
3024
|
+
|
|
3025
|
+
def list(self, *, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetAvailableSpacePermissionsResponse:
|
|
3026
|
+
"""
|
|
3027
|
+
Get available space permissions
|
|
3028
|
+
|
|
3029
|
+
Retrieves the available space permissions.
|
|
3030
|
+
|
|
3031
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3032
|
+
|
|
3033
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3034
|
+
Permission to access the Confluence site.
|
|
3035
|
+
"""
|
|
3036
|
+
return cast('_t.GetAvailableSpacePermissionsResponse', self._runtime.call('get_available_space_permissions', call_args({'cursor': cursor, 'limit': limit})))
|
|
3037
|
+
|
|
3038
|
+
class _SpacePropertiesResource:
|
|
3039
|
+
"""Operations under ``space_properties``."""
|
|
3040
|
+
|
|
3041
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
3042
|
+
self._runtime = runtime
|
|
3043
|
+
|
|
3044
|
+
def list(self, *, space_id: int, key: str | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetSpacePropertiesResponse:
|
|
3045
|
+
"""
|
|
3046
|
+
Get space properties in space
|
|
3047
|
+
|
|
3048
|
+
Returns all properties for the given space. Space properties are a key-value storage associated with a space.
|
|
3049
|
+
The limit parameter specifies the maximum number of results returned in a single response. Use the `link` response header
|
|
3050
|
+
to paginate through additional results.
|
|
3051
|
+
|
|
3052
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3053
|
+
Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space.
|
|
3054
|
+
"""
|
|
3055
|
+
return cast('_t.GetSpacePropertiesResponse', self._runtime.call('get_space_properties', call_args({'space_id': space_id, 'key': key, 'cursor': cursor, 'limit': limit})))
|
|
3056
|
+
|
|
3057
|
+
def create(self, *, space_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET) -> _t.SpaceProperty:
|
|
3058
|
+
"""
|
|
3059
|
+
Create space property in space
|
|
3060
|
+
|
|
3061
|
+
Creates a new space property.
|
|
3062
|
+
|
|
3063
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3064
|
+
Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.
|
|
3065
|
+
"""
|
|
3066
|
+
return cast('_t.SpaceProperty', self._runtime.call('create_space_property', call_args({'space_id': space_id}, {'body': {'key': key, 'value': value}})))
|
|
3067
|
+
|
|
3068
|
+
def get(self, *, space_id: int, property_id: int) -> _t.SpaceProperty:
|
|
3069
|
+
"""
|
|
3070
|
+
Get space property by id
|
|
3071
|
+
|
|
3072
|
+
Retrieve a space property by its id.
|
|
3073
|
+
|
|
3074
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3075
|
+
Permission to access the Confluence site ('Can use' global permission) and 'View' permission for the space.
|
|
3076
|
+
"""
|
|
3077
|
+
return cast('_t.SpaceProperty', self._runtime.call('get_space_property_by_id', call_args({'space_id': space_id, 'property_id': property_id})))
|
|
3078
|
+
|
|
3079
|
+
def update(self, *, space_id: int, property_id: int, key: str | Unset = UNSET, value: Any | Unset = UNSET, version: _t.SpacePropertyUpdateRequestVersion | Unset = UNSET) -> _t.SpaceProperty:
|
|
3080
|
+
"""
|
|
3081
|
+
Update space property by id
|
|
3082
|
+
|
|
3083
|
+
Update a space property by its id.
|
|
3084
|
+
|
|
3085
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3086
|
+
Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.
|
|
3087
|
+
"""
|
|
3088
|
+
return cast('_t.SpaceProperty', self._runtime.call('update_space_property_by_id', call_args({'space_id': space_id, 'property_id': property_id}, {'body': {'key': key, 'value': value, 'version': version}})))
|
|
3089
|
+
|
|
3090
|
+
def delete(self, *, space_id: int, property_id: int) -> None:
|
|
3091
|
+
"""
|
|
3092
|
+
Delete space property by id
|
|
3093
|
+
|
|
3094
|
+
Deletes a space property by its id.
|
|
3095
|
+
|
|
3096
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3097
|
+
Permission to access the Confluence site ('Can use' global permission) and 'Admin' permission for the space.
|
|
3098
|
+
"""
|
|
3099
|
+
self._runtime.call('delete_space_property_by_id', call_args({'space_id': space_id, 'property_id': property_id}))
|
|
3100
|
+
|
|
3101
|
+
class _SpaceRolesResource:
|
|
3102
|
+
"""Operations under ``space_roles``."""
|
|
3103
|
+
|
|
3104
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
3105
|
+
self._runtime = runtime
|
|
3106
|
+
|
|
3107
|
+
def list(self, *, space_id: str | Unset = UNSET, role_type: str | Unset = UNSET, principal_id: str | Unset = UNSET, principal_type: _t.PrincipalType | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetAvailableSpaceRolesResponse:
|
|
3108
|
+
"""
|
|
3109
|
+
Get available space roles
|
|
3110
|
+
|
|
3111
|
+
Retrieves the available space roles.
|
|
3112
|
+
|
|
3113
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3114
|
+
|
|
3115
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3116
|
+
Permission to access the Confluence site; if requesting a certain space's roles, permission to view the space.
|
|
3117
|
+
"""
|
|
3118
|
+
return cast('_t.GetAvailableSpaceRolesResponse', self._runtime.call('get_available_space_roles', call_args({'space_id': space_id, 'role_type': role_type, 'principal_id': principal_id, 'principal_type': principal_type, 'cursor': cursor, 'limit': limit})))
|
|
3119
|
+
|
|
3120
|
+
def create(self, *, name: str, description: str, space_permissions: builtins.list[str]) -> _t.SpaceRole:
|
|
3121
|
+
"""
|
|
3122
|
+
Create a space role
|
|
3123
|
+
|
|
3124
|
+
Create a space role.
|
|
3125
|
+
|
|
3126
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3127
|
+
|
|
3128
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3129
|
+
User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.
|
|
3130
|
+
"""
|
|
3131
|
+
return cast('_t.SpaceRole', self._runtime.call('create_space_role', call_args({}, {'body': {'name': name, 'description': description, 'space_permissions': space_permissions}}, required=frozenset({'body'}))))
|
|
3132
|
+
|
|
3133
|
+
def get(self, *, id: int) -> _t.GetSpaceRolesByIdResponse:
|
|
3134
|
+
"""
|
|
3135
|
+
Get space role by ID
|
|
3136
|
+
|
|
3137
|
+
Retrieves the space role by ID.
|
|
3138
|
+
|
|
3139
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3140
|
+
|
|
3141
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3142
|
+
Permission to access the Confluence site.
|
|
3143
|
+
"""
|
|
3144
|
+
return cast('_t.GetSpaceRolesByIdResponse', self._runtime.call('get_space_roles_by_id', call_args({'id': id})))
|
|
3145
|
+
|
|
3146
|
+
def update(self, *, id: str, name: str, description: str, space_permissions: builtins.list[str], anonymous_reassignment_role_id: str | Unset = UNSET, guest_reassignment_role_id: str | Unset = UNSET) -> _t.UpdateSpaceRoleResponse:
|
|
3147
|
+
"""
|
|
3148
|
+
Update a space role
|
|
3149
|
+
|
|
3150
|
+
Update a space role.
|
|
3151
|
+
|
|
3152
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3153
|
+
|
|
3154
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3155
|
+
User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.
|
|
3156
|
+
"""
|
|
3157
|
+
return cast('_t.UpdateSpaceRoleResponse', self._runtime.call('update_space_role', call_args({'id': id}, {'body': {'name': name, 'description': description, 'space_permissions': space_permissions, 'anonymous_reassignment_role_id': anonymous_reassignment_role_id, 'guest_reassignment_role_id': guest_reassignment_role_id}}, required=frozenset({'body'}))))
|
|
3158
|
+
|
|
3159
|
+
def delete(self, *, id: str) -> _t.DeleteSpaceRoleResponse:
|
|
3160
|
+
"""
|
|
3161
|
+
Delete a space role
|
|
3162
|
+
|
|
3163
|
+
Delete a space role
|
|
3164
|
+
|
|
3165
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3166
|
+
|
|
3167
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3168
|
+
User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.
|
|
3169
|
+
"""
|
|
3170
|
+
return cast('_t.DeleteSpaceRoleResponse', self._runtime.call('delete_space_role', call_args({'id': id})))
|
|
3171
|
+
|
|
3172
|
+
def get_mode(self) -> _t.GetSpaceRoleModeResponse:
|
|
3173
|
+
"""
|
|
3174
|
+
Get space role mode
|
|
3175
|
+
|
|
3176
|
+
Retrieves the space role mode.
|
|
3177
|
+
|
|
3178
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3179
|
+
|
|
3180
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3181
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
3182
|
+
"""
|
|
3183
|
+
return cast('_t.GetSpaceRoleModeResponse', self._runtime.call('get_space_role_mode', call_args({})))
|
|
3184
|
+
|
|
3185
|
+
def list_assignments(self, *, id: int, role_id: str | Unset = UNSET, role_type: str | Unset = UNSET, principal_id: str | Unset = UNSET, principal_type: _t.PrincipalType | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetSpaceRoleAssignmentsResponse:
|
|
3186
|
+
"""
|
|
3187
|
+
Get space role assignments
|
|
3188
|
+
|
|
3189
|
+
Retrieves the space role assignments.
|
|
3190
|
+
|
|
3191
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3192
|
+
|
|
3193
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3194
|
+
Permission to view the space.
|
|
3195
|
+
"""
|
|
3196
|
+
return cast('_t.GetSpaceRoleAssignmentsResponse', self._runtime.call('get_space_role_assignments', call_args({'id': id, 'role_id': role_id, 'role_type': role_type, 'principal_id': principal_id, 'principal_type': principal_type, 'cursor': cursor, 'limit': limit})))
|
|
3197
|
+
|
|
3198
|
+
def set_assignments(self, *, id: int, body: builtins.list[_t.SetSpaceRoleAssignmentsBodyItem]) -> _t.SetSpaceRoleAssignmentsResponse:
|
|
3199
|
+
"""
|
|
3200
|
+
Set space role assignments
|
|
3201
|
+
|
|
3202
|
+
Sets space role assignments as specified in the payload. For each entry, if `roleId` is provided
|
|
3203
|
+
the principal is assigned to that role. If `roleId` is omitted, the role assignment for that principal is removed, if it exists.
|
|
3204
|
+
|
|
3205
|
+
Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/).
|
|
3206
|
+
|
|
3207
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3208
|
+
Permission to manage roles in the space.
|
|
3209
|
+
"""
|
|
3210
|
+
return cast('_t.SetSpaceRoleAssignmentsResponse', self._runtime.call('set_space_role_assignments', call_args({'id': id, 'body': body})))
|
|
3211
|
+
|
|
3212
|
+
class _TaskResource:
|
|
3213
|
+
"""Operations under ``task``."""
|
|
3214
|
+
|
|
3215
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
3216
|
+
self._runtime = runtime
|
|
3217
|
+
|
|
3218
|
+
def list_tasks(self, *, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, include_blank_tasks: bool | Unset = UNSET, status: _t.GetTasksStatus | Unset = UNSET, task_id: builtins.list[int] | Unset = UNSET, space_id: builtins.list[int] | Unset = UNSET, page_id: builtins.list[int] | Unset = UNSET, blogpost_id: builtins.list[int] | Unset = UNSET, created_by: builtins.list[str] | Unset = UNSET, assigned_to: builtins.list[str] | Unset = UNSET, completed_by: builtins.list[str] | Unset = UNSET, created_at_from: int | Unset = UNSET, created_at_to: int | Unset = UNSET, due_at_from: int | Unset = UNSET, due_at_to: int | Unset = UNSET, completed_at_from: int | Unset = UNSET, completed_at_to: int | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET) -> _t.GetTasksResponse:
|
|
3219
|
+
"""
|
|
3220
|
+
Get tasks
|
|
3221
|
+
|
|
3222
|
+
Returns all tasks. The number of results is limited by the `limit` parameter and additional results (if available)
|
|
3223
|
+
will be available through the `next` URL present in the `Link` response header.
|
|
3224
|
+
|
|
3225
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3226
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
3227
|
+
Only tasks that the user has permission to view will be returned.
|
|
3228
|
+
"""
|
|
3229
|
+
return cast('_t.GetTasksResponse', self._runtime.call('get_tasks', call_args({'body_format': body_format, 'include_blank_tasks': include_blank_tasks, 'status': status, 'task_id': task_id, 'space_id': space_id, 'page_id': page_id, 'blogpost_id': blogpost_id, 'created_by': created_by, 'assigned_to': assigned_to, 'completed_by': completed_by, 'created_at_from': created_at_from, 'created_at_to': created_at_to, 'due_at_from': due_at_from, 'due_at_to': due_at_to, 'completed_at_from': completed_at_from, 'completed_at_to': completed_at_to, 'cursor': cursor, 'limit': limit})))
|
|
3230
|
+
|
|
3231
|
+
def get(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET) -> _t.Task:
|
|
3232
|
+
"""
|
|
3233
|
+
Get task by id
|
|
3234
|
+
|
|
3235
|
+
Returns a specific task.
|
|
3236
|
+
|
|
3237
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3238
|
+
Permission to view the containing page or blog post and its corresponding space.
|
|
3239
|
+
"""
|
|
3240
|
+
return cast('_t.Task', self._runtime.call('get_task_by_id', call_args({'id': id, 'body_format': body_format})))
|
|
3241
|
+
|
|
3242
|
+
def update(self, *, id: int, body: _t.UpdateTaskBody, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET) -> _t.Task:
|
|
3243
|
+
"""
|
|
3244
|
+
Update task
|
|
3245
|
+
|
|
3246
|
+
Update a task by id. This endpoint currently only supports updating task status.
|
|
3247
|
+
|
|
3248
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3249
|
+
Permission to edit the containing page or blog post and view its corresponding space.
|
|
3250
|
+
"""
|
|
3251
|
+
return cast('_t.Task', self._runtime.call('update_task', call_args({'id': id, 'body_format': body_format, 'body': body})))
|
|
3252
|
+
|
|
3253
|
+
class _UserResource:
|
|
3254
|
+
"""Operations under ``user``."""
|
|
3255
|
+
|
|
3256
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
3257
|
+
self._runtime = runtime
|
|
3258
|
+
|
|
3259
|
+
def create_bulk_lookup(self, *, account_ids: builtins.list[str]) -> _t.CreateBulkUserLookupResponse:
|
|
3260
|
+
"""
|
|
3261
|
+
Create bulk user lookup using ids
|
|
3262
|
+
|
|
3263
|
+
Returns user details for the ids provided in the request body.
|
|
3264
|
+
|
|
3265
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3266
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
3267
|
+
The user must be able to view user profiles in the Confluence site.
|
|
3268
|
+
"""
|
|
3269
|
+
return cast('_t.CreateBulkUserLookupResponse', self._runtime.call('create_bulk_user_lookup', call_args({}, {'body': {'account_ids': account_ids}}, required=frozenset({'body'}))))
|
|
3270
|
+
|
|
3271
|
+
def check_access_by_email(self, *, emails: builtins.list[str]) -> _t.CheckAccessByEmailResponse:
|
|
3272
|
+
"""
|
|
3273
|
+
Check site access for a list of emails
|
|
3274
|
+
|
|
3275
|
+
Returns the list of emails from the input list that do not have access to site.
|
|
3276
|
+
|
|
3277
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3278
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
3279
|
+
"""
|
|
3280
|
+
return cast('_t.CheckAccessByEmailResponse', self._runtime.call('check_access_by_email', call_args({}, {'body': {'emails': emails}}, required=frozenset({'body'}))))
|
|
3281
|
+
|
|
3282
|
+
def invite_by_email(self, *, emails: builtins.list[str]) -> None:
|
|
3283
|
+
"""
|
|
3284
|
+
Invite a list of emails to the site
|
|
3285
|
+
|
|
3286
|
+
Invite a list of emails to the site.
|
|
3287
|
+
|
|
3288
|
+
Ignores all invalid emails and no action is taken for the emails that already have access to the site.
|
|
3289
|
+
|
|
3290
|
+
<b>NOTE:</b> This API is asynchronous and may take some time to complete.
|
|
3291
|
+
|
|
3292
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3293
|
+
Permission to access the Confluence site ('Can use' global permission).
|
|
3294
|
+
"""
|
|
3295
|
+
self._runtime.call('invite_by_email', call_args({}, {'body': {'emails': emails}}, required=frozenset({'body'})))
|
|
3296
|
+
|
|
3297
|
+
class _VersionResource:
|
|
3298
|
+
"""Operations under ``version``."""
|
|
3299
|
+
|
|
3300
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
3301
|
+
self._runtime = runtime
|
|
3302
|
+
|
|
3303
|
+
def list_attachment_versions(self, *, id: str, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.VersionSortOrder | Unset = UNSET) -> _t.GetAttachmentVersionsResponse:
|
|
3304
|
+
"""
|
|
3305
|
+
Get attachment versions
|
|
3306
|
+
|
|
3307
|
+
Returns the versions of specific attachment.
|
|
3308
|
+
|
|
3309
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3310
|
+
Permission to view the attachment and its corresponding space.
|
|
3311
|
+
"""
|
|
3312
|
+
return cast('_t.GetAttachmentVersionsResponse', self._runtime.call('get_attachment_versions', call_args({'id': id, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
3313
|
+
|
|
3314
|
+
def list_attachment_details(self, *, attachment_id: str, version_number: int) -> _t.DetailedVersion:
|
|
3315
|
+
"""
|
|
3316
|
+
Get version details for attachment version
|
|
3317
|
+
|
|
3318
|
+
Retrieves version details for the specified attachment and version number.
|
|
3319
|
+
|
|
3320
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3321
|
+
Permission to view the attachment.
|
|
3322
|
+
"""
|
|
3323
|
+
return cast('_t.DetailedVersion', self._runtime.call('get_attachment_version_details', call_args({'attachment_id': attachment_id, 'version_number': version_number})))
|
|
3324
|
+
|
|
3325
|
+
def list_blog_post_versions(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.VersionSortOrder | Unset = UNSET) -> _t.GetBlogPostVersionsResponse:
|
|
3326
|
+
"""
|
|
3327
|
+
Get blog post versions
|
|
3328
|
+
|
|
3329
|
+
Returns the versions of specific blog post.
|
|
3330
|
+
|
|
3331
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3332
|
+
Permission to view the blog post and its corresponding space.
|
|
3333
|
+
"""
|
|
3334
|
+
return cast('_t.GetBlogPostVersionsResponse', self._runtime.call('get_blog_post_versions', call_args({'id': id, 'body_format': body_format, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
3335
|
+
|
|
3336
|
+
def list_blog_post_details(self, *, blogpost_id: int, version_number: int) -> _t.DetailedVersion:
|
|
3337
|
+
"""
|
|
3338
|
+
Get version details for blog post version
|
|
3339
|
+
|
|
3340
|
+
Retrieves version details for the specified blog post and version number.
|
|
3341
|
+
|
|
3342
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3343
|
+
Permission to view the blog post.
|
|
3344
|
+
"""
|
|
3345
|
+
return cast('_t.DetailedVersion', self._runtime.call('get_blog_post_version_details', call_args({'blogpost_id': blogpost_id, 'version_number': version_number})))
|
|
3346
|
+
|
|
3347
|
+
def list_page_versions(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.VersionSortOrder | Unset = UNSET) -> _t.GetPageVersionsResponse:
|
|
3348
|
+
"""
|
|
3349
|
+
Get page versions
|
|
3350
|
+
|
|
3351
|
+
Returns the versions of specific page.
|
|
3352
|
+
|
|
3353
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3354
|
+
Permission to view the page and its corresponding space.
|
|
3355
|
+
"""
|
|
3356
|
+
return cast('_t.GetPageVersionsResponse', self._runtime.call('get_page_versions', call_args({'id': id, 'body_format': body_format, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
3357
|
+
|
|
3358
|
+
def list_page_details(self, *, page_id: int, version_number: int) -> _t.DetailedVersion:
|
|
3359
|
+
"""
|
|
3360
|
+
Get version details for page version
|
|
3361
|
+
|
|
3362
|
+
Retrieves version details for the specified page and version number.
|
|
3363
|
+
|
|
3364
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3365
|
+
Permission to view the page.
|
|
3366
|
+
"""
|
|
3367
|
+
return cast('_t.DetailedVersion', self._runtime.call('get_page_version_details', call_args({'page_id': page_id, 'version_number': version_number})))
|
|
3368
|
+
|
|
3369
|
+
def list_custom_content_versions(self, *, custom_content_id: int, body_format: _t.CustomContentBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.VersionSortOrder | Unset = UNSET) -> _t.GetCustomContentVersionsResponse:
|
|
3370
|
+
"""
|
|
3371
|
+
Get custom content versions
|
|
3372
|
+
|
|
3373
|
+
Returns the versions of specific custom content.
|
|
3374
|
+
|
|
3375
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3376
|
+
Permission to view the custom content and its corresponding page and space.
|
|
3377
|
+
"""
|
|
3378
|
+
return cast('_t.GetCustomContentVersionsResponse', self._runtime.call('get_custom_content_versions', call_args({'custom_content_id': custom_content_id, 'body_format': body_format, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
3379
|
+
|
|
3380
|
+
def list_custom_content_details(self, *, custom_content_id: int, version_number: int) -> _t.DetailedVersion:
|
|
3381
|
+
"""
|
|
3382
|
+
Get version details for custom content version
|
|
3383
|
+
|
|
3384
|
+
Retrieves version details for the specified custom content and version number.
|
|
3385
|
+
|
|
3386
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3387
|
+
Permission to view the page.
|
|
3388
|
+
"""
|
|
3389
|
+
return cast('_t.DetailedVersion', self._runtime.call('get_custom_content_version_details', call_args({'custom_content_id': custom_content_id, 'version_number': version_number})))
|
|
3390
|
+
|
|
3391
|
+
def list_footer_comment_versions(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.VersionSortOrder | Unset = UNSET) -> _t.GetFooterCommentVersionsResponse:
|
|
3392
|
+
"""
|
|
3393
|
+
Get footer comment versions
|
|
3394
|
+
|
|
3395
|
+
Retrieves the versions of the specified footer comment.
|
|
3396
|
+
|
|
3397
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3398
|
+
Permission to view the content of the page or blog post and its corresponding space.
|
|
3399
|
+
"""
|
|
3400
|
+
return cast('_t.GetFooterCommentVersionsResponse', self._runtime.call('get_footer_comment_versions', call_args({'id': id, 'body_format': body_format, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
3401
|
+
|
|
3402
|
+
def list_footer_comment_details(self, *, id: int, version_number: int) -> _t.DetailedVersion:
|
|
3403
|
+
"""
|
|
3404
|
+
Get version details for footer comment version
|
|
3405
|
+
|
|
3406
|
+
Retrieves version details for the specified footer comment version.
|
|
3407
|
+
|
|
3408
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3409
|
+
Permission to view the content of the page or blog post and its corresponding space.
|
|
3410
|
+
"""
|
|
3411
|
+
return cast('_t.DetailedVersion', self._runtime.call('get_footer_comment_version_details', call_args({'id': id, 'version_number': version_number})))
|
|
3412
|
+
|
|
3413
|
+
def list_inline_comment_versions(self, *, id: int, body_format: _t.PrimaryBodyRepresentation | Unset = UNSET, cursor: str | Unset = UNSET, limit: int | Unset = UNSET, sort: _t.VersionSortOrder | Unset = UNSET) -> _t.GetInlineCommentVersionsResponse:
|
|
3414
|
+
"""
|
|
3415
|
+
Get inline comment versions
|
|
3416
|
+
|
|
3417
|
+
Retrieves the versions of the specified inline comment.
|
|
3418
|
+
|
|
3419
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3420
|
+
Permission to view the content of the page or blog post and its corresponding space.
|
|
3421
|
+
"""
|
|
3422
|
+
return cast('_t.GetInlineCommentVersionsResponse', self._runtime.call('get_inline_comment_versions', call_args({'id': id, 'body_format': body_format, 'cursor': cursor, 'limit': limit, 'sort': sort})))
|
|
3423
|
+
|
|
3424
|
+
def list_inline_comment_details(self, *, id: int, version_number: int) -> _t.DetailedVersion:
|
|
3425
|
+
"""
|
|
3426
|
+
Get version details for inline comment version
|
|
3427
|
+
|
|
3428
|
+
Retrieves version details for the specified inline comment version.
|
|
3429
|
+
|
|
3430
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3431
|
+
Permission to view the content of the page or blog post and its corresponding space.
|
|
3432
|
+
"""
|
|
3433
|
+
return cast('_t.DetailedVersion', self._runtime.call('get_inline_comment_version_details', call_args({'id': id, 'version_number': version_number})))
|
|
3434
|
+
|
|
3435
|
+
class _WhiteboardResource:
|
|
3436
|
+
"""Operations under ``whiteboard``."""
|
|
3437
|
+
|
|
3438
|
+
def __init__(self, runtime: RuntimeClient) -> None:
|
|
3439
|
+
self._runtime = runtime
|
|
3440
|
+
|
|
3441
|
+
def create(self, *, space_id: str, private: bool | Unset = UNSET, title: str | Unset = UNSET, parent_id: str | Unset = UNSET, template_key: _t.CreateWhiteboardBodyTemplateKey | Unset = UNSET, locale: _t.CreateWhiteboardBodyLocale | Unset = UNSET) -> _t.CreateWhiteboardResponse:
|
|
3442
|
+
"""
|
|
3443
|
+
Create whiteboard
|
|
3444
|
+
|
|
3445
|
+
Creates a whiteboard in the space.
|
|
3446
|
+
|
|
3447
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3448
|
+
Permission to view the corresponding space. Permission to create a whiteboard in the space.
|
|
3449
|
+
"""
|
|
3450
|
+
return cast('_t.CreateWhiteboardResponse', self._runtime.call('create_whiteboard', call_args({'private': private}, {'body': {'space_id': space_id, 'title': title, 'parent_id': parent_id, 'template_key': template_key, 'locale': locale}}, required=frozenset({'body'}))))
|
|
3451
|
+
|
|
3452
|
+
def get(self, *, id: int, include_collaborators: bool | Unset = UNSET, include_direct_children: bool | Unset = UNSET, include_operations: bool | Unset = UNSET, include_properties: bool | Unset = UNSET) -> _t.GetWhiteboardByIdResponse:
|
|
3453
|
+
"""
|
|
3454
|
+
Get whiteboard by id
|
|
3455
|
+
|
|
3456
|
+
Returns a specific whiteboard.
|
|
3457
|
+
|
|
3458
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3459
|
+
Permission to view the whiteboard and its corresponding space.
|
|
3460
|
+
"""
|
|
3461
|
+
return cast('_t.GetWhiteboardByIdResponse', self._runtime.call('get_whiteboard_by_id', call_args({'id': id, 'include_collaborators': include_collaborators, 'include_direct_children': include_direct_children, 'include_operations': include_operations, 'include_properties': include_properties})))
|
|
3462
|
+
|
|
3463
|
+
def delete(self, *, id: int) -> None:
|
|
3464
|
+
"""
|
|
3465
|
+
Delete whiteboard
|
|
3466
|
+
|
|
3467
|
+
Delete a whiteboard by id.
|
|
3468
|
+
|
|
3469
|
+
Deleting a whiteboard moves the whiteboard to the trash, where it can be restored later
|
|
3470
|
+
|
|
3471
|
+
**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
3472
|
+
Permission to view the whiteboard and its corresponding space.
|
|
3473
|
+
Permission to delete whiteboards in the space.
|
|
3474
|
+
"""
|
|
3475
|
+
self._runtime.call('delete_whiteboard', call_args({'id': id}))
|
|
3476
|
+
|
|
3477
|
+
|
|
3478
|
+
class Client:
|
|
3479
|
+
"""
|
|
3480
|
+
The Confluence Cloud REST API v2 client.
|
|
3481
|
+
|
|
3482
|
+
Default base URL: https://your-site.atlassian.net
|
|
3483
|
+
"""
|
|
3484
|
+
|
|
3485
|
+
def __init__(
|
|
3486
|
+
self,
|
|
3487
|
+
*,
|
|
3488
|
+
base_url: str | None = None,
|
|
3489
|
+
auth: AuthProvider | None = None,
|
|
3490
|
+
transport: Transport | None = None,
|
|
3491
|
+
middleware: Sequence[Middleware] | None = None,
|
|
3492
|
+
validate: bool = True,
|
|
3493
|
+
timeout: float = 30.0,
|
|
3494
|
+
allow_private: bool = False,
|
|
3495
|
+
response_validation: str = "strict",
|
|
3496
|
+
proxy: str | None = None,
|
|
3497
|
+
protocols: Mapping[str, Any] | None = None,
|
|
3498
|
+
hooks: Sequence[Any] = (),
|
|
3499
|
+
) -> None:
|
|
3500
|
+
self._runtime = RuntimeClient(
|
|
3501
|
+
_model(),
|
|
3502
|
+
base_url=base_url,
|
|
3503
|
+
auth=auth,
|
|
3504
|
+
transport=transport,
|
|
3505
|
+
middleware=middleware,
|
|
3506
|
+
validate=validate,
|
|
3507
|
+
timeout=timeout,
|
|
3508
|
+
allow_private=allow_private,
|
|
3509
|
+
response_validation=response_validation,
|
|
3510
|
+
proxy=proxy,
|
|
3511
|
+
protocols={**PROTOCOLS, **(protocols or {})},
|
|
3512
|
+
hooks=hooks,
|
|
3513
|
+
)
|
|
3514
|
+
self.admin_key = _AdminKeyResource(self._runtime)
|
|
3515
|
+
self.ancestors = _AncestorsResource(self._runtime)
|
|
3516
|
+
self.app_properties = _AppPropertiesResource(self._runtime)
|
|
3517
|
+
self.attachment = _AttachmentResource(self._runtime)
|
|
3518
|
+
self.blog_post = _BlogPostResource(self._runtime)
|
|
3519
|
+
self.children = _ChildrenResource(self._runtime)
|
|
3520
|
+
self.classification_level = _ClassificationLevelResource(self._runtime)
|
|
3521
|
+
self.comment = _CommentResource(self._runtime)
|
|
3522
|
+
self.content = _ContentResource(self._runtime)
|
|
3523
|
+
self.content_permissions = _ContentPermissionsResource(self._runtime)
|
|
3524
|
+
self.content_properties = _ContentPropertiesResource(self._runtime)
|
|
3525
|
+
self.custom_content = _CustomContentResource(self._runtime)
|
|
3526
|
+
self.data_policies = _DataPoliciesResource(self._runtime)
|
|
3527
|
+
self.database = _DatabaseResource(self._runtime)
|
|
3528
|
+
self.descendants = _DescendantsResource(self._runtime)
|
|
3529
|
+
self.folder = _FolderResource(self._runtime)
|
|
3530
|
+
self.label = _LabelResource(self._runtime)
|
|
3531
|
+
self.like = _LikeResource(self._runtime)
|
|
3532
|
+
self.operation = _OperationResource(self._runtime)
|
|
3533
|
+
self.page = _PageResource(self._runtime)
|
|
3534
|
+
self.redactions = _RedactionsResource(self._runtime)
|
|
3535
|
+
self.smart_link = _SmartLinkResource(self._runtime)
|
|
3536
|
+
self.space = _SpaceResource(self._runtime)
|
|
3537
|
+
self.space_permission_transition = _SpacePermissionTransitionResource(self._runtime)
|
|
3538
|
+
self.space_permissions = _SpacePermissionsResource(self._runtime)
|
|
3539
|
+
self.space_properties = _SpacePropertiesResource(self._runtime)
|
|
3540
|
+
self.space_roles = _SpaceRolesResource(self._runtime)
|
|
3541
|
+
self.task = _TaskResource(self._runtime)
|
|
3542
|
+
self.user = _UserResource(self._runtime)
|
|
3543
|
+
self.version = _VersionResource(self._runtime)
|
|
3544
|
+
self.whiteboard = _WhiteboardResource(self._runtime)
|