confluence.js 2.0.0 → 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
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type * as Models from "./models/index.js";
|
|
2
|
+
import type * as Parameters from "./parameters/index.js";
|
|
3
|
+
import type { Client } from "../clients/index.js";
|
|
4
|
+
import type { Callback } from "../callback.js";
|
|
5
|
+
export declare class UserProperties {
|
|
6
|
+
private client;
|
|
7
|
+
constructor(client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Returns the properties for a user as list of property keys. For more information about user properties, see
|
|
10
|
+
* [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
|
|
11
|
+
* `Note`, these properties stored against a user are on a Confluence site level and not space/content level.
|
|
12
|
+
*
|
|
13
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
14
|
+
* ('Can use' global permission).
|
|
15
|
+
*/
|
|
16
|
+
getUserProperties<T = Models.UserPropertyKeyArray>(parameters: Parameters.GetUserProperties, callback: Callback<T>): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the properties for a user as list of property keys. For more information about user properties, see
|
|
19
|
+
* [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).
|
|
20
|
+
* `Note`, these properties stored against a user are on a Confluence site level and not space/content level.
|
|
21
|
+
*
|
|
22
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
23
|
+
* ('Can use' global permission).
|
|
24
|
+
*/
|
|
25
|
+
getUserProperties<T = Models.UserPropertyKeyArray>(parameters: Parameters.GetUserProperties, callback?: never): Promise<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence
|
|
28
|
+
* entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
29
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
30
|
+
*
|
|
31
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
32
|
+
* ('Can use' global permission).
|
|
33
|
+
*/
|
|
34
|
+
getUserProperty<T = Models.UserProperty>(parameters: Parameters.GetUserProperty, callback: Callback<T>): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence
|
|
37
|
+
* entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
38
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
39
|
+
*
|
|
40
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
41
|
+
* ('Can use' global permission).
|
|
42
|
+
*/
|
|
43
|
+
getUserProperty<T = Models.UserProperty>(parameters: Parameters.GetUserProperty, callback?: never): Promise<T>;
|
|
44
|
+
/**
|
|
45
|
+
* Creates a property for a user. For more information about user properties, see [Confluence entity properties]
|
|
46
|
+
* (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored
|
|
47
|
+
* against a user are on a Confluence site level and not space/content level.
|
|
48
|
+
*
|
|
49
|
+
* `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by
|
|
50
|
+
* fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access
|
|
51
|
+
* the Confluence site ('Can use' global permission).
|
|
52
|
+
*/
|
|
53
|
+
createUserProperty<T = unknown>(parameters: Parameters.CreateUserProperty, callback: Callback<T>): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a property for a user. For more information about user properties, see [Confluence entity properties]
|
|
56
|
+
* (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored
|
|
57
|
+
* against a user are on a Confluence site level and not space/content level.
|
|
58
|
+
*
|
|
59
|
+
* `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by
|
|
60
|
+
* fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access
|
|
61
|
+
* the Confluence site ('Can use' global permission).
|
|
62
|
+
*/
|
|
63
|
+
createUserProperty<T = unknown>(parameters: Parameters.CreateUserProperty, callback?: never): Promise<T>;
|
|
64
|
+
/**
|
|
65
|
+
* Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more
|
|
66
|
+
* information about user properties, see [Confluence entity
|
|
67
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
68
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
69
|
+
*
|
|
70
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
71
|
+
* ('Can use' global permission).
|
|
72
|
+
*/
|
|
73
|
+
updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback: Callback<T>): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more
|
|
76
|
+
* information about user properties, see [Confluence entity
|
|
77
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
78
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
79
|
+
*
|
|
80
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
81
|
+
* ('Can use' global permission).
|
|
82
|
+
*/
|
|
83
|
+
updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback?: never): Promise<T>;
|
|
84
|
+
/**
|
|
85
|
+
* Deletes a property for the given user. For more information about user properties, see [Confluence entity
|
|
86
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
87
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
88
|
+
*
|
|
89
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
90
|
+
* ('Can use' global permission).
|
|
91
|
+
*/
|
|
92
|
+
deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback: Callback<T>): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Deletes a property for the given user. For more information about user properties, see [Confluence entity
|
|
95
|
+
* properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these
|
|
96
|
+
* properties stored against a user are on a Confluence site level and not space/content level.
|
|
97
|
+
*
|
|
98
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
99
|
+
* ('Can use' global permission).
|
|
100
|
+
*/
|
|
101
|
+
deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback?: never): Promise<T>;
|
|
102
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Models from "./models/index.js";
|
|
2
2
|
import type * as Parameters from "./parameters/index.js";
|
|
3
|
-
import type { Callback } from "../callback.js";
|
|
4
3
|
import type { Client } from "../clients/index.js";
|
|
4
|
+
import type { Callback } from "../callback.js";
|
|
5
5
|
export declare class Users {
|
|
6
6
|
private client;
|
|
7
7
|
constructor(client: Client);
|
|
@@ -72,39 +72,46 @@ export declare class Users {
|
|
|
72
72
|
*/
|
|
73
73
|
getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(parameters: Parameters.GetGroupMembershipsForUser, callback?: never): Promise<T>;
|
|
74
74
|
/**
|
|
75
|
-
* Returns user details for the ids provided in request.
|
|
75
|
+
* Returns user details for the ids provided in the request. Currently this API returns a maximum of 100 results. If
|
|
76
|
+
* more than 100 account ids are passed in, then the first 100 will be returned.
|
|
76
77
|
*
|
|
77
78
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
78
79
|
* ('Can use' global permission).
|
|
79
80
|
*/
|
|
80
81
|
getBulkUserLookup<T = Models.BulkUserLookupArray>(parameters: Parameters.GetBulkUserLookup, callback: Callback<T>): Promise<void>;
|
|
81
82
|
/**
|
|
82
|
-
* Returns user details for the ids provided in request.
|
|
83
|
+
* Returns user details for the ids provided in the request. Currently this API returns a maximum of 100 results. If
|
|
84
|
+
* more than 100 account ids are passed in, then the first 100 will be returned.
|
|
83
85
|
*
|
|
84
86
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
85
87
|
* ('Can use' global permission).
|
|
86
88
|
*/
|
|
87
89
|
getBulkUserLookup<T = Models.BulkUserLookupArray>(parameters: Parameters.GetBulkUserLookup, callback?: never): Promise<T>;
|
|
88
90
|
/**
|
|
89
|
-
* Returns a user's email address
|
|
91
|
+
* Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is
|
|
92
|
+
* only available to apps approved by Atlassian, according to these
|
|
90
93
|
* [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).
|
|
94
|
+
* For Forge apps, this API only supports access via asApp() requests.
|
|
91
95
|
*
|
|
92
96
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
93
97
|
* ('Can use' global permission).
|
|
94
98
|
*/
|
|
95
99
|
getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(parameters: Parameters.GetPrivacyUnsafeUserEmail, callback: Callback<T>): Promise<void>;
|
|
96
100
|
/**
|
|
97
|
-
* Returns a user's email address
|
|
101
|
+
* Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is
|
|
102
|
+
* only available to apps approved by Atlassian, according to these
|
|
98
103
|
* [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).
|
|
104
|
+
* For Forge apps, this API only supports access via asApp() requests.
|
|
99
105
|
*
|
|
100
106
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
101
107
|
* ('Can use' global permission).
|
|
102
108
|
*/
|
|
103
109
|
getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(parameters: Parameters.GetPrivacyUnsafeUserEmail, callback?: never): Promise<T>;
|
|
104
110
|
/**
|
|
105
|
-
* Returns user email
|
|
106
|
-
* according to these
|
|
111
|
+
* Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is
|
|
112
|
+
* only available to apps approved by Atlassian, according to these
|
|
107
113
|
* [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).
|
|
114
|
+
* For Forge apps, this API only supports access via asApp() requests.
|
|
108
115
|
*
|
|
109
116
|
* Any accounts which are not available will not be included in the result.
|
|
110
117
|
*
|
|
@@ -113,9 +120,10 @@ export declare class Users {
|
|
|
113
120
|
*/
|
|
114
121
|
getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, callback: Callback<T>): Promise<void>;
|
|
115
122
|
/**
|
|
116
|
-
* Returns user email
|
|
117
|
-
* according to these
|
|
123
|
+
* Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is
|
|
124
|
+
* only available to apps approved by Atlassian, according to these
|
|
118
125
|
* [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).
|
|
126
|
+
* For Forge apps, this API only supports access via asApp() requests.
|
|
119
127
|
*
|
|
120
128
|
* Any accounts which are not available will not be included in the result.
|
|
121
129
|
*
|
|
@@ -129,6 +137,8 @@ export declare class Users {
|
|
|
129
137
|
*
|
|
130
138
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission
|
|
131
139
|
* if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
|
|
140
|
+
*
|
|
141
|
+
* @deprecated Will be removed in next major version.
|
|
132
142
|
*/
|
|
133
143
|
getBulkUserMigration<T = Models.MigratedUserArray>(parameters: Parameters.GetBulkUserMigration, callback: Callback<T>): Promise<void>;
|
|
134
144
|
/**
|
|
@@ -137,6 +147,8 @@ export declare class Users {
|
|
|
137
147
|
*
|
|
138
148
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission
|
|
139
149
|
* if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).
|
|
150
|
+
*
|
|
151
|
+
* @deprecated Will be removed in next major version.
|
|
140
152
|
*/
|
|
141
153
|
getBulkUserMigration<T = Models.MigratedUserArray>(parameters: Parameters.GetBulkUserMigration, callback?: never): Promise<T>;
|
|
142
154
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseClient } from "./baseClient.js";
|
|
2
2
|
import type { Config } from "../config.js";
|
|
3
|
-
import { Analytics, Audit, Content, ContentAttachments, ContentBody, ContentChildrenAndDescendants, ContentComments, ContentLabels, ContentMacroBody, ContentPermissions, ContentProperties, ContentRestrictions, ContentStates, ContentVersions, ContentWatches, DynamicModules, Experimental, Group, InlineTasks, LabelInfo, LongRunningTask, Relation, Search, Settings, Space, SpacePermissions, SpaceProperties, SpaceSettings, Template, Themes, Users } from "../api/index.js";
|
|
3
|
+
import { Analytics, Audit, Content, ContentAttachments, ContentBody, ContentChildrenAndDescendants, ContentComments, ContentLabels, ContentMacroBody, ContentPermissions, ContentProperties, ContentRestrictions, ContentStates, ContentVersions, ContentWatches, DynamicModules, Experimental, Group, InlineTasks, LabelInfo, LongRunningTask, Relation, Search, Settings, Space, SpacePermissions, SpaceProperties, SpaceSettings, Template, Themes, Users, UserProperties } from "../api/index.js";
|
|
4
4
|
export declare class ConfluenceClient extends BaseClient {
|
|
5
5
|
constructor(config: Config);
|
|
6
6
|
analytics: Analytics;
|
|
@@ -9,10 +9,12 @@ export declare class ConfluenceClient extends BaseClient {
|
|
|
9
9
|
contentAttachments: ContentAttachments;
|
|
10
10
|
contentBody: ContentBody;
|
|
11
11
|
contentChildrenAndDescendants: ContentChildrenAndDescendants;
|
|
12
|
+
/** @deprecated Will be removed in next major version. */
|
|
12
13
|
contentComments: ContentComments;
|
|
13
14
|
contentLabels: ContentLabels;
|
|
14
15
|
contentMacroBody: ContentMacroBody;
|
|
15
16
|
contentPermissions: ContentPermissions;
|
|
17
|
+
/** @deprecated Will be removed in next major version. */
|
|
16
18
|
contentProperties: ContentProperties;
|
|
17
19
|
contentRestrictions: ContentRestrictions;
|
|
18
20
|
contentStates: ContentStates;
|
|
@@ -21,6 +23,7 @@ export declare class ConfluenceClient extends BaseClient {
|
|
|
21
23
|
dynamicModules: DynamicModules;
|
|
22
24
|
experimental: Experimental;
|
|
23
25
|
group: Group;
|
|
26
|
+
/** @deprecated Will be removed in next major version. */
|
|
24
27
|
inlineTasks: InlineTasks;
|
|
25
28
|
labelInfo: LabelInfo;
|
|
26
29
|
longRunningTask: LongRunningTask;
|
|
@@ -29,9 +32,11 @@ export declare class ConfluenceClient extends BaseClient {
|
|
|
29
32
|
settings: Settings;
|
|
30
33
|
space: Space;
|
|
31
34
|
spacePermissions: SpacePermissions;
|
|
35
|
+
/** @deprecated Will be removed in next major version. */
|
|
32
36
|
spaceProperties: SpaceProperties;
|
|
33
37
|
spaceSettings: SpaceSettings;
|
|
34
38
|
template: Template;
|
|
35
39
|
themes: Themes;
|
|
36
40
|
users: Users;
|
|
41
|
+
userProperties: UserProperties;
|
|
37
42
|
}
|
package/eslint.config.ts
CHANGED
|
@@ -2,8 +2,7 @@ import js from '@eslint/js';
|
|
|
2
2
|
import globals from 'globals';
|
|
3
3
|
import tseslint from 'typescript-eslint';
|
|
4
4
|
import { defineConfig } from 'eslint/config';
|
|
5
|
-
import
|
|
6
|
-
import stylisticTs from '@stylistic/eslint-plugin-ts';
|
|
5
|
+
import stylistic from '@stylistic/eslint-plugin';
|
|
7
6
|
|
|
8
7
|
export default defineConfig([
|
|
9
8
|
{ files: ['**/*.{js,mjs,cjs,ts}'], plugins: { js }, extends: ['js/recommended'] },
|
|
@@ -17,13 +16,12 @@ export default defineConfig([
|
|
|
17
16
|
},
|
|
18
17
|
},
|
|
19
18
|
plugins: {
|
|
20
|
-
'@stylistic
|
|
21
|
-
'@stylistic/ts': stylisticTs,
|
|
19
|
+
'@stylistic': stylistic,
|
|
22
20
|
},
|
|
23
21
|
rules: {
|
|
24
|
-
'@stylistic/
|
|
25
|
-
'@stylistic/
|
|
26
|
-
'@stylistic/
|
|
22
|
+
'@stylistic/comma-dangle': ['error', 'always-multiline'],
|
|
23
|
+
'@stylistic/indent': ['error', 2],
|
|
24
|
+
'@stylistic/lines-between-class-members': [
|
|
27
25
|
'error',
|
|
28
26
|
'always',
|
|
29
27
|
{
|
|
@@ -31,7 +29,9 @@ export default defineConfig([
|
|
|
31
29
|
exceptAfterSingleLine: true,
|
|
32
30
|
},
|
|
33
31
|
],
|
|
34
|
-
'@stylistic/
|
|
32
|
+
'@stylistic/no-trailing-spaces': 'error',
|
|
33
|
+
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
34
|
+
'@stylistic/padding-line-between-statements': [
|
|
35
35
|
'error',
|
|
36
36
|
// Return statements
|
|
37
37
|
{ blankLine: 'always', prev: '*', next: 'return' },
|
|
@@ -39,8 +39,8 @@ export default defineConfig([
|
|
|
39
39
|
{ blankLine: 'always', prev: 'import', next: '*' },
|
|
40
40
|
{ blankLine: 'any', prev: 'import', next: 'import' },
|
|
41
41
|
],
|
|
42
|
-
'@stylistic/
|
|
43
|
-
'@stylistic/
|
|
42
|
+
'@stylistic/quotes': ['error', 'single'],
|
|
43
|
+
'@stylistic/semi': ['error', 'always'],
|
|
44
44
|
'@typescript-eslint/consistent-type-imports': [
|
|
45
45
|
'error',
|
|
46
46
|
{
|
|
@@ -49,14 +49,9 @@ export default defineConfig([
|
|
|
49
49
|
},
|
|
50
50
|
],
|
|
51
51
|
'@typescript-eslint/no-empty-object-type': 'off',
|
|
52
|
-
'@typescript-eslint/no-
|
|
53
|
-
'@typescript-eslint/no-unnecessary-condition': 'error', // todo fix it
|
|
54
|
-
'@typescript-eslint/no-unsafe-argument': 'off', // todo fix it
|
|
55
|
-
'@typescript-eslint/no-unsafe-assignment': 'off', // todo fix it
|
|
56
|
-
'@typescript-eslint/no-unsafe-call': 'off', // todo fix it
|
|
52
|
+
'@typescript-eslint/no-unnecessary-condition': 'error',
|
|
57
53
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
58
54
|
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
59
|
-
'@stylistic/ts/object-curly-spacing': ["error", "always"]
|
|
60
55
|
},
|
|
61
56
|
},
|
|
62
57
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "confluence.js",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily",
|
|
5
5
|
"author": "Vladislav Tupikin <vladislav.tupikin@icloud.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
18
18
|
"types": "./dist/esm/types/index.d.ts",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"require": "./dist/cjs/index.cjs",
|
|
20
|
+
"import": "./dist/esm/index.mjs"
|
|
21
21
|
},
|
|
22
22
|
"./*": {
|
|
23
23
|
"types": "./dist/esm/types/*.d.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"require": "./dist/cjs/*.cjs",
|
|
25
|
+
"import": "./dist/esm/*.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
@@ -44,37 +44,36 @@
|
|
|
44
44
|
"node": ">=20"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"atlassian-jwt": "^2.0
|
|
48
|
-
"axios": "^1.
|
|
49
|
-
"form-data": "^4.0.
|
|
47
|
+
"@atlassian/atlassian-jwt": "^2.2.0",
|
|
48
|
+
"axios": "^1.10.0",
|
|
49
|
+
"form-data": "^4.0.3",
|
|
50
50
|
"oauth": "^0.10.2",
|
|
51
|
-
"zod": "^3.
|
|
51
|
+
"zod": "^3.25.76"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@eslint/js": "^9.
|
|
54
|
+
"@eslint/js": "^9.31.0",
|
|
55
55
|
"@rollup/plugin-alias": "^5.1.1",
|
|
56
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
56
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
57
57
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
58
|
-
"@rollup/plugin-typescript": "^12.1.
|
|
59
|
-
"@stylistic/eslint-plugin
|
|
60
|
-
"@
|
|
61
|
-
"@types/
|
|
62
|
-
"@types/node": "^20.17.46",
|
|
58
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
59
|
+
"@stylistic/eslint-plugin": "^5.2.0",
|
|
60
|
+
"@types/express": "^4.17.23",
|
|
61
|
+
"@types/node": "^20.19.8",
|
|
63
62
|
"@types/oauth": "^0.9.6",
|
|
64
|
-
"dotenv": "^
|
|
65
|
-
"eslint": "^9.
|
|
66
|
-
"globals": "^16.
|
|
63
|
+
"dotenv": "^17.2.0",
|
|
64
|
+
"eslint": "^9.31.0",
|
|
65
|
+
"globals": "^16.3.0",
|
|
67
66
|
"jiti": "^2.4.2",
|
|
68
|
-
"prettier": "^3.
|
|
69
|
-
"prettier-plugin-jsdoc": "^1.3.
|
|
70
|
-
"rollup": "^4.
|
|
71
|
-
"rollup-plugin-esnext-to-nodenext": "^1.0.
|
|
72
|
-
"rollup-plugin-node-externals": "^8.0.
|
|
67
|
+
"prettier": "^3.6.2",
|
|
68
|
+
"prettier-plugin-jsdoc": "^1.3.3",
|
|
69
|
+
"rollup": "^4.45.1",
|
|
70
|
+
"rollup-plugin-esnext-to-nodenext": "^1.0.1",
|
|
71
|
+
"rollup-plugin-node-externals": "^8.0.1",
|
|
73
72
|
"tslib": "^2.8.1",
|
|
74
|
-
"typedoc": "^0.28.
|
|
73
|
+
"typedoc": "^0.28.7",
|
|
75
74
|
"typescript": "^5.8.3",
|
|
76
|
-
"typescript-eslint": "^8.
|
|
77
|
-
"vitest": "^3.
|
|
75
|
+
"typescript-eslint": "^8.37.0",
|
|
76
|
+
"vitest": "^3.2.4"
|
|
78
77
|
},
|
|
79
78
|
"scripts": {
|
|
80
79
|
"build": "rollup -c rollup.config.ts --configPlugin typescript",
|
|
@@ -85,6 +84,8 @@
|
|
|
85
84
|
"lint:fix": "pnpm run lint --fix",
|
|
86
85
|
"test:unit": "vitest run tests/unit --minWorkers=1 --maxWorkers=8 --sequence.concurrent",
|
|
87
86
|
"test:integration": "vitest run tests/integration --bail=1 --no-file-parallelism --max-concurrency 1 -c vitest.config.mts --hookTimeout 100000 --testTimeout 100000",
|
|
88
|
-
"
|
|
87
|
+
"replace:wiki-rest": "grep -rl '/wiki/rest' src/api | xargs sed -i '' 's|/wiki/rest||g'",
|
|
88
|
+
"replace:all": "pnpm run replace:wiki-rest",
|
|
89
|
+
"code:formatting": "pnpm run replace:all && pnpm run prettier && pnpm run lint:fix"
|
|
89
90
|
}
|
|
90
91
|
}
|
package/src/api/analytics.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 Analytics {
|
package/src/api/audit.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 Audit {
|
|
@@ -155,7 +155,7 @@ export class Audit {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
/**
|
|
158
|
-
* Sets the retention period for records in the audit log. The retention period can be set to a maximum of
|
|
158
|
+
* Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year.
|
|
159
159
|
*
|
|
160
160
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global
|
|
161
161
|
* permission.
|
|
@@ -165,7 +165,7 @@ export class Audit {
|
|
|
165
165
|
callback: Callback<T>,
|
|
166
166
|
): Promise<void>;
|
|
167
167
|
/**
|
|
168
|
-
* Sets the retention period for records in the audit log. The retention period can be set to a maximum of
|
|
168
|
+
* Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year.
|
|
169
169
|
*
|
|
170
170
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global
|
|
171
171
|
* permission.
|
package/src/api/content.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 Content {
|
|
@@ -14,6 +14,8 @@ export class Content {
|
|
|
14
14
|
*
|
|
15
15
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
16
16
|
* ('Can use' global permission). Only content that the user has permission to view will be returned.
|
|
17
|
+
*
|
|
18
|
+
* @deprecated Will be removed in next major version.
|
|
17
19
|
*/
|
|
18
20
|
async getContent<T = Models.ContentArray>(
|
|
19
21
|
parameters: Parameters.GetContent | undefined,
|
|
@@ -26,6 +28,8 @@ export class Content {
|
|
|
26
28
|
*
|
|
27
29
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
28
30
|
* ('Can use' global permission). Only content that the user has permission to view will be returned.
|
|
31
|
+
*
|
|
32
|
+
* @deprecated Will be removed in next major version.
|
|
29
33
|
*/
|
|
30
34
|
async getContent<T = Models.ContentArray>(parameters?: Parameters.GetContent, callback?: never): Promise<T>;
|
|
31
35
|
async getContent<T = Models.ContentArray>(
|
|
@@ -63,6 +67,8 @@ export class Content {
|
|
|
63
67
|
*
|
|
64
68
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the
|
|
65
69
|
* content will be created in, and permission to view the draft if publishing a draft.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated Will be removed in next major version.
|
|
66
72
|
*/
|
|
67
73
|
async createContent<T = Models.Content>(
|
|
68
74
|
parameters: Parameters.CreateContent | undefined,
|
|
@@ -79,6 +85,8 @@ export class Content {
|
|
|
79
85
|
*
|
|
80
86
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the
|
|
81
87
|
* content will be created in, and permission to view the draft if publishing a draft.
|
|
88
|
+
*
|
|
89
|
+
* @deprecated Will be removed in next major version.
|
|
82
90
|
*/
|
|
83
91
|
async createContent<T = Models.Content>(parameters?: Parameters.CreateContent, callback?: never): Promise<T>;
|
|
84
92
|
async createContent<T = Models.Content>(
|
|
@@ -223,12 +231,7 @@ export class Content {
|
|
|
223
231
|
},
|
|
224
232
|
data: {
|
|
225
233
|
...parameters,
|
|
226
|
-
version: parameters.version,
|
|
227
|
-
title: parameters.title,
|
|
228
|
-
type: parameters.type,
|
|
229
234
|
status: parameters.bodyStatus,
|
|
230
|
-
space: parameters.space,
|
|
231
|
-
ancestors: parameters.ancestors,
|
|
232
235
|
},
|
|
233
236
|
};
|
|
234
237
|
|
|
@@ -241,12 +244,13 @@ export class Content {
|
|
|
241
244
|
*
|
|
242
245
|
* When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The
|
|
243
246
|
* URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of
|
|
244
|
-
* results returned in each call.
|
|
245
|
-
*
|
|
246
|
-
* https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
|
|
247
|
+
* results returned in each call.
|
|
247
248
|
*
|
|
248
249
|
* The response to this will have a `prev` URL similar to the `next` in the example response.
|
|
249
250
|
*
|
|
251
|
+
* If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
|
|
252
|
+
* query limit parameter will be restricted to a maximum value of 25.
|
|
253
|
+
*
|
|
250
254
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
251
255
|
* ('Can use' global permission). Only content that the user has permission to view will be returned.
|
|
252
256
|
*/
|
|
@@ -260,12 +264,13 @@ export class Content {
|
|
|
260
264
|
*
|
|
261
265
|
* When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The
|
|
262
266
|
* URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of
|
|
263
|
-
* results returned in each call.
|
|
264
|
-
*
|
|
265
|
-
* https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
|
|
267
|
+
* results returned in each call.
|
|
266
268
|
*
|
|
267
269
|
* The response to this will have a `prev` URL similar to the `next` in the example response.
|
|
268
270
|
*
|
|
271
|
+
* If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the
|
|
272
|
+
* query limit parameter will be restricted to a maximum value of 25.
|
|
273
|
+
*
|
|
269
274
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site
|
|
270
275
|
* ('Can use' global permission). Only content that the user has permission to view will be returned.
|
|
271
276
|
*/
|
|
@@ -299,6 +304,8 @@ export class Content {
|
|
|
299
304
|
*
|
|
300
305
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
|
|
301
306
|
* content is a blog post, 'View' permission for the space is required.
|
|
307
|
+
*
|
|
308
|
+
* @deprecated Will be removed in next major version.
|
|
302
309
|
*/
|
|
303
310
|
async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback: Callback<T>): Promise<void>;
|
|
304
311
|
/**
|
|
@@ -308,6 +315,8 @@ export class Content {
|
|
|
308
315
|
*
|
|
309
316
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
|
|
310
317
|
* content is a blog post, 'View' permission for the space is required.
|
|
318
|
+
*
|
|
319
|
+
* @deprecated Will be removed in next major version.
|
|
311
320
|
*/
|
|
312
321
|
async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback?: never): Promise<T>;
|
|
313
322
|
async getContentById<T = Models.Content>(
|
|
@@ -336,6 +345,8 @@ export class Content {
|
|
|
336
345
|
* Note, updating draft content is currently not supported.
|
|
337
346
|
*
|
|
338
347
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
|
|
348
|
+
*
|
|
349
|
+
* @deprecated Will be removed in next major version.
|
|
339
350
|
*/
|
|
340
351
|
async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback: Callback<T>): Promise<void>;
|
|
341
352
|
/**
|
|
@@ -345,6 +356,8 @@ export class Content {
|
|
|
345
356
|
* Note, updating draft content is currently not supported.
|
|
346
357
|
*
|
|
347
358
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
|
|
359
|
+
*
|
|
360
|
+
* @deprecated Will be removed in next major version.
|
|
348
361
|
*/
|
|
349
362
|
async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback?: never): Promise<T>;
|
|
350
363
|
async updateContent<T = Models.Content>(
|
|
@@ -383,6 +396,8 @@ export class Content {
|
|
|
383
396
|
*
|
|
384
397
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
|
|
385
398
|
* content is in.
|
|
399
|
+
*
|
|
400
|
+
* @deprecated Will be removed in next major version.
|
|
386
401
|
*/
|
|
387
402
|
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback: Callback<T>): Promise<void>;
|
|
388
403
|
/**
|
|
@@ -397,6 +412,8 @@ export class Content {
|
|
|
397
412
|
*
|
|
398
413
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
|
|
399
414
|
* content is in.
|
|
415
|
+
*
|
|
416
|
+
* @deprecated Will be removed in next major version.
|
|
400
417
|
*/
|
|
401
418
|
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: never): Promise<T>;
|
|
402
419
|
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: Callback<T>): Promise<void | T> {
|
|
@@ -415,6 +432,8 @@ export class Content {
|
|
|
415
432
|
* Returns the most recent update for a piece of content.
|
|
416
433
|
*
|
|
417
434
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.
|
|
435
|
+
*
|
|
436
|
+
* @deprecated Will be removed in next major version.
|
|
418
437
|
*/
|
|
419
438
|
async getHistoryForContent<T = Models.ContentHistory>(
|
|
420
439
|
parameters: Parameters.GetHistoryForContent,
|
|
@@ -424,6 +443,8 @@ export class Content {
|
|
|
424
443
|
* Returns the most recent update for a piece of content.
|
|
425
444
|
*
|
|
426
445
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.
|
|
446
|
+
*
|
|
447
|
+
* @deprecated Will be removed in next major version.
|
|
427
448
|
*/
|
|
428
449
|
async getHistoryForContent<T = Models.ContentHistory>(
|
|
429
450
|
parameters: Parameters.GetHistoryForContent,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import FormData from 'form-data';
|
|
3
3
|
import type * as Models from './models';
|
|
4
4
|
import type * as Parameters from './parameters';
|
|
5
|
-
import type { Callback } from '../callback';
|
|
6
5
|
import type { Client } from '../clients';
|
|
6
|
+
import type { Callback } from '../callback';
|
|
7
7
|
import type { RequestConfig } from '../requestConfig';
|
|
8
8
|
|
|
9
9
|
export class ContentAttachments {
|
|
@@ -16,6 +16,8 @@ export class ContentAttachments {
|
|
|
16
16
|
*
|
|
17
17
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
|
|
18
18
|
* content is a blog post, 'View' permission for the space is required.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated Will be removed in next major version.
|
|
19
21
|
*/
|
|
20
22
|
async getAttachments<T = Models.ContentArray<Models.Attachment>>(
|
|
21
23
|
parameters: Parameters.GetAttachments,
|
|
@@ -28,6 +30,8 @@ export class ContentAttachments {
|
|
|
28
30
|
*
|
|
29
31
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the
|
|
30
32
|
* content is a blog post, 'View' permission for the space is required.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Will be removed in next major version.
|
|
31
35
|
*/
|
|
32
36
|
async getAttachments<T = Models.ContentArray<Models.Attachment>>(
|
|
33
37
|
parameters: Parameters.GetAttachments,
|
|
@@ -273,6 +277,7 @@ export class ContentAttachments {
|
|
|
273
277
|
responseType: 'arraybuffer',
|
|
274
278
|
params: {
|
|
275
279
|
version: parameters.version,
|
|
280
|
+
status: parameters.status,
|
|
276
281
|
},
|
|
277
282
|
};
|
|
278
283
|
|