@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,302 +12,305 @@ const customContent_1 = require("../models/customContent");
|
|
|
12
12
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
13
13
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content */
|
|
14
14
|
class CustomContentService 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
|
-
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new custom content in the given space, page, blogpost or other custom
|
|
19
|
+
* content.
|
|
20
|
+
*
|
|
21
|
+
* Only one of `spaceId`, `pageId`, `blogPostId`, or `customContentId` is required
|
|
22
|
+
* in the request body.
|
|
23
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
24
|
+
* Permission to view the content of the page or blogpost and its corresponding
|
|
25
|
+
* space. Permission to create custom content in the space.
|
|
26
|
+
*
|
|
27
|
+
* @returns Returned if the requested custom content is created successfully.
|
|
28
|
+
* @path {POST} /custom-content
|
|
29
|
+
* @scopes-current write:custom-content:confluence
|
|
30
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-custom-content-post
|
|
31
|
+
*/
|
|
32
|
+
this.createCustomContent = ({ requestBody, }) => {
|
|
33
|
+
return this.getClientInstance()
|
|
34
|
+
.request({
|
|
35
|
+
path: "/custom-content",
|
|
36
|
+
method: "POST",
|
|
37
|
+
headers: {
|
|
38
|
+
"Content-Type": "application/json",
|
|
39
|
+
},
|
|
40
|
+
body: requestBody,
|
|
41
|
+
})
|
|
42
|
+
.then(this.getClientInstance().responseHandler({
|
|
43
|
+
201: {
|
|
44
|
+
"application/json": "json",
|
|
45
|
+
},
|
|
46
|
+
}))
|
|
47
|
+
.then(commonHttpClient.castResponse())
|
|
48
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomContentService.createCustomContent.response"))
|
|
49
|
+
.then(commonHttpClient.getBody);
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Delete a custom content by id.
|
|
53
|
+
*
|
|
54
|
+
* Deleting a custom content will either move it to the trash or permanently
|
|
55
|
+
* delete it (purge it), depending on the apiSupport.
|
|
56
|
+
* To permanently delete a **trashed** custom content, the endpoint must be called
|
|
57
|
+
* with the following param `purge=true`.
|
|
58
|
+
*
|
|
59
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
60
|
+
* Permission to view the content of the page or blogpost and its corresponding
|
|
61
|
+
* space.
|
|
62
|
+
* Permission to delete custom content in the space.
|
|
63
|
+
* Permission to administer the space (if attempting to purge).
|
|
64
|
+
*
|
|
65
|
+
* @path {DELETE} /custom-content/{id}
|
|
66
|
+
* @scopes-current delete:custom-content:confluence
|
|
67
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-custom-content-id-delete
|
|
68
|
+
*/
|
|
69
|
+
this.deleteCustomContent = ({ id, purge, }) => {
|
|
70
|
+
return this.getClientInstance()
|
|
71
|
+
.request({
|
|
72
|
+
path: "/custom-content/{id}",
|
|
73
|
+
method: "DELETE",
|
|
74
|
+
pathParams: {
|
|
75
|
+
id,
|
|
76
|
+
},
|
|
77
|
+
query: {
|
|
78
|
+
purge,
|
|
79
|
+
},
|
|
80
|
+
})
|
|
81
|
+
.then(commonHttpClient.discardResult);
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Returns a specific piece of custom content.
|
|
85
|
+
*
|
|
86
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
87
|
+
* Permission to view the custom content, the container of the custom content, and
|
|
88
|
+
* the corresponding space (if different from the container).
|
|
89
|
+
*
|
|
90
|
+
* @returns Returned if the requested custom content is returned.
|
|
91
|
+
* @path {GET} /custom-content/{id}
|
|
92
|
+
* @scopes-current read:custom-content:confluence
|
|
93
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-custom-content-id-get
|
|
94
|
+
*/
|
|
95
|
+
this.getCustomContentById = ({ id, bodyFormat, version, includeLabels, includeProperties, includeOperations, includeVersions, includeVersion, }) => {
|
|
96
|
+
return this.getClientInstance()
|
|
97
|
+
.request({
|
|
98
|
+
path: "/custom-content/{id}",
|
|
99
|
+
method: "GET",
|
|
100
|
+
pathParams: {
|
|
101
|
+
id,
|
|
102
|
+
},
|
|
103
|
+
query: {
|
|
104
|
+
"body-format": bodyFormat,
|
|
105
|
+
version,
|
|
106
|
+
"include-labels": includeLabels,
|
|
107
|
+
"include-properties": includeProperties,
|
|
108
|
+
"include-operations": includeOperations,
|
|
109
|
+
"include-versions": includeVersions,
|
|
110
|
+
"include-version": includeVersion,
|
|
111
|
+
},
|
|
112
|
+
})
|
|
113
|
+
.then(this.getClientInstance().responseHandler({
|
|
114
|
+
200: {
|
|
115
|
+
"application/json": "json",
|
|
116
|
+
},
|
|
117
|
+
}))
|
|
118
|
+
.then(commonHttpClient.castResponse())
|
|
119
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomContentService.getCustomContentById.response"))
|
|
120
|
+
.then(commonHttpClient.getBody);
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Returns all custom content for a given type. The number of results is limited
|
|
124
|
+
* by the `limit` parameter and additional results (if available)
|
|
125
|
+
* will be available through the `next` URL present in the `Link` response header.
|
|
126
|
+
*
|
|
127
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
128
|
+
* Permission to view the custom content, the container of the custom content, and
|
|
129
|
+
* the corresponding space (if different from the container).
|
|
130
|
+
*
|
|
131
|
+
* @returns Returned if the requested custom content is returned.
|
|
132
|
+
* @path {GET} /custom-content
|
|
133
|
+
* @scopes-current read:custom-content:confluence
|
|
134
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-custom-content-get
|
|
135
|
+
*/
|
|
136
|
+
this.getCustomContentByType = ({ type, id, spaceId, sort, cursor, limit, bodyFormat, }) => {
|
|
137
|
+
return this.getClientInstance()
|
|
138
|
+
.request({
|
|
139
|
+
path: "/custom-content",
|
|
140
|
+
method: "GET",
|
|
141
|
+
query: {
|
|
142
|
+
type,
|
|
143
|
+
id,
|
|
144
|
+
"space-id": spaceId,
|
|
145
|
+
sort,
|
|
146
|
+
cursor,
|
|
147
|
+
limit,
|
|
148
|
+
"body-format": bodyFormat,
|
|
149
|
+
},
|
|
150
|
+
})
|
|
151
|
+
.then(this.getClientInstance().responseHandler({
|
|
152
|
+
200: {
|
|
153
|
+
"application/json": "json",
|
|
154
|
+
},
|
|
155
|
+
}))
|
|
156
|
+
.then(commonHttpClient.castResponse())
|
|
157
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomContentService.getCustomContentByType.response"))
|
|
158
|
+
.then(commonHttpClient.getBody);
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Returns all custom content for a given type within a given blogpost. The number
|
|
162
|
+
* of results is limited by the `limit` parameter and additional results (if
|
|
163
|
+
* available)
|
|
164
|
+
* will be available through the `next` URL present in the `Link` response header.
|
|
165
|
+
*
|
|
166
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
167
|
+
* Permission to view the custom content, the container of the custom content
|
|
168
|
+
* (blog post), and the corresponding space.
|
|
169
|
+
*
|
|
170
|
+
* @returns Returned if the requested custom content is returned.
|
|
171
|
+
* @path {GET} /blogposts/{id}/custom-content
|
|
172
|
+
* @scopes-current read:custom-content:confluence
|
|
173
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-blogposts-id-custom-content-get
|
|
174
|
+
*/
|
|
175
|
+
this.getCustomContentByTypeInBlogPost = ({ id, type, sort, cursor, limit, bodyFormat, }) => {
|
|
176
|
+
return this.getClientInstance()
|
|
177
|
+
.request({
|
|
178
|
+
path: "/blogposts/{id}/custom-content",
|
|
179
|
+
method: "GET",
|
|
180
|
+
pathParams: {
|
|
181
|
+
id,
|
|
182
|
+
},
|
|
183
|
+
query: {
|
|
184
|
+
type,
|
|
185
|
+
sort,
|
|
186
|
+
cursor,
|
|
187
|
+
limit,
|
|
188
|
+
"body-format": bodyFormat,
|
|
189
|
+
},
|
|
190
|
+
})
|
|
191
|
+
.then(this.getClientInstance().responseHandler({
|
|
192
|
+
200: {
|
|
193
|
+
"application/json": "json",
|
|
194
|
+
},
|
|
195
|
+
}))
|
|
196
|
+
.then(commonHttpClient.castResponse())
|
|
197
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomContentService.getCustomContentByTypeInBlogPost.response"))
|
|
198
|
+
.then(commonHttpClient.getBody);
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Returns all custom content for a given type within a given page. The number of
|
|
202
|
+
* results is limited by the `limit` parameter and additional results (if
|
|
203
|
+
* available)
|
|
204
|
+
* will be available through the `next` URL present in the `Link` response header.
|
|
205
|
+
*
|
|
206
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
207
|
+
* Permission to view the custom content, the container of the custom content
|
|
208
|
+
* (page), and the corresponding space.
|
|
209
|
+
*
|
|
210
|
+
* @returns Returned if the requested custom content is returned.
|
|
211
|
+
* @path {GET} /pages/{id}/custom-content
|
|
212
|
+
* @scopes-current read:custom-content:confluence
|
|
213
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-pages-id-custom-content-get
|
|
214
|
+
*/
|
|
215
|
+
this.getCustomContentByTypeInPage = ({ id, type, sort, cursor, limit, bodyFormat, }) => {
|
|
216
|
+
return this.getClientInstance()
|
|
217
|
+
.request({
|
|
218
|
+
path: "/pages/{id}/custom-content",
|
|
219
|
+
method: "GET",
|
|
220
|
+
pathParams: {
|
|
221
|
+
id,
|
|
222
|
+
},
|
|
223
|
+
query: {
|
|
224
|
+
type,
|
|
225
|
+
sort,
|
|
226
|
+
cursor,
|
|
227
|
+
limit,
|
|
228
|
+
"body-format": bodyFormat,
|
|
229
|
+
},
|
|
230
|
+
})
|
|
231
|
+
.then(this.getClientInstance().responseHandler({
|
|
232
|
+
200: {
|
|
233
|
+
"application/json": "json",
|
|
234
|
+
},
|
|
235
|
+
}))
|
|
236
|
+
.then(commonHttpClient.castResponse())
|
|
237
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomContentService.getCustomContentByTypeInPage.response"))
|
|
238
|
+
.then(commonHttpClient.getBody);
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Returns all custom content for a given type within a given space. The number of
|
|
242
|
+
* results is limited by the `limit` parameter and additional results (if
|
|
243
|
+
* available)
|
|
244
|
+
* will be available through the `next` URL present in the `Link` response header.
|
|
245
|
+
*
|
|
246
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
247
|
+
* Permission to view the custom content and the corresponding space.
|
|
248
|
+
*
|
|
249
|
+
* @returns Returned if the requested custom content is returned.
|
|
250
|
+
* @path {GET} /spaces/{id}/custom-content
|
|
251
|
+
* @scopes-current read:custom-content:confluence
|
|
252
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-spaces-id-custom-content-get
|
|
253
|
+
*/
|
|
254
|
+
this.getCustomContentByTypeInSpace = ({ id, type, cursor, limit, bodyFormat, }) => {
|
|
255
|
+
return this.getClientInstance()
|
|
256
|
+
.request({
|
|
257
|
+
path: "/spaces/{id}/custom-content",
|
|
258
|
+
method: "GET",
|
|
259
|
+
pathParams: {
|
|
260
|
+
id,
|
|
261
|
+
},
|
|
262
|
+
query: {
|
|
263
|
+
type,
|
|
264
|
+
cursor,
|
|
265
|
+
limit,
|
|
266
|
+
"body-format": bodyFormat,
|
|
267
|
+
},
|
|
268
|
+
})
|
|
269
|
+
.then(this.getClientInstance().responseHandler({
|
|
270
|
+
200: {
|
|
271
|
+
"application/json": "json",
|
|
272
|
+
},
|
|
273
|
+
}))
|
|
274
|
+
.then(commonHttpClient.castResponse())
|
|
275
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomContentService.getCustomContentByTypeInSpace.response"))
|
|
276
|
+
.then(commonHttpClient.getBody);
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Update a custom content by id.
|
|
280
|
+
*
|
|
281
|
+
* `spaceId` is always required and maximum one of `pageId`, `blogPostId`, or
|
|
282
|
+
* `customContentId` is allowed in the request body.
|
|
283
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
284
|
+
* Permission to view the content of the page or blogpost and its corresponding
|
|
285
|
+
* space. Permission to update custom content in the space.
|
|
286
|
+
*
|
|
287
|
+
* @returns Returned if the requested custom content is updated successfully.
|
|
288
|
+
* @path {PUT} /custom-content/{id}
|
|
289
|
+
* @scopes-current write:custom-content:confluence
|
|
290
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-custom-content#api-custom-content-id-put
|
|
291
|
+
*/
|
|
292
|
+
this.updateCustomContent = ({ id, requestBody, }) => {
|
|
293
|
+
return this.getClientInstance()
|
|
294
|
+
.request({
|
|
295
|
+
path: "/custom-content/{id}",
|
|
296
|
+
method: "PUT",
|
|
297
|
+
pathParams: {
|
|
298
|
+
id,
|
|
299
|
+
},
|
|
300
|
+
headers: {
|
|
301
|
+
"Content-Type": "application/json",
|
|
302
|
+
},
|
|
303
|
+
body: requestBody,
|
|
304
|
+
})
|
|
305
|
+
.then(this.getClientInstance().responseHandler({
|
|
306
|
+
200: {
|
|
307
|
+
"application/json": "json",
|
|
308
|
+
},
|
|
309
|
+
}))
|
|
310
|
+
.then(commonHttpClient.castResponse())
|
|
311
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomContentService.updateCustomContent.response"))
|
|
312
|
+
.then(commonHttpClient.getBody);
|
|
313
|
+
};
|
|
311
314
|
}
|
|
312
315
|
static initialize() {
|
|
313
316
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("CustomContentService.getCustomContentByTypeInBlogPost.response", zod_1.z
|