cloudflare
Version:
The official TypeScript library for the Cloudflare API
31 lines • 1.27 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 BaseLogs = /* @__PURE__ */ (() => {
class BaseLogs extends APIResource {
/**
* Retrieve the build logs for a Cloudflare Pages deployment.
*
* @example
* ```ts
* const log =
* await client.pages.projects.deployments.history.logs.get(
* 'f64788e9-fccd-4d4a-a28a-cb84f88f6e12',
* {
* account_id: '023e105f4ecef8ad9ca31a8372d0c353',
* project_name: 'this-is-my-project-01',
* },
* );
* ```
*/
get(deploymentID, params, options) {
const { account_id, project_name } = params;
return this._client.get(path `/accounts/${account_id}/pages/projects/${project_name}/deployments/${deploymentID}/history/logs`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseLogs._key = Object.freeze(['pages', 'projects', 'deployments', 'history', 'logs']);
return BaseLogs;
})();
export class Logs extends BaseLogs {
}
//# sourceMappingURL=logs.mjs.map