UNPKG

@camunda8/sdk

Version:

[![NPM](https://nodei.co/npm/@camunda8/sdk.png)](https://www.npmjs.com/package/@camunda8/sdk)

29 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ReportResults = void 0; class ReportResults { constructor({ getHeaders, rest, limit, reportId, paginationTimeout, }) { this.getHeaders = getHeaders; this.rest = rest; this.reportId = reportId; this.limit = limit; this.paginationTimeout = paginationTimeout; } next() { return this.getResultsPage(); } async getResultsPage() { const headers = await this.getHeaders(); const sreqId = this.searchRequestId ? `&searchRequestId=${this.searchRequestId}` : ''; const rest = await this.rest; const result = await rest(`export/report/${this.reportId}/result/json?paginationTimeout=${this.paginationTimeout}&limit=${this.limit}${sreqId}`, { headers, }).json(); this.searchRequestId = result.searchRequestId; return result; } } exports.ReportResults = ReportResults; //# sourceMappingURL=ReportResults.js.map