@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.
Files changed (171) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +4 -0
  3. package/lib/openapi/v1/services/AnalyticsService.d.ts +10 -10
  4. package/lib/openapi/v1/services/AnalyticsService.js +62 -59
  5. package/lib/openapi/v1/services/AnalyticsService.js.map +1 -1
  6. package/lib/openapi/v1/services/AuditService.d.ts +25 -25
  7. package/lib/openapi/v1/services/AuditService.js +205 -202
  8. package/lib/openapi/v1/services/AuditService.js.map +1 -1
  9. package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +20 -20
  10. package/lib/openapi/v1/services/ContentAttachmentsService.js +317 -314
  11. package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -1
  12. package/lib/openapi/v1/services/ContentBodyService.d.ts +15 -15
  13. package/lib/openapi/v1/services/ContentBodyService.js +140 -137
  14. package/lib/openapi/v1/services/ContentBodyService.js.map +1 -1
  15. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +27 -27
  16. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +391 -388
  17. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -1
  18. package/lib/openapi/v1/services/ContentCommentsService.d.ts +8 -8
  19. package/lib/openapi/v1/services/ContentCommentsService.js +49 -46
  20. package/lib/openapi/v1/services/ContentCommentsService.js.map +1 -1
  21. package/lib/openapi/v1/services/ContentLabelsService.d.ts +11 -11
  22. package/lib/openapi/v1/services/ContentLabelsService.js +150 -147
  23. package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -1
  24. package/lib/openapi/v1/services/ContentMacroBodyService.d.ts +13 -13
  25. package/lib/openapi/v1/services/ContentMacroBodyService.js +155 -152
  26. package/lib/openapi/v1/services/ContentMacroBodyService.js.map +1 -1
  27. package/lib/openapi/v1/services/ContentPermissionsService.d.ts +2 -2
  28. package/lib/openapi/v1/services/ContentPermissionsService.js +48 -45
  29. package/lib/openapi/v1/services/ContentPermissionsService.js.map +1 -1
  30. package/lib/openapi/v1/services/ContentPropertiesService.d.ts +18 -18
  31. package/lib/openapi/v1/services/ContentPropertiesService.js +237 -234
  32. package/lib/openapi/v1/services/ContentPropertiesService.js.map +1 -1
  33. package/lib/openapi/v1/services/ContentRestrictionsService.d.ts +49 -49
  34. package/lib/openapi/v1/services/ContentRestrictionsService.js +505 -502
  35. package/lib/openapi/v1/services/ContentRestrictionsService.js.map +1 -1
  36. package/lib/openapi/v1/services/ContentService.d.ts +50 -50
  37. package/lib/openapi/v1/services/ContentService.js +475 -472
  38. package/lib/openapi/v1/services/ContentService.js.map +1 -1
  39. package/lib/openapi/v1/services/ContentStatesService.d.ts +25 -25
  40. package/lib/openapi/v1/services/ContentStatesService.js +359 -356
  41. package/lib/openapi/v1/services/ContentStatesService.js.map +1 -1
  42. package/lib/openapi/v1/services/ContentVersionsService.d.ts +13 -13
  43. package/lib/openapi/v1/services/ContentVersionsService.js +144 -141
  44. package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -1
  45. package/lib/openapi/v1/services/ContentWatchesService.d.ts +57 -57
  46. package/lib/openapi/v1/services/ContentWatchesService.js +454 -451
  47. package/lib/openapi/v1/services/ContentWatchesService.js.map +1 -1
  48. package/lib/openapi/v1/services/DynamicModulesService.d.ts +5 -5
  49. package/lib/openapi/v1/services/DynamicModulesService.js +70 -67
  50. package/lib/openapi/v1/services/DynamicModulesService.js.map +1 -1
  51. package/lib/openapi/v1/services/ExperimentalService.d.ts +12 -12
  52. package/lib/openapi/v1/services/ExperimentalService.js +151 -148
  53. package/lib/openapi/v1/services/ExperimentalService.js.map +1 -1
  54. package/lib/openapi/v1/services/GroupService.d.ts +52 -52
  55. package/lib/openapi/v1/services/GroupService.js +445 -442
  56. package/lib/openapi/v1/services/GroupService.js.map +1 -1
  57. package/lib/openapi/v1/services/InlineTasksService.d.ts +20 -20
  58. package/lib/openapi/v1/services/InlineTasksService.js +118 -115
  59. package/lib/openapi/v1/services/InlineTasksService.js.map +1 -1
  60. package/lib/openapi/v1/services/LabelInfoService.d.ts +5 -5
  61. package/lib/openapi/v1/services/LabelInfoService.js +37 -34
  62. package/lib/openapi/v1/services/LabelInfoService.js.map +1 -1
  63. package/lib/openapi/v1/services/LongRunningTaskService.d.ts +8 -6
  64. package/lib/openapi/v1/services/LongRunningTaskService.js +67 -63
  65. package/lib/openapi/v1/services/LongRunningTaskService.js.map +1 -1
  66. package/lib/openapi/v1/services/RelationService.d.ts +37 -37
  67. package/lib/openapi/v1/services/RelationService.js +231 -228
  68. package/lib/openapi/v1/services/RelationService.js.map +1 -1
  69. package/lib/openapi/v1/services/SearchService.d.ts +20 -20
  70. package/lib/openapi/v1/services/SearchService.js +136 -133
  71. package/lib/openapi/v1/services/SearchService.js.map +1 -1
  72. package/lib/openapi/v1/services/SettingsService.d.ts +15 -15
  73. package/lib/openapi/v1/services/SettingsService.js +204 -201
  74. package/lib/openapi/v1/services/SettingsService.js.map +1 -1
  75. package/lib/openapi/v1/services/SpacePermissionsService.d.ts +6 -6
  76. package/lib/openapi/v1/services/SpacePermissionsService.js +99 -96
  77. package/lib/openapi/v1/services/SpacePermissionsService.js.map +1 -1
  78. package/lib/openapi/v1/services/SpacePropertiesService.d.ts +16 -16
  79. package/lib/openapi/v1/services/SpacePropertiesService.js +227 -224
  80. package/lib/openapi/v1/services/SpacePropertiesService.js.map +1 -1
  81. package/lib/openapi/v1/services/SpaceService.d.ts +38 -38
  82. package/lib/openapi/v1/services/SpaceService.js +320 -317
  83. package/lib/openapi/v1/services/SpaceService.js.map +1 -1
  84. package/lib/openapi/v1/services/SpaceSettingsService.d.ts +4 -4
  85. package/lib/openapi/v1/services/SpaceSettingsService.js +68 -65
  86. package/lib/openapi/v1/services/SpaceSettingsService.js.map +1 -1
  87. package/lib/openapi/v1/services/TemplateService.d.ts +20 -20
  88. package/lib/openapi/v1/services/TemplateService.js +214 -211
  89. package/lib/openapi/v1/services/TemplateService.js.map +1 -1
  90. package/lib/openapi/v1/services/ThemesService.d.ts +13 -13
  91. package/lib/openapi/v1/services/ThemesService.js +179 -176
  92. package/lib/openapi/v1/services/ThemesService.js.map +1 -1
  93. package/lib/openapi/v1/services/UserPropertiesService.d.ts +12 -12
  94. package/lib/openapi/v1/services/UserPropertiesService.js +165 -162
  95. package/lib/openapi/v1/services/UserPropertiesService.js.map +1 -1
  96. package/lib/openapi/v1/services/UsersService.d.ts +21 -21
  97. package/lib/openapi/v1/services/UsersService.js +229 -226
  98. package/lib/openapi/v1/services/UsersService.js.map +1 -1
  99. package/lib/openapi/v2/models/user.d.ts +0 -2
  100. package/lib/openapi/v2/models/user.js +0 -2
  101. package/lib/openapi/v2/models/user.js.map +1 -1
  102. package/lib/openapi/v2/services/AncestorsService.d.ts +17 -17
  103. package/lib/openapi/v2/services/AncestorsService.js +174 -171
  104. package/lib/openapi/v2/services/AncestorsService.js.map +1 -1
  105. package/lib/openapi/v2/services/AttachmentService.d.ts +62 -62
  106. package/lib/openapi/v2/services/AttachmentService.js +261 -258
  107. package/lib/openapi/v2/services/AttachmentService.js.map +1 -1
  108. package/lib/openapi/v2/services/BlogPostService.d.ts +70 -70
  109. package/lib/openapi/v2/services/BlogPostService.js +270 -267
  110. package/lib/openapi/v2/services/BlogPostService.js.map +1 -1
  111. package/lib/openapi/v2/services/ChildrenService.d.ts +14 -14
  112. package/lib/openapi/v2/services/ChildrenService.js +77 -74
  113. package/lib/openapi/v2/services/ChildrenService.js.map +1 -1
  114. package/lib/openapi/v2/services/ClassificationLevelService.d.ts +21 -21
  115. package/lib/openapi/v2/services/ClassificationLevelService.js +304 -301
  116. package/lib/openapi/v2/services/ClassificationLevelService.js.map +1 -1
  117. package/lib/openapi/v2/services/CommentService.d.ts +136 -136
  118. package/lib/openapi/v2/services/CommentService.js +635 -632
  119. package/lib/openapi/v2/services/CommentService.js.map +1 -1
  120. package/lib/openapi/v2/services/ContentPropertiesService.d.ts +128 -128
  121. package/lib/openapi/v2/services/ContentPropertiesService.js +1242 -1239
  122. package/lib/openapi/v2/services/ContentPropertiesService.js.map +1 -1
  123. package/lib/openapi/v2/services/ContentService.d.ts +2 -2
  124. package/lib/openapi/v2/services/ContentService.js +40 -37
  125. package/lib/openapi/v2/services/ContentService.js.map +1 -1
  126. package/lib/openapi/v2/services/CustomContentService.d.ts +72 -72
  127. package/lib/openapi/v2/services/CustomContentService.js +299 -296
  128. package/lib/openapi/v2/services/CustomContentService.js.map +1 -1
  129. package/lib/openapi/v2/services/DataPoliciesService.d.ts +10 -10
  130. package/lib/openapi/v2/services/DataPoliciesService.js +67 -64
  131. package/lib/openapi/v2/services/DataPoliciesService.js.map +1 -1
  132. package/lib/openapi/v2/services/DatabaseService.d.ts +17 -17
  133. package/lib/openapi/v2/services/DatabaseService.js +90 -87
  134. package/lib/openapi/v2/services/DatabaseService.js.map +1 -1
  135. package/lib/openapi/v2/services/LabelService.d.ts +57 -57
  136. package/lib/openapi/v2/services/LabelService.js +263 -260
  137. package/lib/openapi/v2/services/LabelService.js.map +1 -1
  138. package/lib/openapi/v2/services/LikeService.d.ts +36 -36
  139. package/lib/openapi/v2/services/LikeService.js +250 -247
  140. package/lib/openapi/v2/services/LikeService.js.map +1 -1
  141. package/lib/openapi/v2/services/OperationService.d.ts +20 -20
  142. package/lib/openapi/v2/services/OperationService.js +298 -295
  143. package/lib/openapi/v2/services/OperationService.js.map +1 -1
  144. package/lib/openapi/v2/services/PageService.d.ts +73 -73
  145. package/lib/openapi/v2/services/PageService.js +272 -269
  146. package/lib/openapi/v2/services/PageService.js.map +1 -1
  147. package/lib/openapi/v2/services/SmartLinkService.d.ts +19 -17
  148. package/lib/openapi/v2/services/SmartLinkService.js +92 -89
  149. package/lib/openapi/v2/services/SmartLinkService.js.map +1 -1
  150. package/lib/openapi/v2/services/SpacePermissionsService.d.ts +6 -6
  151. package/lib/openapi/v2/services/SpacePermissionsService.js +35 -32
  152. package/lib/openapi/v2/services/SpacePermissionsService.js.map +1 -1
  153. package/lib/openapi/v2/services/SpacePropertiesService.d.ts +15 -15
  154. package/lib/openapi/v2/services/SpacePropertiesService.js +165 -162
  155. package/lib/openapi/v2/services/SpacePropertiesService.js.map +1 -1
  156. package/lib/openapi/v2/services/SpaceService.d.ts +28 -28
  157. package/lib/openapi/v2/services/SpaceService.js +83 -80
  158. package/lib/openapi/v2/services/SpaceService.js.map +1 -1
  159. package/lib/openapi/v2/services/TaskService.d.ts +40 -40
  160. package/lib/openapi/v2/services/TaskService.js +120 -117
  161. package/lib/openapi/v2/services/TaskService.js.map +1 -1
  162. package/lib/openapi/v2/services/UserService.d.ts +11 -11
  163. package/lib/openapi/v2/services/UserService.js +91 -88
  164. package/lib/openapi/v2/services/UserService.js.map +1 -1
  165. package/lib/openapi/v2/services/VersionService.d.ts +59 -59
  166. package/lib/openapi/v2/services/VersionService.js +395 -392
  167. package/lib/openapi/v2/services/VersionService.js.map +1 -1
  168. package/lib/openapi/v2/services/WhiteboardService.d.ts +17 -17
  169. package/lib/openapi/v2/services/WhiteboardService.js +90 -87
  170. package/lib/openapi/v2/services/WhiteboardService.js.map +1 -1
  171. package/package.json +4 -3
