@resolution/confluence-api-client 0.4.3 → 0.4.5
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 +4 -0
- 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/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
|
@@ -11,394 +11,397 @@ const common_1 = require("../models/common");
|
|
|
11
11
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
12
12
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants */
|
|
13
13
|
class ContentChildrenAndDescendantsService extends CommonHttpService_1.CommonHttpService {
|
|
14
|
-
|
|
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
|
-
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
/**
|
|
17
|
+
* Copies a single page and its associated properties, permissions, attachments,
|
|
18
|
+
* and custom contents.
|
|
19
|
+
* The `id` path parameter refers to the content ID of the page to copy. The
|
|
20
|
+
* target of the page to be copied
|
|
21
|
+
* is defined using the `destination` in the request body and can be one of the
|
|
22
|
+
* following types.
|
|
23
|
+
*
|
|
24
|
+
* - `space`: page will be copied to the specified space as a root page on the
|
|
25
|
+
* space
|
|
26
|
+
* - `parent_page`: page will be copied as a child of the specified parent page
|
|
27
|
+
* - `existing_page`: page will be copied and replace the specified page
|
|
28
|
+
*
|
|
29
|
+
* By default, the following objects are expanded: `space`, `history`, `version`.
|
|
30
|
+
*
|
|
31
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add'
|
|
32
|
+
* permission for the space that the content will be copied in and permission to
|
|
33
|
+
* update the content if copying to an `existing_page`.
|
|
34
|
+
*
|
|
35
|
+
* @returns Returned if the content is copied.
|
|
36
|
+
* @path {POST} /wiki/rest/api/content/{id}/copy
|
|
37
|
+
* @scopes-current write:confluence-content
|
|
38
|
+
* @scopes-beta read:content-details:confluence, write:page:confluence
|
|
39
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants#api-wiki-rest-api-content-id-copy-post
|
|
40
|
+
*/
|
|
41
|
+
this.copyPage = ({ id, expand, copyPageRequest, }) => {
|
|
42
|
+
return this.getClientInstance()
|
|
43
|
+
.request({
|
|
44
|
+
path: "/wiki/rest/api/content/{id}/copy",
|
|
45
|
+
method: "POST",
|
|
46
|
+
pathParams: {
|
|
47
|
+
id,
|
|
48
|
+
},
|
|
49
|
+
query: {
|
|
50
|
+
expand,
|
|
51
|
+
},
|
|
52
|
+
headers: {
|
|
53
|
+
"Content-Type": "application/json",
|
|
54
|
+
},
|
|
55
|
+
body: copyPageRequest,
|
|
56
|
+
})
|
|
57
|
+
.then(this.getClientInstance().responseHandler({
|
|
58
|
+
200: {
|
|
59
|
+
"application/json;charset=UTF-8": "json",
|
|
60
|
+
},
|
|
61
|
+
}))
|
|
62
|
+
.then(commonHttpClient.castResponse())
|
|
63
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentChildrenAndDescendantsService.copyPage.response"))
|
|
64
|
+
.then(commonHttpClient.getBody);
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Copy page hierarchy allows the copying of an entire hierarchy of pages and
|
|
68
|
+
* their associated properties, permissions and attachments.
|
|
69
|
+
* The id path parameter refers to the content id of the page to copy, and the
|
|
70
|
+
* new parent of this copied page is defined using the destinationPageId in the
|
|
71
|
+
* request body.
|
|
72
|
+
* The titleOptions object defines the rules of renaming page titles during the
|
|
73
|
+
* copy;
|
|
74
|
+
* for example, search and replace can be used in conjunction to rewrite the
|
|
75
|
+
* copied page titles.
|
|
76
|
+
*
|
|
77
|
+
* Response example:
|
|
78
|
+
* <pre><code>
|
|
79
|
+
* {
|
|
80
|
+
* "id" : "1180606",
|
|
81
|
+
* "links" : {
|
|
82
|
+
* "status" : "/rest/api/longtask/1180606"
|
|
83
|
+
* }
|
|
84
|
+
* }
|
|
85
|
+
* </code></pre>
|
|
86
|
+
* Use the /longtask/<taskId> REST API to get the copy task status.
|
|
87
|
+
*
|
|
88
|
+
* @returns Returns a full JSON representation of a long running task
|
|
89
|
+
* @path {POST} /wiki/rest/api/content/{id}/pagehierarchy/copy
|
|
90
|
+
* @scopes-current write:confluence-content
|
|
91
|
+
* @scopes-beta read:content.metadata:confluence, write:page:confluence
|
|
92
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants#api-wiki-rest-api-content-id-pagehierarchy-copy-post
|
|
93
|
+
*/
|
|
94
|
+
this.copyPageHierarchy = ({ id, copyPageHierarchyRequest, }) => {
|
|
95
|
+
return this.getClientInstance()
|
|
96
|
+
.request({
|
|
97
|
+
path: "/wiki/rest/api/content/{id}/pagehierarchy/copy",
|
|
98
|
+
method: "POST",
|
|
99
|
+
pathParams: {
|
|
100
|
+
id,
|
|
101
|
+
},
|
|
102
|
+
headers: {
|
|
103
|
+
"Content-Type": "application/json",
|
|
104
|
+
},
|
|
105
|
+
body: copyPageHierarchyRequest,
|
|
106
|
+
})
|
|
107
|
+
.then(this.getClientInstance().responseHandler({
|
|
108
|
+
202: {
|
|
109
|
+
"application/json": "json",
|
|
110
|
+
},
|
|
111
|
+
}))
|
|
112
|
+
.then(commonHttpClient.castResponse())
|
|
113
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentChildrenAndDescendantsService.copyPageHierarchy.response"))
|
|
114
|
+
.then(commonHttpClient.getBody);
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Deprecated, use [Confluence's v2
|
|
118
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
119
|
+
*
|
|
120
|
+
* Returns a map of the direct children of a piece of content. A piece of content
|
|
121
|
+
* has different types of child content, depending on its type. These are
|
|
122
|
+
* the default parent-child content type relationships:
|
|
123
|
+
*
|
|
124
|
+
* - `page`: child content is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
125
|
+
* `comment`, `attachment`
|
|
126
|
+
* - `whiteboard`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
127
|
+
* `folder`, `comment`, `attachment`
|
|
128
|
+
* - `database`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
129
|
+
* `folder`, `comment`, `attachment`
|
|
130
|
+
* - `embed`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
131
|
+
* `folder`, `comment`, `attachment`
|
|
132
|
+
* - `folder`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
133
|
+
* `folder`, `comment`, `attachment`
|
|
134
|
+
* - `blogpost`: child content is `comment`, `attachment`
|
|
135
|
+
* - `attachment`: child content is `comment`
|
|
136
|
+
* - `comment`: child content is `attachment`
|
|
137
|
+
*
|
|
138
|
+
* Apps can override these default relationships. Apps can also introduce
|
|
139
|
+
* new content types that create new parent-child content relationships.
|
|
140
|
+
*
|
|
141
|
+
* Note, the map will always include all child content types that are valid
|
|
142
|
+
* for the content. However, if the content has no instances of a child content
|
|
143
|
+
* type, the map will contain an empty array for that child content type.
|
|
144
|
+
*
|
|
145
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View'
|
|
146
|
+
* permission for the space,
|
|
147
|
+
* and permission to view the content if it is a page.
|
|
148
|
+
*
|
|
149
|
+
* @deprecated
|
|
150
|
+
* @returns Returned if the requested content children are returned.
|
|
151
|
+
* @path {GET} /wiki/rest/api/content/{id}/child
|
|
152
|
+
* @scopes-current read:confluence-content.summary
|
|
153
|
+
* @scopes-beta read:content-details:confluence
|
|
154
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants#api-wiki-rest-api-content-id-child-get
|
|
155
|
+
*/
|
|
156
|
+
this.getContentChildren = ({ id, expand, parentVersion, }) => {
|
|
157
|
+
return this.getClientInstance()
|
|
158
|
+
.request({
|
|
159
|
+
path: "/wiki/rest/api/content/{id}/child",
|
|
160
|
+
method: "GET",
|
|
161
|
+
pathParams: {
|
|
162
|
+
id,
|
|
163
|
+
},
|
|
164
|
+
query: {
|
|
165
|
+
expand,
|
|
166
|
+
parentVersion,
|
|
167
|
+
},
|
|
168
|
+
})
|
|
169
|
+
.then(this.getClientInstance().responseHandler({
|
|
170
|
+
200: {
|
|
171
|
+
"application/json": "json",
|
|
172
|
+
},
|
|
173
|
+
}))
|
|
174
|
+
.then(commonHttpClient.castResponse())
|
|
175
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentChildrenAndDescendantsService.getContentChildren.response"))
|
|
176
|
+
.then(commonHttpClient.getBody);
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Deprecated, use [Confluence's v2
|
|
180
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
181
|
+
*
|
|
182
|
+
* Returns all children of a given type, for a piece of content.
|
|
183
|
+
* A piece of content has different types of child content, depending on its type:
|
|
184
|
+
*
|
|
185
|
+
* - `page`: child content is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
186
|
+
* `comment`, `attachment`
|
|
187
|
+
* - `whiteboard`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
188
|
+
* `folder`, `comment`, `attachment`
|
|
189
|
+
* - `database`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
190
|
+
* `folder`, `comment`, `attachment`
|
|
191
|
+
* - `embed`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
192
|
+
* `folder`, `comment`, `attachment`
|
|
193
|
+
* - `folder`: child content is `page`, `whiteboard`, `database`, `embed`,
|
|
194
|
+
* `folder`, `comment`, `attachment`
|
|
195
|
+
* - `blogpost`: child content is `comment`, `attachment`
|
|
196
|
+
* - `attachment`: child content is `comment`
|
|
197
|
+
* - `comment`: child content is `attachment`
|
|
198
|
+
*
|
|
199
|
+
* Custom content types that are provided by apps can also be returned.
|
|
200
|
+
*
|
|
201
|
+
* Note, this method only returns direct children. To return children at all
|
|
202
|
+
* levels, use [Get descendants by type](#api-content-id-descendant-type-get).
|
|
203
|
+
*
|
|
204
|
+
* Starting on Dec 10, 2024, if the expand query parameter is used with the
|
|
205
|
+
* `body.export_view` and/or `body.styled_view` properties, then the query limit
|
|
206
|
+
* parameter will be restricted to a maximum value of 25.
|
|
207
|
+
*
|
|
208
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View'
|
|
209
|
+
* permission for the space,
|
|
210
|
+
* and permission to view the content if it is a page.
|
|
211
|
+
*
|
|
212
|
+
* @deprecated
|
|
213
|
+
* @returns Returned if the requested content is returned.
|
|
214
|
+
* @path {GET} /wiki/rest/api/content/{id}/child/{type}
|
|
215
|
+
* @scopes-current read:confluence-content.summary
|
|
216
|
+
* @scopes-beta read:content-details:confluence
|
|
217
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants#api-wiki-rest-api-content-id-child-type-get
|
|
218
|
+
*/
|
|
219
|
+
this.getContentChildrenByType = ({ id, type, expand, parentVersion, start, limit, }) => {
|
|
220
|
+
return this.getClientInstance()
|
|
221
|
+
.request({
|
|
222
|
+
path: "/wiki/rest/api/content/{id}/child/{type}",
|
|
223
|
+
method: "GET",
|
|
224
|
+
pathParams: {
|
|
225
|
+
id,
|
|
226
|
+
type,
|
|
227
|
+
},
|
|
228
|
+
query: {
|
|
229
|
+
expand,
|
|
230
|
+
parentVersion,
|
|
231
|
+
start,
|
|
232
|
+
limit,
|
|
233
|
+
},
|
|
234
|
+
})
|
|
235
|
+
.then(this.getClientInstance().responseHandler({
|
|
236
|
+
200: {
|
|
237
|
+
"application/json": "json",
|
|
238
|
+
},
|
|
239
|
+
}))
|
|
240
|
+
.then(commonHttpClient.castResponse())
|
|
241
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentChildrenAndDescendantsService.getContentChildrenByType.response"))
|
|
242
|
+
.then(commonHttpClient.getBody);
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Returns a map of the descendants of a piece of content. This is similar
|
|
246
|
+
* to [Get content children](#api-content-id-child-get), except that this
|
|
247
|
+
* method returns child pages at all levels, rather than just the direct
|
|
248
|
+
* child pages.
|
|
249
|
+
*
|
|
250
|
+
* A piece of content has different types of descendants, depending on its type:
|
|
251
|
+
*
|
|
252
|
+
* - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
253
|
+
* `comment`, `attachment`
|
|
254
|
+
* - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`,
|
|
255
|
+
* `folder`, `comment`, `attachment`
|
|
256
|
+
* - `database`: descendant is `page`, `whiteboard`, `database`, `embed`,
|
|
257
|
+
* `folder`, `comment`, `attachment`
|
|
258
|
+
* - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
259
|
+
* `comment`, `attachment`
|
|
260
|
+
* - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
261
|
+
* `comment`, `attachment`
|
|
262
|
+
* - `blogpost`: descendant is `comment`, `attachment`
|
|
263
|
+
* - `attachment`: descendant is `comment`
|
|
264
|
+
* - `comment`: descendant is `attachment`
|
|
265
|
+
*
|
|
266
|
+
* The map will always include all descendant types that are valid for the content.
|
|
267
|
+
* However, if the content has no instances of a descendant type, the map will
|
|
268
|
+
* contain an empty array for that descendant type.
|
|
269
|
+
*
|
|
270
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
271
|
+
* 'View' permission for the space, and permission to view the content if it
|
|
272
|
+
* is a page.
|
|
273
|
+
*
|
|
274
|
+
* @returns Returned if the requested descendants are returned.
|
|
275
|
+
* @path {GET} /wiki/rest/api/content/{id}/descendant
|
|
276
|
+
* @scopes-current read:confluence-content.summary
|
|
277
|
+
* @scopes-beta read:content-details:confluence
|
|
278
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants#api-wiki-rest-api-content-id-descendant-get
|
|
279
|
+
*/
|
|
280
|
+
this.getContentDescendants = ({ id, expand, }) => {
|
|
281
|
+
return this.getClientInstance()
|
|
282
|
+
.request({
|
|
283
|
+
path: "/wiki/rest/api/content/{id}/descendant",
|
|
284
|
+
method: "GET",
|
|
285
|
+
pathParams: {
|
|
286
|
+
id,
|
|
287
|
+
},
|
|
288
|
+
query: {
|
|
289
|
+
expand,
|
|
290
|
+
},
|
|
291
|
+
})
|
|
292
|
+
.then(this.getClientInstance().responseHandler({
|
|
293
|
+
200: {
|
|
294
|
+
"application/json": "json",
|
|
295
|
+
},
|
|
296
|
+
}))
|
|
297
|
+
.then(commonHttpClient.castResponse())
|
|
298
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentChildrenAndDescendantsService.getContentDescendants.response"))
|
|
299
|
+
.then(commonHttpClient.getBody);
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Returns all descendants of a given type, for a piece of content. This is
|
|
303
|
+
* similar to [Get content children by type](#api-content-id-child-type-get),
|
|
304
|
+
* except that this method returns child pages at all levels, rather than just
|
|
305
|
+
* the direct child pages.
|
|
306
|
+
*
|
|
307
|
+
* A piece of content has different types of descendants, depending on its type:
|
|
308
|
+
*
|
|
309
|
+
* - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
310
|
+
* `comment`, `attachment`
|
|
311
|
+
* - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`,
|
|
312
|
+
* `folder`, `comment`, `attachment`
|
|
313
|
+
* - `database`: descendant is `page`, `whiteboard`, `database`, `embed`,
|
|
314
|
+
* `folder`, `comment`, `attachment`
|
|
315
|
+
* - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
316
|
+
* `comment`, `attachment`
|
|
317
|
+
* - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`,
|
|
318
|
+
* `comment`, `attachment`
|
|
319
|
+
* - `blogpost`: descendant is `comment`, `attachment`
|
|
320
|
+
* - `attachment`: descendant is `comment`
|
|
321
|
+
* - `comment`: descendant is `attachment`
|
|
322
|
+
*
|
|
323
|
+
* Custom content types that are provided by apps can also be returned.
|
|
324
|
+
*
|
|
325
|
+
* Starting on Dec 10, 2024, if the expand query parameter is used with the
|
|
326
|
+
* `body.export_view` and/or `body.styled_view` properties, then the query limit
|
|
327
|
+
* parameter will be restricted to a maximum value of 25.
|
|
328
|
+
*
|
|
329
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
330
|
+
* 'View' permission for the space, and permission to view the content if it
|
|
331
|
+
* is a page.
|
|
332
|
+
*
|
|
333
|
+
* @returns Returned if the requested content is returned.
|
|
334
|
+
* @path {GET} /wiki/rest/api/content/{id}/descendant/{type}
|
|
335
|
+
* @scopes-current read:confluence-content.summary
|
|
336
|
+
* @scopes-beta read:content-details:confluence
|
|
337
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants#api-wiki-rest-api-content-id-descendant-type-get
|
|
338
|
+
*/
|
|
339
|
+
this.getDescendantsOfType = ({ id, type, depth, expand, start, limit, }) => {
|
|
340
|
+
return this.getClientInstance()
|
|
341
|
+
.request({
|
|
342
|
+
path: "/wiki/rest/api/content/{id}/descendant/{type}",
|
|
343
|
+
method: "GET",
|
|
344
|
+
pathParams: {
|
|
345
|
+
id,
|
|
346
|
+
type,
|
|
347
|
+
},
|
|
348
|
+
query: {
|
|
349
|
+
depth,
|
|
350
|
+
expand,
|
|
351
|
+
start,
|
|
352
|
+
limit,
|
|
353
|
+
},
|
|
354
|
+
})
|
|
355
|
+
.then(this.getClientInstance().responseHandler({
|
|
356
|
+
200: {
|
|
357
|
+
"application/json": "json",
|
|
358
|
+
},
|
|
359
|
+
}))
|
|
360
|
+
.then(commonHttpClient.castResponse())
|
|
361
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentChildrenAndDescendantsService.getDescendantsOfType.response"))
|
|
362
|
+
.then(commonHttpClient.getBody);
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* Move a page to a new location relative to a target page:
|
|
366
|
+
*
|
|
367
|
+
* * `before` - move the page under the same parent as the target, before the
|
|
368
|
+
* target in the list of children
|
|
369
|
+
* * `after` - move the page under the same parent as the target, after the target
|
|
370
|
+
* in the list of children
|
|
371
|
+
* * `append` - move the page to be a child of the target
|
|
372
|
+
*
|
|
373
|
+
* Caution: This API can move pages to the top level of a space. Top-level pages
|
|
374
|
+
* are difficult to find in the UI
|
|
375
|
+
* because they do not show up in the page tree display. To avoid this, never use
|
|
376
|
+
* `before` or `after` positions
|
|
377
|
+
* when the `targetId` is a top-level page.
|
|
378
|
+
*
|
|
379
|
+
* @returns Page was successfully moved
|
|
380
|
+
* @path {PUT} /wiki/rest/api/content/{pageId}/move/{position}/{targetId}
|
|
381
|
+
* @scopes-current write:confluence-content
|
|
382
|
+
* @scopes-beta write:page:confluence
|
|
383
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-children-and-descendants#api-wiki-rest-api-content-pageid-move-position-targetid-put
|
|
384
|
+
*/
|
|
385
|
+
this.movePage = ({ pageId, position, targetId, }) => {
|
|
386
|
+
return this.getClientInstance()
|
|
387
|
+
.request({
|
|
388
|
+
path: "/wiki/rest/api/content/{pageId}/move/{position}/{targetId}",
|
|
389
|
+
method: "PUT",
|
|
390
|
+
pathParams: {
|
|
391
|
+
pageId,
|
|
392
|
+
position,
|
|
393
|
+
targetId,
|
|
394
|
+
},
|
|
395
|
+
})
|
|
396
|
+
.then(this.getClientInstance().responseHandler({
|
|
397
|
+
200: {
|
|
398
|
+
"application/json": "json",
|
|
399
|
+
},
|
|
400
|
+
}))
|
|
401
|
+
.then(commonHttpClient.castResponse())
|
|
402
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentChildrenAndDescendantsService.movePage.response"))
|
|
403
|
+
.then(commonHttpClient.getBody);
|
|
404
|
+
};
|
|
402
405
|
}
|
|
403
406
|
static initialize() {
|
|
404
407
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentChildrenAndDescendantsService.getContentChildren.response", zod_1.z
|