confluence.js 1.3.1 → 1.4.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 (317) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +15 -0
  3. package/out/api/analytics.d.ts +16 -0
  4. package/out/api/analytics.js +34 -0
  5. package/out/api/audit.d.ts +1 -1
  6. package/out/api/audit.js +6 -6
  7. package/out/api/content.d.ts +1 -1
  8. package/out/api/content.js +10 -10
  9. package/out/api/contentAttachments.d.ts +1 -1
  10. package/out/api/contentAttachments.js +6 -6
  11. package/out/api/contentBody.d.ts +1 -1
  12. package/out/api/contentBody.js +1 -1
  13. package/out/api/contentChildrenAndDescendants.d.ts +3 -3
  14. package/out/api/contentChildrenAndDescendants.js +9 -8
  15. package/out/api/contentComments.d.ts +1 -1
  16. package/out/api/contentComments.js +1 -1
  17. package/out/api/contentContentState.d.ts +58 -0
  18. package/out/api/contentContentState.js +63 -0
  19. package/out/api/contentLabels.d.ts +1 -1
  20. package/out/api/contentLabels.js +4 -4
  21. package/out/api/contentMacroBody.d.ts +1 -1
  22. package/out/api/contentMacroBody.js +1 -1
  23. package/out/api/contentPermissions.d.ts +1 -1
  24. package/out/api/contentPermissions.js +2 -2
  25. package/out/api/contentProperties.d.ts +1 -1
  26. package/out/api/contentProperties.js +6 -6
  27. package/out/api/contentRestrictions.d.ts +1 -1
  28. package/out/api/contentRestrictions.js +15 -15
  29. package/out/api/contentVersions.d.ts +1 -1
  30. package/out/api/contentVersions.js +4 -4
  31. package/out/api/contentWatches.d.ts +1 -1
  32. package/out/api/contentWatches.js +12 -12
  33. package/out/api/dynamicModules.d.ts +1 -1
  34. package/out/api/dynamicModules.js +3 -3
  35. package/out/api/experimental.d.ts +123 -5
  36. package/out/api/experimental.js +60 -8
  37. package/out/api/group.d.ts +1 -1
  38. package/out/api/group.js +20 -17
  39. package/out/api/index.d.ts +2 -0
  40. package/out/api/index.js +31 -29
  41. package/out/api/inlineTasks.d.ts +1 -1
  42. package/out/api/inlineTasks.js +3 -3
  43. package/out/api/labelInfo.d.ts +1 -1
  44. package/out/api/labelInfo.js +1 -1
  45. package/out/api/longRunningTask.d.ts +1 -1
  46. package/out/api/longRunningTask.js +2 -2
  47. package/out/api/models/availableContentStates.d.ts +6 -0
  48. package/out/api/models/availableContentStates.js +2 -0
  49. package/out/api/models/blueprintTemplate.d.ts +1 -1
  50. package/out/api/models/bulkUserLookup.d.ts +2 -2
  51. package/out/api/models/content.d.ts +6 -6
  52. package/out/api/models/contentHistory.d.ts +2 -2
  53. package/out/api/models/contentLookAndFeel.d.ts +1 -1
  54. package/out/api/models/contentMetadata.d.ts +1 -1
  55. package/out/api/models/contentRestriction.d.ts +2 -2
  56. package/out/api/models/contentState.d.ts +8 -0
  57. package/out/api/models/contentState.js +2 -0
  58. package/out/api/models/contentStateContainer.d.ts +5 -0
  59. package/out/api/models/contentStateContainer.js +2 -0
  60. package/out/api/models/contentStateSettings.d.ts +11 -0
  61. package/out/api/models/contentStateSettings.js +2 -0
  62. package/out/api/models/contentTemplate.d.ts +1 -1
  63. package/out/api/models/copyPageHierarchyRequest.d.ts +2 -0
  64. package/out/api/models/copyPageRequest.d.ts +1 -1
  65. package/out/api/models/horizontalHeaderLookAndFeel.d.ts +1 -1
  66. package/out/api/models/index.d.ts +8 -0
  67. package/out/api/models/index.js +166 -158
  68. package/out/api/models/labelArray.d.ts +1 -1
  69. package/out/api/models/longTask.d.ts +8 -0
  70. package/out/api/models/longTask.js +2 -0
  71. package/out/api/models/longTaskStatusArray.d.ts +1 -1
  72. package/out/api/models/lookAndFeel.d.ts +2 -2
  73. package/out/api/models/migratedUserArray.d.ts +1 -1
  74. package/out/api/models/relation.d.ts +1 -1
  75. package/out/api/models/relationArray.d.ts +1 -1
  76. package/out/api/models/searchPageResponseSearchResult.d.ts +1 -1
  77. package/out/api/models/searchResult.d.ts +2 -2
  78. package/out/api/models/space.d.ts +4 -4
  79. package/out/api/models/spaceArray.d.ts +1 -1
  80. package/out/api/models/spacePermission.d.ts +1 -1
  81. package/out/api/models/spacePermissionCreate.d.ts +1 -1
  82. package/out/api/models/spacePermissionRequest.d.ts +1 -1
  83. package/out/api/models/spacePermissionV2.d.ts +1 -1
  84. package/out/api/models/spacePropertyArray.d.ts +1 -1
  85. package/out/api/models/spaceWatchArray.d.ts +1 -1
  86. package/out/api/models/themeArray.d.ts +1 -1
  87. package/out/api/models/user.d.ts +2 -2
  88. package/out/api/models/userAnonymous.d.ts +1 -1
  89. package/out/api/models/userProperty.d.ts +13 -0
  90. package/out/api/models/userProperty.js +2 -0
  91. package/out/api/models/userPropertyCreate.d.ts +4 -0
  92. package/out/api/models/userPropertyCreate.js +2 -0
  93. package/out/api/models/userPropertyKeyArray.d.ts +10 -0
  94. package/out/api/models/userPropertyKeyArray.js +2 -0
  95. package/out/api/models/userPropertyUpdate.d.ts +4 -0
  96. package/out/api/models/userPropertyUpdate.js +2 -0
  97. package/out/api/models/usersUserKeys.d.ts +1 -1
  98. package/out/api/models/version.d.ts +2 -2
  99. package/out/api/models/versionArray.d.ts +1 -1
  100. package/out/api/models/watchArray.d.ts +1 -1
  101. package/out/api/parameters/createUserProperty.d.ts +10 -0
  102. package/out/api/parameters/createUserProperty.js +2 -0
  103. package/out/api/parameters/deletePageTree.d.ts +4 -0
  104. package/out/api/parameters/deletePageTree.js +2 -0
  105. package/out/api/parameters/deleteUserProperty.d.ts +9 -0
  106. package/out/api/parameters/deleteUserProperty.js +2 -0
  107. package/out/api/parameters/getAvailableContentStates.d.ts +4 -0
  108. package/out/api/parameters/getAvailableContentStates.js +2 -0
  109. package/out/api/parameters/getContentState.d.ts +6 -0
  110. package/out/api/parameters/getContentState.js +2 -0
  111. package/out/api/parameters/getContentStateLastUpdated.d.ts +4 -0
  112. package/out/api/parameters/getContentStateLastUpdated.js +2 -0
  113. package/out/api/parameters/getContentStateSettings.d.ts +4 -0
  114. package/out/api/parameters/getContentStateSettings.js +2 -0
  115. package/out/api/parameters/getGroupMembersByGroupId.d.ts +5 -0
  116. package/out/api/parameters/getMembersByQueryParam.d.ts +5 -0
  117. package/out/api/parameters/getSpaces.d.ts +1 -1
  118. package/out/api/parameters/getUserProperties.d.ts +8 -0
  119. package/out/api/parameters/getUserProperties.js +2 -0
  120. package/out/api/parameters/getUserProperty.d.ts +6 -0
  121. package/out/api/parameters/getUserProperty.js +2 -0
  122. package/out/api/parameters/index.d.ts +12 -0
  123. package/out/api/parameters/index.js +170 -158
  124. package/out/api/parameters/removeContentState.d.ts +4 -0
  125. package/out/api/parameters/removeContentState.js +2 -0
  126. package/out/api/parameters/searchGroups.d.ts +5 -0
  127. package/out/api/parameters/setContentState.d.ts +8 -0
  128. package/out/api/parameters/setContentState.js +2 -0
  129. package/out/api/parameters/updateUserProperty.d.ts +10 -0
  130. package/out/api/parameters/updateUserProperty.js +2 -0
  131. package/out/api/relation.d.ts +1 -1
  132. package/out/api/relation.js +7 -7
  133. package/out/api/search.d.ts +1 -1
  134. package/out/api/search.js +4 -4
  135. package/out/api/settings.d.ts +5 -1
  136. package/out/api/settings.js +15 -6
  137. package/out/api/space.d.ts +1 -1
  138. package/out/api/space.js +13 -9
  139. package/out/api/spacePermissions.d.ts +1 -1
  140. package/out/api/spacePermissions.js +4 -4
  141. package/out/api/spaceProperties.d.ts +1 -1
  142. package/out/api/spaceProperties.js +6 -6
  143. package/out/api/spaceSettings.d.ts +1 -1
  144. package/out/api/spaceSettings.js +2 -2
  145. package/out/api/template.d.ts +1 -1
  146. package/out/api/template.js +6 -6
  147. package/out/api/themes.d.ts +1 -1
  148. package/out/api/themes.js +6 -6
  149. package/out/api/users.d.ts +3 -3
  150. package/out/api/users.js +8 -8
  151. package/out/clients/baseClient.d.ts +1 -1
  152. package/out/clients/baseClient.js +6 -6
  153. package/out/clients/confluenceClient.d.ts +3 -1
  154. package/out/clients/confluenceClient.js +2 -0
  155. package/out/clients/index.js +4 -4
  156. package/out/config.d.ts +5 -2
  157. package/out/index.js +4 -4
  158. package/out/paramSerializer.d.ts +1 -0
  159. package/out/paramSerializer.js +16 -0
  160. package/out/server/audit.d.ts +1 -1
  161. package/out/server/audit.js +6 -6
  162. package/out/server/content.d.ts +1 -1
  163. package/out/server/content.js +32 -32
  164. package/out/server/contentBody.d.ts +1 -1
  165. package/out/server/contentBody.js +1 -1
  166. package/out/server/group.d.ts +1 -1
  167. package/out/server/group.js +3 -3
  168. package/out/server/index.js +8 -8
  169. package/out/server/longTask.d.ts +1 -1
  170. package/out/server/longTask.js +2 -2
  171. package/out/server/models/content.d.ts +6 -6
  172. package/out/server/models/contentChildren.d.ts +1 -1
  173. package/out/server/models/contentHistory.d.ts +2 -2
  174. package/out/server/models/contentLookAndFeel.d.ts +1 -1
  175. package/out/server/models/contentRestriction.d.ts +2 -2
  176. package/out/server/models/index.js +60 -60
  177. package/out/server/models/lookAndFeel.d.ts +2 -2
  178. package/out/server/models/searchResult.d.ts +2 -2
  179. package/out/server/models/space.d.ts +3 -3
  180. package/out/server/models/spacePermission.d.ts +1 -1
  181. package/out/server/models/user.d.ts +1 -1
  182. package/out/server/models/version.d.ts +1 -1
  183. package/out/server/parameters/index.js +64 -64
  184. package/out/server/search.d.ts +1 -1
  185. package/out/server/search.js +1 -1
  186. package/out/server/space.d.ts +1 -1
  187. package/out/server/space.js +14 -14
  188. package/out/server/user.d.ts +1 -1
  189. package/out/server/user.js +10 -10
  190. package/out/services/authenticationService/authenticationService.js +4 -1
  191. package/out/services/authenticationService/authentications/createPATAuthenticationToken.d.ts +2 -0
  192. package/out/services/authenticationService/authentications/createPATAuthenticationToken.js +10 -0
  193. package/out/services/authenticationService/authentications/index.d.ts +1 -0
  194. package/out/services/authenticationService/authentications/index.js +4 -3
  195. package/out/services/authenticationService/index.js +1 -1
  196. package/package.json +30 -26
  197. package/src/api/analytics.ts +44 -0
  198. package/src/api/audit.ts +1 -1
  199. package/src/api/content.ts +1 -1
  200. package/src/api/contentAttachments.ts +1 -1
  201. package/src/api/contentBody.ts +1 -1
  202. package/src/api/contentChildrenAndDescendants.ts +8 -4
  203. package/src/api/contentComments.ts +1 -1
  204. package/src/api/contentContentState.ts +157 -0
  205. package/src/api/contentLabels.ts +1 -1
  206. package/src/api/contentMacroBody.ts +1 -1
  207. package/src/api/contentPermissions.ts +1 -1
  208. package/src/api/contentProperties.ts +1 -1
  209. package/src/api/contentRestrictions.ts +1 -1
  210. package/src/api/contentVersions.ts +1 -1
  211. package/src/api/contentWatches.ts +1 -1
  212. package/src/api/dynamicModules.ts +1 -1
  213. package/src/api/experimental.ts +211 -8
  214. package/src/api/group.ts +4 -1
  215. package/src/api/index.ts +2 -0
  216. package/src/api/inlineTasks.ts +1 -1
  217. package/src/api/labelInfo.ts +1 -1
  218. package/src/api/longRunningTask.ts +1 -1
  219. package/src/api/models/availableContentStates.ts +7 -0
  220. package/src/api/models/blueprintTemplate.ts +1 -1
  221. package/src/api/models/bulkUserLookup.ts +2 -2
  222. package/src/api/models/content.ts +6 -6
  223. package/src/api/models/contentHistory.ts +2 -2
  224. package/src/api/models/contentLookAndFeel.ts +1 -1
  225. package/src/api/models/contentMetadata.ts +1 -1
  226. package/src/api/models/contentRestriction.ts +2 -2
  227. package/src/api/models/contentState.ts +8 -0
  228. package/src/api/models/contentStateContainer.ts +6 -0
  229. package/src/api/models/contentStateSettings.ts +12 -0
  230. package/src/api/models/contentTemplate.ts +1 -1
  231. package/src/api/models/copyPageHierarchyRequest.ts +2 -0
  232. package/src/api/models/copyPageRequest.ts +1 -1
  233. package/src/api/models/horizontalHeaderLookAndFeel.ts +1 -1
  234. package/src/api/models/index.ts +8 -0
  235. package/src/api/models/labelArray.ts +1 -1
  236. package/src/api/models/longTask.ts +8 -0
  237. package/src/api/models/longTaskStatusArray.ts +1 -1
  238. package/src/api/models/lookAndFeel.ts +2 -2
  239. package/src/api/models/migratedUserArray.ts +1 -1
  240. package/src/api/models/relation.ts +1 -1
  241. package/src/api/models/relationArray.ts +1 -1
  242. package/src/api/models/searchPageResponseSearchResult.ts +1 -1
  243. package/src/api/models/searchResult.ts +2 -2
  244. package/src/api/models/space.ts +4 -4
  245. package/src/api/models/spaceArray.ts +1 -1
  246. package/src/api/models/spacePermission.ts +1 -1
  247. package/src/api/models/spacePermissionCreate.ts +1 -1
  248. package/src/api/models/spacePermissionRequest.ts +1 -1
  249. package/src/api/models/spacePermissionV2.ts +1 -1
  250. package/src/api/models/spacePropertyArray.ts +1 -1
  251. package/src/api/models/spaceWatchArray.ts +1 -1
  252. package/src/api/models/themeArray.ts +1 -1
  253. package/src/api/models/user.ts +2 -2
  254. package/src/api/models/userAnonymous.ts +1 -1
  255. package/src/api/models/userProperty.ts +14 -0
  256. package/src/api/models/userPropertyCreate.ts +4 -0
  257. package/src/api/models/userPropertyKeyArray.ts +11 -0
  258. package/src/api/models/userPropertyUpdate.ts +4 -0
  259. package/src/api/models/usersUserKeys.ts +1 -1
  260. package/src/api/models/version.ts +2 -2
  261. package/src/api/models/versionArray.ts +1 -1
  262. package/src/api/models/watchArray.ts +1 -1
  263. package/src/api/parameters/createUserProperty.ts +11 -0
  264. package/src/api/parameters/deletePageTree.ts +4 -0
  265. package/src/api/parameters/deleteUserProperty.ts +9 -0
  266. package/src/api/parameters/getAvailableContentStates.ts +4 -0
  267. package/src/api/parameters/getContentState.ts +6 -0
  268. package/src/api/parameters/getContentStateLastUpdated.ts +4 -0
  269. package/src/api/parameters/getContentStateSettings.ts +4 -0
  270. package/src/api/parameters/getGroupMembersByGroupId.ts +5 -0
  271. package/src/api/parameters/getMembersByQueryParam.ts +5 -0
  272. package/src/api/parameters/getSpaces.ts +31 -1
  273. package/src/api/parameters/getUserProperties.ts +8 -0
  274. package/src/api/parameters/getUserProperty.ts +6 -0
  275. package/src/api/parameters/index.ts +12 -0
  276. package/src/api/parameters/removeContentState.ts +4 -0
  277. package/src/api/parameters/searchGroups.ts +5 -0
  278. package/src/api/parameters/setContentState.ts +8 -0
  279. package/src/api/parameters/updateUserProperty.ts +11 -0
  280. package/src/api/relation.ts +1 -1
  281. package/src/api/search.ts +1 -1
  282. package/src/api/settings.ts +23 -1
  283. package/src/api/space.ts +6 -2
  284. package/src/api/spacePermissions.ts +1 -1
  285. package/src/api/spaceProperties.ts +1 -1
  286. package/src/api/spaceSettings.ts +1 -1
  287. package/src/api/template.ts +1 -1
  288. package/src/api/themes.ts +1 -1
  289. package/src/api/users.ts +4 -4
  290. package/src/clients/baseClient.ts +3 -3
  291. package/src/clients/confluenceClient.ts +4 -0
  292. package/src/config.ts +6 -2
  293. package/src/paramSerializer.ts +15 -0
  294. package/src/server/audit.ts +2 -2
  295. package/src/server/content.ts +2 -2
  296. package/src/server/contentBody.ts +1 -1
  297. package/src/server/group.ts +2 -2
  298. package/src/server/longTask.ts +2 -2
  299. package/src/server/models/content.ts +6 -6
  300. package/src/server/models/contentChildren.ts +1 -1
  301. package/src/server/models/contentHistory.ts +2 -2
  302. package/src/server/models/contentLookAndFeel.ts +1 -1
  303. package/src/server/models/contentRestriction.ts +2 -2
  304. package/src/server/models/lookAndFeel.ts +2 -2
  305. package/src/server/models/searchResult.ts +2 -2
  306. package/src/server/models/space.ts +3 -3
  307. package/src/server/models/spacePermission.ts +1 -1
  308. package/src/server/models/user.ts +1 -1
  309. package/src/server/models/version.ts +1 -1
  310. package/src/server/search.ts +2 -2
  311. package/src/server/space.ts +2 -2
  312. package/src/server/user.ts +2 -2
  313. package/src/services/authenticationService/authenticationService.ts +5 -0
  314. package/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts +1 -1
  315. package/src/services/authenticationService/authentications/createPATAuthenticationToken.ts +5 -0
  316. package/src/services/authenticationService/authentications/index.ts +1 -0
  317. package/tsconfig.lint.json +7 -0
