confluence.js 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/CHANGELOG.md +52 -2
  2. package/README.md +145 -183
  3. package/dist/cjs/api/analytics.cjs.map +1 -1
  4. package/dist/cjs/api/audit.cjs.map +1 -1
  5. package/dist/cjs/api/content.cjs +0 -5
  6. package/dist/cjs/api/content.cjs.map +1 -1
  7. package/dist/cjs/api/contentAttachments.cjs +1 -0
  8. package/dist/cjs/api/contentAttachments.cjs.map +1 -1
  9. package/dist/cjs/api/contentBody.cjs +18 -0
  10. package/dist/cjs/api/contentBody.cjs.map +1 -1
  11. package/dist/cjs/api/contentChildrenAndDescendants.cjs +2 -0
  12. package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -1
  13. package/dist/cjs/api/contentComments.cjs +1 -0
  14. package/dist/cjs/api/contentComments.cjs.map +1 -1
  15. package/dist/cjs/api/contentLabels.cjs.map +1 -1
  16. package/dist/cjs/api/contentMacroBody.cjs.map +1 -1
  17. package/dist/cjs/api/contentPermissions.cjs.map +1 -1
  18. package/dist/cjs/api/contentProperties.cjs +1 -0
  19. package/dist/cjs/api/contentProperties.cjs.map +1 -1
  20. package/dist/cjs/api/contentRestrictions.cjs.map +1 -1
  21. package/dist/cjs/api/contentStates.cjs +13 -0
  22. package/dist/cjs/api/contentStates.cjs.map +1 -1
  23. package/dist/cjs/api/contentVersions.cjs.map +1 -1
  24. package/dist/cjs/api/contentWatches.cjs.map +1 -1
  25. package/dist/cjs/api/dynamicModules.cjs.map +1 -1
  26. package/dist/cjs/api/experimental.cjs.map +1 -1
  27. package/dist/cjs/api/group.cjs +18 -17
  28. package/dist/cjs/api/group.cjs.map +1 -1
  29. package/dist/cjs/api/index.cjs +2 -0
  30. package/dist/cjs/api/index.cjs.map +1 -1
  31. package/dist/cjs/api/inlineTasks.cjs +1 -0
  32. package/dist/cjs/api/inlineTasks.cjs.map +1 -1
  33. package/dist/cjs/api/labelInfo.cjs.map +1 -1
  34. package/dist/cjs/api/longRunningTask.cjs +1 -0
  35. package/dist/cjs/api/longRunningTask.cjs.map +1 -1
  36. package/dist/cjs/api/models/labeledContentType.cjs.map +1 -1
  37. package/dist/cjs/api/relation.cjs.map +1 -1
  38. package/dist/cjs/api/search.cjs +1 -0
  39. package/dist/cjs/api/search.cjs.map +1 -1
  40. package/dist/cjs/api/settings.cjs.map +1 -1
  41. package/dist/cjs/api/space.cjs +4 -2
  42. package/dist/cjs/api/space.cjs.map +1 -1
  43. package/dist/cjs/api/spacePermissions.cjs.map +1 -1
  44. package/dist/cjs/api/spaceProperties.cjs +1 -0
  45. package/dist/cjs/api/spaceProperties.cjs.map +1 -1
  46. package/dist/cjs/api/spaceSettings.cjs.map +1 -1
  47. package/dist/cjs/api/template.cjs.map +1 -1
  48. package/dist/cjs/api/themes.cjs.map +1 -1
  49. package/dist/cjs/api/userProperties.cjs +56 -0
  50. package/dist/cjs/api/userProperties.cjs.map +1 -0
  51. package/dist/cjs/api/users.cjs.map +1 -1
  52. package/dist/cjs/clients/baseClient.cjs.map +1 -1
  53. package/dist/cjs/clients/confluenceClient.cjs +6 -0
  54. package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
  55. package/dist/cjs/config.cjs +3 -1
  56. package/dist/cjs/config.cjs.map +1 -1
  57. package/dist/cjs/paramSerializer.cjs.map +1 -1
  58. package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
  59. package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
  60. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
  61. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
  62. package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
  63. package/dist/esm/api/analytics.mjs.map +1 -1
  64. package/dist/esm/api/audit.mjs.map +1 -1
  65. package/dist/esm/api/content.mjs +0 -5
  66. package/dist/esm/api/content.mjs.map +1 -1
  67. package/dist/esm/api/contentAttachments.mjs +1 -0
  68. package/dist/esm/api/contentAttachments.mjs.map +1 -1
  69. package/dist/esm/api/contentBody.mjs +18 -0
  70. package/dist/esm/api/contentBody.mjs.map +1 -1
  71. package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
  72. package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
  73. package/dist/esm/api/contentComments.mjs +1 -0
  74. package/dist/esm/api/contentComments.mjs.map +1 -1
  75. package/dist/esm/api/contentLabels.mjs.map +1 -1
  76. package/dist/esm/api/contentMacroBody.mjs.map +1 -1
  77. package/dist/esm/api/contentPermissions.mjs.map +1 -1
  78. package/dist/esm/api/contentProperties.mjs +1 -0
  79. package/dist/esm/api/contentProperties.mjs.map +1 -1
  80. package/dist/esm/api/contentRestrictions.mjs.map +1 -1
  81. package/dist/esm/api/contentStates.mjs +13 -0
  82. package/dist/esm/api/contentStates.mjs.map +1 -1
  83. package/dist/esm/api/contentVersions.mjs.map +1 -1
  84. package/dist/esm/api/contentWatches.mjs.map +1 -1
  85. package/dist/esm/api/dynamicModules.mjs.map +1 -1
  86. package/dist/esm/api/experimental.mjs.map +1 -1
  87. package/dist/esm/api/group.mjs +18 -17
  88. package/dist/esm/api/group.mjs.map +1 -1
  89. package/dist/esm/api/index.mjs +1 -0
  90. package/dist/esm/api/index.mjs.map +1 -1
  91. package/dist/esm/api/inlineTasks.mjs +1 -0
  92. package/dist/esm/api/inlineTasks.mjs.map +1 -1
  93. package/dist/esm/api/labelInfo.mjs.map +1 -1
  94. package/dist/esm/api/longRunningTask.mjs +1 -0
  95. package/dist/esm/api/longRunningTask.mjs.map +1 -1
  96. package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
  97. package/dist/esm/api/relation.mjs.map +1 -1
  98. package/dist/esm/api/search.mjs +1 -0
  99. package/dist/esm/api/search.mjs.map +1 -1
  100. package/dist/esm/api/settings.mjs.map +1 -1
  101. package/dist/esm/api/space.mjs +4 -2
  102. package/dist/esm/api/space.mjs.map +1 -1
  103. package/dist/esm/api/spacePermissions.mjs.map +1 -1
  104. package/dist/esm/api/spaceProperties.mjs +1 -0
  105. package/dist/esm/api/spaceProperties.mjs.map +1 -1
  106. package/dist/esm/api/spaceSettings.mjs.map +1 -1
  107. package/dist/esm/api/template.mjs.map +1 -1
  108. package/dist/esm/api/themes.mjs.map +1 -1
  109. package/dist/esm/api/userProperties.mjs +54 -0
  110. package/dist/esm/api/userProperties.mjs.map +1 -0
  111. package/dist/esm/api/users.mjs.map +1 -1
  112. package/dist/esm/clients/baseClient.mjs.map +1 -1
  113. package/dist/esm/clients/confluenceClient.mjs +6 -0
  114. package/dist/esm/clients/confluenceClient.mjs.map +1 -1
  115. package/dist/esm/config.mjs +3 -1
  116. package/dist/esm/config.mjs.map +1 -1
  117. package/dist/esm/paramSerializer.mjs.map +1 -1
  118. package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
  119. package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
  120. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
  121. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
  122. package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
  123. package/dist/esm/types/api/analytics.d.ts +1 -1
  124. package/dist/esm/types/api/audit.d.ts +3 -3
  125. package/dist/esm/types/api/content.d.ts +33 -7
  126. package/dist/esm/types/api/contentAttachments.d.ts +5 -1
  127. package/dist/esm/types/api/contentBody.d.ts +73 -7
  128. package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
  129. package/dist/esm/types/api/contentComments.d.ts +5 -0
  130. package/dist/esm/types/api/contentLabels.d.ts +17 -9
  131. package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
  132. package/dist/esm/types/api/contentPermissions.d.ts +1 -1
  133. package/dist/esm/types/api/contentProperties.d.ts +25 -0
  134. package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
  135. package/dist/esm/types/api/contentStates.d.ts +23 -5
  136. package/dist/esm/types/api/contentVersions.d.ts +9 -1
  137. package/dist/esm/types/api/contentWatches.d.ts +1 -1
  138. package/dist/esm/types/api/dynamicModules.d.ts +1 -1
  139. package/dist/esm/types/api/experimental.d.ts +21 -1
  140. package/dist/esm/types/api/group.d.ts +47 -27
  141. package/dist/esm/types/api/index.d.ts +1 -0
  142. package/dist/esm/types/api/inlineTasks.d.ts +13 -0
  143. package/dist/esm/types/api/labelInfo.d.ts +1 -1
  144. package/dist/esm/types/api/longRunningTask.d.ts +1 -1
  145. package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
  146. package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
  147. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
  148. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
  149. package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
  150. package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
  151. package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
  152. package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
  153. package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
  154. package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
  155. package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
  156. package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
  157. package/dist/esm/types/api/parameters/index.d.ts +4 -0
  158. package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
  159. package/dist/esm/types/api/relation.d.ts +13 -15
  160. package/dist/esm/types/api/search.d.ts +7 -1
  161. package/dist/esm/types/api/settings.d.ts +5 -1
  162. package/dist/esm/types/api/space.d.ts +23 -7
  163. package/dist/esm/types/api/spacePermissions.d.ts +1 -1
  164. package/dist/esm/types/api/spaceProperties.d.ts +25 -0
  165. package/dist/esm/types/api/spaceSettings.d.ts +1 -1
  166. package/dist/esm/types/api/template.d.ts +1 -1
  167. package/dist/esm/types/api/themes.d.ts +1 -1
  168. package/dist/esm/types/api/userProperties.d.ts +102 -0
  169. package/dist/esm/types/api/users.d.ts +21 -9
  170. package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
  171. package/eslint.config.ts +11 -16
  172. package/package.json +29 -28
  173. package/src/api/analytics.ts +1 -1
  174. package/src/api/audit.ts +3 -3
  175. package/src/api/content.ts +33 -12
  176. package/src/api/contentAttachments.ts +6 -1
  177. package/src/api/contentBody.ts +113 -7
  178. package/src/api/contentChildrenAndDescendants.ts +39 -5
  179. package/src/api/contentComments.ts +5 -0
  180. package/src/api/contentLabels.ts +17 -9
  181. package/src/api/contentMacroBody.ts +79 -1
  182. package/src/api/contentPermissions.ts +1 -1
  183. package/src/api/contentProperties.ts +25 -0
  184. package/src/api/contentRestrictions.ts +19 -7
  185. package/src/api/contentStates.ts +47 -5
  186. package/src/api/contentVersions.ts +9 -1
  187. package/src/api/contentWatches.ts +1 -1
  188. package/src/api/dynamicModules.ts +1 -1
  189. package/src/api/experimental.ts +21 -1
  190. package/src/api/group.ts +96 -75
  191. package/src/api/index.ts +1 -0
  192. package/src/api/inlineTasks.ts +13 -0
  193. package/src/api/labelInfo.ts +1 -1
  194. package/src/api/longRunningTask.ts +2 -1
  195. package/src/api/models/spaceCreate.ts +11 -2
  196. package/src/api/models/spacePrivateCreate.ts +11 -2
  197. package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
  198. package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
  199. package/src/api/parameters/deleteGroupById.ts +4 -0
  200. package/src/api/parameters/downloadAttachment.ts +6 -0
  201. package/src/api/parameters/getContentChildren.ts +7 -1
  202. package/src/api/parameters/getContentsWithState.ts +17 -0
  203. package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
  204. package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
  205. package/src/api/parameters/getTasks.ts +2 -0
  206. package/src/api/parameters/getUser.ts +4 -0
  207. package/src/api/parameters/index.ts +4 -0
  208. package/src/api/parameters/searchUser.ts +7 -0
  209. package/src/api/relation.ts +13 -15
  210. package/src/api/search.ts +8 -1
  211. package/src/api/settings.ts +5 -1
  212. package/src/api/space.ts +27 -9
  213. package/src/api/spacePermissions.ts +1 -1
  214. package/src/api/spaceProperties.ts +25 -0
  215. package/src/api/spaceSettings.ts +1 -1
  216. package/src/api/template.ts +1 -1
  217. package/src/api/themes.ts +1 -1
  218. package/src/api/userProperties.ts +185 -0
  219. package/src/api/users.ts +21 -9
  220. package/src/clients/baseClient.ts +1 -5
  221. package/src/clients/confluenceClient.ts +6 -0
  222. package/src/config.ts +4 -1
  223. package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
  224. package/favicon.svg +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"space.cjs","sources":["../../../../src/api/space.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 { paramSerializer } from '../paramSerializer';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Space {\n constructor(private client: Client) {}\n\n /**\n * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has\n * permission to view.\n */\n async getSpaces<T = Models.SpaceArray>(\n parameters: Parameters.GetSpaces | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has\n * permission to view.\n */\n async getSpaces<T = Models.SpaceArray>(parameters?: Parameters.GetSpaces, callback?: never): Promise<T>;\n async getSpaces<T = Models.SpaceArray>(parameters?: Parameters.GetSpaces, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/space',\n method: 'GET',\n params: {\n spaceKey: paramSerializer('spaceKey', parameters?.spaceKey),\n spaceId: parameters?.spaceId,\n type: parameters?.type,\n status: parameters?.status,\n label: parameters?.label,\n favourite: parameters?.favourite,\n favouriteUserKey: parameters?.favouriteUserKey,\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 * Creates a new space. Note, currently you cannot set space labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createSpace<T = Models.Space>(\n parameters: Parameters.CreateSpace | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space. Note, currently you cannot set space labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createSpace<T = Models.Space>(parameters?: Parameters.CreateSpace, callback?: never): Promise<T>;\n async createSpace<T = Models.Space>(parameters?: Parameters.CreateSpace, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/space',\n method: 'POST',\n data: {\n key: parameters?.key,\n name: parameters?.name,\n description: parameters?.description,\n permissions: parameters?.permissions,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new space that is only visible to the creator. This method is the same as the [Create\n * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space\n * labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createPrivateSpace<T = Models.Space>(\n parameters: Parameters.CreatePrivateSpace | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space that is only visible to the creator. This method is the same as the [Create\n * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space\n * labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createPrivateSpace<T = Models.Space>(parameters?: Parameters.CreatePrivateSpace, callback?: never): Promise<T>;\n async createPrivateSpace<T = Models.Space>(\n parameters?: Parameters.CreatePrivateSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/space/_private',\n method: 'POST',\n data: {\n key: parameters?.key,\n name: parameters?.name,\n description: parameters?.description,\n permissions: parameters?.permissions,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a space. This includes information like the name, description, and permissions, but not the content in the\n * space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback: Callback<T>): Promise<void>;\n /**\n * Returns a space. This includes information like the name, description, and permissions, but not the content in the\n * space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback?: never): Promise<T>;\n async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the name, description, or homepage of a space.\n *\n * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead.\n * - Currently you cannot set space labels when updating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpace<T = Models.Space>(parameters: Parameters.UpdateSpace, callback: Callback<T>): Promise<void>;\n /**\n * Updates the name, description, or homepage of a space.\n *\n * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead.\n * - Currently you cannot set space labels when updating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpace<T = Models.Space>(parameters: Parameters.UpdateSpace, callback?: never): Promise<T>;\n async updateSpace<T = Models.Space>(parameters: Parameters.UpdateSpace, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}`,\n method: 'PUT',\n data: {\n name: parameters.name,\n description: parameters.description,\n homepage: parameters.homepage,\n type: parameters.type,\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a space. Note, the space will be deleted in a long running task. Therefore, the space may not be deleted\n * yet when this method has returned. Clients should poll the status link that is returned in the response until the\n * task completes.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async deleteSpace<T = Models.LongTask>(parameters: Parameters.DeleteSpace, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a space. Note, the space will be deleted in a long running task. Therefore, the space may not be deleted\n * yet when this method has returned. Clients should poll the status link that is returned in the response until the\n * task completes.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async deleteSpace<T = Models.LongTask>(parameters: Parameters.DeleteSpace, callback?: never): Promise<T>;\n async deleteSpace<T = Models.LongTask>(\n parameters: Parameters.DeleteSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by\n * content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n */\n async getContentForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by\n * content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n */\n async getContentForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentForSpace,\n callback?: never,\n ): Promise<T>;\n async getContentForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/content`,\n method: 'GET',\n params: {\n depth: parameters.depth,\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 all content of a given type, in a space. The returned content is ordered by content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n */\n async getContentByTypeForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentByTypeForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n */\n async getContentByTypeForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentByTypeForSpace,\n callback?: never,\n ): Promise<T>;\n async getContentByTypeForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentByTypeForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/content/${parameters.type}`,\n method: 'GET',\n params: {\n depth: parameters.depth,\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"],"names":["paramSerializer"],"mappings":";;;;MAOa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAqB1B,IAAA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AAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAE,CAAA;AACxC,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAyBlD,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAU,QAAA,CAAA;AAChD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,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;;AAuBlD,IAAA,MAAM,wBAAwB,CAC5B,UAA+C,EAC/C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAY,SAAA,EAAA,UAAU,CAAC,IAAI,CAAE,CAAA;AACnE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,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;;AAEnD;;;;"}
