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.
- package/CHANGELOG.md +49 -0
- package/README.md +1 -57
- package/out/api/content.d.ts +24 -52
- package/out/api/content.js +15 -0
- package/out/api/contentAttachments.d.ts +10 -6
- package/out/api/contentAttachments.js +13 -0
- package/out/api/contentChildrenAndDescendants.d.ts +6 -24
- package/out/api/contentChildrenAndDescendants.js +6 -0
- package/out/api/contentPermissions.d.ts +6 -2
- package/out/api/contentPermissions.js +6 -1
- package/out/api/contentProperties.js +2 -0
- package/out/api/contentWatches.d.ts +2 -2
- package/out/api/experimental.d.ts +52 -0
- package/out/api/experimental.js +70 -0
- package/out/api/group.d.ts +30 -10
- package/out/api/group.js +31 -2
- package/out/api/index.d.ts +1 -0
- package/out/api/index.js +1 -0
- package/out/api/inlineTasks.d.ts +28 -0
- package/out/api/inlineTasks.js +21 -0
- package/out/api/models/getViewers.d.ts +6 -0
- package/out/api/models/getViewers.js +2 -0
- package/out/api/models/getViews.d.ts +6 -0
- package/out/api/models/getViews.js +2 -0
- package/out/api/models/groupCreate.d.ts +4 -0
- package/out/api/models/groupCreate.js +2 -0
- package/out/api/models/horizontalHeaderLookAndFeel.d.ts +11 -0
- package/out/api/models/horizontalHeaderLookAndFeel.js +2 -0
- package/out/api/models/index.d.ts +13 -4
- package/out/api/models/index.js +13 -4
- package/out/api/models/lookAndFeel.d.ts +3 -0
- package/out/api/models/spacePermissionCreate.d.ts +33 -0
- package/out/api/models/spacePermissionCreate.js +2 -0
- package/out/api/models/spacePermissionCustomContent.d.ts +16 -0
- package/out/api/models/spacePermissionCustomContent.js +2 -0
- package/out/api/models/spacePermissionRequest.d.ts +41 -0
- package/out/api/models/spacePermissionRequest.js +2 -0
- package/out/api/models/spacePrivateCreate.d.ts +9 -0
- package/out/api/models/spacePropertyCreate.d.ts +4 -0
- package/out/api/models/spaceUpdate.d.ts +4 -0
- package/out/api/models/taskStatusUpdate.d.ts +3 -0
- package/out/api/models/taskStatusUpdate.js +2 -0
- package/out/api/models/topNavigationLookAndFeel.d.ts +8 -0
- package/out/api/models/topNavigationLookAndFeel.js +2 -0
- package/out/api/parameters/addCustomContentPermissions.d.ts +5 -0
- package/out/api/parameters/addCustomContentPermissions.js +2 -0
- package/out/api/parameters/addLabelsToSpace.d.ts +4 -0
- package/out/api/parameters/addLabelsToSpace.js +2 -0
- package/out/api/parameters/addPermissionToSpace.d.ts +5 -0
- package/out/api/parameters/addPermissionToSpace.js +2 -0
- package/out/api/parameters/addUserToGroup.d.ts +2 -1
- package/out/api/parameters/addUserToGroupByGroupId.d.ts +2 -1
- package/out/api/parameters/archivePages.d.ts +6 -0
- package/out/api/parameters/archivePages.js +2 -0
- package/out/api/parameters/checkContentPermission.d.ts +5 -0
- package/out/api/parameters/checkContentPermission.js +2 -0
- package/out/api/parameters/deleteLabelFromSpace.d.ts +8 -0
- package/out/api/parameters/deleteLabelFromSpace.js +2 -0
- package/out/api/parameters/deleteRelationship.d.ts +38 -0
- package/out/api/parameters/deleteRelationship.js +2 -0
- package/out/api/parameters/downloadAttachment.d.ts +11 -0
- package/out/api/parameters/downloadAttachment.js +2 -0
- package/out/api/parameters/getBulkUserLookup.d.ts +0 -6
- package/out/api/parameters/getContentById.d.ts +85 -1
- package/out/api/parameters/getContentById.js +87 -0
- package/out/api/parameters/getContentChildren.d.ts +1 -0
- package/out/api/parameters/getContentProperties.d.ts +2 -0
- package/out/api/parameters/getContentProperty.d.ts +12 -0
- package/out/api/parameters/getContentVersions.d.ts +1 -1
- package/out/api/parameters/getCurrentUser.d.ts +1 -6
- package/out/api/parameters/getDescendantsOfType.d.ts +101 -0
- package/out/api/parameters/getDescendantsOfType.js +89 -0
- package/out/api/parameters/getGroupByName.d.ts +4 -0
- package/out/api/parameters/getGroupByName.js +2 -0
- package/out/api/parameters/getGroups.d.ts +2 -0
- package/out/api/parameters/getHistoryForContent.d.ts +1 -1
- package/out/api/parameters/getLabelsForSpace.d.ts +18 -0
- package/out/api/parameters/getLabelsForSpace.js +2 -0
- package/out/api/parameters/getTaskById.d.ts +4 -0
- package/out/api/parameters/getTaskById.js +2 -0
- package/out/api/parameters/getViewers.d.ts +6 -0
- package/out/api/parameters/getViewers.js +2 -0
- package/out/api/parameters/getViews.d.ts +6 -0
- package/out/api/parameters/getViews.js +2 -0
- package/out/api/parameters/index.d.ts +134 -116
- package/out/api/parameters/index.js +134 -116
- package/out/api/parameters/publishLegacyDraft.d.ts +3 -1
- package/out/api/parameters/publishSharedDraft.d.ts +3 -1
- package/out/api/parameters/restoreContentVersion.d.ts +1 -1
- package/out/api/parameters/searchByCQL.d.ts +34 -0
- package/out/api/parameters/searchByCQL.js +2 -0
- package/out/api/parameters/searchGroups.d.ts +8 -0
- package/out/api/parameters/searchGroups.js +2 -0
- package/out/api/parameters/searchUser.d.ts +27 -0
- package/out/api/parameters/searchUser.js +2 -0
- package/out/api/parameters/updateTaskById.d.ts +5 -0
- package/out/api/parameters/updateTaskById.js +2 -0
- package/out/api/relation.d.ts +12 -4
- package/out/api/relation.js +12 -2
- package/out/api/search.d.ts +12 -64
- package/out/api/search.js +19 -2
- package/out/api/settings.d.ts +2 -2
- package/out/api/settings.js +3 -0
- package/out/api/space.js +5 -1
- package/out/api/spacePermissions.d.ts +26 -2
- package/out/api/spacePermissions.js +20 -3
- package/out/api/spaceProperties.d.ts +4 -4
- package/out/api/spaceProperties.js +1 -0
- package/out/api/template.d.ts +24 -16
- package/out/clients/baseClient.d.ts +2 -5
- package/out/clients/baseClient.js +4 -30
- package/out/clients/client.d.ts +2 -3
- package/out/clients/confluenceClient.d.ts +2 -1
- package/out/clients/confluenceClient.js +1 -0
- package/out/config.d.ts +3 -2
- package/out/index.d.ts +1 -0
- package/out/index.js +2 -1
- package/package.json +24 -24
- package/src/api/content.ts +58 -52
- package/src/api/contentAttachments.ts +29 -6
- package/src/api/contentChildrenAndDescendants.ts +24 -28
- package/src/api/contentPermissions.ts +24 -7
- package/src/api/contentProperties.ts +2 -0
- package/src/api/contentWatches.ts +3 -3
- package/src/api/experimental.ts +137 -0
- package/src/api/group.ts +71 -19
- package/src/api/index.ts +1 -0
- package/src/api/inlineTasks.ts +52 -0
- package/src/api/models/getViewers.ts +6 -0
- package/src/api/models/getViews.ts +6 -0
- package/src/api/models/groupCreate.ts +4 -0
- package/src/api/models/horizontalHeaderLookAndFeel.ts +12 -0
- package/src/api/models/index.ts +13 -4
- package/src/api/models/lookAndFeel.ts +3 -0
- package/src/api/models/spacePermissionCreate.ts +34 -0
- package/src/api/models/spacePermissionCustomContent.ts +17 -0
- package/src/api/models/spacePermissionRequest.ts +42 -0
- package/src/api/models/spacePrivateCreate.ts +9 -0
- package/src/api/models/spacePropertyCreate.ts +4 -0
- package/src/api/models/spaceUpdate.ts +4 -0
- package/src/api/models/taskStatusUpdate.ts +3 -0
- package/src/api/models/topNavigationLookAndFeel.ts +8 -0
- package/src/api/parameters/addCustomContentPermissions.ts +6 -0
- package/src/api/parameters/addLabelsToSpace.ts +4 -0
- package/src/api/parameters/addPermissionToSpace.ts +6 -0
- package/src/api/parameters/addUserToGroup.ts +3 -1
- package/src/api/parameters/addUserToGroupByGroupId.ts +3 -1
- package/src/api/parameters/archivePages.ts +6 -0
- package/src/api/parameters/checkContentPermission.ts +6 -0
- package/src/api/parameters/deleteLabelFromSpace.ts +8 -0
- package/src/api/parameters/deleteRelationship.ts +38 -0
- package/src/api/parameters/downloadAttachment.ts +11 -0
- package/src/api/parameters/getBulkUserLookup.ts +0 -6
- package/src/api/parameters/getContentById.ts +86 -1
- package/src/api/parameters/getContentChildren.ts +1 -0
- package/src/api/parameters/getContentProperties.ts +2 -0
- package/src/api/parameters/getContentProperty.ts +12 -0
- package/src/api/parameters/getContentVersions.ts +1 -1
- package/src/api/parameters/getCurrentUser.ts +1 -6
- package/src/api/parameters/getDescendantsOfType.ts +102 -0
- package/src/api/parameters/getGroupByName.ts +4 -0
- package/src/api/parameters/getGroups.ts +2 -0
- package/src/api/parameters/getHistoryForContent.ts +1 -1
- package/src/api/parameters/getLabelsForSpace.ts +18 -0
- package/src/api/parameters/getTaskById.ts +4 -0
- package/src/api/parameters/getViewers.ts +6 -0
- package/src/api/parameters/getViews.ts +6 -0
- package/src/api/parameters/index.ts +134 -116
- package/src/api/parameters/publishLegacyDraft.ts +4 -1
- package/src/api/parameters/publishSharedDraft.ts +4 -1
- package/src/api/parameters/restoreContentVersion.ts +1 -1
- package/src/api/parameters/searchByCQL.ts +34 -0
- package/src/api/parameters/searchGroups.ts +8 -0
- package/src/api/parameters/searchUser.ts +27 -0
- package/src/api/parameters/updateTaskById.ts +6 -0
- package/src/api/relation.ts +33 -8
- package/src/api/search.ts +53 -73
- package/src/api/settings.ts +6 -3
- package/src/api/space.ts +4 -1
- package/src/api/spacePermissions.ts +66 -8
- package/src/api/spaceProperties.ts +5 -4
- package/src/api/template.ts +24 -16
- package/src/clients/baseClient.ts +4 -60
- package/src/clients/client.ts +2 -3
- package/src/clients/confluenceClient.ts +2 -0
- package/src/config.ts +3 -2
- package/src/index.ts +1 -0
- package/tsconfig.json +2 -1
package/src/api/models/index.ts
CHANGED
|
@@ -14,8 +14,6 @@ export * from './breadcrumb';
|
|
|
14
14
|
export * from './bulkUserLookup';
|
|
15
15
|
export * from './bulkUserLookupArray';
|
|
16
16
|
export * from './buttonLookAndFeel';
|
|
17
|
-
export * from './cQLPersonalDataConvertedQueries';
|
|
18
|
-
export * from './cQLPersonalDataMigrationRequest';
|
|
19
17
|
export * from './changedValue';
|
|
20
18
|
export * from './connectModule';
|
|
21
19
|
export * from './connectModules';
|
|
@@ -30,8 +28,8 @@ export * from './contentBlueprintDraft';
|
|
|
30
28
|
export * from './contentBody';
|
|
31
29
|
export * from './contentBodyCreate';
|
|
32
30
|
export * from './contentBodyCreateStorage';
|
|
33
|
-
export * from './contentChildType';
|
|
34
31
|
export * from './contentChildren';
|
|
32
|
+
export * from './contentChildType';
|
|
35
33
|
export * from './contentComment';
|
|
36
34
|
export * from './contentCreate';
|
|
37
35
|
export * from './contentHistory';
|
|
@@ -59,17 +57,23 @@ export * from './copyPageHierarchyRequest';
|
|
|
59
57
|
export * from './copyPageHierarchyTitleOptions';
|
|
60
58
|
export * from './copyPageRequest';
|
|
61
59
|
export * from './copyPageRequestDestination';
|
|
60
|
+
export * from './cQLPersonalDataConvertedQueries';
|
|
61
|
+
export * from './cQLPersonalDataMigrationRequest';
|
|
62
62
|
export * from './deletedSpace';
|
|
63
63
|
export * from './dynamicModulesErrorMessage';
|
|
64
64
|
export * from './embeddable';
|
|
65
65
|
export * from './embeddedContent';
|
|
66
66
|
export * from './genericLinks';
|
|
67
67
|
export * from './getRestrictionsByOperation';
|
|
68
|
+
export * from './getViewers';
|
|
69
|
+
export * from './getViews';
|
|
68
70
|
export * from './group';
|
|
69
71
|
export * from './groupArray';
|
|
70
72
|
export * from './groupArrayWithLinks';
|
|
73
|
+
export * from './groupCreate';
|
|
71
74
|
export * from './groupName';
|
|
72
75
|
export * from './headerLookAndFeel';
|
|
76
|
+
export * from './horizontalHeaderLookAndFeel';
|
|
73
77
|
export * from './icon';
|
|
74
78
|
export * from './label';
|
|
75
79
|
export * from './labelArray';
|
|
@@ -112,6 +116,9 @@ export * from './spaceCreate';
|
|
|
112
116
|
export * from './spaceDescription';
|
|
113
117
|
export * from './spaceDescriptionCreate';
|
|
114
118
|
export * from './spacePermission';
|
|
119
|
+
export * from './spacePermissionCreate';
|
|
120
|
+
export * from './spacePermissionCustomContent';
|
|
121
|
+
export * from './spacePermissionRequest';
|
|
115
122
|
export * from './spacePermissionV2';
|
|
116
123
|
export * from './spacePrivateCreate';
|
|
117
124
|
export * from './spaceProperty';
|
|
@@ -129,17 +136,19 @@ export * from './superBatchWebResources';
|
|
|
129
136
|
export * from './systemInfoEntity';
|
|
130
137
|
export * from './task';
|
|
131
138
|
export * from './taskPageResponse';
|
|
139
|
+
export * from './taskStatusUpdate';
|
|
132
140
|
export * from './theme';
|
|
133
141
|
export * from './themeArray';
|
|
134
142
|
export * from './themeNoLinks';
|
|
135
143
|
export * from './themeUpdate';
|
|
144
|
+
export * from './topNavigationLookAndFeel';
|
|
136
145
|
export * from './user';
|
|
137
146
|
export * from './userAnonymous';
|
|
138
147
|
export * from './userArray';
|
|
139
148
|
export * from './userArrayWithLinks';
|
|
140
149
|
export * from './userDetails';
|
|
141
|
-
export * from './userWatch';
|
|
142
150
|
export * from './usersUserKeys';
|
|
151
|
+
export * from './userWatch';
|
|
143
152
|
export * from './version';
|
|
144
153
|
export * from './versionArray';
|
|
145
154
|
export * from './versionRestore';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MenusLookAndFeel } from './menusLookAndFeel';
|
|
2
2
|
import { HeaderLookAndFeel } from './headerLookAndFeel';
|
|
3
3
|
import { ContentLookAndFeel } from './contentLookAndFeel';
|
|
4
|
+
import { HorizontalHeaderLookAndFeel } from './horizontalHeaderLookAndFeel';
|
|
4
5
|
|
|
5
6
|
export interface LookAndFeel {
|
|
6
7
|
headings: {
|
|
@@ -15,4 +16,6 @@ export interface LookAndFeel {
|
|
|
15
16
|
bordersAndDividers: {
|
|
16
17
|
color: string;
|
|
17
18
|
};
|
|
19
|
+
horizontalHeader?: HorizontalHeaderLookAndFeel;
|
|
20
|
+
spaceReference?: unknown;
|
|
18
21
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { User } from './user';
|
|
2
|
+
import { GroupCreate } from './groupCreate';
|
|
3
|
+
import { OperationCheckResult } from './operationCheckResult';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* This object represents a permission for given space. Permissions consist of* at least one operation object with an
|
|
7
|
+
* accompanying subjects object.
|
|
8
|
+
*
|
|
9
|
+
* The following combinations of `operation` and `targetType` values are valid for the `operation` object:
|
|
10
|
+
*
|
|
11
|
+
* - 'create': 'page', 'blogpost', 'comment', 'attachment'
|
|
12
|
+
* - 'read': 'space'
|
|
13
|
+
* - 'delete': 'page', 'blogpost', 'comment', 'attachment'
|
|
14
|
+
* - 'export': 'space'
|
|
15
|
+
* - 'administer': 'space'
|
|
16
|
+
*/
|
|
17
|
+
export interface SpacePermissionCreate {
|
|
18
|
+
/** The users and/or groups that the permission applies to. */
|
|
19
|
+
subjects: {
|
|
20
|
+
user?: {
|
|
21
|
+
results: User[];
|
|
22
|
+
size: number;
|
|
23
|
+
};
|
|
24
|
+
group?: {
|
|
25
|
+
results: GroupCreate[];
|
|
26
|
+
size: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
operation: OperationCheckResult;
|
|
30
|
+
/** Grant anonymous users permission to use the operation. */
|
|
31
|
+
anonymousAccess: boolean;
|
|
32
|
+
/** Grants access to unlicensed users from JIRA Service Desk when used with the 'read space' operation. */
|
|
33
|
+
unlicensedAccess: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PermissionSubject } from './permissionSubject';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This object represents a list of space permissions for custom content type for an individual user. Permissions
|
|
5
|
+
* consist of* a subjects object and a list with at least one operation object.
|
|
6
|
+
*/
|
|
7
|
+
export interface SpacePermissionCustomContent {
|
|
8
|
+
subject: PermissionSubject;
|
|
9
|
+
operations: {
|
|
10
|
+
/** The operation type */
|
|
11
|
+
key: string;
|
|
12
|
+
/** The custom content type */
|
|
13
|
+
target: string;
|
|
14
|
+
/** Grant or restrict access */
|
|
15
|
+
access: boolean;
|
|
16
|
+
}[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { PermissionSubject } from './permissionSubject';
|
|
2
|
+
import { GenericLinks } from './genericLinks';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This object represents the request for the single space permission. Permissions consist of* at least one operation
|
|
6
|
+
* object with an accompanying subjects object.
|
|
7
|
+
*
|
|
8
|
+
* The following combinations of `operation.key` and `operation.target` values are valid for the `operation` object:
|
|
9
|
+
*
|
|
10
|
+
* ```bash
|
|
11
|
+
* 'create': 'page', 'blogpost', 'comment', 'attachment'
|
|
12
|
+
* 'read': 'space'
|
|
13
|
+
* 'delete': 'page', 'blogpost', 'comment', 'attachment', 'space'
|
|
14
|
+
* 'export': 'space'
|
|
15
|
+
* 'administer': 'space'
|
|
16
|
+
* 'archive': 'page'
|
|
17
|
+
* 'restrict_content': 'space'
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* For example, to enable Delete Own permission, set the `operation` object to the following:
|
|
21
|
+
*
|
|
22
|
+
* "operation": {
|
|
23
|
+
* "key": "delete",
|
|
24
|
+
* "target": "space"
|
|
25
|
+
* }
|
|
26
|
+
*
|
|
27
|
+
* To enable Add/Delete Restrictions permissions, set the `operation` object to the following:
|
|
28
|
+
*
|
|
29
|
+
* "operation": {
|
|
30
|
+
* "key": "restrict_content",
|
|
31
|
+
* "target": "space"
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export interface SpacePermissionRequest {
|
|
35
|
+
subject: PermissionSubject;
|
|
36
|
+
operation: {
|
|
37
|
+
key: string;
|
|
38
|
+
/** The space or content type that the operation applies to. */
|
|
39
|
+
target: string;
|
|
40
|
+
};
|
|
41
|
+
links?: GenericLinks;
|
|
42
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SpaceDescriptionCreate } from './spaceDescriptionCreate';
|
|
2
|
+
import { SpacePermissionCreate } from './spacePermissionCreate';
|
|
2
3
|
|
|
3
4
|
/** This is the request object used when creating a new private space. */
|
|
4
5
|
export interface SpacePrivateCreate {
|
|
@@ -7,4 +8,12 @@ export interface SpacePrivateCreate {
|
|
|
7
8
|
/** The name of the new space. */
|
|
8
9
|
name: string;
|
|
9
10
|
description?: SpaceDescriptionCreate;
|
|
11
|
+
/**
|
|
12
|
+
* The permissions for the new space. If no permissions are provided, the [Confluence default space
|
|
13
|
+
* permissions](https://confluence.atlassian.com/x/UAgzKw#CreateaSpace-Spacepermissions) are applied. Note that if
|
|
14
|
+
* permissions are provided, the space is created with only the provided set of permissions, not including the default
|
|
15
|
+
* space permissions. Space permissions can be modified after creation using the space permissions endpoints, and a
|
|
16
|
+
* private space can be created using the create private space endpoint.
|
|
17
|
+
*/
|
|
18
|
+
permissions?: SpacePermissionCreate[];
|
|
10
19
|
}
|
|
@@ -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,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,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
|
+
}
|
|
@@ -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,95 @@ 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
|
+
|
|
30
|
+
export namespace GetContentById {
|
|
31
|
+
export enum Expand {
|
|
32
|
+
/**
|
|
33
|
+
* Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
|
|
34
|
+
* the content has children of a particular type.
|
|
35
|
+
*/
|
|
36
|
+
AllChildTypes = 'childTypes.all',
|
|
37
|
+
/** Returns whether the content has attachments. */
|
|
38
|
+
AttachmentChildType = 'childTypes.attachment',
|
|
39
|
+
/** Returns whether the content has comments. */
|
|
40
|
+
CommentChildType = 'childTypes.comment',
|
|
41
|
+
/** Returns whether the content has child pages. */
|
|
42
|
+
PageChildType = 'childTypes.page',
|
|
43
|
+
/**
|
|
44
|
+
* Returns the space that the content is in. This is the same as the information returned by [Get
|
|
45
|
+
* space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
|
|
46
|
+
*/
|
|
47
|
+
Container = 'container',
|
|
48
|
+
/**
|
|
49
|
+
* Returns information about the current user in relation to the content, including when they last viewed it,
|
|
50
|
+
* modified it, contributed to it, or added it as a favorite.
|
|
51
|
+
*/
|
|
52
|
+
CurrentUserMetadata = 'metadata.currentuser',
|
|
53
|
+
/** Returns content properties that have been set via the Confluence REST API. */
|
|
54
|
+
PropertiesMetadata = 'metadata.properties',
|
|
55
|
+
/** Returns the labels that have been added to the content. */
|
|
56
|
+
LabelsMetadata = 'metadata.labels',
|
|
57
|
+
/** This property is only used by Atlassian. */
|
|
58
|
+
FrontendMetadata = 'metadata.frontend',
|
|
59
|
+
/** Returns the operations for the content, which are used when setting permissions. */
|
|
60
|
+
Operations = 'operations',
|
|
61
|
+
/** Returns pages that are descendants at the level immediately below the content. */
|
|
62
|
+
PageChildren = 'children.page',
|
|
63
|
+
/** Returns all attachments for the content. */
|
|
64
|
+
AttachmentChildren = 'children.attachment',
|
|
65
|
+
/** Returns all comments on the content. */
|
|
66
|
+
CommentChildren = 'children.comment',
|
|
67
|
+
/** Returns the users that have permission to read the content. */
|
|
68
|
+
ReadUserRestriction = 'restrictions.read.restrictions.user',
|
|
69
|
+
/**
|
|
70
|
+
* Returns the groups that have permission to read the content. Note that this may return deleted groups, because
|
|
71
|
+
* deleting a group doesn't remove associated restrictions.
|
|
72
|
+
*/
|
|
73
|
+
ReadGroupRestriction = 'restrictions.read.restrictions.group',
|
|
74
|
+
/** Returns the users that have permission to update the content. */
|
|
75
|
+
UpdateUserRestriction = 'restrictions.update.restrictions.user',
|
|
76
|
+
/**
|
|
77
|
+
* Returns the groups that have permission to update the content. Note that this may return deleted groups because
|
|
78
|
+
* deleting a group doesn't remove associated restrictions.
|
|
79
|
+
*/
|
|
80
|
+
UpdateGroupRestriction = 'restrictions.update.restrictions.group',
|
|
81
|
+
/** Returns the history of the content, including the date it was created. */
|
|
82
|
+
History = 'history',
|
|
83
|
+
/** Returns information about the most recent update of the content, including who updated it and when it was updated. */
|
|
84
|
+
LastUpdated = 'history.lastUpdated',
|
|
85
|
+
/** Returns information about the update prior to the current content update. */
|
|
86
|
+
PreviousVersion = 'history.previousVersion',
|
|
87
|
+
/** Returns all of the users who have contributed to the content. */
|
|
88
|
+
Contributors = 'history.contributors',
|
|
89
|
+
/** Returns information about the update after to the current content update. */
|
|
90
|
+
NextVersion = 'history.nextVersion',
|
|
91
|
+
/** Returns the parent page, if the content is a page. */
|
|
92
|
+
Ancestors = 'ancestors',
|
|
93
|
+
/** Returns the body of the content in different formats, including the editor format, view format, and export format. */
|
|
94
|
+
Body = 'body',
|
|
95
|
+
/** Returns information about the most recent update of the content, including who updated it and when it was updated. */
|
|
96
|
+
Version = 'version',
|
|
97
|
+
/** Returns pages that are descendants at any level below the content. */
|
|
98
|
+
PageDescendant = 'descendants.page',
|
|
99
|
+
/** Returns all attachments for the content, same as `children.attachment`. */
|
|
100
|
+
AttachmentDescendant = 'descendants.attachment',
|
|
101
|
+
/** Returns all comments on the content, same as `children.comment`. */
|
|
102
|
+
CommentDescendant = 'descendants.comment',
|
|
103
|
+
/**
|
|
104
|
+
* Returns the space that the content is in. This is the same as the information returned by [Get
|
|
105
|
+
* space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
|
|
106
|
+
*/
|
|
107
|
+
Space = 'space',
|
|
108
|
+
/** Returns inline comment-specific properties. */
|
|
109
|
+
InlineProperties = 'extensions.inlineProperties',
|
|
110
|
+
/** Returns the resolution status of each comment. */
|
|
111
|
+
Resolution = 'extensions.resolution',
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -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,102 @@
|
|
|
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
|
+
|
|
19
|
+
export namespace GetDescendantsOfType {
|
|
20
|
+
export enum Expand {
|
|
21
|
+
/**
|
|
22
|
+
* Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
|
|
23
|
+
* the content has children of a particular type.
|
|
24
|
+
*/
|
|
25
|
+
AllChildTypes = 'childTypes.all',
|
|
26
|
+
/** Returns whether the content has attachments. */
|
|
27
|
+
AttachmentChildType = 'childTypes.attachment',
|
|
28
|
+
/** Returns whether the content has comments. */
|
|
29
|
+
CommentChildType = 'childTypes.comment',
|
|
30
|
+
/** Returns whether the content has child pages. */
|
|
31
|
+
PageChildType = 'childTypes.page',
|
|
32
|
+
/**
|
|
33
|
+
* Returns the space that the content is in. This is the same as the information returned by [Get
|
|
34
|
+
* space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
|
|
35
|
+
*/
|
|
36
|
+
Container = 'container',
|
|
37
|
+
/**
|
|
38
|
+
* Returns information about the current user in relation to the content, including when they last viewed it,
|
|
39
|
+
* modified it, contributed to it, or added it as a favorite.
|
|
40
|
+
*/
|
|
41
|
+
CurrentUserMetadata = 'metadata.currentuser',
|
|
42
|
+
/** Returns content properties that have been set via the Confluence REST API. */
|
|
43
|
+
PropertiesMetadata = 'metadata.properties',
|
|
44
|
+
/** Returns the labels that have been added to the content. */
|
|
45
|
+
LabelsMetadata = 'metadata.labels',
|
|
46
|
+
/** This property is only used by Atlassian. */
|
|
47
|
+
FrontendMetadata = 'metadata.frontend',
|
|
48
|
+
/** Returns the operations for the content, which are used when setting permissions. */
|
|
49
|
+
Operations = 'operations',
|
|
50
|
+
/** Returns pages that are descendants at the level immediately below the content. */
|
|
51
|
+
PageChildren = 'children.page',
|
|
52
|
+
/** Returns all attachments for the content. */
|
|
53
|
+
AttachmentChildren = 'children.attachment',
|
|
54
|
+
/** Returns all comments on the content. */
|
|
55
|
+
CommentChildren = 'children.comment',
|
|
56
|
+
/** Returns the users that have permission to read the content. */
|
|
57
|
+
ReadUserRestriction = 'restrictions.read.restrictions.user',
|
|
58
|
+
/**
|
|
59
|
+
* Returns the groups that have permission to read the content. Note that this may return deleted groups, because
|
|
60
|
+
* deleting a group doesn't remove associated restrictions.
|
|
61
|
+
*/
|
|
62
|
+
ReadGroupRestriction = 'restrictions.read.restrictions.group',
|
|
63
|
+
/** Returns the users that have permission to update the content. */
|
|
64
|
+
UpdateUserRestriction = 'restrictions.update.restrictions.user',
|
|
65
|
+
/**
|
|
66
|
+
* Returns the groups that have permission to update the content. Note that this may return deleted groups because
|
|
67
|
+
* deleting a group doesn't remove associated restrictions.
|
|
68
|
+
*/
|
|
69
|
+
UpdateGroupRestriction = 'restrictions.update.restrictions.group',
|
|
70
|
+
/** Returns the history of the content, including the date it was created. */
|
|
71
|
+
History = 'history',
|
|
72
|
+
/** Returns information about the most recent update of the content, including who updated it and when it was updated. */
|
|
73
|
+
LastUpdated = 'history.lastUpdated',
|
|
74
|
+
/** Returns information about the update prior to the current content update. */
|
|
75
|
+
PreviousVersion = 'history.previousVersion',
|
|
76
|
+
/** Returns all of the users who have contributed to the content. */
|
|
77
|
+
Contributors = 'history.contributors',
|
|
78
|
+
/** Returns information about the update after to the current content update. */
|
|
79
|
+
NextVersion = 'history.nextVersion',
|
|
80
|
+
/** Returns the parent page, if the content is a page. */
|
|
81
|
+
Ancestors = 'ancestors',
|
|
82
|
+
/** Returns the body of the content in different formats, including the editor format, view format, and export format. */
|
|
83
|
+
Body = 'body',
|
|
84
|
+
/** Returns information about the most recent update of the content, including who updated it and when it was updated. */
|
|
85
|
+
Version = 'version',
|
|
86
|
+
/** Returns pages that are descendants at any level below the content. */
|
|
87
|
+
PageDescendant = 'descendants.page',
|
|
88
|
+
/** Returns all attachments for the content, same as `children.attachment`. */
|
|
89
|
+
AttachmentDescendant = 'descendants.attachment',
|
|
90
|
+
/** Returns all comments on the content, same as `children.comment`. */
|
|
91
|
+
CommentDescendant = 'descendants.comment',
|
|
92
|
+
/**
|
|
93
|
+
* Returns the space that the content is in. This is the same as the information returned by [Get
|
|
94
|
+
* space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
|
|
95
|
+
*/
|
|
96
|
+
Space = 'space',
|
|
97
|
+
/** Returns inline comment-specific properties. */
|
|
98
|
+
InlineProperties = 'extensions.inlineProperties',
|
|
99
|
+
/** Returns the resolution status of each comment. */
|
|
100
|
+
Resolution = 'extensions.resolution',
|
|
101
|
+
}
|
|
102
|
+
}
|