confluence.js 1.1.3 → 1.3.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 (188) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +1 -57
  3. package/out/api/content.d.ts +24 -52
  4. package/out/api/content.js +15 -0
  5. package/out/api/contentAttachments.d.ts +10 -6
  6. package/out/api/contentAttachments.js +13 -0
  7. package/out/api/contentChildrenAndDescendants.d.ts +6 -24
  8. package/out/api/contentChildrenAndDescendants.js +6 -0
  9. package/out/api/contentPermissions.d.ts +6 -2
  10. package/out/api/contentPermissions.js +6 -1
  11. package/out/api/contentProperties.js +2 -0
  12. package/out/api/contentWatches.d.ts +2 -2
  13. package/out/api/experimental.d.ts +52 -0
  14. package/out/api/experimental.js +70 -0
  15. package/out/api/group.d.ts +30 -10
  16. package/out/api/group.js +31 -2
  17. package/out/api/index.d.ts +1 -0
  18. package/out/api/index.js +1 -0
  19. package/out/api/inlineTasks.d.ts +28 -0
  20. package/out/api/inlineTasks.js +21 -0
  21. package/out/api/models/getViewers.d.ts +6 -0
  22. package/out/api/models/getViewers.js +2 -0
  23. package/out/api/models/getViews.d.ts +6 -0
  24. package/out/api/models/getViews.js +2 -0
  25. package/out/api/models/groupCreate.d.ts +4 -0
  26. package/out/api/models/groupCreate.js +2 -0
  27. package/out/api/models/horizontalHeaderLookAndFeel.d.ts +11 -0
  28. package/out/api/models/horizontalHeaderLookAndFeel.js +2 -0
  29. package/out/api/models/index.d.ts +13 -4
  30. package/out/api/models/index.js +13 -4
  31. package/out/api/models/lookAndFeel.d.ts +3 -0
  32. package/out/api/models/spacePermissionCreate.d.ts +33 -0
  33. package/out/api/models/spacePermissionCreate.js +2 -0
  34. package/out/api/models/spacePermissionCustomContent.d.ts +16 -0
  35. package/out/api/models/spacePermissionCustomContent.js +2 -0
  36. package/out/api/models/spacePermissionRequest.d.ts +41 -0
  37. package/out/api/models/spacePermissionRequest.js +2 -0
  38. package/out/api/models/spacePrivateCreate.d.ts +9 -0
  39. package/out/api/models/spacePropertyCreate.d.ts +4 -0
  40. package/out/api/models/spaceUpdate.d.ts +4 -0
  41. package/out/api/models/taskStatusUpdate.d.ts +3 -0
  42. package/out/api/models/taskStatusUpdate.js +2 -0
  43. package/out/api/models/topNavigationLookAndFeel.d.ts +8 -0
  44. package/out/api/models/topNavigationLookAndFeel.js +2 -0
  45. package/out/api/parameters/addCustomContentPermissions.d.ts +5 -0
  46. package/out/api/parameters/addCustomContentPermissions.js +2 -0
  47. package/out/api/parameters/addLabelsToSpace.d.ts +4 -0
  48. package/out/api/parameters/addLabelsToSpace.js +2 -0
  49. package/out/api/parameters/addPermissionToSpace.d.ts +5 -0
  50. package/out/api/parameters/addPermissionToSpace.js +2 -0
  51. package/out/api/parameters/addUserToGroup.d.ts +2 -1
  52. package/out/api/parameters/addUserToGroupByGroupId.d.ts +2 -1
  53. package/out/api/parameters/archivePages.d.ts +6 -0
  54. package/out/api/parameters/archivePages.js +2 -0
  55. package/out/api/parameters/checkContentPermission.d.ts +5 -0
  56. package/out/api/parameters/checkContentPermission.js +2 -0
  57. package/out/api/parameters/deleteLabelFromSpace.d.ts +8 -0
  58. package/out/api/parameters/deleteLabelFromSpace.js +2 -0
  59. package/out/api/parameters/deleteRelationship.d.ts +38 -0
  60. package/out/api/parameters/deleteRelationship.js +2 -0
  61. package/out/api/parameters/downloadAttachment.d.ts +11 -0
  62. package/out/api/parameters/downloadAttachment.js +2 -0
  63. package/out/api/parameters/getBulkUserLookup.d.ts +0 -6
  64. package/out/api/parameters/getContentById.d.ts +85 -1
  65. package/out/api/parameters/getContentById.js +87 -0
  66. package/out/api/parameters/getContentChildren.d.ts +1 -0
  67. package/out/api/parameters/getContentProperties.d.ts +2 -0
  68. package/out/api/parameters/getContentProperty.d.ts +12 -0
  69. package/out/api/parameters/getContentVersions.d.ts +1 -1
  70. package/out/api/parameters/getCurrentUser.d.ts +1 -6
  71. package/out/api/parameters/getDescendantsOfType.d.ts +101 -0
  72. package/out/api/parameters/getDescendantsOfType.js +89 -0
  73. package/out/api/parameters/getGroupByName.d.ts +4 -0
  74. package/out/api/parameters/getGroupByName.js +2 -0
  75. package/out/api/parameters/getGroups.d.ts +2 -0
  76. package/out/api/parameters/getHistoryForContent.d.ts +1 -1
  77. package/out/api/parameters/getLabelsForSpace.d.ts +18 -0
  78. package/out/api/parameters/getLabelsForSpace.js +2 -0
  79. package/out/api/parameters/getTaskById.d.ts +4 -0
  80. package/out/api/parameters/getTaskById.js +2 -0
  81. package/out/api/parameters/getViewers.d.ts +6 -0
  82. package/out/api/parameters/getViewers.js +2 -0
  83. package/out/api/parameters/getViews.d.ts +6 -0
  84. package/out/api/parameters/getViews.js +2 -0
  85. package/out/api/parameters/index.d.ts +134 -116
  86. package/out/api/parameters/index.js +134 -116
  87. package/out/api/parameters/publishLegacyDraft.d.ts +3 -1
  88. package/out/api/parameters/publishSharedDraft.d.ts +3 -1
  89. package/out/api/parameters/restoreContentVersion.d.ts +1 -1
  90. package/out/api/parameters/searchByCQL.d.ts +34 -0
  91. package/out/api/parameters/searchByCQL.js +2 -0
  92. package/out/api/parameters/searchGroups.d.ts +8 -0
  93. package/out/api/parameters/searchGroups.js +2 -0
  94. package/out/api/parameters/searchUser.d.ts +27 -0
  95. package/out/api/parameters/searchUser.js +2 -0
  96. package/out/api/parameters/updateTaskById.d.ts +5 -0
  97. package/out/api/parameters/updateTaskById.js +2 -0
  98. package/out/api/relation.d.ts +12 -4
  99. package/out/api/relation.js +12 -2
  100. package/out/api/search.d.ts +12 -64
  101. package/out/api/search.js +19 -2
  102. package/out/api/settings.d.ts +2 -2
  103. package/out/api/settings.js +3 -0
  104. package/out/api/space.js +5 -1
  105. package/out/api/spacePermissions.d.ts +26 -2
  106. package/out/api/spacePermissions.js +20 -3
  107. package/out/api/spaceProperties.d.ts +4 -4
  108. package/out/api/spaceProperties.js +1 -0
  109. package/out/api/template.d.ts +24 -16
  110. package/out/clients/baseClient.d.ts +2 -5
  111. package/out/clients/baseClient.js +4 -30
  112. package/out/clients/client.d.ts +2 -3
  113. package/out/clients/confluenceClient.d.ts +2 -1
  114. package/out/clients/confluenceClient.js +1 -0
  115. package/out/config.d.ts +3 -2
  116. package/out/index.d.ts +1 -0
  117. package/out/index.js +2 -1
  118. package/package.json +24 -24
  119. package/src/api/content.ts +58 -52
  120. package/src/api/contentAttachments.ts +29 -6
  121. package/src/api/contentChildrenAndDescendants.ts +24 -28
  122. package/src/api/contentPermissions.ts +24 -7
  123. package/src/api/contentProperties.ts +2 -0
  124. package/src/api/contentWatches.ts +3 -3
  125. package/src/api/experimental.ts +137 -0
  126. package/src/api/group.ts +71 -19
  127. package/src/api/index.ts +1 -0
  128. package/src/api/inlineTasks.ts +52 -0
  129. package/src/api/models/getViewers.ts +6 -0
  130. package/src/api/models/getViews.ts +6 -0
  131. package/src/api/models/groupCreate.ts +4 -0
  132. package/src/api/models/horizontalHeaderLookAndFeel.ts +12 -0
  133. package/src/api/models/index.ts +13 -4
  134. package/src/api/models/lookAndFeel.ts +3 -0
  135. package/src/api/models/spacePermissionCreate.ts +34 -0
  136. package/src/api/models/spacePermissionCustomContent.ts +17 -0
  137. package/src/api/models/spacePermissionRequest.ts +42 -0
  138. package/src/api/models/spacePrivateCreate.ts +9 -0
  139. package/src/api/models/spacePropertyCreate.ts +4 -0
  140. package/src/api/models/spaceUpdate.ts +4 -0
  141. package/src/api/models/taskStatusUpdate.ts +3 -0
  142. package/src/api/models/topNavigationLookAndFeel.ts +8 -0
  143. package/src/api/parameters/addCustomContentPermissions.ts +6 -0
  144. package/src/api/parameters/addLabelsToSpace.ts +4 -0
  145. package/src/api/parameters/addPermissionToSpace.ts +6 -0
  146. package/src/api/parameters/addUserToGroup.ts +3 -1
  147. package/src/api/parameters/addUserToGroupByGroupId.ts +3 -1
  148. package/src/api/parameters/archivePages.ts +6 -0
  149. package/src/api/parameters/checkContentPermission.ts +6 -0
  150. package/src/api/parameters/deleteLabelFromSpace.ts +8 -0
  151. package/src/api/parameters/deleteRelationship.ts +38 -0
  152. package/src/api/parameters/downloadAttachment.ts +11 -0
  153. package/src/api/parameters/getBulkUserLookup.ts +0 -6
  154. package/src/api/parameters/getContentById.ts +86 -1
  155. package/src/api/parameters/getContentChildren.ts +1 -0
  156. package/src/api/parameters/getContentProperties.ts +2 -0
  157. package/src/api/parameters/getContentProperty.ts +12 -0
  158. package/src/api/parameters/getContentVersions.ts +1 -1
  159. package/src/api/parameters/getCurrentUser.ts +1 -6
  160. package/src/api/parameters/getDescendantsOfType.ts +102 -0
  161. package/src/api/parameters/getGroupByName.ts +4 -0
  162. package/src/api/parameters/getGroups.ts +2 -0
  163. package/src/api/parameters/getHistoryForContent.ts +1 -1
  164. package/src/api/parameters/getLabelsForSpace.ts +18 -0
  165. package/src/api/parameters/getTaskById.ts +4 -0
  166. package/src/api/parameters/getViewers.ts +6 -0
  167. package/src/api/parameters/getViews.ts +6 -0
  168. package/src/api/parameters/index.ts +134 -116
  169. package/src/api/parameters/publishLegacyDraft.ts +4 -1
  170. package/src/api/parameters/publishSharedDraft.ts +4 -1
  171. package/src/api/parameters/restoreContentVersion.ts +1 -1
  172. package/src/api/parameters/searchByCQL.ts +34 -0
  173. package/src/api/parameters/searchGroups.ts +8 -0
  174. package/src/api/parameters/searchUser.ts +27 -0
  175. package/src/api/parameters/updateTaskById.ts +6 -0
  176. package/src/api/relation.ts +33 -8
  177. package/src/api/search.ts +53 -73
  178. package/src/api/settings.ts +6 -3
  179. package/src/api/space.ts +4 -1
  180. package/src/api/spacePermissions.ts +66 -8
  181. package/src/api/spaceProperties.ts +5 -4
  182. package/src/api/template.ts +24 -16
  183. package/src/clients/baseClient.ts +4 -60
  184. package/src/clients/client.ts +2 -3
  185. package/src/clients/confluenceClient.ts +2 -0
  186. package/src/config.ts +3 -2
  187. package/src/index.ts +1 -0
  188. package/tsconfig.json +2 -1
