@itwin/insights-client
Version:
Insights client for the iTwin platform
33 lines • 1.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuditTrailClient = void 0;
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
const OperationsBase_1 = require("../../common/OperationsBase");
class AuditTrailClient extends OperationsBase_1.OperationsBase {
constructor(basePath) {
super(basePath ?? OperationsBase_1.GROUPING_AND_MAPPING_BASE_PATH);
}
async getAuditTrail(accessToken, iModelId, path, after, before, top) {
let url = `${this.basePath}/audit?iModelId=${iModelId}`;
if (path) {
url += `&path=${path}`;
}
if (after) {
url += `&after=${after}`;
}
if (before) {
url += `&before=${before}`;
}
if (top) {
url += `&$top=${top}`;
}
const request = this.createRequest("GET", accessToken);
const response = await this.fetchJSON(url, request);
return response;
}
}
exports.AuditTrailClient = AuditTrailClient;
//# sourceMappingURL=AuditTrailClient.js.map