@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,323 +12,326 @@ const space_1 = require("../models/space");
|
|
|
12
12
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
13
13
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space */
|
|
14
14
|
class SpaceService 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
|
-
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new space that is only visible to the creator. This method is
|
|
19
|
+
* the same as the [Create space](#api-space-post) method with permissions
|
|
20
|
+
* set to the current user only. Note, currently you cannot set space
|
|
21
|
+
* labels when creating a space.
|
|
22
|
+
*
|
|
23
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
24
|
+
* 'Create Space(s)' global permission.
|
|
25
|
+
*
|
|
26
|
+
* @returns Returned if the space is created.
|
|
27
|
+
* @path {POST} /wiki/rest/api/space/_private
|
|
28
|
+
* @scopes-current write:confluence-space
|
|
29
|
+
* @scopes-beta read:space-details:confluence, write:space:confluence,
|
|
30
|
+
* write:space.permission:confluence
|
|
31
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-private-post
|
|
32
|
+
*/
|
|
33
|
+
this.createPrivateSpace = ({ spaceCreate, }) => {
|
|
34
|
+
return this.getClientInstance()
|
|
35
|
+
.request({
|
|
36
|
+
path: "/wiki/rest/api/space/_private",
|
|
37
|
+
method: "POST",
|
|
38
|
+
headers: {
|
|
39
|
+
"Content-Type": "application/json",
|
|
40
|
+
},
|
|
41
|
+
body: spaceCreate,
|
|
42
|
+
})
|
|
43
|
+
.then(this.getClientInstance().responseHandler({
|
|
44
|
+
200: {
|
|
45
|
+
"application/json": "json",
|
|
46
|
+
},
|
|
47
|
+
}))
|
|
48
|
+
.then(commonHttpClient.castResponse())
|
|
49
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.createPrivateSpace.response"))
|
|
50
|
+
.then(commonHttpClient.getBody);
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Creates a new space. Note, currently you cannot set space labels when
|
|
54
|
+
* creating a space.
|
|
55
|
+
*
|
|
56
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
57
|
+
* 'Create Space(s)' global permission.
|
|
58
|
+
*
|
|
59
|
+
* @returns Returned if the space is created.
|
|
60
|
+
* @path {POST} /wiki/rest/api/space
|
|
61
|
+
* @scopes-current write:confluence-space
|
|
62
|
+
* @scopes-beta read:space-details:confluence, write:space:confluence,
|
|
63
|
+
* write:space.permission:confluence
|
|
64
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-post
|
|
65
|
+
*/
|
|
66
|
+
this.createSpace = ({ spaceCreate, }) => {
|
|
67
|
+
return this.getClientInstance()
|
|
68
|
+
.request({
|
|
69
|
+
path: "/wiki/rest/api/space",
|
|
70
|
+
method: "POST",
|
|
71
|
+
headers: {
|
|
72
|
+
"Content-Type": "application/json",
|
|
73
|
+
},
|
|
74
|
+
body: spaceCreate,
|
|
75
|
+
})
|
|
76
|
+
.then(this.getClientInstance().responseHandler({
|
|
77
|
+
200: {
|
|
78
|
+
"application/json": "json",
|
|
79
|
+
},
|
|
80
|
+
}))
|
|
81
|
+
.then(commonHttpClient.castResponse())
|
|
82
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.createSpace.response"))
|
|
83
|
+
.then(commonHttpClient.getBody);
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Permanently deletes a space without sending it to the trash. Note, the space
|
|
87
|
+
* will be deleted in a long running task.
|
|
88
|
+
* Therefore, the space may not be deleted yet when this method has
|
|
89
|
+
* returned. Clients should poll the status link that is returned in the
|
|
90
|
+
* response until the task completes.
|
|
91
|
+
*
|
|
92
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
93
|
+
* 'Admin' permission for the space.
|
|
94
|
+
*
|
|
95
|
+
* @returns Returns a pointer to the status of the space deletion task.
|
|
96
|
+
* @path {DELETE} /wiki/rest/api/space/{spaceKey}
|
|
97
|
+
* @scopes-current write:confluence-space
|
|
98
|
+
* @scopes-beta read:content.metadata:confluence, delete:space:confluence
|
|
99
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-delete
|
|
100
|
+
*/
|
|
101
|
+
this.deleteSpace = ({ spaceKey, }) => {
|
|
102
|
+
return this.getClientInstance()
|
|
103
|
+
.request({
|
|
104
|
+
path: "/wiki/rest/api/space/{spaceKey}",
|
|
105
|
+
method: "DELETE",
|
|
106
|
+
pathParams: {
|
|
107
|
+
spaceKey,
|
|
108
|
+
},
|
|
109
|
+
})
|
|
110
|
+
.then(this.getClientInstance().responseHandler({
|
|
111
|
+
202: {
|
|
112
|
+
"application/json": "json",
|
|
113
|
+
},
|
|
114
|
+
}))
|
|
115
|
+
.then(commonHttpClient.castResponse())
|
|
116
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.deleteSpace.response"))
|
|
117
|
+
.then(commonHttpClient.getBody);
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Deprecated, use [Confluence's v2
|
|
121
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
122
|
+
*
|
|
123
|
+
* Returns all content of a given type, in a space. The returned content is
|
|
124
|
+
* ordered by content ID in ascending order.
|
|
125
|
+
*
|
|
126
|
+
* Starting on Dec 10, 2024, if the expand query parameter is used with the
|
|
127
|
+
* `body.export_view` and/or `body.styled_view` properties, then the query limit
|
|
128
|
+
* parameter will be restricted to a maximum value of 25.
|
|
129
|
+
*
|
|
130
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
131
|
+
* 'View' permission for the space. Note, the returned list will only
|
|
132
|
+
* contain content that the current user has permission to view.
|
|
133
|
+
*
|
|
134
|
+
* @deprecated
|
|
135
|
+
* @returns Returned if the requested content is returned.
|
|
136
|
+
* @path {GET} /wiki/rest/api/space/{spaceKey}/content/{type}
|
|
137
|
+
* @scopes-current read:confluence-content.summary
|
|
138
|
+
* @scopes-beta read:content-details:confluence
|
|
139
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-content-type-get
|
|
140
|
+
*/
|
|
141
|
+
this.getContentByTypeForSpace = ({ spaceKey, type, depth, expand, start, limit, }) => {
|
|
142
|
+
return this.getClientInstance()
|
|
143
|
+
.request({
|
|
144
|
+
path: "/wiki/rest/api/space/{spaceKey}/content/{type}",
|
|
145
|
+
method: "GET",
|
|
146
|
+
pathParams: {
|
|
147
|
+
spaceKey,
|
|
148
|
+
type,
|
|
149
|
+
},
|
|
150
|
+
query: {
|
|
151
|
+
depth,
|
|
152
|
+
expand,
|
|
153
|
+
start,
|
|
154
|
+
limit,
|
|
155
|
+
},
|
|
156
|
+
})
|
|
157
|
+
.then(this.getClientInstance().responseHandler({
|
|
158
|
+
200: {
|
|
159
|
+
"application/json": "json",
|
|
160
|
+
},
|
|
161
|
+
}))
|
|
162
|
+
.then(commonHttpClient.castResponse())
|
|
163
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getContentByTypeForSpace.response"))
|
|
164
|
+
.then(commonHttpClient.getBody);
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Deprecated, use [Confluence's v2
|
|
168
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
169
|
+
*
|
|
170
|
+
* Returns all content in a space. The returned content is grouped by type
|
|
171
|
+
* (pages then blogposts), then ordered by content ID in ascending order.
|
|
172
|
+
*
|
|
173
|
+
* Starting on Dec 10, 2024, if the expand query parameter is used with the
|
|
174
|
+
* `body.export_view` and/or `body.styled_view` properties, then the query limit
|
|
175
|
+
* parameter will be restricted to a maximum value of 25.
|
|
176
|
+
*
|
|
177
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
178
|
+
* 'View' permission for the space. Note, the returned list will only
|
|
179
|
+
* contain content that the current user has permission to view.
|
|
180
|
+
*
|
|
181
|
+
* @deprecated
|
|
182
|
+
* @returns Returned if the requested content is returned.
|
|
183
|
+
* @path {GET} /wiki/rest/api/space/{spaceKey}/content
|
|
184
|
+
* @scopes-current read:confluence-content.summary
|
|
185
|
+
* @scopes-beta read:content-details:confluence
|
|
186
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-content-get
|
|
187
|
+
*/
|
|
188
|
+
this.getContentForSpace = ({ spaceKey, depth, expand, start, limit, }) => {
|
|
189
|
+
return this.getClientInstance()
|
|
190
|
+
.request({
|
|
191
|
+
path: "/wiki/rest/api/space/{spaceKey}/content",
|
|
192
|
+
method: "GET",
|
|
193
|
+
pathParams: {
|
|
194
|
+
spaceKey,
|
|
195
|
+
},
|
|
196
|
+
query: {
|
|
197
|
+
depth,
|
|
198
|
+
expand,
|
|
199
|
+
start,
|
|
200
|
+
limit,
|
|
201
|
+
},
|
|
202
|
+
})
|
|
203
|
+
.then(this.getClientInstance().responseHandler({
|
|
204
|
+
200: {
|
|
205
|
+
"application/json": "json",
|
|
206
|
+
},
|
|
207
|
+
}))
|
|
208
|
+
.then(commonHttpClient.castResponse())
|
|
209
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getContentForSpace.response"))
|
|
210
|
+
.then(commonHttpClient.getBody);
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Deprecated, use [Confluence's v2
|
|
214
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
215
|
+
*
|
|
216
|
+
* Returns a space. This includes information like the name, description,
|
|
217
|
+
* and permissions, but not the content in the space.
|
|
218
|
+
*
|
|
219
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
220
|
+
* 'View' permission for the space.
|
|
221
|
+
*
|
|
222
|
+
* @deprecated
|
|
223
|
+
* @returns Returned if the requested space is returned.
|
|
224
|
+
* @path {GET} /wiki/rest/api/space/{spaceKey}
|
|
225
|
+
* @scopes-current read:confluence-space.summary
|
|
226
|
+
* @scopes-beta read:content-details:confluence
|
|
227
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-get
|
|
228
|
+
*/
|
|
229
|
+
this.getSpace = ({ spaceKey, expand, }) => {
|
|
230
|
+
return this.getClientInstance()
|
|
231
|
+
.request({
|
|
232
|
+
path: "/wiki/rest/api/space/{spaceKey}",
|
|
233
|
+
method: "GET",
|
|
234
|
+
pathParams: {
|
|
235
|
+
spaceKey,
|
|
236
|
+
},
|
|
237
|
+
query: {
|
|
238
|
+
expand,
|
|
239
|
+
},
|
|
240
|
+
})
|
|
241
|
+
.then(this.getClientInstance().responseHandler({
|
|
242
|
+
200: {
|
|
243
|
+
"application/json": "json",
|
|
244
|
+
},
|
|
245
|
+
}))
|
|
246
|
+
.then(commonHttpClient.castResponse())
|
|
247
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getSpace.response"))
|
|
248
|
+
.then(commonHttpClient.getBody);
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Deprecated, use [Confluence's v2
|
|
252
|
+
* API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
|
|
253
|
+
*
|
|
254
|
+
* Returns all spaces. The returned spaces are ordered alphabetically in
|
|
255
|
+
* ascending order by space key.
|
|
256
|
+
*
|
|
257
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
258
|
+
* Permission to access the Confluence site ('Can use' global permission).
|
|
259
|
+
* Note, the returned list will only contain spaces that the current user
|
|
260
|
+
* has permission to view.
|
|
261
|
+
*
|
|
262
|
+
* @deprecated
|
|
263
|
+
* @returns Returned if the requested spaces are returned.
|
|
264
|
+
* @path {GET} /wiki/rest/api/space
|
|
265
|
+
* @scopes-current read:confluence-space.summary
|
|
266
|
+
* @scopes-beta read:content-details:confluence
|
|
267
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-get
|
|
268
|
+
*/
|
|
269
|
+
this.getSpaces = ({ spaceKey, spaceId, type, status, label, favourite, favouriteUserKey, expand, start, limit, } = {}) => {
|
|
270
|
+
return this.getClientInstance()
|
|
271
|
+
.request({
|
|
272
|
+
path: "/wiki/rest/api/space",
|
|
273
|
+
method: "GET",
|
|
274
|
+
query: {
|
|
275
|
+
spaceKey,
|
|
276
|
+
spaceId,
|
|
277
|
+
type,
|
|
278
|
+
status,
|
|
279
|
+
label,
|
|
280
|
+
favourite,
|
|
281
|
+
favouriteUserKey,
|
|
282
|
+
expand,
|
|
283
|
+
start,
|
|
284
|
+
limit,
|
|
285
|
+
},
|
|
286
|
+
})
|
|
287
|
+
.then(this.getClientInstance().responseHandler({
|
|
288
|
+
200: {
|
|
289
|
+
"application/json": "json",
|
|
290
|
+
},
|
|
291
|
+
}))
|
|
292
|
+
.then(commonHttpClient.castResponse())
|
|
293
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getSpaces.response"))
|
|
294
|
+
.then(commonHttpClient.getBody);
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* Updates the name, description, or homepage of a space.
|
|
298
|
+
*
|
|
299
|
+
* - For security reasons, permissions cannot be updated via the API and
|
|
300
|
+
* must be changed via the user interface instead.
|
|
301
|
+
* - Currently you cannot set space labels when updating a space.
|
|
302
|
+
*
|
|
303
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
304
|
+
* 'Admin' permission for the space.
|
|
305
|
+
*
|
|
306
|
+
* @returns Returned if the space is updated.
|
|
307
|
+
* @path {PUT} /wiki/rest/api/space/{spaceKey}
|
|
308
|
+
* @scopes-current write:confluence-space
|
|
309
|
+
* @scopes-beta read:space-details:confluence, write:space:confluence,
|
|
310
|
+
* write:space.permission:confluence
|
|
311
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-put
|
|
312
|
+
*/
|
|
313
|
+
this.updateSpace = ({ spaceKey, spaceUpdate, }) => {
|
|
314
|
+
return this.getClientInstance()
|
|
315
|
+
.request({
|
|
316
|
+
path: "/wiki/rest/api/space/{spaceKey}",
|
|
317
|
+
method: "PUT",
|
|
318
|
+
pathParams: {
|
|
319
|
+
spaceKey,
|
|
320
|
+
},
|
|
321
|
+
headers: {
|
|
322
|
+
"Content-Type": "application/json",
|
|
323
|
+
},
|
|
324
|
+
body: spaceUpdate,
|
|
325
|
+
})
|
|
326
|
+
.then(this.getClientInstance().responseHandler({
|
|
327
|
+
200: {
|
|
328
|
+
"application/json": "json",
|
|
329
|
+
},
|
|
330
|
+
}))
|
|
331
|
+
.then(commonHttpClient.castResponse())
|
|
332
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.updateSpace.response"))
|
|
333
|
+
.then(commonHttpClient.getBody);
|
|
334
|
+
};
|
|
332
335
|
}
|
|
333
336
|
static initialize() {
|
|
334
337
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("SpaceService.getSpaces.response", zod_1.z
|