confluence.js 2.0.0 → 2.2.0-dev20260318121920

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 (229) hide show
  1. package/CHANGELOG.md +67 -2
  2. package/README.md +168 -181
  3. package/dist/cjs/api/analytics.cjs.map +1 -1
  4. package/dist/cjs/api/audit.cjs.map +1 -1
  5. package/dist/cjs/api/content.cjs +0 -5
  6. package/dist/cjs/api/content.cjs.map +1 -1
  7. package/dist/cjs/api/contentAttachments.cjs +1 -0
  8. package/dist/cjs/api/contentAttachments.cjs.map +1 -1
  9. package/dist/cjs/api/contentBody.cjs +18 -0
  10. package/dist/cjs/api/contentBody.cjs.map +1 -1
  11. package/dist/cjs/api/contentChildrenAndDescendants.cjs +2 -0
  12. package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -1
  13. package/dist/cjs/api/contentComments.cjs +1 -0
  14. package/dist/cjs/api/contentComments.cjs.map +1 -1
  15. package/dist/cjs/api/contentLabels.cjs.map +1 -1
  16. package/dist/cjs/api/contentMacroBody.cjs.map +1 -1
  17. package/dist/cjs/api/contentPermissions.cjs.map +1 -1
  18. package/dist/cjs/api/contentProperties.cjs +1 -0
  19. package/dist/cjs/api/contentProperties.cjs.map +1 -1
  20. package/dist/cjs/api/contentRestrictions.cjs.map +1 -1
  21. package/dist/cjs/api/contentStates.cjs +13 -0
  22. package/dist/cjs/api/contentStates.cjs.map +1 -1
  23. package/dist/cjs/api/contentVersions.cjs.map +1 -1
  24. package/dist/cjs/api/contentWatches.cjs.map +1 -1
  25. package/dist/cjs/api/dynamicModules.cjs.map +1 -1
  26. package/dist/cjs/api/experimental.cjs.map +1 -1
  27. package/dist/cjs/api/group.cjs +18 -17
  28. package/dist/cjs/api/group.cjs.map +1 -1
  29. package/dist/cjs/api/index.cjs +2 -0
  30. package/dist/cjs/api/index.cjs.map +1 -1
  31. package/dist/cjs/api/inlineTasks.cjs +1 -0
  32. package/dist/cjs/api/inlineTasks.cjs.map +1 -1
  33. package/dist/cjs/api/labelInfo.cjs.map +1 -1
  34. package/dist/cjs/api/longRunningTask.cjs +1 -0
  35. package/dist/cjs/api/longRunningTask.cjs.map +1 -1
  36. package/dist/cjs/api/models/labeledContentType.cjs.map +1 -1
  37. package/dist/cjs/api/relation.cjs.map +1 -1
  38. package/dist/cjs/api/search.cjs +1 -0
  39. package/dist/cjs/api/search.cjs.map +1 -1
  40. package/dist/cjs/api/settings.cjs.map +1 -1
  41. package/dist/cjs/api/space.cjs +4 -2
  42. package/dist/cjs/api/space.cjs.map +1 -1
  43. package/dist/cjs/api/spacePermissions.cjs.map +1 -1
  44. package/dist/cjs/api/spaceProperties.cjs +1 -0
  45. package/dist/cjs/api/spaceProperties.cjs.map +1 -1
  46. package/dist/cjs/api/spaceSettings.cjs.map +1 -1
  47. package/dist/cjs/api/template.cjs.map +1 -1
  48. package/dist/cjs/api/themes.cjs.map +1 -1
  49. package/dist/cjs/api/userProperties.cjs +56 -0
  50. package/dist/cjs/api/userProperties.cjs.map +1 -0
  51. package/dist/cjs/api/users.cjs.map +1 -1
  52. package/dist/cjs/clients/baseClient.cjs +17 -2
  53. package/dist/cjs/clients/baseClient.cjs.map +1 -1
  54. package/dist/cjs/clients/confluenceClient.cjs +6 -0
  55. package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
  56. package/dist/cjs/config.cjs +7 -4
  57. package/dist/cjs/config.cjs.map +1 -1
  58. package/dist/cjs/paramSerializer.cjs.map +1 -1
  59. package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
  60. package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
  61. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
  62. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
  63. package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
  64. package/dist/esm/api/analytics.mjs.map +1 -1
  65. package/dist/esm/api/audit.mjs.map +1 -1
  66. package/dist/esm/api/content.mjs +0 -5
  67. package/dist/esm/api/content.mjs.map +1 -1
  68. package/dist/esm/api/contentAttachments.mjs +1 -0
  69. package/dist/esm/api/contentAttachments.mjs.map +1 -1
  70. package/dist/esm/api/contentBody.mjs +18 -0
  71. package/dist/esm/api/contentBody.mjs.map +1 -1
  72. package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
  73. package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
  74. package/dist/esm/api/contentComments.mjs +1 -0
  75. package/dist/esm/api/contentComments.mjs.map +1 -1
  76. package/dist/esm/api/contentLabels.mjs.map +1 -1
  77. package/dist/esm/api/contentMacroBody.mjs.map +1 -1
  78. package/dist/esm/api/contentPermissions.mjs.map +1 -1
  79. package/dist/esm/api/contentProperties.mjs +1 -0
  80. package/dist/esm/api/contentProperties.mjs.map +1 -1
  81. package/dist/esm/api/contentRestrictions.mjs.map +1 -1
  82. package/dist/esm/api/contentStates.mjs +13 -0
  83. package/dist/esm/api/contentStates.mjs.map +1 -1
  84. package/dist/esm/api/contentVersions.mjs.map +1 -1
  85. package/dist/esm/api/contentWatches.mjs.map +1 -1
  86. package/dist/esm/api/dynamicModules.mjs.map +1 -1
  87. package/dist/esm/api/experimental.mjs.map +1 -1
  88. package/dist/esm/api/group.mjs +18 -17
  89. package/dist/esm/api/group.mjs.map +1 -1
  90. package/dist/esm/api/index.mjs +1 -0
  91. package/dist/esm/api/index.mjs.map +1 -1
  92. package/dist/esm/api/inlineTasks.mjs +1 -0
  93. package/dist/esm/api/inlineTasks.mjs.map +1 -1
  94. package/dist/esm/api/labelInfo.mjs.map +1 -1
  95. package/dist/esm/api/longRunningTask.mjs +1 -0
  96. package/dist/esm/api/longRunningTask.mjs.map +1 -1
  97. package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
  98. package/dist/esm/api/relation.mjs.map +1 -1
  99. package/dist/esm/api/search.mjs +1 -0
  100. package/dist/esm/api/search.mjs.map +1 -1
  101. package/dist/esm/api/settings.mjs.map +1 -1
  102. package/dist/esm/api/space.mjs +4 -2
  103. package/dist/esm/api/space.mjs.map +1 -1
  104. package/dist/esm/api/spacePermissions.mjs.map +1 -1
  105. package/dist/esm/api/spaceProperties.mjs +1 -0
  106. package/dist/esm/api/spaceProperties.mjs.map +1 -1
  107. package/dist/esm/api/spaceSettings.mjs.map +1 -1
  108. package/dist/esm/api/template.mjs.map +1 -1
  109. package/dist/esm/api/themes.mjs.map +1 -1
  110. package/dist/esm/api/userProperties.mjs +54 -0
  111. package/dist/esm/api/userProperties.mjs.map +1 -0
  112. package/dist/esm/api/users.mjs.map +1 -1
  113. package/dist/esm/clients/baseClient.mjs +18 -3
  114. package/dist/esm/clients/baseClient.mjs.map +1 -1
  115. package/dist/esm/clients/confluenceClient.mjs +6 -0
  116. package/dist/esm/clients/confluenceClient.mjs.map +1 -1
  117. package/dist/esm/config.mjs +7 -4
  118. package/dist/esm/config.mjs.map +1 -1
  119. package/dist/esm/paramSerializer.mjs.map +1 -1
  120. package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
  121. package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
  122. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
  123. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
  124. package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
  125. package/dist/esm/types/api/analytics.d.ts +1 -1
  126. package/dist/esm/types/api/audit.d.ts +3 -3
  127. package/dist/esm/types/api/content.d.ts +33 -7
  128. package/dist/esm/types/api/contentAttachments.d.ts +5 -1
  129. package/dist/esm/types/api/contentBody.d.ts +73 -7
  130. package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
  131. package/dist/esm/types/api/contentComments.d.ts +5 -0
  132. package/dist/esm/types/api/contentLabels.d.ts +17 -9
  133. package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
  134. package/dist/esm/types/api/contentPermissions.d.ts +1 -1
  135. package/dist/esm/types/api/contentProperties.d.ts +25 -0
  136. package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
  137. package/dist/esm/types/api/contentStates.d.ts +23 -5
  138. package/dist/esm/types/api/contentVersions.d.ts +9 -1
  139. package/dist/esm/types/api/contentWatches.d.ts +1 -1
  140. package/dist/esm/types/api/dynamicModules.d.ts +1 -1
  141. package/dist/esm/types/api/experimental.d.ts +21 -1
  142. package/dist/esm/types/api/group.d.ts +47 -27
  143. package/dist/esm/types/api/index.d.ts +1 -0
  144. package/dist/esm/types/api/inlineTasks.d.ts +13 -0
  145. package/dist/esm/types/api/labelInfo.d.ts +1 -1
  146. package/dist/esm/types/api/longRunningTask.d.ts +1 -1
  147. package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
  148. package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
  149. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
  150. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
  151. package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
  152. package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
  153. package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
  154. package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
  155. package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
  156. package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
  157. package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
  158. package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
  159. package/dist/esm/types/api/parameters/index.d.ts +4 -0
  160. package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
  161. package/dist/esm/types/api/relation.d.ts +13 -15
  162. package/dist/esm/types/api/search.d.ts +7 -1
  163. package/dist/esm/types/api/settings.d.ts +5 -1
  164. package/dist/esm/types/api/space.d.ts +23 -7
  165. package/dist/esm/types/api/spacePermissions.d.ts +1 -1
  166. package/dist/esm/types/api/spaceProperties.d.ts +25 -0
  167. package/dist/esm/types/api/spaceSettings.d.ts +1 -1
  168. package/dist/esm/types/api/template.d.ts +1 -1
  169. package/dist/esm/types/api/themes.d.ts +1 -1
  170. package/dist/esm/types/api/userProperties.d.ts +102 -0
  171. package/dist/esm/types/api/users.d.ts +21 -9
  172. package/dist/esm/types/clients/baseClient.d.ts +1 -0
  173. package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
  174. package/dist/esm/types/config.d.ts +29 -240
  175. package/eslint.config.ts +11 -16
  176. package/package.json +34 -33
  177. package/rollup.config.ts +8 -8
  178. package/src/api/analytics.ts +1 -1
  179. package/src/api/audit.ts +3 -3
  180. package/src/api/content.ts +33 -12
  181. package/src/api/contentAttachments.ts +6 -1
  182. package/src/api/contentBody.ts +113 -7
  183. package/src/api/contentChildrenAndDescendants.ts +39 -5
  184. package/src/api/contentComments.ts +5 -0
  185. package/src/api/contentLabels.ts +17 -9
  186. package/src/api/contentMacroBody.ts +79 -1
  187. package/src/api/contentPermissions.ts +1 -1
  188. package/src/api/contentProperties.ts +25 -0
  189. package/src/api/contentRestrictions.ts +19 -7
  190. package/src/api/contentStates.ts +47 -5
  191. package/src/api/contentVersions.ts +9 -1
  192. package/src/api/contentWatches.ts +1 -1
  193. package/src/api/dynamicModules.ts +1 -1
  194. package/src/api/experimental.ts +21 -1
  195. package/src/api/group.ts +96 -75
  196. package/src/api/index.ts +1 -0
  197. package/src/api/inlineTasks.ts +13 -0
  198. package/src/api/labelInfo.ts +1 -1
  199. package/src/api/longRunningTask.ts +2 -1
  200. package/src/api/models/spaceCreate.ts +11 -2
  201. package/src/api/models/spacePrivateCreate.ts +11 -2
  202. package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
  203. package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
  204. package/src/api/parameters/deleteGroupById.ts +4 -0
  205. package/src/api/parameters/downloadAttachment.ts +6 -0
  206. package/src/api/parameters/getContentChildren.ts +7 -1
  207. package/src/api/parameters/getContentsWithState.ts +17 -0
  208. package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
  209. package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
  210. package/src/api/parameters/getTasks.ts +2 -0
  211. package/src/api/parameters/getUser.ts +4 -0
  212. package/src/api/parameters/index.ts +4 -0
  213. package/src/api/parameters/searchUser.ts +7 -0
  214. package/src/api/relation.ts +13 -15
  215. package/src/api/search.ts +8 -1
  216. package/src/api/settings.ts +5 -1
  217. package/src/api/space.ts +27 -9
  218. package/src/api/spacePermissions.ts +1 -1
  219. package/src/api/spaceProperties.ts +25 -0
  220. package/src/api/spaceSettings.ts +1 -1
  221. package/src/api/template.ts +1 -1
  222. package/src/api/themes.ts +1 -1
  223. package/src/api/userProperties.ts +185 -0
  224. package/src/api/users.ts +21 -9
  225. package/src/clients/baseClient.ts +24 -8
  226. package/src/clients/confluenceClient.ts +6 -0
  227. package/src/config.ts +8 -4
  228. package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
  229. package/favicon.svg +0 -7
