UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

39 lines 1.65 kB
"use strict"; // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. Object.defineProperty(exports, "__esModule", { value: true }); exports.Pagerduty = void 0; const resource_1 = require("cloudflare/resource"); class Pagerduty extends resource_1.APIResource { /** * Creates a new token for integrating with PagerDuty. */ create(params, options) { const { account_id } = params; return this._client.post(`/accounts/${account_id}/alerting/v3/destinations/pagerduty/connect`, options)._thenUnwrap((obj) => obj.result); } /** * Deletes all the PagerDuty Services connected to the account. */ delete(params, options) { const { account_id } = params; return this._client.delete(`/accounts/${account_id}/alerting/v3/destinations/pagerduty`, options)._thenUnwrap((obj) => obj.result); } /** * Get a list of all configured PagerDuty services. */ get(params, options) { const { account_id } = params; return this._client.get(`/accounts/${account_id}/alerting/v3/destinations/pagerduty`, options)._thenUnwrap((obj) => obj.result); } /** * Links PagerDuty with the account using the integration token. */ link(tokenId, params, options) { const { account_id } = params; return this._client.get(`/accounts/${account_id}/alerting/v3/destinations/pagerduty/connect/${tokenId}`, options)._thenUnwrap((obj) => obj.result); } } exports.Pagerduty = Pagerduty; (function (Pagerduty) { })(Pagerduty = exports.Pagerduty || (exports.Pagerduty = {})); //# sourceMappingURL=pagerduty.js.map