@resolution/confluence-api-client 0.4.4 → 0.4.6
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/CHANGELOG.md +22 -0
- package/README.md +60 -1
- package/lib/openapi/v1/BaseConfluenceApiV1Client.d.ts +32 -33
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js +151 -88
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js.map +1 -1
- package/lib/openapi/v1/core/CommonHttpService.d.ts +2 -0
- package/lib/openapi/v1/core/CommonHttpService.js +9 -0
- package/lib/openapi/v1/core/CommonHttpService.js.map +1 -1
- package/lib/openapi/v1/services/AnalyticsService.d.ts +10 -10
- package/lib/openapi/v1/services/AnalyticsService.js +62 -59
- package/lib/openapi/v1/services/AnalyticsService.js.map +1 -1
- package/lib/openapi/v1/services/AuditService.d.ts +25 -25
- package/lib/openapi/v1/services/AuditService.js +205 -202
- package/lib/openapi/v1/services/AuditService.js.map +1 -1
- package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +20 -20
- package/lib/openapi/v1/services/ContentAttachmentsService.js +317 -314
- package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentBodyService.d.ts +15 -15
- package/lib/openapi/v1/services/ContentBodyService.js +140 -137
- package/lib/openapi/v1/services/ContentBodyService.js.map +1 -1
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +27 -27
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +391 -388
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentCommentsService.d.ts +8 -8
- package/lib/openapi/v1/services/ContentCommentsService.js +49 -46
- package/lib/openapi/v1/services/ContentCommentsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentLabelsService.d.ts +11 -11
- package/lib/openapi/v1/services/ContentLabelsService.js +150 -147
- package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentMacroBodyService.d.ts +13 -13
- package/lib/openapi/v1/services/ContentMacroBodyService.js +155 -152
- package/lib/openapi/v1/services/ContentMacroBodyService.js.map +1 -1
- package/lib/openapi/v1/services/ContentPermissionsService.d.ts +2 -2
- package/lib/openapi/v1/services/ContentPermissionsService.js +48 -45
- package/lib/openapi/v1/services/ContentPermissionsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentPropertiesService.d.ts +18 -18
- package/lib/openapi/v1/services/ContentPropertiesService.js +237 -234
- package/lib/openapi/v1/services/ContentPropertiesService.js.map +1 -1
- package/lib/openapi/v1/services/ContentRestrictionsService.d.ts +49 -49
- package/lib/openapi/v1/services/ContentRestrictionsService.js +505 -502
- package/lib/openapi/v1/services/ContentRestrictionsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentService.d.ts +50 -50
- package/lib/openapi/v1/services/ContentService.js +475 -472
- package/lib/openapi/v1/services/ContentService.js.map +1 -1
- package/lib/openapi/v1/services/ContentStatesService.d.ts +25 -25
- package/lib/openapi/v1/services/ContentStatesService.js +359 -356
- package/lib/openapi/v1/services/ContentStatesService.js.map +1 -1
- package/lib/openapi/v1/services/ContentVersionsService.d.ts +13 -13
- package/lib/openapi/v1/services/ContentVersionsService.js +144 -141
- package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentWatchesService.d.ts +57 -57
- package/lib/openapi/v1/services/ContentWatchesService.js +454 -451
- package/lib/openapi/v1/services/ContentWatchesService.js.map +1 -1
- package/lib/openapi/v1/services/DynamicModulesService.d.ts +5 -5
- package/lib/openapi/v1/services/DynamicModulesService.js +70 -67
- package/lib/openapi/v1/services/DynamicModulesService.js.map +1 -1
- package/lib/openapi/v1/services/ExperimentalService.d.ts +12 -12
- package/lib/openapi/v1/services/ExperimentalService.js +151 -148
- package/lib/openapi/v1/services/ExperimentalService.js.map +1 -1
- package/lib/openapi/v1/services/GroupService.d.ts +52 -52
- package/lib/openapi/v1/services/GroupService.js +445 -442
- package/lib/openapi/v1/services/GroupService.js.map +1 -1
- package/lib/openapi/v1/services/InlineTasksService.d.ts +20 -20
- package/lib/openapi/v1/services/InlineTasksService.js +118 -115
- package/lib/openapi/v1/services/InlineTasksService.js.map +1 -1
- package/lib/openapi/v1/services/LabelInfoService.d.ts +5 -5
- package/lib/openapi/v1/services/LabelInfoService.js +37 -34
- package/lib/openapi/v1/services/LabelInfoService.js.map +1 -1
- package/lib/openapi/v1/services/LongRunningTaskService.d.ts +8 -6
- package/lib/openapi/v1/services/LongRunningTaskService.js +67 -63
- package/lib/openapi/v1/services/LongRunningTaskService.js.map +1 -1
- package/lib/openapi/v1/services/RelationService.d.ts +37 -37
- package/lib/openapi/v1/services/RelationService.js +231 -228
- package/lib/openapi/v1/services/RelationService.js.map +1 -1
- package/lib/openapi/v1/services/SearchService.d.ts +20 -20
- package/lib/openapi/v1/services/SearchService.js +136 -133
- package/lib/openapi/v1/services/SearchService.js.map +1 -1
- package/lib/openapi/v1/services/SettingsService.d.ts +15 -15
- package/lib/openapi/v1/services/SettingsService.js +204 -201
- package/lib/openapi/v1/services/SettingsService.js.map +1 -1
- package/lib/openapi/v1/services/SpacePermissionsService.d.ts +6 -6
- package/lib/openapi/v1/services/SpacePermissionsService.js +99 -96
- package/lib/openapi/v1/services/SpacePermissionsService.js.map +1 -1
- package/lib/openapi/v1/services/SpacePropertiesService.d.ts +16 -16
- package/lib/openapi/v1/services/SpacePropertiesService.js +227 -224
- package/lib/openapi/v1/services/SpacePropertiesService.js.map +1 -1
- package/lib/openapi/v1/services/SpaceService.d.ts +38 -38
- package/lib/openapi/v1/services/SpaceService.js +320 -317
- package/lib/openapi/v1/services/SpaceService.js.map +1 -1
- package/lib/openapi/v1/services/SpaceSettingsService.d.ts +4 -4
- package/lib/openapi/v1/services/SpaceSettingsService.js +68 -65
- package/lib/openapi/v1/services/SpaceSettingsService.js.map +1 -1
- package/lib/openapi/v1/services/TemplateService.d.ts +20 -20
- package/lib/openapi/v1/services/TemplateService.js +214 -211
- package/lib/openapi/v1/services/TemplateService.js.map +1 -1
- package/lib/openapi/v1/services/ThemesService.d.ts +13 -13
- package/lib/openapi/v1/services/ThemesService.js +179 -176
- package/lib/openapi/v1/services/ThemesService.js.map +1 -1
- package/lib/openapi/v1/services/UserPropertiesService.d.ts +12 -12
- package/lib/openapi/v1/services/UserPropertiesService.js +165 -162
- package/lib/openapi/v1/services/UserPropertiesService.js.map +1 -1
- package/lib/openapi/v1/services/UsersService.d.ts +21 -21
- package/lib/openapi/v1/services/UsersService.js +229 -226
- package/lib/openapi/v1/services/UsersService.js.map +1 -1
- package/lib/openapi/v2/BaseConfluenceApiV2Client.d.ts +23 -24
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js +92 -47
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js.map +1 -1
- package/lib/openapi/v2/core/CommonHttpService.d.ts +2 -0
- package/lib/openapi/v2/core/CommonHttpService.js +9 -0
- package/lib/openapi/v2/core/CommonHttpService.js.map +1 -1
- package/lib/openapi/v2/models/user.d.ts +0 -2
- package/lib/openapi/v2/models/user.js +0 -2
- package/lib/openapi/v2/models/user.js.map +1 -1
- package/lib/openapi/v2/services/AncestorsService.d.ts +17 -17
- package/lib/openapi/v2/services/AncestorsService.js +174 -171
- package/lib/openapi/v2/services/AncestorsService.js.map +1 -1
- package/lib/openapi/v2/services/AttachmentService.d.ts +62 -62
- package/lib/openapi/v2/services/AttachmentService.js +261 -258
- package/lib/openapi/v2/services/AttachmentService.js.map +1 -1
- package/lib/openapi/v2/services/BlogPostService.d.ts +70 -70
- package/lib/openapi/v2/services/BlogPostService.js +270 -267
- package/lib/openapi/v2/services/BlogPostService.js.map +1 -1
- package/lib/openapi/v2/services/ChildrenService.d.ts +14 -14
- package/lib/openapi/v2/services/ChildrenService.js +77 -74
- package/lib/openapi/v2/services/ChildrenService.js.map +1 -1
- package/lib/openapi/v2/services/ClassificationLevelService.d.ts +21 -21
- package/lib/openapi/v2/services/ClassificationLevelService.js +304 -301
- package/lib/openapi/v2/services/ClassificationLevelService.js.map +1 -1
- package/lib/openapi/v2/services/CommentService.d.ts +136 -136
- package/lib/openapi/v2/services/CommentService.js +635 -632
- package/lib/openapi/v2/services/CommentService.js.map +1 -1
- package/lib/openapi/v2/services/ContentPropertiesService.d.ts +128 -128
- package/lib/openapi/v2/services/ContentPropertiesService.js +1242 -1239
- package/lib/openapi/v2/services/ContentPropertiesService.js.map +1 -1
- package/lib/openapi/v2/services/ContentService.d.ts +2 -2
- package/lib/openapi/v2/services/ContentService.js +40 -37
- package/lib/openapi/v2/services/ContentService.js.map +1 -1
- package/lib/openapi/v2/services/CustomContentService.d.ts +72 -72
- package/lib/openapi/v2/services/CustomContentService.js +299 -296
- package/lib/openapi/v2/services/CustomContentService.js.map +1 -1
- package/lib/openapi/v2/services/DataPoliciesService.d.ts +10 -10
- package/lib/openapi/v2/services/DataPoliciesService.js +67 -64
- package/lib/openapi/v2/services/DataPoliciesService.js.map +1 -1
- package/lib/openapi/v2/services/DatabaseService.d.ts +17 -17
- package/lib/openapi/v2/services/DatabaseService.js +90 -87
- package/lib/openapi/v2/services/DatabaseService.js.map +1 -1
- package/lib/openapi/v2/services/LabelService.d.ts +57 -57
- package/lib/openapi/v2/services/LabelService.js +263 -260
- package/lib/openapi/v2/services/LabelService.js.map +1 -1
- package/lib/openapi/v2/services/LikeService.d.ts +36 -36
- package/lib/openapi/v2/services/LikeService.js +250 -247
- package/lib/openapi/v2/services/LikeService.js.map +1 -1
- package/lib/openapi/v2/services/OperationService.d.ts +20 -20
- package/lib/openapi/v2/services/OperationService.js +298 -295
- package/lib/openapi/v2/services/OperationService.js.map +1 -1
- package/lib/openapi/v2/services/PageService.d.ts +73 -73
- package/lib/openapi/v2/services/PageService.js +272 -269
- package/lib/openapi/v2/services/PageService.js.map +1 -1
- package/lib/openapi/v2/services/SmartLinkService.d.ts +19 -17
- package/lib/openapi/v2/services/SmartLinkService.js +92 -89
- package/lib/openapi/v2/services/SmartLinkService.js.map +1 -1
- package/lib/openapi/v2/services/SpacePermissionsService.d.ts +6 -6
- package/lib/openapi/v2/services/SpacePermissionsService.js +35 -32
- package/lib/openapi/v2/services/SpacePermissionsService.js.map +1 -1
- package/lib/openapi/v2/services/SpacePropertiesService.d.ts +15 -15
- package/lib/openapi/v2/services/SpacePropertiesService.js +165 -162
- package/lib/openapi/v2/services/SpacePropertiesService.js.map +1 -1
- package/lib/openapi/v2/services/SpaceService.d.ts +28 -28
- package/lib/openapi/v2/services/SpaceService.js +83 -80
- package/lib/openapi/v2/services/SpaceService.js.map +1 -1
- package/lib/openapi/v2/services/TaskService.d.ts +40 -40
- package/lib/openapi/v2/services/TaskService.js +120 -117
- package/lib/openapi/v2/services/TaskService.js.map +1 -1
- package/lib/openapi/v2/services/UserService.d.ts +11 -11
- package/lib/openapi/v2/services/UserService.js +91 -88
- package/lib/openapi/v2/services/UserService.js.map +1 -1
- package/lib/openapi/v2/services/VersionService.d.ts +59 -59
- package/lib/openapi/v2/services/VersionService.js +395 -392
- package/lib/openapi/v2/services/VersionService.js.map +1 -1
- package/lib/openapi/v2/services/WhiteboardService.d.ts +17 -17
- package/lib/openapi/v2/services/WhiteboardService.js +90 -87
- package/lib/openapi/v2/services/WhiteboardService.js.map +1 -1
- package/package.json +4 -3
|
@@ -12,478 +12,481 @@ const content_1 = require("../models/content");
|
|
|
12
12
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
13
13
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content */
|
|
14
14
|
class ContentService extends CommonHttpService_1.CommonHttpService {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* Archives a list of pages. The pages to be archived are specified as a list of
|
|
19
|
+
* content IDs.
|
|
20
|
+
* This API accepts the archival request and returns a task ID.
|
|
21
|
+
* The archival process happens asynchronously.
|
|
22
|
+
* Use the /longtask/<taskId> REST API to get the copy task status.
|
|
23
|
+
*
|
|
24
|
+
* Each content ID needs to resolve to page objects that are not already in an
|
|
25
|
+
* archived state.
|
|
26
|
+
* The content IDs need not belong to the same space.
|
|
27
|
+
*
|
|
28
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
29
|
+
* 'Archive' permission for each of the pages in the corresponding space it
|
|
30
|
+
* belongs to.
|
|
31
|
+
*
|
|
32
|
+
* @returns Returned if the archive request has been submitted.
|
|
33
|
+
* @path {POST} /wiki/rest/api/content/archive
|
|
34
|
+
* @scopes-current write:confluence-content
|
|
35
|
+
* @scopes-beta read:content.metadata:confluence, write:page:confluence
|
|
36
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-archive-post
|
|
37
|
+
*/
|
|
38
|
+
this.archivePages = ({ requestBody, }) => {
|
|
39
|
+
return this.getClientInstance()
|
|
40
|
+
.request({
|
|
41
|
+
path: "/wiki/rest/api/content/archive",
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers: {
|
|
44
|
+
"Content-Type": "application/json",
|
|
45
|
+
},
|
|
46
|
+
body: requestBody,
|
|
47
|
+
})
|
|
48
|
+
.then(this.getClientInstance().responseHandler({
|
|
49
|
+
202: {
|
|
50
|
+
"application/json": "json",
|
|
51
|
+
},
|
|
52
|
+
}))
|
|
53
|
+
.then(commonHttpClient.castResponse())
|
|
54
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.archivePages.response"))
|
|
55
|
+
.then(commonHttpClient.getBody);
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Deprecated, use [Confluence's v2
|
|
59
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
60
|
+
*
|
|
61
|
+
* Creates a new piece of content or publishes an existing draft.
|
|
62
|
+
*
|
|
63
|
+
* To publish a draft, add the `id` and `status` properties to the body of the
|
|
64
|
+
* request.
|
|
65
|
+
* Set the `id` to the ID of the draft and set the `status` to 'current'. When the
|
|
66
|
+
* request is sent, a new piece of content will be created and the metadata from
|
|
67
|
+
* the
|
|
68
|
+
* draft will be transferred into it.
|
|
69
|
+
*
|
|
70
|
+
* By default, the following objects are expanded: `space`, `history`, `version`.
|
|
71
|
+
*
|
|
72
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add'
|
|
73
|
+
* permission for the
|
|
74
|
+
* space that the content will be created in, and permission to view the draft if
|
|
75
|
+
* publishing a draft.
|
|
76
|
+
*
|
|
77
|
+
* @deprecated
|
|
78
|
+
* @returns Returned if the content is created.
|
|
79
|
+
* @path {POST} /wiki/rest/api/content
|
|
80
|
+
* @scopes-current write:confluence-content
|
|
81
|
+
* @scopes-beta read:content-details:confluence, write:content:confluence
|
|
82
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-post
|
|
83
|
+
*/
|
|
84
|
+
this.createContent = ({ status, expand, contentCreate, }) => {
|
|
85
|
+
return this.getClientInstance()
|
|
86
|
+
.request({
|
|
87
|
+
path: "/wiki/rest/api/content",
|
|
88
|
+
method: "POST",
|
|
89
|
+
query: {
|
|
90
|
+
status,
|
|
91
|
+
expand,
|
|
92
|
+
},
|
|
93
|
+
headers: {
|
|
94
|
+
"Content-Type": "application/json",
|
|
95
|
+
},
|
|
96
|
+
body: contentCreate,
|
|
97
|
+
})
|
|
98
|
+
.then(this.getClientInstance().responseHandler({
|
|
99
|
+
200: {
|
|
100
|
+
"application/json": "json",
|
|
101
|
+
},
|
|
102
|
+
}))
|
|
103
|
+
.then(commonHttpClient.castResponse())
|
|
104
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.createContent.response"))
|
|
105
|
+
.then(commonHttpClient.getBody);
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Deprecated, use [Confluence's v2
|
|
109
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
110
|
+
*
|
|
111
|
+
* Moves a piece of content to the space's trash or purges it from the trash,
|
|
112
|
+
* depending on the content's type and status:
|
|
113
|
+
*
|
|
114
|
+
* - If the content's type is `page`,`blogpost`, or `attachment` and its status is
|
|
115
|
+
* `current`,
|
|
116
|
+
* it will be trashed.
|
|
117
|
+
* - If the content's type is `page`,`blogpost`, or `attachment` and its status is
|
|
118
|
+
* `trashed`,
|
|
119
|
+
* the content will be purged from the trash and deleted permanently. Note,
|
|
120
|
+
* you must also set the `status` query parameter to `trashed` in your request.
|
|
121
|
+
* - If the content's type is `comment`, it will be deleted
|
|
122
|
+
* permanently without being trashed.
|
|
123
|
+
*
|
|
124
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
125
|
+
* 'Delete' permission for the space that the content is in.
|
|
126
|
+
*
|
|
127
|
+
* @deprecated
|
|
128
|
+
* @path {DELETE} /wiki/rest/api/content/{id}
|
|
129
|
+
* @scopes-current write:confluence-content
|
|
130
|
+
* @scopes-beta delete:content:confluence
|
|
131
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-delete
|
|
132
|
+
*/
|
|
133
|
+
this.deleteContent = ({ id, status, }) => {
|
|
134
|
+
return this.getClientInstance()
|
|
135
|
+
.request({
|
|
136
|
+
path: "/wiki/rest/api/content/{id}",
|
|
137
|
+
method: "DELETE",
|
|
138
|
+
pathParams: {
|
|
139
|
+
id,
|
|
140
|
+
},
|
|
141
|
+
query: {
|
|
142
|
+
status,
|
|
143
|
+
},
|
|
144
|
+
})
|
|
145
|
+
.then(commonHttpClient.discardResult);
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Deprecated, use [Confluence's v2
|
|
149
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
150
|
+
*
|
|
151
|
+
* Returns all content in a Confluence instance.
|
|
152
|
+
*
|
|
153
|
+
* By default, the following objects are expanded: `space`, `history`, `version`.
|
|
154
|
+
*
|
|
155
|
+
* Starting on Dec 10, 2024, if the expand query parameter is used with the
|
|
156
|
+
* `body.export_view` and/or `body.styled_view` properties, then the query limit
|
|
157
|
+
* parameter will be restricted to a maximum value of 25.
|
|
158
|
+
*
|
|
159
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
160
|
+
* Permission to access the Confluence site ('Can use' global permission).
|
|
161
|
+
* Only content that the user has permission to view will be returned.
|
|
162
|
+
*
|
|
163
|
+
* @deprecated
|
|
164
|
+
* @returns Returned if the requested list of content is returned.
|
|
165
|
+
* @path {GET} /wiki/rest/api/content
|
|
166
|
+
* @scopes-current read:confluence-content.summary
|
|
167
|
+
* @scopes-beta read:content-details:confluence
|
|
168
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-get
|
|
169
|
+
*/
|
|
170
|
+
this.getContent = ({ type, spaceKey, title, status, postingDay, expand, trigger, orderby, start, limit, } = {}) => {
|
|
171
|
+
return this.getClientInstance()
|
|
172
|
+
.request({
|
|
173
|
+
path: "/wiki/rest/api/content",
|
|
174
|
+
method: "GET",
|
|
175
|
+
query: {
|
|
176
|
+
type,
|
|
177
|
+
spaceKey,
|
|
178
|
+
title,
|
|
179
|
+
status,
|
|
180
|
+
postingDay,
|
|
181
|
+
expand,
|
|
182
|
+
trigger,
|
|
183
|
+
orderby,
|
|
184
|
+
start,
|
|
185
|
+
limit,
|
|
186
|
+
},
|
|
187
|
+
})
|
|
188
|
+
.then(this.getClientInstance().responseHandler({
|
|
189
|
+
200: {
|
|
190
|
+
"application/json": "json",
|
|
191
|
+
},
|
|
192
|
+
}))
|
|
193
|
+
.then(commonHttpClient.castResponse())
|
|
194
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContent.response"))
|
|
195
|
+
.then(commonHttpClient.getBody);
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Deprecated, use [Confluence's v2
|
|
199
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
200
|
+
*
|
|
201
|
+
* Returns a single piece of content, like a page or a blog post.
|
|
202
|
+
*
|
|
203
|
+
* By default, the following objects are expanded: `space`, `history`, `version`.
|
|
204
|
+
*
|
|
205
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
206
|
+
* Permission to view the content. If the content is a blog post, 'View' permission
|
|
207
|
+
* for the space is required.
|
|
208
|
+
*
|
|
209
|
+
* @deprecated
|
|
210
|
+
* @returns Returned if the requested content is returned.
|
|
211
|
+
* @path {GET} /wiki/rest/api/content/{id}
|
|
212
|
+
* @scopes-current read:confluence-content.summary
|
|
213
|
+
* @scopes-beta read:content-details:confluence
|
|
214
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-get
|
|
215
|
+
*/
|
|
216
|
+
this.getContentById = ({ id, status, version, embeddedContentRender, expand, trigger, }) => {
|
|
217
|
+
return this.getClientInstance()
|
|
218
|
+
.request({
|
|
219
|
+
path: "/wiki/rest/api/content/{id}",
|
|
220
|
+
method: "GET",
|
|
221
|
+
pathParams: {
|
|
222
|
+
id,
|
|
223
|
+
},
|
|
224
|
+
query: {
|
|
225
|
+
status,
|
|
226
|
+
version,
|
|
227
|
+
embeddedContentRender,
|
|
228
|
+
expand,
|
|
229
|
+
trigger,
|
|
230
|
+
},
|
|
231
|
+
})
|
|
232
|
+
.then(this.getClientInstance().responseHandler({
|
|
233
|
+
200: {
|
|
234
|
+
"application/json": "json",
|
|
235
|
+
},
|
|
236
|
+
}))
|
|
237
|
+
.then(commonHttpClient.castResponse())
|
|
238
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContentById.response"))
|
|
239
|
+
.then(commonHttpClient.getBody);
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Deprecated, use [Confluence's v2
|
|
243
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
244
|
+
*
|
|
245
|
+
* Returns the most recent update for a piece of content.
|
|
246
|
+
*
|
|
247
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
248
|
+
* Permission to view the content.
|
|
249
|
+
*
|
|
250
|
+
* @deprecated
|
|
251
|
+
* @returns Returned if the requested content history is returned.
|
|
252
|
+
* @path {GET} /wiki/rest/api/content/{id}/history
|
|
253
|
+
* @scopes-current read:confluence-content.summary
|
|
254
|
+
* @scopes-beta read:content.metadata:confluence, read:user:confluence
|
|
255
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-history-get
|
|
256
|
+
*/
|
|
257
|
+
this.getHistoryForContent = ({ id, expand, }) => {
|
|
258
|
+
return this.getClientInstance()
|
|
259
|
+
.request({
|
|
260
|
+
path: "/wiki/rest/api/content/{id}/history",
|
|
261
|
+
method: "GET",
|
|
262
|
+
pathParams: {
|
|
263
|
+
id,
|
|
264
|
+
},
|
|
265
|
+
query: {
|
|
266
|
+
expand,
|
|
267
|
+
},
|
|
268
|
+
})
|
|
269
|
+
.then(this.getClientInstance().responseHandler({
|
|
270
|
+
200: {
|
|
271
|
+
"application/json": "json",
|
|
272
|
+
},
|
|
273
|
+
}))
|
|
274
|
+
.then(commonHttpClient.castResponse())
|
|
275
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getHistoryForContent.response"))
|
|
276
|
+
.then(commonHttpClient.getBody);
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Publishes a legacy draft of a page created from a blueprint. Legacy drafts
|
|
280
|
+
* will eventually be removed in favor of shared drafts. For now, this method
|
|
281
|
+
* works the same as [Publish shared
|
|
282
|
+
* draft](#api-content-blueprint-instance-draftId-put).
|
|
283
|
+
*
|
|
284
|
+
* By default, the following objects are expanded: `body.storage`, `history`,
|
|
285
|
+
* `space`, `version`, `ancestors`.
|
|
286
|
+
*
|
|
287
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
288
|
+
* Permission to view the draft and 'Add' permission for the space that
|
|
289
|
+
* the content will be created in.
|
|
290
|
+
*
|
|
291
|
+
* @returns Returned if the draft was successfully published.
|
|
292
|
+
* @path {POST} /wiki/rest/api/content/blueprint/instance/{draftId}
|
|
293
|
+
* @scopes-current write:confluence-content
|
|
294
|
+
* @scopes-beta read:content-details:confluence, write:content:confluence
|
|
295
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-blueprint-instance-draftid-post
|
|
296
|
+
*/
|
|
297
|
+
this.publishLegacyDraft = ({ draftId, status, expand, contentBlueprintDraft, }) => {
|
|
298
|
+
return this.getClientInstance()
|
|
299
|
+
.request({
|
|
300
|
+
path: "/wiki/rest/api/content/blueprint/instance/{draftId}",
|
|
301
|
+
method: "POST",
|
|
302
|
+
pathParams: {
|
|
303
|
+
draftId,
|
|
304
|
+
},
|
|
305
|
+
query: {
|
|
306
|
+
status,
|
|
307
|
+
expand,
|
|
308
|
+
},
|
|
309
|
+
headers: {
|
|
310
|
+
"Content-Type": "application/json",
|
|
311
|
+
},
|
|
312
|
+
body: contentBlueprintDraft,
|
|
313
|
+
})
|
|
314
|
+
.then(this.getClientInstance().responseHandler({
|
|
315
|
+
200: {
|
|
316
|
+
"application/json": "json",
|
|
317
|
+
},
|
|
318
|
+
}))
|
|
319
|
+
.then(commonHttpClient.castResponse())
|
|
320
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.publishLegacyDraft.response"))
|
|
321
|
+
.then(commonHttpClient.getBody);
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Publishes a shared draft of a page created from a blueprint.
|
|
325
|
+
*
|
|
326
|
+
* By default, the following objects are expanded: `body.storage`, `history`,
|
|
327
|
+
* `space`, `version`, `ancestors`.
|
|
328
|
+
*
|
|
329
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
330
|
+
* Permission to view the draft and 'Add' permission for the space that
|
|
331
|
+
* the content will be created in.
|
|
332
|
+
*
|
|
333
|
+
* @returns Returned if the draft was successfully published.
|
|
334
|
+
* @path {PUT} /wiki/rest/api/content/blueprint/instance/{draftId}
|
|
335
|
+
* @scopes-current write:confluence-content
|
|
336
|
+
* @scopes-beta read:content-details:confluence, write:content:confluence
|
|
337
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-blueprint-instance-draftid-put
|
|
338
|
+
*/
|
|
339
|
+
this.publishSharedDraft = ({ draftId, status, expand, contentBlueprintDraft, }) => {
|
|
340
|
+
return this.getClientInstance()
|
|
341
|
+
.request({
|
|
342
|
+
path: "/wiki/rest/api/content/blueprint/instance/{draftId}",
|
|
343
|
+
method: "PUT",
|
|
344
|
+
pathParams: {
|
|
345
|
+
draftId,
|
|
346
|
+
},
|
|
347
|
+
query: {
|
|
348
|
+
status,
|
|
349
|
+
expand,
|
|
350
|
+
},
|
|
351
|
+
headers: {
|
|
352
|
+
"Content-Type": "application/json",
|
|
353
|
+
},
|
|
354
|
+
body: contentBlueprintDraft,
|
|
355
|
+
})
|
|
356
|
+
.then(this.getClientInstance().responseHandler({
|
|
357
|
+
200: {
|
|
358
|
+
"application/json": "json",
|
|
359
|
+
},
|
|
360
|
+
}))
|
|
361
|
+
.then(commonHttpClient.castResponse())
|
|
362
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.publishSharedDraft.response"))
|
|
363
|
+
.then(commonHttpClient.getBody);
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Returns the list of content that matches a Confluence Query Language
|
|
367
|
+
* (CQL) query. For information on CQL, see:
|
|
368
|
+
* [Advanced searching using
|
|
369
|
+
* CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).
|
|
370
|
+
*
|
|
371
|
+
* Example initial call:
|
|
372
|
+
* ```
|
|
373
|
+
* /wiki/rest/api/content/search?cql=type=page&limit=25
|
|
374
|
+
* ```
|
|
375
|
+
*
|
|
376
|
+
* Example response:
|
|
377
|
+
* ```
|
|
378
|
+
* {
|
|
379
|
+
* "results": [
|
|
380
|
+
* { ... },
|
|
381
|
+
* { ... },
|
|
382
|
+
* ...
|
|
383
|
+
* { ... }
|
|
384
|
+
* ],
|
|
385
|
+
* "limit": 25,
|
|
386
|
+
* "size": 25,
|
|
387
|
+
* ...
|
|
388
|
+
* "_links": {
|
|
389
|
+
* "base": "<url>",
|
|
390
|
+
* "context": "<url>",
|
|
391
|
+
* "next":
|
|
392
|
+
* "/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg",
|
|
393
|
+
* "self": "<url>"
|
|
394
|
+
* }
|
|
395
|
+
* }
|
|
396
|
+
* ```
|
|
397
|
+
*
|
|
398
|
+
* When additional results are available, returns `next` and `prev` URLs to
|
|
399
|
+
* retrieve them in subsequent calls. The URLs each contain a cursor that points
|
|
400
|
+
* to the appropriate set of results. Use `limit` to specify the number of results
|
|
401
|
+
* returned in each call.
|
|
402
|
+
* Example subsequent call (taken from example response):
|
|
403
|
+
* ```
|
|
404
|
+
* /wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
|
|
405
|
+
* ```
|
|
406
|
+
* The response to this will have a `prev` URL similar to the `next` in the
|
|
407
|
+
* example response.
|
|
408
|
+
*
|
|
409
|
+
* Starting on Dec 10, 2024, if the expand query parameter is used with the
|
|
410
|
+
* `body.export_view` and/or `body.styled_view` properties, then the query limit
|
|
411
|
+
* parameter will be restricted to a maximum value of 25.
|
|
412
|
+
*
|
|
413
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
414
|
+
* Permission to access the Confluence site ('Can use' global permission).
|
|
415
|
+
* Only content that the user has permission to view will be returned.
|
|
416
|
+
*
|
|
417
|
+
* @returns Returned if the requested list of content is returned.
|
|
418
|
+
* @path {GET} /wiki/rest/api/content/search
|
|
419
|
+
* @scopes-current search:confluence
|
|
420
|
+
* @scopes-beta read:content-details:confluence
|
|
421
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-search-get
|
|
422
|
+
*/
|
|
423
|
+
this.searchContentByCql = ({ cql, cqlcontext, expand, cursor, limit, }) => {
|
|
424
|
+
return this.getClientInstance()
|
|
425
|
+
.request({
|
|
426
|
+
path: "/wiki/rest/api/content/search",
|
|
427
|
+
method: "GET",
|
|
428
|
+
query: {
|
|
429
|
+
cql,
|
|
430
|
+
cqlcontext,
|
|
431
|
+
expand,
|
|
432
|
+
cursor,
|
|
433
|
+
limit,
|
|
434
|
+
},
|
|
435
|
+
})
|
|
436
|
+
.then(this.getClientInstance().responseHandler({
|
|
437
|
+
200: {
|
|
438
|
+
"application/json": "json",
|
|
439
|
+
},
|
|
440
|
+
}))
|
|
441
|
+
.then(commonHttpClient.castResponse())
|
|
442
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.searchContentByCQL.response"))
|
|
443
|
+
.then(commonHttpClient.getBody);
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* Deprecated, use [Confluence's v2
|
|
447
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
448
|
+
*
|
|
449
|
+
* Updates a piece of content. Use this method to update the title or body
|
|
450
|
+
* of a piece of content, change the status, change the parent page, and more.
|
|
451
|
+
*
|
|
452
|
+
* Note, updating draft content is currently not supported.
|
|
453
|
+
*
|
|
454
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
455
|
+
* Permission to update the content.
|
|
456
|
+
*
|
|
457
|
+
* @deprecated
|
|
458
|
+
* @returns Returned if the content is updated.
|
|
459
|
+
* @path {PUT} /wiki/rest/api/content/{id}
|
|
460
|
+
* @scopes-current write:confluence-content
|
|
461
|
+
* @scopes-beta read:content-details:confluence, write:content:confluence
|
|
462
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-put
|
|
463
|
+
*/
|
|
464
|
+
this.updateContent = ({ id, status, conflictPolicy, contentUpdate, }) => {
|
|
465
|
+
return this.getClientInstance()
|
|
466
|
+
.request({
|
|
467
|
+
path: "/wiki/rest/api/content/{id}",
|
|
468
|
+
method: "PUT",
|
|
469
|
+
pathParams: {
|
|
470
|
+
id,
|
|
471
|
+
},
|
|
472
|
+
query: {
|
|
473
|
+
status,
|
|
474
|
+
conflictPolicy,
|
|
475
|
+
},
|
|
476
|
+
headers: {
|
|
477
|
+
"Content-Type": "application/json",
|
|
478
|
+
},
|
|
479
|
+
body: contentUpdate,
|
|
480
|
+
})
|
|
481
|
+
.then(this.getClientInstance().responseHandler({
|
|
482
|
+
200: {
|
|
483
|
+
"application/json": "json",
|
|
484
|
+
},
|
|
485
|
+
}))
|
|
486
|
+
.then(commonHttpClient.castResponse())
|
|
487
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.updateContent.response"))
|
|
488
|
+
.then(commonHttpClient.getBody);
|
|
489
|
+
};
|
|
487
490
|
}
|
|
488
491
|
static initialize() {
|
|
489
492
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.getContent.response", zod_1.z
|