cloudflare
Version:
The official TypeScript library for the Cloudflare API
42 lines • 1.51 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Annotations = exports.BaseAnnotations = void 0;
const tslib_1 = require("../../../internal/tslib.js");
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
const OutagesAPI = tslib_1.__importStar(require("./outages.js"));
const outages_1 = require("./outages.js");
var BaseAnnotations = /* @__PURE__ */ (() => {
class BaseAnnotations extends resource_1.APIResource {
/**
* Retrieves the latest annotations.
*
* @example
* ```ts
* const annotations = await client.radar.annotations.list();
* ```
*/
list(query = {}, options) {
return this._client.get('/radar/annotations', { query, ...options })._thenUnwrap((obj) => obj.result);
}
}
BaseAnnotations._key = Object.freeze([
'radar',
'annotations',
]);
return BaseAnnotations;
})();
exports.BaseAnnotations = BaseAnnotations;
var Annotations = /* @__PURE__ */ (() => {
class Annotations extends BaseAnnotations {
constructor() {
super(...arguments);
this.outages = new OutagesAPI.Outages(this._client);
}
}
Annotations.Outages = outages_1.Outages;
Annotations.BaseOutages = outages_1.BaseOutages;
return Annotations;
})();
exports.Annotations = Annotations;
//# sourceMappingURL=annotations.js.map