@@ -12,638 +12,641 @@ const common_1 = require("../models/common");
12
12
  const validationSchemaStorage_1 = require("../validationSchemaStorage");
13
13
  /** @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment */
14
14
  class CommentService extends CommonHttpService_1.CommonHttpService {
15
- /**
16
- * Create a footer comment.
17
- *
18
- * The footer comment can be made against several locations:
19
- * - at the top level (specifying pageId or blogPostId in the request body)
20
- * - as a reply (specifying parentCommentId in the request body)
21
- * - against an attachment (note: this is different than the comments added via
22
- * the attachment properties page on the UI, which are referred to as version
23
- * comments)
24
- * - against a custom content
25
- *
26
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
27
- * Permission to view the content of the page or blogpost and its corresponding
28
- * space. Permission to create comments in the space.
29
- *
30
- * @returns Returned if the footer comment is created.
31
- * @path {POST} /footer-comments
32
- * @scopes-current write:comment:confluence
33
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-post
34
- */
35
- createFooterComment({ createFooterCommentModel, }) {
36
- return this.getClientInstance()
37
- .request({
38
- path: "/footer-comments",
39
- method: "POST",
40
- headers: {
41
- "Content-Type": "application/json",
42
- },
43
- body: createFooterCommentModel,
44
- })
45
- .then(this.getClientInstance().responseHandler({
46
- 201: {
47
- "application/json": "json",
48
- },
49
- }))
50
- .then(commonHttpClient.castResponse())
51
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.createFooterComment.response"))
52
- .then(commonHttpClient.getBody);
53
- }
54
- /**
55
- * Create an inline comment. This can be at the top level (specifying pageId or
56
- * blogPostId in the request body)
57
- * or as a reply (specifying parentCommentId in the request body). Note the
58
- * inlineCommentProperties object in the
59
- * request body is used to select the text the inline comment should be tied to.
60
- * This is what determines the text
61
- * highlighting when viewing a page in Confluence.
62
- *
63
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
64
- * Permission to view the content of the page or blogpost and its corresponding
65
- * space. Permission to create comments in the space.
66
- *
67
- * @returns Returned if the inline comment is created.
68
- * @path {POST} /inline-comments
69
- * @scopes-current write:comment:confluence
70
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-post
71
- */
72
- createInlineComment({ createInlineCommentModel, }) {
73
- return this.getClientInstance()
74
- .request({
75
- path: "/inline-comments",
76
- method: "POST",
77
- headers: {
78
- "Content-Type": "application/json",
79
- },
80
- body: createInlineCommentModel,
81
- })
82
- .then(this.getClientInstance().responseHandler({
83
- 201: {
84
- "application/json": "json",
85
- },
86
- }))
87
- .then(commonHttpClient.castResponse())
88
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.createInlineComment.response"))
89
- .then(commonHttpClient.getBody);
90
- }
91
- /**
92
- * Deletes a footer comment. This is a permanent deletion and cannot be reverted.
93
- *
94
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
95
- * Permission to view the content of the page or blogpost and its corresponding
96
- * space. Permission to delete comments in the space.
97
- *
98
- * @path {DELETE} /footer-comments/{comment-id}
99
- * @scopes-current delete:comment:confluence
100
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-comment-id-delete
101
- */
102
- deleteFooterComment({ commentId, }) {
103
- return this.getClientInstance()
104
- .request({
105
- path: "/footer-comments/{comment-id}",
106
- method: "DELETE",
107
- pathParams: {
108
- "comment-id": commentId,
109
- },
110
- })
111
- .then(commonHttpClient.discardResult);
112
- }
113
- /**
114
- * Deletes an inline comment. This is a permanent deletion and cannot be reverted.
115
- *
116
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
117
- * Permission to view the content of the page or blogpost and its corresponding
118
- * space. Permission to delete comments in the space.
119
- *
120
- * @path {DELETE} /inline-comments/{comment-id}
121
- * @scopes-current delete:comment:confluence
122
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-comment-id-delete
123
- */
124
- deleteInlineComment({ commentId, }) {
125
- return this.getClientInstance()
126
- .request({
127
- path: "/inline-comments/{comment-id}",
128
- method: "DELETE",
129
- pathParams: {
130
- "comment-id": commentId,
131
- },
132
- })
133
- .then(commonHttpClient.discardResult);
134
- }
135
- /**
136
- * Returns the comments of the specific attachment.
137
- * The number of results is limited by the `limit` parameter and additional
138
- * results (if available) will be available through
139
- * the `next` URL present in the `Link` response header.
140
- *
141
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
142
- * Permission to view the attachment and its corresponding containers.
143
- *
144
- * @returns Returned if the attachment comments were successfully retrieved
145
- * @path {GET} /attachments/{id}/footer-comments
146
- * @scopes-current read:comment:confluence
147
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-attachments-id-footer-comments-get
148
- */
149
- getAttachmentComments({ id, bodyFormat, cursor, limit, sort, version, }) {
150
- return this.getClientInstance()
151
- .request({
152
- path: "/attachments/{id}/footer-comments",
153
- method: "GET",
154
- pathParams: {
155
- id,
156
- },
157
- query: {
158
- "body-format": bodyFormat,
159
- cursor,
160
- limit,
161
- sort,
162
- version,
163
- },
164
- })
165
- .then(this.getClientInstance().responseHandler({
166
- 200: {
167
- "application/json": "json",
168
- },
169
- }))
170
- .then(commonHttpClient.castResponse())
171
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getAttachmentComments.response"))
172
- .then(commonHttpClient.getBody);
173
- }
174
- /**
175
- * Returns the root footer comments of specific blog post. The number of results
176
- * is limited by the `limit` parameter and additional results (if available)
177
- * will be available through the `next` URL present in the `Link` response header.
178
- *
179
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
180
- * Permission to view the content of the blog post and its corresponding space.
181
- *
182
- * @returns Returned if the requested footer comments are returned.
183
- * @path {GET} /blogposts/{id}/footer-comments
184
- * @scopes-current read:comment:confluence
185
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-blogposts-id-footer-comments-get
186
- */
187
- getBlogPostFooterComments({ id, bodyFormat, sort, cursor, limit, }) {
188
- return this.getClientInstance()
189
- .request({
190
- path: "/blogposts/{id}/footer-comments",
191
- method: "GET",
192
- pathParams: {
193
- id,
194
- },
195
- query: {
196
- "body-format": bodyFormat,
197
- sort,
198
- cursor,
199
- limit,
200
- },
201
- })
202
- .then(this.getClientInstance().responseHandler({
203
- 200: {
204
- "application/json": "json",
205
- },
206
- }))
207
- .then(commonHttpClient.castResponse())
208
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getBlogPostFooterComments.response"))
209
- .then(commonHttpClient.getBody);
210
- }
211
- /**
212
- * Returns the root inline comments of specific blog post. The number of results
213
- * is limited by the `limit` parameter and additional results (if available)
214
- * will be available through the `next` URL present in the `Link` response header.
215
- *
216
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
217
- * Permission to view the content of the blog post and its corresponding space.
218
- *
219
- * @returns Returned if the requested inline comments are returned.
220
- * @path {GET} /blogposts/{id}/inline-comments
221
- * @scopes-current read:comment:confluence
222
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-blogposts-id-inline-comments-get
223
- */
224
- getBlogPostInlineComments({ id, bodyFormat, sort, cursor, limit, }) {
225
- return this.getClientInstance()
226
- .request({
227
- path: "/blogposts/{id}/inline-comments",
228
- method: "GET",
229
- pathParams: {
230
- id,
231
- },
232
- query: {
233
- "body-format": bodyFormat,
234
- sort,
235
- cursor,
236
- limit,
237
- },
238
- })
239
- .then(this.getClientInstance().responseHandler({
240
- 200: {
241
- "application/json": "json",
242
- },
243
- }))
244
- .then(commonHttpClient.castResponse())
245
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getBlogPostInlineComments.response"))
246
- .then(commonHttpClient.getBody);
247
- }
248
- /**
249
- * Returns the comments of the specific custom content.
250
- * The number of results is limited by the `limit` parameter and additional
251
- * results (if available) will be available through
252
- * the `next` URL present in the `Link` response header.
253
- *
254
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
255
- * Permission to view the custom content and its corresponding containers.
256
- *
257
- * @returns Returned if the custom content comments were successfully retrieved
258
- * @path {GET} /custom-content/{id}/footer-comments
259
- * @scopes-current read:comment:confluence
260
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-custom-content-id-footer-comments-get
261
- */
262
- getCustomContentComments({ id, bodyFormat, cursor, limit, sort, }) {
263
- return this.getClientInstance()
264
- .request({
265
- path: "/custom-content/{id}/footer-comments",
266
- method: "GET",
267
- pathParams: {
268
- id,
269
- },
270
- query: {
271
- "body-format": bodyFormat,
272
- cursor,
273
- limit,
274
- sort,
275
- },
276
- })
277
- .then(this.getClientInstance().responseHandler({
278
- 200: {
279
- "application/json": "json",
280
- },
281
- }))
282
- .then(commonHttpClient.castResponse())
283
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getCustomContentComments.response"))
284
- .then(commonHttpClient.getBody);
285
- }
286
- /**
287
- * Retrieves a footer comment by id
288
- *
289
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
290
- * Permission to view the content of the container and its corresponding space.
291
- *
292
- * @returns Returned if the footer comment is successfully retrieved.
293
- * @path {GET} /footer-comments/{comment-id}
294
- * @scopes-current read:comment:confluence
295
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-comment-id-get
296
- */
297
- getFooterCommentById({ commentId, bodyFormat, version, includeProperties, includeOperations, includeLikes, includeVersions, includeVersion, }) {
298
- return this.getClientInstance()
299
- .request({
300
- path: "/footer-comments/{comment-id}",
301
- method: "GET",
302
- pathParams: {
303
- "comment-id": commentId,
304
- },
305
- query: {
306
- "body-format": bodyFormat,
307
- version,
308
- "include-properties": includeProperties,
309
- "include-operations": includeOperations,
310
- "include-likes": includeLikes,
311
- "include-versions": includeVersions,
312
- "include-version": includeVersion,
313
- },
314
- })
315
- .then(this.getClientInstance().responseHandler({
316
- 200: {
317
- "application/json": "json",
318
- },
319
- }))
320
- .then(commonHttpClient.castResponse())
321
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getFooterCommentById.response"))
322
- .then(commonHttpClient.getBody);
323
- }
324
- /**
325
- * Returns the children footer comments of specific comment. The number of results
326
- * is limited by the `limit` parameter and additional results (if available)
327
- * will be available through the `next` URL present in the `Link` response header.
328
- *
329
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
330
- * Permission to view the content of the page and its corresponding space.
331
- *
332
- * @returns Returned if the requested footer comments are returned.
333
- * @path {GET} /footer-comments/{id}/children
334
- * @scopes-current read:comment:confluence
335
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-id-children-get
336
- */
337
- getFooterCommentChildren({ id, bodyFormat, sort, cursor, limit, }) {
338
- return this.getClientInstance()
339
- .request({
340
- path: "/footer-comments/{id}/children",
341
- method: "GET",
342
- pathParams: {
343
- id,
344
- },
345
- query: {
346
- "body-format": bodyFormat,
347
- sort,
348
- cursor,
349
- limit,
350
- },
351
- })
352
- .then(this.getClientInstance().responseHandler({
353
- 200: {
354
- "application/json": "json",
355
- },
356
- }))
357
- .then(commonHttpClient.castResponse())
358
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getFooterCommentChildren.response"))
359
- .then(commonHttpClient.getBody);
360
- }
361
- /**
362
- * Returns all footer comments. The number of results is limited by the `limit`
363
- * parameter and additional results (if available)
364
- * will be available through the `next` URL present in the `Link` response header.
365
- *
366
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
367
- * Permission to view the content of the container and its corresponding space.
368
- *
369
- * @returns Returned if the requested footer comments are returned.
370
- * @path {GET} /footer-comments
371
- * @scopes-current read:comment:confluence
372
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-get
373
- */
374
- getFooterComments({ bodyFormat, sort, cursor, limit, } = {}) {
375
- return this.getClientInstance()
376
- .request({
377
- path: "/footer-comments",
378
- method: "GET",
379
- query: {
380
- "body-format": bodyFormat,
381
- sort,
382
- cursor,
383
- limit,
384
- },
385
- })
386
- .then(this.getClientInstance().responseHandler({
387
- 200: {
388
- "application/json": "json",
389
- },
390
- }))
391
- .then(commonHttpClient.castResponse())
392
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getFooterComments.response"))
393
- .then(commonHttpClient.getBody);
394
- }
395
- /**
396
- * Retrieves an inline comment by id
397
- *
398
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
399
- * Permission to view the content of the page or blogpost and its corresponding
400
- * space.
401
- *
402
- * @returns Returned if the inline comment is successfully retrieved.
403
- * @path {GET} /inline-comments/{comment-id}
404
- * @scopes-current read:comment:confluence
405
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-comment-id-get
406
- */
407
- getInlineCommentById({ commentId, bodyFormat, version, includeProperties, includeOperations, includeLikes, includeVersions, includeVersion, }) {
408
- return this.getClientInstance()
409
- .request({
410
- path: "/inline-comments/{comment-id}",
411
- method: "GET",
412
- pathParams: {
413
- "comment-id": commentId,
414
- },
415
- query: {
416
- "body-format": bodyFormat,
417
- version,
418
- "include-properties": includeProperties,
419
- "include-operations": includeOperations,
420
- "include-likes": includeLikes,
421
- "include-versions": includeVersions,
422
- "include-version": includeVersion,
423
- },
424
- })
425
- .then(this.getClientInstance().responseHandler({
426
- 200: {
427
- "application/json": "json",
428
- },
429
- }))
430
- .then(commonHttpClient.castResponse())
431
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getInlineCommentById.response"))
432
- .then(commonHttpClient.getBody);
433
- }
434
- /**
435
- * Returns the children inline comments of specific comment. The number of results
436
- * is limited by the `limit` parameter and additional results (if available)
437
- * will be available through the `next` URL present in the `Link` response header.
438
- *
439
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
440
- * Permission to view the content of the page and its corresponding space.
441
- *
442
- * @returns Returned if the requested footer comments are returned.
443
- * @path {GET} /inline-comments/{id}/children
444
- * @scopes-current read:comment:confluence
445
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-id-children-get
446
- */
447
- getInlineCommentChildren({ id, bodyFormat, sort, cursor, limit, }) {
448
- return this.getClientInstance()
449
- .request({
450
- path: "/inline-comments/{id}/children",
451
- method: "GET",
452
- pathParams: {
453
- id,
454
- },
455
- query: {
456
- "body-format": bodyFormat,
457
- sort,
458
- cursor,
459
- limit,
460
- },
461
- })
462
- .then(this.getClientInstance().responseHandler({
463
- 200: {
464
- "application/json": "json",
465
- },
466
- }))
467
- .then(commonHttpClient.castResponse())
468
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getInlineCommentChildren.response"))
469
- .then(commonHttpClient.getBody);
470
- }
471
- /**
472
- * Returns all inline comments. The number of results is limited by the `limit`
473
- * parameter and additional results (if available)
474
- * will be available through the `next` URL present in the `Link` response header.
475
- *
476
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
477
- * Permission to view the content of the page and its corresponding space.
478
- *
479
- * @returns Returned if the requested inline comments are returned.
480
- * @path {GET} /inline-comments
481
- * @scopes-current read:comment:confluence
482
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-get
483
- */
484
- getInlineComments({ bodyFormat, sort, cursor, limit, } = {}) {
485
- return this.getClientInstance()
486
- .request({
487
- path: "/inline-comments",
488
- method: "GET",
489
- query: {
490
- "body-format": bodyFormat,
491
- sort,
492
- cursor,
493
- limit,
494
- },
495
- })
496
- .then(this.getClientInstance().responseHandler({
497
- 200: {
498
- "application/json": "json",
499
- },
500
- }))
501
- .then(commonHttpClient.castResponse())
502
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getInlineComments.response"))
503
- .then(commonHttpClient.getBody);
504
- }
505
- /**
506
- * Returns the root footer comments of specific page. The number of results is
507
- * limited by the `limit` parameter and additional results (if available)
508
- * will be available through the `next` URL present in the `Link` response header.
509
- *
510
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
511
- * Permission to view the content of the page and its corresponding space.
512
- *
513
- * @returns Returned if the requested footer comments are returned.
514
- * @path {GET} /pages/{id}/footer-comments
515
- * @scopes-current read:comment:confluence
516
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-pages-id-footer-comments-get
517
- */
518
- getPageFooterComments({ id, bodyFormat, sort, cursor, limit, }) {
519
- return this.getClientInstance()
520
- .request({
521
- path: "/pages/{id}/footer-comments",
522
- method: "GET",
523
- pathParams: {
524
- id,
525
- },
526
- query: {
527
- "body-format": bodyFormat,
528
- sort,
529
- cursor,
530
- limit,
531
- },
532
- })
533
- .then(this.getClientInstance().responseHandler({
534
- 200: {
535
- "application/json": "json",
536
- },
537
- }))
538
- .then(commonHttpClient.castResponse())
539
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getPageFooterComments.response"))
540
- .then(commonHttpClient.getBody);
541
- }
542
- /**
543
- * Returns the root inline comments of specific page. The number of results is
544
- * limited by the `limit` parameter and additional results (if available)
545
- * will be available through the `next` URL present in the `Link` response header.
546
- *
547
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
548
- * Permission to view the content of the page and its corresponding space.
549
- *
550
- * @returns Returned if the requested inline comments are returned.
551
- * @path {GET} /pages/{id}/inline-comments
552
- * @scopes-current read:comment:confluence
553
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-pages-id-inline-comments-get
554
- */
555
- getPageInlineComments({ id, bodyFormat, sort, cursor, limit, }) {
556
- return this.getClientInstance()
557
- .request({
558
- path: "/pages/{id}/inline-comments",
559
- method: "GET",
560
- pathParams: {
561
- id,
562
- },
563
- query: {
564
- "body-format": bodyFormat,
565
- sort,
566
- cursor,
567
- limit,
568
- },
569
- })
570
- .then(this.getClientInstance().responseHandler({
571
- 200: {
572
- "application/json": "json",
573
- },
574
- }))
575
- .then(commonHttpClient.castResponse())
576
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getPageInlineComments.response"))
577
- .then(commonHttpClient.getBody);
578
- }
579
- /**
580
- * Update a footer comment. This can be used to update the body text of a comment.
581
- *
582
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
583
- * Permission to view the content of the page or blogpost and its corresponding
584
- * space. Permission to create comments in the space.
585
- *
586
- * @returns Returned if the footer comment is updated successfully
587
- * @path {PUT} /footer-comments/{comment-id}
588
- * @scopes-current write:comment:confluence
589
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-comment-id-put
590
- */
591
- updateFooterComment({ commentId, requestBody, }) {
592
- return this.getClientInstance()
593
- .request({
594
- path: "/footer-comments/{comment-id}",
595
- method: "PUT",
596
- pathParams: {
597
- "comment-id": commentId,
598
- },
599
- headers: {
600
- "Content-Type": "application/json",
601
- },
602
- body: requestBody,
603
- })
604
- .then(this.getClientInstance().responseHandler({
605
- 200: {
606
- "application/json": "json",
607
- },
608
- }))
609
- .then(commonHttpClient.castResponse())
610
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.updateFooterComment.response"))
611
- .then(commonHttpClient.getBody);
612
- }
613
- /**
614
- * Update an inline comment. This can be used to update the body text of a comment
615
- * and/or to resolve the comment
616
- *
617
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
618
- * Permission to view the content of the page or blogpost and its corresponding
619
- * space. Permission to create comments in the space.
620
- *
621
- * @returns Returned if the inline comment is updated successfully.
622
- * @path {PUT} /inline-comments/{comment-id}
623
- * @scopes-current write:comment:confluence
624
- * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-comment-id-put
625
- */
626
- updateInlineComment({ commentId, updateInlineCommentModel, }) {
627
- return this.getClientInstance()
628
- .request({
629
- path: "/inline-comments/{comment-id}",
630
- method: "PUT",
631
- pathParams: {
632
- "comment-id": commentId,
633
- },
634
- headers: {
635
- "Content-Type": "application/json",
636
- },
637
- body: updateInlineCommentModel,
638
- })
639
- .then(this.getClientInstance().responseHandler({
640
- 200: {
641
- "application/json": "json",
642
- },
643
- }))
644
- .then(commonHttpClient.castResponse())
645
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.updateInlineComment.response"))
646
- .then(commonHttpClient.getBody);
15
+ constructor() {
16
+ super(...arguments);
17
+ /**
18
+ * Create a footer comment.
19
+ *
20
+ * The footer comment can be made against several locations:
21
+ * - at the top level (specifying pageId or blogPostId in the request body)
22
+ * - as a reply (specifying parentCommentId in the request body)
23
+ * - against an attachment (note: this is different than the comments added via
24
+ * the attachment properties page on the UI, which are referred to as version
25
+ * comments)
26
+ * - against a custom content
27
+ *
28
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
29
+ * Permission to view the content of the page or blogpost and its corresponding
30
+ * space. Permission to create comments in the space.
31
+ *
32
+ * @returns Returned if the footer comment is created.
33
+ * @path {POST} /footer-comments
34
+ * @scopes-current write:comment:confluence
35
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-post
36
+ */
37
+ this.createFooterComment = ({ createFooterCommentModel, }) => {
38
+ return this.getClientInstance()
39
+ .request({
40
+ path: "/footer-comments",
41
+ method: "POST",
42
+ headers: {
43
+ "Content-Type": "application/json",
44
+ },
45
+ body: createFooterCommentModel,
46
+ })
47
+ .then(this.getClientInstance().responseHandler({
48
+ 201: {
49
+ "application/json": "json",
50
+ },
51
+ }))
52
+ .then(commonHttpClient.castResponse())
53
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.createFooterComment.response"))
54
+ .then(commonHttpClient.getBody);
55
+ };
56
+ /**
57
+ * Create an inline comment. This can be at the top level (specifying pageId or
58
+ * blogPostId in the request body)
59
+ * or as a reply (specifying parentCommentId in the request body). Note the
60
+ * inlineCommentProperties object in the
61
+ * request body is used to select the text the inline comment should be tied to.
62
+ * This is what determines the text
63
+ * highlighting when viewing a page in Confluence.
64
+ *
65
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
66
+ * Permission to view the content of the page or blogpost and its corresponding
67
+ * space. Permission to create comments in the space.
68
+ *
69
+ * @returns Returned if the inline comment is created.
70
+ * @path {POST} /inline-comments
71
+ * @scopes-current write:comment:confluence
72
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-post
73
+ */
74
+ this.createInlineComment = ({ createInlineCommentModel, }) => {
75
+ return this.getClientInstance()
76
+ .request({
77
+ path: "/inline-comments",
78
+ method: "POST",
79
+ headers: {
80
+ "Content-Type": "application/json",
81
+ },
82
+ body: createInlineCommentModel,
83
+ })
84
+ .then(this.getClientInstance().responseHandler({
85
+ 201: {
86
+ "application/json": "json",
87
+ },
88
+ }))
89
+ .then(commonHttpClient.castResponse())
90
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.createInlineComment.response"))
91
+ .then(commonHttpClient.getBody);
92
+ };
93
+ /**
94
+ * Deletes a footer comment. This is a permanent deletion and cannot be reverted.
95
+ *
96
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
97
+ * Permission to view the content of the page or blogpost and its corresponding
98
+ * space. Permission to delete comments in the space.
99
+ *
100
+ * @path {DELETE} /footer-comments/{comment-id}
101
+ * @scopes-current delete:comment:confluence
102
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-comment-id-delete
103
+ */
104
+ this.deleteFooterComment = ({ commentId, }) => {
105
+ return this.getClientInstance()
106
+ .request({
107
+ path: "/footer-comments/{comment-id}",
108
+ method: "DELETE",
109
+ pathParams: {
110
+ "comment-id": commentId,
111
+ },
112
+ })
113
+ .then(commonHttpClient.discardResult);
114
+ };
115
+ /**
116
+ * Deletes an inline comment. This is a permanent deletion and cannot be reverted.
117
+ *
118
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
119
+ * Permission to view the content of the page or blogpost and its corresponding
120
+ * space. Permission to delete comments in the space.
121
+ *
122
+ * @path {DELETE} /inline-comments/{comment-id}
123
+ * @scopes-current delete:comment:confluence
124
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-comment-id-delete
125
+ */
126
+ this.deleteInlineComment = ({ commentId, }) => {
127
+ return this.getClientInstance()
128
+ .request({
129
+ path: "/inline-comments/{comment-id}",
130
+ method: "DELETE",
131
+ pathParams: {
132
+ "comment-id": commentId,
133
+ },
134
+ })
135
+ .then(commonHttpClient.discardResult);
136
+ };
137
+ /**
138
+ * Returns the comments of the specific attachment.
139
+ * The number of results is limited by the `limit` parameter and additional
140
+ * results (if available) will be available through
141
+ * the `next` URL present in the `Link` response header.
142
+ *
143
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
144
+ * Permission to view the attachment and its corresponding containers.
145
+ *
146
+ * @returns Returned if the attachment comments were successfully retrieved
147
+ * @path {GET} /attachments/{id}/footer-comments
148
+ * @scopes-current read:comment:confluence
149
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-attachments-id-footer-comments-get
150
+ */
151
+ this.getAttachmentComments = ({ id, bodyFormat, cursor, limit, sort, version, }) => {
152
+ return this.getClientInstance()
153
+ .request({
154
+ path: "/attachments/{id}/footer-comments",
155
+ method: "GET",
156
+ pathParams: {
157
+ id,
158
+ },
159
+ query: {
160
+ "body-format": bodyFormat,
161
+ cursor,
162
+ limit,
163
+ sort,
164
+ version,
165
+ },
166
+ })
167
+ .then(this.getClientInstance().responseHandler({
168
+ 200: {
169
+ "application/json": "json",
170
+ },
171
+ }))
172
+ .then(commonHttpClient.castResponse())
173
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getAttachmentComments.response"))
174
+ .then(commonHttpClient.getBody);
175
+ };
176
+ /**
177
+ * Returns the root footer comments of specific blog post. The number of results
178
+ * is limited by the `limit` parameter and additional results (if available)
179
+ * will be available through the `next` URL present in the `Link` response header.
180
+ *
181
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
182
+ * Permission to view the content of the blog post and its corresponding space.
183
+ *
184
+ * @returns Returned if the requested footer comments are returned.
185
+ * @path {GET} /blogposts/{id}/footer-comments
186
+ * @scopes-current read:comment:confluence
187
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-blogposts-id-footer-comments-get
188
+ */
189
+ this.getBlogPostFooterComments = ({ id, bodyFormat, sort, cursor, limit, }) => {
190
+ return this.getClientInstance()
191
+ .request({
192
+ path: "/blogposts/{id}/footer-comments",
193
+ method: "GET",
194
+ pathParams: {
195
+ id,
196
+ },
197
+ query: {
198
+ "body-format": bodyFormat,
199
+ sort,
200
+ cursor,
201
+ limit,
202
+ },
203
+ })
204
+ .then(this.getClientInstance().responseHandler({
205
+ 200: {
206
+ "application/json": "json",
207
+ },
208
+ }))
209
+ .then(commonHttpClient.castResponse())
210
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getBlogPostFooterComments.response"))
211
+ .then(commonHttpClient.getBody);
212
+ };
213
+ /**
214
+ * Returns the root inline comments of specific blog post. The number of results
215
+ * is limited by the `limit` parameter and additional results (if available)
216
+ * will be available through the `next` URL present in the `Link` response header.
217
+ *
218
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
219
+ * Permission to view the content of the blog post and its corresponding space.
220
+ *
221
+ * @returns Returned if the requested inline comments are returned.
222
+ * @path {GET} /blogposts/{id}/inline-comments
223
+ * @scopes-current read:comment:confluence
224
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-blogposts-id-inline-comments-get
225
+ */
226
+ this.getBlogPostInlineComments = ({ id, bodyFormat, sort, cursor, limit, }) => {
227
+ return this.getClientInstance()
228
+ .request({
229
+ path: "/blogposts/{id}/inline-comments",
230
+ method: "GET",
231
+ pathParams: {
232
+ id,
233
+ },
234
+ query: {
235
+ "body-format": bodyFormat,
236
+ sort,
237
+ cursor,
238
+ limit,
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("CommentService.getBlogPostInlineComments.response"))
248
+ .then(commonHttpClient.getBody);
249
+ };
250
+ /**
251
+ * Returns the comments of the specific custom content.
252
+ * The number of results is limited by the `limit` parameter and additional
253
+ * results (if available) will be available through
254
+ * the `next` URL present in the `Link` response header.
255
+ *
256
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
257
+ * Permission to view the custom content and its corresponding containers.
258
+ *
259
+ * @returns Returned if the custom content comments were successfully retrieved
260
+ * @path {GET} /custom-content/{id}/footer-comments
261
+ * @scopes-current read:comment:confluence
262
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-custom-content-id-footer-comments-get
263
+ */
264
+ this.getCustomContentComments = ({ id, bodyFormat, cursor, limit, sort, }) => {
265
+ return this.getClientInstance()
266
+ .request({
267
+ path: "/custom-content/{id}/footer-comments",
268
+ method: "GET",
269
+ pathParams: {
270
+ id,
271
+ },
272
+ query: {
273
+ "body-format": bodyFormat,
274
+ cursor,
275
+ limit,
276
+ sort,
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("CommentService.getCustomContentComments.response"))
286
+ .then(commonHttpClient.getBody);
287
+ };
288
+ /**
289
+ * Retrieves a footer comment by id
290
+ *
291
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
292
+ * Permission to view the content of the container and its corresponding space.
293
+ *
294
+ * @returns Returned if the footer comment is successfully retrieved.
295
+ * @path {GET} /footer-comments/{comment-id}
296
+ * @scopes-current read:comment:confluence
297
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-comment-id-get
298
+ */
299
+ this.getFooterCommentById = ({ commentId, bodyFormat, version, includeProperties, includeOperations, includeLikes, includeVersions, includeVersion, }) => {
300
+ return this.getClientInstance()
301
+ .request({
302
+ path: "/footer-comments/{comment-id}",
303
+ method: "GET",
304
+ pathParams: {
305
+ "comment-id": commentId,
306
+ },
307
+ query: {
308
+ "body-format": bodyFormat,
309
+ version,
310
+ "include-properties": includeProperties,
311
+ "include-operations": includeOperations,
312
+ "include-likes": includeLikes,
313
+ "include-versions": includeVersions,
314
+ "include-version": includeVersion,
315
+ },
316
+ })
317
+ .then(this.getClientInstance().responseHandler({
318
+ 200: {
319
+ "application/json": "json",
320
+ },
321
+ }))
322
+ .then(commonHttpClient.castResponse())
323
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getFooterCommentById.response"))
324
+ .then(commonHttpClient.getBody);
325
+ };
326
+ /**
327
+ * Returns the children footer comments of specific comment. The number of results
328
+ * is limited by the `limit` parameter and additional results (if available)
329
+ * will be available through the `next` URL present in the `Link` response header.
330
+ *
331
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
332
+ * Permission to view the content of the page and its corresponding space.
333
+ *
334
+ * @returns Returned if the requested footer comments are returned.
335
+ * @path {GET} /footer-comments/{id}/children
336
+ * @scopes-current read:comment:confluence
337
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-id-children-get
338
+ */
339
+ this.getFooterCommentChildren = ({ id, bodyFormat, sort, cursor, limit, }) => {
340
+ return this.getClientInstance()
341
+ .request({
342
+ path: "/footer-comments/{id}/children",
343
+ method: "GET",
344
+ pathParams: {
345
+ id,
346
+ },
347
+ query: {
348
+ "body-format": bodyFormat,
349
+ sort,
350
+ cursor,
351
+ limit,
352
+ },
353
+ })
354
+ .then(this.getClientInstance().responseHandler({
355
+ 200: {
356
+ "application/json": "json",
357
+ },
358
+ }))
359
+ .then(commonHttpClient.castResponse())
360
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getFooterCommentChildren.response"))
361
+ .then(commonHttpClient.getBody);
362
+ };
363
+ /**
364
+ * Returns all footer comments. The number of results is limited by the `limit`
365
+ * parameter and additional results (if available)
366
+ * will be available through the `next` URL present in the `Link` response header.
367
+ *
368
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
369
+ * Permission to view the content of the container and its corresponding space.
370
+ *
371
+ * @returns Returned if the requested footer comments are returned.
372
+ * @path {GET} /footer-comments
373
+ * @scopes-current read:comment:confluence
374
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-get
375
+ */
376
+ this.getFooterComments = ({ bodyFormat, sort, cursor, limit, } = {}) => {
377
+ return this.getClientInstance()
378
+ .request({
379
+ path: "/footer-comments",
380
+ method: "GET",
381
+ query: {
382
+ "body-format": bodyFormat,
383
+ sort,
384
+ cursor,
385
+ limit,
386
+ },
387
+ })
388
+ .then(this.getClientInstance().responseHandler({
389
+ 200: {
390
+ "application/json": "json",
391
+ },
392
+ }))
393
+ .then(commonHttpClient.castResponse())
394
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getFooterComments.response"))
395
+ .then(commonHttpClient.getBody);
396
+ };
397
+ /**
398
+ * Retrieves an inline comment by id
399
+ *
400
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
401
+ * Permission to view the content of the page or blogpost and its corresponding
402
+ * space.
403
+ *
404
+ * @returns Returned if the inline comment is successfully retrieved.
405
+ * @path {GET} /inline-comments/{comment-id}
406
+ * @scopes-current read:comment:confluence
407
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-comment-id-get
408
+ */
409
+ this.getInlineCommentById = ({ commentId, bodyFormat, version, includeProperties, includeOperations, includeLikes, includeVersions, includeVersion, }) => {
410
+ return this.getClientInstance()
411
+ .request({
412
+ path: "/inline-comments/{comment-id}",
413
+ method: "GET",
414
+ pathParams: {
415
+ "comment-id": commentId,
416
+ },
417
+ query: {
418
+ "body-format": bodyFormat,
419
+ version,
420
+ "include-properties": includeProperties,
421
+ "include-operations": includeOperations,
422
+ "include-likes": includeLikes,
423
+ "include-versions": includeVersions,
424
+ "include-version": includeVersion,
425
+ },
426
+ })
427
+ .then(this.getClientInstance().responseHandler({
428
+ 200: {
429
+ "application/json": "json",
430
+ },
431
+ }))
432
+ .then(commonHttpClient.castResponse())
433
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getInlineCommentById.response"))
434
+ .then(commonHttpClient.getBody);
435
+ };
436
+ /**
437
+ * Returns the children inline comments of specific comment. The number of results
438
+ * is limited by the `limit` parameter and additional results (if available)
439
+ * will be available through the `next` URL present in the `Link` response header.
440
+ *
441
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
442
+ * Permission to view the content of the page and its corresponding space.
443
+ *
444
+ * @returns Returned if the requested footer comments are returned.
445
+ * @path {GET} /inline-comments/{id}/children
446
+ * @scopes-current read:comment:confluence
447
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-id-children-get
448
+ */
449
+ this.getInlineCommentChildren = ({ id, bodyFormat, sort, cursor, limit, }) => {
450
+ return this.getClientInstance()
451
+ .request({
452
+ path: "/inline-comments/{id}/children",
453
+ method: "GET",
454
+ pathParams: {
455
+ id,
456
+ },
457
+ query: {
458
+ "body-format": bodyFormat,
459
+ sort,
460
+ cursor,
461
+ limit,
462
+ },
463
+ })
464
+ .then(this.getClientInstance().responseHandler({
465
+ 200: {
466
+ "application/json": "json",
467
+ },
468
+ }))
469
+ .then(commonHttpClient.castResponse())
470
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getInlineCommentChildren.response"))
471
+ .then(commonHttpClient.getBody);
472
+ };
473
+ /**
474
+ * Returns all inline comments. The number of results is limited by the `limit`
475
+ * parameter and additional results (if available)
476
+ * will be available through the `next` URL present in the `Link` response header.
477
+ *
478
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
479
+ * Permission to view the content of the page and its corresponding space.
480
+ *
481
+ * @returns Returned if the requested inline comments are returned.
482
+ * @path {GET} /inline-comments
483
+ * @scopes-current read:comment:confluence
484
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-get
485
+ */
486
+ this.getInlineComments = ({ bodyFormat, sort, cursor, limit, } = {}) => {
487
+ return this.getClientInstance()
488
+ .request({
489
+ path: "/inline-comments",
490
+ method: "GET",
491
+ query: {
492
+ "body-format": bodyFormat,
493
+ sort,
494
+ cursor,
495
+ limit,
496
+ },
497
+ })
498
+ .then(this.getClientInstance().responseHandler({
499
+ 200: {
500
+ "application/json": "json",
501
+ },
502
+ }))
503
+ .then(commonHttpClient.castResponse())
504
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getInlineComments.response"))
505
+ .then(commonHttpClient.getBody);
506
+ };
507
+ /**
508
+ * Returns the root footer comments of specific page. The number of results is
509
+ * limited by the `limit` parameter and additional results (if available)
510
+ * will be available through the `next` URL present in the `Link` response header.
511
+ *
512
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
513
+ * Permission to view the content of the page and its corresponding space.
514
+ *
515
+ * @returns Returned if the requested footer comments are returned.
516
+ * @path {GET} /pages/{id}/footer-comments
517
+ * @scopes-current read:comment:confluence
518
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-pages-id-footer-comments-get
519
+ */
520
+ this.getPageFooterComments = ({ id, bodyFormat, sort, cursor, limit, }) => {
521
+ return this.getClientInstance()
522
+ .request({
523
+ path: "/pages/{id}/footer-comments",
524
+ method: "GET",
525
+ pathParams: {
526
+ id,
527
+ },
528
+ query: {
529
+ "body-format": bodyFormat,
530
+ sort,
531
+ cursor,
532
+ limit,
533
+ },
534
+ })
535
+ .then(this.getClientInstance().responseHandler({
536
+ 200: {
537
+ "application/json": "json",
538
+ },
539
+ }))
540
+ .then(commonHttpClient.castResponse())
541
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getPageFooterComments.response"))
542
+ .then(commonHttpClient.getBody);
543
+ };
544
+ /**
545
+ * Returns the root inline comments of specific page. The number of results is
546
+ * limited by the `limit` parameter and additional results (if available)
547
+ * will be available through the `next` URL present in the `Link` response header.
548
+ *
549
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
550
+ * Permission to view the content of the page and its corresponding space.
551
+ *
552
+ * @returns Returned if the requested inline comments are returned.
553
+ * @path {GET} /pages/{id}/inline-comments
554
+ * @scopes-current read:comment:confluence
555
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-pages-id-inline-comments-get
556
+ */
557
+ this.getPageInlineComments = ({ id, bodyFormat, sort, cursor, limit, }) => {
558
+ return this.getClientInstance()
559
+ .request({
560
+ path: "/pages/{id}/inline-comments",
561
+ method: "GET",
562
+ pathParams: {
563
+ id,
564
+ },
565
+ query: {
566
+ "body-format": bodyFormat,
567
+ sort,
568
+ cursor,
569
+ limit,
570
+ },
571
+ })
572
+ .then(this.getClientInstance().responseHandler({
573
+ 200: {
574
+ "application/json": "json",
575
+ },
576
+ }))
577
+ .then(commonHttpClient.castResponse())
578
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.getPageInlineComments.response"))
579
+ .then(commonHttpClient.getBody);
580
+ };
581
+ /**
582
+ * Update a footer comment. This can be used to update the body text of a comment.
583
+ *
584
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
585
+ * Permission to view the content of the page or blogpost and its corresponding
586
+ * space. Permission to create comments in the space.
587
+ *
588
+ * @returns Returned if the footer comment is updated successfully
589
+ * @path {PUT} /footer-comments/{comment-id}
590
+ * @scopes-current write:comment:confluence
591
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-footer-comments-comment-id-put
592
+ */
593
+ this.updateFooterComment = ({ commentId, requestBody, }) => {
594
+ return this.getClientInstance()
595
+ .request({
596
+ path: "/footer-comments/{comment-id}",
597
+ method: "PUT",
598
+ pathParams: {
599
+ "comment-id": commentId,
600
+ },
601
+ headers: {
602
+ "Content-Type": "application/json",
603
+ },
604
+ body: requestBody,
605
+ })
606
+ .then(this.getClientInstance().responseHandler({
607
+ 200: {
608
+ "application/json": "json",
609
+ },
610
+ }))
611
+ .then(commonHttpClient.castResponse())
612
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.updateFooterComment.response"))
613
+ .then(commonHttpClient.getBody);
614
+ };
615
+ /**
616
+ * Update an inline comment. This can be used to update the body text of a comment
617
+ * and/or to resolve the comment
618
+ *
619
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
620
+ * Permission to view the content of the page or blogpost and its corresponding
621
+ * space. Permission to create comments in the space.
622
+ *
623
+ * @returns Returned if the inline comment is updated successfully.
624
+ * @path {PUT} /inline-comments/{comment-id}
625
+ * @scopes-current write:comment:confluence
626
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-comment#api-inline-comments-comment-id-put
627
+ */
628
+ this.updateInlineComment = ({ commentId, updateInlineCommentModel, }) => {
629
+ return this.getClientInstance()
630
+ .request({
631
+ path: "/inline-comments/{comment-id}",
632
+ method: "PUT",
633
+ pathParams: {
634
+ "comment-id": commentId,
635
+ },
636
+ headers: {
637
+ "Content-Type": "application/json",
638
+ },
639
+ body: updateInlineCommentModel,
640
+ })
641
+ .then(this.getClientInstance().responseHandler({
642
+ 200: {
643
+ "application/json": "json",
644
+ },
645
+ }))
646
+ .then(commonHttpClient.castResponse())
647
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("CommentService.updateInlineComment.response"))
648
+ .then(commonHttpClient.getBody);
649
+ };
647
650
  }
648
651
  static initialize() {
649
652
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("CommentService.getAttachmentComments.response", zod_1.z