@resolution/confluence-api-client 0.2.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 (352) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE.md +19 -0
  3. package/README.md +12 -0
  4. package/lib/index.d.ts +36 -0
  5. package/lib/index.js +64 -0
  6. package/lib/index.js.map +1 -0
  7. package/lib/openapi/v1/BaseConfluenceApiV1Client.d.ts +133 -0
  8. package/lib/openapi/v1/BaseConfluenceApiV1Client.js +122 -0
  9. package/lib/openapi/v1/BaseConfluenceApiV1Client.js.map +1 -0
  10. package/lib/openapi/v1/core/CommonHttpClient.d.ts +196 -0
  11. package/lib/openapi/v1/core/CommonHttpClient.js +390 -0
  12. package/lib/openapi/v1/core/CommonHttpClient.js.map +1 -0
  13. package/lib/openapi/v1/core/CommonHttpService.d.ts +7 -0
  14. package/lib/openapi/v1/core/CommonHttpService.js +20 -0
  15. package/lib/openapi/v1/core/CommonHttpService.js.map +1 -0
  16. package/lib/openapi/v1/core/CommonValidationSchemaStorage.d.ts +35 -0
  17. package/lib/openapi/v1/core/CommonValidationSchemaStorage.js +65 -0
  18. package/lib/openapi/v1/core/CommonValidationSchemaStorage.js.map +1 -0
  19. package/lib/openapi/v1/models/audit.d.ts +151 -0
  20. package/lib/openapi/v1/models/audit.js +133 -0
  21. package/lib/openapi/v1/models/audit.js.map +1 -0
  22. package/lib/openapi/v1/models/common.d.ts +645 -0
  23. package/lib/openapi/v1/models/common.js +654 -0
  24. package/lib/openapi/v1/models/common.js.map +1 -0
  25. package/lib/openapi/v1/models/content.d.ts +554 -0
  26. package/lib/openapi/v1/models/content.js +613 -0
  27. package/lib/openapi/v1/models/content.js.map +1 -0
  28. package/lib/openapi/v1/models/contentAttachments.d.ts +26 -0
  29. package/lib/openapi/v1/models/contentAttachments.js +33 -0
  30. package/lib/openapi/v1/models/contentAttachments.js.map +1 -0
  31. package/lib/openapi/v1/models/contentBody.d.ts +36 -0
  32. package/lib/openapi/v1/models/contentBody.js +63 -0
  33. package/lib/openapi/v1/models/contentBody.js.map +1 -0
  34. package/lib/openapi/v1/models/contentChildrenAndDescendants.d.ts +75 -0
  35. package/lib/openapi/v1/models/contentChildrenAndDescendants.js +66 -0
  36. package/lib/openapi/v1/models/contentChildrenAndDescendants.js.map +1 -0
  37. package/lib/openapi/v1/models/contentLabels.d.ts +5 -0
  38. package/lib/openapi/v1/models/contentLabels.js +16 -0
  39. package/lib/openapi/v1/models/contentLabels.js.map +1 -0
  40. package/lib/openapi/v1/models/contentMacroBody.d.ts +12 -0
  41. package/lib/openapi/v1/models/contentMacroBody.js +22 -0
  42. package/lib/openapi/v1/models/contentMacroBody.js.map +1 -0
  43. package/lib/openapi/v1/models/contentPermissions.d.ts +41 -0
  44. package/lib/openapi/v1/models/contentPermissions.js +35 -0
  45. package/lib/openapi/v1/models/contentPermissions.js.map +1 -0
  46. package/lib/openapi/v1/models/contentProperties.d.ts +73 -0
  47. package/lib/openapi/v1/models/contentProperties.js +94 -0
  48. package/lib/openapi/v1/models/contentProperties.js.map +1 -0
  49. package/lib/openapi/v1/models/contentRestrictions.d.ts +65 -0
  50. package/lib/openapi/v1/models/contentRestrictions.js +78 -0
  51. package/lib/openapi/v1/models/contentRestrictions.js.map +1 -0
  52. package/lib/openapi/v1/models/contentStates.d.ts +75 -0
  53. package/lib/openapi/v1/models/contentStates.js +72 -0
  54. package/lib/openapi/v1/models/contentStates.js.map +1 -0
  55. package/lib/openapi/v1/models/contentVersions.d.ts +28 -0
  56. package/lib/openapi/v1/models/contentVersions.js +36 -0
  57. package/lib/openapi/v1/models/contentVersions.js.map +1 -0
  58. package/lib/openapi/v1/models/contentWatches.d.ts +89 -0
  59. package/lib/openapi/v1/models/contentWatches.js +81 -0
  60. package/lib/openapi/v1/models/contentWatches.js.map +1 -0
  61. package/lib/openapi/v1/models/dynamicModules.d.ts +62 -0
  62. package/lib/openapi/v1/models/dynamicModules.js +24 -0
  63. package/lib/openapi/v1/models/dynamicModules.js.map +1 -0
  64. package/lib/openapi/v1/models/group.d.ts +9 -0
  65. package/lib/openapi/v1/models/group.js +23 -0
  66. package/lib/openapi/v1/models/group.js.map +1 -0
  67. package/lib/openapi/v1/models/inlineTasks.d.ts +30 -0
  68. package/lib/openapi/v1/models/inlineTasks.js +48 -0
  69. package/lib/openapi/v1/models/inlineTasks.js.map +1 -0
  70. package/lib/openapi/v1/models/labelInfo.d.ts +21 -0
  71. package/lib/openapi/v1/models/labelInfo.js +42 -0
  72. package/lib/openapi/v1/models/labelInfo.js.map +1 -0
  73. package/lib/openapi/v1/models/longRunningTask.d.ts +116 -0
  74. package/lib/openapi/v1/models/longRunningTask.js +82 -0
  75. package/lib/openapi/v1/models/longRunningTask.js.map +1 -0
  76. package/lib/openapi/v1/models/relation.d.ts +30 -0
  77. package/lib/openapi/v1/models/relation.js +61 -0
  78. package/lib/openapi/v1/models/relation.js.map +1 -0
  79. package/lib/openapi/v1/models/search.d.ts +41 -0
  80. package/lib/openapi/v1/models/search.js +65 -0
  81. package/lib/openapi/v1/models/search.js.map +1 -0
  82. package/lib/openapi/v1/models/settings.d.ts +36 -0
  83. package/lib/openapi/v1/models/settings.js +50 -0
  84. package/lib/openapi/v1/models/settings.js.map +1 -0
  85. package/lib/openapi/v1/models/space.d.ts +118 -0
  86. package/lib/openapi/v1/models/space.js +94 -0
  87. package/lib/openapi/v1/models/space.js.map +1 -0
  88. package/lib/openapi/v1/models/spacePermissions.d.ts +128 -0
  89. package/lib/openapi/v1/models/spacePermissions.js +102 -0
  90. package/lib/openapi/v1/models/spacePermissions.js.map +1 -0
  91. package/lib/openapi/v1/models/spaceProperties.d.ts +96 -0
  92. package/lib/openapi/v1/models/spaceProperties.js +93 -0
  93. package/lib/openapi/v1/models/spaceProperties.js.map +1 -0
  94. package/lib/openapi/v1/models/spaceSettings.d.ts +14 -0
  95. package/lib/openapi/v1/models/spaceSettings.js +17 -0
  96. package/lib/openapi/v1/models/spaceSettings.js.map +1 -0
  97. package/lib/openapi/v1/models/template.d.ts +201 -0
  98. package/lib/openapi/v1/models/template.js +163 -0
  99. package/lib/openapi/v1/models/template.js.map +1 -0
  100. package/lib/openapi/v1/models/themes.d.ts +26 -0
  101. package/lib/openapi/v1/models/themes.js +38 -0
  102. package/lib/openapi/v1/models/themes.js.map +1 -0
  103. package/lib/openapi/v1/models/userProperties.d.ts +41 -0
  104. package/lib/openapi/v1/models/userProperties.js +50 -0
  105. package/lib/openapi/v1/models/userProperties.js.map +1 -0
  106. package/lib/openapi/v1/models/users.d.ts +98 -0
  107. package/lib/openapi/v1/models/users.js +87 -0
  108. package/lib/openapi/v1/models/users.js.map +1 -0
  109. package/lib/openapi/v1/services/AnalyticsService.d.ts +54 -0
  110. package/lib/openapi/v1/services/AnalyticsService.js +98 -0
  111. package/lib/openapi/v1/services/AnalyticsService.js.map +1 -0
  112. package/lib/openapi/v1/services/AuditService.d.ts +163 -0
  113. package/lib/openapi/v1/services/AuditService.js +269 -0
  114. package/lib/openapi/v1/services/AuditService.js.map +1 -0
  115. package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +332 -0
  116. package/lib/openapi/v1/services/ContentAttachmentsService.js +362 -0
  117. package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -0
  118. package/lib/openapi/v1/services/ContentBodyService.d.ts +227 -0
  119. package/lib/openapi/v1/services/ContentBodyService.js +178 -0
  120. package/lib/openapi/v1/services/ContentBodyService.js.map +1 -0
  121. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +621 -0
  122. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +453 -0
  123. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -0
  124. package/lib/openapi/v1/services/ContentCommentsService.d.ts +147 -0
  125. package/lib/openapi/v1/services/ContentCommentsService.js +72 -0
  126. package/lib/openapi/v1/services/ContentCommentsService.js.map +1 -0
  127. package/lib/openapi/v1/services/ContentLabelsService.d.ts +122 -0
  128. package/lib/openapi/v1/services/ContentLabelsService.js +176 -0
  129. package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -0
  130. package/lib/openapi/v1/services/ContentMacroBodyService.d.ts +268 -0
  131. package/lib/openapi/v1/services/ContentMacroBodyService.js +193 -0
  132. package/lib/openapi/v1/services/ContentMacroBodyService.js.map +1 -0
  133. package/lib/openapi/v1/services/ContentPermissionsService.d.ts +34 -0
  134. package/lib/openapi/v1/services/ContentPermissionsService.js +72 -0
  135. package/lib/openapi/v1/services/ContentPermissionsService.js.map +1 -0
  136. package/lib/openapi/v1/services/ContentPropertiesService.d.ts +187 -0
  137. package/lib/openapi/v1/services/ContentPropertiesService.js +285 -0
  138. package/lib/openapi/v1/services/ContentPropertiesService.js.map +1 -0
  139. package/lib/openapi/v1/services/ContentRestrictionsService.d.ts +503 -0
  140. package/lib/openapi/v1/services/ContentRestrictionsService.js +552 -0
  141. package/lib/openapi/v1/services/ContentRestrictionsService.js.map +1 -0
  142. package/lib/openapi/v1/services/ContentService.d.ts +1012 -0
  143. package/lib/openapi/v1/services/ContentService.js +548 -0
  144. package/lib/openapi/v1/services/ContentService.js.map +1 -0
  145. package/lib/openapi/v1/services/ContentStatesService.d.ts +220 -0
  146. package/lib/openapi/v1/services/ContentStatesService.js +439 -0
  147. package/lib/openapi/v1/services/ContentStatesService.js.map +1 -0
  148. package/lib/openapi/v1/services/ContentVersionsService.d.ts +121 -0
  149. package/lib/openapi/v1/services/ContentVersionsService.js +181 -0
  150. package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -0
  151. package/lib/openapi/v1/services/ContentWatchesService.d.ts +550 -0
  152. package/lib/openapi/v1/services/ContentWatchesService.js +502 -0
  153. package/lib/openapi/v1/services/ContentWatchesService.js.map +1 -0
  154. package/lib/openapi/v1/services/DynamicModulesService.d.ts +47 -0
  155. package/lib/openapi/v1/services/DynamicModulesService.js +92 -0
  156. package/lib/openapi/v1/services/DynamicModulesService.js.map +1 -0
  157. package/lib/openapi/v1/services/ExperimentalService.d.ts +113 -0
  158. package/lib/openapi/v1/services/ExperimentalService.js +185 -0
  159. package/lib/openapi/v1/services/ExperimentalService.js.map +1 -0
  160. package/lib/openapi/v1/services/GroupService.d.ts +379 -0
  161. package/lib/openapi/v1/services/GroupService.js +515 -0
  162. package/lib/openapi/v1/services/GroupService.js.map +1 -0
  163. package/lib/openapi/v1/services/InlineTasksService.d.ts +91 -0
  164. package/lib/openapi/v1/services/InlineTasksService.js +155 -0
  165. package/lib/openapi/v1/services/InlineTasksService.js.map +1 -0
  166. package/lib/openapi/v1/services/LabelInfoService.d.ts +28 -0
  167. package/lib/openapi/v1/services/LabelInfoService.js +59 -0
  168. package/lib/openapi/v1/services/LabelInfoService.js.map +1 -0
  169. package/lib/openapi/v1/services/LongRunningTaskService.d.ts +43 -0
  170. package/lib/openapi/v1/services/LongRunningTaskService.js +96 -0
  171. package/lib/openapi/v1/services/LongRunningTaskService.js.map +1 -0
  172. package/lib/openapi/v1/services/RelationService.d.ts +404 -0
  173. package/lib/openapi/v1/services/RelationService.js +270 -0
  174. package/lib/openapi/v1/services/RelationService.js.map +1 -0
  175. package/lib/openapi/v1/services/SearchService.d.ts +175 -0
  176. package/lib/openapi/v1/services/SearchService.js +164 -0
  177. package/lib/openapi/v1/services/SearchService.js.map +1 -0
  178. package/lib/openapi/v1/services/SettingsService.d.ts +143 -0
  179. package/lib/openapi/v1/services/SettingsService.js +249 -0
  180. package/lib/openapi/v1/services/SettingsService.js.map +1 -0
  181. package/lib/openapi/v1/services/SpacePermissionsService.d.ts +68 -0
  182. package/lib/openapi/v1/services/SpacePermissionsService.js +121 -0
  183. package/lib/openapi/v1/services/SpacePermissionsService.js.map +1 -0
  184. package/lib/openapi/v1/services/SpacePropertiesService.d.ts +161 -0
  185. package/lib/openapi/v1/services/SpacePropertiesService.js +275 -0
  186. package/lib/openapi/v1/services/SpacePropertiesService.js.map +1 -0
  187. package/lib/openapi/v1/services/SpaceService.d.ts +479 -0
  188. package/lib/openapi/v1/services/SpaceService.js +394 -0
  189. package/lib/openapi/v1/services/SpaceService.js.map +1 -0
  190. package/lib/openapi/v1/services/SpaceSettingsService.d.ts +40 -0
  191. package/lib/openapi/v1/services/SpaceSettingsService.js +96 -0
  192. package/lib/openapi/v1/services/SpaceSettingsService.js.map +1 -0
  193. package/lib/openapi/v1/services/TemplateService.d.ts +163 -0
  194. package/lib/openapi/v1/services/TemplateService.js +259 -0
  195. package/lib/openapi/v1/services/TemplateService.js.map +1 -0
  196. package/lib/openapi/v1/services/ThemesService.d.ts +101 -0
  197. package/lib/openapi/v1/services/ThemesService.js +228 -0
  198. package/lib/openapi/v1/services/ThemesService.js.map +1 -0
  199. package/lib/openapi/v1/services/UserPropertiesService.d.ts +129 -0
  200. package/lib/openapi/v1/services/UserPropertiesService.js +192 -0
  201. package/lib/openapi/v1/services/UserPropertiesService.js.map +1 -0
  202. package/lib/openapi/v1/services/UsersService.d.ts +181 -0
  203. package/lib/openapi/v1/services/UsersService.js +291 -0
  204. package/lib/openapi/v1/services/UsersService.js.map +1 -0
  205. package/lib/openapi/v1/validationSchemaStorage.d.ts +3 -0
  206. package/lib/openapi/v1/validationSchemaStorage.js +144 -0
  207. package/lib/openapi/v1/validationSchemaStorage.js.map +1 -0
  208. package/lib/openapi/v2/BaseConfluenceApiV2Client.d.ts +88 -0
  209. package/lib/openapi/v2/BaseConfluenceApiV2Client.js +87 -0
  210. package/lib/openapi/v2/BaseConfluenceApiV2Client.js.map +1 -0
  211. package/lib/openapi/v2/core/CommonHttpClient.d.ts +196 -0
  212. package/lib/openapi/v2/core/CommonHttpClient.js +390 -0
  213. package/lib/openapi/v2/core/CommonHttpClient.js.map +1 -0
  214. package/lib/openapi/v2/core/CommonHttpService.d.ts +7 -0
  215. package/lib/openapi/v2/core/CommonHttpService.js +20 -0
  216. package/lib/openapi/v2/core/CommonHttpService.js.map +1 -0
  217. package/lib/openapi/v2/core/CommonValidationSchemaStorage.d.ts +35 -0
  218. package/lib/openapi/v2/core/CommonValidationSchemaStorage.js +65 -0
  219. package/lib/openapi/v2/core/CommonValidationSchemaStorage.js.map +1 -0
  220. package/lib/openapi/v2/models/ancestors.d.ts +11 -0
  221. package/lib/openapi/v2/models/ancestors.js +21 -0
  222. package/lib/openapi/v2/models/ancestors.js.map +1 -0
  223. package/lib/openapi/v2/models/attachment.d.ts +148 -0
  224. package/lib/openapi/v2/models/attachment.js +116 -0
  225. package/lib/openapi/v2/models/attachment.js.map +1 -0
  226. package/lib/openapi/v2/models/blogPost.d.ts +106 -0
  227. package/lib/openapi/v2/models/blogPost.js +134 -0
  228. package/lib/openapi/v2/models/blogPost.js.map +1 -0
  229. package/lib/openapi/v2/models/children.d.ts +29 -0
  230. package/lib/openapi/v2/models/children.js +38 -0
  231. package/lib/openapi/v2/models/children.js.map +1 -0
  232. package/lib/openapi/v2/models/classificationLevel.d.ts +28 -0
  233. package/lib/openapi/v2/models/classificationLevel.js +45 -0
  234. package/lib/openapi/v2/models/classificationLevel.js.map +1 -0
  235. package/lib/openapi/v2/models/comment.d.ts +396 -0
  236. package/lib/openapi/v2/models/comment.js +378 -0
  237. package/lib/openapi/v2/models/comment.js.map +1 -0
  238. package/lib/openapi/v2/models/common.d.ts +200 -0
  239. package/lib/openapi/v2/models/common.js +225 -0
  240. package/lib/openapi/v2/models/common.js.map +1 -0
  241. package/lib/openapi/v2/models/content.d.ts +16 -0
  242. package/lib/openapi/v2/models/content.js +29 -0
  243. package/lib/openapi/v2/models/content.js.map +1 -0
  244. package/lib/openapi/v2/models/contentProperties.d.ts +33 -0
  245. package/lib/openapi/v2/models/contentProperties.js +33 -0
  246. package/lib/openapi/v2/models/contentProperties.js.map +1 -0
  247. package/lib/openapi/v2/models/customContent.d.ts +174 -0
  248. package/lib/openapi/v2/models/customContent.js +163 -0
  249. package/lib/openapi/v2/models/customContent.js.map +1 -0
  250. package/lib/openapi/v2/models/dataPolicies.d.ts +34 -0
  251. package/lib/openapi/v2/models/dataPolicies.js +38 -0
  252. package/lib/openapi/v2/models/dataPolicies.js.map +1 -0
  253. package/lib/openapi/v2/models/database.d.ts +35 -0
  254. package/lib/openapi/v2/models/database.js +38 -0
  255. package/lib/openapi/v2/models/database.js.map +1 -0
  256. package/lib/openapi/v2/models/operation.d.ts +8 -0
  257. package/lib/openapi/v2/models/operation.js +21 -0
  258. package/lib/openapi/v2/models/operation.js.map +1 -0
  259. package/lib/openapi/v2/models/page.d.ts +124 -0
  260. package/lib/openapi/v2/models/page.js +143 -0
  261. package/lib/openapi/v2/models/page.js.map +1 -0
  262. package/lib/openapi/v2/models/smartLink.d.ts +38 -0
  263. package/lib/openapi/v2/models/smartLink.js +38 -0
  264. package/lib/openapi/v2/models/smartLink.js.map +1 -0
  265. package/lib/openapi/v2/models/space.d.ts +87 -0
  266. package/lib/openapi/v2/models/space.js +100 -0
  267. package/lib/openapi/v2/models/space.js.map +1 -0
  268. package/lib/openapi/v2/models/spaceProperties.d.ts +27 -0
  269. package/lib/openapi/v2/models/spaceProperties.js +32 -0
  270. package/lib/openapi/v2/models/spaceProperties.js.map +1 -0
  271. package/lib/openapi/v2/models/task.d.ts +39 -0
  272. package/lib/openapi/v2/models/task.js +39 -0
  273. package/lib/openapi/v2/models/task.js.map +1 -0
  274. package/lib/openapi/v2/models/version.d.ts +139 -0
  275. package/lib/openapi/v2/models/version.js +91 -0
  276. package/lib/openapi/v2/models/version.js.map +1 -0
  277. package/lib/openapi/v2/models/whiteboard.d.ts +37 -0
  278. package/lib/openapi/v2/models/whiteboard.js +39 -0
  279. package/lib/openapi/v2/models/whiteboard.js.map +1 -0
  280. package/lib/openapi/v2/services/AncestorsService.d.ts +143 -0
  281. package/lib/openapi/v2/services/AncestorsService.js +245 -0
  282. package/lib/openapi/v2/services/AncestorsService.js.map +1 -0
  283. package/lib/openapi/v2/services/AttachmentService.d.ts +307 -0
  284. package/lib/openapi/v2/services/AttachmentService.js +370 -0
  285. package/lib/openapi/v2/services/AttachmentService.js.map +1 -0
  286. package/lib/openapi/v2/services/BlogPostService.d.ts +386 -0
  287. package/lib/openapi/v2/services/BlogPostService.js +379 -0
  288. package/lib/openapi/v2/services/BlogPostService.js.map +1 -0
  289. package/lib/openapi/v2/services/ChildrenService.d.ts +85 -0
  290. package/lib/openapi/v2/services/ChildrenService.js +127 -0
  291. package/lib/openapi/v2/services/ChildrenService.js.map +1 -0
  292. package/lib/openapi/v2/services/ClassificationLevelService.d.ts +213 -0
  293. package/lib/openapi/v2/services/ClassificationLevelService.js +340 -0
  294. package/lib/openapi/v2/services/ClassificationLevelService.js.map +1 -0
  295. package/lib/openapi/v2/services/CommentService.d.ts +713 -0
  296. package/lib/openapi/v2/services/CommentService.js +884 -0
  297. package/lib/openapi/v2/services/CommentService.js.map +1 -0
  298. package/lib/openapi/v2/services/ContentPropertiesService.d.ts +844 -0
  299. package/lib/openapi/v2/services/ContentPropertiesService.js +1514 -0
  300. package/lib/openapi/v2/services/ContentPropertiesService.js.map +1 -0
  301. package/lib/openapi/v2/services/ContentService.d.ts +31 -0
  302. package/lib/openapi/v2/services/ContentService.js +62 -0
  303. package/lib/openapi/v2/services/ContentService.js.map +1 -0
  304. package/lib/openapi/v2/services/CustomContentService.d.ts +427 -0
  305. package/lib/openapi/v2/services/CustomContentService.js +423 -0
  306. package/lib/openapi/v2/services/CustomContentService.js.map +1 -0
  307. package/lib/openapi/v2/services/DataPoliciesService.d.ts +64 -0
  308. package/lib/openapi/v2/services/DataPoliciesService.js +108 -0
  309. package/lib/openapi/v2/services/DataPoliciesService.js.map +1 -0
  310. package/lib/openapi/v2/services/DatabaseService.d.ts +82 -0
  311. package/lib/openapi/v2/services/DatabaseService.js +135 -0
  312. package/lib/openapi/v2/services/DatabaseService.js.map +1 -0
  313. package/lib/openapi/v2/services/LabelService.d.ts +271 -0
  314. package/lib/openapi/v2/services/LabelService.js +384 -0
  315. package/lib/openapi/v2/services/LabelService.js.map +1 -0
  316. package/lib/openapi/v2/services/LikeService.d.ts +205 -0
  317. package/lib/openapi/v2/services/LikeService.js +358 -0
  318. package/lib/openapi/v2/services/LikeService.js.map +1 -0
  319. package/lib/openapi/v2/services/OperationService.d.ts +154 -0
  320. package/lib/openapi/v2/services/OperationService.js +374 -0
  321. package/lib/openapi/v2/services/OperationService.js.map +1 -0
  322. package/lib/openapi/v2/services/PageService.d.ts +408 -0
  323. package/lib/openapi/v2/services/PageService.js +381 -0
  324. package/lib/openapi/v2/services/PageService.js.map +1 -0
  325. package/lib/openapi/v2/services/SmartLinkService.d.ts +84 -0
  326. package/lib/openapi/v2/services/SmartLinkService.js +137 -0
  327. package/lib/openapi/v2/services/SmartLinkService.js.map +1 -0
  328. package/lib/openapi/v2/services/SpacePermissionsService.d.ts +36 -0
  329. package/lib/openapi/v2/services/SpacePermissionsService.js +66 -0
  330. package/lib/openapi/v2/services/SpacePermissionsService.js.map +1 -0
  331. package/lib/openapi/v2/services/SpacePropertiesService.d.ts +118 -0
  332. package/lib/openapi/v2/services/SpacePropertiesService.js +213 -0
  333. package/lib/openapi/v2/services/SpacePropertiesService.js.map +1 -0
  334. package/lib/openapi/v2/services/SpaceService.d.ts +141 -0
  335. package/lib/openapi/v2/services/SpaceService.js +133 -0
  336. package/lib/openapi/v2/services/SpaceService.js.map +1 -0
  337. package/lib/openapi/v2/services/TaskService.d.ts +184 -0
  338. package/lib/openapi/v2/services/TaskService.js +165 -0
  339. package/lib/openapi/v2/services/TaskService.js.map +1 -0
  340. package/lib/openapi/v2/services/UserService.d.ts +51 -0
  341. package/lib/openapi/v2/services/UserService.js +83 -0
  342. package/lib/openapi/v2/services/UserService.js.map +1 -0
  343. package/lib/openapi/v2/services/VersionService.d.ts +350 -0
  344. package/lib/openapi/v2/services/VersionService.js +541 -0
  345. package/lib/openapi/v2/services/VersionService.js.map +1 -0
  346. package/lib/openapi/v2/services/WhiteboardService.d.ts +82 -0
  347. package/lib/openapi/v2/services/WhiteboardService.js +135 -0
  348. package/lib/openapi/v2/services/WhiteboardService.js.map +1 -0
  349. package/lib/openapi/v2/validationSchemaStorage.d.ts +3 -0
  350. package/lib/openapi/v2/validationSchemaStorage.js +144 -0
  351. package/lib/openapi/v2/validationSchemaStorage.js.map +1 -0
  352. package/package.json +44 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # 0.2.0 (2024-06-07)
