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/api/users.ts
CHANGED
|
@@ -52,7 +52,7 @@ export class Users {
|
|
|
52
52
|
*/
|
|
53
53
|
async getAnonymousUser<T = Models.UserAnonymous>(
|
|
54
54
|
parameters: Parameters.GetAnonymousUser | undefined,
|
|
55
|
-
callback: Callback<T
|
|
55
|
+
callback: Callback<T>,
|
|
56
56
|
): Promise<void>;
|
|
57
57
|
/**
|
|
58
58
|
* Returns information about how anonymous users are represented, like the profile picture and display name.
|
|
@@ -62,7 +62,7 @@ export class Users {
|
|
|
62
62
|
*/
|
|
63
63
|
async getAnonymousUser<T = Models.UserAnonymous>(
|
|
64
64
|
parameters?: Parameters.GetAnonymousUser,
|
|
65
|
-
callback?: never
|
|
65
|
+
callback?: never,
|
|
66
66
|
): Promise<T>;
|
|
67
67
|
async getAnonymousUser<T = Models.UserAnonymous>(
|
|
68
68
|
parameters?: Parameters.GetAnonymousUser,
|
|
@@ -88,7 +88,7 @@ export class Users {
|
|
|
88
88
|
*/
|
|
89
89
|
async getCurrentUser<T = Models.User>(
|
|
90
90
|
parameters: Parameters.GetCurrentUser | undefined,
|
|
91
|
-
callback: Callback<T
|
|
91
|
+
callback: Callback<T>,
|
|
92
92
|
): Promise<void>;
|
|
93
93
|
/**
|
|
94
94
|
* Returns the currently logged-in user. This includes information about the user, like the display name, userKey,
|
|
@@ -121,7 +121,7 @@ export class Users {
|
|
|
121
121
|
*/
|
|
122
122
|
async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(
|
|
123
123
|
parameters: Parameters.GetGroupMembershipsForUser,
|
|
124
|
-
callback: Callback<T
|
|
124
|
+
callback: Callback<T>,
|
|
125
125
|
): Promise<void>;
|
|
126
126
|
/**
|
|
127
127
|
* Returns the groups that a user is a member of.
|
|
@@ -131,7 +131,7 @@ export class Users {
|
|
|
131
131
|
*/
|
|
132
132
|
async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(
|
|
133
133
|
parameters: Parameters.GetGroupMembershipsForUser,
|
|
134
|
-
callback?: never
|
|
134
|
+
callback?: never,
|
|
135
135
|
): Promise<T>;
|
|
136
136
|
async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(
|
|
137
137
|
parameters: Parameters.GetGroupMembershipsForUser,
|
|
@@ -160,7 +160,7 @@ export class Users {
|
|
|
160
160
|
*/
|
|
161
161
|
async getBulkUserLookup<T = Models.BulkUserLookupArray>(
|
|
162
162
|
parameters: Parameters.GetBulkUserLookup,
|
|
163
|
-
callback: Callback<T
|
|
163
|
+
callback: Callback<T>,
|
|
164
164
|
): Promise<void>;
|
|
165
165
|
/**
|
|
166
166
|
* Returns user details for the ids provided in request.
|
|
@@ -170,7 +170,7 @@ export class Users {
|
|
|
170
170
|
*/
|
|
171
171
|
async getBulkUserLookup<T = Models.BulkUserLookupArray>(
|
|
172
172
|
parameters: Parameters.GetBulkUserLookup,
|
|
173
|
-
callback?: never
|
|
173
|
+
callback?: never,
|
|
174
174
|
): Promise<T>;
|
|
175
175
|
async getBulkUserLookup<T = Models.BulkUserLookupArray>(
|
|
176
176
|
parameters: Parameters.GetBulkUserLookup,
|
|
@@ -198,7 +198,7 @@ export class Users {
|
|
|
198
198
|
*/
|
|
199
199
|
async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(
|
|
200
200
|
parameters: Parameters.GetPrivacyUnsafeUserEmail,
|
|
201
|
-
callback: Callback<T
|
|
201
|
+
callback: Callback<T>,
|
|
202
202
|
): Promise<void>;
|
|
203
203
|
/**
|
|
204
204
|
* Returns a user's email address. This API is only available to apps approved by Atlassian, according to these
|
|
@@ -209,7 +209,7 @@ export class Users {
|
|
|
209
209
|
*/
|
|
210
210
|
async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(
|
|
211
211
|
parameters: Parameters.GetPrivacyUnsafeUserEmail,
|
|
212
|
-
callback?: never
|
|
212
|
+
callback?: never,
|
|
213
213
|
): Promise<T>;
|
|
214
214
|
async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(
|
|
215
215
|
parameters: Parameters.GetPrivacyUnsafeUserEmail,
|
|
@@ -238,7 +238,7 @@ export class Users {
|
|
|
238
238
|
*/
|
|
239
239
|
async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(
|
|
240
240
|
parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,
|
|
241
|
-
callback: Callback<T
|
|
241
|
+
callback: Callback<T>,
|
|
242
242
|
): Promise<void>;
|
|
243
243
|
/**
|
|
244
244
|
* Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian,
|
|
@@ -252,7 +252,7 @@ export class Users {
|
|
|
252
252
|
*/
|
|
253
253
|
async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(
|
|
254
254
|
parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,
|
|
255
|
-
callback?: never
|
|
255
|
+
callback?: never,
|
|
256
256
|
): Promise<T>;
|
|
257
257
|
async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(
|
|
258
258
|
parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,
|
|
@@ -278,7 +278,7 @@ export class Users {
|
|
|
278
278
|
*/
|
|
279
279
|
async getBulkUserMigration<T = Models.MigratedUserArray>(
|
|
280
280
|
parameters: Parameters.GetBulkUserMigration,
|
|
281
|
-
callback: Callback<T
|
|
281
|
+
callback: Callback<T>,
|
|
282
282
|
): Promise<void>;
|
|
283
283
|
/**
|
|
284
284
|
* Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and
|
|
@@ -289,7 +289,7 @@ export class Users {
|
|
|
289
289
|
*/
|
|
290
290
|
async getBulkUserMigration<T = Models.MigratedUserArray>(
|
|
291
291
|
parameters: Parameters.GetBulkUserMigration,
|
|
292
|
-
callback?: never
|
|
292
|
+
callback?: never,
|
|
293
293
|
): Promise<T>;
|
|
294
294
|
async getBulkUserMigration<T = Models.MigratedUserArray>(
|
|
295
295
|
parameters: Parameters.GetBulkUserMigration,
|
|
@@ -11,9 +11,9 @@ const ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = 'no-check';
|
|
|
11
11
|
export class BaseClient implements Client {
|
|
12
12
|
#instance: AxiosInstance | undefined;
|
|
13
13
|
|
|
14
|
-
protected
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
constructor(protected readonly config: Config) {
|
|
15
|
+
this.config.apiPrefix = this.config.apiPrefix || '/wiki/rest/';
|
|
16
|
+
}
|
|
17
17
|
|
|
18
18
|
protected paramSerializer(parameters: Record<string, any>): string {
|
|
19
19
|
const parts: string[] = [];
|
|
@@ -72,7 +72,7 @@ export class BaseClient implements Client {
|
|
|
72
72
|
this.#instance = axios.create({
|
|
73
73
|
paramsSerializer: this.paramSerializer.bind(this),
|
|
74
74
|
...this.config.baseRequestConfig,
|
|
75
|
-
baseURL: `${this.config.host}${this.
|
|
75
|
+
baseURL: `${this.config.host}${this.config.apiPrefix}`,
|
|
76
76
|
headers: this.removeUndefinedProperties({
|
|
77
77
|
[ATLASSIAN_TOKEN_CHECK_FLAG]: this.config.noCheckAtlassianToken
|
|
78
78
|
? ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './baseClient';
|
|
2
|
+
import { Config } from '../config';
|
|
2
3
|
import {
|
|
3
4
|
Analytics,
|
|
4
5
|
Audit,
|
|
@@ -35,6 +36,13 @@ import {
|
|
|
35
36
|
} from '../api';
|
|
36
37
|
|
|
37
38
|
export class ConfluenceClient extends BaseClient {
|
|
39
|
+
constructor(config: Config) {
|
|
40
|
+
super({
|
|
41
|
+
...config,
|
|
42
|
+
apiPrefix: config.apiPrefix ?? '/wiki/rest',
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
analytics = new Analytics(this);
|
|
39
47
|
audit = new Audit(this);
|
|
40
48
|
content = new Content(this);
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { BaseClient } from './baseClient';
|
|
2
|
+
import { Config } from '../config';
|
|
2
3
|
import { Audit, Content, ContentBody, Group, LongTask, Search, Space, User } from '../server';
|
|
3
4
|
|
|
4
5
|
export class ServerClient extends BaseClient {
|
|
5
|
-
|
|
6
|
+
constructor(config: Config) {
|
|
7
|
+
super({
|
|
8
|
+
...config,
|
|
9
|
+
apiPrefix: config.apiPrefix ?? '/',
|
|
10
|
+
});
|
|
11
|
+
}
|
|
6
12
|
|
|
7
13
|
audit = new Audit(this);
|
|
8
14
|
content = new Content(this);
|
package/src/config.ts
CHANGED
|
@@ -9,12 +9,12 @@ export interface Config {
|
|
|
9
9
|
middlewares?: Config.Middlewares;
|
|
10
10
|
/** @deprecated Disabled. Will be removed in the next major version. */
|
|
11
11
|
telemetry?: Config.Telemetry;
|
|
12
|
-
/**
|
|
13
|
-
* Adds `'X-Atlassian-Token': 'no-check'` to each request header
|
|
14
|
-
*/
|
|
12
|
+
/** Adds `'X-Atlassian-Token': 'no-check'` to each request header */
|
|
15
13
|
noCheckAtlassianToken?: boolean;
|
|
16
14
|
/** Enable new API error handling. `false` by default. */
|
|
17
15
|
newErrorHandling?: boolean;
|
|
16
|
+
/** Prefix for all API routes. */
|
|
17
|
+
apiPrefix?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export namespace Config {
|
|
@@ -23,15 +23,20 @@ export namespace Config {
|
|
|
23
23
|
/** @deprecated Disabled. Will be removed in the next major version. */
|
|
24
24
|
export type Telemetry = boolean | any;
|
|
25
25
|
|
|
26
|
-
export type Authentication = UtilityTypes.
|
|
26
|
+
export type Authentication = UtilityTypes.XOR4<
|
|
27
|
+
{
|
|
27
28
|
jwt: Authentication.JWT;
|
|
28
|
-
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
29
31
|
personalAccessToken: Authentication.PersonalAccessToken;
|
|
30
|
-
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
31
34
|
basic: Authentication.Basic;
|
|
32
|
-
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
33
37
|
oauth2: Authentication.OAuth2;
|
|
34
|
-
}
|
|
38
|
+
}
|
|
39
|
+
>;
|
|
35
40
|
|
|
36
41
|
export interface Middlewares {
|
|
37
42
|
onError?: Config.Middlewares.OnErrorHandler;
|
|
@@ -55,13 +60,16 @@ export namespace Config {
|
|
|
55
60
|
expiryTimeSeconds?: number;
|
|
56
61
|
};
|
|
57
62
|
|
|
58
|
-
export type Basic = UtilityTypes.XOR<
|
|
63
|
+
export type Basic = UtilityTypes.XOR<
|
|
64
|
+
{
|
|
59
65
|
email: string;
|
|
60
66
|
apiToken: string;
|
|
61
|
-
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
62
69
|
username: string;
|
|
63
70
|
password: string;
|
|
64
|
-
}
|
|
71
|
+
}
|
|
72
|
+
>;
|
|
65
73
|
|
|
66
74
|
export type OAuth2 = {
|
|
67
75
|
accessToken: string;
|
package/src/server/audit.ts
CHANGED
|
@@ -11,12 +11,12 @@ export class Audit {
|
|
|
11
11
|
/** Fetch a paginated list of AuditRecord instances dating back to a certain time */
|
|
12
12
|
async getAuditRecords<T = Pagination<Models.AuditRecord>>(
|
|
13
13
|
parameters: Parameters.GetAuditRecords | undefined,
|
|
14
|
-
callback: Callback<T
|
|
14
|
+
callback: Callback<T>,
|
|
15
15
|
): Promise<void>;
|
|
16
16
|
/** Fetch a paginated list of AuditRecord instances dating back to a certain time */
|
|
17
17
|
async getAuditRecords<T = Pagination<Models.AuditRecord>>(
|
|
18
18
|
parameters?: Parameters.GetAuditRecords,
|
|
19
|
-
callback?: never
|
|
19
|
+
callback?: never,
|
|
20
20
|
): Promise<T>;
|
|
21
21
|
async getAuditRecords<T = Pagination<Models.AuditRecord>>(
|
|
22
22
|
parameters?: Parameters.GetAuditRecords,
|
|
@@ -40,12 +40,12 @@ export class Audit {
|
|
|
40
40
|
/** Creates a record in the audit log. */
|
|
41
41
|
async createAuditRecord<T = Models.AuditRecord>(
|
|
42
42
|
parameters: Parameters.CreateAuditRecord,
|
|
43
|
-
callback: Callback<T
|
|
43
|
+
callback: Callback<T>,
|
|
44
44
|
): Promise<void>;
|
|
45
45
|
/** Creates a record in the audit log. */
|
|
46
46
|
async createAuditRecord<T = Models.AuditRecord>(
|
|
47
47
|
parameters: Parameters.CreateAuditRecord,
|
|
48
|
-
callback?: never
|
|
48
|
+
callback?: never,
|
|
49
49
|
): Promise<T>;
|
|
50
50
|
async createAuditRecord<T = Models.AuditRecord>(
|
|
51
51
|
parameters: Parameters.CreateAuditRecord,
|
|
@@ -74,7 +74,7 @@ export class Audit {
|
|
|
74
74
|
/** Exports audit records as a CSV file or ZIP file. */
|
|
75
75
|
async exportAuditRecords<T = ArrayBuffer>(
|
|
76
76
|
parameters: Parameters.ExportAuditRecords | undefined,
|
|
77
|
-
callback: Callback<T
|
|
77
|
+
callback: Callback<T>,
|
|
78
78
|
): Promise<void>;
|
|
79
79
|
/** Exports audit records as a CSV file or ZIP file. */
|
|
80
80
|
async exportAuditRecords<T = ArrayBuffer>(parameters?: Parameters.ExportAuditRecords, callback?: never): Promise<T>;
|
|
@@ -112,12 +112,12 @@ export class Audit {
|
|
|
112
112
|
/** Set the retention period to a new value. Can throw ServiceException if the retention period is too long */
|
|
113
113
|
async setRetentionPeriod<T = Models.RetentionPeriod>(
|
|
114
114
|
parameters: Models.RetentionPeriod,
|
|
115
|
-
callback: Callback<T
|
|
115
|
+
callback: Callback<T>,
|
|
116
116
|
): Promise<void>;
|
|
117
117
|
/** Set the retention period to a new value. Can throw ServiceException if the retention period is too long */
|
|
118
118
|
async setRetentionPeriod<T = Models.RetentionPeriod>(
|
|
119
119
|
parameters: Models.RetentionPeriod,
|
|
120
|
-
callback?: never
|
|
120
|
+
callback?: never,
|
|
121
121
|
): Promise<T>;
|
|
122
122
|
async setRetentionPeriod<T = Models.RetentionPeriod>(
|
|
123
123
|
parameters: Models.RetentionPeriod,
|
|
@@ -138,12 +138,12 @@ export class Audit {
|
|
|
138
138
|
/** Fetch a paginated list of AuditRecord instances dating back to a certain time */
|
|
139
139
|
async getAuditRecordsForTimePeriod<T = Pagination<Models.AuditRecord>>(
|
|
140
140
|
parameters: Parameters.GetAuditRecordsSince | undefined,
|
|
141
|
-
callback: Callback<T
|
|
141
|
+
callback: Callback<T>,
|
|
142
142
|
): Promise<void>;
|
|
143
143
|
/** Fetch a paginated list of AuditRecord instances dating back to a certain time */
|
|
144
144
|
async getAuditRecordsForTimePeriod<T = Pagination<Models.AuditRecord>>(
|
|
145
145
|
parameters?: Parameters.GetAuditRecordsSince,
|
|
146
|
-
callback?: never
|
|
146
|
+
callback?: never,
|
|
147
147
|
): Promise<T>;
|
|
148
148
|
async getAuditRecordsForTimePeriod<T = Pagination<Models.AuditRecord>>(
|
|
149
149
|
parameters?: Parameters.GetAuditRecordsSince,
|