cloudflare
Version:
The official TypeScript library for the Cloudflare API
36 lines • 1.34 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 BaseImages = /* @__PURE__ */ (() => {
class BaseImages extends APIResource {
/**
* Idempotently starts or observes preparation of the runtime artifacts required to
* run one digest-pinned managed container image on Cloudflare's network. Returns
* 202 while durable preparation continues and 200 when the image is ready or
* preparation has reached a terminal error.
*
* @example
* ```ts
* const response = await client.containers.images.prepare({
* account_id: 'account-123',
* image: 'image',
* });
* ```
*/
prepare(params, options) {
const { account_id, ...body } = params;
return this._client.post(path `/accounts/${account_id}/containers/image-preparations`, {
body,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseImages._key = Object.freeze([
'containers',
'images',
]);
return BaseImages;
})();
export class Images extends BaseImages {
}
//# sourceMappingURL=images.mjs.map