@@ -1,5 +1,5 @@
1
- import { SpaceWatch } from './spaceWatch';
2
1
  import { GenericLinks } from './genericLinks';
2
+ import { SpaceWatch } from './spaceWatch';
3
3
 
4
4
  export interface SpaceWatchArray {
5
5
  results: SpaceWatch[];
@@ -1,5 +1,5 @@
1
- import { ThemeNoLinks } from './themeNoLinks';
2
1
  import { GenericLinks } from './genericLinks';
2
+ import { ThemeNoLinks } from './themeNoLinks';
3
3
 
4
4
  export interface ThemeArray {
5
5
  results: ThemeNoLinks[];
@@ -1,8 +1,8 @@
1
+ import { GenericLinks } from './genericLinks';
1
2
  import { Icon } from './icon';
2
3
  import { OperationCheckResult } from './operationCheckResult';
3
- import { UserDetails } from './userDetails';
4
4
  import { Space } from './space';
5
- import { GenericLinks } from './genericLinks';
5
+ import { UserDetails } from './userDetails';
6
6
 
7
7
  export interface User {
8
8
  type: string;
@@ -1,6 +1,6 @@
1
+ import { GenericLinks } from './genericLinks';
1
2
  import { Icon } from './icon';
2
3
  import { OperationCheckResult } from './operationCheckResult';
3
- import { GenericLinks } from './genericLinks';
4
4
 
5
5
  export interface UserAnonymous {
6
6
  type: string;
@@ -0,0 +1,14 @@
1
+ import { GenericLinks } from './genericLinks';
2
+
3
+ export interface UserProperty {
4
+ key: string;
5
+ /** The value of the content property. */
6
+ value: {};
7
+ /** A unique identifier for the user property */
8
+ id: string;
9
+ /** Datetime when the property was last modified such as `2022-02-01T12:00:00.111Z` */
10
+ lastModifiedDate: string;
11
+ /** Datetime when the property was created such as `2022-01-01T12:00:00.111Z` */
12
+ createdDate: string;
13
+ Links?: GenericLinks;
14
+ }
@@ -0,0 +1,4 @@
1
+ export interface UserPropertyCreate {
2
+ /** The value of the user property. */
3
+ value: {};
4
+ }
@@ -0,0 +1,11 @@
1
+ import { GenericLinks } from './genericLinks';
2
+
3
+ export interface UserPropertyKeyArray {
4
+ results: {
5
+ key?: string;
6
+ }[];
7
+ start?: number;
8
+ limit?: number;
9
+ size?: number;
10
+ Links?: GenericLinks;
11
+ }
@@ -0,0 +1,4 @@
1
+ export interface UserPropertyUpdate {
2
+ /** The value of the user property. */
3
+ value: {};
4
+ }
@@ -1,5 +1,5 @@
1
- import { User } from './user';
2
1
  import { GenericLinks } from './genericLinks';
2
+ import { User } from './user';
3
3
 
4
4
  export interface UsersUserKeys {
5
5
  users: User[];
@@ -1,7 +1,7 @@
1
- import { User } from './user';
2
1
  import { Content } from './content';
3
- import { UsersUserKeys } from './usersUserKeys';
4
2
  import { GenericLinks } from './genericLinks';
3
+ import { User } from './user';
4
+ import { UsersUserKeys } from './usersUserKeys';
5
5
 
6
6
  export interface Version {
7
7
  by: User;
@@ -1,5 +1,5 @@
1
- import { Version } from './version';
2
1
  import { GenericLinks } from './genericLinks';
2
+ import { Version } from './version';
3
3
 
4
4
  export interface VersionArray {
5
5
  results: Version[];
@@ -1,5 +1,5 @@
1
- import { Watch } from './watch';
2
1
  import { GenericLinks } from './genericLinks';
2
+ import { Watch } from './watch';
3
3
 
4
4
  export interface WatchArray {
5
5
  results: Watch[];
@@ -0,0 +1,11 @@
1
+ import { UserPropertyCreate } from '../models';
2
+
3
+ export interface CreateUserProperty extends UserPropertyCreate {
4
+ /**
5
+ * The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For
6
+ * example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192
7
+ */
8
+ userId: string;
9
+ /** The key of the user property. */
10
+ key: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ export interface DeletePageTree {
2
+ /** The ID of the content which forms root of the page tree, to be deleted. */
3
+ id: string;
4
+ }
@@ -0,0 +1,9 @@
1
+ export interface DeleteUserProperty {
2
+ /**
3
+ * The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For
4
+ * example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192
5
+ */
6
+ userId: string;
7
+ /** The key of the user property. */
8
+ key: string;
9
+ }
@@ -0,0 +1,4 @@
1
+ export interface GetAvailableContentStates {
2
+ /** Id of content to get available states for */
3
+ contentId: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ export interface GetContentState {
2
+ /** The Id of the page whose content state is of interest. */
3
+ contentId: string;
4
+ /** Set designation=DRAFT or designation=PUBLISHED. */
5
+ designation?: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface GetContentStateLastUpdated {
2
+ /** Id of Content to get information for */
3
+ contentId: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface GetContentStateSettings {
2
+ /** SpaceKey */
3
+ spaceKey: string;
4
+ }
@@ -5,4 +5,9 @@ export interface GetGroupMembersByGroupId {
5
5
  start?: number;
6
6
  /** The maximum number of users to return per page. Note, this may be restricted by fixed system limits. */
7
7
  limit?: number;
8
+ /**
9
+ * Whether to include total size parameter in the results. Note, fetching total size property is an expensive
10
+ * operation; use it if your use case needs this value.
11
+ */
12
+ shouldReturnTotalSize?: boolean;
8
13
  }
@@ -8,4 +8,9 @@ export interface GetMembersByQueryParam {
8
8
  * say if the limit parameter exceeds 200, this API will return a maximum of 200 users per page.
9
9
  */
10
10
  limit?: number;
11
+ /**
12
+ * Whether to include total size parameter in the results. Note, fetching total size property is an expensive
13
+ * operation; use it if your use case needs this value.
14
+ */
15
+ shouldReturnTotalSize?: boolean;
11
16
  }
@@ -21,7 +21,37 @@ export interface GetSpaces {
21
21
  */
22
22
  favouriteUserKey?: string;
23
23
  /** A multi-value parameter indicating which properties of the content to expand. */
24
- expand?: string[];
24
+ expand?:
25
+ | 'settings'
26
+ | 'metadata'
27
+ | 'metadata.labels'
28
+ | 'operations'
29
+ | 'lookAndFeel'
30
+ | 'permissions'
31
+ | 'icon'
32
+ | 'description'
33
+ | 'description.plain'
34
+ | 'description.view'
35
+ | 'theme'
36
+ | 'homepage'
37
+ | 'history'
38
+ | (
39
+ | 'settings'
40
+ | 'metadata'
41
+ | 'metadata.labels'
42
+ | 'operations'
43
+ | 'lookAndFeel'
44
+ | 'permissions'
45
+ | 'icon'
46
+ | 'description'
47
+ | 'description.plain'
48
+ | 'description.view'
49
+ | 'theme'
50
+ | 'homepage'
51
+ | 'history'
52
+ )[]
53
+ | string
54
+ | string[];
25
55
  /** The starting index of the returned spaces. */
26
56
  start?: number;
27
57
  /** The maximum number of spaces to return per page. Note, this may be restricted by fixed system limits. */
@@ -0,0 +1,8 @@
1
+ export interface GetUserProperties {
2
+ /** The account ID of the user to be queried for its properties. */
3
+ userId: string;
4
+ /** The starting index of the returned properties. */
5
+ start?: number;
6
+ /** The maximum number of properties to return per page. Note, this may be restricted by fixed system limits. */
7
+ limit?: number;
8
+ }
@@ -0,0 +1,6 @@
1
+ export interface GetUserProperty {
2
+ /** The account ID of the user to be queried for its properties. */
3
+ userId: string;
4
+ /** The key of the user property. */
5
+ key: string;
6
+ }
@@ -30,15 +30,18 @@ export * from './createRelationship';
30
30
  export * from './createSpace';
31
31
  export * from './createSpaceProperty';
32
32
  export * from './createSpacePropertyForKey';
33
+ export * from './createUserProperty';
33
34
  export * from './delete';
34
35
  export * from './deleteContent';
35
36
  export * from './deleteContentProperty';
36
37
  export * from './deleteContentVersion';
37
38
  export * from './deleteLabelFromSpace';
39
+ export * from './deletePageTree';
38
40
  export * from './deleteRelationship';
39
41
  export * from './deleteRestrictions';
40
42
  export * from './deleteSpace';
41
43
  export * from './deleteSpaceProperty';
44
+ export * from './deleteUserProperty';
42
45
  export * from './descendantsOfType';
43
46
  export * from './downloadAttachment';
44
47
  export * from './exportAuditRecords';
@@ -49,6 +52,7 @@ export * from './getAnonymousUser';
49
52
  export * from './getAttachments';
50
53
  export * from './getAuditRecords';
51
54
  export * from './getAuditRecordsForTimePeriod';
55
+ export * from './getAvailableContentStates';
52
56
  export * from './getBlueprintTemplates';
53
57
  export * from './getBulkUserLookup';
54
58
  export * from './getBulkUserMigration';
@@ -64,6 +68,9 @@ export * from './getContentProperties';
64
68
  export * from './getContentProperty';
65
69
  export * from './getContentRestrictionStatusForGroup';
66
70
  export * from './getContentRestrictionStatusForUser';
71
+ export * from './getContentState';
72
+ export * from './getContentStateLastUpdated';
73
+ export * from './getContentStateSettings';
67
74
  export * from './getContentTemplate';
68
75
  export * from './getContentTemplates';
69
76
  export * from './getContentVersion';
@@ -105,6 +112,8 @@ export * from './getTasks';
105
112
  export * from './getTheme';
106
113
  export * from './getThemes';
107
114
  export * from './getUser';
115
+ export * from './getUserProperties';
116
+ export * from './getUserProperty';
108
117
  export * from './getViewers';
109
118
  export * from './getViews';
110
119
  export * from './getWatchersForSpace';
@@ -117,6 +126,7 @@ export * from './permissionCheck';
117
126
  export * from './publishLegacyDraft';
118
127
  export * from './publishSharedDraft';
119
128
  export * from './registerModules';
129
+ export * from './removeContentState';
120
130
  export * from './removeContentWatcher';
121
131
  export * from './removeGroup';
122
132
  export * from './removeGroupById';
@@ -140,6 +150,7 @@ export * from './searchContentByCQL';
140
150
  export * from './searchGroups';
141
151
  export * from './searchTasks';
142
152
  export * from './searchUser';
153
+ export * from './setContentState';
143
154
  export * from './setLookAndFeelSettings';
144
155
  export * from './setRetentionPeriod';
145
156
  export * from './setSpaceTheme';
@@ -155,4 +166,5 @@ export * from './updateSpace';
155
166
  export * from './updateSpaceProperty';
156
167
  export * from './updateSpaceSettings';
157
168
  export * from './updateTaskById';
169
+ export * from './updateUserProperty';
158
170
  export * from './userSearch';
@@ -0,0 +1,4 @@
1
+ export interface RemoveContentState {
2
+ /** The Id of the content whose content state is to be set. */
3
+ contentId: string;
4
+ }
@@ -5,4 +5,9 @@ export interface SearchGroups {
5
5
  start?: number;
6
6
  /** The maximum number of groups to return per page. Note, this is restricted to a maximum limit of 200 groups. */
7
7
  limit?: number;
8
+ /**
9
+ * Whether to include total size parameter in the results. Note, fetching total size property is an expensive
10
+ * operation; use it if your use case needs this value.
11
+ */
12
+ shouldReturnTotalSize?: boolean;
8
13
  }
@@ -0,0 +1,8 @@
1
+ export interface SetContentState {
2
+ /** The Id of the content whose content state is to be set. */
3
+ contentId: string;
4
+ /** The Id of the content */
5
+ contentStateId?: number;
6
+ name?: string;
7
+ color?: string;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { UserPropertyUpdate } from '../models';
2
+
3
+ export interface UpdateUserProperty extends UserPropertyUpdate {
4
+ /**
5
+ * The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For
6
+ * example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192
7
+ */
8
+ userId: string;
9
+ /** The key of the user property. */
10
+ key: string;
11
+ }
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Relation {
package/src/api/search.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Search {
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Settings {
@@ -230,4 +230,26 @@ export class Settings {
230
230
 
231
231
  return this.client.sendRequest(config, callback);
232
232
  }
233
+
234
+ /** Gets Content State settings for a space */
235
+ async getContentStateSettings<T = Models.ContentStateSettings>(
236
+ parameters: Parameters.GetContentStateSettings,
237
+ callback: Callback<T>
238
+ ): Promise<void>;
239
+ /** Gets Content State settings for a space */
240
+ async getContentStateSettings<T = Models.ContentStateSettings>(
241
+ parameters: Parameters.GetContentStateSettings,
242
+ callback?: never
243
+ ): Promise<T>;
244
+ async getContentStateSettings<T = Models.ContentStateSettings>(
245
+ parameters: Parameters.GetContentStateSettings,
246
+ callback?: Callback<T>,
247
+ ): Promise<void | T> {
248
+ const config: RequestConfig = {
249
+ url: `/api/space/${parameters.spaceKey}/state/settings`,
250
+ method: 'GET',
251
+ };
252
+
253
+ return this.client.sendRequest(config, callback);
254
+ }
233
255
  }
package/src/api/space.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
+ import { paramSerializer } from '../paramSerializer';
5
6
  import { RequestConfig } from '../requestConfig';
6
7
 
7
8
  export class Space {
@@ -31,7 +32,7 @@ export class Space {
31
32
  url: '/api/space',
32
33
  method: 'GET',
33
34
  params: {
34
- spaceKey: () => parameters?.spaceKey?.map((key) => `spaceKey=${key}`).join('&'),
35
+ spaceKey: paramSerializer('spaceKey', parameters?.spaceKey),
35
36
  spaceId: parameters?.spaceId,
36
37
  type: parameters?.type,
37
38
  status: parameters?.status,
@@ -129,6 +130,9 @@ export class Space {
129
130
  const config: RequestConfig = {
130
131
  url: `/api/space/${parameters.spaceKey}`,
131
132
  method: 'GET',
133
+ params: {
134
+ expand: parameters.expand,
135
+ },
132
136
  };
133
137
 
134
138
  return this.client.sendRequest(config, callback);
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class SpacePermissions {
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class SpaceProperties {
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class SpaceSettings {
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Template {
package/src/api/themes.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Themes {
package/src/api/users.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Users {
@@ -119,7 +119,7 @@ export class Users {
119
119
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
120
120
  * ('Can use' global permission).
121
121
  */
122
- async getGroupMembershipsForUser<T = Models.GroupArray>(
122
+ async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(
123
123
  parameters: Parameters.GetGroupMembershipsForUser,
124
124
  callback: Callback<T>
125
125
  ): Promise<void>;
@@ -129,11 +129,11 @@ export class Users {
129
129
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
130
130
  * ('Can use' global permission).
131
131
  */
132
- async getGroupMembershipsForUser<T = Models.GroupArray>(
132
+ async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(
133
133
  parameters: Parameters.GetGroupMembershipsForUser,
134
134
  callback?: never
135
135
  ): Promise<T>;
136
- async getGroupMembershipsForUser<T = Models.GroupArray>(
136
+ async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(
137
137
  parameters: Parameters.GetGroupMembershipsForUser,
138
138
  callback?: Callback<T>,
139
139
  ): Promise<void | T> {
@@ -1,9 +1,9 @@
1
- import axios, { AxiosInstance } from 'axios';
2
- import type { Client } from './client';
1
+ import { AuthenticationService } from '../services/authenticationService';
3
2
  import type { Callback } from '../callback';
3
+ import type { Client } from './client';
4
4
  import type { Config } from '../config';
5
- import { AuthenticationService } from '../services/authenticationService';
6
5
  import type { RequestConfig } from '../requestConfig';
6
+ import axios, { AxiosInstance } from 'axios';
7
7
 
8
8
  const ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token';
9
9
  const ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = 'no-check';
@@ -1,11 +1,13 @@
1
1
  import { BaseClient } from './baseClient';
2
2
  import {
3
+ Analytics,
3
4
  Audit,
4
5
  Content,
5
6
  ContentAttachments,
6
7
  ContentBody,
7
8
  ContentChildrenAndDescendants,
8
9
  ContentComments,
10
+ ContentContentState,
9
11
  ContentLabels,
10
12
  ContentMacroBody,
11
13
  ContentPermissions,
@@ -32,12 +34,14 @@ import {
32
34
  } from '../api';
33
35
 
34
36
  export class ConfluenceClient extends BaseClient {
37
+ analytics = new Analytics(this);
35
38
  audit = new Audit(this);
36
39
  content = new Content(this);
37
40
  contentAttachments = new ContentAttachments(this);
38
41
  contentBody = new ContentBody(this);
39
42
  contentChildrenAndDescendants = new ContentChildrenAndDescendants(this);
40
43
  contentComments = new ContentComments(this);
44
+ contentContentState = new ContentContentState(this);
41
45
  contentLabels = new ContentLabels(this);
42
46
  contentMacroBody = new ContentMacroBody(this);
43
47
  contentPermissions = new ContentPermissions(this);
package/src/config.ts CHANGED
@@ -23,11 +23,13 @@ export namespace Config {
23
23
 
24
24
  export type Authentication = UtilityTypes.XOR<{
25
25
  jwt: Authentication.JWT;
26
+ }, UtilityTypes.XOR<{
27
+ personalAccessToken: Authentication.PersonalAccessToken;
26
28
  }, UtilityTypes.XOR<{
27
29
  basic: Authentication.Basic;
28
30
  }, {
29
31
  oauth2: Authentication.OAuth2;
30
- }>>;
32
+ }>>>;
31
33
 
32
34
  export interface Middlewares {
33
35
  onError?: Config.Middlewares.OnErrorHandler;
@@ -40,10 +42,12 @@ export namespace Config {
40
42
  }
41
43
 
42
44
  export namespace Authentication {
45
+ export type PersonalAccessToken = string;
46
+
43
47
  export type JWT = {
44
48
  /** The key from the app descriptor. */
45
49
  issuer: string;
46
- /** The sharedsecret key received during the app installation handshake */
50
+ /** The shared secret key received during the app installation handshake */
47
51
  secret: string;
48
52
  /** Token expiry time (default 3 minutes after issuing) */
49
53
  expiryTimeSeconds?: number;
@@ -0,0 +1,15 @@
1
+ export function paramSerializer(key: string, values?: string | string[]) {
2
+ if (typeof values === 'string') {
3
+ return () => `${key}=${values}`;
4
+ }
5
+
6
+ if (!values) {
7
+ return undefined;
8
+ }
9
+
10
+ if (!values.length) {
11
+ return '';
12
+ }
13
+
14
+ return () => values.map((value) => `${key}=${value}`).join('&');
15
+ }
@@ -1,9 +1,9 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
5
- import { RequestConfig } from '../requestConfig';
4
+ import { Client } from '../clients';
6
5
  import { Pagination } from '../pagination';
6
+ import { RequestConfig } from '../requestConfig';
7
7
 
8
8
  export class Audit {
9
9
  constructor(private client: Client) {}
@@ -1,9 +1,9 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
5
- import { RequestConfig } from '../requestConfig';
4
+ import { Client } from '../clients';
6
5
  import { Pagination } from '../pagination';
6
+ import { RequestConfig } from '../requestConfig';
7
7
 
8
8
  export class Content {
9
9
  constructor(private client: Client) {}
@@ -1,7 +1,7 @@
1
1
  import * as Models from './models';
2
2
  import * as Parameters from './parameters';
3
- import { Client } from '../clients';
4
3
  import { Callback } from '../callback';
4
+ import { Client } from '../clients';
5
5
  import { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class ContentBody {