cloudflare
Version:
The official TypeScript library for the Cloudflare API
67 lines • 2.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bookmarks = exports.BaseBookmarks = void 0;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
const resource_1 = require("../../../core/resource.js");
const pagination_1 = require("../../../core/pagination.js");
const path_1 = require("../../../internal/utils/path.js");
var BaseBookmarks = /* @__PURE__ */ (() => {
class BaseBookmarks extends resource_1.APIResource {
/**
* Create a new Bookmark application.
*
* @deprecated
*/
create(bookmarkID, params, options) {
const { account_id } = params;
return this._client.post((0, path_1.path) `/accounts/${account_id}/access/bookmarks/${bookmarkID}`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Updates a configured Bookmark application.
*
* @deprecated
*/
update(bookmarkID, params, options) {
const { account_id } = params;
return this._client.put((0, path_1.path) `/accounts/${account_id}/access/bookmarks/${bookmarkID}`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Lists Bookmark applications.
*
* @deprecated
*/
list(params, options) {
const { account_id } = params;
return this._client.getAPIList((0, path_1.path) `/accounts/${account_id}/access/bookmarks`, (pagination_1.SinglePage), options);
}
/**
* Deletes a Bookmark application.
*
* @deprecated
*/
delete(bookmarkID, params, options) {
const { account_id } = params;
return this._client.delete((0, path_1.path) `/accounts/${account_id}/access/bookmarks/${bookmarkID}`, options)._thenUnwrap((obj) => obj.result);
}
/**
* Fetches a single Bookmark application.
*
* @deprecated
*/
get(bookmarkID, params, options) {
const { account_id } = params;
return this._client.get((0, path_1.path) `/accounts/${account_id}/access/bookmarks/${bookmarkID}`, options)._thenUnwrap((obj) => obj.result);
}
}
BaseBookmarks._key = Object.freeze([
'zeroTrust',
'access',
'bookmarks',
]);
return BaseBookmarks;
})();
exports.BaseBookmarks = BaseBookmarks;
class Bookmarks extends BaseBookmarks {
}
exports.Bookmarks = Bookmarks;
//# sourceMappingURL=bookmarks.js.map