confluence.js 2.0.0 → 2.1.0

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 (224) hide show
  1. package/CHANGELOG.md +52 -2
  2. package/README.md +145 -183
  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.map +1 -1
  53. package/dist/cjs/clients/confluenceClient.cjs +6 -0
  54. package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
  55. package/dist/cjs/config.cjs +3 -1
  56. package/dist/cjs/config.cjs.map +1 -1
  57. package/dist/cjs/paramSerializer.cjs.map +1 -1
  58. package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
  59. package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
  60. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
  61. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
  62. package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
  63. package/dist/esm/api/analytics.mjs.map +1 -1
  64. package/dist/esm/api/audit.mjs.map +1 -1
  65. package/dist/esm/api/content.mjs +0 -5
  66. package/dist/esm/api/content.mjs.map +1 -1
  67. package/dist/esm/api/contentAttachments.mjs +1 -0
  68. package/dist/esm/api/contentAttachments.mjs.map +1 -1
  69. package/dist/esm/api/contentBody.mjs +18 -0
  70. package/dist/esm/api/contentBody.mjs.map +1 -1
  71. package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
  72. package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
  73. package/dist/esm/api/contentComments.mjs +1 -0
  74. package/dist/esm/api/contentComments.mjs.map +1 -1
  75. package/dist/esm/api/contentLabels.mjs.map +1 -1
  76. package/dist/esm/api/contentMacroBody.mjs.map +1 -1
  77. package/dist/esm/api/contentPermissions.mjs.map +1 -1
  78. package/dist/esm/api/contentProperties.mjs +1 -0
  79. package/dist/esm/api/contentProperties.mjs.map +1 -1
  80. package/dist/esm/api/contentRestrictions.mjs.map +1 -1
  81. package/dist/esm/api/contentStates.mjs +13 -0
  82. package/dist/esm/api/contentStates.mjs.map +1 -1
  83. package/dist/esm/api/contentVersions.mjs.map +1 -1
  84. package/dist/esm/api/contentWatches.mjs.map +1 -1
  85. package/dist/esm/api/dynamicModules.mjs.map +1 -1
  86. package/dist/esm/api/experimental.mjs.map +1 -1
  87. package/dist/esm/api/group.mjs +18 -17
  88. package/dist/esm/api/group.mjs.map +1 -1
  89. package/dist/esm/api/index.mjs +1 -0
  90. package/dist/esm/api/index.mjs.map +1 -1
  91. package/dist/esm/api/inlineTasks.mjs +1 -0
  92. package/dist/esm/api/inlineTasks.mjs.map +1 -1
  93. package/dist/esm/api/labelInfo.mjs.map +1 -1
  94. package/dist/esm/api/longRunningTask.mjs +1 -0
  95. package/dist/esm/api/longRunningTask.mjs.map +1 -1
  96. package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
  97. package/dist/esm/api/relation.mjs.map +1 -1
  98. package/dist/esm/api/search.mjs +1 -0
  99. package/dist/esm/api/search.mjs.map +1 -1
  100. package/dist/esm/api/settings.mjs.map +1 -1
  101. package/dist/esm/api/space.mjs +4 -2
  102. package/dist/esm/api/space.mjs.map +1 -1
  103. package/dist/esm/api/spacePermissions.mjs.map +1 -1
  104. package/dist/esm/api/spaceProperties.mjs +1 -0
  105. package/dist/esm/api/spaceProperties.mjs.map +1 -1
  106. package/dist/esm/api/spaceSettings.mjs.map +1 -1
  107. package/dist/esm/api/template.mjs.map +1 -1
  108. package/dist/esm/api/themes.mjs.map +1 -1
  109. package/dist/esm/api/userProperties.mjs +54 -0
  110. package/dist/esm/api/userProperties.mjs.map +1 -0
  111. package/dist/esm/api/users.mjs.map +1 -1
  112. package/dist/esm/clients/baseClient.mjs.map +1 -1
  113. package/dist/esm/clients/confluenceClient.mjs +6 -0
  114. package/dist/esm/clients/confluenceClient.mjs.map +1 -1
  115. package/dist/esm/config.mjs +3 -1
  116. package/dist/esm/config.mjs.map +1 -1
  117. package/dist/esm/paramSerializer.mjs.map +1 -1
  118. package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
  119. package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
  120. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
  121. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
  122. package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
  123. package/dist/esm/types/api/analytics.d.ts +1 -1
  124. package/dist/esm/types/api/audit.d.ts +3 -3
  125. package/dist/esm/types/api/content.d.ts +33 -7
  126. package/dist/esm/types/api/contentAttachments.d.ts +5 -1
  127. package/dist/esm/types/api/contentBody.d.ts +73 -7
  128. package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
  129. package/dist/esm/types/api/contentComments.d.ts +5 -0
  130. package/dist/esm/types/api/contentLabels.d.ts +17 -9
  131. package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
  132. package/dist/esm/types/api/contentPermissions.d.ts +1 -1
  133. package/dist/esm/types/api/contentProperties.d.ts +25 -0
  134. package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
  135. package/dist/esm/types/api/contentStates.d.ts +23 -5
  136. package/dist/esm/types/api/contentVersions.d.ts +9 -1
  137. package/dist/esm/types/api/contentWatches.d.ts +1 -1
  138. package/dist/esm/types/api/dynamicModules.d.ts +1 -1
  139. package/dist/esm/types/api/experimental.d.ts +21 -1
  140. package/dist/esm/types/api/group.d.ts +47 -27
  141. package/dist/esm/types/api/index.d.ts +1 -0
  142. package/dist/esm/types/api/inlineTasks.d.ts +13 -0
  143. package/dist/esm/types/api/labelInfo.d.ts +1 -1
  144. package/dist/esm/types/api/longRunningTask.d.ts +1 -1
  145. package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
  146. package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
  147. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
  148. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
  149. package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
  150. package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
  151. package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
  152. package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
  153. package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
  154. package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
  155. package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
  156. package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
  157. package/dist/esm/types/api/parameters/index.d.ts +4 -0
  158. package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
  159. package/dist/esm/types/api/relation.d.ts +13 -15
  160. package/dist/esm/types/api/search.d.ts +7 -1
  161. package/dist/esm/types/api/settings.d.ts +5 -1
  162. package/dist/esm/types/api/space.d.ts +23 -7
  163. package/dist/esm/types/api/spacePermissions.d.ts +1 -1
  164. package/dist/esm/types/api/spaceProperties.d.ts +25 -0
  165. package/dist/esm/types/api/spaceSettings.d.ts +1 -1
  166. package/dist/esm/types/api/template.d.ts +1 -1
  167. package/dist/esm/types/api/themes.d.ts +1 -1
  168. package/dist/esm/types/api/userProperties.d.ts +102 -0
  169. package/dist/esm/types/api/users.d.ts +21 -9
  170. package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
  171. package/eslint.config.ts +11 -16
  172. package/package.json +29 -28
  173. package/src/api/analytics.ts +1 -1
  174. package/src/api/audit.ts +3 -3
  175. package/src/api/content.ts +33 -12
  176. package/src/api/contentAttachments.ts +6 -1
  177. package/src/api/contentBody.ts +113 -7
  178. package/src/api/contentChildrenAndDescendants.ts +39 -5
  179. package/src/api/contentComments.ts +5 -0
  180. package/src/api/contentLabels.ts +17 -9
  181. package/src/api/contentMacroBody.ts +79 -1
  182. package/src/api/contentPermissions.ts +1 -1
  183. package/src/api/contentProperties.ts +25 -0
  184. package/src/api/contentRestrictions.ts +19 -7
  185. package/src/api/contentStates.ts +47 -5
  186. package/src/api/contentVersions.ts +9 -1
  187. package/src/api/contentWatches.ts +1 -1
  188. package/src/api/dynamicModules.ts +1 -1
  189. package/src/api/experimental.ts +21 -1
  190. package/src/api/group.ts +96 -75
  191. package/src/api/index.ts +1 -0
  192. package/src/api/inlineTasks.ts +13 -0
  193. package/src/api/labelInfo.ts +1 -1
  194. package/src/api/longRunningTask.ts +2 -1
  195. package/src/api/models/spaceCreate.ts +11 -2
  196. package/src/api/models/spacePrivateCreate.ts +11 -2
  197. package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
  198. package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
  199. package/src/api/parameters/deleteGroupById.ts +4 -0
  200. package/src/api/parameters/downloadAttachment.ts +6 -0
  201. package/src/api/parameters/getContentChildren.ts +7 -1
  202. package/src/api/parameters/getContentsWithState.ts +17 -0
  203. package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
  204. package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
  205. package/src/api/parameters/getTasks.ts +2 -0
  206. package/src/api/parameters/getUser.ts +4 -0
  207. package/src/api/parameters/index.ts +4 -0
  208. package/src/api/parameters/searchUser.ts +7 -0
  209. package/src/api/relation.ts +13 -15
  210. package/src/api/search.ts +8 -1
  211. package/src/api/settings.ts +5 -1
  212. package/src/api/space.ts +27 -9
  213. package/src/api/spacePermissions.ts +1 -1
  214. package/src/api/spaceProperties.ts +25 -0
  215. package/src/api/spaceSettings.ts +1 -1
  216. package/src/api/template.ts +1 -1
  217. package/src/api/themes.ts +1 -1
  218. package/src/api/userProperties.ts +185 -0
  219. package/src/api/users.ts +21 -9
  220. package/src/clients/baseClient.ts +1 -5
  221. package/src/clients/confluenceClient.ts +6 -0
  222. package/src/config.ts +4 -1
  223. package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
  224. package/favicon.svg +0 -7