1
+ {"version":3,"file":"space.cjs","sources":["../../../../src/api/space.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 { paramSerializer } from '../paramSerializer';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Space {\n constructor(private client: Client) {}\n\n /**\n * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has\n * permission to view.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpaces<T = Models.SpaceArray>(\n parameters: Parameters.GetSpaces | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has\n * permission to view.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpaces<T = Models.SpaceArray>(parameters?: Parameters.GetSpaces, callback?: never): Promise<T>;\n async getSpaces<T = Models.SpaceArray>(parameters?: Parameters.GetSpaces, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/space',\n method: 'GET',\n params: {\n spaceKey: paramSerializer('spaceKey', parameters?.spaceKey),\n spaceId: parameters?.spaceId,\n type: parameters?.type,\n status: parameters?.status,\n label: parameters?.label,\n favourite: parameters?.favourite,\n favouriteUserKey: parameters?.favouriteUserKey,\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 * Creates a new space. Note, currently you cannot set space labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createSpace<T = Models.Space>(\n parameters: Parameters.CreateSpace | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space. Note, currently you cannot set space labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createSpace<T = Models.Space>(parameters?: Parameters.CreateSpace, callback?: never): Promise<T>;\n async createSpace<T = Models.Space>(parameters?: Parameters.CreateSpace, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/space',\n method: 'POST',\n data: {\n name: parameters?.name,\n key: parameters?.key,\n alias: parameters?.alias,\n description: parameters?.description,\n permissions: parameters?.permissions,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new space that is only visible to the creator. This method is the same as the [Create\n * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space\n * labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createPrivateSpace<T = Models.Space>(\n parameters: Parameters.CreatePrivateSpace | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space that is only visible to the creator. This method is the same as the [Create\n * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space\n * labels when creating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission.\n */\n async createPrivateSpace<T = Models.Space>(parameters?: Parameters.CreatePrivateSpace, callback?: never): Promise<T>;\n async createPrivateSpace<T = Models.Space>(\n parameters?: Parameters.CreatePrivateSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/space/_private',\n method: 'POST',\n data: {\n name: parameters?.name,\n key: parameters?.key,\n alias: parameters?.alias,\n description: parameters?.description,\n permissions: parameters?.permissions,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a space. This includes information like the name, description, and permissions, but not the content in the\n * space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback: Callback<T>): Promise<void>;\n /**\n * Returns a space. This includes information like the name, description, and permissions, but not the content in the\n * space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback?: never): Promise<T>;\n async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the name, description, or homepage of a space.\n *\n * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead.\n * - Currently you cannot set space labels when updating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpace<T = Models.Space>(parameters: Parameters.UpdateSpace, callback: Callback<T>): Promise<void>;\n /**\n * Updates the name, description, or homepage of a space.\n *\n * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead.\n * - Currently you cannot set space labels when updating a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpace<T = Models.Space>(parameters: Parameters.UpdateSpace, callback?: never): Promise<T>;\n async updateSpace<T = Models.Space>(parameters: Parameters.UpdateSpace, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}`,\n method: 'PUT',\n data: {\n name: parameters.name,\n description: parameters.description,\n homepage: parameters.homepage,\n type: parameters.type,\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Permanently deletes a space without sending it to the trash. Note, the space will be deleted in a long running\n * task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status\n * link that is returned in the response until the task completes.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async deleteSpace<T = Models.LongTask>(parameters: Parameters.DeleteSpace, callback: Callback<T>): Promise<void>;\n /**\n * Permanently deletes a space without sending it to the trash. Note, the space will be deleted in a long running\n * task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status\n * link that is returned in the response until the task completes.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async deleteSpace<T = Models.LongTask>(parameters: Parameters.DeleteSpace, callback?: never): Promise<T>;\n async deleteSpace<T = Models.LongTask>(\n parameters: Parameters.DeleteSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by\n * content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by\n * content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentForSpace,\n callback?: never,\n ): Promise<T>;\n async getContentForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/content`,\n method: 'GET',\n params: {\n depth: parameters.depth,\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 all content of a given type, in a space. The returned content is ordered by content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentByTypeForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentByTypeForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the\n * returned list will only contain content that the current user has permission to view.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentByTypeForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentByTypeForSpace,\n callback?: never,\n ): Promise<T>;\n async getContentByTypeForSpace<T = Models.ContentArray>(\n parameters: Parameters.GetContentByTypeForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/content/${parameters.type}`,\n method: 'GET',\n params: {\n depth: parameters.depth,\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"],"names":["paramSerializer"],"mappings":";;;;MAOa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAyBrC,IAAA,MAAM,SAAS,CAAwB,UAAiC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,YAAY;AACjB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAEA,+BAAe,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC;gBAC3D,OAAO,EAAE,UAAU,EAAE,OAAO;gBAC5B,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,SA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,EAAc,UAAU,CAAC,QAAQ,CAAA,QAAA,CAAU;AAChD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,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;AA0BA,IAAA,MAAM,wBAAwB,CAC5B,UAA+C,EAC/C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAA,SAAA,EAAY,UAAU,CAAC,IAAI,CAAA,CAAE;AACnE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,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;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"spacePermissions.cjs","sources":["../../../../src/api/spacePermissions.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 SpacePermissions {\n constructor(private client: Client) {}\n\n /**\n * Adds new permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds new permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback?: never,\n ): Promise<T>;\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operation: parameters.operation,\n _links: parameters.links,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds new custom content permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Only apps can access this REST resource and only make changes to the respective app permissions.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds new custom content permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Only apps can access this REST resource and only make changes to the respective app permissions.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback?: never,\n ): Promise<T>;\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission/custom-content`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operations: parameters.operations,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space\n * permissions for that user or group.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback: Callback<T>): Promise<void>;\n /**\n * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space\n * permissions for that user or group.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback?: never): Promise<T>;\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission/${parameters.id}`,\n method: 'DELETE',\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;;AA4B1B,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAa,WAAA,CAAA;AACnD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,MAAM,EAAE,UAAU,CAAC,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA6BlD,IAAA,MAAM,2BAA2B,CAC/B,UAAkD,EAClD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAA4B,0BAAA,CAAA;AAClE,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,UAAU,EAAE,UAAU,CAAC,UAAU;AAClC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,gBAAgB,CAAW,UAAuC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAe,YAAA,EAAA,UAAU,CAAC,EAAE,CAAE,CAAA;AACpE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"spacePermissions.cjs","sources":["../../../../src/api/spacePermissions.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 SpacePermissions {\n constructor(private client: Client) {}\n\n /**\n * Adds new permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds new permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback?: never,\n ): Promise<T>;\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operation: parameters.operation,\n _links: parameters.links,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds new custom content permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Only apps can access this REST resource and only make changes to the respective app permissions.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds new custom content permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Only apps can access this REST resource and only make changes to the respective app permissions.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback?: never,\n ): Promise<T>;\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission/custom-content`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operations: parameters.operations,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space\n * permissions for that user or group.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback: Callback<T>): Promise<void>;\n /**\n * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space\n * permissions for that user or group.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback?: never): Promise<T>;\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission/${parameters.id}`,\n method: 'DELETE',\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;AA4BrC,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,WAAA,CAAa;AACnD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,MAAM,EAAE,UAAU,CAAC,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA4BA,IAAA,MAAM,2BAA2B,CAC/B,UAAkD,EAClD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,0BAAA,CAA4B;AAClE,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,UAAU,EAAE,UAAU,CAAC,UAAU;AAClC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAoBA,IAAA,MAAM,gBAAgB,CAAW,UAAuC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAA,YAAA,EAAe,UAAU,CAAC,EAAE,CAAA,CAAE;AACpE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ /** @deprecated Will be removed in next major version. */
3
4
  class SpaceProperties {
4
5
  client;
5
6
  constructor(client) {
@@ -1 +1 @@
1
- {"version":3,"file":"spaceProperties.cjs","sources":["../../../../src/api/spaceProperties.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 SpaceProperties {\n constructor(private client: Client) {}\n\n /**\n * Returns all properties for the given space. Space properties are a key-value storage associated with a space.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all properties for the given space. Space properties are a key-value storage associated with a space.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback?: never,\n ): Promise<T>;\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property`,\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 * Creates a new space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property`,\n method: 'POST',\n data: {\n key: parameters.key,\n value: parameters.value,\n space: parameters.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the\n * property is passed as a path parameter, rather than in the request body.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the\n * property is passed as a path parameter, rather than in the request body.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback?: never,\n ): Promise<T>;\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/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 a space property. Note, you cannot update the key of a space property, only the value.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates a space property. Note, you cannot update the key of a space property, only the value.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/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 space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback?: never): Promise<T>;\n async deleteSpaceProperty<T = void>(\n parameters: Parameters.DeleteSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'DELETE',\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;;AAoB1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAW,SAAA,CAAA;AACjD,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;;AAqBlD,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA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AAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AACnE,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;;AAelD,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AACnE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"spaceProperties.cjs","sources":["../../../../src/api/spaceProperties.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 SpaceProperties {\n constructor(private client: Client) {}\n\n /**\n * Returns all properties for the given space. Space properties are a key-value storage associated with a space.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all properties for the given space. Space properties are a key-value storage associated with a space.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback?: never,\n ): Promise<T>;\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property`,\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 * Creates a new space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property`,\n method: 'POST',\n data: {\n key: parameters.key,\n value: parameters.value,\n space: parameters.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the\n * property is passed as a path parameter, rather than in the request body.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the\n * property is passed as a path parameter, rather than in the request body.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback?: never,\n ): Promise<T>;\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/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 a space property. Note, you cannot update the key of a space property, only the value.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates a space property. Note, you cannot update the key of a space property, only the value.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/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 space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback?: never): Promise<T>;\n async deleteSpaceProperty<T = void>(\n parameters: Parameters.DeleteSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'DELETE',\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;AAwBrC,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,SAAA,CAAW;AACjD,YAAA,MAAM,EAAE,KAAK;AACb,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,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;AAwBA,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AACnE,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;AAkBA,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AACnE,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":"spaceSettings.cjs","sources":["../../../../src/api/spaceSettings.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 SpaceSettings {\n constructor(private client: Client) {}\n\n /**\n * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback?: never,\n ): Promise<T>;\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/settings`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback?: never,\n ): Promise<T>;\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/settings`,\n method: 'PUT',\n data: {\n routeOverrideEnabled: parameters.routeOverrideEnabled,\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,IAAM,CAAA,MAAA,GAAN,MAAM;;AAoB1B,IAAA,MAAM,gBAAgB,CACpB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAW,SAAA,CAAA;AACjD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAW,SAAA,CAAA;AACjD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,oBAAoB,EAAE,UAAU,CAAC,oBAAoB;AACtD,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"spaceSettings.cjs","sources":["../../../../src/api/spaceSettings.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 SpaceSettings {\n constructor(private client: Client) {}\n\n /**\n * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback?: never,\n ): Promise<T>;\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/settings`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback?: never,\n ): Promise<T>;\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/settings`,\n method: 'PUT',\n data: {\n routeOverrideEnabled: parameters.routeOverrideEnabled,\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;AAoBrC,IAAA,MAAM,gBAAgB,CACpB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,SAAA,CAAW;AACjD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAoBA,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,SAAA,CAAW;AACjD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,oBAAoB,EAAE,UAAU,CAAC,oBAAoB;AACtD,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"template.cjs","sources":["../../../../src/api/template.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 Template {\n constructor(private client: Client) {}\n\n /**\n * Creates a new content template. Note, blueprint templates cannot be created via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a\n * space template or 'Confluence Administrator' global permission to create a global template.\n */\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.CreateContentTemplate | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new content template. Note, blueprint templates cannot be created via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a\n * space template or 'Confluence Administrator' global permission to create a global template.\n */\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.CreateContentTemplate,\n callback?: never,\n ): Promise<T>;\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.CreateContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template',\n method: 'POST',\n data: {\n name: parameters?.name,\n templateType: parameters?.templateType,\n body: parameters?.body,\n description: parameters?.description,\n labels: parameters?.labels,\n space: parameters?.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates a content template. Note, blueprint templates cannot be updated via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a\n * space template or 'Confluence Administrator' global permission to update a global template.\n */\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.UpdateContentTemplate | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates a content template. Note, blueprint templates cannot be updated via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a\n * space template or 'Confluence Administrator' global permission to update a global template.\n */\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.UpdateContentTemplate,\n callback?: never,\n ): Promise<T>;\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.UpdateContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template',\n method: 'PUT',\n data: {\n templateId: parameters?.templateId,\n name: parameters?.name,\n templateType: parameters?.templateType,\n body: parameters?.body,\n description: parameters?.description,\n labels: parameters?.labels,\n space: parameters?.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all\n * blueprint templates in a space.\n *\n * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the\n * global blueprints.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global\n * blueprints.\n */\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters: Parameters.GetBlueprintTemplates | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all\n * blueprint templates in a space.\n *\n * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the\n * global blueprints.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global\n * blueprints.\n */\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters?: Parameters.GetBlueprintTemplates,\n callback?: never,\n ): Promise<T>;\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters?: Parameters.GetBlueprintTemplates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template/blueprint',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\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 * Returns all content templates. Use this method to retrieve all global content templates or all content templates in\n * a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters: Parameters.GetContentTemplates | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content templates. Use this method to retrieve all global content templates or all content templates in\n * a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters?: Parameters.GetContentTemplates,\n callback?: never,\n ): Promise<T>;\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters?: Parameters.GetContentTemplates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template/page',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\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 * Returns a content template. This includes information about template, like the name, the space or blueprint that\n * the template is in, the body of the template, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a content template. This includes information about template, like the name, the space or blueprint that\n * the template is in, the body of the template, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback?: never,\n ): Promise<T>;\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/template/${parameters.contentTemplateId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a template. This results in different actions depending on the type of template:\n *\n * - If the template is a content template, it is deleted.\n * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the\n * global-level blueprint template.\n * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint\n * template.\n *\n * Note, unmodified blueprint templates cannot be deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a\n * space template or 'Confluence Administrator' global permission to delete a global template.\n */\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a template. This results in different actions depending on the type of template:\n *\n * - If the template is a content template, it is deleted.\n * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the\n * global-level blueprint template.\n * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint\n * template.\n *\n * Note, unmodified blueprint templates cannot be deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a\n * space template or 'Confluence Administrator' global permission to delete a global template.\n */\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback?: never): Promise<T>;\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/template/${parameters.contentTemplateId}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,QAAQ,CAAA;AACC,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsB1B,IAAA,MAAM,qBAAqB,CACzB,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,eAAe;AACpB,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,WAAW,EAAE,UAAU,EAAE,WAAW;gBACpC,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuBlD,IAAA,MAAM,qBAAqB,CACzB,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,eAAe;AACpB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,UAAU,EAAE,UAAU,EAAE,UAAU;gBAClC,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,WAAW,EAAE,UAAU,EAAE,WAAW;gBACpC,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,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AiClD,IAAA,MAAM,cAAc,CAAW,UAAqC,EAAE,QAAsB,EAAA;AAC1F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,UAAU,CAAC,iBAAiB,CAAE,CAAA;AACpD,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"template.cjs","sources":["../../../../src/api/template.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 Template {\n constructor(private client: Client) {}\n\n /**\n * Creates a new content template. Note, blueprint templates cannot be created via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a\n * space template or 'Confluence Administrator' global permission to create a global template.\n */\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.CreateContentTemplate | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new content template. Note, blueprint templates cannot be created via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a\n * space template or 'Confluence Administrator' global permission to create a global template.\n */\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.CreateContentTemplate,\n callback?: never,\n ): Promise<T>;\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.CreateContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template',\n method: 'POST',\n data: {\n name: parameters?.name,\n templateType: parameters?.templateType,\n body: parameters?.body,\n description: parameters?.description,\n labels: parameters?.labels,\n space: parameters?.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates a content template. Note, blueprint templates cannot be updated via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a\n * space template or 'Confluence Administrator' global permission to update a global template.\n */\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.UpdateContentTemplate | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates a content template. Note, blueprint templates cannot be updated via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a\n * space template or 'Confluence Administrator' global permission to update a global template.\n */\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.UpdateContentTemplate,\n callback?: never,\n ): Promise<T>;\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.UpdateContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template',\n method: 'PUT',\n data: {\n templateId: parameters?.templateId,\n name: parameters?.name,\n templateType: parameters?.templateType,\n body: parameters?.body,\n description: parameters?.description,\n labels: parameters?.labels,\n space: parameters?.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all\n * blueprint templates in a space.\n *\n * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the\n * global blueprints.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global\n * blueprints.\n */\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters: Parameters.GetBlueprintTemplates | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all\n * blueprint templates in a space.\n *\n * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the\n * global blueprints.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global\n * blueprints.\n */\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters?: Parameters.GetBlueprintTemplates,\n callback?: never,\n ): Promise<T>;\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters?: Parameters.GetBlueprintTemplates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template/blueprint',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\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 * Returns all content templates. Use this method to retrieve all global content templates or all content templates in\n * a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters: Parameters.GetContentTemplates | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content templates. Use this method to retrieve all global content templates or all content templates in\n * a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters?: Parameters.GetContentTemplates,\n callback?: never,\n ): Promise<T>;\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters?: Parameters.GetContentTemplates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template/page',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\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 * Returns a content template. This includes information about template, like the name, the space or blueprint that\n * the template is in, the body of the template, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a content template. This includes information about template, like the name, the space or blueprint that\n * the template is in, the body of the template, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback?: never,\n ): Promise<T>;\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/template/${parameters.contentTemplateId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a template. This results in different actions depending on the type of template:\n *\n * - If the template is a content template, it is deleted.\n * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the\n * global-level blueprint template.\n * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint\n * template.\n *\n * Note, unmodified blueprint templates cannot be deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a\n * space template or 'Confluence Administrator' global permission to delete a global template.\n */\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a template. This results in different actions depending on the type of template:\n *\n * - If the template is a content template, it is deleted.\n * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the\n * global-level blueprint template.\n * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint\n * template.\n *\n * Note, unmodified blueprint templates cannot be deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a\n * space template or 'Confluence Administrator' global permission to delete a global template.\n */\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback?: never): Promise<T>;\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/template/${parameters.contentTemplateId}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,QAAQ,CAAA;AACC,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAsBrC,IAAA,MAAM,qBAAqB,CACzB,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,eAAe;AACpB,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,WAAW,EAAE,UAAU,EAAE,WAAW;gBACpC,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAsBA,IAAA,MAAM,qBAAqB,CACzB,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,eAAe;AACpB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,UAAU,EAAE,UAAU,EAAE,UAAU;gBAClC,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,WAAW,EAAE,UAAU,EAAE,WAAW;gBACpC,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,M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,EAAE,QAAsB,EAAA;AAC1F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,UAAU,CAAC,iBAAiB,CAAA,CAAE;AACpD,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":"themes.cjs","sources":["../../../../src/api/themes.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 Themes {\n constructor(private client: Client) {}\n\n /**\n * Returns all themes, not including the default theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getThemes<T = Models.ThemeArray>(\n parameters: Parameters.GetThemes | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all themes, not including the default theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getThemes<T = Models.ThemeArray>(parameters?: Parameters.GetThemes, callback?: never): Promise<T>;\n async getThemes<T = Models.ThemeArray>(parameters?: Parameters.GetThemes, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/theme',\n method: 'GET',\n params: {\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the globally assigned theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getGlobalTheme<T = Models.Theme>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the globally assigned theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getGlobalTheme<T = Models.Theme>(callback?: never): Promise<T>;\n async getGlobalTheme<T = Models.Theme>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/theme/selected',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a theme. This includes information about the theme name, description, and icon.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback: Callback<T>): Promise<void>;\n /**\n * Returns a theme. This includes information about the theme name, description, and icon.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback?: never): Promise<T>;\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/settings/theme/${parameters.themeKey}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is\n * inheriting the global look and feel settings.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceTheme<T = Models.Theme>(parameters: Parameters.GetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is\n * inheriting the global look and feel settings.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceTheme<T = Models.Theme>(parameters: Parameters.GetSpaceTheme, callback?: never): Promise<T>;\n async getSpaceTheme<T = Models.Theme>(\n parameters: Parameters.GetSpaceTheme,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the\n * 'Reset space theme' method instead of this method.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setSpaceTheme<T = Models.Theme>(parameters: Parameters.SetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the\n * 'Reset space theme' method instead of this method.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setSpaceTheme<T = Models.Theme>(parameters: Parameters.SetSpaceTheme, callback?: never): Promise<T>;\n async setSpaceTheme<T = Models.Theme>(\n parameters: Parameters.SetSpaceTheme,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'PUT',\n data: {\n themeKey: parameters.themeKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Resets the space theme. This means that the space will inherit the global look and feel settings\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Resets the space theme. This means that the space will inherit the global look and feel settings\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback?: never): Promise<T>;\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,MAAM,CAAA;AACG,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAiB1B,IAAA,MAAM,SAAS,CAAwB,UAAiC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,qBAAqB;AAC1B,YAAA,MAAM,EAAE,KAAK;AACb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A;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAelD,IAAA,MAAM,eAAe,CAAW,UAAsC,EAAE,QAAsB,EAAA;AAC5F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAQ,MAAA,CAAA;AAC9C,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"themes.cjs","sources":["../../../../src/api/themes.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 Themes {\n constructor(private client: Client) {}\n\n /**\n * Returns all themes, not including the default theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getThemes<T = Models.ThemeArray>(\n parameters: Parameters.GetThemes | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all themes, not including the default theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getThemes<T = Models.ThemeArray>(parameters?: Parameters.GetThemes, callback?: never): Promise<T>;\n async getThemes<T = Models.ThemeArray>(parameters?: Parameters.GetThemes, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/theme',\n method: 'GET',\n params: {\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the globally assigned theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getGlobalTheme<T = Models.Theme>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the globally assigned theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getGlobalTheme<T = Models.Theme>(callback?: never): Promise<T>;\n async getGlobalTheme<T = Models.Theme>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/theme/selected',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a theme. This includes information about the theme name, description, and icon.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback: Callback<T>): Promise<void>;\n /**\n * Returns a theme. This includes information about the theme name, description, and icon.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback?: never): Promise<T>;\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/settings/theme/${parameters.themeKey}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is\n * inheriting the global look and feel settings.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceTheme<T = Models.Theme>(parameters: Parameters.GetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is\n * inheriting the global look and feel settings.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceTheme<T = Models.Theme>(parameters: Parameters.GetSpaceTheme, callback?: never): Promise<T>;\n async getSpaceTheme<T = Models.Theme>(\n parameters: Parameters.GetSpaceTheme,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the\n * 'Reset space theme' method instead of this method.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setSpaceTheme<T = Models.Theme>(parameters: Parameters.SetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the\n * 'Reset space theme' method instead of this method.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setSpaceTheme<T = Models.Theme>(parameters: Parameters.SetSpaceTheme, callback?: never): Promise<T>;\n async setSpaceTheme<T = Models.Theme>(\n parameters: Parameters.SetSpaceTheme,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'PUT',\n data: {\n themeKey: parameters.themeKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Resets the space theme. This means that the space will inherit the global look and feel settings\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Resets the space theme. This means that the space will inherit the global look and feel settings\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback?: never): Promise<T>;\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,MAAM,CAAA;AACG,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAiBrC,IAAA,MAAM,SAAS,CAAwB,UAAiC,EAAE,QA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AQ,CAAA,MAAA,CAAQ;AAC9C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,QAAQ,EAAE,UAAU,CAAC,QAAQ;AAC9B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAcA,IAAA,MAAM,eAAe,CAAW,UAAsC,EAAE,QAAsB,EAAA;AAC5F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,MAAA,CAAQ;AAC9C,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ class UserProperties {
4
+ client;
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ async getUserProperties(parameters, callback) {
9
+ const config = {
10
+ url: `/api/user/${parameters.userId}/property`,
11
+ method: 'GET',
12
+ params: {
13
+ start: parameters.start,
14
+ limit: parameters.limit,
15
+ },
16
+ };
17
+ return this.client.sendRequest(config, callback);
18
+ }
19
+ async getUserProperty(parameters, callback) {
20
+ const config = {
21
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
22
+ method: 'GET',
23
+ };
24
+ return this.client.sendRequest(config, callback);
25
+ }
26
+ async createUserProperty(parameters, callback) {
27
+ const config = {
28
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
29
+ method: 'POST',
30
+ data: {
31
+ value: parameters.value,
32
+ },
33
+ };
34
+ return this.client.sendRequest(config, callback);
35
+ }
36
+ async updateUserProperty(parameters, callback) {
37
+ const config = {
38
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
39
+ method: 'PUT',
40
+ data: {
41
+ value: parameters.value,
42
+ },
43
+ };
44
+ return this.client.sendRequest(config, callback);
45
+ }
46
+ async deleteUserProperty(parameters, callback) {
47
+ const config = {
48
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
49
+ method: 'DELETE',
50
+ };
51
+ return this.client.sendRequest(config, callback);
52
+ }
53
+ }
54
+
55
+ exports.UserProperties = UserProperties;
56
+ //# sourceMappingURL=userProperties.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userProperties.cjs","sources":["../../../../src/api/userProperties.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 UserProperties {\n constructor(private client: Client) {}\n\n /**\n * Returns the properties for a user as list of property keys. For more information about user properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n * `Note`, these properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the properties for a user as list of property keys. For more information about user properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n * `Note`, these properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback?: never,\n ): Promise<T>;\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property`,\n method: 'GET',\n params: {\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperty<T = Models.UserProperty>(\n parameters: Parameters.GetUserProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperty<T = Models.UserProperty>(parameters: Parameters.GetUserProperty, callback?: never): Promise<T>;\n async getUserProperty<T = Models.UserProperty>(\n parameters: Parameters.GetUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for a user. For more information about user properties, see [Confluence entity properties]\n * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored\n * against a user are on a Confluence site level and not space/content level.\n *\n * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by\n * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access\n * the Confluence site ('Can use' global permission).\n */\n async createUserProperty<T = unknown>(\n parameters: Parameters.CreateUserProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for a user. For more information about user properties, see [Confluence entity properties]\n * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored\n * against a user are on a Confluence site level and not space/content level.\n *\n * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by\n * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access\n * the Confluence site ('Can use' global permission).\n */\n async createUserProperty<T = unknown>(parameters: Parameters.CreateUserProperty, callback?: never): Promise<T>;\n async createUserProperty<T = unknown>(\n parameters: Parameters.CreateUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/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 a property for the given user. Note, you cannot update the key of a user property, only the value. For more\n * information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback: Callback<T>): Promise<void>;\n /**\n * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more\n * information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback?: never): Promise<T>;\n async updateUserProperty<T = void>(\n parameters: Parameters.UpdateUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'PUT',\n data: {\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a property for the given user. For more information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a property for the given user. For more information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback?: never): Promise<T>;\n async deleteUserProperty<T = void>(\n parameters: Parameters.DeleteUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,cAAc,CAAA;AACL,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA0BrC,IAAA,MAAM,iBAAiB,CACrB,UAAwC,EACxC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,UAAA,EAAa,UAAU,CAAC,MAAM,CAAA,SAAA,CAAW;AAC9C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,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;AAuBA,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,aAAa,UAAU,CAAC,MAAM,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,C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],"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 Users {\n constructor(private client: Client) {}\n\n /**\n * Returns a user. This includes information about the user, such as the display name, account ID, profile picture,\n * and more. The information returned may be restricted by the user's profile visibility settings.\n *\n * **Note:** to add, edit, or delete users in your organization, see the [user management REST\n * API](/cloud/admin/user-management/about/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback: Callback<T>): Promise<void>;\n /**\n * Returns a user. This includes information about the user, such as the display name, account ID, profile picture,\n * and more. The information returned may be restricted by the user's profile visibility settings.\n *\n * **Note:** to add, edit, or delete users in your organization, see the [user management REST\n * API](/cloud/admin/user-management/about/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback?: never): Promise<T>;\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns information about how anonymous users are represented, like the profile picture and display name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters: Parameters.GetAnonymousUser | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns information about how anonymous users are represented, like the profile picture and display name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters?: Parameters.GetAnonymousUser,\n callback?: never,\n ): Promise<T>;\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters?: Parameters.GetAnonymousUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/anonymous',\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 currently logged-in user. This includes information about the user, like the display name, userKey,\n * account ID, profile picture, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getCurrentUser<T = Models.User>(\n parameters: Parameters.GetCurrentUser | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the currently logged-in user. This includes information about the user, like the display name, userKey,\n * account ID, profile picture, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getCurrentUser<T = Models.User>(parameters?: Parameters.GetCurrentUser, callback?: never): Promise<T>;\n async getCurrentUser<T = Models.User>(\n parameters?: Parameters.GetCurrentUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/current',\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 groups that a user is a member of.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the groups that a user is a member of.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback?: never,\n ): Promise<T>;\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/memberof',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns user details for the ids provided in request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns user details for the ids provided in request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback?: never,\n ): Promise<T>;\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/bulk',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n expand: parameters.expand,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback?: never,\n ): Promise<T>;\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/email',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian,\n * according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * Any accounts which are not available will not be included in the result.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian,\n * according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * Any accounts which are not available will not be included in the result.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback?: never,\n ): Promise<T>;\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/email/bulk',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and\n * username parameters can be specified.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission\n * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).\n */\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and\n * username parameters can be specified.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission\n * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).\n */\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback?: never,\n ): Promise<T>;\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/bulk/migration',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAwB1B,IAAA,MAAM,OAAO,CAAkB,UAA8B,EAAE,QAAsB,EAAA;AACnF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,WAAW;AAChB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,MA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AK,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;;AAEnD;;;;"}
1
+ {"version":3,"file":"users.cjs","sources":["../../../../src/api/users.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 Users {\n constructor(private client: Client) {}\n\n /**\n * Returns a user. This includes information about the user, such as the display name, account ID, profile picture,\n * and more. The information returned may be restricted by the user's profile visibility settings.\n *\n * **Note:** to add, edit, or delete users in your organization, see the [user management REST\n * API](/cloud/admin/user-management/about/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback: Callback<T>): Promise<void>;\n /**\n * Returns a user. This includes information about the user, such as the display name, account ID, profile picture,\n * and more. The information returned may be restricted by the user's profile visibility settings.\n *\n * **Note:** to add, edit, or delete users in your organization, see the [user management REST\n * API](/cloud/admin/user-management/about/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback?: never): Promise<T>;\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns information about how anonymous users are represented, like the profile picture and display name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters: Parameters.GetAnonymousUser | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns information about how anonymous users are represented, like the profile picture and display name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters?: Parameters.GetAnonymousUser,\n callback?: never,\n ): Promise<T>;\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters?: Parameters.GetAnonymousUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/anonymous',\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 currently logged-in user. This includes information about the user, like the display name, userKey,\n * account ID, profile picture, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getCurrentUser<T = Models.User>(\n parameters: Parameters.GetCurrentUser | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the currently logged-in user. This includes information about the user, like the display name, userKey,\n * account ID, profile picture, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getCurrentUser<T = Models.User>(parameters?: Parameters.GetCurrentUser, callback?: never): Promise<T>;\n async getCurrentUser<T = Models.User>(\n parameters?: Parameters.GetCurrentUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/current',\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 groups that a user is a member of.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the groups that a user is a member of.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback?: never,\n ): Promise<T>;\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/memberof',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns user details for the ids provided in the request. Currently this API returns a maximum of 100 results. If\n * more than 100 account ids are passed in, then the first 100 will be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns user details for the ids provided in the request. Currently this API returns a maximum of 100 results. If\n * more than 100 account ids are passed in, then the first 100 will be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback?: never,\n ): Promise<T>;\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/bulk',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n expand: parameters.expand,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is\n * only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n * For Forge apps, this API only supports access via asApp() requests.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is\n * only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n * For Forge apps, this API only supports access via asApp() requests.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback?: never,\n ): Promise<T>;\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/email',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is\n * only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n * For Forge apps, this API only supports access via asApp() requests.\n *\n * Any accounts which are not available will not be included in the result.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is\n * only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n * For Forge apps, this API only supports access via asApp() requests.\n *\n * Any accounts which are not available will not be included in the result.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback?: never,\n ): Promise<T>;\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/email/bulk',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and\n * username parameters can be specified.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission\n * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and\n * username parameters can be specified.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission\n * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback?: never,\n ): Promise<T>;\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/bulk/migration',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAwBrC,IAAA,MAAM,OAAO,CAAkB,UAA8B,EAAE,QAAsB,EAAA;AACnF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,WAAW;AAChB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAsBA,IAAA,MAAM,gBAAgB,CACpB,UAAwC,EACxC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,qBAAqB;AAC1B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,EAAE,MAAM;AAC3B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAqBA,IAAA,MAAM,cAAc,CAClB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,mBAAmB;AACxB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,EAAE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AC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgCA,IAAA,MAAM,6BAA6B,CACjC,UAAoD,EACpD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,sBAAsB;AAC3B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA4BA,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,0BAA0B;AAC/B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,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;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"baseClient.cjs","sources":["../../../../src/clients/baseClient.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unnecessary-condition */\nimport type { AxiosInstance } from 'axios';\nimport axios from 'axios';\nimport { getAuthenticationToken } from '~/services';\nimport type { Callback } from '~/callback';\nimport type { Client } from './client';\nimport {\n ConfigSchema,\n type Config,\n type Error as ConfluenceError,\n} from '~/config';\nimport type { RequestConfig } from '~/requestConfig';\nimport { ZodError } from 'zod';\n\nconst ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token';\nconst ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = 'no-check';\n\nexport class BaseClient implements Client {\n #instance: AxiosInstance | undefined;\n\n constructor(protected readonly config: Config) {\n this.config.apiPrefix = this.config.apiPrefix || '/wiki/rest/';\n\n try {\n this.config = ConfigSchema.parse(this.config);\n } catch (e) {\n if (e instanceof ZodError && e.errors[0].code === 'invalid_string') {\n throw new Error(e.errors[0].message);\n }\n\n throw e;\n }\n }\n\n protected paramSerializer(parameters: Record<string, any>): string {\n const parts: string[] = [];\n\n Object.entries(parameters).forEach(([key, value]) => {\n if (value === null || typeof value === 'undefined') {\n return;\n }\n\n if (Array.isArray(value)) {\n value = value.join(',');\n }\n\n if (value instanceof Date) {\n value = value.toISOString();\n } else if (value !== null && typeof value === 'object') {\n value = JSON.stringify(value);\n } else if (value instanceof Function) {\n const part = value();\n\n return part && parts.push(part);\n }\n\n parts.push(`${this.encode(key)}=${this.encode(value)}`);\n });\n\n return parts.join('&');\n }\n\n protected encode(value: string) {\n return encodeURIComponent(value)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+')\n .replace(/%5B/gi, '[')\n .replace(/%5D/gi, ']');\n }\n\n protected removeUndefinedProperties(obj: Record<string, any>): Record<string, any> {\n return Object.entries(obj)\n .filter(([, value]) => typeof value !== 'undefined')\n .reduce((accumulator, [key, value]) => ({ ...accumulator, [key]: value }), {});\n }\n\n private get instance() {\n if (this.#instance) {\n return this.#instance;\n }\n\n this.#instance = axios.create({\n paramsSerializer: this.paramSerializer.bind(this),\n ...this.config.baseRequestConfig,\n baseURL: `${this.config.host}${this.config.apiPrefix}`,\n headers: this.removeUndefinedProperties({\n [ATLASSIAN_TOKEN_CHECK_FLAG]: this.config.noCheckAtlassianToken\n ? ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE\n : undefined,\n ...this.config.baseRequestConfig?.headers,\n }),\n });\n\n return this.#instance;\n }\n\n async sendRequest<T>(requestConfig: RequestConfig, callback: never): Promise<T>;\n async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T>): Promise<void>;\n async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T> | never): Promise<void | T> {\n try {\n const modifiedRequestConfig = {\n ...requestConfig,\n headers: this.removeUndefinedProperties({\n Authorization: await getAuthenticationToken(this.config.authentication, {\n baseURL: this.config.host,\n url: this.instance.getUri(requestConfig),\n method: requestConfig.method!,\n }),\n ...requestConfig.headers,\n }),\n };\n\n const response = await this.instance.request<T>(modifiedRequestConfig);\n\n const callbackResponseHandler = callback && ((data: T): void => callback(null, data));\n const defaultResponseHandler = (data: T): T => data;\n\n const responseHandler = callbackResponseHandler ?? defaultResponseHandler;\n\n this.config.middlewares?.onResponse?.(response.data);\n\n return responseHandler(response.data);\n } catch (e: any) {\n const err = e.isAxiosError ? e.response.data : e;\n\n const callbackErrorHandler = callback && ((error: ConfluenceError) => callback(error));\n const defaultErrorHandler = (error: Error) => {\n throw error;\n };\n\n const errorHandler = callbackErrorHandler ?? defaultErrorHandler;\n\n this.config.middlewares?.onError?.(err);\n\n return errorHandler(err);\n }\n }\n}\n"],"names":["config","ConfigSchema","ZodError","getAuthenticationToken"],"mappings":";;;;;;;AAcA,MAAM,0BAA0B,GAAG,mBAAmB;AACtD,MAAM,mCAAmC,GAAG,UAAU;MAEzC,UAAU,CAAA;AAGU,IAAA,MAAA;AAF/B,IAAA,SAAS;AAET,IAAA,WAAA,CAA+BA,QAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAANA,QAAM;AACnC,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,aAAa;AAE9D,QAAA,IAAI;YACF,IAAI,CAAC,MAAM,GAAGC,mBAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;;QAC7C,OAAO,CAAC,EAAE;AACV,YAAA,IAAI,CAAC,YAAYC,YAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,gBAAgB,EAAE;AAClE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;YAEhE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,GAAG,GAAG,CAAC;AAEvC,YAAA,OAAO,YAAY,CAAC,GAAG,CAAC;;;AAG7B;;;;"}
1
+ {"version":3,"file":"baseClient.cjs","sources":["../../../../src/clients/baseClient.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unnecessary-condition */\nimport type { AxiosInstance } from 'axios';\nimport axios from 'axios';\nimport { getAuthenticationToken } from '~/services';\nimport type { Callback } from '~/callback';\nimport type { Client } from './client';\nimport { ConfigSchema, type Config, type Error as ConfluenceError } from '~/config';\nimport type { RequestConfig } from '~/requestConfig';\nimport { ZodError } from 'zod';\n\nconst ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token';\nconst ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = 'no-check';\n\nexport class BaseClient implements Client {\n #instance: AxiosInstance | undefined;\n\n constructor(protected readonly config: Config) {\n this.config.apiPrefix = this.config.apiPrefix || '/wiki/rest/';\n\n try {\n this.config = ConfigSchema.parse(this.config);\n } catch (e) {\n if (e instanceof ZodError && e.errors[0].code === 'invalid_string') {\n throw new Error(e.errors[0].message);\n }\n\n throw e;\n }\n }\n\n protected paramSerializer(parameters: Record<string, any>): string {\n const parts: string[] = [];\n\n Object.entries(parameters).forEach(([key, value]) => {\n if (value === null || typeof value === 'undefined') {\n return;\n }\n\n if (Array.isArray(value)) {\n value = value.join(',');\n }\n\n if (value instanceof Date) {\n value = value.toISOString();\n } else if (value !== null && typeof value === 'object') {\n value = JSON.stringify(value);\n } else if (value instanceof Function) {\n const part = value();\n\n return part && parts.push(part);\n }\n\n parts.push(`${this.encode(key)}=${this.encode(value)}`);\n });\n\n return parts.join('&');\n }\n\n protected encode(value: string) {\n return encodeURIComponent(value)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+')\n .replace(/%5B/gi, '[')\n .replace(/%5D/gi, ']');\n }\n\n protected removeUndefinedProperties(obj: Record<string, any>): Record<string, any> {\n return Object.entries(obj)\n .filter(([, value]) => typeof value !== 'undefined')\n .reduce((accumulator, [key, value]) => ({ ...accumulator, [key]: value }), {});\n }\n\n private get instance() {\n if (this.#instance) {\n return this.#instance;\n }\n\n this.#instance = axios.create({\n paramsSerializer: this.paramSerializer.bind(this),\n ...this.config.baseRequestConfig,\n baseURL: `${this.config.host}${this.config.apiPrefix}`,\n headers: this.removeUndefinedProperties({\n [ATLASSIAN_TOKEN_CHECK_FLAG]: this.config.noCheckAtlassianToken\n ? ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE\n : undefined,\n ...this.config.baseRequestConfig?.headers,\n }),\n });\n\n return this.#instance;\n }\n\n async sendRequest<T>(requestConfig: RequestConfig, callback: never): Promise<T>;\n async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T>): Promise<void>;\n async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T> | never): Promise<void | T> {\n try {\n const modifiedRequestConfig = {\n ...requestConfig,\n headers: this.removeUndefinedProperties({\n Authorization: await getAuthenticationToken(this.config.authentication, {\n baseURL: this.config.host,\n url: this.instance.getUri(requestConfig),\n method: requestConfig.method!,\n }),\n ...requestConfig.headers,\n }),\n };\n\n const response = await this.instance.request<T>(modifiedRequestConfig);\n\n const callbackResponseHandler = callback && ((data: T): void => callback(null, data));\n const defaultResponseHandler = (data: T): T => data;\n\n const responseHandler = callbackResponseHandler ?? defaultResponseHandler;\n\n this.config.middlewares?.onResponse?.(response.data);\n\n return responseHandler(response.data);\n } catch (e: any) {\n const err = e.isAxiosError ? e.response.data : e;\n\n const callbackErrorHandler = callback && ((error: ConfluenceError) => callback(error));\n const defaultErrorHandler = (error: Error) => {\n throw error;\n };\n\n const errorHandler = callbackErrorHandler ?? defaultErrorHandler;\n\n this.config.middlewares?.onError?.(err);\n\n return errorHandler(err);\n }\n }\n}\n"],"names":["config","ConfigSchema","ZodError","getAuthentic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AC,CAAC;YACrF,MAAM,sBAAsB,GAAG,CAAC,IAAO,KAAQ,IAAI;AAEnD,YAAA,MAAM,eAAe,GAAG,uBAAuB,IAAI,sBAAsB;AAEzE,YAAA,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC;AAEpD,YAAA,OAAO,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC;QACvC;QAAE,OAAO,CAAM,EAAE;AACf,YAAA,MAAM,GAAG,GAAG,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC;AAEhD,YAAA,MAAM,oBAAoB,GAAG,QAAQ,KAAK,CAAC,KAAsB,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtF,YAAA,MAAM,mBAAmB,GAAG,CAAC,KAAY,KAAI;AAC3C,gBAAA,MAAM,KAAK;AACb,YAAA,CAAC;AAED,YAAA,MAAM,YAAY,GAAG,oBAAoB,IAAI,mBAAmB;YAEhE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,GAAG,GAAG,CAAC;AAEvC,YAAA,OAAO,YAAY,CAAC,GAAG,CAAC;QAC1B;IACF;AACD;;;;"}
@@ -32,6 +32,7 @@ var spaceSettings = require('../api/spaceSettings.cjs');
32
32
  var template = require('../api/template.cjs');
33
33
  var themes = require('../api/themes.cjs');
34
34
  var users = require('../api/users.cjs');
35
+ var userProperties = require('../api/userProperties.cjs');
35
36
 
36
37
  class ConfluenceClient extends baseClient.BaseClient {
37
38
  constructor(config) {
@@ -46,10 +47,12 @@ class ConfluenceClient extends baseClient.BaseClient {
46
47
  contentAttachments = new contentAttachments.ContentAttachments(this);
47
48
  contentBody = new contentBody.ContentBody(this);
48
49
  contentChildrenAndDescendants = new contentChildrenAndDescendants.ContentChildrenAndDescendants(this);
50
+ /** @deprecated Will be removed in next major version. */
49
51
  contentComments = new contentComments.ContentComments(this);
50
52
  contentLabels = new contentLabels.ContentLabels(this);
51
53
  contentMacroBody = new contentMacroBody.ContentMacroBody(this);
52
54
  contentPermissions = new contentPermissions.ContentPermissions(this);
55
+ /** @deprecated Will be removed in next major version. */
53
56
  contentProperties = new contentProperties.ContentProperties(this);
54
57
  contentRestrictions = new contentRestrictions.ContentRestrictions(this);
55
58
  contentStates = new contentStates.ContentStates(this);
@@ -58,6 +61,7 @@ class ConfluenceClient extends baseClient.BaseClient {
58
61
  dynamicModules = new dynamicModules.DynamicModules(this);
59
62
  experimental = new experimental.Experimental(this);
60
63
  group = new group.Group(this);
64
+ /** @deprecated Will be removed in next major version. */
61
65
  inlineTasks = new inlineTasks.InlineTasks(this);
62
66
  labelInfo = new labelInfo.LabelInfo(this);
63
67
  longRunningTask = new longRunningTask.LongRunningTask(this);
@@ -66,11 +70,13 @@ class ConfluenceClient extends baseClient.BaseClient {
66
70
  settings = new settings.Settings(this);
67
71
  space = new space.Space(this);
68
72
  spacePermissions = new spacePermissions.SpacePermissions(this);
73
+ /** @deprecated Will be removed in next major version. */
69
74
  spaceProperties = new spaceProperties.SpaceProperties(this);
70
75
  spaceSettings = new spaceSettings.SpaceSettings(this);
71
76
  template = new template.Template(this);
72
77
  themes = new themes.Themes(this);
73
78
  users = new users.Users(this);
79
+ userProperties = new userProperties.UserProperties(this);
74
80
  }
75
81
 
76
82
  exports.ConfluenceClient = ConfluenceClient;
@@ -1 +1 @@
1
- {"version":3,"file":"confluenceClient.cjs","sources":["../../../../src/clients/confluenceClient.ts"],"sourcesContent":["import { BaseClient } from './baseClient';\nimport type { Config } from '../config';\nimport {\n Analytics,\n Audit,\n Content,\n ContentAttachments,\n ContentBody,\n ContentChildrenAndDescendants,\n ContentComments,\n ContentLabels,\n ContentMacroBody,\n ContentPermissions,\n ContentProperties,\n ContentRestrictions,\n ContentStates,\n ContentVersions,\n ContentWatches,\n DynamicModules,\n Experimental,\n Group,\n InlineTasks,\n LabelInfo,\n LongRunningTask,\n Relation,\n Search,\n Settings,\n Space,\n SpacePermissions,\n SpaceProperties,\n SpaceSettings,\n Template,\n Themes,\n Users,\n} from '../api';\n\nexport class ConfluenceClient extends BaseClient {\n constructor(config: Config) {\n super({\n ...config,\n apiPrefix: config.apiPrefix ?? '/wiki/rest',\n });\n }\n\n analytics = new Analytics(this);\n audit = new Audit(this);\n content = new Content(this);\n contentAttachments = new ContentAttachments(this);\n contentBody = new ContentBody(this);\n contentChildrenAndDescendants = new ContentChildrenAndDescendants(this);\n contentComments = new ContentComments(this);\n contentLabels = new ContentLabels(this);\n contentMacroBody = new ContentMacroBody(this);\n contentPermissions = new ContentPermissions(this);\n contentProperties = new ContentProperties(this);\n contentRestrictions = new ContentRestrictions(this);\n contentStates = new ContentStates(this);\n contentVersions = new ContentVersions(this);\n contentWatches = new ContentWatches(this);\n dynamicModules = new DynamicModules(this);\n experimental = new Experimental(this);\n group = new Group(this);\n inlineTasks = new InlineTasks(this);\n labelInfo = new LabelInfo(this);\n longRunningTask = new LongRunningTask(this);\n relation = new Relation(this);\n search = new Search(this);\n settings = new Settings(this);\n space = new Space(this);\n spacePermissions = new SpacePermissions(this);\n spaceProperties = new SpaceProperties(this);\n spaceSettings = new SpaceSettings(this);\n template = new Template(this);\n themes = new Themes(this);\n users = new Users(this);\n}\n"],"names":["BaseClient","Analytics","Audit","Content","ContentAttachments","ContentBody","ContentChildrenAndDescendants","ContentComments","ContentLabels","ContentMacroBody","ContentPermissions","ContentProperties","ContentRestrictions","ContentStates","ContentVersions","ContentWatches","DynamicModules","Experimental","Group","InlineTasks","LabelInfo","LongRunningTask","Relation","Search","Settings","Space","SpacePermissions","SpaceProperties","SpaceSettings","Template","Themes","Users"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCM,MAAO,gBAAiB,SAAQA,qBAAU,CAAA;AAC9C,IAAA,WAAA,CAAY,MAAc,EAAA;AACxB,QAAA,KAAK,CAAC;AACJ,YAAA,GAAG,MAAM;AACT,YAAA,SAAS,EAAE,MAAM,CAAC,SAAS,I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C,IAAI,CAAC;AAC3C,IAAA,QAAQ,GAAG,IAAIC,iBAAQ,CAAC,IAAI,CAAC;AAC7B,IAAA,MAAM,GAAG,IAAIC,aAAM,CAAC,IAAI,CAAC;AACzB,IAAA,QAAQ,GAAG,IAAIC,iBAAQ,CAAC,IAAI,CAAC;AAC7B,IAAA,KAAK,GAAG,IAAIC,WAAK,CAAC,IAAI,CAAC;AACvB,IAAA,gBAAgB,GAAG,IAAIC,iCAAgB,CAAC,IAAI,CAAC;AAC7C,IAAA,eAAe,GAAG,IAAIC,+BAAe,CAAC,IAAI,CAAC;AAC3C,IAAA,aAAa,GAAG,IAAIC,2BAAa,CAAC,IAAI,CAAC;AACvC,IAAA,QAAQ,GAAG,IAAIC,iBAAQ,CAAC,IAAI,CAAC;AAC7B,IAAA,MAAM,GAAG,IAAIC,aAAM,CAAC,IAAI,CAAC;AACzB,IAAA,KAAK,GAAG,IAAIC,WAAK,CAAC,IAAI,CAAC;AACxB;;;;"}
1
+ {"version":3,"file":"confluenceClient.cjs","sources":["../../../../src/clients/confluenceClient.ts"],"sourcesContent":["import { BaseClient } from './baseClient';\nimport type { Config } from '../config';\nimport {\n Analytics,\n Audit,\n Content,\n ContentAttachments,\n ContentBody,\n ContentChildrenAndDescendants,\n ContentComments,\n ContentLabels,\n ContentMacroBody,\n ContentPermissions,\n ContentProperties,\n ContentRestrictions,\n ContentStates,\n ContentVersions,\n ContentWatches,\n DynamicModules,\n Experimental,\n Group,\n InlineTasks,\n LabelInfo,\n LongRunningTask,\n Relation,\n Search,\n Settings,\n Space,\n SpacePermissions,\n SpaceProperties,\n SpaceSettings,\n Template,\n Themes,\n Users,\n UserProperties,\n} from '../api';\n\nexport class ConfluenceClient extends BaseClient {\n constructor(config: Config) {\n super({\n ...config,\n apiPrefix: config.apiPrefix ?? '/wiki/rest',\n });\n }\n\n analytics = new Analytics(this);\n audit = new Audit(this);\n content = new Content(this);\n contentAttachments = new ContentAttachments(this);\n contentBody = new ContentBody(this);\n contentChildrenAndDescendants = new ContentChildrenAndDescendants(this);\n /** @deprecated Will be removed in next major version. */\n contentComments = new ContentComments(this);\n contentLabels = new ContentLabels(this);\n contentMacroBody = new ContentMacroBody(this);\n contentPermissions = new ContentPermissions(this);\n /** @deprecated Will be removed in next major version. */\n contentProperties = new ContentProperties(this);\n contentRestrictions = new ContentRestrictions(this);\n contentStates = new ContentStates(this);\n contentVersions = new ContentVersions(this);\n contentWatches = new ContentWatches(this);\n dynamicModules = new DynamicModules(this);\n experimental = new Experimental(this);\n group = new Group(this);\n /** @deprecated Will be removed in next major version. */\n inlineTasks = new InlineTasks(this);\n labelInfo = new LabelInfo(this);\n longRunningTask = new LongRunningTask(this);\n relation = new Relation(this);\n search = new Search(this);\n settings = new Settings(this);\n space = new Space(this);\n spacePermissions = new SpacePermissions(this);\n /** @deprecated Will be removed in next major version. */\n spaceProperties = new SpaceProperties(this);\n spaceSettings = new SpaceSettings(this);\n template = new Template(this);\n themes = new Themes(this);\n users = new Users(this);\n userProperties = new UserProperties(this);\n}\n"],"names":["BaseClient","Analytics","Audit","Content","ContentAttachments","ContentBody","ContentChildrenAndDescendants","ContentComments","ContentLabels","ContentMacroBody","ContentPermissions","ContentProperties","ContentRestrictions","ContentStates","ContentVersions","ContentWatches","DynamicModules","Experimental","Group","InlineTasks","LabelInfo","LongRunningTask","Relation","Search","Settings","Space","SpacePermissions","SpaceProperties","SpaceSettings","Template","Themes","Users","UserProperties"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCM,MAAO,gBAAiB,SAAQA,qBAAU,CAAA;AAC9C,IAAA,WAAA,CAAY,MAAc,EAAA;AACxB,QAAA,KAAK,CAAC;AACJ,YAAA,GAAG,MAAM;AACT,YAAA,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,YAAY;AAC5C,SAAA,CAAC;IACJ;AAEA,IAAA,SAAS,GAAG,IAAIC,mBAAS,CAAC,IAAI,CAAC;AAC/B,IAAA,KAAK,GAAG,IA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