confluence.js 1.6.2 → 1.7.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/.prettierrc +8 -3
- package/CHANGELOG.md +8 -0
- package/README.md +16 -0
- package/out/api/models/addContentRestriction.d.ts +8 -3
- package/out/api/models/appDescriptor.d.ts +6 -3
- package/out/api/models/asyncContentBody.d.ts +2 -2
- package/out/api/models/attachment.d.ts +1 -0
- package/out/api/models/attachmentUpdate.d.ts +1 -1
- package/out/api/models/auditRecordCreate.d.ts +6 -2
- package/out/api/models/content.d.ts +2 -0
- package/out/api/models/contentBlueprintDraft.d.ts +2 -1
- package/out/api/models/contentCreate.d.ts +1 -0
- package/out/api/models/contentRestrictionUpdate.d.ts +8 -3
- package/out/api/models/contentTemplateUpdate.d.ts +4 -1
- package/out/api/models/contentUpdate.d.ts +1 -0
- package/out/api/models/labeledContentType.js +1 -1
- package/out/api/models/labeledContentType.js.map +1 -1
- package/out/api/models/lifecycle.d.ts +6 -2
- package/out/api/parameters/addLabelsToContent.d.ts +2 -1
- package/out/api/parameters/createContent.d.ts +12 -3
- package/out/api/parameters/createContent.js +13 -4
- package/out/api/parameters/createContent.js.map +1 -1
- package/out/api/parameters/createRelationship.d.ts +4 -1
- package/out/api/parameters/createUserProperty.d.ts +2 -2
- package/out/api/parameters/delete.d.ts +4 -1
- package/out/api/parameters/deleteRelationship.d.ts +8 -5
- package/out/api/parameters/deleteUserProperty.d.ts +2 -2
- package/out/api/parameters/findSourcesForTarget.d.ts +2 -1
- package/out/api/parameters/findTargetFromSource.d.ts +2 -1
- package/out/api/parameters/getAttachments.d.ts +12 -3
- package/out/api/parameters/getAttachments.js +13 -4
- package/out/api/parameters/getAttachments.js.map +1 -1
- package/out/api/parameters/getAvailableContentStates.d.ts +1 -1
- package/out/api/parameters/getContent.d.ts +16 -4
- package/out/api/parameters/getContent.js +13 -4
- package/out/api/parameters/getContent.js.map +1 -1
- package/out/api/parameters/getContentById.d.ts +12 -3
- package/out/api/parameters/getContentById.js +13 -4
- package/out/api/parameters/getContentById.js.map +1 -1
- package/out/api/parameters/getContentProperties.d.ts +4 -2
- package/out/api/parameters/getContentProperty.d.ts +10 -8
- package/out/api/parameters/getContentTemplates.d.ts +4 -1
- package/out/api/parameters/getContentVersion.d.ts +2 -1
- package/out/api/parameters/getContentVersions.d.ts +2 -1
- package/out/api/parameters/getDescendantsOfType.d.ts +12 -3
- package/out/api/parameters/getDescendantsOfType.js +13 -4
- package/out/api/parameters/getDescendantsOfType.js.map +1 -1
- package/out/api/parameters/getHistoryForContent.d.ts +2 -1
- package/out/api/parameters/getLabelsForContent.d.ts +2 -1
- package/out/api/parameters/getRelationship.d.ts +6 -2
- package/out/api/parameters/getSpaces.d.ts +10 -3
- package/out/api/parameters/removeGroupById.d.ts +2 -2
- package/out/api/parameters/removeGroupByName.d.ts +2 -2
- package/out/api/parameters/removeModules.d.ts +2 -1
- package/out/api/parameters/restoreContentVersion.d.ts +2 -1
- package/out/api/parameters/search.d.ts +2 -2
- package/out/api/parameters/updateAttachmentProperties.d.ts +15 -15
- package/out/api/parameters/updateUserProperty.d.ts +2 -2
- package/out/api/space.js +1 -0
- package/out/api/space.js.map +1 -1
- package/out/clients/baseClient.d.ts +0 -1
- package/out/clients/baseClient.js +2 -2
- package/out/clients/baseClient.js.map +1 -1
- package/out/clients/confluenceClient.d.ts +2 -0
- package/out/clients/confluenceClient.js +3 -2
- package/out/clients/confluenceClient.js.map +1 -1
- package/out/clients/serverClient.d.ts +2 -1
- package/out/clients/serverClient.js +3 -3
- package/out/clients/serverClient.js.map +1 -1
- package/out/config.d.ts +7 -7
- package/out/server/models/content.d.ts +2 -0
- package/out/server/parameters/createAuditRecord.d.ts +6 -2
- package/out/server/parameters/getAttachments.d.ts +12 -3
- package/out/server/parameters/getAttachments.js +13 -4
- package/out/server/parameters/getAttachments.js.map +1 -1
- package/out/services/authenticationService/authenticationService.js +1 -1
- package/out/services/authenticationService/authenticationService.js.map +1 -1
- package/out/services/authenticationService/authentications/createJWTAuthentication.js +1 -1
- package/out/services/authenticationService/authentications/createJWTAuthentication.js.map +1 -1
- package/out/services/authenticationService/base64Encoder.d.ts +1 -3
- package/out/services/authenticationService/base64Encoder.js +3 -5
- package/out/services/authenticationService/base64Encoder.js.map +1 -1
- package/out/utilityTypes.d.ts +5 -1
- package/package.json +20 -19
- package/src/api/audit.ts +9 -9
- package/src/api/content.ts +8 -8
- package/src/api/contentAttachments.ts +10 -10
- package/src/api/contentBody.ts +6 -6
- package/src/api/contentChildrenAndDescendants.ts +11 -11
- package/src/api/contentComments.ts +2 -2
- package/src/api/contentContentState.ts +10 -10
- package/src/api/contentLabels.ts +7 -7
- package/src/api/contentMacroBody.ts +6 -6
- package/src/api/contentPermissions.ts +4 -4
- package/src/api/contentProperties.ts +11 -11
- package/src/api/contentRestrictions.ts +26 -26
- package/src/api/contentStates.ts +12 -12
- package/src/api/contentVersions.ts +6 -6
- package/src/api/contentWatches.ts +11 -11
- package/src/api/dynamicModules.ts +1 -1
- package/src/api/experimental.ts +9 -9
- package/src/api/group.ts +18 -18
- package/src/api/inlineTasks.ts +1 -1
- package/src/api/labelInfo.ts +2 -2
- package/src/api/longRunningTask.ts +2 -2
- package/src/api/models/addContentRestriction.ts +8 -3
- package/src/api/models/appDescriptor.ts +6 -3
- package/src/api/models/asyncContentBody.ts +2 -2
- package/src/api/models/attachment.ts +1 -0
- package/src/api/models/attachmentContainer.ts +1 -1
- package/src/api/models/attachmentUpdate.ts +1 -1
- package/src/api/models/auditRecordCreate.ts +6 -2
- package/src/api/models/content.ts +2 -0
- package/src/api/models/contentBlueprintDraft.ts +2 -1
- package/src/api/models/contentCreate.ts +1 -0
- package/src/api/models/contentRestrictionUpdate.ts +8 -3
- package/src/api/models/contentTemplateUpdate.ts +4 -1
- package/src/api/models/contentUpdate.ts +1 -0
- package/src/api/models/lifecycle.ts +6 -2
- package/src/api/parameters/addLabelsToContent.ts +2 -1
- package/src/api/parameters/createContent.ts +12 -3
- package/src/api/parameters/createRelationship.ts +4 -1
- package/src/api/parameters/createUserProperty.ts +2 -2
- package/src/api/parameters/delete.ts +4 -1
- package/src/api/parameters/deleteRelationship.ts +8 -5
- package/src/api/parameters/deleteUserProperty.ts +2 -2
- package/src/api/parameters/findSourcesForTarget.ts +2 -1
- package/src/api/parameters/findTargetFromSource.ts +2 -1
- package/src/api/parameters/getAttachments.ts +12 -3
- package/src/api/parameters/getAvailableContentStates.ts +1 -1
- package/src/api/parameters/getContent.ts +16 -4
- package/src/api/parameters/getContentById.ts +12 -3
- package/src/api/parameters/getContentProperties.ts +4 -2
- package/src/api/parameters/getContentProperty.ts +10 -8
- package/src/api/parameters/getContentTemplates.ts +4 -1
- package/src/api/parameters/getContentVersion.ts +2 -1
- package/src/api/parameters/getContentVersions.ts +2 -1
- package/src/api/parameters/getDescendantsOfType.ts +12 -3
- package/src/api/parameters/getHistoryForContent.ts +2 -1
- package/src/api/parameters/getLabelsForContent.ts +2 -1
- package/src/api/parameters/getRelationship.ts +6 -2
- package/src/api/parameters/getSpaces.ts +10 -3
- package/src/api/parameters/removeGroupById.ts +2 -2
- package/src/api/parameters/removeGroupByName.ts +2 -2
- package/src/api/parameters/removeModules.ts +2 -1
- package/src/api/parameters/restoreContentVersion.ts +2 -1
- package/src/api/parameters/search.ts +2 -2
- package/src/api/parameters/updateAttachmentProperties.ts +15 -15
- package/src/api/parameters/updateUserProperty.ts +2 -2
- package/src/api/relation.ts +8 -8
- package/src/api/search.ts +7 -7
- package/src/api/settings.ts +12 -12
- package/src/api/space.ts +8 -7
- package/src/api/spacePermissions.ts +5 -5
- package/src/api/spaceProperties.ts +10 -10
- package/src/api/spaceSettings.ts +4 -4
- package/src/api/template.ts +10 -10
- package/src/api/themes.ts +1 -1
- package/src/api/users.ts +13 -13
- package/src/clients/baseClient.ts +4 -4
- package/src/clients/confluenceClient.ts +8 -0
- package/src/clients/serverClient.ts +7 -1
- package/src/config.ts +19 -11
- package/src/server/audit.ts +9 -9
- package/src/server/content.ts +49 -49
- package/src/server/contentBody.ts +2 -2
- package/src/server/group.ts +2 -2
- package/src/server/longTask.ts +1 -1
- package/src/server/models/content.ts +2 -0
- package/src/server/parameters/createAuditRecord.ts +6 -2
- package/src/server/parameters/getAttachments.ts +12 -3
- package/src/server/parameters/updateAttachmentData.ts +1 -1
- package/src/server/search.ts +2 -2
- package/src/server/space.ts +16 -16
- package/src/server/user.ts +7 -7
- package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -4
- package/src/services/authenticationService/base64Encoder.ts +5 -5
- package/src/utilityTypes.ts +7 -1
package/src/server/user.ts
CHANGED
|
@@ -42,7 +42,7 @@ export class User {
|
|
|
42
42
|
/** Get information about the current logged-in user. */
|
|
43
43
|
async getCurrentUser<T = Models.User>(
|
|
44
44
|
parameters: Parameters.GetCurrentUser | undefined,
|
|
45
|
-
callback: Callback<T
|
|
45
|
+
callback: Callback<T>,
|
|
46
46
|
): Promise<void>;
|
|
47
47
|
/** Get information about the current logged-in user. */
|
|
48
48
|
async getCurrentUser<T = Models.User>(parameters?: Parameters.GetCurrentUser, callback?: never): Promise<T>;
|
|
@@ -64,12 +64,12 @@ export class User {
|
|
|
64
64
|
/** Get a paginated collection of groups that the given user is a member of */
|
|
65
65
|
async getGroupMembershipsForUser<T = Pagination<Models.Group>>(
|
|
66
66
|
parameters: Parameters.GetGroups | undefined,
|
|
67
|
-
callback: Callback<T
|
|
67
|
+
callback: Callback<T>,
|
|
68
68
|
): Promise<void>;
|
|
69
69
|
/** Get a paginated collection of groups that the given user is a member of */
|
|
70
70
|
async getGroupMembershipsForUser<T = Pagination<Models.Group>>(
|
|
71
71
|
parameters?: Parameters.GetGroups,
|
|
72
|
-
callback?: never
|
|
72
|
+
callback?: never,
|
|
73
73
|
): Promise<T>;
|
|
74
74
|
async getGroupMembershipsForUser<T = Pagination<Models.Group>>(
|
|
75
75
|
parameters?: Parameters.GetGroups,
|
|
@@ -99,7 +99,7 @@ export class User {
|
|
|
99
99
|
*/
|
|
100
100
|
async getContentWatchStatus<T = Models.UserWatch>(
|
|
101
101
|
parameters: Parameters.GetContentWatchStatus,
|
|
102
|
-
callback: Callback<T
|
|
102
|
+
callback: Callback<T>,
|
|
103
103
|
): Promise<void>;
|
|
104
104
|
/**
|
|
105
105
|
* Get information about whether a user is watching a specified content.
|
|
@@ -110,7 +110,7 @@ export class User {
|
|
|
110
110
|
*/
|
|
111
111
|
async getContentWatchStatus<T = Models.UserWatch>(
|
|
112
112
|
parameters: Parameters.GetContentWatchStatus,
|
|
113
|
-
callback?: never
|
|
113
|
+
callback?: never,
|
|
114
114
|
): Promise<T>;
|
|
115
115
|
async getContentWatchStatus<T = Models.UserWatch>(
|
|
116
116
|
parameters: Parameters.GetContentWatchStatus,
|
|
@@ -169,7 +169,7 @@ export class User {
|
|
|
169
169
|
*/
|
|
170
170
|
async removeContentWatcher<T = void>(
|
|
171
171
|
parameters: Parameters.RemoveContentWatcher,
|
|
172
|
-
callback: Callback<T
|
|
172
|
+
callback: Callback<T>,
|
|
173
173
|
): Promise<void>;
|
|
174
174
|
/**
|
|
175
175
|
* Delete an existing watcher for the given user and content id.
|
|
@@ -204,7 +204,7 @@ export class User {
|
|
|
204
204
|
*/
|
|
205
205
|
async isWatchingSpace<T = Models.UserWatch>(
|
|
206
206
|
parameters: Parameters.IsWatchingSpace,
|
|
207
|
-
callback: Callback<T
|
|
207
|
+
callback: Callback<T>,
|
|
208
208
|
): Promise<void>;
|
|
209
209
|
/**
|
|
210
210
|
* Get information about whether a user is watching a specified space.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
/**
|
|
3
|
-
* @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html
|
|
4
|
-
*/
|
|
2
|
+
/** @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html */
|
|
5
3
|
|
|
6
4
|
export namespace Base64Encoder {
|
|
7
5
|
const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
@@ -16,7 +14,7 @@ export namespace Base64Encoder {
|
|
|
16
14
|
|
|
17
15
|
if (c < 128) {
|
|
18
16
|
utftext += String.fromCharCode(c);
|
|
19
|
-
} else if (
|
|
17
|
+
} else if (c > 127 && c < 2048) {
|
|
20
18
|
utftext += String.fromCharCode((c >> 6) | 192);
|
|
21
19
|
|
|
22
20
|
utftext += String.fromCharCode((c & 63) | 128);
|
|
@@ -61,7 +59,9 @@ export namespace Base64Encoder {
|
|
|
61
59
|
enc4 = 64;
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt(
|
|
62
|
+
output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt(
|
|
63
|
+
enc3,
|
|
64
|
+
)}${base64Sequence.charAt(enc4)}`;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
return output;
|
package/src/utilityTypes.ts
CHANGED
|
@@ -2,6 +2,12 @@ export namespace UtilityTypes {
|
|
|
2
2
|
/** Mark some properties which only the former including as optional and set the value to never */
|
|
3
3
|
export type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/** Get the XOR type which could make 2 types exclude each other */
|
|
6
6
|
export type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
|
7
|
+
|
|
8
|
+
/** Get the XOR type which could make 3 types exclude each other */
|
|
9
|
+
export type XOR3<T, U, V> = XOR<T, XOR<U, V>>;
|
|
10
|
+
|
|
11
|
+
/** Get the XOR type which could make 4 types exclude each other */
|
|
12
|
+
export type XOR4<T, U, V, W> = XOR<T, XOR3<U, V, W>>;
|
|
7
13
|
}
|