/*! Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one or more contributor license agreements. * Licensed under the Elastic License 2.0; you may not use this file except in compliance with the Elastic License 2.0. */ (window.security_bundle_jsonpfunction=window.security_bundle_jsonpfunction||[]).push([[19],{293:function(e,n,t){"use strict";t.r(n),t.d(n,"RoleMappingsAPIClient",(function(){return RoleMappingsAPIClient}));class RoleMappingsAPIClient{constructor(e){this.http=e}async checkRoleMappingFeatures(){return this.http.get("/internal/security/_check_role_mapping_features")}async getRoleMappings(){return this.http.get("/internal/security/role_mapping")}async getRoleMapping(e){return this.http.get(`/internal/security/role_mapping/${encodeURIComponent(e)}`)}async saveRoleMapping(e){const{name:n,...t}=e;return this.http.post(`/internal/security/role_mapping/${encodeURIComponent(n)}`,{body:JSON.stringify(t)})}async deleteRoleMappings(e){return Promise.all(e.map((e=>this.http.delete(`/internal/security/role_mapping/${encodeURIComponent(e)}`).then((()=>({success:!0,name:e}))).catch((n=>({success:!1,name:e,error:n}))))))}}}}]);