@@ -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 ContentProperties {
8
9
  constructor(private client: Client) {}
9
10
 
@@ -13,6 +14,8 @@ export class ContentProperties {
13
14
  *
14
15
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
15
16
  * permission to view the content if it is a page.
17
+ *
18
+ * @deprecated Will be removed in next major version.
16
19
  */
17
20
  async getContentProperties<T = Models.ContentPropertyArray>(
18
21
  parameters: Parameters.GetContentProperties,
@@ -24,6 +27,8 @@ export class ContentProperties {
24
27
  *
25
28
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
26
29
  * permission to view the content if it is a page.
30
+ *
31
+ * @deprecated Will be removed in next major version.
27
32
  */
28
33
  async getContentProperties<T = Models.ContentPropertyArray>(
29
34
  parameters: Parameters.GetContentProperties,
@@ -58,6 +63,8 @@ export class ContentProperties {
58
63
  * `metadata.properties` of the request.
59
64
  *
60
65
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
66
+ *
67
+ * @deprecated Will be removed in next major version.
61
68
  */
62
69
  async createContentProperty<T = Models.ContentProperty>(
63
70
  parameters: Parameters.CreateContentProperty,
@@ -74,6 +81,8 @@ export class ContentProperties {
74
81
  * `metadata.properties` of the request.
75
82
  *
76
83
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
84
+ *
85
+ * @deprecated Will be removed in next major version.
77
86
  */
78
87
  async createContentProperty<T = Models.ContentProperty>(
79
88
  parameters: Parameters.CreateContentProperty,
@@ -101,6 +110,8 @@ export class ContentProperties {
101
110
  *
102
111
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
103
112
  * permission to view the content if it is a page.
113
+ *
114
+ * @deprecated Will be removed in next major version.
104
115
  */
105
116
  async getContentProperty<T = Models.ContentProperty>(
106
117
  parameters: Parameters.GetContentProperty,
@@ -112,6 +123,8 @@ export class ContentProperties {
112
123
  *
113
124
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and
114
125
  * permission to view the content if it is a page.
126
+ *
127
+ * @deprecated Will be removed in next major version.
115
128
  */
116
129
  async getContentProperty<T = Models.ContentProperty>(
117
130
  parameters: Parameters.GetContentProperty,
@@ -144,6 +157,8 @@ export class ContentProperties {
144
157
  * `metadata.properties` of the request.
145
158
  *
146
159
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
160
+ *
161
+ * @deprecated Will be removed in next major version.
147
162
  */
148
163
  async createContentPropertyForKey<T = Models.ContentProperty>(
149
164
  parameters: Parameters.CreateContentPropertyForKey,
@@ -160,6 +175,8 @@ export class ContentProperties {
160
175
  * `metadata.properties` of the request.
161
176
  *
162
177
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
178
+ *
179
+ * @deprecated Will be removed in next major version.
163
180
  */
164
181
  async createContentPropertyForKey<T = Models.ContentProperty>(
165
182
  parameters: Parameters.CreateContentPropertyForKey,
@@ -186,6 +203,8 @@ export class ContentProperties {
186
203
  * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
187
204
  *
188
205
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
206
+ *
207
+ * @deprecated Will be removed in next major version.
189
208
  */
190
209
  async updateContentProperty<T = Models.ContentProperty>(
191
210
  parameters: Parameters.UpdateContentProperty,
@@ -197,6 +216,8 @@ export class ContentProperties {
197
216
  * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
198
217
  *
199
218
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
219
+ *
220
+ * @deprecated Will be removed in next major version.
200
221
  */
201
222
  async updateContentProperty<T = Models.ContentProperty>(
202
223
  parameters: Parameters.UpdateContentProperty,
@@ -223,6 +244,8 @@ export class ContentProperties {
223
244
  * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
224
245
  *
225
246
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
247
+ *
248
+ * @deprecated Will be removed in next major version.
226
249
  */
227
250
  async deleteContentProperty<T = void>(
228
251
  parameters: Parameters.DeleteContentProperty,
@@ -233,6 +256,8 @@ export class ContentProperties {
233
256
  * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
234
257
  *
235
258
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
259
+ *
260
+ * @deprecated Will be removed in next major version.
236
261
  */
237
262
  async deleteContentProperty<T = void>(parameters: Parameters.DeleteContentProperty, callback?: never): Promise<T>;
238
263
  async deleteContentProperty<T = void>(
@@ -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 ContentRestrictions {
@@ -221,13 +221,15 @@ export class ContentRestrictions {
221
221
  * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a
222
222
  * `read` restriction for the `admins` group, the following request will return `true`:
223
223
  *
224
- * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins`
224
+ * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/group/admins`
225
225
  *
226
226
  * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for
227
227
  * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence
228
228
  * permissions](https://confluence.atlassian.com/x/_AozKw).
229
229
  *
230
230
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.
231
+ *
232
+ * @deprecated Will be removed in next major version.
231
233
  */
232
234
  async getContentRestrictionStatusForGroup<T = unknown>(
233
235
  parameters: Parameters.GetContentRestrictionStatusForGroup,
@@ -237,13 +239,15 @@ export class ContentRestrictions {
237
239
  * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a
238
240
  * `read` restriction for the `admins` group, the following request will return `true`:
239
241
  *
240
- * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins`
242
+ * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/group/admins`
241
243
  *
242
244
  * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for
243
245
  * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence
244
246
  * permissions](https://confluence.atlassian.com/x/_AozKw).
245
247
  *
246
248
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.
249
+ *
250
+ * @deprecated Will be removed in next major version.
247
251
  */
248
252
  async getContentRestrictionStatusForGroup<T = unknown>(
249
253
  parameters: Parameters.GetContentRestrictionStatusForGroup,
@@ -266,6 +270,8 @@ export class ContentRestrictions {
266
270
  * content.
267
271
  *
268
272
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.
273
+ *
274
+ * @deprecated Will be removed in next major version.
269
275
  */
270
276
  async addGroupToContentRestriction<T = unknown>(
271
277
  parameters: Parameters.AddGroupToContentRestriction,
@@ -276,6 +282,8 @@ export class ContentRestrictions {
276
282
  * content.
277
283
  *
278
284
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.
285
+ *
286
+ * @deprecated Will be removed in next major version.
279
287
  */
280
288
  async addGroupToContentRestriction<T = unknown>(
281
289
  parameters: Parameters.AddGroupToContentRestriction,
@@ -298,6 +306,8 @@ export class ContentRestrictions {
298
306
  * content.
299
307
  *
300
308
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.
309
+ *
310
+ * @deprecated Will be removed in next major version.
301
311
  */
302
312
  async removeGroupByName<T = unknown>(parameters: Parameters.RemoveGroupByName, callback: Callback<T>): Promise<void>;
303
313
  /**
@@ -305,6 +315,8 @@ export class ContentRestrictions {
305
315
  * content.
306
316
  *
307
317
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.
318
+ *
319
+ * @deprecated Will be removed in next major version.
308
320
  */
309
321
  async removeGroupByName<T = unknown>(parameters: Parameters.RemoveGroupByName, callback?: never): Promise<T>;
310
322
  async removeGroupByName<T = unknown>(
@@ -323,7 +335,7 @@ export class ContentRestrictions {
323
335
  * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a
324
336
  * `read` restriction for the `123456` group id, the following request will return `true`:
325
337
  *
326
- * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/byGroupId/123456`
338
+ * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/byGroupId/123456`
327
339
  *
328
340
  * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for
329
341
  * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence
@@ -339,7 +351,7 @@ export class ContentRestrictions {
339
351
  * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a
340
352
  * `read` restriction for the `123456` group id, the following request will return `true`:
341
353
  *
342
- * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/byGroupId/123456`
354
+ * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/byGroupId/123456`
343
355
  *
344
356
  * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for
345
357
  * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence
@@ -426,7 +438,7 @@ export class ContentRestrictions {
426
438
  * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following
427
439
  * request will return `true`:
428
440
  *
429
- * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`
441
+ * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`
430
442
  *
431
443
  * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for
432
444
  * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence
@@ -443,7 +455,7 @@ export class ContentRestrictions {
443
455
  * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following
444
456
  * request will return `true`:
445
457
  *
446
- * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`
458
+ * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`
447
459
  *
448
460
  * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for
449
461
  * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence
@@ -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 ContentStates {
@@ -191,7 +191,7 @@ export class ContentStates {
191
191
  /**
192
192
  * Get content states that are suggested in the space.
193
193
  *
194
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space view permission
194
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
195
195
  */
196
196
  async getSpaceContentStates<T = Models.ContentState[]>(
197
197
  parameters: Parameters.GetSpaceContentStates,
@@ -200,7 +200,7 @@ export class ContentStates {
200
200
  /**
201
201
  * Get content states that are suggested in the space.
202
202
  *
203
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space view permission
203
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
204
204
  */
205
205
  async getSpaceContentStates<T = Models.ContentState[]>(
206
206
  parameters: Parameters.GetSpaceContentStates,
@@ -222,7 +222,7 @@ export class ContentStates {
222
222
  * Get object describing whether content states are allowed at all, if custom content states or space content states
223
223
  * are restricted, and a list of space content states allowed for the space if they are not restricted.
224
224
  *
225
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space admin permission
225
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.
226
226
  */
227
227
  async getContentStateSettings<T = Models.ContentStateSettings>(
228
228
  parameters: Parameters.GetContentStateSettings,
@@ -232,7 +232,7 @@ export class ContentStates {
232
232
  * Get object describing whether content states are allowed at all, if custom content states or space content states
233
233
  * are restricted, and a list of space content states allowed for the space if they are not restricted.
234
234
  *
235
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space admin permission
235
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.
236
236
  */
237
237
  async getContentStateSettings<T = Models.ContentStateSettings>(
238
238
  parameters: Parameters.GetContentStateSettings,
@@ -249,4 +249,46 @@ export class ContentStates {
249
249
 
250
250
  return this.client.sendRequest(config, callback);
251
251
  }
252
+
253
+ /**
254
+ * Returns all content that has the provided content state in a space.
255
+ *
256
+ * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
257
+ * query limit parameter will be restricted to a maximum value of 25.
258
+ *
259
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
260
+ */
261
+ async getContentsWithState<T = Models.ContentArray>(
262
+ parameters: Parameters.GetContentsWithState,
263
+ callback: Callback<T>,
264
+ ): Promise<void>;
265
+ /**
266
+ * Returns all content that has the provided content state in a space.
267
+ *
268
+ * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
269
+ * query limit parameter will be restricted to a maximum value of 25.
270
+ *
271
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
272
+ */
273
+ async getContentsWithState<T = Models.ContentArray>(
274
+ parameters: Parameters.GetContentsWithState,
275
+ callback?: never,
276
+ ): Promise<T>;
277
+ async getContentsWithState<T = Models.ContentArray>(
278
+ parameters: Parameters.GetContentsWithState,
279
+ callback?: Callback<T>,
280
+ ): Promise<void | T> {
281
+ const config: RequestConfig = {
282
+ url: `/api/space/${parameters.spaceKey}/state/content`,
283
+ method: 'GET',
284
+ params: {
285
+ 'state-id': parameters.stateId,
286
+ expand: parameters.expand,
287
+ limit: parameters.limit,
288
+ start: parameters.start,
289
+ },
290
+ };
291
+
292
+ return this.client.sendRequest(config, callback);
293
+ }
252
294
  }
@@ -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 ContentVersions {
@@ -12,6 +12,8 @@ export class ContentVersions {
12
12
  *
13
13
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
14
14
  * content is a blog post, 'View' permission for the space is required.
15
+ *
16
+ * @deprecated Will be removed in next major version.
15
17
  */
16
18
  async getContentVersions<T = Models.VersionArray>(
17
19
  parameters: Parameters.GetContentVersions,
@@ -22,6 +24,8 @@ export class ContentVersions {
22
24
  *
23
25
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
24
26
  * content is a blog post, 'View' permission for the space is required.
27
+ *
28
+ * @deprecated Will be removed in next major version.
25
29
  */
26
30
  async getContentVersions<T = Models.VersionArray>(
27
31
  parameters: Parameters.GetContentVersions,
@@ -88,6 +92,8 @@ export class ContentVersions {
88
92
  *
89
93
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
90
94
  * content is a blog post, 'View' permission for the space is required.
95
+ *
96
+ * @deprecated Will be removed in next major version.
91
97
  */
92
98
  async getContentVersion<T = Models.Version>(
93
99
  parameters: Parameters.GetContentVersion,
@@ -98,6 +104,8 @@ export class ContentVersions {
98
104
  *
99
105
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
100
106
  * content is a blog post, 'View' permission for the space is required.
107
+ *
108
+ * @deprecated Will be removed in next major version.
101
109
  */
102
110
  async getContentVersion<T = Models.Version>(parameters: Parameters.GetContentVersion, callback?: never): Promise<T>;
103
111
  async getContentVersion<T = Models.Version>(
@@ -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 ContentWatches {
@@ -1,6 +1,6 @@
1
1
  import type * as Parameters from './parameters';
2
- import type { Callback } from '../callback';
3
2
  import type { Client } from '../clients';
3
+ import type { Callback } from '../callback';
4
4
  import type { RequestConfig } from '../requestConfig';
5
5
 
6
6
  export class DynamicModules {
@@ -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 Experimental {
@@ -150,6 +150,8 @@ export class Experimental {
150
150
  *
151
151
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
152
152
  * ('Can use' global permission).
153
+ *
154
+ * @deprecated Will be removed in next major version. Use `userProperties.getUserProperties` instead.
153
155
  */
154
156
  async getUserProperties<T = Models.UserPropertyKeyArray>(
155
157
  parameters: Parameters.GetUserProperties,
@@ -162,6 +164,8 @@ export class Experimental {
162
164
  *
163
165
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
164
166
  * ('Can use' global permission).
167
+ *
168
+ * @deprecated Will be removed in next major version. Use `userProperties.getUserProperties` instead.
165
169
  */
166
170
  async getUserProperties<T = Models.UserPropertyKeyArray>(
167
171
  parameters: Parameters.GetUserProperties,
@@ -190,6 +194,8 @@ export class Experimental {
190
194
  *
191
195
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
192
196
  * ('Can use' global permission).
197
+ *
198
+ * @deprecated Will be removed in next major version. Use `userProperties.getUserProperty` instead.
193
199
  */
194
200
  async getUserProperty<T = Models.UserProperty>(
195
201
  parameters: Parameters.GetUserProperty,
@@ -202,6 +208,8 @@ export class Experimental {
202
208
  *
203
209
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
204
210
  * ('Can use' global permission).
211
+ *
212
+ * @deprecated Will be removed in next major version. Use `userProperties.getUserProperty` instead.
205
213
  */
206
214
  async getUserProperty<T = Models.UserProperty>(parameters: Parameters.GetUserProperty, callback?: never): Promise<T>;
207
215
  async getUserProperty<T = Models.UserProperty>(
@@ -224,6 +232,8 @@ export class Experimental {
224
232
  * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by
225
233
  * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access
226
234
  * the Confluence site ('Can use' global permission).
235
+ *
236
+ * @deprecated Will be removed in next major version. Use `userProperties.createUserProperty` instead.
227
237
  */
228
238
  async createUserProperty<T = unknown>(
229
239
  parameters: Parameters.CreateUserProperty,
@@ -237,6 +247,8 @@ export class Experimental {
237
247
  * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by
238
248
  * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access
239
249
  * the Confluence site ('Can use' global permission).
250
+ *
251
+ * @deprecated Will be removed in next major version. Use `userProperties.createUserProperty` instead.
240
252
  */
241
253
  async createUserProperty<T = unknown>(parameters: Parameters.CreateUserProperty, callback?: never): Promise<T>;
242
254
  async createUserProperty<T = unknown>(
@@ -262,6 +274,8 @@ export class Experimental {
262
274
  *
263
275
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
264
276
  * ('Can use' global permission).
277
+ *
278
+ * @deprecated Will be removed in next major version. Use `userProperties.updateUserProperty` instead.
265
279
  */
266
280
  async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback: Callback<T>): Promise<void>;
267
281
  /**
@@ -272,6 +286,8 @@ export class Experimental {
272
286
  *
273
287
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
274
288
  * ('Can use' global permission).
289
+ *
290
+ * @deprecated Will be removed in next major version. Use `userProperties.updateUserProperty` instead.
275
291
  */
276
292
  async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback?: never): Promise<T>;
277
293
  async updateUserProperty<T = void>(
@@ -296,6 +312,8 @@ export class Experimental {
296
312
  *
297
313
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
298
314
  * ('Can use' global permission).
315
+ *
316
+ * @deprecated Will be removed in next major version. Use `userProperties.deleteUserProperty` instead.
299
317
  */
300
318
  async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback: Callback<T>): Promise<void>;
301
319
  /**
@@ -305,6 +323,8 @@ export class Experimental {
305
323
  *
306
324
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
307
325
  * ('Can use' global permission).
326
+ *
327
+ * @deprecated Will be removed in next major version. Use `userProperties.deleteUserProperty` instead.
308
328
  */
309
329
  async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback?: never): Promise<T>;
310
330
  async deleteUserProperty<T = void>(