@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,478 +12,481 @@ const content_1 = require("../models/content");
12
12
  const validationSchemaStorage_1 = require("../validationSchemaStorage");
13
13
  /** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content */
14
14
  class ContentService extends CommonHttpService_1.CommonHttpService {
15
- /**
16
- * Archives a list of pages. The pages to be archived are specified as a list of
17
- * content IDs.
18
- * This API accepts the archival request and returns a task ID.
19
- * The archival process happens asynchronously.
20
- * Use the /longtask/<taskId> REST API to get the copy task status.
21
- *
22
- * Each content ID needs to resolve to page objects that are not already in an
23
- * archived state.
24
- * The content IDs need not belong to the same space.
25
- *
26
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
27
- * 'Archive' permission for each of the pages in the corresponding space it
28
- * belongs to.
29
- *
30
- * @returns Returned if the archive request has been submitted.
31
- * @path {POST} /wiki/rest/api/content/archive
32
- * @scopes-current write:confluence-content
33
- * @scopes-beta read:content.metadata:confluence, write:page:confluence
34
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-archive-post
35
- */
36
- archivePages({ requestBody, }) {
37
- return this.getClientInstance()
38
- .request({
39
- path: "/wiki/rest/api/content/archive",
40
- method: "POST",
41
- headers: {
42
- "Content-Type": "application/json",
43
- },
44
- body: requestBody,
45
- })
46
- .then(this.getClientInstance().responseHandler({
47
- 202: {
48
- "application/json": "json",
49
- },
50
- }))
51
- .then(commonHttpClient.castResponse())
52
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.archivePages.response"))
53
- .then(commonHttpClient.getBody);
54
- }
55
- /**
56
- * Deprecated, use [Confluence's v2
57
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
58
- *
59
- * Creates a new piece of content or publishes an existing draft.
60
- *
61
- * To publish a draft, add the `id` and `status` properties to the body of the
62
- * request.
63
- * Set the `id` to the ID of the draft and set the `status` to 'current'. When the
64
- * request is sent, a new piece of content will be created and the metadata from
65
- * the
66
- * draft will be transferred into it.
67
- *
68
- * By default, the following objects are expanded: `space`, `history`, `version`.
69
- *
70
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add'
71
- * permission for the
72
- * space that the content will be created in, and permission to view the draft if
73
- * publishing a draft.
74
- *
75
- * @deprecated
76
- * @returns Returned if the content is created.
77
- * @path {POST} /wiki/rest/api/content
78
- * @scopes-current write:confluence-content
79
- * @scopes-beta read:content-details:confluence, write:content:confluence
80
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-post
81
- */
82
- createContent({ status, expand, contentCreate, }) {
83
- return this.getClientInstance()
84
- .request({
85
- path: "/wiki/rest/api/content",
86
- method: "POST",
87
- query: {
88
- status,
89
- expand,
90
- },
91
- headers: {
92
- "Content-Type": "application/json",
93
- },
94
- body: contentCreate,
95
- })
96
- .then(this.getClientInstance().responseHandler({
97
- 200: {
98
- "application/json": "json",
99
- },
100
- }))
101
- .then(commonHttpClient.castResponse())
102
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.createContent.response"))
103
- .then(commonHttpClient.getBody);
104
- }
105
- /**
106
- * Deprecated, use [Confluence's v2
107
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
108
- *
109
- * Moves a piece of content to the space's trash or purges it from the trash,
110
- * depending on the content's type and status:
111
- *
112
- * - If the content's type is `page`,`blogpost`, or `attachment` and its status is
113
- * `current`,
114
- * it will be trashed.
115
- * - If the content's type is `page`,`blogpost`, or `attachment` and its status is
116
- * `trashed`,
117
- * the content will be purged from the trash and deleted permanently. Note,
118
- * you must also set the `status` query parameter to `trashed` in your request.
119
- * - If the content's type is `comment`, it will be deleted
120
- * permanently without being trashed.
121
- *
122
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
123
- * 'Delete' permission for the space that the content is in.
124
- *
125
- * @deprecated
126
- * @path {DELETE} /wiki/rest/api/content/{id}
127
- * @scopes-current write:confluence-content
128
- * @scopes-beta delete:content:confluence
129
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-delete
130
- */
131
- deleteContent({ id, status, }) {
132
- return this.getClientInstance()
133
- .request({
134
- path: "/wiki/rest/api/content/{id}",
135
- method: "DELETE",
136
- pathParams: {
137
- id,
138
- },
139
- query: {
140
- status,
141
- },
142
- })
143
- .then(commonHttpClient.discardResult);
144
- }
145
- /**
146
- * Deprecated, use [Confluence's v2
147
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
148
- *
149
- * Returns all content in a Confluence instance.
150
- *
151
- * By default, the following objects are expanded: `space`, `history`, `version`.
152
- *
153
- * Starting on Dec 10, 2024, if the expand query parameter is used with the
154
- * `body.export_view` and/or `body.styled_view` properties, then the query limit
155
- * parameter will be restricted to a maximum value of 25.
156
- *
157
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
158
- * Permission to access the Confluence site ('Can use' global permission).
159
- * Only content that the user has permission to view will be returned.
160
- *
161
- * @deprecated
162
- * @returns Returned if the requested list of content is returned.
163
- * @path {GET} /wiki/rest/api/content
164
- * @scopes-current read:confluence-content.summary
165
- * @scopes-beta read:content-details:confluence
166
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-get
167
- */
168
- getContent({ type, spaceKey, title, status, postingDay, expand, trigger, orderby, start, limit, } = {}) {
169
- return this.getClientInstance()
170
- .request({
171
- path: "/wiki/rest/api/content",
172
- method: "GET",
173
- query: {
174
- type,
175
- spaceKey,
176
- title,
177
- status,
178
- postingDay,
179
- expand,
180
- trigger,
181
- orderby,
182
- start,
183
- limit,
184
- },
185
- })
186
- .then(this.getClientInstance().responseHandler({
187
- 200: {
188
- "application/json": "json",
189
- },
190
- }))
191
- .then(commonHttpClient.castResponse())
192
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContent.response"))
193
- .then(commonHttpClient.getBody);
194
- }
195
- /**
196
- * Deprecated, use [Confluence's v2
197
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
198
- *
199
- * Returns a single piece of content, like a page or a blog post.
200
- *
201
- * By default, the following objects are expanded: `space`, `history`, `version`.
202
- *
203
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
204
- * Permission to view the content. If the content is a blog post, 'View' permission
205
- * for the space is required.
206
- *
207
- * @deprecated
208
- * @returns Returned if the requested content is returned.
209
- * @path {GET} /wiki/rest/api/content/{id}
210
- * @scopes-current read:confluence-content.summary
211
- * @scopes-beta read:content-details:confluence
212
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-get
213
- */
214
- getContentById({ id, status, version, embeddedContentRender, expand, trigger, }) {
215
- return this.getClientInstance()
216
- .request({
217
- path: "/wiki/rest/api/content/{id}",
218
- method: "GET",
219
- pathParams: {
220
- id,
221
- },
222
- query: {
223
- status,
224
- version,
225
- embeddedContentRender,
226
- expand,
227
- trigger,
228
- },
229
- })
230
- .then(this.getClientInstance().responseHandler({
231
- 200: {
232
- "application/json": "json",
233
- },
234
- }))
235
- .then(commonHttpClient.castResponse())
236
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContentById.response"))
237
- .then(commonHttpClient.getBody);
238
- }
239
- /**
240
- * Deprecated, use [Confluence's v2
241
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
242
- *
243
- * Returns the most recent update for a piece of content.
244
- *
245
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
246
- * Permission to view the content.
247
- *
248
- * @deprecated
249
- * @returns Returned if the requested content history is returned.
250
- * @path {GET} /wiki/rest/api/content/{id}/history
251
- * @scopes-current read:confluence-content.summary
252
- * @scopes-beta read:content.metadata:confluence, read:user:confluence
253
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-history-get
254
- */
255
- getHistoryForContent({ id, expand, }) {
256
- return this.getClientInstance()
257
- .request({
258
- path: "/wiki/rest/api/content/{id}/history",
259
- method: "GET",
260
- pathParams: {
261
- id,
262
- },
263
- query: {
264
- expand,
265
- },
266
- })
267
- .then(this.getClientInstance().responseHandler({
268
- 200: {
269
- "application/json": "json",
270
- },
271
- }))
272
- .then(commonHttpClient.castResponse())
273
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getHistoryForContent.response"))
274
- .then(commonHttpClient.getBody);
275
- }
276
- /**
277
- * Publishes a legacy draft of a page created from a blueprint. Legacy drafts
278
- * will eventually be removed in favor of shared drafts. For now, this method
279
- * works the same as [Publish shared
280
- * draft](#api-content-blueprint-instance-draftId-put).
281
- *
282
- * By default, the following objects are expanded: `body.storage`, `history`,
283
- * `space`, `version`, `ancestors`.
284
- *
285
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
286
- * Permission to view the draft and 'Add' permission for the space that
287
- * the content will be created in.
288
- *
289
- * @returns Returned if the draft was successfully published.
290
- * @path {POST} /wiki/rest/api/content/blueprint/instance/{draftId}
291
- * @scopes-current write:confluence-content
292
- * @scopes-beta read:content-details:confluence, write:content:confluence
293
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-blueprint-instance-draftid-post
294
- */
295
- publishLegacyDraft({ draftId, status, expand, contentBlueprintDraft, }) {
296
- return this.getClientInstance()
297
- .request({
298
- path: "/wiki/rest/api/content/blueprint/instance/{draftId}",
299
- method: "POST",
300
- pathParams: {
301
- draftId,
302
- },
303
- query: {
304
- status,
305
- expand,
306
- },
307
- headers: {
308
- "Content-Type": "application/json",
309
- },
310
- body: contentBlueprintDraft,
311
- })
312
- .then(this.getClientInstance().responseHandler({
313
- 200: {
314
- "application/json": "json",
315
- },
316
- }))
317
- .then(commonHttpClient.castResponse())
318
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.publishLegacyDraft.response"))
319
- .then(commonHttpClient.getBody);
320
- }
321
- /**
322
- * Publishes a shared draft of a page created from a blueprint.
323
- *
324
- * By default, the following objects are expanded: `body.storage`, `history`,
325
- * `space`, `version`, `ancestors`.
326
- *
327
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
328
- * Permission to view the draft and 'Add' permission for the space that
329
- * the content will be created in.
330
- *
331
- * @returns Returned if the draft was successfully published.
332
- * @path {PUT} /wiki/rest/api/content/blueprint/instance/{draftId}
333
- * @scopes-current write:confluence-content
334
- * @scopes-beta read:content-details:confluence, write:content:confluence
335
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-blueprint-instance-draftid-put
336
- */
337
- publishSharedDraft({ draftId, status, expand, contentBlueprintDraft, }) {
338
- return this.getClientInstance()
339
- .request({
340
- path: "/wiki/rest/api/content/blueprint/instance/{draftId}",
341
- method: "PUT",
342
- pathParams: {
343
- draftId,
344
- },
345
- query: {
346
- status,
347
- expand,
348
- },
349
- headers: {
350
- "Content-Type": "application/json",
351
- },
352
- body: contentBlueprintDraft,
353
- })
354
- .then(this.getClientInstance().responseHandler({
355
- 200: {
356
- "application/json": "json",
357
- },
358
- }))
359
- .then(commonHttpClient.castResponse())
360
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.publishSharedDraft.response"))
361
- .then(commonHttpClient.getBody);
362
- }
363
- /**
364
- * Returns the list of content that matches a Confluence Query Language
365
- * (CQL) query. For information on CQL, see:
366
- * [Advanced searching using
367
- * CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).
368
- *
369
- * Example initial call:
370
- * ```
371
- * /wiki/rest/api/content/search?cql=type=page&limit=25
372
- * ```
373
- *
374
- * Example response:
375
- * ```
376
- * {
377
- * "results": [
378
- * { ... },
379
- * { ... },
380
- * ...
381
- * { ... }
382
- * ],
383
- * "limit": 25,
384
- * "size": 25,
385
- * ...
386
- * "_links": {
387
- * "base": "<url>",
388
- * "context": "<url>",
389
- * "next":
390
- * "/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg",
391
- * "self": "<url>"
392
- * }
393
- * }
394
- * ```
395
- *
396
- * When additional results are available, returns `next` and `prev` URLs to
397
- * retrieve them in subsequent calls. The URLs each contain a cursor that points
398
- * to the appropriate set of results. Use `limit` to specify the number of results
399
- * returned in each call.
400
- * Example subsequent call (taken from example response):
401
- * ```
402
- * /wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
403
- * ```
404
- * The response to this will have a `prev` URL similar to the `next` in the
405
- * example response.
406
- *
407
- * Starting on Dec 10, 2024, if the expand query parameter is used with the
408
- * `body.export_view` and/or `body.styled_view` properties, then the query limit
409
- * parameter will be restricted to a maximum value of 25.
410
- *
411
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
412
- * Permission to access the Confluence site ('Can use' global permission).
413
- * Only content that the user has permission to view will be returned.
414
- *
415
- * @returns Returned if the requested list of content is returned.
416
- * @path {GET} /wiki/rest/api/content/search
417
- * @scopes-current search:confluence
418
- * @scopes-beta read:content-details:confluence
419
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-search-get
420
- */
421
- searchContentByCql({ cql, cqlcontext, expand, cursor, limit, }) {
422
- return this.getClientInstance()
423
- .request({
424
- path: "/wiki/rest/api/content/search",
425
- method: "GET",
426
- query: {
427
- cql,
428
- cqlcontext,
429
- expand,
430
- cursor,
431
- limit,
432
- },
433
- })
434
- .then(this.getClientInstance().responseHandler({
435
- 200: {
436
- "application/json": "json",
437
- },
438
- }))
439
- .then(commonHttpClient.castResponse())
440
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.searchContentByCQL.response"))
441
- .then(commonHttpClient.getBody);
442
- }
443
- /**
444
- * Deprecated, use [Confluence's v2
445
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
446
- *
447
- * Updates a piece of content. Use this method to update the title or body
448
- * of a piece of content, change the status, change the parent page, and more.
449
- *
450
- * Note, updating draft content is currently not supported.
451
- *
452
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
453
- * Permission to update the content.
454
- *
455
- * @deprecated
456
- * @returns Returned if the content is updated.
457
- * @path {PUT} /wiki/rest/api/content/{id}
458
- * @scopes-current write:confluence-content
459
- * @scopes-beta read:content-details:confluence, write:content:confluence
460
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-put
461
- */
462
- updateContent({ id, status, conflictPolicy, contentUpdate, }) {
463
- return this.getClientInstance()
464
- .request({
465
- path: "/wiki/rest/api/content/{id}",
466
- method: "PUT",
467
- pathParams: {
468
- id,
469
- },
470
- query: {
471
- status,
472
- conflictPolicy,
473
- },
474
- headers: {
475
- "Content-Type": "application/json",
476
- },
477
- body: contentUpdate,
478
- })
479
- .then(this.getClientInstance().responseHandler({
480
- 200: {
481
- "application/json": "json",
482
- },
483
- }))
484
- .then(commonHttpClient.castResponse())
485
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.updateContent.response"))
486
- .then(commonHttpClient.getBody);
15
+ constructor() {
16
+ super(...arguments);
17
+ /**
18
+ * Archives a list of pages. The pages to be archived are specified as a list of
19
+ * content IDs.
20
+ * This API accepts the archival request and returns a task ID.
21
+ * The archival process happens asynchronously.
22
+ * Use the /longtask/<taskId> REST API to get the copy task status.
23
+ *
24
+ * Each content ID needs to resolve to page objects that are not already in an
25
+ * archived state.
26
+ * The content IDs need not belong to the same space.
27
+ *
28
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
29
+ * 'Archive' permission for each of the pages in the corresponding space it
30
+ * belongs to.
31
+ *
32
+ * @returns Returned if the archive request has been submitted.
33
+ * @path {POST} /wiki/rest/api/content/archive
34
+ * @scopes-current write:confluence-content
35
+ * @scopes-beta read:content.metadata:confluence, write:page:confluence
36
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-archive-post
37
+ */
38
+ this.archivePages = ({ requestBody, }) => {
39
+ return this.getClientInstance()
40
+ .request({
41
+ path: "/wiki/rest/api/content/archive",
42
+ method: "POST",
43
+ headers: {
44
+ "Content-Type": "application/json",
45
+ },
46
+ body: requestBody,
47
+ })
48
+ .then(this.getClientInstance().responseHandler({
49
+ 202: {
50
+ "application/json": "json",
51
+ },
52
+ }))
53
+ .then(commonHttpClient.castResponse())
54
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.archivePages.response"))
55
+ .then(commonHttpClient.getBody);
56
+ };
57
+ /**
58
+ * Deprecated, use [Confluence's v2
59
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
60
+ *
61
+ * Creates a new piece of content or publishes an existing draft.
62
+ *
63
+ * To publish a draft, add the `id` and `status` properties to the body of the
64
+ * request.
65
+ * Set the `id` to the ID of the draft and set the `status` to 'current'. When the
66
+ * request is sent, a new piece of content will be created and the metadata from
67
+ * the
68
+ * draft will be transferred into it.
69
+ *
70
+ * By default, the following objects are expanded: `space`, `history`, `version`.
71
+ *
72
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add'
73
+ * permission for the
74
+ * space that the content will be created in, and permission to view the draft if
75
+ * publishing a draft.
76
+ *
77
+ * @deprecated
78
+ * @returns Returned if the content is created.
79
+ * @path {POST} /wiki/rest/api/content
80
+ * @scopes-current write:confluence-content
81
+ * @scopes-beta read:content-details:confluence, write:content:confluence
82
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-post
83
+ */
84
+ this.createContent = ({ status, expand, contentCreate, }) => {
85
+ return this.getClientInstance()
86
+ .request({
87
+ path: "/wiki/rest/api/content",
88
+ method: "POST",
89
+ query: {
90
+ status,
91
+ expand,
92
+ },
93
+ headers: {
94
+ "Content-Type": "application/json",
95
+ },
96
+ body: contentCreate,
97
+ })
98
+ .then(this.getClientInstance().responseHandler({
99
+ 200: {
100
+ "application/json": "json",
101
+ },
102
+ }))
103
+ .then(commonHttpClient.castResponse())
104
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.createContent.response"))
105
+ .then(commonHttpClient.getBody);
106
+ };
107
+ /**
108
+ * Deprecated, use [Confluence's v2
109
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
110
+ *
111
+ * Moves a piece of content to the space's trash or purges it from the trash,
112
+ * depending on the content's type and status:
113
+ *
114
+ * - If the content's type is `page`,`blogpost`, or `attachment` and its status is
115
+ * `current`,
116
+ * it will be trashed.
117
+ * - If the content's type is `page`,`blogpost`, or `attachment` and its status is
118
+ * `trashed`,
119
+ * the content will be purged from the trash and deleted permanently. Note,
120
+ * you must also set the `status` query parameter to `trashed` in your request.
121
+ * - If the content's type is `comment`, it will be deleted
122
+ * permanently without being trashed.
123
+ *
124
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
125
+ * 'Delete' permission for the space that the content is in.
126
+ *
127
+ * @deprecated
128
+ * @path {DELETE} /wiki/rest/api/content/{id}
129
+ * @scopes-current write:confluence-content
130
+ * @scopes-beta delete:content:confluence
131
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-delete
132
+ */
133
+ this.deleteContent = ({ id, status, }) => {
134
+ return this.getClientInstance()
135
+ .request({
136
+ path: "/wiki/rest/api/content/{id}",
137
+ method: "DELETE",
138
+ pathParams: {
139
+ id,
140
+ },
141
+ query: {
142
+ status,
143
+ },
144
+ })
145
+ .then(commonHttpClient.discardResult);
146
+ };
147
+ /**
148
+ * Deprecated, use [Confluence's v2
149
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
150
+ *
151
+ * Returns all content in a Confluence instance.
152
+ *
153
+ * By default, the following objects are expanded: `space`, `history`, `version`.
154
+ *
155
+ * Starting on Dec 10, 2024, if the expand query parameter is used with the
156
+ * `body.export_view` and/or `body.styled_view` properties, then the query limit
157
+ * parameter will be restricted to a maximum value of 25.
158
+ *
159
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
160
+ * Permission to access the Confluence site ('Can use' global permission).
161
+ * Only content that the user has permission to view will be returned.
162
+ *
163
+ * @deprecated
164
+ * @returns Returned if the requested list of content is returned.
165
+ * @path {GET} /wiki/rest/api/content
166
+ * @scopes-current read:confluence-content.summary
167
+ * @scopes-beta read:content-details:confluence
168
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-get
169
+ */
170
+ this.getContent = ({ type, spaceKey, title, status, postingDay, expand, trigger, orderby, start, limit, } = {}) => {
171
+ return this.getClientInstance()
172
+ .request({
173
+ path: "/wiki/rest/api/content",
174
+ method: "GET",
175
+ query: {
176
+ type,
177
+ spaceKey,
178
+ title,
179
+ status,
180
+ postingDay,
181
+ expand,
182
+ trigger,
183
+ orderby,
184
+ start,
185
+ limit,
186
+ },
187
+ })
188
+ .then(this.getClientInstance().responseHandler({
189
+ 200: {
190
+ "application/json": "json",
191
+ },
192
+ }))
193
+ .then(commonHttpClient.castResponse())
194
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContent.response"))
195
+ .then(commonHttpClient.getBody);
196
+ };
197
+ /**
198
+ * Deprecated, use [Confluence's v2
199
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
200
+ *
201
+ * Returns a single piece of content, like a page or a blog post.
202
+ *
203
+ * By default, the following objects are expanded: `space`, `history`, `version`.
204
+ *
205
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
206
+ * Permission to view the content. If the content is a blog post, 'View' permission
207
+ * for the space is required.
208
+ *
209
+ * @deprecated
210
+ * @returns Returned if the requested content is returned.
211
+ * @path {GET} /wiki/rest/api/content/{id}
212
+ * @scopes-current read:confluence-content.summary
213
+ * @scopes-beta read:content-details:confluence
214
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-get
215
+ */
216
+ this.getContentById = ({ id, status, version, embeddedContentRender, expand, trigger, }) => {
217
+ return this.getClientInstance()
218
+ .request({
219
+ path: "/wiki/rest/api/content/{id}",
220
+ method: "GET",
221
+ pathParams: {
222
+ id,
223
+ },
224
+ query: {
225
+ status,
226
+ version,
227
+ embeddedContentRender,
228
+ expand,
229
+ trigger,
230
+ },
231
+ })
232
+ .then(this.getClientInstance().responseHandler({
233
+ 200: {
234
+ "application/json": "json",
235
+ },
236
+ }))
237
+ .then(commonHttpClient.castResponse())
238
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.getContentById.response"))
239
+ .then(commonHttpClient.getBody);
240
+ };
241
+ /**
242
+ * Deprecated, use [Confluence's v2
243
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
244
+ *
245
+ * Returns the most recent update for a piece of content.
246
+ *
247
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
248
+ * Permission to view the content.
249
+ *
250
+ * @deprecated
251
+ * @returns Returned if the requested content history is returned.
252
+ * @path {GET} /wiki/rest/api/content/{id}/history
253
+ * @scopes-current read:confluence-content.summary
254
+ * @scopes-beta read:content.metadata:confluence, read:user:confluence
255
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-history-get
256
+ */
257
+ this.getHistoryForContent = ({ id, expand, }) => {
258
+ return this.getClientInstance()
259
+ .request({
260
+ path: "/wiki/rest/api/content/{id}/history",
261
+ method: "GET",
262
+ pathParams: {
263
+ id,
264
+ },
265
+ query: {
266
+ expand,
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("ContentService.getHistoryForContent.response"))
276
+ .then(commonHttpClient.getBody);
277
+ };
278
+ /**
279
+ * Publishes a legacy draft of a page created from a blueprint. Legacy drafts
280
+ * will eventually be removed in favor of shared drafts. For now, this method
281
+ * works the same as [Publish shared
282
+ * draft](#api-content-blueprint-instance-draftId-put).
283
+ *
284
+ * By default, the following objects are expanded: `body.storage`, `history`,
285
+ * `space`, `version`, `ancestors`.
286
+ *
287
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
288
+ * Permission to view the draft and 'Add' permission for the space that
289
+ * the content will be created in.
290
+ *
291
+ * @returns Returned if the draft was successfully published.
292
+ * @path {POST} /wiki/rest/api/content/blueprint/instance/{draftId}
293
+ * @scopes-current write:confluence-content
294
+ * @scopes-beta read:content-details:confluence, write:content:confluence
295
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-blueprint-instance-draftid-post
296
+ */
297
+ this.publishLegacyDraft = ({ draftId, status, expand, contentBlueprintDraft, }) => {
298
+ return this.getClientInstance()
299
+ .request({
300
+ path: "/wiki/rest/api/content/blueprint/instance/{draftId}",
301
+ method: "POST",
302
+ pathParams: {
303
+ draftId,
304
+ },
305
+ query: {
306
+ status,
307
+ expand,
308
+ },
309
+ headers: {
310
+ "Content-Type": "application/json",
311
+ },
312
+ body: contentBlueprintDraft,
313
+ })
314
+ .then(this.getClientInstance().responseHandler({
315
+ 200: {
316
+ "application/json": "json",
317
+ },
318
+ }))
319
+ .then(commonHttpClient.castResponse())
320
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.publishLegacyDraft.response"))
321
+ .then(commonHttpClient.getBody);
322
+ };
323
+ /**
324
+ * Publishes a shared draft of a page created from a blueprint.
325
+ *
326
+ * By default, the following objects are expanded: `body.storage`, `history`,
327
+ * `space`, `version`, `ancestors`.
328
+ *
329
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
330
+ * Permission to view the draft and 'Add' permission for the space that
331
+ * the content will be created in.
332
+ *
333
+ * @returns Returned if the draft was successfully published.
334
+ * @path {PUT} /wiki/rest/api/content/blueprint/instance/{draftId}
335
+ * @scopes-current write:confluence-content
336
+ * @scopes-beta read:content-details:confluence, write:content:confluence
337
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-blueprint-instance-draftid-put
338
+ */
339
+ this.publishSharedDraft = ({ draftId, status, expand, contentBlueprintDraft, }) => {
340
+ return this.getClientInstance()
341
+ .request({
342
+ path: "/wiki/rest/api/content/blueprint/instance/{draftId}",
343
+ method: "PUT",
344
+ pathParams: {
345
+ draftId,
346
+ },
347
+ query: {
348
+ status,
349
+ expand,
350
+ },
351
+ headers: {
352
+ "Content-Type": "application/json",
353
+ },
354
+ body: contentBlueprintDraft,
355
+ })
356
+ .then(this.getClientInstance().responseHandler({
357
+ 200: {
358
+ "application/json": "json",
359
+ },
360
+ }))
361
+ .then(commonHttpClient.castResponse())
362
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.publishSharedDraft.response"))
363
+ .then(commonHttpClient.getBody);
364
+ };
365
+ /**
366
+ * Returns the list of content that matches a Confluence Query Language
367
+ * (CQL) query. For information on CQL, see:
368
+ * [Advanced searching using
369
+ * CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).
370
+ *
371
+ * Example initial call:
372
+ * ```
373
+ * /wiki/rest/api/content/search?cql=type=page&limit=25
374
+ * ```
375
+ *
376
+ * Example response:
377
+ * ```
378
+ * {
379
+ * "results": [
380
+ * { ... },
381
+ * { ... },
382
+ * ...
383
+ * { ... }
384
+ * ],
385
+ * "limit": 25,
386
+ * "size": 25,
387
+ * ...
388
+ * "_links": {
389
+ * "base": "<url>",
390
+ * "context": "<url>",
391
+ * "next":
392
+ * "/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg",
393
+ * "self": "<url>"
394
+ * }
395
+ * }
396
+ * ```
397
+ *
398
+ * When additional results are available, returns `next` and `prev` URLs to
399
+ * retrieve them in subsequent calls. The URLs each contain a cursor that points
400
+ * to the appropriate set of results. Use `limit` to specify the number of results
401
+ * returned in each call.
402
+ * Example subsequent call (taken from example response):
403
+ * ```
404
+ * /wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
405
+ * ```
406
+ * The response to this will have a `prev` URL similar to the `next` in the
407
+ * example response.
408
+ *
409
+ * Starting on Dec 10, 2024, if the expand query parameter is used with the
410
+ * `body.export_view` and/or `body.styled_view` properties, then the query limit
411
+ * parameter will be restricted to a maximum value of 25.
412
+ *
413
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
414
+ * Permission to access the Confluence site ('Can use' global permission).
415
+ * Only content that the user has permission to view will be returned.
416
+ *
417
+ * @returns Returned if the requested list of content is returned.
418
+ * @path {GET} /wiki/rest/api/content/search
419
+ * @scopes-current search:confluence
420
+ * @scopes-beta read:content-details:confluence
421
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-search-get
422
+ */
423
+ this.searchContentByCql = ({ cql, cqlcontext, expand, cursor, limit, }) => {
424
+ return this.getClientInstance()
425
+ .request({
426
+ path: "/wiki/rest/api/content/search",
427
+ method: "GET",
428
+ query: {
429
+ cql,
430
+ cqlcontext,
431
+ expand,
432
+ cursor,
433
+ limit,
434
+ },
435
+ })
436
+ .then(this.getClientInstance().responseHandler({
437
+ 200: {
438
+ "application/json": "json",
439
+ },
440
+ }))
441
+ .then(commonHttpClient.castResponse())
442
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.searchContentByCQL.response"))
443
+ .then(commonHttpClient.getBody);
444
+ };
445
+ /**
446
+ * Deprecated, use [Confluence's v2
447
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
448
+ *
449
+ * Updates a piece of content. Use this method to update the title or body
450
+ * of a piece of content, change the status, change the parent page, and more.
451
+ *
452
+ * Note, updating draft content is currently not supported.
453
+ *
454
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
455
+ * Permission to update the content.
456
+ *
457
+ * @deprecated
458
+ * @returns Returned if the content is updated.
459
+ * @path {PUT} /wiki/rest/api/content/{id}
460
+ * @scopes-current write:confluence-content
461
+ * @scopes-beta read:content-details:confluence, write:content:confluence
462
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content#api-wiki-rest-api-content-id-put
463
+ */
464
+ this.updateContent = ({ id, status, conflictPolicy, contentUpdate, }) => {
465
+ return this.getClientInstance()
466
+ .request({
467
+ path: "/wiki/rest/api/content/{id}",
468
+ method: "PUT",
469
+ pathParams: {
470
+ id,
471
+ },
472
+ query: {
473
+ status,
474
+ conflictPolicy,
475
+ },
476
+ headers: {
477
+ "Content-Type": "application/json",
478
+ },
479
+ body: contentUpdate,
480
+ })
481
+ .then(this.getClientInstance().responseHandler({
482
+ 200: {
483
+ "application/json": "json",
484
+ },
485
+ }))
486
+ .then(commonHttpClient.castResponse())
487
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentService.updateContent.response"))
488
+ .then(commonHttpClient.getBody);
489
+ };
487
490
  }
488
491
  static initialize() {
489
492
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentService.getContent.response", zod_1.z