confluence.js 1.2.2 → 1.4.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 +18 -0
- package/README.md +15 -57
- package/out/api/analytics.d.ts +16 -0
- package/out/api/analytics.js +34 -0
- package/out/api/audit.d.ts +1 -1
- package/out/api/audit.js +12 -12
- package/out/api/content.d.ts +1 -1
- package/out/api/content.js +20 -20
- package/out/api/contentAttachments.d.ts +3 -3
- package/out/api/contentAttachments.js +13 -12
- package/out/api/contentBody.d.ts +1 -1
- package/out/api/contentBody.js +2 -2
- package/out/api/contentChildrenAndDescendants.d.ts +3 -3
- package/out/api/contentChildrenAndDescendants.js +16 -15
- package/out/api/contentComments.d.ts +1 -1
- package/out/api/contentComments.js +2 -2
- package/out/api/contentContentState.d.ts +58 -0
- package/out/api/contentContentState.js +63 -0
- package/out/api/contentLabels.d.ts +1 -1
- package/out/api/contentLabels.js +8 -8
- package/out/api/contentMacroBody.d.ts +1 -1
- package/out/api/contentMacroBody.js +2 -2
- package/out/api/contentPermissions.d.ts +1 -1
- package/out/api/contentPermissions.js +3 -3
- package/out/api/contentProperties.d.ts +1 -1
- package/out/api/contentProperties.js +12 -12
- package/out/api/contentRestrictions.d.ts +1 -1
- package/out/api/contentRestrictions.js +30 -30
- package/out/api/contentVersions.d.ts +1 -1
- package/out/api/contentVersions.js +8 -8
- package/out/api/contentWatches.d.ts +1 -1
- package/out/api/contentWatches.js +24 -24
- package/out/api/dynamicModules.d.ts +1 -1
- package/out/api/dynamicModules.js +6 -6
- package/out/api/experimental.d.ts +123 -5
- package/out/api/experimental.js +65 -13
- package/out/api/group.d.ts +1 -1
- package/out/api/group.js +35 -32
- package/out/api/index.d.ts +2 -0
- package/out/api/index.js +31 -29
- package/out/api/inlineTasks.d.ts +1 -1
- package/out/api/inlineTasks.js +6 -6
- package/out/api/labelInfo.d.ts +1 -1
- package/out/api/labelInfo.js +2 -2
- package/out/api/longRunningTask.d.ts +1 -1
- package/out/api/longRunningTask.js +4 -4
- package/out/api/models/availableContentStates.d.ts +6 -0
- package/out/api/models/availableContentStates.js +2 -0
- package/out/api/models/blueprintTemplate.d.ts +1 -1
- package/out/api/models/bulkUserLookup.d.ts +2 -2
- package/out/api/models/content.d.ts +6 -6
- package/out/api/models/contentHistory.d.ts +2 -2
- package/out/api/models/contentLookAndFeel.d.ts +1 -1
- package/out/api/models/contentMetadata.d.ts +1 -1
- package/out/api/models/contentRestriction.d.ts +2 -2
- package/out/api/models/contentState.d.ts +8 -0
- package/out/api/models/contentState.js +2 -0
- package/out/api/models/contentStateContainer.d.ts +5 -0
- package/out/api/models/contentStateContainer.js +2 -0
- package/out/api/models/contentStateSettings.d.ts +11 -0
- package/out/api/models/contentStateSettings.js +2 -0
- package/out/api/models/contentTemplate.d.ts +1 -1
- package/out/api/models/copyPageHierarchyRequest.d.ts +2 -0
- package/out/api/models/copyPageRequest.d.ts +1 -1
- package/out/api/models/horizontalHeaderLookAndFeel.d.ts +1 -1
- package/out/api/models/index.d.ts +8 -0
- package/out/api/models/index.js +166 -158
- package/out/api/models/labelArray.d.ts +1 -1
- package/out/api/models/longTask.d.ts +8 -0
- package/out/api/models/longTask.js +2 -0
- package/out/api/models/longTaskStatusArray.d.ts +1 -1
- package/out/api/models/lookAndFeel.d.ts +2 -2
- package/out/api/models/migratedUserArray.d.ts +1 -1
- package/out/api/models/relation.d.ts +1 -1
- package/out/api/models/relationArray.d.ts +1 -1
- package/out/api/models/searchPageResponseSearchResult.d.ts +1 -1
- package/out/api/models/searchResult.d.ts +2 -2
- package/out/api/models/space.d.ts +4 -4
- package/out/api/models/spaceArray.d.ts +1 -1
- package/out/api/models/spacePermission.d.ts +1 -1
- package/out/api/models/spacePermissionCreate.d.ts +1 -1
- package/out/api/models/spacePermissionRequest.d.ts +1 -1
- package/out/api/models/spacePermissionV2.d.ts +1 -1
- package/out/api/models/spacePropertyArray.d.ts +1 -1
- package/out/api/models/spaceWatchArray.d.ts +1 -1
- package/out/api/models/themeArray.d.ts +1 -1
- package/out/api/models/user.d.ts +2 -2
- package/out/api/models/userAnonymous.d.ts +1 -1
- package/out/api/models/userProperty.d.ts +13 -0
- package/out/api/models/userProperty.js +2 -0
- package/out/api/models/userPropertyCreate.d.ts +4 -0
- package/out/api/models/userPropertyCreate.js +2 -0
- package/out/api/models/userPropertyKeyArray.d.ts +10 -0
- package/out/api/models/userPropertyKeyArray.js +2 -0
- package/out/api/models/userPropertyUpdate.d.ts +4 -0
- package/out/api/models/userPropertyUpdate.js +2 -0
- package/out/api/models/usersUserKeys.d.ts +1 -1
- package/out/api/models/version.d.ts +2 -2
- package/out/api/models/versionArray.d.ts +1 -1
- package/out/api/models/watchArray.d.ts +1 -1
- package/out/api/parameters/createUserProperty.d.ts +10 -0
- package/out/api/parameters/createUserProperty.js +2 -0
- package/out/api/parameters/deletePageTree.d.ts +4 -0
- package/out/api/parameters/deletePageTree.js +2 -0
- package/out/api/parameters/deleteUserProperty.d.ts +9 -0
- package/out/api/parameters/deleteUserProperty.js +2 -0
- package/out/api/parameters/getAvailableContentStates.d.ts +4 -0
- package/out/api/parameters/getAvailableContentStates.js +2 -0
- package/out/api/parameters/getContentState.d.ts +6 -0
- package/out/api/parameters/getContentState.js +2 -0
- package/out/api/parameters/getContentStateLastUpdated.d.ts +4 -0
- package/out/api/parameters/getContentStateLastUpdated.js +2 -0
- package/out/api/parameters/getContentStateSettings.d.ts +4 -0
- package/out/api/parameters/getContentStateSettings.js +2 -0
- package/out/api/parameters/getGroupMembersByGroupId.d.ts +5 -0
- package/out/api/parameters/getMembersByQueryParam.d.ts +5 -0
- package/out/api/parameters/getSpaces.d.ts +1 -1
- package/out/api/parameters/getUserProperties.d.ts +8 -0
- package/out/api/parameters/getUserProperties.js +2 -0
- package/out/api/parameters/getUserProperty.d.ts +6 -0
- package/out/api/parameters/getUserProperty.js +2 -0
- package/out/api/parameters/index.d.ts +12 -0
- package/out/api/parameters/index.js +170 -158
- package/out/api/parameters/removeContentState.d.ts +4 -0
- package/out/api/parameters/removeContentState.js +2 -0
- package/out/api/parameters/searchGroups.d.ts +5 -0
- package/out/api/parameters/setContentState.d.ts +8 -0
- package/out/api/parameters/setContentState.js +2 -0
- package/out/api/parameters/updateUserProperty.d.ts +10 -0
- package/out/api/parameters/updateUserProperty.js +2 -0
- package/out/api/relation.d.ts +1 -1
- package/out/api/relation.js +12 -12
- package/out/api/search.d.ts +3 -3
- package/out/api/search.js +7 -6
- package/out/api/settings.d.ts +5 -1
- package/out/api/settings.js +21 -12
- package/out/api/space.d.ts +1 -1
- package/out/api/space.js +21 -17
- package/out/api/spacePermissions.d.ts +1 -1
- package/out/api/spacePermissions.js +7 -7
- package/out/api/spaceProperties.d.ts +1 -1
- package/out/api/spaceProperties.js +12 -12
- package/out/api/spaceSettings.d.ts +1 -1
- package/out/api/spaceSettings.js +4 -4
- package/out/api/template.d.ts +1 -1
- package/out/api/template.js +12 -12
- package/out/api/themes.d.ts +1 -1
- package/out/api/themes.js +12 -12
- package/out/api/users.d.ts +3 -3
- package/out/api/users.js +16 -16
- package/out/clients/baseClient.d.ts +3 -6
- package/out/clients/baseClient.js +16 -38
- package/out/clients/client.d.ts +2 -3
- package/out/clients/confluenceClient.d.ts +3 -1
- package/out/clients/confluenceClient.js +2 -0
- package/out/clients/index.js +4 -4
- package/out/config.d.ts +8 -4
- package/out/index.js +4 -4
- package/out/paramSerializer.d.ts +1 -0
- package/out/paramSerializer.js +16 -0
- package/out/server/audit.d.ts +1 -1
- package/out/server/audit.js +6 -6
- package/out/server/content.d.ts +1 -1
- package/out/server/content.js +32 -32
- package/out/server/contentBody.d.ts +1 -1
- package/out/server/contentBody.js +1 -1
- package/out/server/group.d.ts +1 -1
- package/out/server/group.js +3 -3
- package/out/server/index.js +8 -8
- package/out/server/longTask.d.ts +1 -1
- package/out/server/longTask.js +2 -2
- package/out/server/models/content.d.ts +6 -6
- package/out/server/models/contentChildren.d.ts +1 -1
- package/out/server/models/contentHistory.d.ts +2 -2
- package/out/server/models/contentLookAndFeel.d.ts +1 -1
- package/out/server/models/contentRestriction.d.ts +2 -2
- package/out/server/models/index.js +60 -60
- package/out/server/models/lookAndFeel.d.ts +2 -2
- package/out/server/models/searchResult.d.ts +2 -2
- package/out/server/models/space.d.ts +3 -3
- package/out/server/models/spacePermission.d.ts +1 -1
- package/out/server/models/user.d.ts +1 -1
- package/out/server/models/version.d.ts +1 -1
- package/out/server/parameters/index.js +64 -64
- package/out/server/search.d.ts +1 -1
- package/out/server/search.js +1 -1
- package/out/server/space.d.ts +1 -1
- package/out/server/space.js +14 -14
- package/out/server/user.d.ts +1 -1
- package/out/server/user.js +10 -10
- package/out/services/authenticationService/authenticationService.js +4 -1
- package/out/services/authenticationService/authentications/createPATAuthenticationToken.d.ts +2 -0
- package/out/services/authenticationService/authentications/createPATAuthenticationToken.js +10 -0
- package/out/services/authenticationService/authentications/index.d.ts +1 -0
- package/out/services/authenticationService/authentications/index.js +4 -3
- package/out/services/authenticationService/index.js +1 -1
- package/package.json +30 -27
- package/src/api/analytics.ts +44 -0
- package/src/api/audit.ts +7 -7
- package/src/api/content.ts +11 -11
- package/src/api/contentAttachments.ts +11 -10
- package/src/api/contentBody.ts +2 -2
- package/src/api/contentChildrenAndDescendants.ts +15 -11
- package/src/api/contentComments.ts +2 -2
- package/src/api/contentContentState.ts +157 -0
- package/src/api/contentLabels.ts +5 -5
- package/src/api/contentMacroBody.ts +2 -2
- package/src/api/contentPermissions.ts +2 -2
- package/src/api/contentProperties.ts +7 -7
- package/src/api/contentRestrictions.ts +16 -16
- package/src/api/contentVersions.ts +5 -5
- package/src/api/contentWatches.ts +13 -13
- package/src/api/dynamicModules.ts +4 -4
- package/src/api/experimental.ts +216 -13
- package/src/api/group.ts +20 -16
- package/src/api/index.ts +2 -0
- package/src/api/inlineTasks.ts +4 -4
- package/src/api/labelInfo.ts +2 -2
- package/src/api/longRunningTask.ts +3 -3
- package/src/api/models/availableContentStates.ts +7 -0
- package/src/api/models/blueprintTemplate.ts +1 -1
- package/src/api/models/bulkUserLookup.ts +2 -2
- package/src/api/models/content.ts +6 -6
- package/src/api/models/contentHistory.ts +2 -2
- package/src/api/models/contentLookAndFeel.ts +1 -1
- package/src/api/models/contentMetadata.ts +1 -1
- package/src/api/models/contentRestriction.ts +2 -2
- package/src/api/models/contentState.ts +8 -0
- package/src/api/models/contentStateContainer.ts +6 -0
- package/src/api/models/contentStateSettings.ts +12 -0
- package/src/api/models/contentTemplate.ts +1 -1
- package/src/api/models/copyPageHierarchyRequest.ts +2 -0
- package/src/api/models/copyPageRequest.ts +1 -1
- package/src/api/models/horizontalHeaderLookAndFeel.ts +1 -1
- package/src/api/models/index.ts +8 -0
- package/src/api/models/labelArray.ts +1 -1
- package/src/api/models/longTask.ts +8 -0
- package/src/api/models/longTaskStatusArray.ts +1 -1
- package/src/api/models/lookAndFeel.ts +2 -2
- package/src/api/models/migratedUserArray.ts +1 -1
- package/src/api/models/relation.ts +1 -1
- package/src/api/models/relationArray.ts +1 -1
- package/src/api/models/searchPageResponseSearchResult.ts +1 -1
- package/src/api/models/searchResult.ts +2 -2
- package/src/api/models/space.ts +4 -4
- package/src/api/models/spaceArray.ts +1 -1
- package/src/api/models/spacePermission.ts +1 -1
- package/src/api/models/spacePermissionCreate.ts +1 -1
- package/src/api/models/spacePermissionRequest.ts +1 -1
- package/src/api/models/spacePermissionV2.ts +1 -1
- package/src/api/models/spacePropertyArray.ts +1 -1
- package/src/api/models/spaceWatchArray.ts +1 -1
- package/src/api/models/themeArray.ts +1 -1
- package/src/api/models/user.ts +2 -2
- package/src/api/models/userAnonymous.ts +1 -1
- package/src/api/models/userProperty.ts +14 -0
- package/src/api/models/userPropertyCreate.ts +4 -0
- package/src/api/models/userPropertyKeyArray.ts +11 -0
- package/src/api/models/userPropertyUpdate.ts +4 -0
- package/src/api/models/usersUserKeys.ts +1 -1
- package/src/api/models/version.ts +2 -2
- package/src/api/models/versionArray.ts +1 -1
- package/src/api/models/watchArray.ts +1 -1
- package/src/api/parameters/createUserProperty.ts +11 -0
- package/src/api/parameters/deletePageTree.ts +4 -0
- package/src/api/parameters/deleteUserProperty.ts +9 -0
- package/src/api/parameters/getAvailableContentStates.ts +4 -0
- package/src/api/parameters/getContentState.ts +6 -0
- package/src/api/parameters/getContentStateLastUpdated.ts +4 -0
- package/src/api/parameters/getContentStateSettings.ts +4 -0
- package/src/api/parameters/getGroupMembersByGroupId.ts +5 -0
- package/src/api/parameters/getMembersByQueryParam.ts +5 -0
- package/src/api/parameters/getSpaces.ts +31 -1
- package/src/api/parameters/getUserProperties.ts +8 -0
- package/src/api/parameters/getUserProperty.ts +6 -0
- package/src/api/parameters/index.ts +12 -0
- package/src/api/parameters/removeContentState.ts +4 -0
- package/src/api/parameters/searchGroups.ts +5 -0
- package/src/api/parameters/setContentState.ts +8 -0
- package/src/api/parameters/updateUserProperty.ts +11 -0
- package/src/api/relation.ts +6 -6
- package/src/api/search.ts +7 -5
- package/src/api/settings.ts +29 -7
- package/src/api/space.ts +14 -10
- package/src/api/spacePermissions.ts +4 -4
- package/src/api/spaceProperties.ts +7 -7
- package/src/api/spaceSettings.ts +3 -3
- package/src/api/template.ts +7 -7
- package/src/api/themes.ts +7 -7
- package/src/api/users.ts +12 -12
- package/src/clients/baseClient.ts +12 -64
- package/src/clients/client.ts +2 -3
- package/src/clients/confluenceClient.ts +4 -0
- package/src/config.ts +9 -4
- package/src/paramSerializer.ts +15 -0
- package/src/server/audit.ts +2 -2
- package/src/server/content.ts +2 -2
- package/src/server/contentBody.ts +1 -1
- package/src/server/group.ts +2 -2
- package/src/server/longTask.ts +2 -2
- package/src/server/models/content.ts +6 -6
- package/src/server/models/contentChildren.ts +1 -1
- package/src/server/models/contentHistory.ts +2 -2
- package/src/server/models/contentLookAndFeel.ts +1 -1
- package/src/server/models/contentRestriction.ts +2 -2
- package/src/server/models/lookAndFeel.ts +2 -2
- package/src/server/models/searchResult.ts +2 -2
- package/src/server/models/space.ts +3 -3
- package/src/server/models/spacePermission.ts +1 -1
- package/src/server/models/user.ts +1 -1
- package/src/server/models/version.ts +1 -1
- package/src/server/search.ts +2 -2
- package/src/server/space.ts +2 -2
- package/src/server/user.ts +2 -2
- package/src/services/authenticationService/authenticationService.ts +5 -0
- package/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts +1 -1
- package/src/services/authenticationService/authentications/createPATAuthenticationToken.ts +5 -0
- package/src/services/authenticationService/authentications/index.ts +1 -0
- package/tsconfig.lint.json +7 -0
package/src/api/content.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class Content {
|
|
@@ -49,7 +49,7 @@ export class Content {
|
|
|
49
49
|
},
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
return this.client.sendRequest(config, callback
|
|
52
|
+
return this.client.sendRequest(config, callback);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -99,7 +99,7 @@ export class Content {
|
|
|
99
99
|
},
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
-
return this.client.sendRequest(config, callback
|
|
102
|
+
return this.client.sendRequest(config, callback);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/**
|
|
@@ -138,7 +138,7 @@ export class Content {
|
|
|
138
138
|
},
|
|
139
139
|
};
|
|
140
140
|
|
|
141
|
-
return this.client.sendRequest(config, callback
|
|
141
|
+
return this.client.sendRequest(config, callback);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
/**
|
|
@@ -185,7 +185,7 @@ export class Content {
|
|
|
185
185
|
},
|
|
186
186
|
};
|
|
187
187
|
|
|
188
|
-
return this.client.sendRequest(config, callback
|
|
188
|
+
return this.client.sendRequest(config, callback);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
/**
|
|
@@ -230,7 +230,7 @@ export class Content {
|
|
|
230
230
|
},
|
|
231
231
|
};
|
|
232
232
|
|
|
233
|
-
return this.client.sendRequest(config, callback
|
|
233
|
+
return this.client.sendRequest(config, callback);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
/**
|
|
@@ -286,7 +286,7 @@ export class Content {
|
|
|
286
286
|
},
|
|
287
287
|
};
|
|
288
288
|
|
|
289
|
-
return this.client.sendRequest(config, callback
|
|
289
|
+
return this.client.sendRequest(config, callback);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
/**
|
|
@@ -323,7 +323,7 @@ export class Content {
|
|
|
323
323
|
},
|
|
324
324
|
};
|
|
325
325
|
|
|
326
|
-
return this.client.sendRequest(config, callback
|
|
326
|
+
return this.client.sendRequest(config, callback);
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
/**
|
|
@@ -365,7 +365,7 @@ export class Content {
|
|
|
365
365
|
},
|
|
366
366
|
};
|
|
367
367
|
|
|
368
|
-
return this.client.sendRequest(config, callback
|
|
368
|
+
return this.client.sendRequest(config, callback);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
/**
|
|
@@ -401,7 +401,7 @@ export class Content {
|
|
|
401
401
|
},
|
|
402
402
|
};
|
|
403
403
|
|
|
404
|
-
return this.client.sendRequest(config, callback
|
|
404
|
+
return this.client.sendRequest(config, callback);
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
/**
|
|
@@ -434,6 +434,6 @@ export class Content {
|
|
|
434
434
|
},
|
|
435
435
|
};
|
|
436
436
|
|
|
437
|
-
return this.client.sendRequest(config, callback
|
|
437
|
+
return this.client.sendRequest(config, callback);
|
|
438
438
|
}
|
|
439
439
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentAttachments {
|
|
@@ -44,7 +44,7 @@ export class ContentAttachments {
|
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
return this.client.sendRequest(config, callback
|
|
47
|
+
return this.client.sendRequest(config, callback);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -136,7 +136,7 @@ export class ContentAttachments {
|
|
|
136
136
|
},
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
return this.client.sendRequest(config, callback
|
|
139
|
+
return this.client.sendRequest(config, callback);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
/**
|
|
@@ -230,7 +230,7 @@ export class ContentAttachments {
|
|
|
230
230
|
},
|
|
231
231
|
};
|
|
232
232
|
|
|
233
|
-
return this.client.sendRequest(config, callback
|
|
233
|
+
return this.client.sendRequest(config, callback);
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
/**
|
|
@@ -263,7 +263,7 @@ export class ContentAttachments {
|
|
|
263
263
|
data: parameters.body,
|
|
264
264
|
};
|
|
265
265
|
|
|
266
|
-
return this.client.sendRequest(config, callback
|
|
266
|
+
return this.client.sendRequest(config, callback);
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
/**
|
|
@@ -358,28 +358,29 @@ export class ContentAttachments {
|
|
|
358
358
|
},
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
-
return this.client.sendRequest(config, callback
|
|
361
|
+
return this.client.sendRequest(config, callback);
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
/** Redirects the client to a URL that serves an attachment's binary data. */
|
|
365
|
-
async downloadAttachment<T =
|
|
365
|
+
async downloadAttachment<T = ArrayBuffer>(
|
|
366
366
|
parameters: Parameters.DownloadAttachment,
|
|
367
367
|
callback: Callback<T>
|
|
368
368
|
): Promise<void>;
|
|
369
369
|
/** Redirects the client to a URL that serves an attachment's binary data. */
|
|
370
|
-
async downloadAttachment<T =
|
|
371
|
-
async downloadAttachment<T =
|
|
370
|
+
async downloadAttachment<T = ArrayBuffer>(parameters: Parameters.DownloadAttachment, callback?: never): Promise<T>;
|
|
371
|
+
async downloadAttachment<T = ArrayBuffer>(
|
|
372
372
|
parameters: Parameters.DownloadAttachment,
|
|
373
373
|
callback?: Callback<T>,
|
|
374
374
|
): Promise<void | T> {
|
|
375
375
|
const config: RequestConfig = {
|
|
376
376
|
url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/download`,
|
|
377
377
|
method: 'GET',
|
|
378
|
+
responseType: 'arraybuffer',
|
|
378
379
|
params: {
|
|
379
380
|
version: parameters.version,
|
|
380
381
|
},
|
|
381
382
|
};
|
|
382
383
|
|
|
383
|
-
return this.client.sendRequest(config, callback
|
|
384
|
+
return this.client.sendRequest(config, callback);
|
|
384
385
|
}
|
|
385
386
|
}
|
package/src/api/contentBody.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentBody {
|
|
@@ -61,6 +61,6 @@ export class ContentBody {
|
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
return this.client.sendRequest(config, callback
|
|
64
|
+
return this.client.sendRequest(config, callback);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentChildrenAndDescendants {
|
|
@@ -64,7 +64,7 @@ export class ContentChildrenAndDescendants {
|
|
|
64
64
|
},
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
return this.client.sendRequest(config, callback
|
|
67
|
+
return this.client.sendRequest(config, callback);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
/**
|
|
@@ -97,7 +97,7 @@ export class ContentChildrenAndDescendants {
|
|
|
97
97
|
method: 'PUT',
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
return this.client.sendRequest(config, callback
|
|
100
|
+
return this.client.sendRequest(config, callback);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
@@ -156,7 +156,7 @@ export class ContentChildrenAndDescendants {
|
|
|
156
156
|
},
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
return this.client.sendRequest(config, callback
|
|
159
|
+
return this.client.sendRequest(config, callback);
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
/**
|
|
@@ -215,7 +215,7 @@ export class ContentChildrenAndDescendants {
|
|
|
215
215
|
},
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
-
return this.client.sendRequest(config, callback
|
|
218
|
+
return this.client.sendRequest(config, callback);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/** @deprecated This API will be removed in the next major version. Use `getDescendantsOfType` method instead. */
|
|
@@ -292,7 +292,7 @@ export class ContentChildrenAndDescendants {
|
|
|
292
292
|
},
|
|
293
293
|
};
|
|
294
294
|
|
|
295
|
-
return this.client.sendRequest(config, callback
|
|
295
|
+
return this.client.sendRequest(config, callback);
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
/**
|
|
@@ -302,7 +302,10 @@ export class ContentChildrenAndDescendants {
|
|
|
302
302
|
* of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the
|
|
303
303
|
* copied page titles.
|
|
304
304
|
*/
|
|
305
|
-
async copyPageHierarchy<T =
|
|
305
|
+
async copyPageHierarchy<T = Models.LongTask>(
|
|
306
|
+
parameters: Parameters.CopyPageHierarchy,
|
|
307
|
+
callback: Callback<T>
|
|
308
|
+
): Promise<void>;
|
|
306
309
|
/**
|
|
307
310
|
* Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions
|
|
308
311
|
* and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this
|
|
@@ -310,8 +313,8 @@ export class ContentChildrenAndDescendants {
|
|
|
310
313
|
* of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the
|
|
311
314
|
* copied page titles.
|
|
312
315
|
*/
|
|
313
|
-
async copyPageHierarchy<T =
|
|
314
|
-
async copyPageHierarchy<T =
|
|
316
|
+
async copyPageHierarchy<T = Models.LongTask>(parameters: Parameters.CopyPageHierarchy, callback?: never): Promise<T>;
|
|
317
|
+
async copyPageHierarchy<T = Models.LongTask>(
|
|
315
318
|
parameters: Parameters.CopyPageHierarchy,
|
|
316
319
|
callback?: Callback<T>,
|
|
317
320
|
): Promise<void | T> {
|
|
@@ -324,12 +327,13 @@ export class ContentChildrenAndDescendants {
|
|
|
324
327
|
copyProperties: parameters.copyProperties,
|
|
325
328
|
copyLabels: parameters.copyLabels,
|
|
326
329
|
copyCustomContents: parameters.copyCustomContents,
|
|
330
|
+
copyDescendants: parameters.copyDescendants,
|
|
327
331
|
destinationPageId: parameters.destinationPageId,
|
|
328
332
|
titleOptions: parameters.titleOptions,
|
|
329
333
|
},
|
|
330
334
|
};
|
|
331
335
|
|
|
332
|
-
return this.client.sendRequest(config, callback
|
|
336
|
+
return this.client.sendRequest(config, callback);
|
|
333
337
|
}
|
|
334
338
|
|
|
335
339
|
/**
|
|
@@ -372,6 +376,6 @@ export class ContentChildrenAndDescendants {
|
|
|
372
376
|
data: parameters.bodyParameters,
|
|
373
377
|
};
|
|
374
378
|
|
|
375
|
-
return this.client.sendRequest(config, callback
|
|
379
|
+
return this.client.sendRequest(config, callback);
|
|
376
380
|
}
|
|
377
381
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentComments {
|
|
@@ -43,6 +43,6 @@ export class ContentComments {
|
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
return this.client.sendRequest(config, callback
|
|
46
|
+
return this.client.sendRequest(config, callback);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import * as Models from './models';
|
|
2
|
+
import * as Parameters from './parameters';
|
|
3
|
+
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
|
+
import { RequestConfig } from '../requestConfig';
|
|
6
|
+
|
|
7
|
+
export class ContentContentState {
|
|
8
|
+
constructor(private client: Client) {}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Gets the current page status of the draft or published version of content. To specify the draft version, set the
|
|
12
|
+
* parameter status to PUBLISHED, otherwise DRAFT.
|
|
13
|
+
*/
|
|
14
|
+
async getContentState<T = Models.ContentStateContainer>(
|
|
15
|
+
parameters: Parameters.GetContentState,
|
|
16
|
+
callback: Callback<T>
|
|
17
|
+
): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the current page status of the draft or published version of content. To specify the draft version, set the
|
|
20
|
+
* parameter status to PUBLISHED, otherwise DRAFT.
|
|
21
|
+
*/
|
|
22
|
+
async getContentState<T = Models.ContentStateContainer>(
|
|
23
|
+
parameters: Parameters.GetContentState,
|
|
24
|
+
callback?: never
|
|
25
|
+
): Promise<T>;
|
|
26
|
+
async getContentState<T = Models.ContentStateContainer>(
|
|
27
|
+
parameters: Parameters.GetContentState,
|
|
28
|
+
callback?: Callback<T>,
|
|
29
|
+
): Promise<void | T> {
|
|
30
|
+
const config: RequestConfig = {
|
|
31
|
+
url: `/api/content/${parameters.contentId}/state`,
|
|
32
|
+
method: 'GET',
|
|
33
|
+
params: {
|
|
34
|
+
designation: parameters.designation,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return this.client.sendRequest(config, callback);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Sets the content state of the content specified and creates a new version (publishes the content without changing
|
|
43
|
+
* the body) of the content with the new status. The desired type of status must be allowed. There are space suggested
|
|
44
|
+
* statuses and custom statuses. To specify the desired new status, one can use the id of the status or the name and
|
|
45
|
+
* color of the status. If contentStateId is defined, then name and color are ignored. If contentStateId is not
|
|
46
|
+
* defined, name and color will be used if provided. Firstly, we will determine if a status of this name and color
|
|
47
|
+
* exists, and if it does, that this status is used. If it does not exist, and custom statuses are allowed, a custom
|
|
48
|
+
* status with this name and color will be created. Color can be specified in traditional english colors (teal,
|
|
49
|
+
* magenta, lavender, etc.) or as a hex string ex: #0ff0Fd.
|
|
50
|
+
*/
|
|
51
|
+
async setContentState<T = Models.ContentStateContainer>(
|
|
52
|
+
parameters: Parameters.SetContentState,
|
|
53
|
+
callback: Callback<T>
|
|
54
|
+
): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the content state of the content specified and creates a new version (publishes the content without changing
|
|
57
|
+
* the body) of the content with the new status. The desired type of status must be allowed. There are space suggested
|
|
58
|
+
* statuses and custom statuses. To specify the desired new status, one can use the id of the status or the name and
|
|
59
|
+
* color of the status. If contentStateId is defined, then name and color are ignored. If contentStateId is not
|
|
60
|
+
* defined, name and color will be used if provided. Firstly, we will determine if a status of this name and color
|
|
61
|
+
* exists, and if it does, that this status is used. If it does not exist, and custom statuses are allowed, a custom
|
|
62
|
+
* status with this name and color will be created. Color can be specified in traditional english colors (teal,
|
|
63
|
+
* magenta, lavender, etc.) or as a hex string ex: #0ff0Fd.
|
|
64
|
+
*/
|
|
65
|
+
async setContentState<T = Models.ContentStateContainer>(
|
|
66
|
+
parameters: Parameters.SetContentState,
|
|
67
|
+
callback?: never
|
|
68
|
+
): Promise<T>;
|
|
69
|
+
async setContentState<T = Models.ContentStateContainer>(
|
|
70
|
+
parameters: Parameters.SetContentState,
|
|
71
|
+
callback?: Callback<T>,
|
|
72
|
+
): Promise<void | T> {
|
|
73
|
+
const config: RequestConfig = {
|
|
74
|
+
url: `/api/content/${parameters.contentId}/state`,
|
|
75
|
+
method: 'PUT',
|
|
76
|
+
params: {
|
|
77
|
+
contentStateId: parameters.contentStateId,
|
|
78
|
+
name: parameters.name,
|
|
79
|
+
color: parameters.color,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return this.client.sendRequest(config, callback);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Removes the content state of the content specified and creates a new version (publishes the content without
|
|
88
|
+
* changing the body) of the content with the new status.
|
|
89
|
+
*/
|
|
90
|
+
async removeContentState<T = Models.ContentStateContainer>(
|
|
91
|
+
parameters: Parameters.RemoveContentState,
|
|
92
|
+
callback: Callback<T>
|
|
93
|
+
): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Removes the content state of the content specified and creates a new version (publishes the content without
|
|
96
|
+
* changing the body) of the content with the new status.
|
|
97
|
+
*/
|
|
98
|
+
async removeContentState<T = Models.ContentStateContainer>(
|
|
99
|
+
parameters: Parameters.RemoveContentState,
|
|
100
|
+
callback?: never
|
|
101
|
+
): Promise<T>;
|
|
102
|
+
async removeContentState<T = Models.ContentStateContainer>(
|
|
103
|
+
parameters: Parameters.RemoveContentState,
|
|
104
|
+
callback?: Callback<T>,
|
|
105
|
+
): Promise<void | T> {
|
|
106
|
+
const config: RequestConfig = {
|
|
107
|
+
url: `/api/content/${parameters.contentId}/state`,
|
|
108
|
+
method: 'DELETE',
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
return this.client.sendRequest(config, callback);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Gets a Global Timestamp of the last time the content state was updated */
|
|
115
|
+
async getContentStateLastUpdated<T = unknown>(
|
|
116
|
+
parameters: Parameters.GetContentStateLastUpdated,
|
|
117
|
+
callback: Callback<T>
|
|
118
|
+
): Promise<void>;
|
|
119
|
+
/** Gets a Global Timestamp of the last time the content state was updated */
|
|
120
|
+
async getContentStateLastUpdated<T = unknown>(
|
|
121
|
+
parameters: Parameters.GetContentStateLastUpdated,
|
|
122
|
+
callback?: never
|
|
123
|
+
): Promise<T>;
|
|
124
|
+
async getContentStateLastUpdated<T = unknown>(
|
|
125
|
+
parameters: Parameters.GetContentStateLastUpdated,
|
|
126
|
+
callback?: Callback<T>,
|
|
127
|
+
): Promise<void | T> {
|
|
128
|
+
const config: RequestConfig = {
|
|
129
|
+
url: `/api/content/${parameters.contentId}/state/last-updated`,
|
|
130
|
+
method: 'GET',
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
return this.client.sendRequest(config, callback);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Gets content states that are available for the content to be set as. */
|
|
137
|
+
async getAvailableContentStates<T = Models.AvailableContentStates>(
|
|
138
|
+
parameters: Parameters.GetAvailableContentStates,
|
|
139
|
+
callback: Callback<T>
|
|
140
|
+
): Promise<void>;
|
|
141
|
+
/** Gets content states that are available for the content to be set as. */
|
|
142
|
+
async getAvailableContentStates<T = Models.AvailableContentStates>(
|
|
143
|
+
parameters: Parameters.GetAvailableContentStates,
|
|
144
|
+
callback?: never
|
|
145
|
+
): Promise<T>;
|
|
146
|
+
async getAvailableContentStates<T = Models.AvailableContentStates>(
|
|
147
|
+
parameters: Parameters.GetAvailableContentStates,
|
|
148
|
+
callback?: Callback<T>,
|
|
149
|
+
): Promise<void | T> {
|
|
150
|
+
const config: RequestConfig = {
|
|
151
|
+
url: `/api/content/${parameters.contentId}/state/available-states`,
|
|
152
|
+
method: 'GET',
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
return this.client.sendRequest(config, callback);
|
|
156
|
+
}
|
|
157
|
+
}
|
package/src/api/contentLabels.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentLabels {
|
|
@@ -41,7 +41,7 @@ export class ContentLabels {
|
|
|
41
41
|
},
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
return this.client.sendRequest(config, callback
|
|
44
|
+
return this.client.sendRequest(config, callback);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -87,7 +87,7 @@ export class ContentLabels {
|
|
|
87
87
|
data: parameters.body,
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
return this.client.sendRequest(config, callback
|
|
90
|
+
return this.client.sendRequest(config, callback);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
@@ -128,7 +128,7 @@ export class ContentLabels {
|
|
|
128
128
|
},
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
return this.client.sendRequest(config, callback
|
|
131
|
+
return this.client.sendRequest(config, callback);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
/**
|
|
@@ -165,6 +165,6 @@ export class ContentLabels {
|
|
|
165
165
|
method: 'DELETE',
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
return this.client.sendRequest(config, callback
|
|
168
|
+
return this.client.sendRequest(config, callback);
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentMacroBody {
|
|
@@ -54,6 +54,6 @@ export class ContentMacroBody {
|
|
|
54
54
|
method: 'GET',
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
return this.client.sendRequest(config, callback
|
|
57
|
+
return this.client.sendRequest(config, callback);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentPermissions {
|
|
@@ -73,6 +73,6 @@ export class ContentPermissions {
|
|
|
73
73
|
},
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
return this.client.sendRequest(config, callback
|
|
76
|
+
return this.client.sendRequest(config, callback);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Models from './models';
|
|
2
2
|
import * as Parameters from './parameters';
|
|
3
|
-
import { Client } from '../clients';
|
|
4
3
|
import { Callback } from '../callback';
|
|
4
|
+
import { Client } from '../clients';
|
|
5
5
|
import { RequestConfig } from '../requestConfig';
|
|
6
6
|
|
|
7
7
|
export class ContentProperties {
|
|
@@ -44,7 +44,7 @@ export class ContentProperties {
|
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
return this.client.sendRequest(config, callback
|
|
47
|
+
return this.client.sendRequest(config, callback);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -92,7 +92,7 @@ export class ContentProperties {
|
|
|
92
92
|
},
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
return this.client.sendRequest(config, callback
|
|
95
|
+
return this.client.sendRequest(config, callback);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
@@ -130,7 +130,7 @@ export class ContentProperties {
|
|
|
130
130
|
},
|
|
131
131
|
};
|
|
132
132
|
|
|
133
|
-
return this.client.sendRequest(config, callback
|
|
133
|
+
return this.client.sendRequest(config, callback);
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
@@ -177,7 +177,7 @@ export class ContentProperties {
|
|
|
177
177
|
},
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
return this.client.sendRequest(config, callback
|
|
180
|
+
return this.client.sendRequest(config, callback);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
/**
|
|
@@ -215,7 +215,7 @@ export class ContentProperties {
|
|
|
215
215
|
},
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
-
return this.client.sendRequest(config, callback
|
|
218
|
+
return this.client.sendRequest(config, callback);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/**
|
|
@@ -244,6 +244,6 @@ export class ContentProperties {
|
|
|
244
244
|
method: 'DELETE',
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
return this.client.sendRequest(config, callback
|
|
247
|
+
return this.client.sendRequest(config, callback);
|
|
248
248
|
}
|
|
249
249
|
}
|