7
+
8
+
9
+ ### Features
10
+
11
+ * first confluence API version ([d580ceb](https://bitbucket.org/resolutiongmbh/atlassian-api-clients/commits/d580cebbab7334f2290c08a307bea5eed8a372a5))
package/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2024 resolution Reichert Network Solutions GmbH
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,12 @@
1
+ # confluence-api-client
2
+
3
+ Atlassian Confluence API client based on OpenAPI schema.
4
+
5
+ Compatible with the following request/fetch Atlassian libraries:
6
+
7
+ * [atlassian-connect-express](https://bitbucket.org/atlassian/atlassian-connect-express)
8
+ * [atlassian-connect-js](https://bitbucket.org/atlassian/atlassian-connect-js)
9
+ * [@forge/api](https://developer.atlassian.com/cloud/jira/platform/forge/)
10
+ * [@forge/bridge](https://developer.atlassian.com/cloud/jira/platform/forge/)
11
+
12
+ More details will follow.
package/lib/index.d.ts ADDED
@@ -0,0 +1,36 @@
1
+ import { type ApiClientAceOptions, type ApiClientApOptions, type ApiClientForgeApiExternalOptions, type ApiClientForgeApiOptions, ApiError, type ConfluenceApiClientForgeBridgeOptions, type JiraApiClientForgeBridgeOptions } from "@resolution/atlassian-api-common";
2
+ import { BaseConfluenceApiV1Client } from "./openapi/v1/BaseConfluenceApiV1Client";
3
+ import { BaseConfluenceApiV2Client } from "./openapi/v2/BaseConfluenceApiV2Client";
4
+ export * from "./openapi/v1/BaseConfluenceApiV1Client";
5
+ export * from "./openapi/v2/BaseConfluenceApiV2Client";
6
+ export { ApiError };
7
+ /**
8
+ * The Confluence REST API V2 Client.
9
+ */
10
+ export declare class ConfluenceApi extends BaseConfluenceApiV2Client {
11
+ protected options: ApiClientForgeApiOptions | ApiClientForgeApiExternalOptions | ConfluenceApiClientForgeBridgeOptions | ApiClientAceOptions | ApiClientApOptions;
12
+ constructor(options: ApiClientForgeApiOptions | ApiClientForgeApiExternalOptions | ConfluenceApiClientForgeBridgeOptions | ApiClientAceOptions | ApiClientApOptions);
13
+ /**
14
+ * Switches the API client to the app context.
15
+ */
16
+ asApp: () => ConfluenceApi;
17
+ /**
18
+ * Switches the API client to the user context.
19
+ */
20
+ asUser: (userAccountId: string) => ConfluenceApi;
21
+ }
22
+ /**
23
+ * The Confluence REST API V1 Client.
24
+ */
25
+ export declare class ConfluenceApiV1 extends BaseConfluenceApiV1Client {
26
+ protected options: ApiClientForgeApiOptions | ApiClientForgeApiExternalOptions | JiraApiClientForgeBridgeOptions | ApiClientAceOptions | ApiClientApOptions;
27
+ constructor(options: ApiClientForgeApiOptions | ApiClientForgeApiExternalOptions | JiraApiClientForgeBridgeOptions | ApiClientAceOptions | ApiClientApOptions);
28
+ /**
29
+ * Switches the API client to the app context.
30
+ */
31
+ asApp: () => ConfluenceApiV1;
32
+ /**
33
+ * Switches the API client to the user context.
34
+ */
35
+ asUser: (userAccountId: string) => ConfluenceApiV1;
36
+ }
package/lib/index.js ADDED
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ConfluenceApiV1 = exports.ConfluenceApi = exports.ApiError = void 0;
18
+ const atlassian_api_common_1 = require("@resolution/atlassian-api-common");
19
+ Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return atlassian_api_common_1.ApiError; } });
20
+ const BaseConfluenceApiV1Client_1 = require("./openapi/v1/BaseConfluenceApiV1Client");
21
+ const BaseConfluenceApiV2Client_1 = require("./openapi/v2/BaseConfluenceApiV2Client");
22
+ __exportStar(require("./openapi/v1/BaseConfluenceApiV1Client"), exports);
23
+ __exportStar(require("./openapi/v2/BaseConfluenceApiV2Client"), exports);
24
+ const validationSchemaStorage_1 = require("./openapi/v1/validationSchemaStorage");
25
+ const validationSchemaStorage_2 = require("./openapi/v2/validationSchemaStorage");
26
+ validationSchemaStorage_2.validationSchemaStorage.setErrorClass(atlassian_api_common_1.ApiError);
27
+ validationSchemaStorage_1.validationSchemaStorage.setErrorClass(atlassian_api_common_1.ApiError);
28
+ /**
29
+ * The Confluence REST API V2 Client.
30
+ */
31
+ class ConfluenceApi extends BaseConfluenceApiV2Client_1.BaseConfluenceApiV2Client {
32
+ constructor(options) {
33
+ super((0, atlassian_api_common_1.getApiClientOptions)(options));
34
+ this.options = options;
35
+ /**
36
+ * Switches the API client to the app context.
37
+ */
38
+ this.asApp = (0, atlassian_api_common_1.createAsAppMethod)();
39
+ /**
40
+ * Switches the API client to the user context.
41
+ */
42
+ this.asUser = (0, atlassian_api_common_1.createAsUserMethod)();
43
+ }
44
+ }
45
+ exports.ConfluenceApi = ConfluenceApi;
46
+ /**
47
+ * The Confluence REST API V1 Client.
48
+ */
49
+ class ConfluenceApiV1 extends BaseConfluenceApiV1Client_1.BaseConfluenceApiV1Client {
50
+ constructor(options) {
51
+ super((0, atlassian_api_common_1.getApiClientOptions)(options));
52
+ this.options = options;
53
+ /**
54
+ * Switches the API client to the app context.
55
+ */
56
+ this.asApp = (0, atlassian_api_common_1.createAsAppMethod)();
57
+ /**
58
+ * Switches the API client to the user context.
59
+ */
60
+ this.asUser = (0, atlassian_api_common_1.createAsUserMethod)();
61
+ }
62
+ }
63
+ exports.ConfluenceApiV1 = ConfluenceApiV1;
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2EAW0C;AAQjC,yFAdP,+BAAQ,OAcO;AANjB,sFAAmF;AACnF,sFAAmF;AAEnF,yEAAuD;AACvD,yEAAuD;AAIvD,kFAAkH;AAClH,kFAAkH;AAElH,iDAA+B,CAAC,aAAa,CAAC,+BAAQ,CAAC,CAAC;AACxD,iDAA+B,CAAC,aAAa,CAAC,+BAAQ,CAAC,CAAC;AAExD;;GAEG;AACH,MAAa,aAAc,SAAQ,qDAAyB;IAC1D,YACY,OAKY;QAEtB,KAAK,CAAC,IAAA,0CAAmB,EAAC,OAAO,CAAC,CAAC,CAAC;QAP1B,YAAO,GAAP,OAAO,CAKK;QAKxB;;WAEG;QACH,UAAK,GAAG,IAAA,wCAAiB,GAAwB,CAAC;QAClD;;WAEG;QACH,WAAM,GAAG,IAAA,yCAAkB,GAAwB,CAAC;IATpD,CAAC;CAUF;AApBD,sCAoBC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,qDAAyB;IAC5D,YACY,OAKY;QAEtB,KAAK,CAAC,IAAA,0CAAmB,EAAC,OAAO,CAAC,CAAC,CAAC;QAP1B,YAAO,GAAP,OAAO,CAKK;QAIxB;;WAEG;QACH,UAAK,GAAG,IAAA,wCAAiB,GAA0B,CAAC;QACpD;;WAEG;QACH,WAAM,GAAG,IAAA,yCAAkB,GAA0B,CAAC;IARtD,CAAC;CASF;AAnBD,0CAmBC"}
@@ -0,0 +1,133 @@
1
+ import * as commonHttpClient from "./core/CommonHttpClient";
2
+ import { CommonHttpService } from "./core/CommonHttpService";
3
+ import type { AffectedObject, AuditRecord, AuditRecordArray, AuditRecordCreate, ChangedValue, RetentionPeriod } from "./models/audit";
4
+ import type { AsyncId, Container, Content, ContentArray, ContentBody, ContentBodyCreate, ContentChildren, ContentId, ContentRestriction, EmbeddedContent, GenericAccountId, GenericLinks, GenericUserKey, GenericUserName, Group, GroupArrayWithLinks, Icon, LabelArray, LabelCreate, LabelV1, LongTask, LookAndFeel, Message, OperationCheckResult, Space, SpaceSettings, Theme, User, UserArray, UserDetails, VersionV1, WebResourceDependencies } from "./models/common";
5
+ import type { ButtonLookAndFeel, ContainerLookAndFeel, ContentBlueprintDraft, ContentBodyCreateStorage, ContentChildType, ContentCreate, ContentHistory, ContentLookAndFeel, ContentMetadata, ContentUpdate, Embeddable, GlobalSpaceIdentifier, GroupArray, HeaderLookAndFeel, HorizontalHeaderLookAndFeel, MenusLookAndFeel, NavigationLookAndFeel, ScreenLookAndFeel, SearchFieldLookAndFeel, SpaceDescriptionV1, SpacePermissionV1, SuperBatchWebResources, TopNavigationLookAndFeel, UsersUserKeys } from "./models/content";
6
+ import type { AttachmentPropertiesUpdateBody } from "./models/contentAttachments";
7
+ import type { AsyncContentBody } from "./models/contentBody";
8
+ import type { CopyPageHierarchyRequest, CopyPageHierarchyTitleOptions, CopyPageRequest, CopyPageRequestDestination } from "./models/contentChildrenAndDescendants";
9
+ import type { LabelCreateArray } from "./models/contentLabels";
10
+ import type { MacroInstance } from "./models/contentMacroBody";
11
+ import type { ContentPermissionRequest, PermissionCheckResponse, PermissionSubjectWithGroupId } from "./models/contentPermissions";
12
+ import type { ContentPropertyArray, ContentPropertyCreate, ContentPropertyCreateNoKey, ContentPropertyUpdate, ContentPropertyV1 } from "./models/contentProperties";
13
+ import type { ContentRestrictionAddOrUpdateArray, ContentRestrictionArray, ContentRestrictionUpdate } from "./models/contentRestrictions";
14
+ import type { AvailableContentStates, ContentState, ContentStateBulkSetTaskUpdate, ContentStateFailure, ContentStateResponse, ContentStateRestInput, ContentStateSettings } from "./models/contentStates";
15
+ import type { VersionArray, VersionRestore } from "./models/contentVersions";
16
+ import type { SpaceWatch, SpaceWatchArray, UserWatch, Watch, WatchArray, WatchUser } from "./models/contentWatches";
17
+ import type { ConnectModule, ConnectModules, DynamicModulesErrorMessage } from "./models/dynamicModules";
18
+ import type { AccountId, GroupName } from "./models/group";
19
+ import type { TaskPageResponse, TaskStatusUpdate, TaskV1 } from "./models/inlineTasks";
20
+ import type { LabelDetails, LabeledContent, LabeledContentPageResponse, LabeledContentType } from "./models/labelInfo";
21
+ import type { LongTaskStatus, LongTaskStatusArray, LongTaskStatusWithLinks } from "./models/longRunningTask";
22
+ import type { Relation, RelationArray, RelationData } from "./models/relation";
23
+ import type { Breadcrumb, ContainerSummary, SearchPageResponseSearchResult, SearchResult } from "./models/search";
24
+ import type { LookAndFeelSelection, LookAndFeelSettings, LookAndFeelWithLinks, SystemInfoEntity } from "./models/settings";
25
+ import type { GroupCreate, SpaceArray, SpaceCreate, SpaceDescriptionCreate, SpacePermissionCreate, SpaceUpdate } from "./models/space";
26
+ import type { PermissionSubject, SpacePermissionCustomContent, SpacePermissionRequest, SpacePermissionV2 } from "./models/spacePermissions";
27
+ import type { PropertyValue, SpacePropertyArray, SpacePropertyCreate, SpacePropertyCreateNoKey, SpacePropertyUpdate, SpacePropertyV1 } from "./models/spaceProperties";
28
+ import type { SpaceSettingsUpdate } from "./models/spaceSettings";
29
+ import type { BlueprintTemplate, BlueprintTemplateArray, ContentTemplate, ContentTemplateArray, ContentTemplateBody, ContentTemplateBodyCreate, ContentTemplateCreate, ContentTemplateUpdate } from "./models/template";
30
+ import type { ThemeArray, ThemeNoLinks, ThemeUpdate } from "./models/themes";
31
+ import type { UserProperty, UserPropertyCreate, UserPropertyKeyArray, UserPropertyUpdate } from "./models/userProperties";
32
+ import type { AccountIdEmailRecord, AccountIdEmailRecordArray, BulkUserLookup, BulkUserLookupArray, UserAnonymous } from "./models/users";
33
+ import { AnalyticsService } from "./services/AnalyticsService";
34
+ import { AuditService } from "./services/AuditService";
35
+ import { ContentAttachmentsService } from "./services/ContentAttachmentsService";
36
+ import { ContentBodyService } from "./services/ContentBodyService";
37
+ import { ContentChildrenAndDescendantsService } from "./services/ContentChildrenAndDescendantsService";
38
+ import { ContentCommentsService } from "./services/ContentCommentsService";
39
+ import { ContentLabelsService } from "./services/ContentLabelsService";
40
+ import { ContentMacroBodyService } from "./services/ContentMacroBodyService";
41
+ import { ContentPermissionsService } from "./services/ContentPermissionsService";
42
+ import { ContentPropertiesService } from "./services/ContentPropertiesService";
43
+ import { ContentRestrictionsService } from "./services/ContentRestrictionsService";
44
+ import { ContentService } from "./services/ContentService";
45
+ import { ContentStatesService } from "./services/ContentStatesService";
46
+ import { ContentVersionsService } from "./services/ContentVersionsService";
47
+ import { ContentWatchesService } from "./services/ContentWatchesService";
48
+ import { DynamicModulesService } from "./services/DynamicModulesService";
49
+ import { ExperimentalService } from "./services/ExperimentalService";
50
+ import { GroupService } from "./services/GroupService";
51
+ import { InlineTasksService } from "./services/InlineTasksService";
52
+ import { LabelInfoService } from "./services/LabelInfoService";
53
+ import { LongRunningTaskService } from "./services/LongRunningTaskService";
54
+ import { RelationService } from "./services/RelationService";
55
+ import { SearchService } from "./services/SearchService";
56
+ import { SettingsService } from "./services/SettingsService";
57
+ import { SpacePermissionsService } from "./services/SpacePermissionsService";
58
+ import { SpacePropertiesService } from "./services/SpacePropertiesService";
59
+ import { SpaceService } from "./services/SpaceService";
60
+ import { SpaceSettingsService } from "./services/SpaceSettingsService";
61
+ import { TemplateService } from "./services/TemplateService";
62
+ import { ThemesService } from "./services/ThemesService";
63
+ import { UserPropertiesService } from "./services/UserPropertiesService";
64
+ import { UsersService } from "./services/UsersService";
65
+ export type BaseConfluenceApiV1ClientOptions = Partial<commonHttpClient.CommonHttpClientOptions>;
66
+ export declare class BaseConfluenceApiV1ClientError extends commonHttpClient.CommonHttpClientError {
67
+ name: string;
68
+ }
69
+ /**
70
+ * The Confluence Cloud REST API
71
+ *
72
+ * This document describes the REST API and resources provided by Confluence. The
73
+ * REST APIs are for developers who want to integrate Confluence into their
74
+ * application and for administrators who want to script interactions with the
75
+ * Confluence server.Confluence's REST APIs provide access to resources (data
76
+ * entities) via URI paths. To use a REST API, your application will make an HTTP
77
+ * request and parse the response. The response format is JSON. Your methods will
78
+ * be the standard HTTP methods like GET, PUT, POST and DELETE. Because the REST
79
+ * API is based on open standards, you can use any web development language to
80
+ * access the API.
81
+ *
82
+ * @version 1.0.0
83
+ */
84
+ export declare class BaseConfluenceApiV1Client extends CommonHttpService {
85
+ client: commonHttpClient.CommonHttpClient;
86
+ getClient: () => commonHttpClient.CommonHttpClient;
87
+ analytics: AnalyticsService;
88
+ audit: AuditService;
89
+ contentAttachments: ContentAttachmentsService;
90
+ contentBody: ContentBodyService;
91
+ contentChildrenAndDescendants: ContentChildrenAndDescendantsService;
92
+ /** @deprecated */
93
+ contentComments: ContentCommentsService;
94
+ contentLabels: ContentLabelsService;
95
+ contentMacroBody: ContentMacroBodyService;
96
+ contentPermissions: ContentPermissionsService;
97
+ /** @deprecated */
98
+ contentProperties: ContentPropertiesService;
99
+ contentRestrictions: ContentRestrictionsService;
100
+ content: ContentService;
101
+ contentStates: ContentStatesService;
102
+ contentVersions: ContentVersionsService;
103
+ contentWatches: ContentWatchesService;
104
+ dynamicModules: DynamicModulesService;
105
+ /** APIs in this section can change without any prior deprecation notice. */
106
+ experimental: ExperimentalService;
107
+ /**
108
+ * **[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/)
109
+ * The standard Atlassian group names are default names only and can be edited or
110
+ * deleted.** For example, an admin or Atlassian support could delete the default
111
+ * group jira-software-users or rename it to jsw-users at any point.
112
+ */
113
+ group: GroupService;
114
+ /** @deprecated */
115
+ inlineTasks: InlineTasksService;
116
+ labelInfo: LabelInfoService;
117
+ longRunningTask: LongRunningTaskService;
118
+ relation: RelationService;
119
+ search: SearchService;
120
+ settings: SettingsService;
121
+ spacePermissions: SpacePermissionsService;
122
+ /** @deprecated */
123
+ spaceProperties: SpacePropertiesService;
124
+ space: SpaceService;
125
+ spaceSettings: SpaceSettingsService;
126
+ template: TemplateService;
127
+ themes: ThemesService;
128
+ userProperties: UserPropertiesService;
129
+ users: UsersService;
130
+ constructor(options?: BaseConfluenceApiV1ClientOptions);
131
+ static createClientWithServices: typeof commonHttpClient.createClientWithServices;
132
+ }
133
+ export type { AccountId, GroupName, AccountIdEmailRecord, AccountIdEmailRecordArray, BulkUserLookup, BulkUserLookupArray, UserAnonymous, AffectedObject, AuditRecord, AuditRecordArray, AuditRecordCreate, ChangedValue, RetentionPeriod, AsyncContentBody, AsyncId, Container, Content, ContentArray, ContentBody, ContentBodyCreate, ContentChildren, ContentId, ContentRestriction, EmbeddedContent, GenericAccountId, GenericLinks, GenericUserKey, GenericUserName, Group, GroupArrayWithLinks, Icon, LabelArray, LabelCreate, LabelV1, LongTask, LookAndFeel, Message, OperationCheckResult, Space, SpaceSettings, Theme, User, UserArray, UserDetails, VersionV1, WebResourceDependencies, AttachmentPropertiesUpdateBody, AvailableContentStates, ContentState, ContentStateBulkSetTaskUpdate, ContentStateFailure, ContentStateResponse, ContentStateRestInput, ContentStateSettings, BlueprintTemplate, BlueprintTemplateArray, ContentTemplate, ContentTemplateArray, ContentTemplateBody, ContentTemplateBodyCreate, ContentTemplateCreate, ContentTemplateUpdate, Breadcrumb, ContainerSummary, SearchPageResponseSearchResult, SearchResult, ButtonLookAndFeel, ContainerLookAndFeel, ContentBlueprintDraft, ContentBodyCreateStorage, ContentChildType, ContentCreate, ContentHistory, ContentLookAndFeel, ContentMetadata, ContentUpdate, Embeddable, GlobalSpaceIdentifier, GroupArray, HeaderLookAndFeel, HorizontalHeaderLookAndFeel, MenusLookAndFeel, NavigationLookAndFeel, ScreenLookAndFeel, SearchFieldLookAndFeel, SpaceDescriptionV1, SpacePermissionV1, SuperBatchWebResources, TopNavigationLookAndFeel, UsersUserKeys, ConnectModule, ConnectModules, DynamicModulesErrorMessage, ContentPermissionRequest, PermissionCheckResponse, PermissionSubjectWithGroupId, ContentPropertyArray, ContentPropertyCreate, ContentPropertyCreateNoKey, ContentPropertyUpdate, ContentPropertyV1, ContentRestrictionAddOrUpdateArray, ContentRestrictionArray, ContentRestrictionUpdate, CopyPageHierarchyRequest, CopyPageHierarchyTitleOptions, CopyPageRequest, CopyPageRequestDestination, GroupCreate, SpaceArray, SpaceCreate, SpaceDescriptionCreate, SpacePermissionCreate, SpaceUpdate, LabelCreateArray, LabelDetails, LabeledContent, LabeledContentPageResponse, LabeledContentType, LongTaskStatus, LongTaskStatusArray, LongTaskStatusWithLinks, LookAndFeelSelection, LookAndFeelSettings, LookAndFeelWithLinks, SystemInfoEntity, MacroInstance, PermissionSubject, SpacePermissionCustomContent, SpacePermissionRequest, SpacePermissionV2, PropertyValue, SpacePropertyArray, SpacePropertyCreate, SpacePropertyCreateNoKey, SpacePropertyUpdate, SpacePropertyV1, Relation, RelationArray, RelationData, SpaceSettingsUpdate, SpaceWatch, SpaceWatchArray, UserWatch, Watch, WatchArray, WatchUser, TaskPageResponse, TaskStatusUpdate, TaskV1, ThemeArray, ThemeNoLinks, ThemeUpdate, UserProperty, UserPropertyCreate, UserPropertyKeyArray, UserPropertyUpdate, VersionArray, VersionRestore, };
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BaseConfluenceApiV1Client = exports.BaseConfluenceApiV1ClientError = void 0;
4
+ // DO NOT EDIT!
5
+ // This file is generated by "api-typescript-generator".
6
+ // To update this file run "yarn build:openapi".
7
+ const commonHttpClient = require("./core/CommonHttpClient");
8
+ const CommonHttpService_1 = require("./core/CommonHttpService");
9
+ const AnalyticsService_1 = require("./services/AnalyticsService");
10
+ const AuditService_1 = require("./services/AuditService");
11
+ const ContentAttachmentsService_1 = require("./services/ContentAttachmentsService");
12
+ const ContentBodyService_1 = require("./services/ContentBodyService");
13
+ const ContentChildrenAndDescendantsService_1 = require("./services/ContentChildrenAndDescendantsService");
14
+ const ContentCommentsService_1 = require("./services/ContentCommentsService");
15
+ const ContentLabelsService_1 = require("./services/ContentLabelsService");
16
+ const ContentMacroBodyService_1 = require("./services/ContentMacroBodyService");
17
+ const ContentPermissionsService_1 = require("./services/ContentPermissionsService");
18
+ const ContentPropertiesService_1 = require("./services/ContentPropertiesService");
19
+ const ContentRestrictionsService_1 = require("./services/ContentRestrictionsService");
20
+ const ContentService_1 = require("./services/ContentService");
21
+ const ContentStatesService_1 = require("./services/ContentStatesService");
22
+ const ContentVersionsService_1 = require("./services/ContentVersionsService");
23
+ const ContentWatchesService_1 = require("./services/ContentWatchesService");
24
+ const DynamicModulesService_1 = require("./services/DynamicModulesService");
25
+ const ExperimentalService_1 = require("./services/ExperimentalService");
26
+ const GroupService_1 = require("./services/GroupService");
27
+ const InlineTasksService_1 = require("./services/InlineTasksService");
28
+ const LabelInfoService_1 = require("./services/LabelInfoService");
29
+ const LongRunningTaskService_1 = require("./services/LongRunningTaskService");
30
+ const RelationService_1 = require("./services/RelationService");
31
+ const SearchService_1 = require("./services/SearchService");
32
+ const SettingsService_1 = require("./services/SettingsService");
33
+ const SpacePermissionsService_1 = require("./services/SpacePermissionsService");
34
+ const SpacePropertiesService_1 = require("./services/SpacePropertiesService");
35
+ const SpaceService_1 = require("./services/SpaceService");
36
+ const SpaceSettingsService_1 = require("./services/SpaceSettingsService");
37
+ const TemplateService_1 = require("./services/TemplateService");
38
+ const ThemesService_1 = require("./services/ThemesService");
39
+ const UserPropertiesService_1 = require("./services/UserPropertiesService");
40
+ const UsersService_1 = require("./services/UsersService");
41
+ const validationSchemaStorage_1 = require("./validationSchemaStorage");
42
+ class BaseConfluenceApiV1ClientError extends commonHttpClient.CommonHttpClientError {
43
+ constructor() {
44
+ super(...arguments);
45
+ this.name = "BaseConfluenceApiV1ClientError";
46
+ }
47
+ }
48
+ exports.BaseConfluenceApiV1ClientError = BaseConfluenceApiV1ClientError;
49
+ /**
50
+ * The Confluence Cloud REST API
51
+ *
52
+ * This document describes the REST API and resources provided by Confluence. The
53
+ * REST APIs are for developers who want to integrate Confluence into their
54
+ * application and for administrators who want to script interactions with the
55
+ * Confluence server.Confluence's REST APIs provide access to resources (data
56
+ * entities) via URI paths. To use a REST API, your application will make an HTTP
57
+ * request and parse the response. The response format is JSON. Your methods will
58
+ * be the standard HTTP methods like GET, PUT, POST and DELETE. Because the REST
59
+ * API is based on open standards, you can use any web development language to
60
+ * access the API.
61
+ *
62
+ * @version 1.0.0
63
+ */
64
+ class BaseConfluenceApiV1Client extends CommonHttpService_1.CommonHttpService {
65
+ constructor(options) {
66
+ super(() => this.client);
67
+ this.client = new commonHttpClient.CommonHttpClient({
68
+ baseUrl: "//your-domain.atlassian.net",
69
+ binaryResponseType: "blob",
70
+ errorClass: BaseConfluenceApiV1ClientError,
71
+ });
72
+ this.getClient = () => this.client;
73
+ this.analytics = new AnalyticsService_1.AnalyticsService(this.getClient);
74
+ this.audit = new AuditService_1.AuditService(this.getClient);
75
+ this.contentAttachments = new ContentAttachmentsService_1.ContentAttachmentsService(this.getClient);
76
+ this.contentBody = new ContentBodyService_1.ContentBodyService(this.getClient);
77
+ this.contentChildrenAndDescendants = new ContentChildrenAndDescendantsService_1.ContentChildrenAndDescendantsService(this.getClient);
78
+ /** @deprecated */
79
+ this.contentComments = new ContentCommentsService_1.ContentCommentsService(this.getClient);
80
+ this.contentLabels = new ContentLabelsService_1.ContentLabelsService(this.getClient);
81
+ this.contentMacroBody = new ContentMacroBodyService_1.ContentMacroBodyService(this.getClient);
82
+ this.contentPermissions = new ContentPermissionsService_1.ContentPermissionsService(this.getClient);
83
+ /** @deprecated */
84
+ this.contentProperties = new ContentPropertiesService_1.ContentPropertiesService(this.getClient);
85
+ this.contentRestrictions = new ContentRestrictionsService_1.ContentRestrictionsService(this.getClient);
86
+ this.content = new ContentService_1.ContentService(this.getClient);
87
+ this.contentStates = new ContentStatesService_1.ContentStatesService(this.getClient);
88
+ this.contentVersions = new ContentVersionsService_1.ContentVersionsService(this.getClient);
89
+ this.contentWatches = new ContentWatchesService_1.ContentWatchesService(this.getClient);
90
+ this.dynamicModules = new DynamicModulesService_1.DynamicModulesService(this.getClient);
91
+ /** APIs in this section can change without any prior deprecation notice. */
92
+ this.experimental = new ExperimentalService_1.ExperimentalService(this.getClient);
93
+ /**
94
+ * **[WARNING](https://support.atlassian.com/user-management/docs/create-and-update-groups/)
95
+ * The standard Atlassian group names are default names only and can be edited or
96
+ * deleted.** For example, an admin or Atlassian support could delete the default
97
+ * group jira-software-users or rename it to jsw-users at any point.
98
+ */
99
+ this.group = new GroupService_1.GroupService(this.getClient);
100
+ /** @deprecated */
101
+ this.inlineTasks = new InlineTasksService_1.InlineTasksService(this.getClient);
102
+ this.labelInfo = new LabelInfoService_1.LabelInfoService(this.getClient);
103
+ this.longRunningTask = new LongRunningTaskService_1.LongRunningTaskService(this.getClient);
104
+ this.relation = new RelationService_1.RelationService(this.getClient);
105
+ this.search = new SearchService_1.SearchService(this.getClient);
106
+ this.settings = new SettingsService_1.SettingsService(this.getClient);
107
+ this.spacePermissions = new SpacePermissionsService_1.SpacePermissionsService(this.getClient);
108
+ /** @deprecated */
109
+ this.spaceProperties = new SpacePropertiesService_1.SpacePropertiesService(this.getClient);
110
+ this.space = new SpaceService_1.SpaceService(this.getClient);
111
+ this.spaceSettings = new SpaceSettingsService_1.SpaceSettingsService(this.getClient);
112
+ this.template = new TemplateService_1.TemplateService(this.getClient);
113
+ this.themes = new ThemesService_1.ThemesService(this.getClient);
114
+ this.userProperties = new UserPropertiesService_1.UserPropertiesService(this.getClient);
115
+ this.users = new UsersService_1.UsersService(this.getClient);
116
+ this.client.setOptions(Object.assign(Object.assign({}, this.client.getOptions()), options));
117
+ }
118
+ }
119
+ exports.BaseConfluenceApiV1Client = BaseConfluenceApiV1Client;
120
+ BaseConfluenceApiV1Client.createClientWithServices = commonHttpClient.createClientWithServices;
121
+ validationSchemaStorage_1.validationSchemaStorage.setErrorClass(BaseConfluenceApiV1ClientError);
122
+ //# sourceMappingURL=BaseConfluenceApiV1Client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseConfluenceApiV1Client.js","sourceRoot":"","sources":["../../../src/openapi/v1/BaseConfluenceApiV1Client.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,196 @@
1
+ export interface CommonHttpClientOptions {
2
+ baseUrl: string;
3
+ errorClass: {
4
+ new (url: URL, request: CommonHttpClientFetchRequest | undefined, response: CommonHttpClientFetchResponse | undefined, options: CommonHttpClientOptions | undefined, message: string): Error;
5
+ };
6
+ headers?: CommonHttpClientRequestHeaders;
7
+ preprocessRequest?: (request: CommonHttpClientRequest) => Promise<CommonHttpClientRequest>;
8
+ preprocessFetchResponse?: (response: CommonHttpClientFetchResponse, request: CommonHttpClientFetchRequest) => Promise<CommonHttpClientFetchResponse>;
9
+ fetch?: (url: URL, request: CommonHttpClientFetchRequest) => Promise<CommonHttpClientFetchResponse>;
10
+ binaryResponseType: "blob" | "readableStream";
11
+ formatHttpErrorMessage?: (response: CommonHttpClientFetchResponse, request: CommonHttpClientFetchRequest) => string;
12
+ }
13
+ export interface CommonHttpClientRequestHeaders {
14
+ [headerName: string]: string | undefined | null;
15
+ }
16
+ export interface CommonHttpClientFetchRequestHeaders {
17
+ [headerName: string]: string;
18
+ }
19
+ /**
20
+ * Request prepared for the fetch function.
21
+ */
22
+ export interface CommonHttpClientFetchRequest {
23
+ /**
24
+ * HTTP Method.
25
+ */
26
+ method: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "PATCH";
27
+ /**
28
+ * Request headers.
29
+ */
30
+ headers: CommonHttpClientFetchRequestHeaders;
31
+ /**
32
+ * Request body.
33
+ */
34
+ body?: BodyInit;
35
+ /**
36
+ * Cache mode.
37
+ */
38
+ cache: "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
39
+ /**
40
+ * Credentials mode.
41
+ */
42
+ credentials: "include" | "omit" | "same-origin";
43
+ /**
44
+ * Redirect mode.
45
+ */
46
+ redirect: "error" | "follow" | "manual";
47
+ /**
48
+ * Custom request properties. Can be used to pass metadata to the fetch function.
49
+ */
50
+ customRequestProps?: Record<string, unknown>;
51
+ }
52
+ /**
53
+ * Request in terms of OpenAPI.
54
+ */
55
+ export type CommonHttpClientRequest = Omit<CommonHttpClientFetchRequest, "body" | "headers" | "cache" | "credentials" | "redirect"> & {
56
+ /**
57
+ * Path to the resource.
58
+ */
59
+ path: string;
60
+ /**
61
+ * Path parameters, i.e. {id}.
62
+ */
63
+ pathParams?: Record<string, unknown>;
64
+ /**
65
+ * Query parameters.
66
+ */
67
+ query?: Record<string, unknown>;
68
+ /**
69
+ * Request body.
70
+ */
71
+ body?: unknown;
72
+ /**
73
+ * Request headers.
74
+ */
75
+ headers?: CommonHttpClientRequestHeaders;
76
+ } & Partial<Pick<CommonHttpClientFetchRequest, "cache" | "credentials" | "redirect">>;
77
+ /**
78
+ * Response of the fetch function.
79
+ */
80
+ export interface CommonHttpClientFetchResponse {
81
+ /**
82
+ * HTTP status code.
83
+ */
84
+ status: number;
85
+ /**
86
+ * HTTP status code explanation.
87
+ */
88
+ statusText: string;
89
+ /**
90
+ * Response body.
91
+ */
92
+ body: CommonHttpClientFetchResponseBody;
93
+ /**
94
+ * Whether the request was successful. True for 2xx status codes.
95
+ */
96
+ ok: boolean;
97
+ /**
98
+ * The final URL of the request (after redirects).
99
+ */
100
+ url: string;
101
+ /**
102
+ * Response headers.
103
+ */
104
+ headers: CommonHttpClientResponseHeaders;
105
+ /**
106
+ * Custom request properties. Can be used to pass metadata outside the fetch function.
107
+ */
108
+ customRequestProps?: Record<string, unknown>;
109
+ }
110
+ export type CommonHttpClientResponseHeaders = Record<string, string> & {
111
+ "set-cookie"?: string[];
112
+ };
113
+ export type CommonHttpClientFetchResponseBody = {
114
+ type: "json";
115
+ data: unknown;
116
+ } | {
117
+ type: "blob";
118
+ data: Blob;
119
+ } | {
120
+ type: "readableStream";
121
+ data: ReadableStream<Uint8Array>;
122
+ };
123
+ export interface CommonHttpClientResponse<T> {
124
+ status: number;
125
+ mediaType?: string;
126
+ body: T;
127
+ response: CommonHttpClientFetchResponse;
128
+ }
129
+ export declare class CommonHttpClientError extends Error {
130
+ readonly url: URL;
131
+ readonly request: CommonHttpClientFetchRequest | undefined;
132
+ readonly response: CommonHttpClientFetchResponse | undefined;
133
+ readonly options: CommonHttpClientOptions | undefined;
134
+ constructor(url: URL, request: CommonHttpClientFetchRequest | undefined, response: CommonHttpClientFetchResponse | undefined, options: CommonHttpClientOptions | undefined, message: string);
135
+ }
136
+ /**
137
+ * `extends unknown` is a trick to split the union into individual types.
138
+ */
139
+ type ResponseByMediaType<T extends CommonHttpClientResponse<unknown>, K extends string> = T extends unknown ? ((a: T) => void) extends (a: {
140
+ mediaType: K;
141
+ status: infer _Status;
142
+ body: infer _Body;
143
+ response: CommonHttpClientFetchResponse;
144
+ }) => void ? T : never : never;
145
+ export declare function checkReponseMediaType<T extends CommonHttpClientResponse<unknown>, K extends string>(response: T, mediaType: K): response is ResponseByMediaType<T, K> extends never ? ResponseByMediaType<T, "*/*"> : ResponseByMediaType<T, K>;
146
+ export declare function isJsonMediaType(mediaType: string): boolean;
147
+ type AsCreatedResponseFunction<KCreated extends string, KOther extends string> = <T extends CommonHttpClientResponse<unknown>>(response: T) => ({
148
+ [K in KCreated]: Extract<T, {
149
+ status: 201;
150
+ }>["body"];
151
+ } & {
152
+ created: true;
153
+ }) | ({
154
+ [K in KOther]: Extract<T, {
155
+ status: 200;
156
+ }>["body"];
157
+ } & {
158
+ created: false;
159
+ });
160
+ export declare function asCreatedResponse<KCreated extends string>(keyCreated: KCreated): AsCreatedResponseFunction<KCreated, KCreated>;
161
+ export declare function asCreatedResponse<KCreated extends string, KOther extends string>(keyCreated: KCreated, keyOther: KOther): AsCreatedResponseFunction<KCreated, KOther>;
162
+ export declare const getBody: <T>({ body }: CommonHttpClientResponse<T>) => T;
163
+ export declare const castResponse: <T extends Omit<CommonHttpClientResponse<unknown>, "response">>() => (response: CommonHttpClientResponse<unknown>) => WithResponse<T>;
164
+ export declare const discardResult: () => void;
165
+ export type WithResponse<T> = T & {
166
+ response: CommonHttpClientFetchResponse;
167
+ };
168
+ export declare function createClientWithServices<TOptions, TClient extends {
169
+ getClient(): CommonHttpClient;
170
+ }, TServices extends Record<string, {
171
+ new (client: CommonHttpClient): unknown;
172
+ }>>(this: {
173
+ new (options?: TOptions): TClient;
174
+ }, services: TServices, options?: TOptions): TClient & {
175
+ [K in keyof TServices as K extends string ? Uncapitalize<K extends `${infer TName}Service` ? TName : K> : K]: InstanceType<TServices[K]>;
176
+ };
177
+ export declare class CommonHttpClient {
178
+ protected options: CommonHttpClientOptions;
179
+ constructor(options: CommonHttpClientOptions);
180
+ setOptions(options: CommonHttpClientOptions): void;
181
+ getOptions(): CommonHttpClientOptions;
182
+ protected getSearchParams(params: Record<string, unknown>): URLSearchParams;
183
+ protected buildUrlPath(request: CommonHttpClientRequest): string;
184
+ protected buildUrl(request: CommonHttpClientRequest): URL;
185
+ protected fetch(url: URL, request: CommonHttpClientFetchRequest): Promise<CommonHttpClientFetchResponse>;
186
+ request(request: CommonHttpClientRequest): Promise<CommonHttpClientFetchResponse>;
187
+ responseHandler(distribution: {
188
+ [statusCode: string]: {
189
+ [mediaType: string]: CommonHttpClientFetchResponseBody["type"];
190
+ };
191
+ }): (response: CommonHttpClientFetchResponse) => Promise<CommonHttpClientResponse<unknown>>;
192
+ private cleanupHeaders;
193
+ protected getRequestBody(request: CommonHttpClientRequest): BodyInit | undefined;
194
+ protected preprocessRequest(request: CommonHttpClientRequest): Promise<CommonHttpClientRequest>;
195
+ }
196
+ export {};