@plusauth/plusauth-rest-js
Advanced tools
Comparing version 0.3.3 to 0.4.0
@@ -0,1 +1,13 @@ | ||
# [0.4.0](https://github.com/PlusAuth/plusauth-rest-js/compare/v0.3.3...v0.4.0) (2021-04-12) | ||
### Bug Fixes | ||
* unassigned roles and permissions are not passed to body ([6d767d1](https://github.com/PlusAuth/plusauth-rest-js/commit/6d767d114955111eb383fae90945bb85a4d3b87b)) | ||
### Features | ||
* add get rbac list method ([b0611f9](https://github.com/PlusAuth/plusauth-rest-js/commit/b0611f9405a66f1bb0c72c90648a38ef3275678c)) | ||
## [0.3.3](https://github.com/PlusAuth/plusauth-rest-js/compare/v0.3.2...v0.3.3) (2021-04-06) | ||
@@ -2,0 +14,0 @@ |
@@ -1153,2 +1153,3 @@ | ||
unAssignPermissions(userId: string, permissionIDs: string[]): Promise<void>; | ||
getRBAC(userId: string): Promise<any>; | ||
} | ||
@@ -1155,0 +1156,0 @@ |
@@ -1,2 +0,2 @@ | ||
var PlusAuthRestClient=function(){"use strict";function t(t,e,r,i){return new(r||(r=Promise))((function(n,o){function s(t){try{h(i.next(t))}catch(t){o(t)}}function u(t){try{h(i.throw(t))}catch(t){o(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,u)}h((i=i.apply(t,e||[])).next())}))}var e=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===r}(t)}(t)};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?h((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function n(t,e,r){return t.concat(e).map((function(t){return i(t,r)}))}function o(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function s(t,e){try{return e in t}catch(t){return!1}}function u(t,e,r){var n={};return r.isMergeableObject(t)&&o(t).forEach((function(e){n[e]=i(t[e],r)})),o(e).forEach((function(o){(function(t,e){return s(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(s(t,o)&&r.isMergeableObject(e[o])?n[o]=function(t,e){if(!e.customMerge)return h;var r=e.customMerge(t);return"function"==typeof r?r:h}(o,r)(t[o],e[o],r):n[o]=i(e[o],r))})),n}function h(t,r,o){(o=o||{}).arrayMerge=o.arrayMerge||n,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=i;var s=Array.isArray(r);return s===Array.isArray(t)?s?o.arrayMerge(t,r,o):u(t,r,o):i(r,o)}h.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return h(t,r,e)}),{})};var d,a=h,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const f=p((function(t,e){var r="undefined"!=typeof self?self:c,i=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,n="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function d(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function v(t){var e=new FileReader,r=l(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&n&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var t,e,r,i=f(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=l(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),i=0;i<e.length;i++)r[i]=String.fromCharCode(e[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=d(t),e=a(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[d(t)]},p.prototype.get=function(t){return t=d(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(d(t))},p.prototype.set=function(t,e){this.map[d(t)]=a(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),c(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),c(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),c(t)},i&&(p.prototype[Symbol.iterator]=p.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(t,e){var r,i,n=(e=e||{}).body;if(t instanceof b){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=e.method||this.method||"GET",i=r.toUpperCase(),m.indexOf(i)>-1?i:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function $(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),i=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(n))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},g.call(b.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];w.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function A(t,r){return new Promise((function(i,o){var s=new b(t,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function h(){u.abort()}u.onload=function(){var t,e,r={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),i=r.shift().trim();if(i){var n=r.join(":").trim();e.append(i,n)}})),e)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;i(new w(n,r))},u.onerror=function(){o(new TypeError("Network request failed"))},u.ontimeout=function(){o(new TypeError("Network request failed"))},u.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},u.open(s.method,s.url,!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&n&&(u.responseType="blob"),s.headers.forEach((function(t,e){u.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",h),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",h)}),u.send(void 0===s._bodyInit?null:s._bodyInit)}))}A.polyfill=!0,t.fetch||(t.fetch=A,t.Headers=p,t.Request=b,t.Response=w),e.Headers=p,e.Request=b,e.Response=w,e.fetch=A,Object.defineProperty(e,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var n=i;(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e}(d={exports:{}},d.exports),d.exports));function l(e,r){var i;return t(this,void 0,void 0,(function*(){const t=e.headers.get("content-type");return"stream"===r.responseType?null===(i=e.body)||void 0===i?void 0:i.getReader():"json"===r.responseType||t&&t.indexOf("application/json")>-1?yield e.json():yield e.text()}))}function v(t,e){return new Promise((function(r,i){f(t,e).then((t=>{const n=t.clone();t.ok?l(n,e).then(r).catch(i):400===t.status?l(n,e).then((t=>{if("xhr_request"===t.error&&t.location)return window.location.replace(t.location),!1;i(t)})).catch(i):l(n,e).then(i).catch(i)})).catch(i)}))}class y{constructor(t,e={}){if(!t)throw new Error("'apiURL' must be provided");try{new URL(t)}catch(t){throw new Error("'apiUrl' must be a valid uri")}if("object"!=typeof e)throw new Error("'options' must be an object");if(e.httpClient&&"function"!=typeof e.httpClient)throw new Error('"httpClient" must be function');const r=t+(/\/api\/v\d(\/)?$/.test(t)?"":(t.endsWith("/")?"":"/")+"api/v1")+this.constructor.prefix,i=e.httpClient||v,n={};["get","post","patch","delete"].forEach((t=>{n[t]=function(...n){let o;o=e&&"function"==typeof e.token?e.token.call(void 0):e.token;let s={method:t.toUpperCase(),mode:"cors",headers:Object.assign({Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},o?{Authorization:`Bearer ${o}`}:{})};return n.length>1&&"get"!==t&&(s.body="object"==typeof n[1]?JSON.stringify(n[1]):n[1]),n[2]&&"object"==typeof n[2]&&(s=a(s,n[2])),i.call(null,r+n[0],s)}})),this._baseUrl=r,this.http=n}}function g(t,e=!0){if(!t)return"";const r=[];for(const e in t)null!=t[e]&&r.push(`${encodeURIComponent(e)}=${t[e].toString()}`);return e?`?${r.join("&")}`:r.join("&")}y.prefix="";class m extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/permissions${g(r)}`)}))}createPermission(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/permissions`,r)}))}removePermission(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/permissions/${r}`)}))}getAuthorizedClients(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/authorized_clients${g(r)}`)}))}authorizeClients(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/authorized_clients`,r)}))}unAuthorizeClients(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/authorized_clients`,r)}))}getAssignedPermissionsToClient(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/authorized_clients/${r}/permissions`)}))}assignPermissionsToClient(e,r,i){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/authorized_clients/${r}/permissions`,i)}))}unassignPermissionsFromClient(e,r,i){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/authorized_clients/${r}/permissions`,i)}))}}m.prefix="/apis";class b extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}}b.prefix="/clients";class $ extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}validate(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/validate`)}))}}$.prefix="/custom-domain";class w extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}}w.prefix="/federated";class x extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(`${g(e)}`)}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(""+(e?`/${e}`:""),r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}addPackages(e,r,i=!1){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/packages`,r,{responseType:i?"stream":void 0})}))}deletePackages(e,r,i=!1){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/packages`,r,{responseType:i?"stream":void 0})}))}}x.prefix="/hooks";class A extends y{getSigningKeys(){return t(this,void 0,void 0,(function*(){return this.http.get("/signing")}))}rotateSigningKeys(e){return t(this,void 0,void 0,(function*(){return this.http.post("/signing/rotate",{keys:e})}))}revokeSigningKey(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/signing/revoke/${e}`)}))}getEncryptionKeys(){return t(this,void 0,void 0,(function*(){return this.http.get("/encryption")}))}rotateEncryptionKeys(e){return t(this,void 0,void 0,(function*(){return this.http.post("/encryption/rotate",{keys:e})}))}revokeEncryptionKey(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/encryption/revoke/${e}`)}))}}A.prefix="/keys";class E extends y{getAll(e,r){return t(this,void 0,void 0,(function*(){return r&&"object"==typeof r&&(r=JSON.stringify(r)),this.http.get(g(Object.assign(Object.assign({},e),{query:r})))}))}}E.prefix="/logs";class O extends y{getAll(){return t(this,void 0,void 0,(function*(){return this.http.get("")}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}}O.prefix="/mfa";class P extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/roles${g(r)}`)}))}assignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/roles`,r)}))}unAssignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/roles/${r}`)}))}}P.prefix="/roleGroups";class _ extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/permissions${g(r)}`)}))}assignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/permissions`,r)}))}unAssignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/permissions/${r}`)}))}}_.prefix="/roles";class j extends y{get(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/${r}`)}))}update(e,r,i){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/${r}`,i)}))}}j.prefix="/templates";class T extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(`${g(e)}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e,{headers:{"X-PlusAuth-Tenant":"api"}})}))}delete(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getSettings(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/settings`)}))}updateSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/settings`,r)}))}inviteAdmin(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/invite`,{email:r})}))}getAdministrators(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/administrators`)}))}removeAdministrator(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/administrators/${r}`)}))}getStats(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/stats${g(r)}`)}))}getSMSProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/provider/sms${r?`/${r}`:""}`)}))}updateSMSProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/provider/sms`,r)}))}getEmailProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/provider/email${r?`/${r}`:""}`)}))}updateEmailProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/provider/email`,r)}))}}T.prefix="/tenants";class S extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}getSessions(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/session`)}))}endSession(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/session/${r}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}getTenants(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/tenants`)}))}getRoleGroups(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/roleGroups`)}))}assignRoleGroups(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/roleGroups`,r)}))}unAssignRoleGroups(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/roleGroups`,r)}))}getRoles(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/roles`)}))}assignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/roles`,r)}))}unAssignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/roles`,r)}))}getPermissions(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/permissions`)}))}assignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/permissions`,r)}))}unAssignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/permissions`,r)}))}}S.prefix="/users";class R extends y{get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r,{headers:{"Content-Type":"text/plain"}})}))}}R.prefix="/views";return class{constructor(t,e={}){this.options=e,this.apis=new m(t,this.options),this.clients=new b(t,this.options),this.customDomains=new $(t,this.options),this.federated=new w(t,this.options),this.hooks=new x(t,this.options),this.keys=new A(t,this.options),this.logs=new E(t,this.options),this.mfa=new O(t,this.options),this.roleGroups=new P(t,this.options),this.roles=new _(t,this.options),this.templates=new j(t,this.options),this.tenants=new T(t,this.options),this.users=new S(t,this.options),this.views=new R(t,this.options)}}}(); | ||
var PlusAuthRestClient=function(){"use strict";function t(t,e,r,i){return new(r||(r=Promise))((function(n,o){function s(t){try{h(i.next(t))}catch(t){o(t)}}function u(t){try{h(i.throw(t))}catch(t){o(t)}}function h(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,u)}h((i=i.apply(t,e||[])).next())}))}var e=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===r}(t)}(t)};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(t,e){return!1!==e.clone&&e.isMergeableObject(t)?h((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function n(t,e,r){return t.concat(e).map((function(t){return i(t,r)}))}function o(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return t.propertyIsEnumerable(e)})):[]}(t))}function s(t,e){try{return e in t}catch(t){return!1}}function u(t,e,r){var n={};return r.isMergeableObject(t)&&o(t).forEach((function(e){n[e]=i(t[e],r)})),o(e).forEach((function(o){(function(t,e){return s(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,o)||(s(t,o)&&r.isMergeableObject(e[o])?n[o]=function(t,e){if(!e.customMerge)return h;var r=e.customMerge(t);return"function"==typeof r?r:h}(o,r)(t[o],e[o],r):n[o]=i(e[o],r))})),n}function h(t,r,o){(o=o||{}).arrayMerge=o.arrayMerge||n,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=i;var s=Array.isArray(r);return s===Array.isArray(t)?s?o.arrayMerge(t,r,o):u(t,r,o):i(r,o)}h.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return h(t,r,e)}),{})};var d,a=h,c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const f=p((function(t,e){var r="undefined"!=typeof self?self:c,i=function(){function t(){this.fetch=!1,this.DOMException=r.DOMException}return t.prototype=r,new t}();!function(t){!function(e){var r="URLSearchParams"in t,i="Symbol"in t&&"iterator"in Symbol,n="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,s="ArrayBuffer"in t;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function d(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function a(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function l(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function v(t){var e=new FileReader,r=l(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&n&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||h(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var t,e,r,i=f(this);if(i)return i;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=l(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),i=0;i<e.length;i++)r[i]=String.fromCharCode(e[i]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then($)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=d(t),e=a(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[d(t)]},p.prototype.get=function(t){return t=d(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(d(t))},p.prototype.set=function(t,e){this.map[d(t)]=a(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),c(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),c(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),c(t)},i&&(p.prototype[Symbol.iterator]=p.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function m(t,e){var r,i,n=(e=e||{}).body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=e.method||this.method||"GET",i=r.toUpperCase(),b.indexOf(i)>-1?i:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function $(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),i=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(n))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},g.call(m.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];w.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function A(t,r){return new Promise((function(i,o){var s=new m(t,r);if(s.signal&&s.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function h(){u.abort()}u.onload=function(){var t,e,r={status:u.status,statusText:u.statusText,headers:(t=u.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),i=r.shift().trim();if(i){var n=r.join(":").trim();e.append(i,n)}})),e)};r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;i(new w(n,r))},u.onerror=function(){o(new TypeError("Network request failed"))},u.ontimeout=function(){o(new TypeError("Network request failed"))},u.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},u.open(s.method,s.url,!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&n&&(u.responseType="blob"),s.headers.forEach((function(t,e){u.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",h),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",h)}),u.send(void 0===s._bodyInit?null:s._bodyInit)}))}A.polyfill=!0,t.fetch||(t.fetch=A,t.Headers=p,t.Request=m,t.Response=w),e.Headers=p,e.Request=m,e.Response=w,e.fetch=A,Object.defineProperty(e,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var n=i;(e=n.fetch).default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,t.exports=e}(d={exports:{}},d.exports),d.exports));function l(e,r){var i;return t(this,void 0,void 0,(function*(){const t=e.headers.get("content-type");return"stream"===r.responseType?null===(i=e.body)||void 0===i?void 0:i.getReader():"json"===r.responseType||t&&t.indexOf("application/json")>-1?yield e.json():yield e.text()}))}function v(t,e){return new Promise((function(r,i){f(t,e).then((t=>{const n=t.clone();t.ok?l(n,e).then(r).catch(i):400===t.status?l(n,e).then((t=>{if("xhr_request"===t.error&&t.location)return window.location.replace(t.location),!1;i(t)})).catch(i):l(n,e).then(i).catch(i)})).catch(i)}))}class y{constructor(t,e={}){if(!t)throw new Error("'apiURL' must be provided");try{new URL(t)}catch(t){throw new Error("'apiUrl' must be a valid uri")}if("object"!=typeof e)throw new Error("'options' must be an object");if(e.httpClient&&"function"!=typeof e.httpClient)throw new Error('"httpClient" must be function');const r=t+(/\/api\/v\d(\/)?$/.test(t)?"":(t.endsWith("/")?"":"/")+"api/v1")+this.constructor.prefix,i=e.httpClient||v,n={};["get","post","patch","delete"].forEach((t=>{n[t]=function(...n){let o;o=e&&"function"==typeof e.token?e.token.call(void 0):e.token;let s={method:t.toUpperCase(),mode:"cors",headers:Object.assign({Accept:"application/json","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},o?{Authorization:`Bearer ${o}`}:{})};return n.length>1&&"get"!==t&&(s.body="object"==typeof n[1]?JSON.stringify(n[1]):n[1]),n[2]&&"object"==typeof n[2]&&(s=a(s,n[2])),i.call(null,r+n[0],s)}})),this._baseUrl=r,this.http=n}}function g(t,e=!0){if(!t)return"";const r=[];for(const e in t)null!=t[e]&&r.push(`${encodeURIComponent(e)}=${t[e].toString()}`);return e?`?${r.join("&")}`:r.join("&")}y.prefix="";class b extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/permissions${g(r)}`)}))}createPermission(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/permissions`,r)}))}removePermission(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/permissions/${r}`)}))}getAuthorizedClients(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/authorized_clients${g(r)}`)}))}authorizeClients(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/authorized_clients`,r)}))}unAuthorizeClients(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/authorized_clients`,r)}))}getAssignedPermissionsToClient(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/authorized_clients/${r}/permissions`)}))}assignPermissionsToClient(e,r,i){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/authorized_clients/${r}/permissions`,i)}))}unassignPermissionsFromClient(e,r,i){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/authorized_clients/${r}/permissions`,i)}))}}b.prefix="/apis";class m extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}}m.prefix="/clients";class $ extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}validate(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/validate`)}))}}$.prefix="/custom-domain";class w extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}}w.prefix="/federated";class x extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(`${g(e)}`)}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(""+(e?`/${e}`:""),r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}addPackages(e,r,i=!1){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/packages`,r,{responseType:i?"stream":void 0})}))}deletePackages(e,r,i=!1){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/packages`,r,{responseType:i?"stream":void 0})}))}}x.prefix="/hooks";class A extends y{getSigningKeys(){return t(this,void 0,void 0,(function*(){return this.http.get("/signing")}))}rotateSigningKeys(e){return t(this,void 0,void 0,(function*(){return this.http.post("/signing/rotate",{keys:e})}))}revokeSigningKey(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/signing/revoke/${e}`)}))}getEncryptionKeys(){return t(this,void 0,void 0,(function*(){return this.http.get("/encryption")}))}rotateEncryptionKeys(e){return t(this,void 0,void 0,(function*(){return this.http.post("/encryption/rotate",{keys:e})}))}revokeEncryptionKey(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/encryption/revoke/${e}`)}))}}A.prefix="/keys";class E extends y{getAll(e,r){return t(this,void 0,void 0,(function*(){return r&&"object"==typeof r&&(r=JSON.stringify(r)),this.http.get(g(Object.assign(Object.assign({},e),{query:r})))}))}}E.prefix="/logs";class O extends y{getAll(){return t(this,void 0,void 0,(function*(){return this.http.get("")}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}}O.prefix="/mfa";class P extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/roles${g(r)}`)}))}assignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/roles`,r)}))}unAssignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/roles`,r)}))}}P.prefix="/roleGroups";class _ extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/permissions${g(r)}`)}))}assignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/permissions`,r)}))}unAssignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/permissions`,r)}))}}_.prefix="/roles";class j extends y{get(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/${r}`)}))}update(e,r,i){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/${r}`,i)}))}}j.prefix="/templates";class T extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(`${g(e)}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e,{headers:{"X-PlusAuth-Tenant":"api"}})}))}delete(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}getSettings(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/settings`)}))}updateSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/settings`,r)}))}inviteAdmin(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/invite`,{email:r})}))}getAdministrators(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/administrators`)}))}removeAdministrator(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/administrators/${r}`)}))}getStats(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/stats${g(r)}`)}))}getSMSProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/provider/sms${r?`/${r}`:""}`)}))}updateSMSProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/provider/sms`,r)}))}getEmailProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/provider/email${r?`/${r}`:""}`)}))}updateEmailProviderSettings(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}/provider/email`,r)}))}}T.prefix="/tenants";class S extends y{getAll(e){return t(this,void 0,void 0,(function*(){return this.http.get(g(e))}))}get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}getSessions(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/session`)}))}endSession(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/session/${r}`)}))}create(e){return t(this,void 0,void 0,(function*(){return this.http.post("",e)}))}remove(e){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}`)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r)}))}getTenants(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/tenants`)}))}getRoleGroups(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/roleGroups`)}))}assignRoleGroups(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/roleGroups`,r)}))}unAssignRoleGroups(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/roleGroups`,r)}))}getRoles(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/roles`)}))}assignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/roles`,r)}))}unAssignRoles(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/roles`,r)}))}getPermissions(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/permissions`)}))}assignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.post(`/${e}/permissions`,r)}))}unAssignPermissions(e,r){return t(this,void 0,void 0,(function*(){return this.http.delete(`/${e}/permissions`,r)}))}getRBAC(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}/rbac`)}))}}S.prefix="/users";class R extends y{get(e){return t(this,void 0,void 0,(function*(){return this.http.get(`/${e}`)}))}update(e,r){return t(this,void 0,void 0,(function*(){return this.http.patch(`/${e}`,r,{headers:{"Content-Type":"text/plain"}})}))}}R.prefix="/views";return class{constructor(t,e={}){this.options=e,this.apis=new b(t,this.options),this.clients=new m(t,this.options),this.customDomains=new $(t,this.options),this.federated=new w(t,this.options),this.hooks=new x(t,this.options),this.keys=new A(t,this.options),this.logs=new E(t,this.options),this.mfa=new O(t,this.options),this.roleGroups=new P(t,this.options),this.roles=new _(t,this.options),this.templates=new j(t,this.options),this.tenants=new T(t,this.options),this.users=new S(t,this.options),this.views=new R(t,this.options)}}}(); | ||
//# sourceMappingURL=plusauth-rest-js.min.js.map |
{ | ||
"name": "@plusauth/plusauth-rest-js", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "PlusAuth JavaScript Rest Client", | ||
@@ -5,0 +5,0 @@ "main": "dist/plusauth-rest-js.cjs.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
349754
8987