confluence.js 2.0.0-dev20250512202536 → 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
@@ -1 +1 @@
1
- {"version":3,"file":"contentChildrenAndDescendants.mjs","sources":["../../../../src/api/contentChildrenAndDescendants.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentChildrenAndDescendants {\n constructor(private client: Client) {}\n\n /**\n * Returns a map of the direct children of a piece of content. A piece of content has different types of child\n * content, depending on its type. These are the default parent-child content type relationships:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Apps can override these default relationships. Apps can also introduce new content types that create new\n * parent-child content relationships.\n *\n * Note, the map will always include all child content types that are valid for the content. However, if the content\n * has no instances of a child content type, the map will contain an empty array for that child content type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a map of the direct children of a piece of content. A piece of content has different types of child\n * content, depending on its type. These are the default parent-child content type relationships:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Apps can override these default relationships. Apps can also introduce new content types that create new\n * parent-child content relationships.\n *\n * Note, the map will always include all child content types that are valid for the content. However, if the content\n * has no instances of a child content type, the map will contain an empty array for that child content type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback?: never,\n ): Promise<T>;\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n parentVersion: parameters.parentVersion,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Move a page to a new location relative to a target page:\n *\n * - `before` - move the page under the same parent as the target, before the target in the list of children\n * - `after` - move the page under the same parent as the target, after the target in the list of children\n * - `append` - move the page to be a child of the target\n *\n * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI\n * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when\n * the `targetId` is a top-level page.\n */\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback: Callback<T>): Promise<void>;\n /**\n * Move a page to a new location relative to a target page:\n *\n * - `before` - move the page under the same parent as the target, before the target in the list of children\n * - `after` - move the page under the same parent as the target, after the target in the list of children\n * - `append` - move the page to be a child of the target\n *\n * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI\n * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when\n * the `targetId` is a top-level page.\n */\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback?: never): Promise<T>;\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.pageId}/move/${parameters.position}/${parameters.targetId}`,\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all children of a given type, for a piece of content. A piece of content has different types of child\n * content, depending on its type:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * Note, this method only returns direct children. To return children at all levels, use [Get descendants by\n * type](#api-content-id-descendant-type-get).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all children of a given type, for a piece of content. A piece of content has different types of child\n * content, depending on its type:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * Note, this method only returns direct children. To return children at all levels, use [Get descendants by\n * type](#api-content-id-descendant-type-get).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback?: never,\n ): Promise<T>;\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/${parameters.type}`,\n method: 'GET',\n params: {\n parentVersion: parameters.parentVersion,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a map of the descendants of a piece of content. This is similar to [Get content\n * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * The map will always include all descendant types that are valid for the content. However, if the content has no\n * instances of a descendant type, the map will contain an empty array for that descendant type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a map of the descendants of a piece of content. This is similar to [Get content\n * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * The map will always include all descendant types that are valid for the content. However, if the content has no\n * instances of a descendant type, the map will contain an empty array for that descendant type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback?: never,\n ): Promise<T>;\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/descendant`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by\n * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by\n * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback?: never,\n ): Promise<T>;\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/descendant/${parameters.type}`,\n method: 'GET',\n params: {\n depth: parameters.depth,\n start: parameters.start,\n limit: parameters.limit,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions\n * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this\n * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules\n * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the\n * copied page titles.\n */\n async copyPageHierarchy<T = Models.LongTask>(\n parameters: Parameters.CopyPageHierarchy,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions\n * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this\n * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules\n * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the\n * copied page titles.\n */\n async copyPageHierarchy<T = Models.LongTask>(parameters: Parameters.CopyPageHierarchy, callback?: never): Promise<T>;\n async copyPageHierarchy<T = Models.LongTask>(\n parameters: Parameters.CopyPageHierarchy,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/pagehierarchy/copy`,\n method: 'POST',\n data: {\n copyAttachments: parameters.copyAttachments,\n copyPermissions: parameters.copyPermissions,\n copyProperties: parameters.copyProperties,\n copyLabels: parameters.copyLabels,\n copyCustomContents: parameters.copyCustomContents,\n copyDescendants: parameters.copyDescendants,\n destinationPageId: parameters.destinationPageId,\n titleOptions: parameters.titleOptions,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path\n * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the\n * `destination` in the request body and can be one of the following types.\n *\n * - `space`: page will be copied to the specified space as a root page on the space\n * - `parent_page`: page will be copied as a child of the specified parent page\n * - `existing_page`: page will be copied and replace the specified page\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be copied in and permission to update the content if copying to an `existing_page`.\n */\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback: Callback<T>): Promise<void>;\n /**\n * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path\n * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the\n * `destination` in the request body and can be one of the following types.\n *\n * - `space`: page will be copied to the specified space as a root page on the space\n * - `parent_page`: page will be copied as a child of the specified parent page\n * - `existing_page`: page will be copied and replace the specified page\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be copied in and permission to update the content if copying to an `existing_page`.\n */\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback?: never): Promise<T>;\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/copy`,\n method: 'POST',\n params: {\n expand: parameters.expand,\n },\n data: parameters.bodyParameters,\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,6BAA6B,CAAA;AACpB,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA8C1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAQ,MAAA,CAAA;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,aAAa,EAAE,UAAU,CAAC,aAAa;AACxC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA2BlD,IAAA,MAAM,QAAQ,CAAsB,UAA+B,EAAE,QAAsB,EAAA;AACzF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,MAAM,CAAA,MAAA,EAAS,UAAU,CAAC,QAAQ,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAE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AM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentChildrenAndDescendants.mjs","sources":["../../../../src/api/contentChildrenAndDescendants.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentChildrenAndDescendants {\n constructor(private client: Client) {}\n\n /**\n * Returns a map of the direct children of a piece of content. A piece of content has different types of child\n * content, depending on its type. These are the default parent-child content type relationships:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Apps can override these default relationships. Apps can also introduce new content types that create new\n * parent-child content relationships.\n *\n * Note, the map will always include all child content types that are valid for the content. However, if the content\n * has no instances of a child content type, the map will contain an empty array for that child content type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a map of the direct children of a piece of content. A piece of content has different types of child\n * content, depending on its type. These are the default parent-child content type relationships:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Apps can override these default relationships. Apps can also introduce new content types that create new\n * parent-child content relationships.\n *\n * Note, the map will always include all child content types that are valid for the content. However, if the content\n * has no instances of a child content type, the map will contain an empty array for that child content type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback?: never,\n ): Promise<T>;\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n parentVersion: parameters.parentVersion,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Move a page to a new location relative to a target page:\n *\n * - `before` - move the page under the same parent as the target, before the target in the list of children\n * - `after` - move the page under the same parent as the target, after the target in the list of children\n * - `append` - move the page to be a child of the target\n *\n * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI\n * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when\n * the `targetId` is a top-level page.\n */\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback: Callback<T>): Promise<void>;\n /**\n * Move a page to a new location relative to a target page:\n *\n * - `before` - move the page under the same parent as the target, before the target in the list of children\n * - `after` - move the page under the same parent as the target, after the target in the list of children\n * - `append` - move the page to be a child of the target\n *\n * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI\n * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when\n * the `targetId` is a top-level page.\n */\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback?: never): Promise<T>;\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.pageId}/move/${parameters.position}/${parameters.targetId}`,\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all children of a given type, for a piece of content. A piece of content has different types of child\n * content, depending on its type:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * Note, this method only returns direct children. To return children at all levels, use [Get descendants by\n * type](#api-content-id-descendant-type-get).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all children of a given type, for a piece of content. A piece of content has different types of child\n * content, depending on its type:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * Note, this method only returns direct children. To return children at all levels, use [Get descendants by\n * type](#api-content-id-descendant-type-get).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback?: never,\n ): Promise<T>;\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/${parameters.type}`,\n method: 'GET',\n params: {\n parentVersion: parameters.parentVersion,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a map of the descendants of a piece of content. This is similar to [Get content\n * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * The map will always include all descendant types that are valid for the content. However, if the content has no\n * instances of a descendant type, the map will contain an empty array for that descendant type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a map of the descendants of a piece of content. This is similar to [Get content\n * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * The map will always include all descendant types that are valid for the content. However, if the content has no\n * instances of a descendant type, the map will contain an empty array for that descendant type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback?: never,\n ): Promise<T>;\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/descendant`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by\n * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the\n * query limit parameter will be restricted to a maximum value of 25.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by\n * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the\n * query limit parameter will be restricted to a maximum value of 25.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback?: never,\n ): Promise<T>;\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/descendant/${parameters.type}`,\n method: 'GET',\n params: {\n depth: parameters.depth,\n start: parameters.start,\n limit: parameters.limit,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions\n * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this\n * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules\n * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the\n * copied page titles.\n */\n async copyPageHierarchy<T = Models.LongTask>(\n parameters: Parameters.CopyPageHierarchy,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions\n * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this\n * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules\n * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the\n * copied page titles.\n */\n async copyPageHierarchy<T = Models.LongTask>(parameters: Parameters.CopyPageHierarchy, callback?: never): Promise<T>;\n async copyPageHierarchy<T = Models.LongTask>(\n parameters: Parameters.CopyPageHierarchy,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/pagehierarchy/copy`,\n method: 'POST',\n data: {\n copyAttachments: parameters.copyAttachments,\n copyPermissions: parameters.copyPermissions,\n copyProperties: parameters.copyProperties,\n copyLabels: parameters.copyLabels,\n copyCustomContents: parameters.copyCustomContents,\n copyDescendants: parameters.copyDescendants,\n destinationPageId: parameters.destinationPageId,\n titleOptions: parameters.titleOptions,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path\n * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the\n * `destination` in the request body and can be one of the following types.\n *\n * - `space`: page will be copied to the specified space as a root page on the space\n * - `parent_page`: page will be copied as a child of the specified parent page\n * - `parent_content`: page will be copied as a child of the specified parent content\n * - `existing_page`: page will be copied and replace the specified page\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be copied in and permission to update the content if copying to an `existing_page`.\n */\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback: Callback<T>): Promise<void>;\n /**\n * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path\n * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the\n * `destination` in the request body and can be one of the following types.\n *\n * - `space`: page will be copied to the specified space as a root page on the space\n * - `parent_page`: page will be copied as a child of the specified parent page\n * - `parent_content`: page will be copied as a child of the specified parent content\n * - `existing_page`: page will be copied and replace the specified page\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be copied in and permission to update the content if copying to an `existing_page`.\n */\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback?: never): Promise<T>;\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/copy`,\n method: 'POST',\n params: {\n expand: parameters.expand,\n },\n data: parameters.bodyParameters,\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,6BAA6B,CAAA;AACpB,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAkDrC,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,MAAA,CAAQ;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA0BA,IAAA,MAAM,QAAQ,CAAsB,UAA+B,EAAE,QAAsB,EAAA;AACzF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,MAAM,CAAA,MAAA,EAAS,UAAU,CAAC,QAAQ,CAAA,CAAA,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAE;AAC3F,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,OAAO,EAAE;AACP,gBAAA,cAAc,EAAE,kBAAkB;AACnC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgDA,IAAA,MAAM,wBAAwB,CAC5B,UAA+C,EAC/C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM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iB,CACrB,UAAwC,EACxC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,mBAAA,CAAqB;AACvD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,eAAe,EAAE,UAAU,CAAC,eAAe;gBAC3C,eAAe,EAAE,UAAU,CAAC,eAAe;gBAC3C,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;gBACjD,eAAe,EAAE,UAAU,CAAC,eAAe;gBAC3C,iBAAiB,EAAE,UAAU,CAAC,iBAAiB;gBAC/C,YAAY,EAAE,UAAU,CAAC,YAAY;AACtC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAkCA,IAAA,MAAM,QAAQ,CAAc,UAA+B,EAAE,QAAsB,EAAA;AACjF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,KAAA,CAAO;AACzC,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;YACD,IAAI,EAAE,UAAU,CAAC,cAAc;SAChC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be removed in next major version. */
1
2
  class ContentComments {
2
3
  client;
3
4
  constructor(client) {
@@ -1 +1 @@
1
- {"version":3,"file":"contentComments.mjs","sources":["../../../../src/api/contentComments.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentComments {\n constructor(private client: Client) {}\n\n /**\n * Returns the comments on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the comments on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback?: never,\n ): Promise<T>;\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/comment`,\n method: 'GET',\n params: {\n parentVersion: parameters.parentVersion,\n start: parameters.start,\n limit: parameters.limit,\n location: parameters.location,\n depth: parameters.depth,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,eAAe,CAAA;AACN,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsB1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAgB,cAAA,CAAA;AAClD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentComments.mjs","sources":["../../../../src/api/contentComments.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\n/** @deprecated Will be removed in next major version. */\nexport class ContentComments {\n constructor(private client: Client) {}\n\n /**\n * Returns the comments on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the comments on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback?: never,\n ): Promise<T>;\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/comment`,\n method: 'GET',\n params: {\n parentVersion: parameters.parentVersion,\n start: parameters.start,\n limit: parameters.limit,\n location: parameters.location,\n depth: parameters.depth,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"AAMA;MACa,eAAe,CAAA;AACN,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA0BrC,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,cAAA,CAAgB;AAClD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"contentLabels.mjs","sources":["../../../../src/api/contentLabels.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentLabels {\n constructor(private client: Client) {}\n\n /**\n * Returns the labels on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and\n * permission to view the content if it is a page.\n */\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the labels on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and\n * permission to view the content if it is a page.\n */\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback?: never,\n ): Promise<T>;\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'GET',\n params: {\n prefix: parameters.prefix,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds labels to a piece of content. Does not modify the existing labels.\n *\n * Notes:\n *\n * - Labels can also be added when creating content ([Create content](#api-content-post)).\n * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing\n * labels and replace them with the labels in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds labels to a piece of content. Does not modify the existing labels.\n *\n * Notes:\n *\n * - Labels can also be added when creating content ([Create content](#api-content-post)).\n * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing\n * labels and replace them with the labels in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback?: never,\n ): Promise<T>;\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'POST',\n params: {\n 'use-400-error-response': parameters['use-400-error-response'],\n },\n data: parameters.body,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from\n * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter.\n *\n * Use this method if the label name has \"/\" characters, as [Remove label from content using query\n * parameter](#api-content-id-label-delete) does not accept \"/\" characters for the label name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from\n * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter.\n *\n * Use this method if the label name has \"/\" characters, as [Remove label from content using query\n * parameter](#api-content-id-label-delete) does not accept \"/\" characters for the label name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback?: never,\n ): Promise<T>;\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'DELETE',\n params: {\n name: parameters.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from content using query\n * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter.\n *\n * Use this method if the label name does not have \"/\" characters, as the path parameter does not accept \"/\"\n * characters for security reasons. Otherwise, use [Remove label from content using query\n * parameter](#api-content-id-label-delete).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContent<T = void>(\n parameters: Parameters.RemoveLabelFromContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from content using query\n * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter.\n *\n * Use this method if the label name does not have \"/\" characters, as the path parameter does not accept \"/\"\n * characters for security reasons. Otherwise, use [Remove label from content using query\n * parameter](#api-content-id-label-delete).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContent<T = void>(parameters: Parameters.RemoveLabelFromContent, callback?: never): Promise<T>;\n async removeLabelFromContent<T = void>(\n parameters: Parameters.RemoveLabelFromContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label/${par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Q;AAChB,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,UAAU,CAAC,IAAI;AACtB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA4BlD,IAAA,MAAM,sBAAsB,CAC1B,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAU,OAAA,EAAA,UAAU,CAAC,KAAK,CAAE,CAAA;AAC9D,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentLabels.mjs","sources":["../../../../src/api/contentLabels.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentLabels {\n constructor(private client: Client) {}\n\n /**\n * Returns the labels on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the labels on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback?: never,\n ): Promise<T>;\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'GET',\n params: {\n prefix: parameters.prefix,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds labels to a piece of content. Does not modify the existing labels.\n *\n * Notes:\n *\n * - Labels can also be added when creating content ([Create content](#api-content-post)).\n * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing\n * labels and replace them with the labels in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds labels to a piece of content. Does not modify the existing labels.\n *\n * Notes:\n *\n * - Labels can also be added when creating content ([Create content](#api-content-post)).\n * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing\n * labels and replace them with the labels in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback?: never,\n ): Promise<T>;\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'POST',\n params: {\n 'use-400-error-response': parameters['use-400-error-response'],\n },\n data: parameters.body,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove\n * label from content](#api-content-id-label-label-delete) except that the label name is specified via a query\n * parameter.\n *\n * Use this method if the label name has \"/\" characters, as [Remove label from content using query\n * parameter](#api-content-id-label-delete) does not accept \"/\" characters for the label name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove\n * label from content](#api-content-id-label-label-delete) except that the label name is specified via a query\n * parameter.\n *\n * Use this method if the label name has \"/\" characters, as [Remove label from content using query\n * parameter](#api-content-id-label-delete) does not accept \"/\" characters for the label name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback?: never,\n ): Promise<T>;\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'DELETE',\n params: {\n name: parameters.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove\n * label from content using query parameter](#api-content-id-label-delete) except that the label name is specified via\n * a path parameter.\n *\n * Use this method if the label name does not have \"/\" characters, as the path parameter does not accept \"/\"\n * characters for security reasons. Otherwise, use [Remove label from content using query\n * parameter](#api-content-id-label-delete).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContent<T = void>(\n parameters: Parameters.RemoveLabelFromContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove\n * label from content using query parameter](#api-content-id-label-delete) except that the label name is specified via\n * a path parameter.\n *\n * Use this method if the label name does not have \"/\" characters, as the path parameter does not accept \"/\"\n * characters for security reasons. Otherwise, use [Remove label from content using query\n * parameter](#api-content-id-label-delete).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContent<T = void>(parameters: Parameters.RemoveLabelFromContent, callback?: never): Promise<T>;\n async removeLabelFromContent<T = void>(\n parameters: Parameters.RemoveLabelFromContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label/${parameters.label}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,aAAa,CAAA;AACJ,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA0BrC,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,MAAA,CAAQ;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgCA,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,MAAA,CAAQ;AAC1C,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,MAAM,EAAE;AACN,gBAAA,wBAAwB,EAAE,UAAU,CAAC,wBAAwB,CAAC;AAC/D,aAAA;YACD,IAAI,EAAE,UAAU,CAAC,IAAI;SACtB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA8BA,IAAA,MAAM,yCAAyC,CAC7C,UAAgE,EAChE,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,MAAA,CAAQ;AAC1C,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,UAAU,CAAC,IAAI;AACtB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA6BA,IAAA,MAAM,sBAAsB,CAC1B,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAA,OAAA,EAAU,UAAU,CAAC,KAAK,CAAA,CAAE;AAC9D,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"contentMacroBody.mjs","sources":["../../../../src/api/contentMacroBody.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentMacroBody {\n constructor(private client: Client) {}\n\n /**\n * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of\n * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of\n * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the\n * name of the macro, the body of the macro, and any macro parameters.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the\n * name of the macro, the body of the macro, and any macro parameters.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/${parameters.to}`,\n method: 'GET',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The\n * result will be available for 5 minutes after completion of the conversion.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only\n * modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The\n * result will be available for 5 minutes after completion of the conversion.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only\n * modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/async/${parameters.to}`,\n method: 'GET',\n params: {\n allowCache: parameters.allowCache,\n spaceKeyContext: parameters.spaceKeyContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,gBAAgB,CAAA;AACP,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA0C1B,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,eAAe;gBAC3C,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentMacroBody.mjs","sources":["../../../../src/api/contentMacroBody.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentMacroBody {\n constructor(private client: Client) {}\n\n /**\n * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of\n * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * For Forge macros, the value for macro ID is the \"local ID\" of that particular ADF node. This value can be retrieved\n * either client-side by calling view.getContext() and accessing \"localId\" on the resulting object, or server-side by\n * examining the \"local-id\" parameter node inside the \"parameters\" node.\n *\n * Note that there are other attributes named \"local-id\", but only this particular one is used to store the macro ID.\n *\n * Example: <ac:adf-node type=\"extension\"> <ac:adf-attribute\n * key=\"extension-type\">com.atlassian.ecosystem</ac:adf-attribute> <ac:adf-attribute key=\"parameters\">\n * <ac:adf-parameter key=\"local-id\">e9c4aa10-73fa-417c-888d-48c719ae4165</ac:adf-parameter> </ac:adf-parameter>\n * </ac:adf-node>\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of\n * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * For Forge macros, the value for macro ID is the \"local ID\" of that particular ADF node. This value can be retrieved\n * either client-side by calling view.getContext() and accessing \"localId\" on the resulting object, or server-side by\n * examining the \"local-id\" parameter node inside the \"parameters\" node.\n *\n * Note that there are other attributes named \"local-id\", but only this particular one is used to store the macro ID.\n *\n * Example: <ac:adf-node type=\"extension\"> <ac:adf-attribute\n * key=\"extension-type\">com.atlassian.ecosystem</ac:adf-attribute> <ac:adf-attribute key=\"parameters\">\n * <ac:adf-parameter key=\"local-id\">e9c4aa10-73fa-417c-888d-48c719ae4165</ac:adf-parameter> </ac:adf-parameter>\n * </ac:adf-node>\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the\n * name of the macro, the body of the macro, and any macro parameters.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * For Forge macros, the value for macro ID is the \"local ID\" of that particular ADF node. This value can be retrieved\n * either client-side by calling view.getContext() and accessing \"localId\" on the resulting object, or server-side by\n * examining the \"local-id\" parameter node inside the \"parameters\" node.\n *\n * Note that there are other attributes named \"local-id\", but only this particular one is used to store the macro ID.\n *\n * Example: <ac:adf-node type=\"extension\"> <ac:adf-attribute\n * key=\"extension-type\">com.atlassian.ecosystem</ac:adf-attribute> <ac:adf-attribute key=\"parameters\">\n * <ac:adf-parameter key=\"local-id\">e9c4aa10-73fa-417c-888d-48c719ae4165</ac:adf-parameter> </ac:adf-parameter>\n * </ac:adf-node>\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the\n * name of the macro, the body of the macro, and any macro parameters.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * For Forge macros, the value for macro ID is the \"local ID\" of that particular ADF node. This value can be retrieved\n * either client-side by calling view.getContext() and accessing \"localId\" on the resulting object, or server-side by\n * examining the \"local-id\" parameter node inside the \"parameters\" node.\n *\n * Note that there are other attributes named \"local-id\", but only this particular one is used to store the macro ID.\n *\n * Example: <ac:adf-node type=\"extension\"> <ac:adf-attribute\n * key=\"extension-type\">com.atlassian.ecosystem</ac:adf-attribute> <ac:adf-attribute key=\"parameters\">\n * <ac:adf-parameter key=\"local-id\">e9c4aa10-73fa-417c-888d-48c719ae4165</ac:adf-parameter> </ac:adf-parameter>\n * </ac:adf-node>\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/${parameters.to}`,\n method: 'GET',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The\n * result will be available for 5 minutes after completion of the conversion.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only\n * modified by Confluence if there are conflicting IDs.\n *\n * For Forge macros, the value for macro ID is the \"local ID\" of that particular ADF node. This value can be retrieved\n * either client-side by calling view.getContext() and accessing \"localId\" on the resulting object, or server-side by\n * examining the \"local-id\" parameter node inside the \"parameters\" node.\n *\n * Note that there are other attributes named \"local-id\", but only this particular one is used to store the macro ID.\n *\n * Example: <ac:adf-node type=\"extension\"> <ac:adf-attribute\n * key=\"extension-type\">com.atlassian.ecosystem</ac:adf-attribute> <ac:adf-attribute key=\"parameters\">\n * <ac:adf-parameter key=\"local-id\">e9c4aa10-73fa-417c-888d-48c719ae4165</ac:adf-parameter> </ac:adf-parameter>\n * </ac:adf-node>\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The\n * result will be available for 5 minutes after completion of the conversion.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only\n * modified by Confluence if there are conflicting IDs.\n *\n * For Forge macros, the value for macro ID is the \"local ID\" of that particular ADF node. This value can be retrieved\n * either client-side by calling view.getContext() and accessing \"localId\" on the resulting object, or server-side by\n * examining the \"local-id\" parameter node inside the \"parameters\" node.\n *\n * Note that there are other attributes named \"local-id\", but only this particular one is used to store the macro ID.\n *\n * Example: <ac:adf-node type=\"extension\"> <ac:adf-attribute\n * key=\"extension-type\">com.atlassian.ecosystem</ac:adf-attribute> <ac:adf-attribute key=\"parameters\">\n * <ac:adf-parameter key=\"local-id\">e9c4aa10-73fa-417c-888d-48c719ae4165</ac:adf-parameter> </ac:adf-parameter>\n * </ac:adf-node>\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/async/${parameters.to}`,\n method: 'GET',\n params: {\n allowCache: parameters.allowCache,\n spaceKeyContext: parameters.spaceKeyContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,gBAAgB,CAAA;AACP,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAoErC,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,SAAA,EAAY,UAAU,CAAC,OAAO,CAAA,UAAA,EAAa,UAAU,CAAC,OAAO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- {"version":3,"file":"contentPermissions.mjs","sources":["../../../../src/api/contentPermissions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentPermissions {\n constructor(private client: Client) {}\n\n /**\n * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be\n * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions\n * against a specified user or group. The following permission checks are done to make sure that the user or group has\n * the proper access:\n *\n * - Site permissions\n * - Space permissions\n * - Content restrictions\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global\n * permission is required.\n */\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be\n * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions\n * against a specified user or group. The following permission checks are done to make sure that the user or group has\n * the proper access:\n *\n * - Site permissions\n * - Space permissions\n * - Content restrictions\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global\n * permission is required.\n */\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback?: never,\n ): Promise<T>;\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/permission/check`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operation: parameters.operation,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,kBAAkB,CAAA;AACT,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsC1B,IAAA,MAAM,sBAAsB,CAC1B,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAmB,iBAAA,CAAA;AACrD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentPermissions.mjs","sources":["../../../../src/api/contentPermissions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentPermissions {\n constructor(private client: Client) {}\n\n /**\n * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be\n * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions\n * against a specified user or group. The following permission checks are done to make sure that the user or group has\n * the proper access:\n *\n * - Site permissions\n * - Space permissions\n * - Content restrictions\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global\n * permission is required.\n */\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be\n * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions\n * against a specified user or group. The following permission checks are done to make sure that the user or group has\n * the proper access:\n *\n * - Site permissions\n * - Space permissions\n * - Content restrictions\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global\n * permission is required.\n */\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback?: never,\n ): Promise<T>;\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/permission/check`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operation: parameters.operation,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,kBAAkB,CAAA;AACT,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAsCrC,IAAA,MAAM,sBAAsB,CAC1B,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,iBAAA,CAAmB;AACrD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1,3 +1,4 @@
1
+ /** @deprecated Will be removed in next major version. */
1
2
  class ContentProperties {
2
3
  client;
3
4
  constructor(client) {
@@ -1 +1 @@
1
- {"version":3,"file":"contentProperties.mjs","sources":["../../../../src/api/contentProperties.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentProperties {\n constructor(private client: Client) {}\n\n /**\n * Returns the properties for a piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the properties for a piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback?: never,\n ): Promise<T>;\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property`,\n method: 'GET',\n params: {\n key: parameters.key,\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is\n * specified in the request body instead of as a path parameter.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is\n * specified in the request body instead of as a path parameter.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback?: never,\n ): Promise<T>;\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property`,\n method: 'POST',\n data: {\n key: parameters.key,\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a content property for a piece of content. For more information, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a content property for a piece of content. For more information, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback?: never,\n ): Promise<T>;\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a\n * path parameter instead of in the request body.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a\n * path parameter instead of in the request body.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback?: never,\n ): Promise<T>;\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'POST',\n data: {\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates an existing content property. This method will also create a new property for a piece of content, if the\n * property key does not exist and the property version is 1. For more information about content properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates an existing content property. This method will also create a new property for a piece of content, if the\n * property key does not exist and the property version is 1. For more information about content properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback?: never,\n ): Promise<T>;\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'PUT',\n data: {\n value: parameters.value,\n version: parameters.version,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a content property. For more information about content properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async deleteContentProperty<T = void>(\n parameters: Parameters.DeleteContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Deletes a content property. For more information about content properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async deleteContentProperty<T = void>(parameters: Parameters.DeleteContentProperty, callback?: never): Promise<T>;\n async deleteContentProperty<T = void>(\n parameters: Parameters.DeleteContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,iBAAiB,CAAA;AACR,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAwB1B,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAW,SAAA,CAAA;AAC7C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gB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AI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAyBlD,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AAC/D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,OAAO,EAAE,UAAU,CAAC,OAAO;AAC5B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAoBlD,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AAC/D,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentProperties.mjs","sources":["../../../../src/api/contentProperties.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\n/** @deprecated Will be removed in next major version. */\nexport class ContentProperties {\n constructor(private client: Client) {}\n\n /**\n * Returns the properties for a piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the properties for a piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback?: never,\n ): Promise<T>;\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property`,\n method: 'GET',\n params: {\n key: parameters.key,\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is\n * specified in the request body instead of as a path parameter.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is\n * specified in the request body instead of as a path parameter.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback?: never,\n ): Promise<T>;\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property`,\n method: 'POST',\n data: {\n key: parameters.key,\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a content property for a piece of content. For more information, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a content property for a piece of content. For more information, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback?: never,\n ): Promise<T>;\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a\n * path parameter instead of in the request body.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a\n * path parameter instead of in the request body.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback?: never,\n ): Promise<T>;\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'POST',\n data: {\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates an existing content property. This method will also create a new property for a piece of content, if the\n * property key does not exist and the property version is 1. For more information about content properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates an existing content property. This method will also create a new property for a piece of content, if the\n * property key does not exist and the property version is 1. For more information about content properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback?: never,\n ): Promise<T>;\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'PUT',\n data: {\n value: parameters.value,\n version: parameters.version,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a content property. For more information about content properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async deleteContentProperty<T = void>(\n parameters: Parameters.DeleteContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Deletes a content property. For more information about content properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async deleteContentProperty<T = void>(parameters: Parameters.DeleteContentProperty, callback?: never): Promise<T>;\n async deleteContentProperty<T = void>(\n parameters: Parameters.DeleteContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"AAMA;MACa,iBAAiB,CAAA;AACR,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA4BrC,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5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AsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AAC/D,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA4BA,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AAC/D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,OAAO,EAAE,UAAU,CAAC,OAAO;AAC5B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAuBA,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AAC/D,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"contentRestrictions.mjs","sources":["../../../../src/api/contentRestrictions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentRestrictions {\n constructor(private client: Client) {}\n\n /**\n * Returns the restrictions on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.GetRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the restrictions on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.GetRestrictions,\n callback?: never,\n ): Promise<T>;\n async getRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.GetRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.AddRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.AddRestrictions,\n callback?: never,\n ): Promise<T>;\n async addRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.AddRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'POST',\n params: {\n expand: parameters.expand,\n },\n data: parameters.body,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the\n * restrictions in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async updateRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.UpdateRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the\n * restrictions in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async updateRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.UpdateRestrictions,\n callback?: never,\n ): Promise<T>;\n async updateRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.UpdateRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'PUT',\n params: {\n expand: parameters.expand,\n },\n data: parameters.body,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes all restrictions (read and update) on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async deleteRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.DeleteRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes all restrictions (read and update) on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async deleteRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.DeleteRestrictions,\n callback?: never,\n ): Promise<T>;\n async deleteRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.DeleteRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'DELETE',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns restrictions on a piece of content by operation. This method is similar to [Get\n * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object,\n * rather than items in a results array.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsByOperation<T = Models.GetRestrictionsByOperation>(\n parameters: Parameters.GetRestrictionsByOperation,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns restrictions on a piece of content by operation. This method is similar to [Get\n * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object,\n * rather than items in a results array.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsByOperation<T = Models.GetRestrictionsByOperation>(\n parameters: Parameters.GetRestrictionsByOperation,\n callback?: never,\n ): Promise<T>;\n async getRestrictionsByOperation<T = Models.GetRestrictionsByOperation>(\n parameters: Parameters.GetRestrictionsByOperation,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the restictions on a piece of content for a given operation (read or update).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsForOperation<T = Models.ContentRestriction>(\n parameters: Parameters.GetRestrictionsForOperation,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the restictions on a piece of content for a given operation (read or update).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsForOperation<T = Models.ContentRestriction>(\n parameters: Parameters.GetRestrictionsForOperation,\n callback?: never,\n ): Promise<T>;\n async getRestrictionsForOperation<T = Models.ContentRestriction>(\n parameters: Parameters.GetRestrictionsForOperation,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `admins` group, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentRestrictionStatusForGroup<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForGroup,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `admins` group, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/group/admins`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentRestrictionStatusForGroup<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForGroup,\n callback?: never,\n ): Promise<T>;\n async getContentRestrictionStatusForGroup<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForGroup,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addGroupToContentRestriction<T = unknown>(\n parameters: Parameters.AddGroupToContentRestriction,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addGroupToContentRestriction<T = unknown>(\n parameters: Parameters.AddGroupToContentRestriction,\n callback?: never,\n ): Promise<T>;\n async addGroupToContentRestriction<T = unknown>(\n parameters: Parameters.AddGroupToContentRestriction,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`,\n method: 'PUT',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeGroupByName<T = unknown>(parameters: Parameters.RemoveGroupByName, callback: Callback<T>): Promise<void>;\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeGroupByName<T = unknown>(parameters: Parameters.RemoveGroupByName, callback?: never): Promise<T>;\n async removeGroupByName<T = unknown>(\n parameters: Parameters.RemoveGroupByName,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `123456` group id, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/byGroupId/123456`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getIndividualGroupRestrictionStatusByGroupId<T = unknown>(\n parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `123456` group id, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/byGroupId/123456`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getIndividualGroupRestrictionStatusByGroupId<T = unknown>(\n parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId,\n callback?: never,\n ): Promise<T>;\n async getIndividualGroupRestrictionStatusByGroupId<T = unknown>(\n parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a\n * piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addGroupToContentRestrictionByGroupId<T = unknown>(\n parameters: Parameters.AddGroupToContentRestrictionByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a\n * piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addGroupToContentRestrictionByGroupId<T = unknown>(\n parameters: Parameters.AddGroupToContentRestrictionByGroupId,\n callback?: never,\n ): Promise<T>;\n async addGroupToContentRestrictionByGroupId<T = unknown>(\n parameters: Parameters.AddGroupToContentRestrictionByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`,\n method: 'PUT',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeGroupById<T = unknown>(parameters: Parameters.RemoveGroupById, callback: Callback<T>): Promise<void>;\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeGroupById<T = unknown>(parameters: Parameters.RemoveGroupById, callback?: never): Promise<T>;\n async removeGroupById<T = unknown>(\n parameters: Parameters.RemoveGroupById,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a\n * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following\n * request will return `true`:\n *\n * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`\n *\n * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentRestrictionStatusForUser<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForUser,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a\n * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following\n * request will return `true`:\n *\n * `https://your-domain.atlassian.net/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`\n *\n * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentRestrictionStatusForUser<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForUser,\n callback?: never,\n ): Promise<T>;\n async getContentRestrictionStatusForUser<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`,\n method: 'GET',\n params: {\n key: parameters.key,\n userName: parameters.userName,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addUserToContentRestriction<T = unknown>(\n parameters: Parameters.AddUserToContentRestriction,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addUserToContentRestriction<T = unknown>(\n parameters: Parameters.AddUserToContentRestriction,\n callback?: never,\n ): Promise<T>;\n async addUserToContentRestriction<T = unknown>(\n parameters: Parameters.AddUserToContentRestriction,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`,\n method: 'PUT',\n params: {\n key: parameters.key,\n userName: parameters.userName,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeUserFromContentRestriction<T = unknown>(\n parameters: Parameters.RemoveUserFromContentRestriction,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeUserFromContentRestriction<T = unknown>(\n parameters: Parameters.RemoveUserFromContentRestriction,\n callback?: never,\n ): Promise<T>;\n async removeUserFromContentRestriction<T = unknown>(\n parameters: Parameters.RemoveUserFromContentRestriction,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`,\n method: 'DELETE',\n params: {\n key: parameters.key,\n userName: parameters.userName,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,mBAAmB,CAAA;AACV,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAoB1B,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAc,YAAA,CAAA;AAChD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SAC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,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuBlD,IAAA,MAAM,gCAAgC,CACpC,UAAuD,EACvD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAA4B,yBAAA,EAAA,UAAU,CAAC,YAAY,CAAO,KAAA,CAAA;AAC5F,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentRestrictions.mjs","sources":["../../../../src/api/contentRestrictions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentRestrictions {\n constructor(private client: Client) {}\n\n /**\n * Returns the restrictions on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.GetRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the restrictions on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.GetRestrictions,\n callback?: never,\n ): Promise<T>;\n async getRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.GetRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.AddRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.AddRestrictions,\n callback?: never,\n ): Promise<T>;\n async addRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.AddRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'POST',\n params: {\n expand: parameters.expand,\n },\n data: parameters.body,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the\n * restrictions in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async updateRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.UpdateRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the\n * restrictions in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async updateRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.UpdateRestrictions,\n callback?: never,\n ): Promise<T>;\n async updateRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.UpdateRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'PUT',\n params: {\n expand: parameters.expand,\n },\n data: parameters.body,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes all restrictions (read and update) on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async deleteRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.DeleteRestrictions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes all restrictions (read and update) on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async deleteRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.DeleteRestrictions,\n callback?: never,\n ): Promise<T>;\n async deleteRestrictions<T = Models.ContentRestrictionArray>(\n parameters: Parameters.DeleteRestrictions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction`,\n method: 'DELETE',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns restrictions on a piece of content by operation. This method is similar to [Get\n * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object,\n * rather than items in a results array.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsByOperation<T = Models.GetRestrictionsByOperation>(\n parameters: Parameters.GetRestrictionsByOperation,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns restrictions on a piece of content by operation. This method is similar to [Get\n * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object,\n * rather than items in a results array.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsByOperation<T = Models.GetRestrictionsByOperation>(\n parameters: Parameters.GetRestrictionsByOperation,\n callback?: never,\n ): Promise<T>;\n async getRestrictionsByOperation<T = Models.GetRestrictionsByOperation>(\n parameters: Parameters.GetRestrictionsByOperation,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the restictions on a piece of content for a given operation (read or update).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsForOperation<T = Models.ContentRestriction>(\n parameters: Parameters.GetRestrictionsForOperation,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the restictions on a piece of content for a given operation (read or update).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getRestrictionsForOperation<T = Models.ContentRestriction>(\n parameters: Parameters.GetRestrictionsForOperation,\n callback?: never,\n ): Promise<T>;\n async getRestrictionsForOperation<T = Models.ContentRestriction>(\n parameters: Parameters.GetRestrictionsForOperation,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `admins` group, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/group/admins`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentRestrictionStatusForGroup<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForGroup,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `admins` group, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/group/admins`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentRestrictionStatusForGroup<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForGroup,\n callback?: never,\n ): Promise<T>;\n async getContentRestrictionStatusForGroup<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForGroup,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async addGroupToContentRestriction<T = unknown>(\n parameters: Parameters.AddGroupToContentRestriction,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async addGroupToContentRestriction<T = unknown>(\n parameters: Parameters.AddGroupToContentRestriction,\n callback?: never,\n ): Promise<T>;\n async addGroupToContentRestriction<T = unknown>(\n parameters: Parameters.AddGroupToContentRestriction,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`,\n method: 'PUT',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async removeGroupByName<T = unknown>(parameters: Parameters.RemoveGroupByName, callback: Callback<T>): Promise<void>;\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async removeGroupByName<T = unknown>(parameters: Parameters.RemoveGroupByName, callback?: never): Promise<T>;\n async removeGroupByName<T = unknown>(\n parameters: Parameters.RemoveGroupByName,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `123456` group id, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/byGroupId/123456`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getIndividualGroupRestrictionStatusByGroupId<T = unknown>(\n parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a\n * `read` restriction for the `123456` group id, the following request will return `true`:\n *\n * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/byGroupId/123456`\n *\n * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getIndividualGroupRestrictionStatusByGroupId<T = unknown>(\n parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId,\n callback?: never,\n ): Promise<T>;\n async getIndividualGroupRestrictionStatusByGroupId<T = unknown>(\n parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a\n * piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addGroupToContentRestrictionByGroupId<T = unknown>(\n parameters: Parameters.AddGroupToContentRestrictionByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a\n * piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addGroupToContentRestrictionByGroupId<T = unknown>(\n parameters: Parameters.AddGroupToContentRestrictionByGroupId,\n callback?: never,\n ): Promise<T>;\n async addGroupToContentRestrictionByGroupId<T = unknown>(\n parameters: Parameters.AddGroupToContentRestrictionByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`,\n method: 'PUT',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeGroupById<T = unknown>(parameters: Parameters.RemoveGroupById, callback: Callback<T>): Promise<void>;\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeGroupById<T = unknown>(parameters: Parameters.RemoveGroupById, callback?: never): Promise<T>;\n async removeGroupById<T = unknown>(\n parameters: Parameters.RemoveGroupById,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a\n * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following\n * request will return `true`:\n *\n * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`\n *\n * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentRestrictionStatusForUser<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForUser,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a\n * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following\n * request will return `true`:\n *\n * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`\n *\n * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for\n * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence\n * permissions](https://confluence.atlassian.com/x/_AozKw).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentRestrictionStatusForUser<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForUser,\n callback?: never,\n ): Promise<T>;\n async getContentRestrictionStatusForUser<T = unknown>(\n parameters: Parameters.GetContentRestrictionStatusForUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`,\n method: 'GET',\n params: {\n key: parameters.key,\n userName: parameters.userName,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addUserToContentRestriction<T = unknown>(\n parameters: Parameters.AddUserToContentRestriction,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async addUserToContentRestriction<T = unknown>(\n parameters: Parameters.AddUserToContentRestriction,\n callback?: never,\n ): Promise<T>;\n async addUserToContentRestriction<T = unknown>(\n parameters: Parameters.AddUserToContentRestriction,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`,\n method: 'PUT',\n params: {\n key: parameters.key,\n userName: parameters.userName,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeUserFromContentRestriction<T = unknown>(\n parameters: Parameters.RemoveUserFromContentRestriction,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of\n * content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeUserFromContentRestriction<T = unknown>(\n parameters: Parameters.RemoveUserFromContentRestriction,\n callback?: never,\n ): Promise<T>;\n async removeUserFromContentRestriction<T = unknown>(\n parameters: Parameters.RemoveUserFromContentRestriction,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`,\n method: 'DELETE',\n params: {\n key: parameters.key,\n userName: parameters.userName,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,mBAAmB,CAAA;AACV,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAoBrC,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,YAAA,CAAc;AAChD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAoBA,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,YAAA,CAAc;AAChD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;YACD,IAAI,EAAE,UAAU,CA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EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -66,6 +66,19 @@ class ContentStates {
66
66
  };
67
67
  return this.client.sendRequest(config, callback);
68
68
  }
69
+ async getContentsWithState(parameters, callback) {
70
+ const config = {
71
+ url: `/api/space/${parameters.spaceKey}/state/content`,
72
+ method: 'GET',
73
+ params: {
74
+ 'state-id': parameters.stateId,
75
+ expand: parameters.expand,
76
+ limit: parameters.limit,
77
+ start: parameters.start,
78
+ },
79
+ };
80
+ return this.client.sendRequest(config, callback);
81
+ }
69
82
  }
70
83
 
71
84
  export { ContentStates };
@@ -1 +1 @@
1
- {"version":3,"file":"contentStates.mjs","sources":["../../../../src/api/contentStates.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentStates {\n constructor(private client: Client) {}\n\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: never,\n ): Promise<T>;\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'GET',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: never,\n ): Promise<T>;\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'PUT',\n params: {\n status: parameters.status,\n },\n data: {\n name: parameters.name,\n color: parameters.color,\n id: parameters.stateId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: never,\n ): Promise<T>;\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'DELETE',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: never,\n ): Promise<T>;\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state/available`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback: Callback<T>): Promise<void>;\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback?: never): Promise<T>;\n async getCustomContentStates<T = Models.ContentState[]>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content-states',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space view permission\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space view permission\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: never,\n ): Promise<T>;\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space admin permission\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space admin permission\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: never,\n ): Promise<T>;\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state/settings`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,aAAa,CAAA;AACJ,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsB1B,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAQ,MAAA,CAAA;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuClD,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAQ,MAAA,CAAA;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,EAAE,EAAE,UAAU,CAAC,OAAO;AACvB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA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AM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAiB,eAAA,CAAA;AACvD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"contentStates.mjs","sources":["../../../../src/api/contentStates.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentStates {\n constructor(private client: Client) {}\n\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: never,\n ): Promise<T>;\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'GET',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: never,\n ): Promise<T>;\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'PUT',\n params: {\n status: parameters.status,\n },\n data: {\n name: parameters.name,\n color: parameters.color,\n id: parameters.stateId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: never,\n ): Promise<T>;\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'DELETE',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: never,\n ): Promise<T>;\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state/available`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback: Callback<T>): Promise<void>;\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback?: never): Promise<T>;\n async getCustomContentStates<T = Models.ContentState[]>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content-states',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: never,\n ): Promise<T>;\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: never,\n ): Promise<T>;\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state/settings`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all content that has the provided content state in a space.\n *\n * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the\n * query limit parameter will be restricted to a maximum value of 25.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getContentsWithState<T = Models.ContentArray>(\n parameters: Parameters.GetContentsWithState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content that has the provided content state in a space.\n *\n * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the\n * query limit parameter will be restricted to a maximum value of 25.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getContentsWithState<T = Models.ContentArray>(\n parameters: Parameters.GetContentsWithState,\n callback?: never,\n ): Promise<T>;\n async getContentsWithState<T = Models.ContentArray>(\n parameters: Parameters.GetContentsWithState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state/content`,\n method: 'GET',\n params: {\n 'state-id': parameters.stateId,\n expand: parameters.expand,\n limit: parameters.limit,\n start: parameters.start,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,aAAa,CAAA;AACJ,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAsBrC,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,MAAA,CAAQ;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAsCA,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,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