@@ -1,7 +1,7 @@
1
1
  import type * as Models from './models';
2
2
  import type * as Parameters from './parameters';
3
- import type { Callback } from '../callback';
4
3
  import type { Client } from '../clients';
4
+ import type { Callback } from '../callback';
5
5
  import type { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Content {
@@ -14,6 +14,8 @@ export class Content {
14
14
  *
15
15
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
16
16
  * ('Can use' global permission). Only content that the user has permission to view will be returned.
17
+ *
18
+ * @deprecated Will be removed in next major version.
17
19
  */
18
20
  async getContent<T = Models.ContentArray>(
19
21
  parameters: Parameters.GetContent | undefined,
@@ -26,6 +28,8 @@ export class Content {
26
28
  *
27
29
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
28
30
  * ('Can use' global permission). Only content that the user has permission to view will be returned.
31
+ *
32
+ * @deprecated Will be removed in next major version.
29
33
  */
30
34
  async getContent<T = Models.ContentArray>(parameters?: Parameters.GetContent, callback?: never): Promise<T>;
31
35
  async getContent<T = Models.ContentArray>(
@@ -63,6 +67,8 @@ export class Content {
63
67
  *
64
68
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the
65
69
  * content will be created in, and permission to view the draft if publishing a draft.
70
+ *
71
+ * @deprecated Will be removed in next major version.
66
72
  */
67
73
  async createContent<T = Models.Content>(
68
74
  parameters: Parameters.CreateContent | undefined,
@@ -79,6 +85,8 @@ export class Content {
79
85
  *
80
86
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the
81
87
  * content will be created in, and permission to view the draft if publishing a draft.
88
+ *
89
+ * @deprecated Will be removed in next major version.
82
90
  */
83
91
  async createContent<T = Models.Content>(parameters?: Parameters.CreateContent, callback?: never): Promise<T>;
84
92
  async createContent<T = Models.Content>(
@@ -223,12 +231,7 @@ export class Content {
223
231
  },
224
232
  data: {
225
233
  ...parameters,
226
- version: parameters.version,
227
- title: parameters.title,
228
- type: parameters.type,
229
234
  status: parameters.bodyStatus,
230
- space: parameters.space,
231
- ancestors: parameters.ancestors,
232
235
  },
233
236
  };
234
237
 
@@ -241,12 +244,13 @@ export class Content {
241
244
  *
242
245
  * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The
243
246
  * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of
244
- * results returned in each call. Example subsequent call (taken from example response):
245
- *
246
- * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
247
+ * results returned in each call.
247
248
  *
248
249
  * The response to this will have a `prev` URL similar to the `next` in the example response.
249
250
  *
251
+ * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
252
+ * query limit parameter will be restricted to a maximum value of 25.
253
+ *
250
254
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
251
255
  * ('Can use' global permission). Only content that the user has permission to view will be returned.
252
256
  */
@@ -260,12 +264,13 @@ export class Content {
260
264
  *
261
265
  * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The
262
266
  * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of
263
- * results returned in each call. Example subsequent call (taken from example response):
264
- *
265
- * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
267
+ * results returned in each call.
266
268
  *
267
269
  * The response to this will have a `prev` URL similar to the `next` in the example response.
268
270
  *
271
+ * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
272
+ * query limit parameter will be restricted to a maximum value of 25.
273
+ *
269
274
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
270
275
  * ('Can use' global permission). Only content that the user has permission to view will be returned.
271
276
  */
@@ -299,6 +304,8 @@ export class Content {
299
304
  *
300
305
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
301
306
  * content is a blog post, 'View' permission for the space is required.
307
+ *
308
+ * @deprecated Will be removed in next major version.
302
309
  */
303
310
  async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback: Callback<T>): Promise<void>;
304
311
  /**
@@ -308,6 +315,8 @@ export class Content {
308
315
  *
309
316
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
310
317
  * content is a blog post, 'View' permission for the space is required.
318
+ *
319
+ * @deprecated Will be removed in next major version.
311
320
  */
312
321
  async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback?: never): Promise<T>;
313
322
  async getContentById<T = Models.Content>(
@@ -336,6 +345,8 @@ export class Content {
336
345
  * Note, updating draft content is currently not supported.
337
346
  *
338
347
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
348
+ *
349
+ * @deprecated Will be removed in next major version.
339
350
  */
340
351
  async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback: Callback<T>): Promise<void>;
341
352
  /**
@@ -345,6 +356,8 @@ export class Content {
345
356
  * Note, updating draft content is currently not supported.
346
357
  *
347
358
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
359
+ *
360
+ * @deprecated Will be removed in next major version.
348
361
  */
349
362
  async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback?: never): Promise<T>;
350
363
  async updateContent<T = Models.Content>(
@@ -383,6 +396,8 @@ export class Content {
383
396
  *
384
397
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
385
398
  * content is in.
399
+ *
400
+ * @deprecated Will be removed in next major version.
386
401
  */
387
402
  async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback: Callback<T>): Promise<void>;
388
403
  /**
@@ -397,6 +412,8 @@ export class Content {
397
412
  *
398
413
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
399
414
  * content is in.
415
+ *
416
+ * @deprecated Will be removed in next major version.
400
417
  */
401
418
  async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: never): Promise<T>;
402
419
  async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: Callback<T>): Promise<void | T> {
@@ -415,6 +432,8 @@ export class Content {
415
432
  * Returns the most recent update for a piece of content.
416
433
  *
417
434
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.
435
+ *
436
+ * @deprecated Will be removed in next major version.
418
437
  */
419
438
  async getHistoryForContent<T = Models.ContentHistory>(
420
439
  parameters: Parameters.GetHistoryForContent,
@@ -424,6 +443,8 @@ export class Content {
424
443
  * Returns the most recent update for a piece of content.
425
444
  *
426
445
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.
446
+ *
447
+ * @deprecated Will be removed in next major version.
427
448
  */
428
449
  async getHistoryForContent<T = Models.ContentHistory>(
429
450
  parameters: Parameters.GetHistoryForContent,
@@ -2,8 +2,8 @@
2
2
  import FormData from 'form-data';
3
3
  import type * as Models from './models';
4
4
  import type * as Parameters from './parameters';
5
- import type { Callback } from '../callback';
6
5
  import type { Client } from '../clients';
6
+ import type { Callback } from '../callback';
7
7
  import type { RequestConfig } from '../requestConfig';
8
8
 
9
9
  export class ContentAttachments {
@@ -16,6 +16,8 @@ export class ContentAttachments {
16
16
  *
17
17
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
18
18
  * content is a blog post, 'View' permission for the space is required.
19
+ *
20
+ * @deprecated Will be removed in next major version.
19
21
  */
20
22
  async getAttachments<T = Models.ContentArray<Models.Attachment>>(
21
23
  parameters: Parameters.GetAttachments,
@@ -28,6 +30,8 @@ export class ContentAttachments {
28
30
  *
29
31
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
30
32
  * content is a blog post, 'View' permission for the space is required.
33
+ *
34
+ * @deprecated Will be removed in next major version.
31
35
  */
32
36
  async getAttachments<T = Models.ContentArray<Models.Attachment>>(
33
37
  parameters: Parameters.GetAttachments,
@@ -273,6 +277,7 @@ export class ContentAttachments {
273
277
  responseType: 'arraybuffer',
274
278
  params: {
275
279
  version: parameters.version,
280
+ status: parameters.status,
276
281
  },
277
282
  };
278
283
 
@@ -1,7 +1,7 @@
1
1
  import type * as Models from './models';
2
2
  import type * as Parameters from './parameters';
3
- import type { Callback } from '../callback';
4
3
  import type { Client } from '../clients';
4
+ import type { Callback } from '../callback';
5
5
  import type { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class ContentBody {
@@ -20,6 +20,8 @@ export class ContentBody {
20
20
  *
21
21
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',
22
22
  * 'View' permission for the space, and permission to view the content.
23
+ *
24
+ * @deprecated Will be removed in next major version.
23
25
  */
24
26
  async convertContentBody<T = Models.ContentBody>(
25
27
  parameters: Parameters.ConvertContentBody,
@@ -38,6 +40,8 @@ export class ContentBody {
38
40
  *
39
41
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',
40
42
  * 'View' permission for the space, and permission to view the content.
43
+ *
44
+ * @deprecated Will be removed in next major version.
41
45
  */
42
46
  async convertContentBody<T = Models.ContentBody>(
43
47
  parameters: Parameters.ConvertContentBody,
@@ -72,7 +76,9 @@ export class ContentBody {
72
76
  *
73
77
  * Supported conversions:
74
78
  *
75
- * - Storage: export_view
79
+ * - Atlas_doc_format: editor, export_view, storage, styled_view, view
80
+ * - Storage: atlas_doc_format, editor, export_view, styled_view, view
81
+ * - Editor: storage
76
82
  *
77
83
  * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5
78
84
  * minutes at the result endpoint.
@@ -90,7 +96,9 @@ export class ContentBody {
90
96
  *
91
97
  * Supported conversions:
92
98
  *
93
- * - Storage: export_view
99
+ * - Atlas_doc_format: editor, export_view, storage, styled_view, view
100
+ * - Storage: atlas_doc_format, editor, export_view, styled_view, view
101
+ * - Editor: storage
94
102
  *
95
103
  * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5
96
104
  * minutes at the result endpoint.
@@ -127,8 +135,8 @@ export class ContentBody {
127
135
  }
128
136
 
129
137
  /**
130
- * Returns the Asynchronous Content Body for the corresponding asyncId if the task is complete or returns the status
131
- * of the task.
138
+ * Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the
139
+ * task.
132
140
  *
133
141
  * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is
134
142
  * made again, with allowCache query param set to false.
@@ -141,8 +149,8 @@ export class ContentBody {
141
149
  callback: Callback<T>,
142
150
  ): Promise<void>;
143
151
  /**
144
- * Returns the Asynchronous Content Body for the corresponding asyncId if the task is complete or returns the status
145
- * of the task.
152
+ * Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the
153
+ * task.
146
154
  *
147
155
  * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is
148
156
  * made again, with allowCache query param set to false.
@@ -165,4 +173,102 @@ export class ContentBody {
165
173
 
166
174
  return this.client.sendRequest(config, callback);
167
175
  }
176
+
177
+ /**
178
+ * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not
179
+ * completed, the task status is returned instead.
180
+ *
181
+ * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical
182
+ * conversion request is made again with the `allowCache` parameter set to false.
183
+ *
184
+ * Note that there is a maximum limit of 50 task results per request to this endpoint.
185
+ *
186
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
187
+ * ('Can use' global permission).
188
+ */
189
+ async bulkAsyncConvertContentBodyResponse<T = Models.AsyncContentBody[]>(
190
+ parameters: Parameters.BulkAsyncConvertContentBodyResponse,
191
+ callback: Callback<T>,
192
+ ): Promise<void>;
193
+ /**
194
+ * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not
195
+ * completed, the task status is returned instead.
196
+ *
197
+ * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical
198
+ * conversion request is made again with the `allowCache` parameter set to false.
199
+ *
200
+ * Note that there is a maximum limit of 50 task results per request to this endpoint.
201
+ *
202
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
203
+ * ('Can use' global permission).
204
+ */
205
+ async bulkAsyncConvertContentBodyResponse<T = Models.AsyncContentBody[]>(
206
+ parameters: Parameters.BulkAsyncConvertContentBodyResponse,
207
+ callback?: never,
208
+ ): Promise<T>;
209
+ async bulkAsyncConvertContentBodyResponse<T = Models.AsyncContentBody[]>(
210
+ parameters: Parameters.BulkAsyncConvertContentBodyResponse,
211
+ callback?: Callback<T>,
212
+ ): Promise<void | T> {
213
+ const config: RequestConfig = {
214
+ url: '/api/contentbody/convert/async/bulk/tasks',
215
+ method: 'GET',
216
+ params: {
217
+ ids: parameters.ids,
218
+ },
219
+ };
220
+
221
+ return this.client.sendRequest(config, callback);
222
+ }
223
+
224
+ /**
225
+ * Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to
226
+ * get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this
227
+ * endpoint.
228
+ *
229
+ * Supported conversions:
230
+ *
231
+ * - Storage: editor, export_view, styled_view, view
232
+ * - Editor: storage
233
+ *
234
+ * Once a conversion task is completed, it is available for polling for up to 5 minutes.
235
+ *
236
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
237
+ * permission to view the content if the `spaceKeyContext` or `contentIdContext` are present.
238
+ */
239
+ async bulkAsyncConvertContentBodyRequest<T = Models.AsyncId[]>(
240
+ parameters: Parameters.BulkAsyncConvertContentBodyRequest,
241
+ callback: Callback<T>,
242
+ ): Promise<void>;
243
+ /**
244
+ * Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to
245
+ * get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this
246
+ * endpoint.
247
+ *
248
+ * Supported conversions:
249
+ *
250
+ * - Storage: editor, export_view, styled_view, view
251
+ * - Editor: storage
252
+ *
253
+ * Once a conversion task is completed, it is available for polling for up to 5 minutes.
254
+ *
255
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
256
+ * permission to view the content if the `spaceKeyContext` or `contentIdContext` are present.
257
+ */
258
+ async bulkAsyncConvertContentBodyRequest<T = Models.AsyncId[]>(
259
+ parameters: Parameters.BulkAsyncConvertContentBodyRequest,
260
+ callback?: never,
261
+ ): Promise<T>;
262
+ async bulkAsyncConvertContentBodyRequest<T = Models.AsyncId[]>(
263
+ parameters: Parameters.BulkAsyncConvertContentBodyRequest,
264
+ callback?: Callback<T>,
265
+ ): Promise<void | T> {
266
+ const config: RequestConfig = {
267
+ url: '/api/contentbody/convert/async/bulk/tasks',
268
+ method: 'POST',
269
+ data: parameters,
270
+ };
271
+
272
+ return this.client.sendRequest(config, callback);
273
+ }
168
274
  }
@@ -1,7 +1,7 @@
1
1
  import type * as Models from './models';
2
2
  import type * as Parameters from './parameters';
3
- import type { Callback } from '../callback';
4
3
  import type { Client } from '../clients';
4
+ import type { Callback } from '../callback';
5
5
  import type { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class ContentChildrenAndDescendants {
@@ -24,6 +24,8 @@ export class ContentChildrenAndDescendants {
24
24
  *
25
25
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
26
26
  * permission to view the content if it is a page.
27
+ *
28
+ * @deprecated Will be removed in next major version.
27
29
  */
28
30
  async getContentChildren<T = Models.ContentChildren>(
29
31
  parameters: Parameters.GetContentChildren,
@@ -46,6 +48,8 @@ export class ContentChildrenAndDescendants {
46
48
  *
47
49
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
48
50
  * permission to view the content if it is a page.
51
+ *
52
+ * @deprecated Will be removed in next major version.
49
53
  */
50
54
  async getContentChildren<T = Models.ContentChildren>(
51
55
  parameters: Parameters.GetContentChildren,
@@ -61,6 +65,8 @@ export class ContentChildrenAndDescendants {
61
65
  params: {
62
66
  expand: parameters.expand,
63
67
  parentVersion: parameters.parentVersion,
68
+ start: parameters.start,
69
+ limit: parameters.limit,
64
70
  },
65
71
  };
66
72
 
@@ -119,6 +125,8 @@ export class ContentChildrenAndDescendants {
119
125
  *
120
126
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
121
127
  * permission to view the content if it is a page.
128
+ *
129
+ * @deprecated Will be removed in next major version.
122
130
  */
123
131
  async getContentChildrenByType<T = Models.ContentArray>(
124
132
  parameters: Parameters.GetContentChildrenByType,
@@ -140,6 +148,8 @@ export class ContentChildrenAndDescendants {
140
148
  *
141
149
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
142
150
  * permission to view the content if it is a page.
151
+ *
152
+ * @deprecated Will be removed in next major version.
143
153
  */
144
154
  async getContentChildrenByType<T = Models.ContentArray>(
145
155
  parameters: Parameters.GetContentChildrenByType,
@@ -169,7 +179,11 @@ export class ContentChildrenAndDescendants {
169
179
  *
170
180
  * A piece of content has different types of descendants, depending on its type:
171
181
  *
172
- * - `page`: descendant is `page`, `comment`, `attachment`
182
+ * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
183
+ * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
184
+ * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
185
+ * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
186
+ * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
173
187
  * - `blogpost`: descendant is `comment`, `attachment`
174
188
  * - `attachment`: descendant is `comment`
175
189
  * - `comment`: descendant is `attachment`
@@ -191,7 +205,11 @@ export class ContentChildrenAndDescendants {
191
205
  *
192
206
  * A piece of content has different types of descendants, depending on its type:
193
207
  *
194
- * - `page`: descendant is `page`, `comment`, `attachment`
208
+ * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
209
+ * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
210
+ * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
211
+ * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
212
+ * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
195
213
  * - `blogpost`: descendant is `comment`, `attachment`
196
214
  * - `attachment`: descendant is `comment`
197
215
  * - `comment`: descendant is `attachment`
@@ -228,13 +246,20 @@ export class ContentChildrenAndDescendants {
228
246
  *
229
247
  * A piece of content has different types of descendants, depending on its type:
230
248
  *
231
- * - `page`: descendant is `page`, `comment`, `attachment`
249
+ * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
250
+ * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
251
+ * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
252
+ * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
253
+ * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
232
254
  * - `blogpost`: descendant is `comment`, `attachment`
233
255
  * - `attachment`: descendant is `comment`
234
256
  * - `comment`: descendant is `attachment`
235
257
  *
236
258
  * Custom content types that are provided by apps can also be returned.
237
259
  *
260
+ * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
261
+ * query limit parameter will be restricted to a maximum value of 25.
262
+ *
238
263
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
239
264
  * permission to view the content if it is a page.
240
265
  */
@@ -249,13 +274,20 @@ export class ContentChildrenAndDescendants {
249
274
  *
250
275
  * A piece of content has different types of descendants, depending on its type:
251
276
  *
252
- * - `page`: descendant is `page`, `comment`, `attachment`
277
+ * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
278
+ * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
279
+ * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
280
+ * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
281
+ * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`
253
282
  * - `blogpost`: descendant is `comment`, `attachment`
254
283
  * - `attachment`: descendant is `comment`
255
284
  * - `comment`: descendant is `attachment`
256
285
  *
257
286
  * Custom content types that are provided by apps can also be returned.
258
287
  *
288
+ * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
289
+ * query limit parameter will be restricted to a maximum value of 25.
290
+ *
259
291
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
260
292
  * permission to view the content if it is a page.
261
293
  */
@@ -329,6 +361,7 @@ export class ContentChildrenAndDescendants {
329
361
  *
330
362
  * - `space`: page will be copied to the specified space as a root page on the space
331
363
  * - `parent_page`: page will be copied as a child of the specified parent page
364
+ * - `parent_content`: page will be copied as a child of the specified parent content
332
365
  * - `existing_page`: page will be copied and replace the specified page
333
366
  *
334
367
  * By default, the following objects are expanded: `space`, `history`, `version`.
@@ -344,6 +377,7 @@ export class ContentChildrenAndDescendants {
344
377
  *
345
378
  * - `space`: page will be copied to the specified space as a root page on the space
346
379
  * - `parent_page`: page will be copied as a child of the specified parent page
380
+ * - `parent_content`: page will be copied as a child of the specified parent content
347
381
  * - `existing_page`: page will be copied and replace the specified page
348
382
  *
349
383
  * By default, the following objects are expanded: `space`, `history`, `version`.
@@ -4,6 +4,7 @@ import type { Callback } from '../callback';
4
4
  import type { Client } from '../clients';
5
5
  import type { RequestConfig } from '../requestConfig';
6
6
 
7
+ /** @deprecated Will be removed in next major version. */
7
8
  export class ContentComments {
8
9
  constructor(private client: Client) {}
9
10
 
@@ -12,6 +13,8 @@ export class ContentComments {
12
13
  *
13
14
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
14
15
  * permission to view the content if it is a page.
16
+ *
17
+ * @deprecated Will be removed in next major version.
15
18
  */
16
19
  async getContentComments<T = Models.ContentArray>(
17
20
  parameters: Parameters.GetContentComments,
@@ -22,6 +25,8 @@ export class ContentComments {
22
25
  *
23
26
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
24
27
  * permission to view the content if it is a page.
28
+ *
29
+ * @deprecated Will be removed in next major version.
25
30
  */
26
31
  async getContentComments<T = Models.ContentArray>(
27
32
  parameters: Parameters.GetContentComments,
@@ -1,7 +1,7 @@
1
1
  import type * as Models from './models';
2
2
  import type * as Parameters from './parameters';
3
- import type { Callback } from '../callback';
4
3
  import type { Client } from '../clients';
4
+ import type { Callback } from '../callback';
5
5
  import type { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class ContentLabels {
@@ -12,6 +12,8 @@ export class ContentLabels {
12
12
  *
13
13
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and
14
14
  * permission to view the content if it is a page.
15
+ *
16
+ * @deprecated Will be removed in next major version.
15
17
  */
16
18
  async getLabelsForContent<T = Models.LabelArray>(
17
19
  parameters: Parameters.GetLabelsForContent,
@@ -22,6 +24,8 @@ export class ContentLabels {
22
24
  *
23
25
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and
24
26
  * permission to view the content if it is a page.
27
+ *
28
+ * @deprecated Will be removed in next major version.
25
29
  */
26
30
  async getLabelsForContent<T = Models.LabelArray>(
27
31
  parameters: Parameters.GetLabelsForContent,
@@ -91,8 +95,9 @@ export class ContentLabels {
91
95
  }
92
96
 
93
97
  /**
94
- * Removes a label from a piece of content. This is similar to [Remove label from
95
- * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter.
98
+ * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove
99
+ * label from content](#api-content-id-label-label-delete) except that the label name is specified via a query
100
+ * parameter.
96
101
  *
97
102
  * Use this method if the label name has "/" characters, as [Remove label from content using query
98
103
  * parameter](#api-content-id-label-delete) does not accept "/" characters for the label name.
@@ -104,8 +109,9 @@ export class ContentLabels {
104
109
  callback: Callback<T>,
105
110
  ): Promise<void>;
106
111
  /**
107
- * Removes a label from a piece of content. This is similar to [Remove label from
108
- * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter.
112
+ * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove
113
+ * label from content](#api-content-id-label-label-delete) except that the label name is specified via a query
114
+ * parameter.
109
115
  *
110
116
  * Use this method if the label name has "/" characters, as [Remove label from content using query
111
117
  * parameter](#api-content-id-label-delete) does not accept "/" characters for the label name.
@@ -132,8 +138,9 @@ export class ContentLabels {
132
138
  }
133
139
 
134
140
  /**
135
- * Removes a label from a piece of content. This is similar to [Remove label from content using query
136
- * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter.
141
+ * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove
142
+ * label from content using query parameter](#api-content-id-label-delete) except that the label name is specified via
143
+ * a path parameter.
137
144
  *
138
145
  * Use this method if the label name does not have "/" characters, as the path parameter does not accept "/"
139
146
  * characters for security reasons. Otherwise, use [Remove label from content using query
@@ -146,8 +153,9 @@ export class ContentLabels {
146
153
  callback: Callback<T>,
147
154
  ): Promise<void>;
148
155
  /**
149
- * Removes a label from a piece of content. This is similar to [Remove label from content using query
150
- * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter.
156
+ * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove
157
+ * label from content using query parameter](#api-content-id-label-delete) except that the label name is specified via
158
+ * a path parameter.
151
159
  *
152
160
  * Use this method if the label name does not have "/" characters, as the path parameter does not accept "/"
153
161
  * characters for security reasons. Otherwise, use [Remove label from content using query