cloudflare
Version:
The official TypeScript library for the Cloudflare API
66 lines • 2.61 kB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import * as ConfigAPI from "./config.mjs";
import { BaseConfig, Config } from "./config.mjs";
import * as DefaultAPI from "./default.mjs";
import { BaseDefault, Default } from "./default.mjs";
import * as ExportAPI from "./export.mjs";
import { BaseExport, Export } from "./export.mjs";
import * as PublishAPI from "./publish.mjs";
import { BasePublish, Publish } from "./publish.mjs";
import * as WorkflowAPI from "./workflow.mjs";
import { BaseWorkflowResource, WorkflowResource } from "./workflow.mjs";
import * as HistoryAPI from "./history/history.mjs";
import { BaseHistory, History, } from "./history/history.mjs";
import { path } from "../../internal/utils/path.mjs";
export var BaseZaraz = /* @__PURE__ */ (() => {
class BaseZaraz extends APIResource {
/**
* Updates Zaraz workflow for a zone.
*
* @example
* ```ts
* const workflow = await client.zaraz.update({
* zone_id: '023e105f4ecef8ad9ca31a8372d0c353',
* workflow: 'realtime',
* });
* ```
*/
update(params, options) {
const { zone_id, workflow } = params;
return this._client.put(path `/zones/${zone_id}/settings/zaraz/workflow`, {
body: workflow,
...options,
})._thenUnwrap((obj) => obj.result);
}
}
BaseZaraz._key = Object.freeze(['zaraz']);
return BaseZaraz;
})();
export var Zaraz = /* @__PURE__ */ (() => {
class Zaraz extends BaseZaraz {
constructor() {
super(...arguments);
this.config = new ConfigAPI.Config(this._client);
this.default = new DefaultAPI.Default(this._client);
this.export = new ExportAPI.Export(this._client);
this.history = new HistoryAPI.History(this._client);
this.publish = new PublishAPI.Publish(this._client);
this.workflow = new WorkflowAPI.WorkflowResource(this._client);
}
}
Zaraz.Config = Config;
Zaraz.BaseConfig = BaseConfig;
Zaraz.Default = Default;
Zaraz.BaseDefault = BaseDefault;
Zaraz.Export = Export;
Zaraz.BaseExport = BaseExport;
Zaraz.History = History;
Zaraz.BaseHistory = BaseHistory;
Zaraz.Publish = Publish;
Zaraz.BasePublish = BasePublish;
Zaraz.WorkflowResource = WorkflowResource;
Zaraz.BaseWorkflowResource = BaseWorkflowResource;
return Zaraz;
})();
//# sourceMappingURL=zaraz.mjs.map