cloudflare
Version:
The official TypeScript library for the Cloudflare API
32 lines • 1.38 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { path } from "../../../internal/utils/path.mjs";
export var BaseReports = /* @__PURE__ */ (() => {
class BaseReports extends 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(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;
})();
export class Reports extends BaseReports {
}
//# sourceMappingURL=reports.mjs.map