@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
|
@@ -12,362 +12,365 @@ const contentStates_1 = require("../models/contentStates");
|
|
|
12
12
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
13
13
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states */
|
|
14
14
|
class ContentStatesService 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
|
-
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a long running task that Removes content state from draft or published
|
|
19
|
+
* versions of pages specified.
|
|
20
|
+
*
|
|
21
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**
|
|
22
|
+
* Content Edit Permission for a content to have its state removed via this
|
|
23
|
+
* endpoint.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated
|
|
26
|
+
* @returns Returned if a task to remove content states is created. Returns the taskId.
|
|
27
|
+
* This task id can be passed into /wiki/rest/api/content-states/task/{taskId}
|
|
28
|
+
* @path {POST} /wiki/rest/api/content-states/delete
|
|
29
|
+
* @scopes-current write:confluence-content
|
|
30
|
+
* @scopes-beta write:content:confluence, read:content-details:confluence
|
|
31
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-content-states-delete-post
|
|
32
|
+
*/
|
|
33
|
+
this.bulkRemoveContentStates = ({ status, requestBody, }) => {
|
|
34
|
+
return this.getClientInstance()
|
|
35
|
+
.request({
|
|
36
|
+
path: "/wiki/rest/api/content-states/delete",
|
|
37
|
+
method: "POST",
|
|
38
|
+
query: {
|
|
39
|
+
status,
|
|
40
|
+
},
|
|
41
|
+
headers: {
|
|
42
|
+
"Content-Type": "application/json",
|
|
43
|
+
},
|
|
44
|
+
body: requestBody,
|
|
45
|
+
})
|
|
46
|
+
.then(this.getClientInstance().responseHandler({
|
|
47
|
+
200: {
|
|
48
|
+
"application/json": "json",
|
|
49
|
+
},
|
|
50
|
+
}))
|
|
51
|
+
.then(commonHttpClient.castResponse())
|
|
52
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.bulkRemoveContentStates.response"))
|
|
53
|
+
.then(commonHttpClient.getBody);
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Gets content states that are available for the content to be set as.
|
|
57
|
+
* Will return all enabled Space Content States.
|
|
58
|
+
* Will only return most the 3 most recently published custom content states to
|
|
59
|
+
* match UI editor list.
|
|
60
|
+
* To get all custom content states, use the /content-states endpoint.
|
|
61
|
+
*
|
|
62
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
63
|
+
* Permission to edit the content.
|
|
64
|
+
*
|
|
65
|
+
* @returns Returned if the content is found and permission is valid.
|
|
66
|
+
* @path {GET} /wiki/rest/api/content/{id}/state/available
|
|
67
|
+
* @scopes-current write:confluence-content
|
|
68
|
+
* @scopes-beta write:content:confluence
|
|
69
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-content-id-state-available-get
|
|
70
|
+
*/
|
|
71
|
+
this.getAvailableContentStates = ({ id, }) => {
|
|
72
|
+
return this.getClientInstance()
|
|
73
|
+
.request({
|
|
74
|
+
path: "/wiki/rest/api/content/{id}/state/available",
|
|
75
|
+
method: "GET",
|
|
76
|
+
pathParams: {
|
|
77
|
+
id,
|
|
78
|
+
},
|
|
79
|
+
})
|
|
80
|
+
.then(this.getClientInstance().responseHandler({
|
|
81
|
+
200: {
|
|
82
|
+
"application/json": "json",
|
|
83
|
+
},
|
|
84
|
+
}))
|
|
85
|
+
.then(commonHttpClient.castResponse())
|
|
86
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.getAvailableContentStates.response"))
|
|
87
|
+
.then(commonHttpClient.getBody);
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Gets the current content state of the draft or current version of content. To
|
|
91
|
+
* specify the draft version, set
|
|
92
|
+
* the parameter status to draft, otherwise archived or current will get the
|
|
93
|
+
* relevant published state.
|
|
94
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
95
|
+
* Permission to view the content.
|
|
96
|
+
*
|
|
97
|
+
* @returns Returned if permission allows viewing of content.
|
|
98
|
+
* @path {GET} /wiki/rest/api/content/{id}/state
|
|
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-states#api-wiki-rest-api-content-id-state-get
|
|
102
|
+
*/
|
|
103
|
+
this.getContentState = ({ id, status, }) => {
|
|
104
|
+
return this.getClientInstance()
|
|
105
|
+
.request({
|
|
106
|
+
path: "/wiki/rest/api/content/{id}/state",
|
|
107
|
+
method: "GET",
|
|
108
|
+
pathParams: {
|
|
109
|
+
id,
|
|
110
|
+
},
|
|
111
|
+
query: {
|
|
112
|
+
status,
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
.then(this.getClientInstance().responseHandler({
|
|
116
|
+
200: {
|
|
117
|
+
"application/json": "json",
|
|
118
|
+
},
|
|
119
|
+
}))
|
|
120
|
+
.then(commonHttpClient.castResponse())
|
|
121
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.getContentState.response"))
|
|
122
|
+
.then(commonHttpClient.getBody);
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Get object describing whether content states are allowed at all, if custom
|
|
126
|
+
* content states or space content states
|
|
127
|
+
* are restricted, and a list of space content states allowed for the space if
|
|
128
|
+
* they are not restricted.
|
|
129
|
+
*
|
|
130
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
131
|
+
* 'Admin' permission for the space.
|
|
132
|
+
*
|
|
133
|
+
* @returns Returned if the requested space exists, and user has space admin permission.
|
|
134
|
+
* @path {GET} /wiki/rest/api/space/{spaceKey}/state/settings
|
|
135
|
+
* @scopes-current read:confluence-space.summary
|
|
136
|
+
* @scopes-beta read:space.setting:confluence
|
|
137
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-space-spacekey-state-settings-get
|
|
138
|
+
*/
|
|
139
|
+
this.getContentStateSettings = ({ spaceKey, }) => {
|
|
140
|
+
return this.getClientInstance()
|
|
141
|
+
.request({
|
|
142
|
+
path: "/wiki/rest/api/space/{spaceKey}/state/settings",
|
|
143
|
+
method: "GET",
|
|
144
|
+
pathParams: {
|
|
145
|
+
spaceKey,
|
|
146
|
+
},
|
|
147
|
+
})
|
|
148
|
+
.then(this.getClientInstance().responseHandler({
|
|
149
|
+
200: {
|
|
150
|
+
"application/json": "json",
|
|
151
|
+
},
|
|
152
|
+
}))
|
|
153
|
+
.then(commonHttpClient.castResponse())
|
|
154
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.getContentStateSettings.response"))
|
|
155
|
+
.then(commonHttpClient.getBody);
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Returns all content that has the provided content state in a space.
|
|
159
|
+
*
|
|
160
|
+
* Starting on Dec 10, 2024, if the expand query parameter is used with the
|
|
161
|
+
* `body.export_view` and/or `body.styled_view` properties, then the query limit
|
|
162
|
+
* parameter will be restricted to a maximum value of 25.
|
|
163
|
+
*
|
|
164
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
165
|
+
* 'View' permission for the space.
|
|
166
|
+
*
|
|
167
|
+
* @returns Returned if search was successful.
|
|
168
|
+
* @path {GET} /wiki/rest/api/space/{spaceKey}/state/content
|
|
169
|
+
* @scopes-current read:confluence-content.all
|
|
170
|
+
* @scopes-beta read:content:confluence
|
|
171
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-space-spacekey-state-content-get
|
|
172
|
+
*/
|
|
173
|
+
this.getContentsWithState = ({ spaceKey, stateId, expand, limit, start, }) => {
|
|
174
|
+
return this.getClientInstance()
|
|
175
|
+
.request({
|
|
176
|
+
path: "/wiki/rest/api/space/{spaceKey}/state/content",
|
|
177
|
+
method: "GET",
|
|
178
|
+
pathParams: {
|
|
179
|
+
spaceKey,
|
|
180
|
+
},
|
|
181
|
+
query: {
|
|
182
|
+
"state-id": stateId,
|
|
183
|
+
expand,
|
|
184
|
+
limit,
|
|
185
|
+
start,
|
|
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("ContentStatesService.getContentsWithState.response"))
|
|
195
|
+
.then(commonHttpClient.getBody);
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Get custom content states that authenticated user has created.
|
|
199
|
+
*
|
|
200
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**
|
|
201
|
+
* Must have user authentication.
|
|
202
|
+
*
|
|
203
|
+
* @returns Custom Content States that user has crated. Returned if user authenticated.
|
|
204
|
+
* @path {GET} /wiki/rest/api/content-states
|
|
205
|
+
* @scopes-current read:user.property:confluence
|
|
206
|
+
* @scopes-beta read:user.property:confluence
|
|
207
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-content-states-get
|
|
208
|
+
*/
|
|
209
|
+
this.getCustomContentStates = () => {
|
|
210
|
+
return this.getClientInstance()
|
|
211
|
+
.request({
|
|
212
|
+
path: "/wiki/rest/api/content-states",
|
|
213
|
+
method: "GET",
|
|
214
|
+
})
|
|
215
|
+
.then(this.getClientInstance().responseHandler({
|
|
216
|
+
200: {
|
|
217
|
+
"application/json": "json",
|
|
218
|
+
},
|
|
219
|
+
}))
|
|
220
|
+
.then(commonHttpClient.castResponse())
|
|
221
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.getCustomContentStates.response"))
|
|
222
|
+
.then(commonHttpClient.getBody);
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Get content states that are suggested in the space.
|
|
226
|
+
*
|
|
227
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
228
|
+
* 'View' permission for the space.
|
|
229
|
+
*
|
|
230
|
+
* @returns Returned if the requested space exists, and user has space view permission.
|
|
231
|
+
* @path {GET} /wiki/rest/api/space/{spaceKey}/state
|
|
232
|
+
* @scopes-current read:confluence-space.summary
|
|
233
|
+
* @scopes-beta read:space.setting:confluence
|
|
234
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-space-spacekey-state-get
|
|
235
|
+
*/
|
|
236
|
+
this.getSpaceContentStates = ({ spaceKey, }) => {
|
|
237
|
+
return this.getClientInstance()
|
|
238
|
+
.request({
|
|
239
|
+
path: "/wiki/rest/api/space/{spaceKey}/state",
|
|
240
|
+
method: "GET",
|
|
241
|
+
pathParams: {
|
|
242
|
+
spaceKey,
|
|
243
|
+
},
|
|
244
|
+
})
|
|
245
|
+
.then(this.getClientInstance().responseHandler({
|
|
246
|
+
200: {
|
|
247
|
+
"application/json": "json",
|
|
248
|
+
},
|
|
249
|
+
}))
|
|
250
|
+
.then(commonHttpClient.castResponse())
|
|
251
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.getSpaceContentStates.response"))
|
|
252
|
+
.then(commonHttpClient.getBody);
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Get Status of long running task that was previously created to remove content
|
|
256
|
+
* states from content.
|
|
257
|
+
* User must first create a task by passing in details to the
|
|
258
|
+
* /wiki/rest/api/content-states DELETE endpoint.
|
|
259
|
+
*
|
|
260
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**
|
|
261
|
+
* Must have created long running task
|
|
262
|
+
*
|
|
263
|
+
* @deprecated
|
|
264
|
+
* @returns Task found. State of task is returned
|
|
265
|
+
* @path {GET} /wiki/rest/api/content-states/task/{taskId}
|
|
266
|
+
* @scopes-current read:confluence-content
|
|
267
|
+
* @scopes-beta read:content:confluence
|
|
268
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-content-states-task-taskid-get
|
|
269
|
+
*/
|
|
270
|
+
this.getTaskUpdate = ({ taskId, }) => {
|
|
271
|
+
return this.getClientInstance()
|
|
272
|
+
.request({
|
|
273
|
+
path: "/wiki/rest/api/content-states/task/{taskId}",
|
|
274
|
+
method: "GET",
|
|
275
|
+
pathParams: {
|
|
276
|
+
taskId,
|
|
277
|
+
},
|
|
278
|
+
})
|
|
279
|
+
.then(this.getClientInstance().responseHandler({
|
|
280
|
+
200: {
|
|
281
|
+
"application/json": "json",
|
|
282
|
+
},
|
|
283
|
+
}))
|
|
284
|
+
.then(commonHttpClient.castResponse())
|
|
285
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.getTaskUpdate.response"))
|
|
286
|
+
.then(commonHttpClient.getBody);
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Removes the content state of the content specified and creates a new version
|
|
290
|
+
* (publishes the content without changing the body) of the content with the new
|
|
291
|
+
* status.
|
|
292
|
+
*
|
|
293
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
294
|
+
* Permission to edit the content.
|
|
295
|
+
*
|
|
296
|
+
* @returns Returned if content state is removed from content.
|
|
297
|
+
* @path {DELETE} /wiki/rest/api/content/{id}/state
|
|
298
|
+
* @scopes-current write:confluence-content
|
|
299
|
+
* @scopes-beta write:content:confluence, read:content-details:confluence
|
|
300
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-content-id-state-delete
|
|
301
|
+
*/
|
|
302
|
+
this.removeContentState = ({ id, status, }) => {
|
|
303
|
+
return this.getClientInstance()
|
|
304
|
+
.request({
|
|
305
|
+
path: "/wiki/rest/api/content/{id}/state",
|
|
306
|
+
method: "DELETE",
|
|
307
|
+
pathParams: {
|
|
308
|
+
id,
|
|
309
|
+
},
|
|
310
|
+
query: {
|
|
311
|
+
status,
|
|
312
|
+
},
|
|
313
|
+
})
|
|
314
|
+
.then(this.getClientInstance().responseHandler({
|
|
315
|
+
200: {
|
|
316
|
+
"application/json": "json",
|
|
317
|
+
},
|
|
318
|
+
}))
|
|
319
|
+
.then(commonHttpClient.castResponse())
|
|
320
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.removeContentState.response"))
|
|
321
|
+
.then(commonHttpClient.getBody);
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* Sets the content state of the content specified and creates a new version
|
|
325
|
+
* (publishes the content without changing the body) of the content with the new
|
|
326
|
+
* state.
|
|
327
|
+
*
|
|
328
|
+
* You may pass in either an id of a state, or the name and color of a desired new
|
|
329
|
+
* state.
|
|
330
|
+
* If all 3 are passed in, id will be used.
|
|
331
|
+
* If the name and color passed in already exist under the current user's existing
|
|
332
|
+
* custom states, the existing state will be reused.
|
|
333
|
+
* If custom states are disabled in the space of the content (which can be
|
|
334
|
+
* determined by getting the content state space settings of the content's space)
|
|
335
|
+
* then this set will fail.
|
|
336
|
+
*
|
|
337
|
+
* You may not remove a content state via this PUT request. You must use the
|
|
338
|
+
* DELETE method. A specified state is required in the body of this request.
|
|
339
|
+
*
|
|
340
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
341
|
+
* Permission to edit the content.
|
|
342
|
+
*
|
|
343
|
+
* @returns Returned if content state is set successfully.
|
|
344
|
+
* @path {PUT} /wiki/rest/api/content/{id}/state
|
|
345
|
+
* @scopes-current write:confluence-content
|
|
346
|
+
* @scopes-beta write:content:confluence, read:content-details:confluence
|
|
347
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states#api-wiki-rest-api-content-id-state-put
|
|
348
|
+
*/
|
|
349
|
+
this.setContentState = ({ id, status, contentStateRestInput, }) => {
|
|
350
|
+
return this.getClientInstance()
|
|
351
|
+
.request({
|
|
352
|
+
path: "/wiki/rest/api/content/{id}/state",
|
|
353
|
+
method: "PUT",
|
|
354
|
+
pathParams: {
|
|
355
|
+
id,
|
|
356
|
+
},
|
|
357
|
+
query: {
|
|
358
|
+
status,
|
|
359
|
+
},
|
|
360
|
+
headers: {
|
|
361
|
+
"Content-Type": "application/json",
|
|
362
|
+
},
|
|
363
|
+
body: contentStateRestInput,
|
|
364
|
+
})
|
|
365
|
+
.then(this.getClientInstance().responseHandler({
|
|
366
|
+
200: {
|
|
367
|
+
"application/json": "json",
|
|
368
|
+
},
|
|
369
|
+
}))
|
|
370
|
+
.then(commonHttpClient.castResponse())
|
|
371
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentStatesService.setContentState.response"))
|
|
372
|
+
.then(commonHttpClient.getBody);
|
|
373
|
+
};
|
|
371
374
|
}
|
|
372
375
|
static initialize() {
|
|
373
376
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentStatesService.getCustomContentStates.response", zod_1.z
|