@resolution/confluence-api-client 0.13.4 → 0.14.0
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.
- package/lib/openapi/core/CommonHttpClient.d.ts +1 -1
- package/lib/openapi/core/CommonHttpClient.js +1 -1
- package/lib/openapi/core/CommonHttpClient.js.map +1 -1
- package/lib/openapi/v1/BaseConfluenceApiV1Client.d.ts +6 -37
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js +3 -71
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js.map +1 -1
- package/lib/openapi/v1/models/audit.js +2 -2
- package/lib/openapi/v1/models/audit.js.map +1 -1
- package/lib/openapi/v1/models/common.d.ts +1 -1
- package/lib/openapi/v1/models/common.js +3 -3
- package/lib/openapi/v1/models/common.js.map +1 -1
- package/lib/openapi/v1/models/content.d.ts +0 -543
- package/lib/openapi/v1/models/content.js +2 -309
- package/lib/openapi/v1/models/content.js.map +1 -1
- package/lib/openapi/v1/models/contentChildrenAndDescendants.d.ts +7 -3
- package/lib/openapi/v1/models/contentChildrenAndDescendants.js +1 -1
- package/lib/openapi/v1/models/contentChildrenAndDescendants.js.map +1 -1
- package/lib/openapi/v1/models/contentRestrictions.js +1 -1
- package/lib/openapi/v1/models/contentRestrictions.js.map +1 -1
- package/lib/openapi/v1/models/contentStates.d.ts +322 -0
- package/lib/openapi/v1/models/contentStates.js +219 -0
- package/lib/openapi/v1/models/contentStates.js.map +1 -1
- package/lib/openapi/v1/models/contentVersions.d.ts +0 -9
- package/lib/openapi/v1/models/contentVersions.js +1 -10
- package/lib/openapi/v1/models/contentVersions.js.map +1 -1
- package/lib/openapi/v1/models/dynamicModules.d.ts +3 -3
- package/lib/openapi/v1/models/space.d.ts +1 -9
- package/lib/openapi/v1/models/space.js +1 -8
- package/lib/openapi/v1/models/space.js.map +1 -1
- package/lib/openapi/v1/models/template.js +1 -1
- package/lib/openapi/v1/models/template.js.map +1 -1
- package/lib/openapi/v1/services/AnalyticsService.d.ts +4 -0
- package/lib/openapi/v1/services/AnalyticsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +0 -130
- package/lib/openapi/v1/services/ContentAttachmentsService.js +0 -52
- package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentBodyService.d.ts +1 -102
- package/lib/openapi/v1/services/ContentBodyService.js +1 -65
- package/lib/openapi/v1/services/ContentBodyService.js.map +1 -1
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +5 -220
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +4 -144
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentLabelsService.d.ts +1 -44
- package/lib/openapi/v1/services/ContentLabelsService.js +0 -41
- package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentService.d.ts +2 -560
- package/lib/openapi/v1/services/ContentService.js +1 -300
- package/lib/openapi/v1/services/ContentService.js.map +1 -1
- package/lib/openapi/v1/services/ContentVersionsService.d.ts +1 -72
- package/lib/openapi/v1/services/ContentVersionsService.js +1 -97
- package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -1
- package/lib/openapi/v1/services/GroupService.d.ts +1 -1
- package/lib/openapi/v1/services/GroupService.js +1 -1
- package/lib/openapi/v1/services/SettingsService.d.ts +0 -26
- package/lib/openapi/v1/services/SettingsService.js +0 -38
- package/lib/openapi/v1/services/SettingsService.js.map +1 -1
- package/lib/openapi/v1/services/SpaceService.d.ts +2 -406
- package/lib/openapi/v1/services/SpaceService.js +1 -215
- package/lib/openapi/v1/services/SpaceService.js.map +1 -1
- package/lib/openapi/v2/BaseConfluenceApiV2Client.d.ts +22 -3
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js +25 -1
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js.map +1 -1
- package/lib/openapi/v2/models/adminKey.d.ts +13 -0
- package/lib/openapi/v2/models/adminKey.js +12 -0
- package/lib/openapi/v2/models/adminKey.js.map +1 -0
- package/lib/openapi/v2/models/children.d.ts +21 -6
- package/lib/openapi/v2/models/children.js +10 -1
- package/lib/openapi/v2/models/children.js.map +1 -1
- package/lib/openapi/v2/models/common.d.ts +6 -0
- package/lib/openapi/v2/models/common.js +1 -0
- package/lib/openapi/v2/models/common.js.map +1 -1
- package/lib/openapi/v2/models/descendants.d.ts +29 -0
- package/lib/openapi/v2/models/descendants.js +19 -0
- package/lib/openapi/v2/models/descendants.js.map +1 -0
- package/lib/openapi/v2/services/AdminKeyService.d.ts +71 -0
- package/lib/openapi/v2/services/AdminKeyService.js +111 -0
- package/lib/openapi/v2/services/AdminKeyService.js.map +1 -0
- package/lib/openapi/v2/services/AttachmentService.d.ts +6 -5
- package/lib/openapi/v2/services/AttachmentService.js.map +1 -1
- package/lib/openapi/v2/services/BlogPostService.d.ts +5 -4
- package/lib/openapi/v2/services/BlogPostService.js.map +1 -1
- package/lib/openapi/v2/services/ChildrenService.d.ts +307 -1
- package/lib/openapi/v2/services/ChildrenService.js +321 -0
- package/lib/openapi/v2/services/ChildrenService.js.map +1 -1
- package/lib/openapi/v2/services/CommentService.d.ts +10 -8
- package/lib/openapi/v2/services/CommentService.js.map +1 -1
- package/lib/openapi/v2/services/ContentPropertiesService.d.ts +1 -1
- package/lib/openapi/v2/services/CustomContentService.d.ts +18 -1
- package/lib/openapi/v2/services/CustomContentService.js +5 -0
- package/lib/openapi/v2/services/CustomContentService.js.map +1 -1
- package/lib/openapi/v2/services/DatabaseService.d.ts +4 -6
- package/lib/openapi/v2/services/DatabaseService.js.map +1 -1
- package/lib/openapi/v2/services/DescendantsService.d.ts +346 -0
- package/lib/openapi/v2/services/DescendantsService.js +362 -0
- package/lib/openapi/v2/services/DescendantsService.js.map +1 -0
- package/lib/openapi/v2/services/FolderService.d.ts +4 -6
- package/lib/openapi/v2/services/FolderService.js.map +1 -1
- package/lib/openapi/v2/services/PageService.d.ts +49 -6
- package/lib/openapi/v2/services/PageService.js +42 -2
- package/lib/openapi/v2/services/PageService.js.map +1 -1
- package/lib/openapi/v2/services/SmartLinkService.d.ts +4 -6
- package/lib/openapi/v2/services/SmartLinkService.js.map +1 -1
- package/lib/openapi/v2/services/SpaceService.d.ts +2 -1
- package/lib/openapi/v2/services/SpaceService.js.map +1 -1
- package/lib/openapi/v2/services/WhiteboardService.d.ts +6 -8
- package/lib/openapi/v2/services/WhiteboardService.js.map +1 -1
- package/package.json +3 -3
- package/lib/openapi/v1/models/contentProperties.d.ts +0 -78
- package/lib/openapi/v1/models/contentProperties.js +0 -48
- package/lib/openapi/v1/models/contentProperties.js.map +0 -1
- package/lib/openapi/v1/models/inlineTasks.d.ts +0 -33
- package/lib/openapi/v1/models/inlineTasks.js +0 -36
- package/lib/openapi/v1/models/inlineTasks.js.map +0 -1
- package/lib/openapi/v1/models/spaceProperties.d.ts +0 -103
- package/lib/openapi/v1/models/spaceProperties.js +0 -48
- package/lib/openapi/v1/models/spaceProperties.js.map +0 -1
- package/lib/openapi/v1/services/ContentCommentsService.d.ts +0 -153
- package/lib/openapi/v1/services/ContentCommentsService.js +0 -81
- package/lib/openapi/v1/services/ContentCommentsService.js.map +0 -1
- package/lib/openapi/v1/services/ContentPropertiesService.d.ts +0 -203
- package/lib/openapi/v1/services/ContentPropertiesService.js +0 -279
- package/lib/openapi/v1/services/ContentPropertiesService.js.map +0 -1
- package/lib/openapi/v1/services/InlineTasksService.d.ts +0 -101
- package/lib/openapi/v1/services/InlineTasksService.js +0 -145
- package/lib/openapi/v1/services/InlineTasksService.js.map +0 -1
- package/lib/openapi/v1/services/SpacePropertiesService.d.ts +0 -177
- package/lib/openapi/v1/services/SpacePropertiesService.js +0 -269
- package/lib/openapi/v1/services/SpacePropertiesService.js.map +0 -1
|
@@ -7,7 +7,6 @@ exports.ContentService = void 0;
|
|
|
7
7
|
const commonHttpClient = require("../../core/CommonHttpClient");
|
|
8
8
|
const CommonHttpService_1 = require("../../core/CommonHttpService");
|
|
9
9
|
const common_1 = require("../models/common");
|
|
10
|
-
const content_1 = require("../models/content");
|
|
11
10
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
12
11
|
const zod_1 = require("zod");
|
|
13
12
|
/**
|
|
@@ -53,238 +52,6 @@ class ContentService extends CommonHttpService_1.CommonHttpService {
|
|
|
53
52
|
}
|
|
54
53
|
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.archivePages.response"))).then(commonHttpClient.getBody);
|
|
55
54
|
};
|
|
56
|
-
/**
|
|
57
|
-
* Deprecated, use [Confluence's v2
|
|
58
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
59
|
-
*
|
|
60
|
-
* Creates a new piece of content or publishes an existing draft.
|
|
61
|
-
*
|
|
62
|
-
* To publish a draft, add the `id` and `status` properties to the body of the
|
|
63
|
-
* request.
|
|
64
|
-
* Set the `id` to the ID of the draft and set the `status` to 'current'. When the
|
|
65
|
-
* request is sent, a new piece of content will be created and the metadata from
|
|
66
|
-
* the
|
|
67
|
-
* draft will be transferred into it.
|
|
68
|
-
*
|
|
69
|
-
* By default, the following objects are expanded: `space`, `history`, `version`.
|
|
70
|
-
*
|
|
71
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add'
|
|
72
|
-
* permission for the
|
|
73
|
-
* space that the content will be created in, and permission to view the draft if
|
|
74
|
-
* publishing a draft.
|
|
75
|
-
*
|
|
76
|
-
* @deprecated
|
|
77
|
-
* @returns Returned if the content is created.
|
|
78
|
-
* @path POST `/wiki/rest/api/content`
|
|
79
|
-
* @scopes-current write:confluence-content
|
|
80
|
-
* @scopes-beta read:content-details:confluence, write:content:confluence
|
|
81
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-post
|
|
82
|
-
* @param params
|
|
83
|
-
*/
|
|
84
|
-
this.createContent = ({ status, expand, contentCreate }) => {
|
|
85
|
-
return this.getClientInstance().request({
|
|
86
|
-
path: "/wiki/rest/api/content",
|
|
87
|
-
method: "POST",
|
|
88
|
-
query: {
|
|
89
|
-
status,
|
|
90
|
-
expand
|
|
91
|
-
},
|
|
92
|
-
headers: {
|
|
93
|
-
"Content-Type": "application/json"
|
|
94
|
-
},
|
|
95
|
-
parameters: {
|
|
96
|
-
query: {
|
|
97
|
-
expand: {
|
|
98
|
-
explode: false
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
body: contentCreate
|
|
103
|
-
}).then(this.getClientInstance().responseHandler({
|
|
104
|
-
200: {
|
|
105
|
-
"application/json": "json"
|
|
106
|
-
}
|
|
107
|
-
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.createContent.response"))).then(commonHttpClient.getBody);
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Deprecated, use [Confluence's v2
|
|
111
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
112
|
-
*
|
|
113
|
-
* Moves a piece of content to the space's trash or purges it from the trash,
|
|
114
|
-
* depending on the content's type and status:
|
|
115
|
-
*
|
|
116
|
-
* - If the content's type is `page`,`blogpost`, or `attachment` and its status is
|
|
117
|
-
* `current`,
|
|
118
|
-
* it will be trashed.
|
|
119
|
-
* - If the content's type is `page`,`blogpost`, or `attachment` and its status is
|
|
120
|
-
* `trashed`,
|
|
121
|
-
* the content will be purged from the trash and deleted permanently. Note,
|
|
122
|
-
* you must also set the `status` query parameter to `trashed` in your request.
|
|
123
|
-
* - If the content's type is `comment`, it will be deleted
|
|
124
|
-
* permanently without being trashed.
|
|
125
|
-
*
|
|
126
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
127
|
-
* 'Delete' permission for the space that the content is in.
|
|
128
|
-
*
|
|
129
|
-
* @deprecated
|
|
130
|
-
* @path DELETE `/wiki/rest/api/content/{id}`
|
|
131
|
-
* @scopes-current write:confluence-content
|
|
132
|
-
* @scopes-beta delete:content:confluence
|
|
133
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-delete
|
|
134
|
-
* @param params
|
|
135
|
-
*/
|
|
136
|
-
this.deleteContent = ({ id, status }) => {
|
|
137
|
-
return this.getClientInstance().request({
|
|
138
|
-
path: "/wiki/rest/api/content/{id}",
|
|
139
|
-
method: "DELETE",
|
|
140
|
-
pathParams: {
|
|
141
|
-
id
|
|
142
|
-
},
|
|
143
|
-
query: {
|
|
144
|
-
status
|
|
145
|
-
}
|
|
146
|
-
}).then(commonHttpClient.discardResult);
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Deprecated, use [Confluence's v2
|
|
150
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
151
|
-
*
|
|
152
|
-
* Returns all content in a Confluence instance.
|
|
153
|
-
*
|
|
154
|
-
* By default, the following objects are expanded: `space`, `history`, `version`.
|
|
155
|
-
*
|
|
156
|
-
* If the expand query parameter is used with the `body.export_view` and/or
|
|
157
|
-
* `body.styled_view` properties, then the query limit parameter will be
|
|
158
|
-
* restricted to a maximum value of 25.
|
|
159
|
-
*
|
|
160
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
161
|
-
* Permission to access the Confluence site ('Can use' global permission).
|
|
162
|
-
* Only content that the user has permission to view will be returned.
|
|
163
|
-
*
|
|
164
|
-
* @deprecated
|
|
165
|
-
* @returns Returned if the requested list of content is returned.
|
|
166
|
-
* @path GET `/wiki/rest/api/content`
|
|
167
|
-
* @scopes-current read:confluence-content.summary
|
|
168
|
-
* @scopes-beta read:content-details:confluence
|
|
169
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-get
|
|
170
|
-
* @param params
|
|
171
|
-
*/
|
|
172
|
-
this.getContent = ({ type, spaceKey, title, status, postingDay, expand, trigger, orderby, start, limit } = {}) => {
|
|
173
|
-
return this.getClientInstance().request({
|
|
174
|
-
path: "/wiki/rest/api/content",
|
|
175
|
-
method: "GET",
|
|
176
|
-
query: {
|
|
177
|
-
type,
|
|
178
|
-
spaceKey,
|
|
179
|
-
title,
|
|
180
|
-
status,
|
|
181
|
-
postingDay,
|
|
182
|
-
expand,
|
|
183
|
-
trigger,
|
|
184
|
-
orderby,
|
|
185
|
-
start,
|
|
186
|
-
limit
|
|
187
|
-
},
|
|
188
|
-
parameters: {
|
|
189
|
-
query: {
|
|
190
|
-
expand: {
|
|
191
|
-
explode: false
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}).then(this.getClientInstance().responseHandler({
|
|
196
|
-
200: {
|
|
197
|
-
"application/json": "json"
|
|
198
|
-
}
|
|
199
|
-
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContent.response"))).then(commonHttpClient.getBody);
|
|
200
|
-
};
|
|
201
|
-
/**
|
|
202
|
-
* Deprecated, use [Confluence's v2
|
|
203
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
204
|
-
*
|
|
205
|
-
* Returns a single piece of content, like a page or a blog post.
|
|
206
|
-
*
|
|
207
|
-
* By default, the following objects are expanded: `space`, `history`, `version`.
|
|
208
|
-
*
|
|
209
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
210
|
-
* Permission to view the content. If the content is a blog post, 'View' permission
|
|
211
|
-
* for the space is required.
|
|
212
|
-
*
|
|
213
|
-
* @deprecated
|
|
214
|
-
* @returns Returned if the requested content is returned.
|
|
215
|
-
* @path GET `/wiki/rest/api/content/{id}`
|
|
216
|
-
* @scopes-current read:confluence-content.summary
|
|
217
|
-
* @scopes-beta read:content-details:confluence
|
|
218
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-get
|
|
219
|
-
* @param params
|
|
220
|
-
*/
|
|
221
|
-
this.getContentById = ({ id, status, version, embeddedContentRender, expand, trigger }) => {
|
|
222
|
-
return this.getClientInstance().request({
|
|
223
|
-
path: "/wiki/rest/api/content/{id}",
|
|
224
|
-
method: "GET",
|
|
225
|
-
pathParams: {
|
|
226
|
-
id
|
|
227
|
-
},
|
|
228
|
-
query: {
|
|
229
|
-
status,
|
|
230
|
-
version,
|
|
231
|
-
embeddedContentRender,
|
|
232
|
-
expand,
|
|
233
|
-
trigger
|
|
234
|
-
},
|
|
235
|
-
parameters: {
|
|
236
|
-
query: {
|
|
237
|
-
expand: {
|
|
238
|
-
explode: false
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}).then(this.getClientInstance().responseHandler({
|
|
243
|
-
200: {
|
|
244
|
-
"application/json": "json"
|
|
245
|
-
}
|
|
246
|
-
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContentById.response"))).then(commonHttpClient.getBody);
|
|
247
|
-
};
|
|
248
|
-
/**
|
|
249
|
-
* Deprecated, use [Confluence's v2
|
|
250
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
251
|
-
*
|
|
252
|
-
* Returns the most recent update for a piece of content.
|
|
253
|
-
*
|
|
254
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
255
|
-
* Permission to view the content.
|
|
256
|
-
*
|
|
257
|
-
* @deprecated
|
|
258
|
-
* @returns Returned if the requested content history is returned.
|
|
259
|
-
* @path GET `/wiki/rest/api/content/{id}/history`
|
|
260
|
-
* @scopes-current read:confluence-content.summary
|
|
261
|
-
* @scopes-beta read:content.metadata:confluence, read:user:confluence
|
|
262
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-history-get
|
|
263
|
-
* @param params
|
|
264
|
-
*/
|
|
265
|
-
this.getHistoryForContent = ({ id, expand }) => {
|
|
266
|
-
return this.getClientInstance().request({
|
|
267
|
-
path: "/wiki/rest/api/content/{id}/history",
|
|
268
|
-
method: "GET",
|
|
269
|
-
pathParams: {
|
|
270
|
-
id
|
|
271
|
-
},
|
|
272
|
-
query: {
|
|
273
|
-
expand
|
|
274
|
-
},
|
|
275
|
-
parameters: {
|
|
276
|
-
query: {
|
|
277
|
-
expand: {
|
|
278
|
-
explode: false
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}).then(this.getClientInstance().responseHandler({
|
|
283
|
-
200: {
|
|
284
|
-
"application/json": "json"
|
|
285
|
-
}
|
|
286
|
-
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getHistoryForContent.response"))).then(commonHttpClient.getBody);
|
|
287
|
-
};
|
|
288
55
|
/**
|
|
289
56
|
* Publishes a legacy draft of a page created from a blueprint. Legacy drafts
|
|
290
57
|
* will eventually be removed in favor of shared drafts. For now, this method
|
|
@@ -461,74 +228,8 @@ class ContentService extends CommonHttpService_1.CommonHttpService {
|
|
|
461
228
|
}
|
|
462
229
|
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.searchContentByCQL.response"))).then(commonHttpClient.getBody);
|
|
463
230
|
};
|
|
464
|
-
/**
|
|
465
|
-
* Deprecated, use [Confluence's v2
|
|
466
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
467
|
-
*
|
|
468
|
-
* Updates a piece of content. Use this method to update the title or body
|
|
469
|
-
* of a piece of content, change the status, change the parent page, and more.
|
|
470
|
-
*
|
|
471
|
-
* Note, updating draft content is currently not supported.
|
|
472
|
-
*
|
|
473
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
474
|
-
* Permission to update the content.
|
|
475
|
-
*
|
|
476
|
-
* @deprecated
|
|
477
|
-
* @returns Returned if the content is updated.
|
|
478
|
-
* @path PUT `/wiki/rest/api/content/{id}`
|
|
479
|
-
* @scopes-current write:confluence-content
|
|
480
|
-
* @scopes-beta read:content-details:confluence, write:content:confluence
|
|
481
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-put
|
|
482
|
-
* @param params
|
|
483
|
-
*/
|
|
484
|
-
this.updateContent = ({ id, status, conflictPolicy, contentUpdate }) => {
|
|
485
|
-
return this.getClientInstance().request({
|
|
486
|
-
path: "/wiki/rest/api/content/{id}",
|
|
487
|
-
method: "PUT",
|
|
488
|
-
pathParams: {
|
|
489
|
-
id
|
|
490
|
-
},
|
|
491
|
-
query: {
|
|
492
|
-
status,
|
|
493
|
-
conflictPolicy
|
|
494
|
-
},
|
|
495
|
-
headers: {
|
|
496
|
-
"Content-Type": "application/json"
|
|
497
|
-
},
|
|
498
|
-
body: contentUpdate
|
|
499
|
-
}).then(this.getClientInstance().responseHandler({
|
|
500
|
-
200: {
|
|
501
|
-
"application/json": "json"
|
|
502
|
-
}
|
|
503
|
-
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.updateContent.response"))).then(commonHttpClient.getBody);
|
|
504
|
-
};
|
|
505
231
|
}
|
|
506
232
|
static initialize() {
|
|
507
|
-
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.getContent.response", zod_1.z.object({
|
|
508
|
-
status: zod_1.z.literal(200),
|
|
509
|
-
mediaType: zod_1.z.literal("application/json"),
|
|
510
|
-
body: validationSchemaStorage_1.validationSchemaStorage.lazy("ContentArray")
|
|
511
|
-
}).describe("ContentService.getContent.response"));
|
|
512
|
-
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.createContent.response", zod_1.z.object({
|
|
513
|
-
status: zod_1.z.literal(200),
|
|
514
|
-
mediaType: zod_1.z.literal("application/json"),
|
|
515
|
-
body: zod_1.z.nullable(validationSchemaStorage_1.validationSchemaStorage.lazy("Content"))
|
|
516
|
-
}).describe("ContentService.createContent.response"));
|
|
517
|
-
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.getContentById.response", zod_1.z.object({
|
|
518
|
-
status: zod_1.z.literal(200),
|
|
519
|
-
mediaType: zod_1.z.literal("application/json"),
|
|
520
|
-
body: zod_1.z.nullable(validationSchemaStorage_1.validationSchemaStorage.lazy("Content"))
|
|
521
|
-
}).describe("ContentService.getContentById.response"));
|
|
522
|
-
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.updateContent.response", zod_1.z.object({
|
|
523
|
-
status: zod_1.z.literal(200),
|
|
524
|
-
mediaType: zod_1.z.literal("application/json"),
|
|
525
|
-
body: zod_1.z.nullable(validationSchemaStorage_1.validationSchemaStorage.lazy("Content"))
|
|
526
|
-
}).describe("ContentService.updateContent.response"));
|
|
527
|
-
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.getHistoryForContent.response", zod_1.z.object({
|
|
528
|
-
status: zod_1.z.literal(200),
|
|
529
|
-
mediaType: zod_1.z.literal("application/json"),
|
|
530
|
-
body: zod_1.z.nullable(validationSchemaStorage_1.validationSchemaStorage.lazy("ContentHistory"))
|
|
531
|
-
}).describe("ContentService.getHistoryForContent.response"));
|
|
532
233
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.archivePages.response", zod_1.z.object({
|
|
533
234
|
status: zod_1.z.literal(202),
|
|
534
235
|
mediaType: zod_1.z.literal("application/json"),
|
|
@@ -549,7 +250,7 @@ class ContentService extends CommonHttpService_1.CommonHttpService {
|
|
|
549
250
|
mediaType: zod_1.z.literal("application/json"),
|
|
550
251
|
body: validationSchemaStorage_1.validationSchemaStorage.lazy("ContentArray")
|
|
551
252
|
}).describe("ContentService.searchContentByCQL.response"));
|
|
552
|
-
validationSchemaStorage_1.validationSchemaStorage.registerOnce([common_1.registerCommonValidationSchemas
|
|
253
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([common_1.registerCommonValidationSchemas]);
|
|
553
254
|
}
|
|
554
255
|
}
|
|
555
256
|
exports.ContentService = ContentService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,gEAAgE;AAChE,oEAAiE;AACjE,6CAAmH;
|
|
1
|
+
{"version":3,"file":"ContentService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,gEAAgE;AAChE,oEAAiE;AACjE,6CAAmH;AAEnH,wEAAqE;AACrE,6BAAwB;AACxB;;;GAGG;AACH,MAAa,cAAe,SAAQ,qCAAiB;IAArD;;QACE;;;;;;;;;;;;;;;;;;;;;WAqBG;QACH,iBAAY,GAAG,CAAC,EACd,WAAW,EAaZ,EAAqB,EAAE;YACtB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC;gBACtC,IAAI,EAAE,gCAAgC;gBACtC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,WAAW;aAClB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;gBAC/C,GAAG,EAAE;oBACH,kBAAkB,EAAE,MAAM;iBAC3B;aACF,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAIlC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,UAAU,CAAC,iDAAuB,CAAC,SAAS,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC5J,CAAC,CA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YAChG,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,cAAc,CAAC;SACnD,CAAC,CAAC,QAAQ,CAAC,4CAA4C,CAAC,CAAC,CAAC;QAC3D,iDAAuB,CAAC,YAAY,CAAC,CAAC,wCAA+B,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF;AAxmBD,wCAwmBC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CommonHttpService } from "../../core/CommonHttpService";
|
|
2
2
|
import { type VersionV1 } from "../models/common";
|
|
3
|
-
import
|
|
3
|
+
import type { VersionRestore } from "../models/contentVersions";
|
|
4
4
|
/**
|
|
5
5
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions
|
|
6
6
|
* @category Services
|
|
@@ -29,77 +29,6 @@ export declare class ContentVersionsService extends CommonHttpService {
|
|
|
29
29
|
*/
|
|
30
30
|
versionNumber: number;
|
|
31
31
|
}) => Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
* Deprecated, use [Confluence's v2
|
|
34
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
35
|
-
*
|
|
36
|
-
* Returns a version for a piece of content.
|
|
37
|
-
*
|
|
38
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
39
|
-
* Permission to view the content. If the content is a blog post, 'View' permission
|
|
40
|
-
* for the space is required.
|
|
41
|
-
*
|
|
42
|
-
* @deprecated
|
|
43
|
-
* @returns Returned if the version is returned.
|
|
44
|
-
* @path GET `/wiki/rest/api/content/{id}/version/{versionNumber}`
|
|
45
|
-
* @scopes-current read:confluence-content.summary
|
|
46
|
-
* @scopes-beta read:content-details:confluence
|
|
47
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions#api-wiki-rest-api-content-id-version-versionnumber-get
|
|
48
|
-
* @param params
|
|
49
|
-
*/
|
|
50
|
-
getContentVersion: ({ id, versionNumber, expand }: {
|
|
51
|
-
/** The ID of the content to be queried for its version. */
|
|
52
|
-
id: string;
|
|
53
|
-
/** The number of the version to be retrieved. */
|
|
54
|
-
versionNumber: number;
|
|
55
|
-
/**
|
|
56
|
-
* A multi-value parameter indicating which properties of the content to expand.
|
|
57
|
-
* By default, the `content`
|
|
58
|
-
* object is expanded.
|
|
59
|
-
*
|
|
60
|
-
* - `collaborators` returns the users that collaborated on the version.
|
|
61
|
-
* - `content` returns the content for the version.
|
|
62
|
-
*/
|
|
63
|
-
expand?: string[] | undefined;
|
|
64
|
-
}) => Promise<VersionV1 | null>;
|
|
65
|
-
/**
|
|
66
|
-
* Deprecated, use [Confluence's v2
|
|
67
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
68
|
-
*
|
|
69
|
-
* Returns the versions for a piece of content in descending order.
|
|
70
|
-
*
|
|
71
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
72
|
-
* Permission to view the content. If the content is a blog post, 'View' permission
|
|
73
|
-
* for the space is required.
|
|
74
|
-
*
|
|
75
|
-
* @deprecated
|
|
76
|
-
* @returns Returned if the requested versions are returned.
|
|
77
|
-
* @path GET `/wiki/rest/api/content/{id}/version`
|
|
78
|
-
* @scopes-current read:confluence-content.summary
|
|
79
|
-
* @scopes-beta read:content-details:confluence
|
|
80
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions#api-wiki-rest-api-content-id-version-get
|
|
81
|
-
* @param params
|
|
82
|
-
*/
|
|
83
|
-
getContentVersions: ({ id, start, limit, expand }: {
|
|
84
|
-
/** The ID of the content to be queried for its versions. */
|
|
85
|
-
id: string;
|
|
86
|
-
/** The starting index of the returned versions. */
|
|
87
|
-
start?: number | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* The maximum number of versions to return per page.
|
|
90
|
-
* Note, this may be restricted by fixed system limits.
|
|
91
|
-
*/
|
|
92
|
-
limit?: number | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* A multi-value parameter indicating which properties of the content to expand.
|
|
95
|
-
* By default, the `content`
|
|
96
|
-
* object is expanded.
|
|
97
|
-
*
|
|
98
|
-
* - `collaborators` returns the users that collaborated on the version.
|
|
99
|
-
* - `content` returns the content for the version.
|
|
100
|
-
*/
|
|
101
|
-
expand?: string[] | undefined;
|
|
102
|
-
}) => Promise<VersionArray>;
|
|
103
32
|
/**
|
|
104
33
|
* Restores a historical version to be the latest version. That is, a new version
|
|
105
34
|
* is created with the content of the historical version.
|
|
@@ -7,7 +7,6 @@ exports.ContentVersionsService = void 0;
|
|
|
7
7
|
const commonHttpClient = require("../../core/CommonHttpClient");
|
|
8
8
|
const CommonHttpService_1 = require("../../core/CommonHttpService");
|
|
9
9
|
const common_1 = require("../models/common");
|
|
10
|
-
const contentVersions_1 = require("../models/contentVersions");
|
|
11
10
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
12
11
|
const zod_1 = require("zod");
|
|
13
12
|
/**
|
|
@@ -41,91 +40,6 @@ class ContentVersionsService extends CommonHttpService_1.CommonHttpService {
|
|
|
41
40
|
}
|
|
42
41
|
}).then(commonHttpClient.discardResult);
|
|
43
42
|
};
|
|
44
|
-
/**
|
|
45
|
-
* Deprecated, use [Confluence's v2
|
|
46
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
47
|
-
*
|
|
48
|
-
* Returns a version for a piece of content.
|
|
49
|
-
*
|
|
50
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
51
|
-
* Permission to view the content. If the content is a blog post, 'View' permission
|
|
52
|
-
* for the space is required.
|
|
53
|
-
*
|
|
54
|
-
* @deprecated
|
|
55
|
-
* @returns Returned if the version is returned.
|
|
56
|
-
* @path GET `/wiki/rest/api/content/{id}/version/{versionNumber}`
|
|
57
|
-
* @scopes-current read:confluence-content.summary
|
|
58
|
-
* @scopes-beta read:content-details:confluence
|
|
59
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions#api-wiki-rest-api-content-id-version-versionnumber-get
|
|
60
|
-
* @param params
|
|
61
|
-
*/
|
|
62
|
-
this.getContentVersion = ({ id, versionNumber, expand }) => {
|
|
63
|
-
return this.getClientInstance().request({
|
|
64
|
-
path: "/wiki/rest/api/content/{id}/version/{versionNumber}",
|
|
65
|
-
method: "GET",
|
|
66
|
-
pathParams: {
|
|
67
|
-
id,
|
|
68
|
-
versionNumber
|
|
69
|
-
},
|
|
70
|
-
query: {
|
|
71
|
-
expand
|
|
72
|
-
},
|
|
73
|
-
parameters: {
|
|
74
|
-
query: {
|
|
75
|
-
expand: {
|
|
76
|
-
explode: false
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}).then(this.getClientInstance().responseHandler({
|
|
81
|
-
200: {
|
|
82
|
-
"application/json": "json"
|
|
83
|
-
}
|
|
84
|
-
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentVersionsService.getContentVersion.response"))).then(commonHttpClient.getBody);
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Deprecated, use [Confluence's v2
|
|
88
|
-
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
89
|
-
*
|
|
90
|
-
* Returns the versions for a piece of content in descending order.
|
|
91
|
-
*
|
|
92
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
93
|
-
* Permission to view the content. If the content is a blog post, 'View' permission
|
|
94
|
-
* for the space is required.
|
|
95
|
-
*
|
|
96
|
-
* @deprecated
|
|
97
|
-
* @returns Returned if the requested versions are returned.
|
|
98
|
-
* @path GET `/wiki/rest/api/content/{id}/version`
|
|
99
|
-
* @scopes-current read:confluence-content.summary
|
|
100
|
-
* @scopes-beta read:content-details:confluence
|
|
101
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions#api-wiki-rest-api-content-id-version-get
|
|
102
|
-
* @param params
|
|
103
|
-
*/
|
|
104
|
-
this.getContentVersions = ({ id, start, limit, expand }) => {
|
|
105
|
-
return this.getClientInstance().request({
|
|
106
|
-
path: "/wiki/rest/api/content/{id}/version",
|
|
107
|
-
method: "GET",
|
|
108
|
-
pathParams: {
|
|
109
|
-
id
|
|
110
|
-
},
|
|
111
|
-
query: {
|
|
112
|
-
start,
|
|
113
|
-
limit,
|
|
114
|
-
expand
|
|
115
|
-
},
|
|
116
|
-
parameters: {
|
|
117
|
-
query: {
|
|
118
|
-
expand: {
|
|
119
|
-
explode: false
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}).then(this.getClientInstance().responseHandler({
|
|
124
|
-
200: {
|
|
125
|
-
"application/json": "json"
|
|
126
|
-
}
|
|
127
|
-
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("ContentVersionsService.getContentVersions.response"))).then(commonHttpClient.getBody);
|
|
128
|
-
};
|
|
129
43
|
/**
|
|
130
44
|
* Restores a historical version to be the latest version. That is, a new version
|
|
131
45
|
* is created with the content of the historical version.
|
|
@@ -169,22 +83,12 @@ class ContentVersionsService extends CommonHttpService_1.CommonHttpService {
|
|
|
169
83
|
};
|
|
170
84
|
}
|
|
171
85
|
static initialize() {
|
|
172
|
-
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentVersionsService.getContentVersions.response", zod_1.z.object({
|
|
173
|
-
status: zod_1.z.literal(200),
|
|
174
|
-
mediaType: zod_1.z.literal("application/json"),
|
|
175
|
-
body: validationSchemaStorage_1.validationSchemaStorage.lazy("VersionArray")
|
|
176
|
-
}).describe("ContentVersionsService.getContentVersions.response"));
|
|
177
86
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentVersionsService.restoreContentVersion.response", zod_1.z.object({
|
|
178
87
|
status: zod_1.z.literal(200),
|
|
179
88
|
mediaType: zod_1.z.literal("application/json"),
|
|
180
89
|
body: zod_1.z.nullable(validationSchemaStorage_1.validationSchemaStorage.lazy("VersionV1"))
|
|
181
90
|
}).describe("ContentVersionsService.restoreContentVersion.response"));
|
|
182
|
-
validationSchemaStorage_1.validationSchemaStorage.
|
|
183
|
-
status: zod_1.z.literal(200),
|
|
184
|
-
mediaType: zod_1.z.literal("application/json"),
|
|
185
|
-
body: zod_1.z.nullable(validationSchemaStorage_1.validationSchemaStorage.lazy("VersionV1"))
|
|
186
|
-
}).describe("ContentVersionsService.getContentVersion.response"));
|
|
187
|
-
validationSchemaStorage_1.validationSchemaStorage.registerOnce([contentVersions_1.registerContentVersionsValidationSchemas, common_1.registerCommonValidationSchemas]);
|
|
91
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([common_1.registerCommonValidationSchemas]);
|
|
188
92
|
}
|
|
189
93
|
}
|
|
190
94
|
exports.ContentVersionsService = ContentVersionsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentVersionsService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentVersionsService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,gEAAgE;AAChE,oEAAiE;AACjE,6CAAmF;
|
|
1
|
+
{"version":3,"file":"ContentVersionsService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentVersionsService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,gEAAgE;AAChE,oEAAiE;AACjE,6CAAmF;AAEnF,wEAAqE;AACrE,6BAAwB;AACxB;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,qCAAiB;IAA7D;;QACE;;;;;;;;;;;;;WAaG;QACH,yBAAoB,GAAG,CAAC,EACtB,EAAE,EACF,aAAa,EASd,EAAiB,EAAE;YAClB,OAAO,IAAI,CAAC,iBAAiB,EAAE,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,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,OAAC,CAAC,QAAQ,CAAC,iDAAuB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5D,CAAC,CAAC,QAAQ,CAAC,uDAAuD,CAAC,CAAC,CAAC;QACtE,iDAAuB,CAAC,YAAY,CAAC,CAAC,wCAA+B,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF;AA3GD,wDA2GC"}
|
|
@@ -4,7 +4,7 @@ import type { GroupName, AccountId } from "../models/group";
|
|
|
4
4
|
/**
|
|
5
5
|
* **[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/)
|
|
6
6
|
* The standard Atlassian group names are default names only and can be edited or
|
|
7
|
-
* deleted.**
|
|
7
|
+
* deleted.** For example, an admin or Atlassian support could delete the default
|
|
8
8
|
* group jira-software-users or rename it to jsw-users at any point.
|
|
9
9
|
*
|
|
10
10
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group
|
|
@@ -12,7 +12,7 @@ const zod_1 = require("zod");
|
|
|
12
12
|
/**
|
|
13
13
|
* **[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/)
|
|
14
14
|
* The standard Atlassian group names are default names only and can be edited or
|
|
15
|
-
* deleted.**
|
|
15
|
+
* deleted.** For example, an admin or Atlassian support could delete the default
|
|
16
16
|
* group jira-software-users or rename it to jsw-users at any point.
|
|
17
17
|
*
|
|
18
18
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group
|
|
@@ -70,32 +70,6 @@ export declare class SettingsService extends CommonHttpService {
|
|
|
70
70
|
*/
|
|
71
71
|
spaceKey?: string | undefined;
|
|
72
72
|
}) => Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* Sets the look and feel settings to either the default settings or the
|
|
75
|
-
* custom settings, for the site or a single space. Note, the default
|
|
76
|
-
* space settings are inherited from the current global settings.
|
|
77
|
-
*
|
|
78
|
-
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
79
|
-
* 'Admin' permission for the space.
|
|
80
|
-
*
|
|
81
|
-
* @deprecated
|
|
82
|
-
* @returns Returned if the look and feel settings were set.
|
|
83
|
-
* @path PUT `/wiki/rest/api/settings/lookandfeel/selected`
|
|
84
|
-
* @scopes-current manage:confluence-configuration
|
|
85
|
-
* @scopes-beta read:configuration:confluence, read:space.setting:confluence, write:configuration:confluence, write:space.setting:confluence
|
|
86
|
-
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings#api-wiki-rest-api-settings-lookandfeel-selected-put
|
|
87
|
-
* @param params
|
|
88
|
-
*/
|
|
89
|
-
setLookAndFeelSettings: ({ spaceKey, requestBody }: {
|
|
90
|
-
/**
|
|
91
|
-
* The key of the space for which the look and feel settings will be
|
|
92
|
-
* set. If this is not set, the global look and feel settings will be
|
|
93
|
-
* set.
|
|
94
|
-
*/
|
|
95
|
-
spaceKey?: string | undefined;
|
|
96
|
-
/** The look and feel type to be set. */
|
|
97
|
-
requestBody: "global" | "custom" | "theme";
|
|
98
|
-
}) => Promise<string>;
|
|
99
73
|
/**
|
|
100
74
|
* Sets the look and feel settings to the default (global) settings, the
|
|
101
75
|
* custom settings, or the current theme's settings for a space.
|