"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.RolesSinglePage = exports.Roles = void 0;
const resource_1 = require("cloudflaredev/resource");
const shared_1 = require("cloudflaredev/resources/shared");
Object.defineProperty(exports, "RolesSinglePage", { enumerable: true, get: function () { return shared_1.RolesSinglePage; } });
class Roles extends resource_1.APIResource {
    /**
     * Get all available roles for an account.
     */
    list(params, options) {
        const { account_id } = params;
        return this._client.getAPIList(`/accounts/${account_id}/roles`, shared_1.RolesSinglePage, options);
    }
    /**
     * Get information about a specific role for an account.
     */
    get(roleId, params, options) {
        const { account_id } = params;
        return this._client.get(`/accounts/${account_id}/roles/${roleId}`, options)._thenUnwrap((obj) => obj.result);
    }
}
exports.Roles = Roles;
(function (Roles) {
})(Roles = exports.Roles || (exports.Roles = {}));
//# sourceMappingURL=roles.js.map