cloudflare
Version:
The official TypeScript library for the Cloudflare API
36 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 { V4PagePagination } from "../../../core/pagination.mjs";
import { path } from "../../../internal/utils/path.mjs";
export var BaseEmails = /* @__PURE__ */ (() => {
class BaseEmails extends APIResource {
/**
* List successful emails sent to the submitter of a report submitted by the
* account. Does not include emails sent to customers or hosts.
*
* @example
* ```ts
* // Automatically fetches more pages as needed.
* for await (const emailListResponse of client.abuseReports.submitted.emails.list(
* 'report_id',
* { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
* )) {
* // ...
* }
* ```
*/
list(reportID, params, options) {
const { account_id, ...query } = params;
return this._client.getAPIList(path `/accounts/${account_id}/abuse-reports/submitted/${reportID}/emails`, (V4PagePagination), { query, ...options });
}
}
BaseEmails._key = Object.freeze([
'abuseReports',
'submitted',
'emails',
]);
return BaseEmails;
})();
export class Emails extends BaseEmails {
}
//# sourceMappingURL=emails.mjs.map