@@ -0,0 +1,5 @@
1
+ import { SpacePermissionCustomContent } from '../models';
2
+ export interface AddCustomContentPermissions extends SpacePermissionCustomContent {
3
+ /** The key of the space to be queried for its content. */
4
+ spaceKey: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface AddLabelsToSpace {
2
+ /** The key of the space to add labels to. */
3
+ spaceKey: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { SpacePermissionRequest } from '../models';
2
+ export interface AddPermissionToSpace extends SpacePermissionRequest {
3
+ /** The key of the space to be queried for its content. */
4
+ spaceKey: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
- export interface AddUserToGroup {
1
+ import { AccountId } from '../models';
2
+ export interface AddUserToGroup extends AccountId {
2
3
  /** Name of the group whose membership is updated */
3
4
  name: string;
4
5
  }
@@ -1,4 +1,5 @@
1
- export interface AddUserToGroupByGroupId {
1
+ import { AccountId } from '../models';
2
+ export interface AddUserToGroupByGroupId extends AccountId {
2
3
  /** GroupId of the group whose membership is updated */
3
4
  groupId: string;
4
5
  }
@@ -0,0 +1,6 @@
1
+ export interface ArchivePages {
2
+ pages: Array<{
3
+ /** The `id` of the page to be archived. */
4
+ id: number;
5
+ }>;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { ContentPermissionRequest } from '../models';
2
+ export interface CheckContentPermission extends ContentPermissionRequest {
3
+ /** The ID of the content to check permissions against. */
4
+ id: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface DeleteLabelFromSpace {
2
+ /** The key of the space to remove a labels from. */
3
+ spaceKey: string;
4
+ /** The name of the label to remove */
5
+ name: string;
6
+ /** The prefix of the label to remove. If not provided defaults to global. */
7
+ prefix?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,38 @@
1
+ export interface DeleteRelationship {
2
+ /** The name of the relationship. */
3
+ relationName: string;
4
+ /** The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'. */
5
+ sourceType: string;
6
+ /**
7
+ * - The identifier for the source entity:
8
+ *
9
+ * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key.
10
+ * - If `sourceType` is 'content', then specify the content ID.
11
+ * - If `sourceType` is 'space', then specify the space key.
12
+ */
13
+ sourceKey: string;
14
+ /** The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is 'favourite'. */
15
+ targetType: string;
16
+ /**
17
+ * - The identifier for the target entity:
18
+ *
19
+ * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key.
20
+ * - If `sourceType` is 'content', then specify the content ID.
21
+ * - If `sourceType` is 'space', then specify the space key.
22
+ */
23
+ targetKey: string;
24
+ /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */
25
+ sourceStatus?: string;
26
+ /** The status of the target. This parameter is only used when the `targetType` is 'content'. */
27
+ targetStatus?: string;
28
+ /**
29
+ * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus`
30
+ * is 'historical'.
31
+ */
32
+ sourceVersion?: number;
33
+ /**
34
+ * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus`
35
+ * is 'historical'.
36
+ */
37
+ targetVersion?: number;
38
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export interface DownloadAttachment {
2
+ /** The ID of the content that the attachment is attached to. */
3
+ id: string;
4
+ /** The ID of the attachment to download. */
5
+ attachmentId: string;
6
+ /**
7
+ * The version of the attachment. If this parameter is absent, the redirect URI will download the latest version of
8
+ * the attachment.
9
+ */
10
+ version?: number;
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,12 +5,6 @@ export interface GetBulkUserLookup {
5
5
  * A multi-value parameter indicating which properties of the user to expand.
6
6
  *
7
7
  * - `operations` returns the operations that the user is allowed to do.
8
- * - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that
9
- * these fields have been deprecated due to privacy changes. See the [migration
10
- * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
11
- * - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note
12
- * that these fields have been deprecated due to privacy changes. See the [migration
13
- * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
14
8
  * - PersonalSpace returns the user's personal space, if it exists.
15
9
  */
16
10
  expand?: string[];
@@ -19,10 +19,94 @@ export interface GetContentById {
19
19
  */
20
20
  embeddedContentRender?: string;
21
21
  /** A multi-value parameter indicating which properties of the content to expand. */
22
- expand?: string[];
22
+ expand?: string | string[] | GetContentById.Expand | GetContentById.Expand[];
23
23
  /**
24
24
  * If set to `viewed`, the request will trigger a 'viewed' event for the content. When this event is triggered, the
25
25
  * page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard.
26
26
  */
27
27
  trigger?: string;
28
28
  }
29
+ export declare namespace GetContentById {
30
+ enum Expand {
31
+ /**
32
+ * Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
33
+ * the content has children of a particular type.
34
+ */
35
+ AllChildTypes = "childTypes.all",
36
+ /** Returns whether the content has attachments. */
37
+ AttachmentChildType = "childTypes.attachment",
38
+ /** Returns whether the content has comments. */
39
+ CommentChildType = "childTypes.comment",
40
+ /** Returns whether the content has child pages. */
41
+ PageChildType = "childTypes.page",
42
+ /**
43
+ * Returns the space that the content is in. This is the same as the information returned by [Get
44
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
45
+ */
46
+ Container = "container",
47
+ /**
48
+ * Returns information about the current user in relation to the content, including when they last viewed it,
49
+ * modified it, contributed to it, or added it as a favorite.
50
+ */
51
+ CurrentUserMetadata = "metadata.currentuser",
52
+ /** Returns content properties that have been set via the Confluence REST API. */
53
+ PropertiesMetadata = "metadata.properties",
54
+ /** Returns the labels that have been added to the content. */
55
+ LabelsMetadata = "metadata.labels",
56
+ /** This property is only used by Atlassian. */
57
+ FrontendMetadata = "metadata.frontend",
58
+ /** Returns the operations for the content, which are used when setting permissions. */
59
+ Operations = "operations",
60
+ /** Returns pages that are descendants at the level immediately below the content. */
61
+ PageChildren = "children.page",
62
+ /** Returns all attachments for the content. */
63
+ AttachmentChildren = "children.attachment",
64
+ /** Returns all comments on the content. */
65
+ CommentChildren = "children.comment",
66
+ /** Returns the users that have permission to read the content. */
67
+ ReadUserRestriction = "restrictions.read.restrictions.user",
68
+ /**
69
+ * Returns the groups that have permission to read the content. Note that this may return deleted groups, because
70
+ * deleting a group doesn't remove associated restrictions.
71
+ */
72
+ ReadGroupRestriction = "restrictions.read.restrictions.group",
73
+ /** Returns the users that have permission to update the content. */
74
+ UpdateUserRestriction = "restrictions.update.restrictions.user",
75
+ /**
76
+ * Returns the groups that have permission to update the content. Note that this may return deleted groups because
77
+ * deleting a group doesn't remove associated restrictions.
78
+ */
79
+ UpdateGroupRestriction = "restrictions.update.restrictions.group",
80
+ /** Returns the history of the content, including the date it was created. */
81
+ History = "history",
82
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
83
+ LastUpdated = "history.lastUpdated",
84
+ /** Returns information about the update prior to the current content update. */
85
+ PreviousVersion = "history.previousVersion",
86
+ /** Returns all of the users who have contributed to the content. */
87
+ Contributors = "history.contributors",
88
+ /** Returns information about the update after to the current content update. */
89
+ NextVersion = "history.nextVersion",
90
+ /** Returns the parent page, if the content is a page. */
91
+ Ancestors = "ancestors",
92
+ /** Returns the body of the content in different formats, including the editor format, view format, and export format. */
93
+ Body = "body",
94
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
95
+ Version = "version",
96
+ /** Returns pages that are descendants at any level below the content. */
97
+ PageDescendant = "descendants.page",
98
+ /** Returns all attachments for the content, same as `children.attachment`. */
99
+ AttachmentDescendant = "descendants.attachment",
100
+ /** Returns all comments on the content, same as `children.comment`. */
101
+ CommentDescendant = "descendants.comment",
102
+ /**
103
+ * Returns the space that the content is in. This is the same as the information returned by [Get
104
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
105
+ */
106
+ Space = "space",
107
+ /** Returns inline comment-specific properties. */
108
+ InlineProperties = "extensions.inlineProperties",
109
+ /** Returns the resolution status of each comment. */
110
+ Resolution = "extensions.resolution"
111
+ }
112
+ }
@@ -1,2 +1,89 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetContentById = void 0;
4
+ var GetContentById;
5
+ (function (GetContentById) {
6
+ let Expand;
7
+ (function (Expand) {
8
+ /**
9
+ * Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
10
+ * the content has children of a particular type.
11
+ */
12
+ Expand["AllChildTypes"] = "childTypes.all";
13
+ /** Returns whether the content has attachments. */
14
+ Expand["AttachmentChildType"] = "childTypes.attachment";
15
+ /** Returns whether the content has comments. */
16
+ Expand["CommentChildType"] = "childTypes.comment";
17
+ /** Returns whether the content has child pages. */
18
+ Expand["PageChildType"] = "childTypes.page";
19
+ /**
20
+ * Returns the space that the content is in. This is the same as the information returned by [Get
21
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
22
+ */
23
+ Expand["Container"] = "container";
24
+ /**
25
+ * Returns information about the current user in relation to the content, including when they last viewed it,
26
+ * modified it, contributed to it, or added it as a favorite.
27
+ */
28
+ Expand["CurrentUserMetadata"] = "metadata.currentuser";
29
+ /** Returns content properties that have been set via the Confluence REST API. */
30
+ Expand["PropertiesMetadata"] = "metadata.properties";
31
+ /** Returns the labels that have been added to the content. */
32
+ Expand["LabelsMetadata"] = "metadata.labels";
33
+ /** This property is only used by Atlassian. */
34
+ Expand["FrontendMetadata"] = "metadata.frontend";
35
+ /** Returns the operations for the content, which are used when setting permissions. */
36
+ Expand["Operations"] = "operations";
37
+ /** Returns pages that are descendants at the level immediately below the content. */
38
+ Expand["PageChildren"] = "children.page";
39
+ /** Returns all attachments for the content. */
40
+ Expand["AttachmentChildren"] = "children.attachment";
41
+ /** Returns all comments on the content. */
42
+ Expand["CommentChildren"] = "children.comment";
43
+ /** Returns the users that have permission to read the content. */
44
+ Expand["ReadUserRestriction"] = "restrictions.read.restrictions.user";
45
+ /**
46
+ * Returns the groups that have permission to read the content. Note that this may return deleted groups, because
47
+ * deleting a group doesn't remove associated restrictions.
48
+ */
49
+ Expand["ReadGroupRestriction"] = "restrictions.read.restrictions.group";
50
+ /** Returns the users that have permission to update the content. */
51
+ Expand["UpdateUserRestriction"] = "restrictions.update.restrictions.user";
52
+ /**
53
+ * Returns the groups that have permission to update the content. Note that this may return deleted groups because
54
+ * deleting a group doesn't remove associated restrictions.
55
+ */
56
+ Expand["UpdateGroupRestriction"] = "restrictions.update.restrictions.group";
57
+ /** Returns the history of the content, including the date it was created. */
58
+ Expand["History"] = "history";
59
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
60
+ Expand["LastUpdated"] = "history.lastUpdated";
61
+ /** Returns information about the update prior to the current content update. */
62
+ Expand["PreviousVersion"] = "history.previousVersion";
63
+ /** Returns all of the users who have contributed to the content. */
64
+ Expand["Contributors"] = "history.contributors";
65
+ /** Returns information about the update after to the current content update. */
66
+ Expand["NextVersion"] = "history.nextVersion";
67
+ /** Returns the parent page, if the content is a page. */
68
+ Expand["Ancestors"] = "ancestors";
69
+ /** Returns the body of the content in different formats, including the editor format, view format, and export format. */
70
+ Expand["Body"] = "body";
71
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
72
+ Expand["Version"] = "version";
73
+ /** Returns pages that are descendants at any level below the content. */
74
+ Expand["PageDescendant"] = "descendants.page";
75
+ /** Returns all attachments for the content, same as `children.attachment`. */
76
+ Expand["AttachmentDescendant"] = "descendants.attachment";
77
+ /** Returns all comments on the content, same as `children.comment`. */
78
+ Expand["CommentDescendant"] = "descendants.comment";
79
+ /**
80
+ * Returns the space that the content is in. This is the same as the information returned by [Get
81
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
82
+ */
83
+ Expand["Space"] = "space";
84
+ /** Returns inline comment-specific properties. */
85
+ Expand["InlineProperties"] = "extensions.inlineProperties";
86
+ /** Returns the resolution status of each comment. */
87
+ Expand["Resolution"] = "extensions.resolution";
88
+ })(Expand = GetContentById.Expand || (GetContentById.Expand = {}));
89
+ })(GetContentById = exports.GetContentById || (exports.GetContentById = {}));
@@ -7,6 +7,7 @@ export interface GetContentChildren {
7
7
  * - `attachment` returns all attachments for the content.
8
8
  * - `comments` returns all comments for the content.
9
9
  * - `page` returns all child pages of the content.
10
+ * - Custom content types that are provided by apps are also supported.
10
11
  */
11
12
  expand?: string[];
12
13
  /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */
@@ -1,6 +1,8 @@
1
1
  export interface GetContentProperties {
2
2
  /** The ID of the content to be queried for its properties. */
3
3
  id: string;
4
+ /** The key of the content property. */
5
+ key?: string[];
4
6
  /**
5
7
  * A multi-value parameter indicating which properties of the content to expand. By default, the `version` object is expanded.
6
8
  *
@@ -10,4 +10,16 @@ export interface GetContentProperty {
10
10
  * - `version` returns information about the version of the property, such as the version number, when it was created, etc.
11
11
  */
12
12
  expand?: string[];
13
+ /**
14
+ * Filter the results to a set of content based on their status. If set to `any`, content with any status is returned.
15
+ * By default it will fetch current and archived statuses `?status=current&status=archived`. All supported statuses
16
+ *
17
+ * - any
18
+ * - archived
19
+ * - current
20
+ * - deleted
21
+ * - draft
22
+ * - trashed
23
+ */
24
+ status?: string[];
13
25
  }
@@ -6,7 +6,7 @@ export interface GetContentVersions {
6
6
  /** The maximum number of versions to return per page. Note, this may be restricted by fixed system limits. */
7
7
  limit?: number;
8
8
  /**
9
- * A multi-value parameter indicating which properties of the content to expand.
9
+ * A multi-value parameter indicating which properties of the content to expand. By default, the `content` object is expanded.
10
10
  *
11
11
  * - `collaborators` returns the users that collaborated on the version.
12
12
  * - `content` returns the content for the version.
@@ -3,13 +3,8 @@ export interface GetCurrentUser {
3
3
  * A multi-value parameter indicating which properties of the user to expand.
4
4
  *
5
5
  * - `operations` returns the operations that the user is allowed to do.
6
- * - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that
7
- * these fields have been deprecated due to privacy changes. See the [migration
8
- * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
9
- * - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note
10
- * that these fields have been deprecated due to privacy changes. See the [migration
11
- * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
12
6
  * - PersonalSpace returns the user's personal space, if it exists.
7
+ * - `isExternalCollaborator` returns whether the user is an external collaborator user
13
8
  */
14
9
  expand?: string[];
15
10
  }
@@ -0,0 +1,101 @@
1
+ export interface GetDescendantsOfType {
2
+ /** The ID of the content to be queried for its descendants. */
3
+ id: string;
4
+ /** The type of descendants to return. */
5
+ type: string | 'page' | 'comment' | 'attachment';
6
+ /**
7
+ * Filter the results to descendants upto a desired level of the content. Note, the maximum value supported is 100.
8
+ * root level of the content means immediate (level 1) descendants of the type requested. all represents returning all
9
+ * descendants of the type requested.
10
+ */
11
+ depth?: string;
12
+ /** The starting index of the returned content. */
13
+ start?: number;
14
+ /** The maximum number of content to return per page. Note, this may be restricted by fixed system limits. */
15
+ limit?: number;
16
+ expand?: string | string[] | GetDescendantsOfType.Expand | GetDescendantsOfType.Expand[];
17
+ }
18
+ export declare namespace GetDescendantsOfType {
19
+ enum Expand {
20
+ /**
21
+ * Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
22
+ * the content has children of a particular type.
23
+ */
24
+ AllChildTypes = "childTypes.all",
25
+ /** Returns whether the content has attachments. */
26
+ AttachmentChildType = "childTypes.attachment",
27
+ /** Returns whether the content has comments. */
28
+ CommentChildType = "childTypes.comment",
29
+ /** Returns whether the content has child pages. */
30
+ PageChildType = "childTypes.page",
31
+ /**
32
+ * Returns the space that the content is in. This is the same as the information returned by [Get
33
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
34
+ */
35
+ Container = "container",
36
+ /**
37
+ * Returns information about the current user in relation to the content, including when they last viewed it,
38
+ * modified it, contributed to it, or added it as a favorite.
39
+ */
40
+ CurrentUserMetadata = "metadata.currentuser",
41
+ /** Returns content properties that have been set via the Confluence REST API. */
42
+ PropertiesMetadata = "metadata.properties",
43
+ /** Returns the labels that have been added to the content. */
44
+ LabelsMetadata = "metadata.labels",
45
+ /** This property is only used by Atlassian. */
46
+ FrontendMetadata = "metadata.frontend",
47
+ /** Returns the operations for the content, which are used when setting permissions. */
48
+ Operations = "operations",
49
+ /** Returns pages that are descendants at the level immediately below the content. */
50
+ PageChildren = "children.page",
51
+ /** Returns all attachments for the content. */
52
+ AttachmentChildren = "children.attachment",
53
+ /** Returns all comments on the content. */
54
+ CommentChildren = "children.comment",
55
+ /** Returns the users that have permission to read the content. */
56
+ ReadUserRestriction = "restrictions.read.restrictions.user",
57
+ /**
58
+ * Returns the groups that have permission to read the content. Note that this may return deleted groups, because
59
+ * deleting a group doesn't remove associated restrictions.
60
+ */
61
+ ReadGroupRestriction = "restrictions.read.restrictions.group",
62
+ /** Returns the users that have permission to update the content. */
63
+ UpdateUserRestriction = "restrictions.update.restrictions.user",
64
+ /**
65
+ * Returns the groups that have permission to update the content. Note that this may return deleted groups because
66
+ * deleting a group doesn't remove associated restrictions.
67
+ */
68
+ UpdateGroupRestriction = "restrictions.update.restrictions.group",
69
+ /** Returns the history of the content, including the date it was created. */
70
+ History = "history",
71
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
72
+ LastUpdated = "history.lastUpdated",
73
+ /** Returns information about the update prior to the current content update. */
74
+ PreviousVersion = "history.previousVersion",
75
+ /** Returns all of the users who have contributed to the content. */
76
+ Contributors = "history.contributors",
77
+ /** Returns information about the update after to the current content update. */
78
+ NextVersion = "history.nextVersion",
79
+ /** Returns the parent page, if the content is a page. */
80
+ Ancestors = "ancestors",
81
+ /** Returns the body of the content in different formats, including the editor format, view format, and export format. */
82
+ Body = "body",
83
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
84
+ Version = "version",
85
+ /** Returns pages that are descendants at any level below the content. */
86
+ PageDescendant = "descendants.page",
87
+ /** Returns all attachments for the content, same as `children.attachment`. */
88
+ AttachmentDescendant = "descendants.attachment",
89
+ /** Returns all comments on the content, same as `children.comment`. */
90
+ CommentDescendant = "descendants.comment",
91
+ /**
92
+ * Returns the space that the content is in. This is the same as the information returned by [Get
93
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
94
+ */
95
+ Space = "space",
96
+ /** Returns inline comment-specific properties. */
97
+ InlineProperties = "extensions.inlineProperties",
98
+ /** Returns the resolution status of each comment. */
99
+ Resolution = "extensions.resolution"
100
+ }
101
+ }
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetDescendantsOfType = void 0;
4
+ var GetDescendantsOfType;
5
+ (function (GetDescendantsOfType) {
6
+ let Expand;
7
+ (function (Expand) {
8
+ /**
9
+ * Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
10
+ * the content has children of a particular type.
11
+ */
12
+ Expand["AllChildTypes"] = "childTypes.all";
13
+ /** Returns whether the content has attachments. */
14
+ Expand["AttachmentChildType"] = "childTypes.attachment";
15
+ /** Returns whether the content has comments. */
16
+ Expand["CommentChildType"] = "childTypes.comment";
17
+ /** Returns whether the content has child pages. */
18
+ Expand["PageChildType"] = "childTypes.page";
19
+ /**
20
+ * Returns the space that the content is in. This is the same as the information returned by [Get
21
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
22
+ */
23
+ Expand["Container"] = "container";
24
+ /**
25
+ * Returns information about the current user in relation to the content, including when they last viewed it,
26
+ * modified it, contributed to it, or added it as a favorite.
27
+ */
28
+ Expand["CurrentUserMetadata"] = "metadata.currentuser";
29
+ /** Returns content properties that have been set via the Confluence REST API. */
30
+ Expand["PropertiesMetadata"] = "metadata.properties";
31
+ /** Returns the labels that have been added to the content. */
32
+ Expand["LabelsMetadata"] = "metadata.labels";
33
+ /** This property is only used by Atlassian. */
34
+ Expand["FrontendMetadata"] = "metadata.frontend";
35
+ /** Returns the operations for the content, which are used when setting permissions. */
36
+ Expand["Operations"] = "operations";
37
+ /** Returns pages that are descendants at the level immediately below the content. */
38
+ Expand["PageChildren"] = "children.page";
39
+ /** Returns all attachments for the content. */
40
+ Expand["AttachmentChildren"] = "children.attachment";
41
+ /** Returns all comments on the content. */
42
+ Expand["CommentChildren"] = "children.comment";
43
+ /** Returns the users that have permission to read the content. */
44
+ Expand["ReadUserRestriction"] = "restrictions.read.restrictions.user";
45
+ /**
46
+ * Returns the groups that have permission to read the content. Note that this may return deleted groups, because
47
+ * deleting a group doesn't remove associated restrictions.
48
+ */
49
+ Expand["ReadGroupRestriction"] = "restrictions.read.restrictions.group";
50
+ /** Returns the users that have permission to update the content. */
51
+ Expand["UpdateUserRestriction"] = "restrictions.update.restrictions.user";
52
+ /**
53
+ * Returns the groups that have permission to update the content. Note that this may return deleted groups because
54
+ * deleting a group doesn't remove associated restrictions.
55
+ */
56
+ Expand["UpdateGroupRestriction"] = "restrictions.update.restrictions.group";
57
+ /** Returns the history of the content, including the date it was created. */
58
+ Expand["History"] = "history";
59
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
60
+ Expand["LastUpdated"] = "history.lastUpdated";
61
+ /** Returns information about the update prior to the current content update. */
62
+ Expand["PreviousVersion"] = "history.previousVersion";
63
+ /** Returns all of the users who have contributed to the content. */
64
+ Expand["Contributors"] = "history.contributors";
65
+ /** Returns information about the update after to the current content update. */
66
+ Expand["NextVersion"] = "history.nextVersion";
67
+ /** Returns the parent page, if the content is a page. */
68
+ Expand["Ancestors"] = "ancestors";
69
+ /** Returns the body of the content in different formats, including the editor format, view format, and export format. */
70
+ Expand["Body"] = "body";
71
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
72
+ Expand["Version"] = "version";
73
+ /** Returns pages that are descendants at any level below the content. */
74
+ Expand["PageDescendant"] = "descendants.page";
75
+ /** Returns all attachments for the content, same as `children.attachment`. */
76
+ Expand["AttachmentDescendant"] = "descendants.attachment";
77
+ /** Returns all comments on the content, same as `children.comment`. */
78
+ Expand["CommentDescendant"] = "descendants.comment";
79
+ /**
80
+ * Returns the space that the content is in. This is the same as the information returned by [Get
81
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
82
+ */
83
+ Expand["Space"] = "space";
84
+ /** Returns inline comment-specific properties. */
85
+ Expand["InlineProperties"] = "extensions.inlineProperties";
86
+ /** Returns the resolution status of each comment. */
87
+ Expand["Resolution"] = "extensions.resolution";
88
+ })(Expand = GetDescendantsOfType.Expand || (GetDescendantsOfType.Expand = {}));
89
+ })(GetDescendantsOfType = exports.GetDescendantsOfType || (exports.GetDescendantsOfType = {}));
@@ -0,0 +1,4 @@
1
+ export interface GetGroupByName {
2
+ /** The name of the group. This is the same as the group name shown in the Confluence administration console. */
3
+ groupName: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,4 +3,6 @@ export interface GetGroups {
3
3
  start?: number;
4
4
  /** The maximum number of groups to return per page. Note, this may be restricted by fixed system limits. */
5
5
  limit?: number;
6
+ /** The group permission level for which to filter results. */
7
+ accessType?: string;
6
8
  }
@@ -2,7 +2,7 @@ export interface GetHistoryForContent {
2
2
  /** The ID of the content to be queried for its history. */
3
3
  id: string;
4
4
  /**
5
- * A multi-value parameter indicating which properties of the content history to expand.
5
+ * A multi-value parameter indicating which properties of the content history to expand. Maximum sub-expansions allowed is `8`.
6
6
  *
7
7
  * - `lastUpdated` returns information about the most recent update of the content, including who updated it and when it
8
8
  * was updated.