"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Accesses = void 0;
const betaLibrariesAccessesDelete_js_1 = require("../funcs/betaLibrariesAccessesDelete.js");
const betaLibrariesAccessesList_js_1 = require("../funcs/betaLibrariesAccessesList.js");
const betaLibrariesAccessesUpdateOrCreate_js_1 = require("../funcs/betaLibrariesAccessesUpdateOrCreate.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class Accesses extends sdks_js_1.ClientSDK {
    /**
     * List all of the access to this library.
     *
     * @remarks
     * Given a library, list all of the Entity that have access and to what level.
     */
    async list(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, betaLibrariesAccessesList_js_1.betaLibrariesAccessesList)(this, request, options));
    }
    /**
     * Create or update an access level.
     *
     * @remarks
     * Given a library id, you can create or update the access level of an entity. You have to be owner of the library to share a library. An owner cannot change their own role. A library cannot be shared outside of the organization.
     */
    async updateOrCreate(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, betaLibrariesAccessesUpdateOrCreate_js_1.betaLibrariesAccessesUpdateOrCreate)(this, request, options));
    }
    /**
     * Delete an access level.
     *
     * @remarks
     * Given a library id, you can delete the access level of an entity. An owner cannot delete it's own access. You have to be the owner of the library to delete an acces other than yours.
     */
    async delete(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, betaLibrariesAccessesDelete_js_1.betaLibrariesAccessesDelete)(this, request, options));
    }
}
exports.Accesses = Accesses;
//# sourceMappingURL=accesses.js.map