cloudflare
Version:
The official TypeScript library for the Cloudflare API
37 lines • 1.57 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Reports = exports.BaseReports = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
const path_1 = require("../../../internal/utils/path.js");
var BaseReports = /* @__PURE__ */ (() => {
class BaseReports extends resource_1.APIResource {
/**
* Gets the repository projection of the active operator-reviewed scan report.
* `scan_id` is the customer scan's stable request ID.
*
* @example
* ```ts
* const report =
* await client.managedDefense.vulnerabilityDiscovery.reports.get(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* {
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* repo_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* },
* );
* ```
*/
get(scanID, params, options) {
const { account_id, repo_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/managed-defense/vulnerability-discovery/repos/${repo_id}/scans/${scanID}/report`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseReports._key = Object.freeze(['managedDefense', 'vulnerabilityDiscovery', 'reports']);
return BaseReports;
})();
exports.BaseReports = BaseReports;
class Reports extends BaseReports {
}
exports.Reports = Reports;
//# sourceMappingURL=reports.js.map