confluence.js 2.0.0-dev20250512202536 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/CHANGELOG.md +52 -2
  2. package/README.md +145 -183
  3. package/dist/cjs/api/analytics.cjs.map +1 -1
  4. package/dist/cjs/api/audit.cjs.map +1 -1
  5. package/dist/cjs/api/content.cjs +0 -5
  6. package/dist/cjs/api/content.cjs.map +1 -1
  7. package/dist/cjs/api/contentAttachments.cjs +1 -0
  8. package/dist/cjs/api/contentAttachments.cjs.map +1 -1
  9. package/dist/cjs/api/contentBody.cjs +18 -0
  10. package/dist/cjs/api/contentBody.cjs.map +1 -1
  11. package/dist/cjs/api/contentChildrenAndDescendants.cjs +2 -0
  12. package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -1
  13. package/dist/cjs/api/contentComments.cjs +1 -0
  14. package/dist/cjs/api/contentComments.cjs.map +1 -1
  15. package/dist/cjs/api/contentLabels.cjs.map +1 -1
  16. package/dist/cjs/api/contentMacroBody.cjs.map +1 -1
  17. package/dist/cjs/api/contentPermissions.cjs.map +1 -1
  18. package/dist/cjs/api/contentProperties.cjs +1 -0
  19. package/dist/cjs/api/contentProperties.cjs.map +1 -1
  20. package/dist/cjs/api/contentRestrictions.cjs.map +1 -1
  21. package/dist/cjs/api/contentStates.cjs +13 -0
  22. package/dist/cjs/api/contentStates.cjs.map +1 -1
  23. package/dist/cjs/api/contentVersions.cjs.map +1 -1
  24. package/dist/cjs/api/contentWatches.cjs.map +1 -1
  25. package/dist/cjs/api/dynamicModules.cjs.map +1 -1
  26. package/dist/cjs/api/experimental.cjs.map +1 -1
  27. package/dist/cjs/api/group.cjs +18 -17
  28. package/dist/cjs/api/group.cjs.map +1 -1
  29. package/dist/cjs/api/index.cjs +2 -0
  30. package/dist/cjs/api/index.cjs.map +1 -1
  31. package/dist/cjs/api/inlineTasks.cjs +1 -0
  32. package/dist/cjs/api/inlineTasks.cjs.map +1 -1
  33. package/dist/cjs/api/labelInfo.cjs.map +1 -1
  34. package/dist/cjs/api/longRunningTask.cjs +1 -0
  35. package/dist/cjs/api/longRunningTask.cjs.map +1 -1
  36. package/dist/cjs/api/models/labeledContentType.cjs.map +1 -1
  37. package/dist/cjs/api/relation.cjs.map +1 -1
  38. package/dist/cjs/api/search.cjs +1 -0
  39. package/dist/cjs/api/search.cjs.map +1 -1
  40. package/dist/cjs/api/settings.cjs.map +1 -1
  41. package/dist/cjs/api/space.cjs +4 -2
  42. package/dist/cjs/api/space.cjs.map +1 -1
  43. package/dist/cjs/api/spacePermissions.cjs.map +1 -1
  44. package/dist/cjs/api/spaceProperties.cjs +1 -0
  45. package/dist/cjs/api/spaceProperties.cjs.map +1 -1
  46. package/dist/cjs/api/spaceSettings.cjs.map +1 -1
  47. package/dist/cjs/api/template.cjs.map +1 -1
  48. package/dist/cjs/api/themes.cjs.map +1 -1
  49. package/dist/cjs/api/userProperties.cjs +56 -0
  50. package/dist/cjs/api/userProperties.cjs.map +1 -0
  51. package/dist/cjs/api/users.cjs.map +1 -1
  52. package/dist/cjs/clients/baseClient.cjs.map +1 -1
  53. package/dist/cjs/clients/confluenceClient.cjs +6 -0
  54. package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
  55. package/dist/cjs/config.cjs +3 -1
  56. package/dist/cjs/config.cjs.map +1 -1
  57. package/dist/cjs/paramSerializer.cjs.map +1 -1
  58. package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
  59. package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
  60. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
  61. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
  62. package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
  63. package/dist/esm/api/analytics.mjs.map +1 -1
  64. package/dist/esm/api/audit.mjs.map +1 -1
  65. package/dist/esm/api/content.mjs +0 -5
  66. package/dist/esm/api/content.mjs.map +1 -1
  67. package/dist/esm/api/contentAttachments.mjs +1 -0
  68. package/dist/esm/api/contentAttachments.mjs.map +1 -1
  69. package/dist/esm/api/contentBody.mjs +18 -0
  70. package/dist/esm/api/contentBody.mjs.map +1 -1
  71. package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
  72. package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
  73. package/dist/esm/api/contentComments.mjs +1 -0
  74. package/dist/esm/api/contentComments.mjs.map +1 -1
  75. package/dist/esm/api/contentLabels.mjs.map +1 -1
  76. package/dist/esm/api/contentMacroBody.mjs.map +1 -1
  77. package/dist/esm/api/contentPermissions.mjs.map +1 -1
  78. package/dist/esm/api/contentProperties.mjs +1 -0
  79. package/dist/esm/api/contentProperties.mjs.map +1 -1
  80. package/dist/esm/api/contentRestrictions.mjs.map +1 -1
  81. package/dist/esm/api/contentStates.mjs +13 -0
  82. package/dist/esm/api/contentStates.mjs.map +1 -1
  83. package/dist/esm/api/contentVersions.mjs.map +1 -1
  84. package/dist/esm/api/contentWatches.mjs.map +1 -1
  85. package/dist/esm/api/dynamicModules.mjs.map +1 -1
  86. package/dist/esm/api/experimental.mjs.map +1 -1
  87. package/dist/esm/api/group.mjs +18 -17
  88. package/dist/esm/api/group.mjs.map +1 -1
  89. package/dist/esm/api/index.mjs +1 -0
  90. package/dist/esm/api/index.mjs.map +1 -1
  91. package/dist/esm/api/inlineTasks.mjs +1 -0
  92. package/dist/esm/api/inlineTasks.mjs.map +1 -1
  93. package/dist/esm/api/labelInfo.mjs.map +1 -1
  94. package/dist/esm/api/longRunningTask.mjs +1 -0
  95. package/dist/esm/api/longRunningTask.mjs.map +1 -1
  96. package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
  97. package/dist/esm/api/relation.mjs.map +1 -1
  98. package/dist/esm/api/search.mjs +1 -0
  99. package/dist/esm/api/search.mjs.map +1 -1
  100. package/dist/esm/api/settings.mjs.map +1 -1
  101. package/dist/esm/api/space.mjs +4 -2
  102. package/dist/esm/api/space.mjs.map +1 -1
  103. package/dist/esm/api/spacePermissions.mjs.map +1 -1
  104. package/dist/esm/api/spaceProperties.mjs +1 -0
  105. package/dist/esm/api/spaceProperties.mjs.map +1 -1
  106. package/dist/esm/api/spaceSettings.mjs.map +1 -1
  107. package/dist/esm/api/template.mjs.map +1 -1
  108. package/dist/esm/api/themes.mjs.map +1 -1
  109. package/dist/esm/api/userProperties.mjs +54 -0
  110. package/dist/esm/api/userProperties.mjs.map +1 -0
  111. package/dist/esm/api/users.mjs.map +1 -1
  112. package/dist/esm/clients/baseClient.mjs.map +1 -1
  113. package/dist/esm/clients/confluenceClient.mjs +6 -0
  114. package/dist/esm/clients/confluenceClient.mjs.map +1 -1
  115. package/dist/esm/config.mjs +3 -1
  116. package/dist/esm/config.mjs.map +1 -1
  117. package/dist/esm/paramSerializer.mjs.map +1 -1
  118. package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
  119. package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
  120. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
  121. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
  122. package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
  123. package/dist/esm/types/api/analytics.d.ts +1 -1
  124. package/dist/esm/types/api/audit.d.ts +3 -3
  125. package/dist/esm/types/api/content.d.ts +33 -7
  126. package/dist/esm/types/api/contentAttachments.d.ts +5 -1
  127. package/dist/esm/types/api/contentBody.d.ts +73 -7
  128. package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
  129. package/dist/esm/types/api/contentComments.d.ts +5 -0
  130. package/dist/esm/types/api/contentLabels.d.ts +17 -9
  131. package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
  132. package/dist/esm/types/api/contentPermissions.d.ts +1 -1
  133. package/dist/esm/types/api/contentProperties.d.ts +25 -0
  134. package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
  135. package/dist/esm/types/api/contentStates.d.ts +23 -5
  136. package/dist/esm/types/api/contentVersions.d.ts +9 -1
  137. package/dist/esm/types/api/contentWatches.d.ts +1 -1
  138. package/dist/esm/types/api/dynamicModules.d.ts +1 -1
  139. package/dist/esm/types/api/experimental.d.ts +21 -1
  140. package/dist/esm/types/api/group.d.ts +47 -27
  141. package/dist/esm/types/api/index.d.ts +1 -0
  142. package/dist/esm/types/api/inlineTasks.d.ts +13 -0
  143. package/dist/esm/types/api/labelInfo.d.ts +1 -1
  144. package/dist/esm/types/api/longRunningTask.d.ts +1 -1
  145. package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
  146. package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
  147. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
  148. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
  149. package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
  150. package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
  151. package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
  152. package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
  153. package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
  154. package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
  155. package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
  156. package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
  157. package/dist/esm/types/api/parameters/index.d.ts +4 -0
  158. package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
  159. package/dist/esm/types/api/relation.d.ts +13 -15
  160. package/dist/esm/types/api/search.d.ts +7 -1
  161. package/dist/esm/types/api/settings.d.ts +5 -1
  162. package/dist/esm/types/api/space.d.ts +23 -7
  163. package/dist/esm/types/api/spacePermissions.d.ts +1 -1
  164. package/dist/esm/types/api/spaceProperties.d.ts +25 -0
  165. package/dist/esm/types/api/spaceSettings.d.ts +1 -1
  166. package/dist/esm/types/api/template.d.ts +1 -1
  167. package/dist/esm/types/api/themes.d.ts +1 -1
  168. package/dist/esm/types/api/userProperties.d.ts +102 -0
  169. package/dist/esm/types/api/users.d.ts +21 -9
  170. package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
  171. package/eslint.config.ts +11 -16
  172. package/package.json +29 -28
  173. package/src/api/analytics.ts +1 -1
  174. package/src/api/audit.ts +3 -3
  175. package/src/api/content.ts +33 -12
  176. package/src/api/contentAttachments.ts +6 -1
  177. package/src/api/contentBody.ts +113 -7
  178. package/src/api/contentChildrenAndDescendants.ts +39 -5
  179. package/src/api/contentComments.ts +5 -0
  180. package/src/api/contentLabels.ts +17 -9
  181. package/src/api/contentMacroBody.ts +79 -1
  182. package/src/api/contentPermissions.ts +1 -1
  183. package/src/api/contentProperties.ts +25 -0
  184. package/src/api/contentRestrictions.ts +19 -7
  185. package/src/api/contentStates.ts +47 -5
  186. package/src/api/contentVersions.ts +9 -1
  187. package/src/api/contentWatches.ts +1 -1
  188. package/src/api/dynamicModules.ts +1 -1
  189. package/src/api/experimental.ts +21 -1
  190. package/src/api/group.ts +96 -75
  191. package/src/api/index.ts +1 -0
  192. package/src/api/inlineTasks.ts +13 -0
  193. package/src/api/labelInfo.ts +1 -1
  194. package/src/api/longRunningTask.ts +2 -1
  195. package/src/api/models/spaceCreate.ts +11 -2
  196. package/src/api/models/spacePrivateCreate.ts +11 -2
  197. package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
  198. package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
  199. package/src/api/parameters/deleteGroupById.ts +4 -0
  200. package/src/api/parameters/downloadAttachment.ts +6 -0
  201. package/src/api/parameters/getContentChildren.ts +7 -1
  202. package/src/api/parameters/getContentsWithState.ts +17 -0
  203. package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
  204. package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
  205. package/src/api/parameters/getTasks.ts +2 -0
  206. package/src/api/parameters/getUser.ts +4 -0
  207. package/src/api/parameters/index.ts +4 -0
  208. package/src/api/parameters/searchUser.ts +7 -0
  209. package/src/api/relation.ts +13 -15
  210. package/src/api/search.ts +8 -1
  211. package/src/api/settings.ts +5 -1
  212. package/src/api/space.ts +27 -9
  213. package/src/api/spacePermissions.ts +1 -1
  214. package/src/api/spaceProperties.ts +25 -0
  215. package/src/api/spaceSettings.ts +1 -1
  216. package/src/api/template.ts +1 -1
  217. package/src/api/themes.ts +1 -1
  218. package/src/api/userProperties.ts +185 -0
  219. package/src/api/users.ts +21 -9
  220. package/src/clients/baseClient.ts +1 -5
  221. package/src/clients/confluenceClient.ts +6 -0
  222. package/src/config.ts +4 -1
  223. package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
  224. package/favicon.svg +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"relation.mjs","sources":["../../../../src/api/relation.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 Relation {\n constructor(private client: Client) {}\n\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an\n * example custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findTargetFromSource<T = Models.RelationArray>(\n parameters: Parameters.FindTargetFromSource,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an\n * example custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findTargetFromSource<T = Models.RelationArray>(\n parameters: Parameters.FindTargetFromSource,\n callback?: never,\n ): Promise<T>;\n async findTargetFromSource<T = Models.RelationArray>(\n parameters: Parameters.FindTargetFromSource,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}`,\n method: 'GET',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\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 * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships\n * are one way.\n *\n * For example, you can use this method to find whether the current user has selected a particular page as a favorite\n * (i.e. 'save for later'): `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async getRelationship<T = Models.Relation>(\n parameters: Parameters.GetRelationship,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships\n * are one way.\n *\n * For example, you can use this method to find whether the current user has selected a particular page as a favorite\n * (i.e. 'save for later'): `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/favourite/from/user/current/to/content/123`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async getRelationship<T = Models.Relation>(parameters: Parameters.GetRelationship, callback?: never): Promise<T>;\n async getRelationship<T = Models.Relation>(\n parameters: Parameters.GetRelationship,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`,\n method: 'GET',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by\n * default, but you can use this method to create any type of relationship between two entities.\n *\n * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async createRelationship<T = Models.Relation>(\n parameters: Parameters.CreateRelationship,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by\n * default, but you can use this method to create any type of relationship between two entities.\n *\n * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/sibling/from/content/123/to/content/456`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async createRelationship<T = Models.Relation>(\n parameters: Parameters.CreateRelationship,\n callback?: never,\n ): Promise<T>;\n async createRelationship<T = Models.Relation>(\n parameters: Parameters.CreateRelationship,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`,\n method: 'PUT',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a relationship between two entities (user, space, content).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite\n * relationships. A space administrator can delete favourite relationships for any user.\n */\n async deleteRelationship<T = void>(parameters: Parameters.DeleteRelationship, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a relationship between two entities (user, space, content).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite\n * relationships. A space administrator can delete favourite relationships for any user.\n */\n async deleteRelationship<T = void>(parameters: Parameters.DeleteRelationship, callback?: never): Promise<T>;\n async deleteRelationship<T = void>(\n parameters: Parameters.DeleteRelationship,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`,\n method: 'DELETE',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content\n * with an ID of '1234': `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` Note,\n * 'collaborator' is an example custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findSourcesForTarget<T = Models.RelationArray>(\n parameters: Parameters.FindSourcesForTarget,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content\n * with an ID of '1234': `GET\n * https://your-domain.atlassian.net/wiki/rest/api/relation/collaborator/to/content/1234/from/user` Note,\n * 'collaborator' is an example custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findSourcesForTarget<T = Models.RelationArray>(\n parameters: Parameters.FindSourcesForTarget,\n callback?: never,\n ): Promise<T>;\n async findSourcesForTarget<T = Models.RelationArray>(\n parameters: Parameters.FindSourcesForTarget,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/to/${parameters.targetType}/${parameters.targetKey}/from/${parameters.sourceType}`,\n method: 'GET',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\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":[],"mappings":"MAMa,QAAQ,CAAA;AACC,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAgC1B,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAiB,cAAA,EAAA,UAAU,CAAC,YAAY,SAAS,UAAU,CAAC,UAAU,CAAA,CAAA,EAAI,UAAU,CAAC,SAAS,OAAO,UAAU,CAAC,UAAU,CAAE,CAAA;AACjI,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,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AAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"relation.mjs","sources":["../../../../src/api/relation.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 Relation {\n constructor(private client: Client) {}\n\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET\n * https://your-domain.atlassian.net/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an example\n * custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findTargetFromSource<T = Models.RelationArray>(\n parameters: Parameters.FindTargetFromSource,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET\n * https://your-domain.atlassian.net/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an example\n * custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findTargetFromSource<T = Models.RelationArray>(\n parameters: Parameters.FindTargetFromSource,\n callback?: never,\n ): Promise<T>;\n async findTargetFromSource<T = Models.RelationArray>(\n parameters: Parameters.FindTargetFromSource,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}`,\n method: 'GET',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\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 * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships\n * are one way.\n *\n * For example, you can use this method to find whether the current user has selected a particular page as a favorite\n * (i.e. 'save for later'): `GET\n * https://your-domain.atlassian.net/api/relation/favourite/from/user/current/to/content/123`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async getRelationship<T = Models.Relation>(\n parameters: Parameters.GetRelationship,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships\n * are one way.\n *\n * For example, you can use this method to find whether the current user has selected a particular page as a favorite\n * (i.e. 'save for later'): `GET\n * https://your-domain.atlassian.net/api/relation/favourite/from/user/current/to/content/123`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async getRelationship<T = Models.Relation>(parameters: Parameters.GetRelationship, callback?: never): Promise<T>;\n async getRelationship<T = Models.Relation>(\n parameters: Parameters.GetRelationship,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`,\n method: 'GET',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by\n * default, but you can use this method to create any type of relationship between two entities.\n *\n * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET\n * https://your-domain.atlassian.net/api/relation/sibling/from/content/123/to/content/456`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async createRelationship<T = Models.Relation>(\n parameters: Parameters.CreateRelationship,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by\n * default, but you can use this method to create any type of relationship between two entities.\n *\n * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET\n * https://your-domain.atlassian.net/api/relation/sibling/from/content/123/to/content/456`\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async createRelationship<T = Models.Relation>(\n parameters: Parameters.CreateRelationship,\n callback?: never,\n ): Promise<T>;\n async createRelationship<T = Models.Relation>(\n parameters: Parameters.CreateRelationship,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`,\n method: 'PUT',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a relationship between two entities (user, space, content).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite\n * relationships. A space administrator can delete favourite relationships for any user.\n */\n async deleteRelationship<T = void>(parameters: Parameters.DeleteRelationship, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a relationship between two entities (user, space, content).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite\n * relationships. A space administrator can delete favourite relationships for any user.\n */\n async deleteRelationship<T = void>(parameters: Parameters.DeleteRelationship, callback?: never): Promise<T>;\n async deleteRelationship<T = void>(\n parameters: Parameters.DeleteRelationship,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`,\n method: 'DELETE',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content\n * with an ID of '1234': `GET https://your-domain.atlassian.net/api/relation/collaborator/to/content/1234/from/user`\n * Note, 'collaborator' is an example custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findSourcesForTarget<T = Models.RelationArray>(\n parameters: Parameters.FindSourcesForTarget,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one\n * way.\n *\n * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content\n * with an ID of '1234': `GET https://your-domain.atlassian.net/api/relation/collaborator/to/content/1234/from/user`\n * Note, 'collaborator' is an example custom relationship type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity\n * and source entity.\n */\n async findSourcesForTarget<T = Models.RelationArray>(\n parameters: Parameters.FindSourcesForTarget,\n callback?: never,\n ): Promise<T>;\n async findSourcesForTarget<T = Models.RelationArray>(\n parameters: Parameters.FindSourcesForTarget,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/relation/${parameters.relationName}/to/${parameters.targetType}/${parameters.targetKey}/from/${parameters.sourceType}`,\n method: 'GET',\n params: {\n sourceStatus: parameters.sourceStatus,\n targetStatus: parameters.targetStatus,\n sourceVersion: parameters.sourceVersion,\n targetVersion: parameters.targetVersion,\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":[],"mappings":"MA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aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgCA,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,UAAU,CAAC,YAAY,OAAO,UAAU,CAAC,UAAU,CAAA,CAAA,EAAI,UAAU,CAAC,SAAS,SAAS,UAAU,CAAC,UAAU,CAAA,CAAE;AACjI,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,YAAY,EAAE,UAAU,CAAC,YAAY;gBACrC,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,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;;;;"}
@@ -33,6 +33,7 @@ class Search {
33
33
  start: parameters.start,
34
34
  limit: parameters.limit,
35
35
  expand: parameters.expand,
36
+ sitePermissionTypeFilter: parameters.sitePermissionTypeFilter,
36
37
  },
37
38
  };
38
39
  return this.client.sendRequest(config, callback);
@@ -1 +1 @@
1
- {"version":3,"file":"search.mjs","sources":["../../../../src/api/search.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 Search {\n constructor(private client: Client) {}\n\n /**\n * Searches for content using the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/)\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only\n * entities that the user has permission to view will be returned.\n */\n async searchByCQL<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchByCQL,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Searches for content using the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/)\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only\n * entities that the user has permission to view will be returned.\n */\n async searchByCQL<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchByCQL,\n callback?: never,\n ): Promise<T>;\n async searchByCQL<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchByCQL,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/search',\n method: 'GET',\n params: {\n cql: parameters.cql,\n cqlcontext: parameters.cqlcontext,\n cursor: parameters.cursor,\n next: parameters.next,\n prev: parameters.prev,\n limit: parameters.limit,\n start: parameters.start,\n includeArchivedSpaces: parameters.includeArchivedSpaces,\n excludeCurrentSpaces: parameters.excludeCurrentSpaces,\n excerpt: parameters.excerpt,\n sitePermissionTypeFilter: parameters.sitePermissionTypeFilter,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Searches for users using user-specific queries from the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * Note that some user fields may be set to null depending on the user's privacy settings. These are: email,\n * profilePicture, displayName, and timeZone.\n */\n async searchUser<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchUser,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Searches for users using user-specific queries from the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * Note that some user fields may be set to null depending on the user's privacy settings. These are: email,\n * profilePicture, displayName, and timeZone.\n */\n async searchUser<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchUser,\n callback?: never,\n ): Promise<T>;\n async searchUser<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/search/user',\n method: 'GET',\n params: {\n cql: parameters.cql,\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"],"names":[],"mappings":"MAMa,MAAM,CAAA;AACG,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAgC1B,IAAA,MAAM,WAAW,CACf,UAAkC,EAClC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,aAAa;AAClB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,oBAAoB,EAAE,UAAU,CAAC,oBAAoB;gBACrD,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,wBAAwB,EAAE,UAAU,CAAC,wBAAwB;gBAC7D,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAyBlD,IAAA,MAAM,UAAU,CACd,UAAiC,EACjC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,kBAAkB;AACvB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"search.mjs","sources":["../../../../src/api/search.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 Search {\n constructor(private client: Client) {}\n\n /**\n * Searches for content using the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/)\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only\n * entities that the user has permission to view will be returned.\n */\n async searchByCQL<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchByCQL,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Searches for content using the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/)\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only\n * entities that the user has permission to view will be returned.\n */\n async searchByCQL<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchByCQL,\n callback?: never,\n ): Promise<T>;\n async searchByCQL<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchByCQL,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/search',\n method: 'GET',\n params: {\n cql: parameters.cql,\n cqlcontext: parameters.cqlcontext,\n cursor: parameters.cursor,\n next: parameters.next,\n prev: parameters.prev,\n limit: parameters.limit,\n start: parameters.start,\n includeArchivedSpaces: parameters.includeArchivedSpaces,\n excludeCurrentSpaces: parameters.excludeCurrentSpaces,\n excerpt: parameters.excerpt,\n sitePermissionTypeFilter: parameters.sitePermissionTypeFilter,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Searches for users using user-specific queries from the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * Note that CQL input queries submitted through the `/api/search/user` endpoint only support user-specific fields\n * like `user`, `user.fullname`, `user.accountid`, and `user.userkey`.\n *\n * Note that some user fields may be set to null depending on the user's privacy settings. These are: email,\n * profilePicture, displayName, and timeZone.\n */\n async searchUser<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchUser,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Searches for users using user-specific queries from the [Confluence Query Language\n * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * Note that CQL input queries submitted through the `/api/search/user` endpoint only support user-specific fields\n * like `user`, `user.fullname`, `user.accountid`, and `user.userkey`.\n *\n * Note that some user fields may be set to null depending on the user's privacy settings. These are: email,\n * profilePicture, displayName, and timeZone.\n */\n async searchUser<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchUser,\n callback?: never,\n ): Promise<T>;\n async searchUser<T = Models.SearchPageResponseSearchResult>(\n parameters: Parameters.SearchUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/search/user',\n method: 'GET',\n params: {\n cql: parameters.cql,\n start: parameters.start,\n limit: parameters.limit,\n expand: parameters.expand,\n sitePermissionTypeFilter: parameters.sitePermissionTypeFilter,\n },\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;AAgCrC,IAAA,MAAM,WAAW,CACf,UAAkC,EAClC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,aAAa;AAClB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,oBAAoB,EAAE,UAAU,CAAC,oBAAoB;gBACrD,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,wBAAwB,EAAE,UAAU,CAAC,wBAAwB;gBAC7D,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA8BA,IAAA,MAAM,UAAU,CACd,UAAiC,EACjC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,kBAAkB;AACvB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,wBAAwB,EAAE,UAAU,CAAC,wBAAwB;AAC9D,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.mjs","sources":["../../../../src/api/settings.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 Settings {\n constructor(private client: Client) {}\n\n /**\n * Returns the look and feel settings for the site or a single space. This includes attributes such as the color\n * scheme, padding, and border radius.\n *\n * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a\n * theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getLookAndFeelSettings<T = Models.LookAndFeelSettings>(\n parameters: Parameters.GetLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the look and feel settings for the site or a single space. This includes attributes such as the color\n * scheme, padding, and border radius.\n *\n * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a\n * theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getLookAndFeelSettings<T = Models.LookAndFeelSettings>(\n parameters?: Parameters.GetLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async getLookAndFeelSettings<T = Models.LookAndFeelSettings>(\n parameters?: Parameters.GetLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's\n * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeel<T = Models.LookAndFeelSelection>(\n parameters: Parameters.UpdateLookAndFeel | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's\n * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeel<T = Models.LookAndFeelSelection>(\n parameters?: Parameters.UpdateLookAndFeel,\n callback?: never,\n ): Promise<T>;\n async updateLookAndFeel<T = Models.LookAndFeelSelection>(\n parameters?: Parameters.UpdateLookAndFeel,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel',\n method: 'PUT',\n data: {\n spaceKey: parameters?.spaceKey,\n lookAndFeelType: parameters?.lookAndFeelType,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated.\n * If no custom settings exist, then a set of custom settings is created.\n *\n * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be\n * overridden.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeelSettings<T = Models.LookAndFeel>(\n parameters: Parameters.UpdateLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated.\n * If no custom settings exist, then a set of custom settings is created.\n *\n * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be\n * overridden.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeelSettings<T = Models.LookAndFeel>(\n parameters?: Parameters.UpdateLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async updateLookAndFeelSettings<T = Models.LookAndFeel>(\n parameters?: Parameters.UpdateLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel/custom',\n method: 'POST',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n data: {\n headings: parameters?.headings,\n links: parameters?.links,\n menus: parameters?.menus,\n header: parameters?.header,\n horizontalHeader: parameters?.horizontalHeader,\n content: parameters?.content,\n bordersAndDividers: parameters?.bordersAndDividers,\n spaceReference: parameters?.spaceReference,\n _links: parameters?.links,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom\n * settings to be the same as the default settings. It does not change which settings (default or custom) are\n * selected. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetLookAndFeelSettings<T = void>(\n parameters: Parameters.ResetLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom\n * settings to be the same as the default settings. It does not change which settings (default or custom) are\n * selected. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetLookAndFeelSettings<T = void>(\n parameters?: Parameters.ResetLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async resetLookAndFeelSettings<T = void>(\n parameters?: Parameters.ResetLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel/custom',\n method: 'DELETE',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setLookAndFeelSettings<T = unknown>(\n parameters: Parameters.SetLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setLookAndFeelSettings<T = unknown>(\n parameters?: Parameters.SetLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async setLookAndFeelSettings<T = unknown>(\n parameters?: Parameters.SetLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel/selected',\n method: 'PUT',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getSystemInfo<T = Models.SystemInfoEntity>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getSystemInfo<T = Models.SystemInfoEntity>(callback?: never): Promise<T>;\n async getSystemInfo<T = Models.SystemInfoEntity>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/systemInfo',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}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AE,gBAAgB;gBAC9C,OAAO,EAAE,UAAU,EAAE,OAAO;gBAC5B,kBAAkB,EAAE,UAAU,EAAE,kBAAkB;gBAClD,cAAc,EAAE,UAAU,EAAE,cAAc;gBAC1C,MAAM,EAAE,UAAU,EAAE,KAAK;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAyBlD,IAAA,MAAM,wBAAwB,CAC5B,UAAgD,EAChD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,kCAAkC;AACvC,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,EAAE,QAAQ;AAC/B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuBlD,IAAA,MAAM,sBAAsB,CAC1B,UAA8C,EAC9C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,oCAAoC;AACzC,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,EAAE,QAAQ;AAC/B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;IAiBlD,MAAM,aAAa,CAA8B,QAAsB,EAAA;AACrE,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,0BAA0B;AAC/B,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
1
+ {"version":3,"file":"settings.mjs","sources":["../../../../src/api/settings.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 Settings {\n constructor(private client: Client) {}\n\n /**\n * Returns the look and feel settings for the site or a single space. This includes attributes such as the color\n * scheme, padding, and border radius.\n *\n * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a\n * theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getLookAndFeelSettings<T = Models.LookAndFeelSettings>(\n parameters: Parameters.GetLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the look and feel settings for the site or a single space. This includes attributes such as the color\n * scheme, padding, and border radius.\n *\n * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a\n * theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getLookAndFeelSettings<T = Models.LookAndFeelSettings>(\n parameters?: Parameters.GetLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async getLookAndFeelSettings<T = Models.LookAndFeelSettings>(\n parameters?: Parameters.GetLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's\n * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeel<T = Models.LookAndFeelSelection>(\n parameters: Parameters.UpdateLookAndFeel | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's\n * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeel<T = Models.LookAndFeelSelection>(\n parameters?: Parameters.UpdateLookAndFeel,\n callback?: never,\n ): Promise<T>;\n async updateLookAndFeel<T = Models.LookAndFeelSelection>(\n parameters?: Parameters.UpdateLookAndFeel,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel',\n method: 'PUT',\n data: {\n spaceKey: parameters?.spaceKey,\n lookAndFeelType: parameters?.lookAndFeelType,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated.\n * If no custom settings exist, then a set of custom settings is created.\n *\n * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be\n * overridden.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeelSettings<T = Models.LookAndFeel>(\n parameters: Parameters.UpdateLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated.\n * If no custom settings exist, then a set of custom settings is created.\n *\n * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be\n * overridden.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateLookAndFeelSettings<T = Models.LookAndFeel>(\n parameters?: Parameters.UpdateLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async updateLookAndFeelSettings<T = Models.LookAndFeel>(\n parameters?: Parameters.UpdateLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel/custom',\n method: 'POST',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n data: {\n headings: parameters?.headings,\n links: parameters?.links,\n menus: parameters?.menus,\n header: parameters?.header,\n horizontalHeader: parameters?.horizontalHeader,\n content: parameters?.content,\n bordersAndDividers: parameters?.bordersAndDividers,\n spaceReference: parameters?.spaceReference,\n _links: parameters?.links,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom\n * settings to be the same as the default settings. It does not change which settings (default or custom) are\n * selected. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetLookAndFeelSettings<T = void>(\n parameters: Parameters.ResetLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom\n * settings to be the same as the default settings. It does not change which settings (default or custom) are\n * selected. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetLookAndFeelSettings<T = void>(\n parameters?: Parameters.ResetLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async resetLookAndFeelSettings<T = void>(\n parameters?: Parameters.ResetLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel/custom',\n method: 'DELETE',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async setLookAndFeelSettings<T = unknown>(\n parameters: Parameters.SetLookAndFeelSettings | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single\n * space. Note, the default space settings are inherited from the current global settings.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n *\n * @deprecated Will be removed in next major version.\n */\n async setLookAndFeelSettings<T = unknown>(\n parameters?: Parameters.SetLookAndFeelSettings,\n callback?: never,\n ): Promise<T>;\n async setLookAndFeelSettings<T = unknown>(\n parameters?: Parameters.SetLookAndFeelSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/lookandfeel/selected',\n method: 'PUT',\n params: {\n spaceKey: parameters?.spaceKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getSystemInfo<T = Models.SystemInfoEntity>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getSystemInfo<T = Models.SystemInfoEntity>(callback?: never): Promise<T>;\n async getSystemInfo<T = Models.SystemInfoEntity>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/systemInfo',\n method: 'GET',\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;AA4BrC,IAAA,MAAM,sBAAsB,CAC1B,UAA8C,EAC9C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,2BAA2B;AAChC,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,EAAE,QAAQ;AAC/B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAwBA,IAAA,MAAM,iBAAiB,CACrB,U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EAAE,QAAQ;AAC/B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA0BA,IAAA,MAAM,sBAAsB,CAC1B,UAA8C,EAC9C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,oCAAoC;AACzC,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,EAAE,QAAQ;AAC/B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;IAgBA,MAAM,aAAa,CAA8B,QAAsB,EAAA;AACrE,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,0BAA0B;AAC/B,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -29,8 +29,9 @@ class Space {
29
29
  url: '/api/space',
30
30
  method: 'POST',
31
31
  data: {
32
- key: parameters?.key,
33
32
  name: parameters?.name,
33
+ key: parameters?.key,
34
+ alias: parameters?.alias,
34
35
  description: parameters?.description,
35
36
  permissions: parameters?.permissions,
36
37
  },
@@ -42,8 +43,9 @@ class Space {
42
43
  url: '/api/space/_private',
43
44
  method: 'POST',
44
45
  data: {
45
- key: parameters?.key,
46
46
  name: parameters?.name,
47
+ key: parameters?.key,
48
+ alias: parameters?.alias,
47
49
  description: parameters?.description,
48
50
  permissions: parameters?.permissions,
49
51
  },
@@ -1 +1 @@
1
- {"version":3,"file":"space.mjs","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":[],"mappings":";;MAOa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAqB1B,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,EAAE,eAAe,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,SAAS,EAAE,UAAU,EAAE,SAAS;gBAChC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB;gBAC9C,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,MAAM,EAAE,UAAU,EAAE,MAAM;AAC3B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAkBlD,IAAA,MAAM,WAAW,CAAmB,UAAmC,EAAE,QAAsB,EAAA;AAC7F,QAAA,MAAM,MAAM,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,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.mjs","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":[],"mappings":";;MAOa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,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AAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"spacePermissions.mjs","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.mjs","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,3 +1,4 @@
1
+ /** @deprecated Will be removed in next major version. */
1
2
  class SpaceProperties {
2
3
  client;
3
4
  constructor(client) {
@@ -1 +1 @@
1
- {"version":3,"file":"spaceProperties.mjs","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;AAE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AAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AACnE,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,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,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.mjs","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,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAwBA,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,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,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;AAwBA,IAAA,MAAM,gBAAgB,CACpB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,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;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"spaceSettings.mjs","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.mjs","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.mjs","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,CAA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EAAE,UAAU,EAAE,KAAK;gBACxB,MAAM,EAAE,UAAU,EAAE,MAAM;AAC3B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA2BlD,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,UAAU,CAAC,iBAAiB,CAAE,CAAA;AACpD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAiClD,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.mjs","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,Q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AU,EAAE,MAAM;AAC3B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA0BA,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,cAAA,EAAiB,UAAU,CAAC,iBAAiB,CAAA,CAAE;AACpD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgCA,IAAA,MAAM,cAAc,CAAW,UAAqC,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.mjs","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,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;IAelD,MAAM,cAAc,CAAmB,QAAsB,EAAA;AAC3D,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,8BAA8B;AACnC,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAelD,IAAA,MAAM,QAAQ,CAAmB,UAA+B,EAAE,QAAsB,EAAA;AACtF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,oBAAA,EAAuB,UAAU,CAAC,QAAQ,CAAE,CAAA;AACjD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAiBlD,IAAA,MAAM,aAAa,CACjB,UAAoC,EACpC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAQ,MAAA,CAAA;AAC9C,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAiBlD,IAAA,MAAM,aAAa,CACjB,UAAoC,EACpC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAQ,MAAA,CAAA;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;;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.mjs","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,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,qBAAqB;AAC1B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;IAcA,MAAM,cAAc,CAAmB,QAAsB,EAAA;AAC3D,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,8BAA8B;AACnC,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAcA,IAAA,MAAM,QAAQ,CAAmB,UAA+B,EAAE,QAAsB,EAAA;AACtF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,oBAAA,EAAuB,UAAU,CAAC,QAAQ,CAAA,CAAE;AACjD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgBA,IAAA,MAAM,aAAa,CACjB,UAAoC,EACpC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,MAAA,CAAQ;AAC9C,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgBA,IAAA,MAAM,aAAa,CACjB,UAAoC,EACpC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,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,54 @@
1
+ class UserProperties {
2
+ client;
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ async getUserProperties(parameters, callback) {
7
+ const config = {
8
+ url: `/api/user/${parameters.userId}/property`,
9
+ method: 'GET',
10
+ params: {
11
+ start: parameters.start,
12
+ limit: parameters.limit,
13
+ },
14
+ };
15
+ return this.client.sendRequest(config, callback);
16
+ }
17
+ async getUserProperty(parameters, callback) {
18
+ const config = {
19
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
20
+ method: 'GET',
21
+ };
22
+ return this.client.sendRequest(config, callback);
23
+ }
24
+ async createUserProperty(parameters, callback) {
25
+ const config = {
26
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
27
+ method: 'POST',
28
+ data: {
29
+ value: parameters.value,
30
+ },
31
+ };
32
+ return this.client.sendRequest(config, callback);
33
+ }
34
+ async updateUserProperty(parameters, callback) {
35
+ const config = {
36
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
37
+ method: 'PUT',
38
+ data: {
39
+ value: parameters.value,
40
+ },
41
+ };
42
+ return this.client.sendRequest(config, callback);
43
+ }
44
+ async deleteUserProperty(parameters, callback) {
45
+ const config = {
46
+ url: `/api/user/${parameters.userId}/property/${parameters.key}`,
47
+ method: 'DELETE',
48
+ };
49
+ return this.client.sendRequest(config, callback);
50
+ }
51
+ }
52
+
53
+ export { UserProperties };
54
+ //# sourceMappingURL=userProperties.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userProperties.mjs","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,SAA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