cloudflare
Version:
The official TypeScript library for the Cloudflare API
37 lines • 1.65 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { V4PagePaginationArray } from "../../core/pagination.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseVersions = /* @__PURE__ */ (() => {
class BaseVersions extends APIResource {
/**
* Lists all deployed versions of a workflow.
*/
list(workflowName, params, options) {
const { account_id, ...query } = params;
return this._client.getAPIList(path `/accounts/${account_id}/workflows/${workflowName}/versions`, (V4PagePaginationArray), { query, ...options });
}
/**
* Retrieves details for a specific deployed workflow version.
*/
get(versionID, params, options) {
const { account_id, workflow_name } = params;
return this._client.get(path `/accounts/${account_id}/workflows/${workflow_name}/versions/${versionID}`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Retrieves the graph visualization of a workflow version.
*/
graph(versionID, params, options) {
const { account_id, workflow_name } = params;
return this._client.get(path `/accounts/${account_id}/workflows/${workflow_name}/versions/${versionID}/graph`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseVersions._key = Object.freeze([
'workflows',
'versions',
]);
return BaseVersions;
})();
export class Versions extends BaseVersions {
}
//# sourceMappingURL=versions.mjs.map