cloudflare
Version:
The official TypeScript library for the Cloudflare API
29 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 { SinglePage } from "../../../core/pagination.mjs";
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
import { path } from "../../../internal/utils/path.mjs";
export var BaseToMarkdown = /* @__PURE__ */ (() => {
class BaseToMarkdown extends APIResource {
/**
* Converts files uploaded as multipart form data into Markdown using Workers AI.
* Returns a conversion result for each file. Use the supported-formats endpoint to
* check accepted file types.
*
* @deprecated Use [AI > To Markdown](https://developers.cloudflare.com/api/resources/ai/subresources/to_markdown/) instead.
*/
create(params, options) {
const { account_id, ...body } = params;
return this._client.getAPIList(path `/accounts/${account_id}/ai/tomarkdown`, (SinglePage), multipartFormRequestOptions({ body, method: 'post', ...options }, this._client));
}
}
BaseToMarkdown._key = Object.freeze([
'radar',
'ai',
'toMarkdown',
]);
return BaseToMarkdown;
})();
export class ToMarkdown extends BaseToMarkdown {
}
//# sourceMappingURL=to-markdown.mjs.map