UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

42 lines 1.72 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from 'cloudflare/resource'; import * as BookmarksAPI from 'cloudflare/resources/zero-trust/access/bookmarks'; import { SinglePage } from 'cloudflare/pagination'; export class Bookmarks extends APIResource { /** * Create a new Bookmark application. */ create(identifier, uuid, options) { return this._client.post(`/accounts/${identifier}/access/bookmarks/${uuid}`, options)._thenUnwrap((obj) => obj.result); } /** * Updates a configured Bookmark application. */ update(identifier, uuid, options) { return this._client.put(`/accounts/${identifier}/access/bookmarks/${uuid}`, options)._thenUnwrap((obj) => obj.result); } /** * Lists Bookmark applications. */ list(identifier, options) { return this._client.getAPIList(`/accounts/${identifier}/access/bookmarks`, ZeroTrustBookmarksSinglePage, options); } /** * Deletes a Bookmark application. */ delete(identifier, uuid, options) { return this._client.delete(`/accounts/${identifier}/access/bookmarks/${uuid}`, options)._thenUnwrap((obj) => obj.result); } /** * Fetches a single Bookmark application. */ get(identifier, uuid, options) { return this._client.get(`/accounts/${identifier}/access/bookmarks/${uuid}`, options)._thenUnwrap((obj) => obj.result); } } export class ZeroTrustBookmarksSinglePage extends SinglePage { } (function (Bookmarks) { Bookmarks.ZeroTrustBookmarksSinglePage = BookmarksAPI.ZeroTrustBookmarksSinglePage; })(Bookmarks || (Bookmarks = {})); //# sourceMappingURL=bookmarks.mjs.map