confluence.js 2.0.0-dev20250512202536 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -2
- package/README.md +145 -183
- package/dist/cjs/api/analytics.cjs.map +1 -1
- package/dist/cjs/api/audit.cjs.map +1 -1
- package/dist/cjs/api/content.cjs +0 -5
- package/dist/cjs/api/content.cjs.map +1 -1
- package/dist/cjs/api/contentAttachments.cjs +1 -0
- package/dist/cjs/api/contentAttachments.cjs.map +1 -1
- package/dist/cjs/api/contentBody.cjs +18 -0
- package/dist/cjs/api/contentBody.cjs.map +1 -1
- package/dist/cjs/api/contentChildrenAndDescendants.cjs +2 -0
- package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -1
- package/dist/cjs/api/contentComments.cjs +1 -0
- package/dist/cjs/api/contentComments.cjs.map +1 -1
- package/dist/cjs/api/contentLabels.cjs.map +1 -1
- package/dist/cjs/api/contentMacroBody.cjs.map +1 -1
- package/dist/cjs/api/contentPermissions.cjs.map +1 -1
- package/dist/cjs/api/contentProperties.cjs +1 -0
- package/dist/cjs/api/contentProperties.cjs.map +1 -1
- package/dist/cjs/api/contentRestrictions.cjs.map +1 -1
- package/dist/cjs/api/contentStates.cjs +13 -0
- package/dist/cjs/api/contentStates.cjs.map +1 -1
- package/dist/cjs/api/contentVersions.cjs.map +1 -1
- package/dist/cjs/api/contentWatches.cjs.map +1 -1
- package/dist/cjs/api/dynamicModules.cjs.map +1 -1
- package/dist/cjs/api/experimental.cjs.map +1 -1
- package/dist/cjs/api/group.cjs +18 -17
- package/dist/cjs/api/group.cjs.map +1 -1
- package/dist/cjs/api/index.cjs +2 -0
- package/dist/cjs/api/index.cjs.map +1 -1
- package/dist/cjs/api/inlineTasks.cjs +1 -0
- package/dist/cjs/api/inlineTasks.cjs.map +1 -1
- package/dist/cjs/api/labelInfo.cjs.map +1 -1
- package/dist/cjs/api/longRunningTask.cjs +1 -0
- package/dist/cjs/api/longRunningTask.cjs.map +1 -1
- package/dist/cjs/api/models/labeledContentType.cjs.map +1 -1
- package/dist/cjs/api/relation.cjs.map +1 -1
- package/dist/cjs/api/search.cjs +1 -0
- package/dist/cjs/api/search.cjs.map +1 -1
- package/dist/cjs/api/settings.cjs.map +1 -1
- package/dist/cjs/api/space.cjs +4 -2
- package/dist/cjs/api/space.cjs.map +1 -1
- package/dist/cjs/api/spacePermissions.cjs.map +1 -1
- package/dist/cjs/api/spaceProperties.cjs +1 -0
- package/dist/cjs/api/spaceProperties.cjs.map +1 -1
- package/dist/cjs/api/spaceSettings.cjs.map +1 -1
- package/dist/cjs/api/template.cjs.map +1 -1
- package/dist/cjs/api/themes.cjs.map +1 -1
- package/dist/cjs/api/userProperties.cjs +56 -0
- package/dist/cjs/api/userProperties.cjs.map +1 -0
- package/dist/cjs/api/users.cjs.map +1 -1
- package/dist/cjs/clients/baseClient.cjs.map +1 -1
- package/dist/cjs/clients/confluenceClient.cjs +6 -0
- package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
- package/dist/cjs/config.cjs +3 -1
- package/dist/cjs/config.cjs.map +1 -1
- package/dist/cjs/paramSerializer.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
- package/dist/esm/api/analytics.mjs.map +1 -1
- package/dist/esm/api/audit.mjs.map +1 -1
- package/dist/esm/api/content.mjs +0 -5
- package/dist/esm/api/content.mjs.map +1 -1
- package/dist/esm/api/contentAttachments.mjs +1 -0
- package/dist/esm/api/contentAttachments.mjs.map +1 -1
- package/dist/esm/api/contentBody.mjs +18 -0
- package/dist/esm/api/contentBody.mjs.map +1 -1
- package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
- package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
- package/dist/esm/api/contentComments.mjs +1 -0
- package/dist/esm/api/contentComments.mjs.map +1 -1
- package/dist/esm/api/contentLabels.mjs.map +1 -1
- package/dist/esm/api/contentMacroBody.mjs.map +1 -1
- package/dist/esm/api/contentPermissions.mjs.map +1 -1
- package/dist/esm/api/contentProperties.mjs +1 -0
- package/dist/esm/api/contentProperties.mjs.map +1 -1
- package/dist/esm/api/contentRestrictions.mjs.map +1 -1
- package/dist/esm/api/contentStates.mjs +13 -0
- package/dist/esm/api/contentStates.mjs.map +1 -1
- package/dist/esm/api/contentVersions.mjs.map +1 -1
- package/dist/esm/api/contentWatches.mjs.map +1 -1
- package/dist/esm/api/dynamicModules.mjs.map +1 -1
- package/dist/esm/api/experimental.mjs.map +1 -1
- package/dist/esm/api/group.mjs +18 -17
- package/dist/esm/api/group.mjs.map +1 -1
- package/dist/esm/api/index.mjs +1 -0
- package/dist/esm/api/index.mjs.map +1 -1
- package/dist/esm/api/inlineTasks.mjs +1 -0
- package/dist/esm/api/inlineTasks.mjs.map +1 -1
- package/dist/esm/api/labelInfo.mjs.map +1 -1
- package/dist/esm/api/longRunningTask.mjs +1 -0
- package/dist/esm/api/longRunningTask.mjs.map +1 -1
- package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
- package/dist/esm/api/relation.mjs.map +1 -1
- package/dist/esm/api/search.mjs +1 -0
- package/dist/esm/api/search.mjs.map +1 -1
- package/dist/esm/api/settings.mjs.map +1 -1
- package/dist/esm/api/space.mjs +4 -2
- package/dist/esm/api/space.mjs.map +1 -1
- package/dist/esm/api/spacePermissions.mjs.map +1 -1
- package/dist/esm/api/spaceProperties.mjs +1 -0
- package/dist/esm/api/spaceProperties.mjs.map +1 -1
- package/dist/esm/api/spaceSettings.mjs.map +1 -1
- package/dist/esm/api/template.mjs.map +1 -1
- package/dist/esm/api/themes.mjs.map +1 -1
- package/dist/esm/api/userProperties.mjs +54 -0
- package/dist/esm/api/userProperties.mjs.map +1 -0
- package/dist/esm/api/users.mjs.map +1 -1
- package/dist/esm/clients/baseClient.mjs.map +1 -1
- package/dist/esm/clients/confluenceClient.mjs +6 -0
- package/dist/esm/clients/confluenceClient.mjs.map +1 -1
- package/dist/esm/config.mjs +3 -1
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/paramSerializer.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
- package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
- package/dist/esm/types/api/analytics.d.ts +1 -1
- package/dist/esm/types/api/audit.d.ts +3 -3
- package/dist/esm/types/api/content.d.ts +33 -7
- package/dist/esm/types/api/contentAttachments.d.ts +5 -1
- package/dist/esm/types/api/contentBody.d.ts +73 -7
- package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
- package/dist/esm/types/api/contentComments.d.ts +5 -0
- package/dist/esm/types/api/contentLabels.d.ts +17 -9
- package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
- package/dist/esm/types/api/contentPermissions.d.ts +1 -1
- package/dist/esm/types/api/contentProperties.d.ts +25 -0
- package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
- package/dist/esm/types/api/contentStates.d.ts +23 -5
- package/dist/esm/types/api/contentVersions.d.ts +9 -1
- package/dist/esm/types/api/contentWatches.d.ts +1 -1
- package/dist/esm/types/api/dynamicModules.d.ts +1 -1
- package/dist/esm/types/api/experimental.d.ts +21 -1
- package/dist/esm/types/api/group.d.ts +47 -27
- package/dist/esm/types/api/index.d.ts +1 -0
- package/dist/esm/types/api/inlineTasks.d.ts +13 -0
- package/dist/esm/types/api/labelInfo.d.ts +1 -1
- package/dist/esm/types/api/longRunningTask.d.ts +1 -1
- package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
- package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
- package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
- package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
- package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
- package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
- package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
- package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
- package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
- package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
- package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
- package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
- package/dist/esm/types/api/parameters/index.d.ts +4 -0
- package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
- package/dist/esm/types/api/relation.d.ts +13 -15
- package/dist/esm/types/api/search.d.ts +7 -1
- package/dist/esm/types/api/settings.d.ts +5 -1
- package/dist/esm/types/api/space.d.ts +23 -7
- package/dist/esm/types/api/spacePermissions.d.ts +1 -1
- package/dist/esm/types/api/spaceProperties.d.ts +25 -0
- package/dist/esm/types/api/spaceSettings.d.ts +1 -1
- package/dist/esm/types/api/template.d.ts +1 -1
- package/dist/esm/types/api/themes.d.ts +1 -1
- package/dist/esm/types/api/userProperties.d.ts +102 -0
- package/dist/esm/types/api/users.d.ts +21 -9
- package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
- package/eslint.config.ts +11 -16
- package/package.json +29 -28
- package/src/api/analytics.ts +1 -1
- package/src/api/audit.ts +3 -3
- package/src/api/content.ts +33 -12
- package/src/api/contentAttachments.ts +6 -1
- package/src/api/contentBody.ts +113 -7
- package/src/api/contentChildrenAndDescendants.ts +39 -5
- package/src/api/contentComments.ts +5 -0
- package/src/api/contentLabels.ts +17 -9
- package/src/api/contentMacroBody.ts +79 -1
- package/src/api/contentPermissions.ts +1 -1
- package/src/api/contentProperties.ts +25 -0
- package/src/api/contentRestrictions.ts +19 -7
- package/src/api/contentStates.ts +47 -5
- package/src/api/contentVersions.ts +9 -1
- package/src/api/contentWatches.ts +1 -1
- package/src/api/dynamicModules.ts +1 -1
- package/src/api/experimental.ts +21 -1
- package/src/api/group.ts +96 -75
- package/src/api/index.ts +1 -0
- package/src/api/inlineTasks.ts +13 -0
- package/src/api/labelInfo.ts +1 -1
- package/src/api/longRunningTask.ts +2 -1
- package/src/api/models/spaceCreate.ts +11 -2
- package/src/api/models/spacePrivateCreate.ts +11 -2
- package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
- package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
- package/src/api/parameters/deleteGroupById.ts +4 -0
- package/src/api/parameters/downloadAttachment.ts +6 -0
- package/src/api/parameters/getContentChildren.ts +7 -1
- package/src/api/parameters/getContentsWithState.ts +17 -0
- package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
- package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
- package/src/api/parameters/getTasks.ts +2 -0
- package/src/api/parameters/getUser.ts +4 -0
- package/src/api/parameters/index.ts +4 -0
- package/src/api/parameters/searchUser.ts +7 -0
- package/src/api/relation.ts +13 -15
- package/src/api/search.ts +8 -1
- package/src/api/settings.ts +5 -1
- package/src/api/space.ts +27 -9
- package/src/api/spacePermissions.ts +1 -1
- package/src/api/spaceProperties.ts +25 -0
- package/src/api/spaceSettings.ts +1 -1
- package/src/api/template.ts +1 -1
- package/src/api/themes.ts +1 -1
- package/src/api/userProperties.ts +185 -0
- package/src/api/users.ts +21 -9
- package/src/clients/baseClient.ts +1 -5
- package/src/clients/confluenceClient.ts +6 -0
- package/src/config.ts +4 -1
- package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
- package/favicon.svg +0 -7
package/src/api/relation.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class Relation {
|
|
@@ -12,8 +12,8 @@ export class Relation {
|
|
|
12
12
|
* way.
|
|
13
13
|
*
|
|
14
14
|
* For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET
|
|
15
|
-
* https://your-domain.atlassian.net/
|
|
16
|
-
*
|
|
15
|
+
* https://your-domain.atlassian.net/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an example
|
|
16
|
+
* custom relationship type.
|
|
17
17
|
*
|
|
18
18
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity
|
|
19
19
|
* and source entity.
|
|
@@ -27,8 +27,8 @@ export class Relation {
|
|
|
27
27
|
* way.
|
|
28
28
|
*
|
|
29
29
|
* For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET
|
|
30
|
-
* https://your-domain.atlassian.net/
|
|
31
|
-
*
|
|
30
|
+
* https://your-domain.atlassian.net/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an example
|
|
31
|
+
* custom relationship type.
|
|
32
32
|
*
|
|
33
33
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity
|
|
34
34
|
* and source entity.
|
|
@@ -64,7 +64,7 @@ export class Relation {
|
|
|
64
64
|
*
|
|
65
65
|
* For example, you can use this method to find whether the current user has selected a particular page as a favorite
|
|
66
66
|
* (i.e. 'save for later'): `GET
|
|
67
|
-
* https://your-domain.atlassian.net/
|
|
67
|
+
* https://your-domain.atlassian.net/api/relation/favourite/from/user/current/to/content/123`
|
|
68
68
|
*
|
|
69
69
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity
|
|
70
70
|
* and source entity.
|
|
@@ -79,7 +79,7 @@ export class Relation {
|
|
|
79
79
|
*
|
|
80
80
|
* For example, you can use this method to find whether the current user has selected a particular page as a favorite
|
|
81
81
|
* (i.e. 'save for later'): `GET
|
|
82
|
-
* https://your-domain.atlassian.net/
|
|
82
|
+
* https://your-domain.atlassian.net/api/relation/favourite/from/user/current/to/content/123`
|
|
83
83
|
*
|
|
84
84
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity
|
|
85
85
|
* and source entity.
|
|
@@ -109,7 +109,7 @@ export class Relation {
|
|
|
109
109
|
* default, but you can use this method to create any type of relationship between two entities.
|
|
110
110
|
*
|
|
111
111
|
* For example, the following method creates a 'sibling' relationship between two pieces of content: `GET
|
|
112
|
-
* https://your-domain.atlassian.net/
|
|
112
|
+
* https://your-domain.atlassian.net/api/relation/sibling/from/content/123/to/content/456`
|
|
113
113
|
*
|
|
114
114
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
115
115
|
* ('Can use' global permission).
|
|
@@ -123,7 +123,7 @@ export class Relation {
|
|
|
123
123
|
* default, but you can use this method to create any type of relationship between two entities.
|
|
124
124
|
*
|
|
125
125
|
* For example, the following method creates a 'sibling' relationship between two pieces of content: `GET
|
|
126
|
-
* https://your-domain.atlassian.net/
|
|
126
|
+
* https://your-domain.atlassian.net/api/relation/sibling/from/content/123/to/content/456`
|
|
127
127
|
*
|
|
128
128
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
129
129
|
* ('Can use' global permission).
|
|
@@ -189,9 +189,8 @@ export class Relation {
|
|
|
189
189
|
* way.
|
|
190
190
|
*
|
|
191
191
|
* For example, the following method finds all users that have a 'collaborator' relationship to a piece of content
|
|
192
|
-
* with an ID of '1234': `GET
|
|
193
|
-
*
|
|
194
|
-
* 'collaborator' is an example custom relationship type.
|
|
192
|
+
* with an ID of '1234': `GET https://your-domain.atlassian.net/api/relation/collaborator/to/content/1234/from/user`
|
|
193
|
+
* Note, 'collaborator' is an example custom relationship type.
|
|
195
194
|
*
|
|
196
195
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity
|
|
197
196
|
* and source entity.
|
|
@@ -205,9 +204,8 @@ export class Relation {
|
|
|
205
204
|
* way.
|
|
206
205
|
*
|
|
207
206
|
* For example, the following method finds all users that have a 'collaborator' relationship to a piece of content
|
|
208
|
-
* with an ID of '1234': `GET
|
|
209
|
-
*
|
|
210
|
-
* 'collaborator' is an example custom relationship type.
|
|
207
|
+
* with an ID of '1234': `GET https://your-domain.atlassian.net/api/relation/collaborator/to/content/1234/from/user`
|
|
208
|
+
* Note, 'collaborator' is an example custom relationship type.
|
|
211
209
|
*
|
|
212
210
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity
|
|
213
211
|
* and source entity.
|
package/src/api/search.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class Search {
|
|
@@ -67,6 +67,9 @@ export class Search {
|
|
|
67
67
|
* Searches for users using user-specific queries from the [Confluence Query Language
|
|
68
68
|
* (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).
|
|
69
69
|
*
|
|
70
|
+
* Note that CQL input queries submitted through the `/api/search/user` endpoint only support user-specific fields
|
|
71
|
+
* like `user`, `user.fullname`, `user.accountid`, and `user.userkey`.
|
|
72
|
+
*
|
|
70
73
|
* Note that some user fields may be set to null depending on the user's privacy settings. These are: email,
|
|
71
74
|
* profilePicture, displayName, and timeZone.
|
|
72
75
|
*/
|
|
@@ -78,6 +81,9 @@ export class Search {
|
|
|
78
81
|
* Searches for users using user-specific queries from the [Confluence Query Language
|
|
79
82
|
* (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).
|
|
80
83
|
*
|
|
84
|
+
* Note that CQL input queries submitted through the `/api/search/user` endpoint only support user-specific fields
|
|
85
|
+
* like `user`, `user.fullname`, `user.accountid`, and `user.userkey`.
|
|
86
|
+
*
|
|
81
87
|
* Note that some user fields may be set to null depending on the user's privacy settings. These are: email,
|
|
82
88
|
* profilePicture, displayName, and timeZone.
|
|
83
89
|
*/
|
|
@@ -97,6 +103,7 @@ export class Search {
|
|
|
97
103
|
start: parameters.start,
|
|
98
104
|
limit: parameters.limit,
|
|
99
105
|
expand: parameters.expand,
|
|
106
|
+
sitePermissionTypeFilter: parameters.sitePermissionTypeFilter,
|
|
100
107
|
},
|
|
101
108
|
};
|
|
102
109
|
|
package/src/api/settings.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class Settings {
|
|
@@ -180,6 +180,8 @@ export class Settings {
|
|
|
180
180
|
* space. Note, the default space settings are inherited from the current global settings.
|
|
181
181
|
*
|
|
182
182
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.
|
|
183
|
+
*
|
|
184
|
+
* @deprecated Will be removed in next major version.
|
|
183
185
|
*/
|
|
184
186
|
async setLookAndFeelSettings<T = unknown>(
|
|
185
187
|
parameters: Parameters.SetLookAndFeelSettings | undefined,
|
|
@@ -190,6 +192,8 @@ export class Settings {
|
|
|
190
192
|
* space. Note, the default space settings are inherited from the current global settings.
|
|
191
193
|
*
|
|
192
194
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.
|
|
195
|
+
*
|
|
196
|
+
* @deprecated Will be removed in next major version.
|
|
193
197
|
*/
|
|
194
198
|
async setLookAndFeelSettings<T = unknown>(
|
|
195
199
|
parameters?: Parameters.SetLookAndFeelSettings,
|
package/src/api/space.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import { paramSerializer } from '../paramSerializer';
|
|
6
6
|
import type { RequestConfig } from '../requestConfig';
|
|
7
7
|
|
|
@@ -14,6 +14,8 @@ export class Space {
|
|
|
14
14
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
15
15
|
* ('Can use' global permission). Note, the returned list will only contain spaces that the current user has
|
|
16
16
|
* permission to view.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Will be removed in next major version.
|
|
17
19
|
*/
|
|
18
20
|
async getSpaces<T = Models.SpaceArray>(
|
|
19
21
|
parameters: Parameters.GetSpaces | undefined,
|
|
@@ -25,6 +27,8 @@ export class Space {
|
|
|
25
27
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
26
28
|
* ('Can use' global permission). Note, the returned list will only contain spaces that the current user has
|
|
27
29
|
* permission to view.
|
|
30
|
+
*
|
|
31
|
+
* @deprecated Will be removed in next major version.
|
|
28
32
|
*/
|
|
29
33
|
async getSpaces<T = Models.SpaceArray>(parameters?: Parameters.GetSpaces, callback?: never): Promise<T>;
|
|
30
34
|
async getSpaces<T = Models.SpaceArray>(parameters?: Parameters.GetSpaces, callback?: Callback<T>): Promise<void | T> {
|
|
@@ -68,8 +72,9 @@ export class Space {
|
|
|
68
72
|
url: '/api/space',
|
|
69
73
|
method: 'POST',
|
|
70
74
|
data: {
|
|
71
|
-
key: parameters?.key,
|
|
72
75
|
name: parameters?.name,
|
|
76
|
+
key: parameters?.key,
|
|
77
|
+
alias: parameters?.alias,
|
|
73
78
|
description: parameters?.description,
|
|
74
79
|
permissions: parameters?.permissions,
|
|
75
80
|
},
|
|
@@ -105,8 +110,9 @@ export class Space {
|
|
|
105
110
|
url: '/api/space/_private',
|
|
106
111
|
method: 'POST',
|
|
107
112
|
data: {
|
|
108
|
-
key: parameters?.key,
|
|
109
113
|
name: parameters?.name,
|
|
114
|
+
key: parameters?.key,
|
|
115
|
+
alias: parameters?.alias,
|
|
110
116
|
description: parameters?.description,
|
|
111
117
|
permissions: parameters?.permissions,
|
|
112
118
|
},
|
|
@@ -120,6 +126,8 @@ export class Space {
|
|
|
120
126
|
* space.
|
|
121
127
|
*
|
|
122
128
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
|
|
129
|
+
*
|
|
130
|
+
* @deprecated Will be removed in next major version.
|
|
123
131
|
*/
|
|
124
132
|
async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback: Callback<T>): Promise<void>;
|
|
125
133
|
/**
|
|
@@ -127,6 +135,8 @@ export class Space {
|
|
|
127
135
|
* space.
|
|
128
136
|
*
|
|
129
137
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
|
|
138
|
+
*
|
|
139
|
+
* @deprecated Will be removed in next major version.
|
|
130
140
|
*/
|
|
131
141
|
async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback?: never): Promise<T>;
|
|
132
142
|
async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback?: Callback<T>): Promise<void | T> {
|
|
@@ -176,17 +186,17 @@ export class Space {
|
|
|
176
186
|
}
|
|
177
187
|
|
|
178
188
|
/**
|
|
179
|
-
*
|
|
180
|
-
* yet when this method has returned. Clients should poll the status
|
|
181
|
-
* task completes.
|
|
189
|
+
* Permanently deletes a space without sending it to the trash. Note, the space will be deleted in a long running
|
|
190
|
+
* task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status
|
|
191
|
+
* link that is returned in the response until the task completes.
|
|
182
192
|
*
|
|
183
193
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.
|
|
184
194
|
*/
|
|
185
195
|
async deleteSpace<T = Models.LongTask>(parameters: Parameters.DeleteSpace, callback: Callback<T>): Promise<void>;
|
|
186
196
|
/**
|
|
187
|
-
*
|
|
188
|
-
* yet when this method has returned. Clients should poll the status
|
|
189
|
-
* task completes.
|
|
197
|
+
* Permanently deletes a space without sending it to the trash. Note, the space will be deleted in a long running
|
|
198
|
+
* task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status
|
|
199
|
+
* link that is returned in the response until the task completes.
|
|
190
200
|
*
|
|
191
201
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.
|
|
192
202
|
*/
|
|
@@ -209,6 +219,8 @@ export class Space {
|
|
|
209
219
|
*
|
|
210
220
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the
|
|
211
221
|
* returned list will only contain content that the current user has permission to view.
|
|
222
|
+
*
|
|
223
|
+
* @deprecated Will be removed in next major version.
|
|
212
224
|
*/
|
|
213
225
|
async getContentForSpace<T = Models.ContentArray>(
|
|
214
226
|
parameters: Parameters.GetContentForSpace,
|
|
@@ -220,6 +232,8 @@ export class Space {
|
|
|
220
232
|
*
|
|
221
233
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the
|
|
222
234
|
* returned list will only contain content that the current user has permission to view.
|
|
235
|
+
*
|
|
236
|
+
* @deprecated Will be removed in next major version.
|
|
223
237
|
*/
|
|
224
238
|
async getContentForSpace<T = Models.ContentArray>(
|
|
225
239
|
parameters: Parameters.GetContentForSpace,
|
|
@@ -248,6 +262,8 @@ export class Space {
|
|
|
248
262
|
*
|
|
249
263
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the
|
|
250
264
|
* returned list will only contain content that the current user has permission to view.
|
|
265
|
+
*
|
|
266
|
+
* @deprecated Will be removed in next major version.
|
|
251
267
|
*/
|
|
252
268
|
async getContentByTypeForSpace<T = Models.ContentArray>(
|
|
253
269
|
parameters: Parameters.GetContentByTypeForSpace,
|
|
@@ -258,6 +274,8 @@ export class Space {
|
|
|
258
274
|
*
|
|
259
275
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the
|
|
260
276
|
* returned list will only contain content that the current user has permission to view.
|
|
277
|
+
*
|
|
278
|
+
* @deprecated Will be removed in next major version.
|
|
261
279
|
*/
|
|
262
280
|
async getContentByTypeForSpace<T = Models.ContentArray>(
|
|
263
281
|
parameters: Parameters.GetContentByTypeForSpace,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class SpacePermissions {
|
|
@@ -4,6 +4,7 @@ import type { Callback } from '../callback';
|
|
|
4
4
|
import type { Client } from '../clients';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
|
+
/** @deprecated Will be removed in next major version. */
|
|
7
8
|
export class SpaceProperties {
|
|
8
9
|
constructor(private client: Client) {}
|
|
9
10
|
|
|
@@ -11,6 +12,8 @@ export class SpaceProperties {
|
|
|
11
12
|
* Returns all properties for the given space. Space properties are a key-value storage associated with a space.
|
|
12
13
|
*
|
|
13
14
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Will be removed in next major version.
|
|
14
17
|
*/
|
|
15
18
|
async getSpaceProperties<T = Models.SpacePropertyArray>(
|
|
16
19
|
parameters: Parameters.GetSpaceProperties,
|
|
@@ -20,6 +23,8 @@ export class SpaceProperties {
|
|
|
20
23
|
* Returns all properties for the given space. Space properties are a key-value storage associated with a space.
|
|
21
24
|
*
|
|
22
25
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.
|
|
26
|
+
*
|
|
27
|
+
* @deprecated Will be removed in next major version.
|
|
23
28
|
*/
|
|
24
29
|
async getSpaceProperties<T = Models.SpacePropertyArray>(
|
|
25
30
|
parameters: Parameters.GetSpaceProperties,
|
|
@@ -46,6 +51,8 @@ export class SpaceProperties {
|
|
|
46
51
|
* Creates a new space property.
|
|
47
52
|
*
|
|
48
53
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
54
|
+
*
|
|
55
|
+
* @deprecated Will be removed in next major version.
|
|
49
56
|
*/
|
|
50
57
|
async createSpaceProperty<T = Models.SpaceProperty>(
|
|
51
58
|
parameters: Parameters.CreateSpaceProperty,
|
|
@@ -55,6 +62,8 @@ export class SpaceProperties {
|
|
|
55
62
|
* Creates a new space property.
|
|
56
63
|
*
|
|
57
64
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
65
|
+
*
|
|
66
|
+
* @deprecated Will be removed in next major version.
|
|
58
67
|
*/
|
|
59
68
|
async createSpaceProperty<T = Models.SpaceProperty>(
|
|
60
69
|
parameters: Parameters.CreateSpaceProperty,
|
|
@@ -81,6 +90,8 @@ export class SpaceProperties {
|
|
|
81
90
|
* Returns a space property.
|
|
82
91
|
*
|
|
83
92
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.
|
|
93
|
+
*
|
|
94
|
+
* @deprecated Will be removed in next major version.
|
|
84
95
|
*/
|
|
85
96
|
async getSpaceProperty<T = Models.SpaceProperty>(
|
|
86
97
|
parameters: Parameters.GetSpaceProperty,
|
|
@@ -90,6 +101,8 @@ export class SpaceProperties {
|
|
|
90
101
|
* Returns a space property.
|
|
91
102
|
*
|
|
92
103
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.
|
|
104
|
+
*
|
|
105
|
+
* @deprecated Will be removed in next major version.
|
|
93
106
|
*/
|
|
94
107
|
async getSpaceProperty<T = Models.SpaceProperty>(
|
|
95
108
|
parameters: Parameters.GetSpaceProperty,
|
|
@@ -115,6 +128,8 @@ export class SpaceProperties {
|
|
|
115
128
|
* property is passed as a path parameter, rather than in the request body.
|
|
116
129
|
*
|
|
117
130
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
131
|
+
*
|
|
132
|
+
* @deprecated Will be removed in next major version.
|
|
118
133
|
*/
|
|
119
134
|
async createSpacePropertyForKey<T = Models.SpaceProperty>(
|
|
120
135
|
parameters: Parameters.CreateSpacePropertyForKey,
|
|
@@ -125,6 +140,8 @@ export class SpaceProperties {
|
|
|
125
140
|
* property is passed as a path parameter, rather than in the request body.
|
|
126
141
|
*
|
|
127
142
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
143
|
+
*
|
|
144
|
+
* @deprecated Will be removed in next major version.
|
|
128
145
|
*/
|
|
129
146
|
async createSpacePropertyForKey<T = Models.SpaceProperty>(
|
|
130
147
|
parameters: Parameters.CreateSpacePropertyForKey,
|
|
@@ -149,6 +166,8 @@ export class SpaceProperties {
|
|
|
149
166
|
* Updates a space property. Note, you cannot update the key of a space property, only the value.
|
|
150
167
|
*
|
|
151
168
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
169
|
+
*
|
|
170
|
+
* @deprecated Will be removed in next major version.
|
|
152
171
|
*/
|
|
153
172
|
async updateSpaceProperty<T = Models.SpaceProperty>(
|
|
154
173
|
parameters: Parameters.UpdateSpaceProperty,
|
|
@@ -158,6 +177,8 @@ export class SpaceProperties {
|
|
|
158
177
|
* Updates a space property. Note, you cannot update the key of a space property, only the value.
|
|
159
178
|
*
|
|
160
179
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
180
|
+
*
|
|
181
|
+
* @deprecated Will be removed in next major version.
|
|
161
182
|
*/
|
|
162
183
|
async updateSpaceProperty<T = Models.SpaceProperty>(
|
|
163
184
|
parameters: Parameters.UpdateSpaceProperty,
|
|
@@ -183,12 +204,16 @@ export class SpaceProperties {
|
|
|
183
204
|
* Deletes a space property.
|
|
184
205
|
*
|
|
185
206
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
207
|
+
*
|
|
208
|
+
* @deprecated Will be removed in next major version.
|
|
186
209
|
*/
|
|
187
210
|
async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback: Callback<T>): Promise<void>;
|
|
188
211
|
/**
|
|
189
212
|
* Deletes a space property.
|
|
190
213
|
*
|
|
191
214
|
* **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.
|
|
215
|
+
*
|
|
216
|
+
* @deprecated Will be removed in next major version.
|
|
192
217
|
*/
|
|
193
218
|
async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback?: never): Promise<T>;
|
|
194
219
|
async deleteSpaceProperty<T = void>(
|
package/src/api/spaceSettings.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class SpaceSettings {
|
package/src/api/template.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class Template {
|
package/src/api/themes.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from './models';
|
|
2
2
|
import type * as Parameters from './parameters';
|
|
3
|
-
import type { Callback } from '../callback';
|
|
4
3
|
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
5
|
import type { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class Themes {
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type * as Models from './models';
|
|
2
|
+
import type * as Parameters from './parameters';
|
|
3
|
+
import type { Client } from '../clients';
|
|
4
|
+
import type { Callback } from '../callback';
|
|
5
|
+
import type { RequestConfig } from '../requestConfig';
|
|
6
|
+
|
|
7
|
+
export class UserProperties {
|
|
8
|
+
constructor(private client: Client) {}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Returns the properties for a user as list of property keys. For more information about user properties, see
|
|
12
|
+
* [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
|
|
13
|
+
* `Note`, these properties stored against a user are on a Confluence site level and not space/content level.
|
|
14
|
+
*
|
|
15
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
16
|
+
* ('Can use' global permission).
|
|
17
|
+
*/
|
|
18
|
+
async getUserProperties<T = Models.UserPropertyKeyArray>(
|
|
19
|
+
parameters: Parameters.GetUserProperties,
|
|
20
|
+
callback: Callback<T>,
|
|
21
|
+
): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the properties for a user as list of property keys. For more information about user properties, see
|
|
24
|
+
* [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
|
|
25
|
+
* `Note`, these properties stored against a user are on a Confluence site level and not space/content level.
|
|
26
|
+
*
|
|
27
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
28
|
+
* ('Can use' global permission).
|
|
29
|
+
*/
|
|
30
|
+
async getUserProperties<T = Models.UserPropertyKeyArray>(
|
|
31
|
+
parameters: Parameters.GetUserProperties,
|
|
32
|
+
callback?: never,
|
|
33
|
+
): Promise<T>;
|
|
34
|
+
async getUserProperties<T = Models.UserPropertyKeyArray>(
|
|
35
|
+
parameters: Parameters.GetUserProperties,
|
|
36
|
+
callback?: Callback<T>,
|
|
37
|
+
): Promise<void | T> {
|
|
38
|
+
const config: RequestConfig = {
|
|
39
|
+
url: `/api/user/${parameters.userId}/property`,
|
|
40
|
+
method: 'GET',
|
|
41
|
+
params: {
|
|
42
|
+
start: parameters.start,
|
|
43
|
+
limit: parameters.limit,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return this.client.sendRequest(config, callback);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence
|
|
52
|
+
* entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
53
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
54
|
+
*
|
|
55
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
56
|
+
* ('Can use' global permission).
|
|
57
|
+
*/
|
|
58
|
+
async getUserProperty<T = Models.UserProperty>(
|
|
59
|
+
parameters: Parameters.GetUserProperty,
|
|
60
|
+
callback: Callback<T>,
|
|
61
|
+
): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence
|
|
64
|
+
* entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
65
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
66
|
+
*
|
|
67
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
68
|
+
* ('Can use' global permission).
|
|
69
|
+
*/
|
|
70
|
+
async getUserProperty<T = Models.UserProperty>(parameters: Parameters.GetUserProperty, callback?: never): Promise<T>;
|
|
71
|
+
async getUserProperty<T = Models.UserProperty>(
|
|
72
|
+
parameters: Parameters.GetUserProperty,
|
|
73
|
+
callback?: Callback<T>,
|
|
74
|
+
): Promise<void | T> {
|
|
75
|
+
const config: RequestConfig = {
|
|
76
|
+
url: `/api/user/${parameters.userId}/property/${parameters.key}`,
|
|
77
|
+
method: 'GET',
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return this.client.sendRequest(config, callback);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Creates a property for a user. For more information about user properties, see [Confluence entity properties]
|
|
85
|
+
* (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored
|
|
86
|
+
* against a user are on a Confluence site level and not space/content level.
|
|
87
|
+
*
|
|
88
|
+
* `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by
|
|
89
|
+
* fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access
|
|
90
|
+
* the Confluence site ('Can use' global permission).
|
|
91
|
+
*/
|
|
92
|
+
async createUserProperty<T = unknown>(
|
|
93
|
+
parameters: Parameters.CreateUserProperty,
|
|
94
|
+
callback: Callback<T>,
|
|
95
|
+
): Promise<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Creates a property for a user. For more information about user properties, see [Confluence entity properties]
|
|
98
|
+
* (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored
|
|
99
|
+
* against a user are on a Confluence site level and not space/content level.
|
|
100
|
+
*
|
|
101
|
+
* `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by
|
|
102
|
+
* fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access
|
|
103
|
+
* the Confluence site ('Can use' global permission).
|
|
104
|
+
*/
|
|
105
|
+
async createUserProperty<T = unknown>(parameters: Parameters.CreateUserProperty, callback?: never): Promise<T>;
|
|
106
|
+
async createUserProperty<T = unknown>(
|
|
107
|
+
parameters: Parameters.CreateUserProperty,
|
|
108
|
+
callback?: Callback<T>,
|
|
109
|
+
): Promise<void | T> {
|
|
110
|
+
const config: RequestConfig = {
|
|
111
|
+
url: `/api/user/${parameters.userId}/property/${parameters.key}`,
|
|
112
|
+
method: 'POST',
|
|
113
|
+
data: {
|
|
114
|
+
value: parameters.value,
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
return this.client.sendRequest(config, callback);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more
|
|
123
|
+
* information about user properties, see [Confluence entity
|
|
124
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
125
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
126
|
+
*
|
|
127
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
128
|
+
* ('Can use' global permission).
|
|
129
|
+
*/
|
|
130
|
+
async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback: Callback<T>): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more
|
|
133
|
+
* information about user properties, see [Confluence entity
|
|
134
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
135
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
136
|
+
*
|
|
137
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
138
|
+
* ('Can use' global permission).
|
|
139
|
+
*/
|
|
140
|
+
async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback?: never): Promise<T>;
|
|
141
|
+
async updateUserProperty<T = void>(
|
|
142
|
+
parameters: Parameters.UpdateUserProperty,
|
|
143
|
+
callback?: Callback<T>,
|
|
144
|
+
): Promise<void | T> {
|
|
145
|
+
const config: RequestConfig = {
|
|
146
|
+
url: `/api/user/${parameters.userId}/property/${parameters.key}`,
|
|
147
|
+
method: 'PUT',
|
|
148
|
+
data: {
|
|
149
|
+
value: parameters.value,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
return this.client.sendRequest(config, callback);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Deletes a property for the given user. For more information about user properties, see [Confluence entity
|
|
158
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
159
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
160
|
+
*
|
|
161
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
162
|
+
* ('Can use' global permission).
|
|
163
|
+
*/
|
|
164
|
+
async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback: Callback<T>): Promise<void>;
|
|
165
|
+
/**
|
|
166
|
+
* Deletes a property for the given user. For more information about user properties, see [Confluence entity
|
|
167
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
168
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
169
|
+
*
|
|
170
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
171
|
+
* ('Can use' global permission).
|
|
172
|
+
*/
|
|
173
|
+
async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback?: never): Promise<T>;
|
|
174
|
+
async deleteUserProperty<T = void>(
|
|
175
|
+
parameters: Parameters.DeleteUserProperty,
|
|
176
|
+
callback?: Callback<T>,
|
|
177
|
+
): Promise<void | T> {
|
|
178
|
+
const config: RequestConfig = {
|
|
179
|
+
url: `/api/user/${parameters.userId}/property/${parameters.key}`,
|
|
180
|
+
method: 'DELETE',
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
return this.client.sendRequest(config, callback);
|
|
184
|
+
}
|
|
185
|
+
}
|