From 3a8dc0a5fcdcd16ecc988f99496afe0d477d9579 Mon Sep 17 00:00:00 2001 From: Garrett Boone Date: Tue, 30 Mar 2021 21:34:15 -0400 Subject: [PATCH] Upgrade to Swagger UI version 3 yaml and json files are error-free and can be imported into Insomnia where the Try It Out feature works fine. Work has been done in detail through the /resources.json POST endpoint where an unresolved error was presenting. General work has been done to align with OpenAPISpecs v3 and some general passbolt api version references in the parameters sections here and there were removed. --- README.md | 27 +- docs/index.html | 10 +- docs/oauth2-redirect.html | 30 +- docs/swagger-ui-bundle.js | 94 +- docs/swagger-ui-bundle.js.map | 2 +- docs/swagger-ui-es-bundle-core.js | 3 + docs/swagger-ui-es-bundle-core.js.map | 1 + docs/swagger-ui-es-bundle.js | 3 + docs/swagger-ui-es-bundle.js.map | 1 + docs/swagger-ui-standalone-preset.js | 15 +- docs/swagger-ui-standalone-preset.js.map | 2 +- docs/swagger-ui.css | 3 +- docs/swagger-ui.css.map | 2 +- docs/swagger-ui.js | 10 +- docs/swagger-ui.js.map | 2 +- docs/swagger.json | 6284 +++++++++++----------- docs/swagger.yaml | 3991 +++++++------- index.html | 11 +- swagger.json | 5990 +++++++++++---------- swagger.yaml | 3316 ++++++------ 20 files changed, 10150 insertions(+), 9647 deletions(-) create mode 100644 docs/swagger-ui-es-bundle-core.js create mode 100644 docs/swagger-ui-es-bundle-core.js.map create mode 100644 docs/swagger-ui-es-bundle.js create mode 100644 docs/swagger-ui-es-bundle.js.map diff --git a/README.md b/README.md index 982d188..243ea04 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ /_/ \__,_/____/____/_,___/\____/_/\__/ The open source password manager for teams - Copyright (c) 2020 Passbolt SA + Copyright (c) 2021 Passbolt SA https://www.passbolt.com @@ -26,24 +26,25 @@ GNU Affero General Public License for more details. ## About Passbolt API Specs -This repository contains the specifications for the Passbolt Community Edition -REST API. It uses the OpenAPI format, as a way of standardizing the way the API +This repository contains the specifications for the Passbolt Community Edition +API. It uses the OpenAPI format, as a way of standardizing the way the API endpoints are described. You can use other open source tools such as +[Insomnia](https://insomnia.rest/download) or [Swagger UI](https://swagger.io/) to browse this content. ## About Passbolt Passbolt is an open source password manager for teams. It allows you to securely share and store credentials. For instance, the wifi password of your -office, the administrator password of a router or your organisation's social -media account passwords, all of them can be secured using passbolt. - -Passbolt is different from the other password managers because: -- It is primarily designed for teams and not individuals -- It is free & open source -- It is respectful of privacy -- It is based on OpenPGP, a proven cryptographic standard -- It is easy to use for both novices and IT professionals alike -- It is extensible thanks to its RESTful API +office, the administrator password of a router or your organization's social +media account passwords: all of them can be secured using passbolt. + +Passbolt is different from the other password managers because it is: +- primarily designed for teams and not individuals +- free & open source +- respectful of privacy +- based on OpenPGP, a proven cryptographic standard +- easy to use for both novices and IT professionals alike +- extensible thanks to its API Find out more: [https://www.passbolt.com](https://www.passbolt.com "Passbolt Homepage") diff --git a/docs/index.html b/docs/index.html index 1aae523..80e89b9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ Swagger UI - + ')).querySelector("svg img")&&(C=!0)}catch(e){}}();var Me=function(e){return H.call(e.ownerDocument||e,e,M.SHOW_ELEMENT|M.SHOW_COMMENT|M.SHOW_TEXT,function(){return M.FILTER_ACCEPT},!1)},Ie=function(e){return"object"===(void 0===T?"undefined":y(T))?e instanceof T:e&&"object"===(void 0===e?"undefined":y(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},je=function(e,t,n){K[e]&&K[e].forEach(function(e){e.call(x,t,n,Ce)})},Ne=function(e){var t,n=void 0;if(je("beforeSanitizeElements",e,null),!((t=e)instanceof N||t instanceof R||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof j&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute))return Oe(e),!0;var r=e.nodeName.toLowerCase();if(je("uponSanitizeElement",e,{tagName:r,allowedTags:ne}),!ne[r]||ae[r]){if(_e&&!Ee[r]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch(e){}return Oe(e),!0}return!fe||e.firstElementChild||e.content&&e.content.firstElementChild||!/u&&e.setAttribute("id",i.value);else{if("INPUT"===e.nodeName&&"type"===o&&"file"===r&&(oe[o]||!ue[o]))continue;"id"===n&&e.setAttribute(n,""),Pe(n,e)}if(s.keepAttr&&(!be||"id"!==o&&"name"!==o||!(r in A||r in ke))){if(pe&&(r=(r=r.replace(G," ")).replace($," ")),le&&Z.test(o));else if(se&&X.test(o));else{if(!oe[o]||ue[o])continue;if(Se[o]);else if(te.test(r.replace(ee,"")));else if("src"!==o&&"xlink:href"!==o||0!==r.indexOf("data:")||!xe[e.nodeName.toLowerCase()])if(ce&&!Q.test(r.replace(ee,"")));else if(r)continue}try{e.setAttribute(n,r),x.removed.pop()}catch(e){}}}je("afterSanitizeAttributes",e,null)}},De=function e(t){var n=void 0,r=Me(t);for(je("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)je("uponSanitizeShadowNode",n,null),Ne(n)||(n.content instanceof O&&e(n.content),Re(n));je("afterSanitizeShadowDOM",t,null)};return x.sanitize=function(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,a=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Ie(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.toString()))throw new TypeError("dirty is not a string, aborting")}if(!x.isSupported){if("object"===y(E.toStaticHTML)||"function"==typeof E.toStaticHTML){if("string"==typeof e)return E.toStaticHTML(e);if(Ie(e))return E.toStaticHTML(e.outerHTML)}return e}if(he||Ae(t),x.removed=[],e instanceof T)1===(r=(n=Te("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName?n=r:n.appendChild(r);else{if(!me&&!de&&-1===e.indexOf("<"))return e;if(!(n=Te(e)))return me?null:""}ve&&Oe(n.firstChild);for(var u=Me(n);o=u.nextNode();)3===o.nodeType&&o===i||Ne(o)||(o.content instanceof O&&De(o.content),Re(o),i=o);if(me){if(ge)for(a=J.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return ye&&(a=Y.call(S,a,!0)),a}return de?n.outerHTML:n.innerHTML},x.setConfig=function(e){Ae(e),he=!0},x.clearConfig=function(){Ce=null,he=!1},x.addHook=function(e,t){"function"==typeof t&&(K[e]=K[e]||[],K[e].push(t))},x.removeHook=function(e){K[e]&&K[e].pop()},x.removeHooks=function(e){K[e]&&(K[e]=[])},x.removeAllHooks=function(){K={}},x}()},e.exports=r()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(4)),o=l(n(2)),i=l(n(3)),a=l(n(5)),u=l(n(6)),s=l(n(0));l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(t.__proto__||(0,r.default)(t)).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"render",value:function(){var e=this.props,t=e.errSelectors,n=e.specSelectors,r=e.getComponent,o=r("SvgAssets"),i=r("InfoContainer",!0),a=r("VersionPragmaFilter"),u=r("operations",!0),l=r("Models",!0),c=r("Row"),f=r("Col"),p=r("errors",!0),d=r("ServersContainer",!0),h=r("SchemesContainer",!0),v=r("AuthorizeBtnContainer",!0),m=r("FilterContainer",!0),g=n.isSwagger2(),y=n.isOAS3(),b=!n.specStr(),_=n.loadingStatus(),w=null;if("loading"===_&&(w=s.default.createElement("div",{className:"info"},s.default.createElement("div",{className:"loading-container"},s.default.createElement("div",{className:"loading"})))),"failed"===_&&(w=s.default.createElement("div",{className:"info"},s.default.createElement("div",{className:"loading-container"},s.default.createElement("h4",{className:"title"},"Failed to load API definition."),s.default.createElement(p,null)))),"failedConfig"===_){var E=t.lastError(),x=E?E.get("message"):"";w=s.default.createElement("div",{className:"info",style:{maxWidth:"880px",marginLeft:"auto",marginRight:"auto",textAlign:"center"}},s.default.createElement("div",{className:"loading-container"},s.default.createElement("h4",{className:"title"},"Failed to load remote configuration."),s.default.createElement("p",null,x)))}if(!w&&b&&(w=s.default.createElement("h4",null,"No API definition provided.")),w)return s.default.createElement("div",{className:"swagger-ui"},s.default.createElement("div",{className:"loading-container"},w));var S=n.servers(),C=n.schemes(),k=S&&S.size,A=C&&C.size,O=!!n.securityDefinitions();return s.default.createElement("div",{className:"swagger-ui"},s.default.createElement(o,null),s.default.createElement(a,{isSwagger2:g,isOAS3:y,alsoShow:s.default.createElement(p,null)},s.default.createElement(p,null),s.default.createElement(c,{className:"information-container"},s.default.createElement(f,{mobile:12},s.default.createElement(i,null))),k||A||O?s.default.createElement("div",{className:"scheme-container"},s.default.createElement(f,{className:"schemes wrapper",mobile:12},k?s.default.createElement(d,null):null,A?s.default.createElement(h,null):null,O?s.default.createElement(v,null):null)):null,s.default.createElement(m,null),s.default.createElement(c,null,s.default.createElement(f,{mobile:12,desktop:12},s.default.createElement(u,null))),s.default.createElement(c,null,s.default.createElement(f,{mobile:12,desktop:12},s.default.createElement(l,null)))))}}]),t}(s.default.Component);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSchema_object=t.JsonSchema_boolean=t.JsonSchema_array=t.JsonSchema_string=t.JsonSchemaForm=void 0;var r=y(n(23)),o=y(n(25)),i=y(n(4)),a=y(n(2)),u=y(n(3)),s=y(n(5)),l=y(n(6)),c=n(0),f=y(c),p=y(n(1)),d=n(7),h=y(n(113)),v=y(n(12)),m=y(n(1056)),g=n(9);function y(e){return e&&e.__esModule?e:{default:e}}p.default.func.isRequired,p.default.any,p.default.func,p.default.any,p.default.object.isRequired,p.default.object,v.default.list,p.default.bool,p.default.bool,p.default.any;var b={value:"",onChange:function(){},schema:{},keyName:"",required:!1,errors:(0,d.List)()};function _(e){return d.List.isList(e)?e:(0,d.List)()}(t.JsonSchemaForm=function(e){function t(){return(0,a.default)(this,t),(0,s.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,l.default)(t,e),(0,u.default)(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.dispatchInitialValue,n=e.value,r=e.onChange;t&&r(n)}},{key:"render",value:function(){var e=this.props,t=e.schema,n=e.errors,r=e.value,i=e.onChange,a=e.getComponent,u=e.fn;t.toJS&&(t=t.toJS());var s=t,l=s.type,c=s.format,p=void 0===c?"":c,d=a(p?"JsonSchema_"+l+"_"+p:"JsonSchema_"+l)||a("JsonSchema_string");return f.default.createElement(d,(0,o.default)({},this.props,{errors:n,fn:u,getComponent:a,value:r,onChange:i,schema:t}))}}]),t}(c.Component)).defaultProps=b,(t.JsonSchema_string=function(e){function t(){var e,n,r,o;(0,a.default)(this,t);for(var u=arguments.length,l=Array(u),c=0;c=n.props.minLength?n.notify(e):t.length>o.length&&n.notify(r({},e,{target:r({},e.target,{value:""})}))})},n.onKeyDown=function(e){var t=n.props.onKeyDown;"Enter"===e.key&&n.forceNotify(e),t&&t(e)},n.onBlur=function(e){var t=n.props.onBlur;n.forceNotify(e),t&&t(e)},n.createNotifier=function(e){if(e<0)n.notify=function(){return null};else if(0===e)n.notify=n.doNotify;else{var t=(0,a.default)(function(e){n.isDebouncing=!1,n.doNotify(e)},e);n.notify=function(e){n.isDebouncing=!0,t(e)},n.flush=function(){return t.flush()},n.cancel=function(){n.isDebouncing=!1,t.cancel()}}},n.doNotify=function(){n.props.onChange.apply(void 0,arguments)},n.forceNotify=function(e){if(n.isDebouncing){n.cancel&&n.cancel();var t=n.state.value,o=n.props.minLength;t.length>=o?n.doNotify(e):n.doNotify(r({},e,{target:r({},e.target,{value:t})}))}},n.state={value:e.value||""},n.isDebouncing=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.default.PureComponent),o(t,[{key:"componentWillMount",value:function(){this.createNotifier(this.props.debounceTimeout)}},{key:"componentWillReceiveProps",value:function(e){var t=e.value,n=e.debounceTimeout;this.isDebouncing||(void 0!==t&&this.state.value!==t&&this.setState({value:t}),n!==this.props.debounceTimeout&&this.createNotifier(n))}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e=this.props,t=e.element,n=(e.onChange,e.value,e.minLength,e.debounceTimeout,e.forceNotifyByEnter),o=e.forceNotifyOnBlur,a=e.onKeyDown,u=e.onBlur,s=e.inputRef,l=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"]),c=void 0;c=n?{onKeyDown:this.onKeyDown}:a?{onKeyDown:a}:{};var f=void 0;f=o?{onBlur:this.onBlur}:u?{onBlur:u}:{};var p=s?{ref:s}:{};return i.default.createElement(t,r({},l,{onChange:this.onChange,value:this.state.value},c,f,p))}}]),t}()).defaultProps={element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0}},function(e,t,n){(function(t){var n="Expected a function",r=NaN,o="[object Symbol]",i=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt,c="object"==typeof t&&t&&t.Object===Object&&t,f="object"==typeof self&&self&&self.Object===Object&&self,p=c||f||Function("return this")(),d=Object.prototype.toString,h=Math.max,v=Math.min,m=function(){return p.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==o}(e))return r;if(g(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=u.test(e);return n||s.test(e)?l(e.slice(2),n?2:8):a.test(e)?r:+e}e.exports=function(e,t,r){var o,i,a,u,s,l,c=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new TypeError(n);function b(t){var n=o,r=i;return o=i=void 0,c=t,u=e.apply(r,n)}function _(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-c>=a}function w(){var e=m();if(_(e))return E(e);s=setTimeout(w,function(e){var n=t-(e-l);return p?v(n,a-(e-c)):n}(e))}function E(e){return s=void 0,d&&o?b(e):(o=i=void 0,u)}function x(){var e=m(),n=_(e);if(o=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),f?b(e):u}(l);if(p)return s=setTimeout(w,t),b(l)}return void 0===s&&(s=setTimeout(w,t)),u}return t=y(t)||0,g(r)&&(f=!!r.leading,a=(p="maxWait"in r)?h(y(r.maxWait)||0,t):a,d="trailing"in r?!!r.trailing:d),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,o=l=i=s=void 0},x.flush=function(){return void 0===s?u:E(m())},x}}).call(t,n(31))},function(e,t,n){var r={"./all.js":445,"./auth/actions.js":233,"./auth/index.js":394,"./auth/reducers.js":395,"./auth/selectors.js":396,"./auth/spec-wrap-actions.js":397,"./configs/actions.js":235,"./configs/helpers.js":234,"./configs/index.js":400,"./configs/reducers.js":403,"./configs/selectors.js":402,"./configs/spec-actions.js":401,"./deep-linking/helpers.js":406,"./deep-linking/index.js":404,"./deep-linking/layout.js":405,"./deep-linking/operation-tag-wrapper.jsx":408,"./deep-linking/operation-wrapper.jsx":407,"./download-url.js":399,"./err/actions.js":127,"./err/error-transformers/hook.js":322,"./err/error-transformers/transformers/not-of-type.js":323,"./err/error-transformers/transformers/parameter-oneof.js":324,"./err/index.js":320,"./err/reducers.js":321,"./err/selectors.js":325,"./filter/index.js":409,"./filter/opsFilter.js":410,"./layout/actions.js":202,"./layout/index.js":326,"./layout/reducers.js":327,"./layout/selectors.js":328,"./logs/index.js":385,"./oas3/actions.js":237,"./oas3/auth-extensions/wrap-selectors.js":424,"./oas3/components/callbacks.jsx":427,"./oas3/components/http-auth.jsx":433,"./oas3/components/index.js":426,"./oas3/components/operation-link.jsx":429,"./oas3/components/operation-servers.jsx":434,"./oas3/components/request-body-editor.jsx":432,"./oas3/components/request-body.jsx":428,"./oas3/components/servers-container.jsx":431,"./oas3/components/servers.jsx":430,"./oas3/helpers.jsx":35,"./oas3/index.js":422,"./oas3/reducers.js":444,"./oas3/selectors.js":443,"./oas3/spec-extensions/selectors.js":425,"./oas3/spec-extensions/wrap-selectors.js":423,"./oas3/wrap-components/auth-item.jsx":437,"./oas3/wrap-components/index.js":435,"./oas3/wrap-components/json-schema-string.jsx":442,"./oas3/wrap-components/markdown.jsx":436,"./oas3/wrap-components/model.jsx":441,"./oas3/wrap-components/online-validator-badge.js":440,"./oas3/wrap-components/parameters.jsx":438,"./oas3/wrap-components/version-stamp.jsx":439,"./on-complete/index.js":411,"./samples/fn.js":194,"./samples/index.js":384,"./spec/actions.js":203,"./spec/index.js":332,"./spec/reducers.js":333,"./spec/selectors.js":144,"./spec/wrap-actions.js":346,"./swagger-js/configs-wrap-actions.js":393,"./swagger-js/index.js":386,"./util/index.js":398,"./view/index.js":347,"./view/root-injects.jsx":348};function o(e){return n(i(e))}function i(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=1059}])}); +/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(function(){try{return require("esprima")}catch(e){}}()):"function"==typeof define&&define.amd?define(["esprima"],t):"object"==typeof exports?exports.SwaggerUIBundle=t(function(){try{return require("esprima")}catch(e){}}()):e.SwaggerUIBundle=t(e.esprima)}(this,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/dist",n(n.s=556)}([function(e,t,n){"use strict";e.exports=n(131)},function(e,t,n){e.exports=function(){"use strict";var e=Array.prototype.slice;function t(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function n(e){return i(e)?e:J(e)}function r(e){return s(e)?e:K(e)}function o(e){return u(e)?e:Y(e)}function a(e){return i(e)&&!c(e)?e:G(e)}function i(e){return!(!e||!e[p])}function s(e){return!(!e||!e[f])}function u(e){return!(!e||!e[h])}function c(e){return s(e)||u(e)}function l(e){return!(!e||!e[d])}t(r,n),t(o,n),t(a,n),n.isIterable=i,n.isKeyed=s,n.isIndexed=u,n.isAssociative=c,n.isOrdered=l,n.Keyed=r,n.Indexed=o,n.Set=a;var p="@@__IMMUTABLE_ITERABLE__@@",f="@@__IMMUTABLE_KEYED__@@",h="@@__IMMUTABLE_INDEXED__@@",d="@@__IMMUTABLE_ORDERED__@@",m="delete",v=5,g=1<>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?A(e)+t:t}function O(){return!0}function j(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function T(e,t){return P(e,t,0)}function I(e,t){return P(e,t,t)}function P(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var N=0,M=1,R=2,D="function"==typeof Symbol&&Symbol.iterator,L="@@iterator",B=D||L;function F(e){this.next=e}function U(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function q(){return{value:void 0,done:!0}}function z(e){return!!H(e)}function V(e){return e&&"function"==typeof e.next}function W(e){var t=H(e);return t&&t.call(e)}function H(e){var t=e&&(D&&e[D]||e[L]);if("function"==typeof t)return t}function $(e){return e&&"number"==typeof e.length}function J(e){return null==e?ie():i(e)?e.toSeq():ce(e)}function K(e){return null==e?ie().toKeyedSeq():i(e)?s(e)?e.toSeq():e.fromEntrySeq():se(e)}function Y(e){return null==e?ie():i(e)?s(e)?e.entrySeq():e.toIndexedSeq():ue(e)}function G(e){return(null==e?ie():i(e)?s(e)?e.entrySeq():e:ue(e)).toSetSeq()}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=N,F.VALUES=M,F.ENTRIES=R,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[B]=function(){return this},t(J,n),J.of=function(){return J(arguments)},J.prototype.toSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq {","}")},J.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},J.prototype.__iterate=function(e,t){return pe(this,e,t,!0)},J.prototype.__iterator=function(e,t){return fe(this,e,t,!0)},t(K,J),K.prototype.toKeyedSeq=function(){return this},t(Y,J),Y.of=function(){return Y(arguments)},Y.prototype.toIndexedSeq=function(){return this},Y.prototype.toString=function(){return this.__toString("Seq [","]")},Y.prototype.__iterate=function(e,t){return pe(this,e,t,!1)},Y.prototype.__iterator=function(e,t){return fe(this,e,t,!1)},t(G,J),G.of=function(){return G(arguments)},G.prototype.toSetSeq=function(){return this},J.isSeq=ae,J.Keyed=K,J.Set=G,J.Indexed=Y;var Z,X,Q,ee="@@__IMMUTABLE_SEQ__@@";function te(e){this._array=e,this.size=e.length}function ne(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function re(e){this._iterable=e,this.size=e.length||e.size}function oe(e){this._iterator=e,this._iteratorCache=[]}function ae(e){return!(!e||!e[ee])}function ie(){return Z||(Z=new te([]))}function se(e){var t=Array.isArray(e)?new te(e).fromEntrySeq():V(e)?new oe(e).fromEntrySeq():z(e)?new re(e).fromEntrySeq():"object"==typeof e?new ne(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function ue(e){var t=le(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ce(e){var t=le(e)||"object"==typeof e&&new ne(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function le(e){return $(e)?new te(e):V(e)?new oe(e):z(e)?new re(e):void 0}function pe(e,t,n,r){var o=e._cache;if(o){for(var a=o.length-1,i=0;i<=a;i++){var s=o[n?a-i:i];if(!1===t(s[1],r?s[0]:i,e))return i+1}return i}return e.__iterateUncached(t,n)}function fe(e,t,n,r){var o=e._cache;if(o){var a=o.length-1,i=0;return new F((function(){var e=o[n?a-i:i];return i++>a?q():U(t,r?e[0]:i-1,e[1])}))}return e.__iteratorUncached(t,n)}function he(e,t){return t?de(t,e,"",{"":e}):me(e)}function de(e,t,n,r){return Array.isArray(t)?e.call(r,n,Y(t).map((function(n,r){return de(e,n,r,t)}))):ve(t)?e.call(r,n,K(t).map((function(n,r){return de(e,n,r,t)}))):t}function me(e){return Array.isArray(e)?Y(e).map(me).toList():ve(e)?K(e).map(me).toMap():e}function ve(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ge(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ye(e,t){if(e===t)return!0;if(!i(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||s(e)!==s(t)||u(e)!==u(t)||l(e)!==l(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!c(e);if(l(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ge(o[1],e)&&(n||ge(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var a=e;e=t,t=a}var p=!0,f=t.__iterate((function(t,r){if(n?!e.has(t):o?!ge(t,e.get(r,b)):!ge(e.get(r,b),t))return p=!1,!1}));return p&&e.size===f}function be(e,t){if(!(this instanceof be))return new be(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(X)return X;X=this}}function _e(e,t){if(!e)throw new Error(t)}function xe(e,t,n){if(!(this instanceof xe))return new xe(e,t,n);if(_e(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?q():U(e,o,n[t?r-o++:o++])}))},t(ne,K),ne.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},ne.prototype.has=function(e){return this._object.hasOwnProperty(e)},ne.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,a=0;a<=o;a++){var i=r[t?o-a:a];if(!1===e(n[i],i,this))return a+1}return a},ne.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,a=0;return new F((function(){var i=r[t?o-a:a];return a++>o?q():U(e,i,n[i])}))},ne.prototype[d]=!0,t(re,Y),re.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=W(this._iterable),r=0;if(V(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},re.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=W(this._iterable);if(!V(n))return new F(q);var r=0;return new F((function(){var t=n.next();return t.done?t:U(e,r++,t.value)}))},t(oe,Y),oe.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,a=0;a=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return U(e,o,r[o++])}))},t(be,Y),be.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},be.prototype.get=function(e,t){return this.has(e)?this._value:t},be.prototype.includes=function(e){return ge(this._value,e)},be.prototype.slice=function(e,t){var n=this.size;return j(e,t,n)?this:new be(this._value,I(t,n)-T(e,n))},be.prototype.reverse=function(){return this},be.prototype.indexOf=function(e){return ge(this._value,e)?0:-1},be.prototype.lastIndexOf=function(e){return ge(this._value,e)?this.size:-1},be.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?q():U(e,a++,i)}))},xe.prototype.equals=function(e){return e instanceof xe?this._start===e._start&&this._end===e._end&&this._step===e._step:ye(this,e)},t(we,n),t(Ee,we),t(Se,we),t(Ce,we),we.Keyed=Ee,we.Indexed=Se,we.Set=Ce;var Ae="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function ke(e){return e>>>1&1073741824|3221225471&e}function Oe(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){if(e!=e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return ke(n)}if("string"===t)return e.length>Fe?je(e):Te(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return Ie(e);if("function"==typeof e.toString)return Te(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function je(e){var t=ze[e];return void 0===t&&(t=Te(e),qe===Ue&&(qe=0,ze={}),qe++,ze[e]=t),t}function Te(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}var Re,De="function"==typeof WeakMap;De&&(Re=new WeakMap);var Le=0,Be="__immutablehash__";"function"==typeof Symbol&&(Be=Symbol(Be));var Fe=16,Ue=255,qe=0,ze={};function Ve(e){_e(e!==1/0,"Cannot perform this action with an infinite size.")}function We(e){return null==e?ot():He(e)&&!l(e)?e:ot().withMutations((function(t){var n=r(e);Ve(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function He(e){return!(!e||!e[Je])}t(We,Ee),We.of=function(){var t=e.call(arguments,0);return ot().withMutations((function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}}))},We.prototype.toString=function(){return this.__toString("Map {","}")},We.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},We.prototype.set=function(e,t){return at(this,e,t)},We.prototype.setIn=function(e,t){return this.updateIn(e,b,(function(){return t}))},We.prototype.remove=function(e){return at(this,e,b)},We.prototype.deleteIn=function(e){return this.updateIn(e,(function(){return b}))},We.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},We.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=vt(this,wn(e),t,n);return r===b?void 0:r},We.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ot()},We.prototype.merge=function(){return ft(this,void 0,arguments)},We.prototype.mergeWith=function(t){return ft(this,t,e.call(arguments,1))},We.prototype.mergeIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.merge?e.merge.apply(e,n):n[n.length-1]}))},We.prototype.mergeDeep=function(){return ft(this,ht,arguments)},We.prototype.mergeDeepWith=function(t){var n=e.call(arguments,1);return ft(this,dt(t),n)},We.prototype.mergeDeepIn=function(t){var n=e.call(arguments,1);return this.updateIn(t,ot(),(function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,n):n[n.length-1]}))},We.prototype.sort=function(e){return zt(pn(this,e))},We.prototype.sortBy=function(e,t){return zt(pn(this,t,e))},We.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},We.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new S)},We.prototype.asImmutable=function(){return this.__ensureOwner()},We.prototype.wasAltered=function(){return this.__altered},We.prototype.__iterator=function(e,t){return new et(this,e,t)},We.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate((function(t){return r++,e(t[1],t[0],n)}),t),r},We.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?rt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},We.isMap=He;var $e,Je="@@__IMMUTABLE_MAP__@@",Ke=We.prototype;function Ye(e,t){this.ownerID=e,this.entries=t}function Ge(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ze(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Xe(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function Qe(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function et(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&nt(e._root)}function tt(e,t){return U(e,t[0],t[1])}function nt(e,t){return{node:e,index:0,__prev:t}}function rt(e,t,n,r){var o=Object.create(Ke);return o.size=e,o._root=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function ot(){return $e||($e=rt(0))}function at(e,t,n){var r,o;if(e._root){var a=w(_),i=w(x);if(r=it(e._root,e.__ownerID,0,void 0,t,n,a,i),!i.value)return e;o=e.size+(a.value?n===b?-1:1:0)}else{if(n===b)return e;o=1,r=new Ye(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=o,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?rt(o,r):ot()}function it(e,t,n,r,o,a,i,s){return e?e.update(t,n,r,o,a,i,s):a===b?e:(E(s),E(i),new Qe(t,r,[o,a]))}function st(e){return e.constructor===Qe||e.constructor===Xe}function ut(e,t,n,r,o){if(e.keyHash===r)return new Xe(t,r,[e.entry,o]);var a,i=(0===n?e.keyHash:e.keyHash>>>n)&y,s=(0===n?r:r>>>n)&y;return new Ge(t,1<>>=1)i[s]=1&n?t[a++]:void 0;return i[r]=o,new Ze(e,a+1,i)}function ft(e,t,n){for(var o=[],a=0;a>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function yt(e,t,n,r){var o=r?e:C(e);return o[t]=n,o}function bt(e,t,n,r){var o=e.length+1;if(r&&t+1===o)return e[t]=n,e;for(var a=new Array(o),i=0,s=0;s=xt)return ct(e,u,r,o);var f=e&&e===this.ownerID,h=f?u:C(u);return p?s?c===l-1?h.pop():h[c]=h.pop():h[c]=[r,o]:h.push([r,o]),f?(this.entries=h,this):new Ye(e,h)}},Ge.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=1<<((0===e?t:t>>>e)&y),a=this.bitmap;return 0==(a&o)?r:this.nodes[gt(a&o-1)].get(e+v,t,n,r)},Ge.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&y,u=1<=wt)return pt(e,f,c,s,d);if(l&&!d&&2===f.length&&st(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&st(d))return d;var m=e&&e===this.ownerID,g=l?d?c:c^u:c|u,_=l?d?yt(f,p,d,m):_t(f,p,m):bt(f,p,d,m);return m?(this.bitmap=g,this.nodes=_,this):new Ge(e,g,_)},Ze.prototype.get=function(e,t,n,r){void 0===t&&(t=Oe(n));var o=(0===e?t:t>>>e)&y,a=this.nodes[o];return a?a.get(e+v,t,n,r):r},Ze.prototype.update=function(e,t,n,r,o,a,i){void 0===n&&(n=Oe(r));var s=(0===t?n:n>>>t)&y,u=o===b,c=this.nodes,l=c[s];if(u&&!l)return this;var p=it(l,e,t+v,n,r,o,a,i);if(p===l)return this;var f=this.count;if(l){if(!p&&--f0&&r=0&&e>>t&y;if(r>=this.array.length)return new Ot([],e);var o,a=0===r;if(t>0){var i=this.array[r];if((o=i&&i.removeBefore(e,t-v,n))===i&&a)return this}if(a&&!o)return this;var s=Lt(this,e);if(!a)for(var u=0;u>>t&y;if(o>=this.array.length)return this;if(t>0){var a=this.array[o];if((r=a&&a.removeAfter(e,t-v,n))===a&&o===this.array.length-1)return this}var i=Lt(this,e);return i.array.splice(o+1),r&&(i.array[o]=r),i};var jt,Tt,It={};function Pt(e,t){var n=e._origin,r=e._capacity,o=qt(r),a=e._tail;return i(e._root,e._level,0);function i(e,t,n){return 0===t?s(e,n):u(e,t,n)}function s(e,i){var s=i===o?a&&a.array:e&&e.array,u=i>n?0:n-i,c=r-i;return c>g&&(c=g),function(){if(u===c)return It;var e=t?--c:u++;return s&&s[e]}}function u(e,o,a){var s,u=e&&e.array,c=a>n?0:n-a>>o,l=1+(r-a>>o);return l>g&&(l=g),function(){for(;;){if(s){var e=s();if(e!==It)return e;s=null}if(c===l)return It;var n=t?--l:c++;s=i(u&&u[n],o-v,a+(n<=e.size||t<0)return e.withMutations((function(e){t<0?Ft(e,t).set(0,n):Ft(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,a=w(x);return t>=qt(e._capacity)?r=Dt(r,e.__ownerID,0,t,n,a):o=Dt(o,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Nt(e._origin,e._capacity,e._level,o,r):e}function Dt(e,t,n,r,o,a){var i,s=r>>>n&y,u=e&&s0){var c=e&&e.array[s],l=Dt(c,t,n-v,r,o,a);return l===c?e:((i=Lt(e,t)).array[s]=l,i)}return u&&e.array[s]===o?e:(E(a),i=Lt(e,t),void 0===o&&s===i.array.length-1?i.array.pop():i.array[s]=o,i)}function Lt(e,t){return t&&e&&t===e.ownerID?e:new Ot(e?e.array.slice():[],t)}function Bt(e,t){if(t>=qt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&y],r-=v;return n}}function Ft(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new S,o=e._origin,a=e._capacity,i=o+t,s=void 0===n?a:n<0?a+n:o+n;if(i===o&&s===a)return e;if(i>=s)return e.clear();for(var u=e._level,c=e._root,l=0;i+l<0;)c=new Ot(c&&c.array.length?[void 0,c]:[],r),l+=1<<(u+=v);l&&(i+=l,o+=l,s+=l,a+=l);for(var p=qt(a),f=qt(s);f>=1<p?new Ot([],r):h;if(h&&f>p&&iv;g-=v){var b=p>>>g&y;m=m.array[b]=Lt(m.array[b],r)}m.array[p>>>v&y]=h}if(s=f)i-=f,s-=f,u=v,c=null,d=d&&d.removeBefore(r,0,i);else if(i>o||f>>u&y;if(_!==f>>>u&y)break;_&&(l+=(1<o&&(c=c.removeBefore(r,u,i-l)),c&&fa&&(a=c.size),i(u)||(c=c.map((function(e){return he(e)}))),r.push(c)}return a>e.size&&(e=e.setSize(a)),mt(e,t,r)}function qt(e){return e>>v<=g&&i.size>=2*a.size?(r=(o=i.filter((function(e,t){return void 0!==e&&s!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=a.remove(t),o=s===i.size-1?i.pop():i.set(s,void 0))}else if(u){if(n===i.get(s)[1])return e;r=a,o=i.set(s,[t,n])}else r=a.set(t,i.size),o=i.set(i.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):Wt(r,o)}function Jt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Kt(e){this._iter=e,this.size=e.size}function Yt(e){this._iter=e,this.size=e.size}function Gt(e){this._iter=e,this.size=e.size}function Zt(e){var t=bn(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=_n,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(t===R){var r=e.__iterator(t,n);return new F((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(t===M?N:M,n)},t}function Xt(e,t,n){var r=bn(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var a=e.get(r,b);return a===b?o:t.call(n,a,r,e)},r.__iterateUncached=function(r,o){var a=this;return e.__iterate((function(e,o,i){return!1!==r(t.call(n,e,o,i),o,a)}),o)},r.__iteratorUncached=function(r,o){var a=e.__iterator(R,o);return new F((function(){var o=a.next();if(o.done)return o;var i=o.value,s=i[0];return U(r,s,t.call(n,i[1],s,e),o)}))},r}function Qt(e,t){var n=bn(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=Zt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=_n,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function en(e,t,n,r){var o=bn(e);return r&&(o.has=function(r){var o=e.get(r,b);return o!==b&&!!t.call(n,o,r,e)},o.get=function(r,o){var a=e.get(r,b);return a!==b&&t.call(n,a,r,e)?a:o}),o.__iterateUncached=function(o,a){var i=this,s=0;return e.__iterate((function(e,a,u){if(t.call(n,e,a,u))return s++,o(e,r?a:s-1,i)}),a),s},o.__iteratorUncached=function(o,a){var i=e.__iterator(R,a),s=0;return new F((function(){for(;;){var a=i.next();if(a.done)return a;var u=a.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return U(o,r?c:s++,l,a)}}))},o}function tn(e,t,n){var r=We().asMutable();return e.__iterate((function(o,a){r.update(t.call(n,o,a,e),0,(function(e){return e+1}))})),r.asImmutable()}function nn(e,t,n){var r=s(e),o=(l(e)?zt():We()).asMutable();e.__iterate((function(a,i){o.update(t.call(n,a,i,e),(function(e){return(e=e||[]).push(r?[i,a]:a),e}))}));var a=yn(e);return o.map((function(t){return mn(e,a(t))}))}function rn(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=o:n|=0),j(t,n,o))return e;var a=T(t,o),i=I(n,o);if(a!=a||i!=i)return rn(e.toSeq().cacheResult(),t,n,r);var s,u=i-a;u==u&&(s=u<0?0:u);var c=bn(e);return c.size=0===s?s:e.size&&s||void 0,!r&&ae(e)&&s>=0&&(c.get=function(t,n){return(t=k(this,t))>=0&&ts)return q();var e=o.next();return r||t===M?e:U(t,u-1,t===N?void 0:e.value[1],e)}))},c}function on(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterate(r,o);var i=0;return e.__iterate((function(e,o,s){return t.call(n,e,o,s)&&++i&&r(e,o,a)})),i},r.__iteratorUncached=function(r,o){var a=this;if(o)return this.cacheResult().__iterator(r,o);var i=e.__iterator(R,o),s=!0;return new F((function(){if(!s)return q();var e=i.next();if(e.done)return e;var o=e.value,u=o[0],c=o[1];return t.call(n,c,u,a)?r===R?e:U(r,u,c,e):(s=!1,q())}))},r}function an(e,t,n,r){var o=bn(e);return o.__iterateUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterate(o,a);var s=!0,u=0;return e.__iterate((function(e,a,c){if(!s||!(s=t.call(n,e,a,c)))return u++,o(e,r?a:u-1,i)})),u},o.__iteratorUncached=function(o,a){var i=this;if(a)return this.cacheResult().__iterator(o,a);var s=e.__iterator(R,a),u=!0,c=0;return new F((function(){var e,a,l;do{if((e=s.next()).done)return r||o===M?e:U(o,c++,o===N?void 0:e.value[1],e);var p=e.value;a=p[0],l=p[1],u&&(u=t.call(n,l,a,i))}while(u);return o===R?e:U(o,a,l,e)}))},o}function sn(e,t){var n=s(e),o=[e].concat(t).map((function(e){return i(e)?n&&(e=r(e)):e=n?se(e):ue(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var a=o[0];if(a===e||n&&s(a)||u(e)&&u(a))return a}var c=new te(o);return n?c=c.toKeyedSeq():u(e)||(c=c.toSetSeq()),(c=c.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),c}function un(e,t,n){var r=bn(e);return r.__iterateUncached=function(r,o){var a=0,s=!1;function u(e,c){var l=this;e.__iterate((function(e,o){return(!t||c0}function dn(e,t,r){var o=bn(e);return o.size=new te(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(M,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var a=r.map((function(e){return e=n(e),W(o?e.reverse():e)})),i=0,s=!1;return new F((function(){var n;return s||(n=a.map((function(e){return e.next()})),s=n.some((function(e){return e.done}))),s?q():U(e,i++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function mn(e,t){return ae(e)?t:e.constructor(t)}function vn(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function gn(e){return Ve(e.size),A(e)}function yn(e){return s(e)?r:u(e)?o:a}function bn(e){return Object.create((s(e)?K:u(e)?Y:G).prototype)}function _n(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):J.prototype.cacheResult.call(this)}function xn(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Kn(e,t)},Vn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Ve(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Kn(t,n)},Vn.prototype.pop=function(){return this.slice(1)},Vn.prototype.unshift=function(){return this.push.apply(this,arguments)},Vn.prototype.unshiftAll=function(e){return this.pushAll(e)},Vn.prototype.shift=function(){return this.pop.apply(this,arguments)},Vn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Yn()},Vn.prototype.slice=function(e,t){if(j(e,t,this.size))return this;var n=T(e,this.size);if(I(t,this.size)!==this.size)return Se.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):Kn(r,o)},Vn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Kn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Vn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},Vn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new F((function(){if(r){var t=r.value;return r=r.next,U(e,n++,t)}return q()}))},Vn.isStack=Wn;var Hn,$n="@@__IMMUTABLE_STACK__@@",Jn=Vn.prototype;function Kn(e,t,n,r){var o=Object.create(Jn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function Yn(){return Hn||(Hn=Kn(0))}function Gn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}Jn[$n]=!0,Jn.withMutations=Ke.withMutations,Jn.asMutable=Ke.asMutable,Jn.asImmutable=Ke.asImmutable,Jn.wasAltered=Ke.wasAltered,n.Iterator=F,Gn(n,{toArray:function(){Ve(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Kt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Jt(this,!0)},toMap:function(){return We(this.toKeyedSeq())},toObject:function(){Ve(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return zt(this.toKeyedSeq())},toOrderedSet:function(){return Ln(s(this)?this.valueSeq():this)},toSet:function(){return jn(s(this)?this.valueSeq():this)},toSetSeq:function(){return new Yt(this)},toSeq:function(){return u(this)?this.toIndexedSeq():s(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Vn(s(this)?this.valueSeq():this)},toList:function(){return St(s(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){return mn(this,sn(this,e.call(arguments,0)))},includes:function(e){return this.some((function(t){return ge(t,e)}))},entries:function(){return this.__iterator(R)},every:function(e,t){Ve(this.size);var n=!0;return this.__iterate((function(r,o,a){if(!e.call(t,r,o,a))return n=!1,!1})),n},filter:function(e,t){return mn(this,en(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return Ve(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Ve(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(N)},map:function(e,t){return mn(this,Xt(this,e,t))},reduce:function(e,t,n){var r,o;return Ve(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,a,i){o?(o=!1,r=t):r=e.call(n,r,t,a,i)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return mn(this,Qt(this,!0))},slice:function(e,t){return mn(this,rn(this,e,t,!0))},some:function(e,t){return!this.every(tr(e),t)},sort:function(e){return mn(this,pn(this,e))},values:function(){return this.__iterator(M)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return A(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return tn(this,e,t)},equals:function(e){return ye(this,e)},entrySeq:function(){var e=this;if(e._cache)return new te(e._cache);var t=e.toSeq().map(er).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tr(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate((function(n,o,a){if(e.call(t,n,o,a))return r=[o,n],!1})),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(O)},flatMap:function(e,t){return mn(this,cn(this,e,t))},flatten:function(e){return mn(this,un(this,e,!0))},fromEntrySeq:function(){return new Gt(this)},get:function(e,t){return this.find((function(t,n){return ge(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=wn(e);!(n=o.next()).done;){var a=n.value;if((r=r&&r.get?r.get(a,b):b)===b)return t}return r},groupBy:function(e,t){return nn(this,e,t)},has:function(e){return this.get(e,b)!==b},hasIn:function(e){return this.getIn(e,b)!==b},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keyOf:function(e){return this.findKey((function(t){return ge(t,e)}))},keySeq:function(){return this.toSeq().map(Qn).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return fn(this,e)},maxBy:function(e,t){return fn(this,t,e)},min:function(e){return fn(this,e?nr(e):ar)},minBy:function(e,t){return fn(this,t?nr(t):ar,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return mn(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return mn(this,an(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tr(e),t)},sortBy:function(e,t){return mn(this,pn(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return mn(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return mn(this,on(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tr(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=ir(this))}});var Zn=n.prototype;Zn[p]=!0,Zn[B]=Zn.values,Zn.__toJS=Zn.toArray,Zn.__toStringMapper=rr,Zn.inspect=Zn.toSource=function(){return this.toString()},Zn.chain=Zn.flatMap,Zn.contains=Zn.includes,Gn(r,{flip:function(){return mn(this,Zt(this))},mapEntries:function(e,t){var n=this,r=0;return mn(this,this.toSeq().map((function(o,a){return e.call(t,[a,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return mn(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Xn=r.prototype;function Qn(e,t){return t}function er(e,t){return[t,e]}function tr(e){return function(){return!e.apply(this,arguments)}}function nr(e){return function(){return-e.apply(this,arguments)}}function rr(e){return"string"==typeof e?JSON.stringify(e):String(e)}function or(){return C(arguments)}function ar(e,t){return et?-1:0}function ir(e){if(e.size===1/0)return 0;var t=l(e),n=s(e),r=t?1:0;return sr(e.__iterate(n?t?function(e,t){r=31*r+ur(Oe(e),Oe(t))|0}:function(e,t){r=r+ur(Oe(e),Oe(t))|0}:t?function(e){r=31*r+Oe(e)|0}:function(e){r=r+Oe(e)|0}),r)}function sr(e,t){return t=Ae(t,3432918353),t=Ae(t<<15|t>>>-15,461845907),t=Ae(t<<13|t>>>-13,5),t=Ae((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=ke((t=Ae(t^t>>>13,3266489909))^t>>>16)}function ur(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Xn[f]=!0,Xn[B]=Zn.entries,Xn.__toJS=Zn.toObject,Xn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+rr(e)},Gn(o,{toKeyedSeq:function(){return new Jt(this,!1)},filter:function(e,t){return mn(this,en(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return mn(this,Qt(this,!1))},slice:function(e,t){return mn(this,rn(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=T(e,e<0?this.count():this.size);var r=this.slice(0,e);return mn(this,1===n?r:r.concat(C(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return mn(this,un(this,e,!1))},get:function(e,t){return(e=k(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=k(this,e))>=0&&(void 0!==this.size?this.size===1/0||e1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}function Ne(e){return t=e.replace(/\.[^./]*$/,""),Y()(J()(t));var t}function Me(e,t,n,r,a){if(!t)return[];var s=[],u=t.get("nullable"),c=t.get("required"),p=t.get("maximum"),h=t.get("minimum"),d=t.get("type"),m=t.get("format"),g=t.get("maxLength"),b=t.get("minLength"),x=t.get("uniqueItems"),w=t.get("maxItems"),E=t.get("minItems"),S=t.get("pattern"),C=n||c;if(u&&null===e||!d||!(C||"array"===d||!(!C&&!(null!=e))))return[];var A="string"===d&&e,k="array"===d&&l()(e)&&e.length,O="array"===d&&W.a.List.isList(e)&&e.count(),j=[A,k,O,"array"===d&&"string"==typeof e&&e,"file"===d&&e instanceof se.a.File,"boolean"===d&&(e||!1===e),"number"===d&&(e||0===e),"integer"===d&&(e||0===e),"object"===d&&"object"===i()(e)&&null!==e,"object"===d&&"string"==typeof e&&e],T=P()(j).call(j,(function(e){return!!e}));if(C&&!T&&!r)return s.push("Required field is not provided"),s;if("object"===d&&(null===a||"application/json"===a)){var I,N=e;if("string"==typeof e)try{N=JSON.parse(e)}catch(e){return s.push("Parameter string value must be valid JSON"),s}if(t&&t.has("required")&&Se(c.isList)&&c.isList()&&y()(c).call(c,(function(e){void 0===N[e]&&s.push({propKey:e,error:"Required property not found"})})),t&&t.has("properties"))y()(I=t.get("properties")).call(I,(function(e,t){var n=Me(N[t],e,!1,r,a);s.push.apply(s,o()(f()(n).call(n,(function(e){return{propKey:t,error:e}}))))}))}if(S){var M=function(e,t){if(!new RegExp(t).test(e))return"Value must follow pattern "+t}(e,S);M&&s.push(M)}if(E&&"array"===d){var R=function(e,t){var n;if(!e&&t>=1||e&&e.lengtht)return v()(n="Array must not contain more then ".concat(t," item")).call(n,1===t?"":"s")}(e,w);D&&s.push({needRemove:!0,error:D})}if(x&&"array"===d){var L=function(e,t){if(e&&("true"===t||!0===t)){var n=Object(V.fromJS)(e),r=n.toSet();if(e.length>r.size){var o=Object(V.Set)();if(y()(n).call(n,(function(e,t){_()(n).call(n,(function(t){return Se(t.equals)?t.equals(e):t===e})).size>1&&(o=o.add(t))})),0!==o.size)return f()(o).call(o,(function(e){return{index:e,error:"No duplicates allowed."}})).toArray()}}}(e,x);L&&s.push.apply(s,o()(L))}if(g||0===g){var B=function(e,t){var n;if(e.length>t)return v()(n="Value must be no longer than ".concat(t," character")).call(n,1!==t?"s":"")}(e,g);B&&s.push(B)}if(b){var F=function(e,t){var n;if(e.lengtht)return"Value must be less than ".concat(t)}(e,p);U&&s.push(U)}if(h||0===h){var q=function(e,t){if(e2&&void 0!==arguments[2]?arguments[2]:{},r=n.isOAS3,o=void 0!==r&&r,a=n.bypassRequiredCheck,i=void 0!==a&&a,s=e.get("required"),u=Object(le.a)(e,{isOAS3:o}),c=u.schema,l=u.parameterContentMediaType;return Me(t,c,s,i,l)},De=function(e,t,n){if(e&&(!e.xml||!e.xml.name)){if(e.xml=e.xml||{},!e.$$ref)return e.type||e.items||e.properties||e.additionalProperties?'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return Object(ie.memoizedCreateXMLExample)(e,t,n)},Le=[{when:/json/,shouldStringifyTypes:["string"]}],Be=["object"],Fe=function(e,t,n,r){var a=Object(ie.memoizedSampleFromSchema)(e,t,r),s=i()(a),u=S()(Le).call(Le,(function(e,t){var r;return t.when.test(n)?v()(r=[]).call(r,o()(e),o()(t.shouldStringifyTypes)):e}),Be);return te()(u,(function(e){return e===s}))?M()(a,null,2):a},Ue=function(e,t,n,r){var o,a=Fe(e,t,n,r);try{"\n"===(o=ve.a.safeDump(ve.a.safeLoad(a),{lineWidth:-1}))[o.length-1]&&(o=T()(o).call(o,0,o.length-1))}catch(e){return console.error(e),"error: could not generate yaml example"}return o.replace(/\t/g," ")},qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return e&&Se(e.toJS)&&(e=e.toJS()),r&&Se(r.toJS)&&(r=r.toJS()),/xml/.test(t)?De(e,n,r):/(yaml|yml)/.test(t)?Ue(e,n,t,r):Fe(e,n,t,r)},ze=function(){var e={},t=se.a.location.search;if(!t)return{};if(""!=t){var n=t.substr(1).split("&");for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(r=n[r].split("="),e[decodeURIComponent(r[0])]=r[1]&&decodeURIComponent(r[1])||"")}return e},Ve=function(t){return(t instanceof e?t:e.from(t.toString(),"utf-8")).toString("base64")},We={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}},tagsSorter:{alpha:function(e,t){return e.localeCompare(t)}}},He=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},$e=function(e,t,n){return!!Q()(n,(function(n){return re()(e[n],t[n])}))};function Je(e){return"string"!=typeof e||""===e?"":Object(H.sanitizeUrl)(e)}function Ke(e){return!(!e||D()(e).call(e,"localhost")>=0||D()(e).call(e,"127.0.0.1")>=0||"none"===e)}function Ye(e){if(!W.a.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;var t=B()(e).call(e,(function(e,t){return U()(t).call(t,"2")&&w()(e.get("content")||{}).length>0})),n=e.get("default")||W.a.OrderedMap(),r=(n.get("content")||W.a.OrderedMap()).keySeq().toJS().length?n:null;return t||r}var Ge=function(e){return"string"==typeof e||e instanceof String?z()(e).call(e).replace(/\s/g,"%20"):""},Ze=function(e){return ce()(Ge(e).replace(/%20/g,"_"))},Xe=function(e){return _()(e).call(e,(function(e,t){return/^x-/.test(t)}))},Qe=function(e){return _()(e).call(e,(function(e,t){return/^pattern|maxLength|minLength|maximum|minimum/.test(t)}))};function et(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0};if("object"!==i()(e)||l()(e)||null===e||!t)return e;var o=A()({},e);return y()(n=w()(o)).call(n,(function(e){e===t&&r(o[e],e)?delete o[e]:o[e]=et(o[e],t,r)})),o}function tt(e){if("string"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),"object"===i()(e)&&null!==e)try{return M()(e,null,2)}catch(t){return String(e)}return null==e?"":e.toString()}function nt(e){return"number"==typeof e?e.toString():e}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.returnAll,r=void 0!==n&&n,o=t.allowHashes,a=void 0===o||o;if(!W.a.Map.isMap(e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");var i,s,u,c=e.get("name"),l=e.get("in"),p=[];e&&e.hashCode&&l&&c&&a&&p.push(v()(i=v()(s="".concat(l,".")).call(s,c,".hash-")).call(i,e.hashCode()));l&&c&&p.push(v()(u="".concat(l,".")).call(u,c));return p.push(c),r?p:p[0]||""}function ot(e,t){var n,r=rt(e,{returnAll:!0});return _()(n=f()(r).call(r,(function(e){return t[e]}))).call(n,(function(e){return void 0!==e}))[0]}function at(){return st(fe()(32).toString("base64"))}function it(e){return st(de()("sha256").update(e).digest("base64"))}function st(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var ut=function(e){return!e||!(!ye(e)||!e.isEmpty())}}).call(this,n(76).Buffer)},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(245);function o(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:r,n=null,a=null;return function(){return o(t,n,arguments)||(a=e.apply(null,arguments)),n=arguments,a}}))},function(e,t,n){var r=n(180),o=n(583);function a(t){return"function"==typeof r&&"symbol"==typeof o?(e.exports=a=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),a(t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(614)},function(e,t,n){e.exports=n(609)},function(e,t,n){e.exports=n(607)},function(e,t,n){"use strict";var r=n(42),o=n(108).f,a=n(364),i=n(34),s=n(111),u=n(69),c=n(55),l=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,p,f,h,d,m,v,g,y=e.target,b=e.global,_=e.stat,x=e.proto,w=b?r:_?r[y]:(r[y]||{}).prototype,E=b?i:i[y]||(i[y]={}),S=E.prototype;for(f in t)n=!a(b?f:y+(_?".":"#")+f,e.forced)&&w&&c(w,f),d=E[f],n&&(m=e.noTargetGet?(g=o(w,f))&&g.value:w[f]),h=n&&m?m:t[f],n&&typeof d==typeof h||(v=e.bind&&n?s(h,r):e.wrap&&n?l(h):x&&"function"==typeof h?s(Function.call,h):h,(e.sham||h&&h.sham||d&&d.sham)&&u(v,"sham",!0),E[f]=v,x&&(c(i,p=y+"Prototype")||u(i,p,{}),i[p][f]=h,e.real&&S&&!S[f]&&u(S,f,h)))}},function(e,t,n){var r=n(455),o=n(456),a=n(886),i=n(457),s=n(891),u=n(893),c=n(898),l=n(245),p=n(3);function f(e,t){var n=r(e);if(o){var s=o(e);t&&(s=a(s).call(s,(function(t){return i(e,t).enumerable}))),n.push.apply(n,s)}return n}e.exports=function(e){for(var t=1;t>",i=function(){invariant(!1,"ImmutablePropTypes type checking code is stripped in production.")};i.isRequired=i;var s=function(){return i};function u(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":e instanceof o.Iterable?"Immutable."+e.toSource().split(" ")[0]:t}function c(e){function t(t,n,r,o,i,s){for(var u=arguments.length,c=Array(u>6?u-6:0),l=6;l4)}function l(e){var t=e.get("swagger");return"string"==typeof t&&i()(t).call(t,"2.0")}function p(e){return function(t,n){return function(r){return n&&n.specSelectors&&n.specSelectors.specJson?c(n.specSelectors.specJson())?u.a.createElement(e,o()({},r,n,{Ori:t})):u.a.createElement(t,r):(console.warn("OAS3 wrapper: couldn't get spec"),null)}}}},function(e,t,n){e.exports=n(668)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(42),o=n(231),a=n(55),i=n(184),s=n(233),u=n(365),c=o("wks"),l=r.Symbol,p=u?l:l&&l.withoutSetter||i;e.exports=function(e){return a(c,e)&&(s||"string"==typeof c[e])||(s&&a(l,e)?c[e]=l[e]:c[e]=p("Symbol."+e)),c[e]}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=i(e),c=1;c0){var o=v()(n).call(n,(function(e){return console.error(e),e.line=e.fullPath?_(x,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e}));a.newThrownErrBatch(o)}return r.updateResolved(t)}))}},Ce=[],Ae=Z()(u()(f.a.mark((function e(){var t,n,r,o,a,i,s,c,l,p,h,m,g,b,x,E,C,k;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Ce.system){e.next=4;break}return console.error("debResolveSubtrees: don't have a system to operate on, aborting."),e.abrupt("return");case 4:if(n=t.errActions,r=t.errSelectors,o=t.fn,a=o.resolveSubtree,i=o.fetch,s=o.AST,c=void 0===s?{}:s,l=t.specSelectors,p=t.specActions,a){e.next=8;break}return console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing."),e.abrupt("return");case 8:return h=c.getLineNumberForPath?c.getLineNumberForPath:function(){},m=l.specStr(),g=t.getConfigs(),b=g.modelPropertyMacro,x=g.parameterMacro,E=g.requestInterceptor,C=g.responseInterceptor,e.prev=11,e.next=14,_()(Ce).call(Ce,function(){var e=u()(f.a.mark((function e(t,o){var s,c,p,g,_,k,j,T,I;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t;case 2:return s=e.sent,c=s.resultMap,p=s.specWithCurrentSubtrees,e.next=7,a(p,o,{baseDoc:l.url(),modelPropertyMacro:b,parameterMacro:x,requestInterceptor:E,responseInterceptor:C});case 7:if(g=e.sent,_=g.errors,k=g.spec,r.allErrors().size&&n.clearBy((function(e){var t;return"thrown"!==e.get("type")||"resolver"!==e.get("source")||!w()(t=e.get("fullPath")).call(t,(function(e,t){return e===o[t]||void 0===o[t]}))})),d()(_)&&_.length>0&&(j=v()(_).call(_,(function(e){return e.line=e.fullPath?h(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",y()(e,"message",{enumerable:!0,value:e.message}),e})),n.newThrownErrBatch(j)),!k||!l.isOAS3()||"components"!==o[0]||"securitySchemes"!==o[1]){e.next=15;break}return e.next=15,S.a.all(v()(T=A()(I=O()(k)).call(I,(function(e){return"openIdConnect"===e.type}))).call(T,function(){var e=u()(f.a.mark((function e(t){var n,r;return f.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={url:t.openIdConnectUrl,requestInterceptor:E,responseInterceptor:C},e.prev=1,e.next=4,i(n);case 4:(r=e.sent)instanceof Error||r.status>=400?console.error(r.statusText+" "+n.url):t.openIdConnectData=JSON.parse(r.text),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()));case 15:return Q()(c,o,k),Q()(p,o,k),e.abrupt("return",{resultMap:c,specWithCurrentSubtrees:p});case 18:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),S.a.resolve({resultMap:(l.specResolvedSubtree([])||Object(V.Map)()).toJS(),specWithCurrentSubtrees:l.specJson().toJS()}));case 14:k=e.sent,delete Ce.system,Ce=[],e.next=22;break;case 19:e.prev=19,e.t0=e.catch(11),console.error(e.t0);case 22:p.updateResolvedSubtree([],k.resultMap);case 23:case"end":return e.stop()}}),e,null,[[11,19]])}))),35),ke=function(e){return function(t){var n;T()(n=v()(Ce).call(Ce,(function(e){return e.join("@@")}))).call(n,e.join("@@"))>-1||(Ce.push(e),Ce.system=t,Ae())}};function Oe(e,t,n,r,o){return{type:oe,payload:{path:e,value:r,paramName:t,paramIn:n,isXml:o}}}function je(e,t,n,r){return{type:oe,payload:{path:e,param:t,value:n,isXml:r}}}var Te=function(e,t){return{type:ve,payload:{path:e,value:t}}},Ie=function(){return{type:ve,payload:{path:[],value:Object(V.Map)()}}},Pe=function(e,t){return{type:ie,payload:{pathMethod:e,isOAS3:t}}},Ne=function(e,t,n,r){return{type:ae,payload:{pathMethod:e,paramName:t,paramIn:n,includeEmptyValue:r}}};function Me(e){return{type:he,payload:{pathMethod:e}}}function Re(e,t){return{type:de,payload:{path:e,value:t,key:"consumes_value"}}}function De(e,t){return{type:de,payload:{path:e,value:t,key:"produces_value"}}}var Le=function(e,t,n){return{payload:{path:e,method:t,res:n},type:se}},Be=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ue}},Fe=function(e,t,n){return{payload:{path:e,method:t,req:n},type:ce}},Ue=function(e){return{payload:e,type:le}},qe=function(e){return function(t){var n,r,o=t.fn,a=t.specActions,i=t.specSelectors,s=t.getConfigs,c=t.oas3Selectors,l=e.pathName,p=e.method,h=e.operation,m=s(),g=m.requestInterceptor,y=m.responseInterceptor,b=h.toJS();h&&h.get("parameters")&&P()(n=A()(r=h.get("parameters")).call(r,(function(e){return e&&!0===e.get("allowEmptyValue")}))).call(n,(function(t){if(i.parameterInclusionSettingFor([l,p],t.get("name"),t.get("in"))){e.parameters=e.parameters||{};var n=Object(ee.B)(t,e.parameters);(!n||n&&0===n.size)&&(e.parameters[t.get("name")]="")}}));if(e.contextUrl=H()(i.url()).toString(),b&&b.operationId?e.operationId=b.operationId:b&&l&&p&&(e.operationId=o.opId(b,l,p)),i.isOAS3()){var _,x=M()(_="".concat(l,":")).call(_,p);e.server=c.selectedServer(x)||c.selectedServer();var w=c.serverVariables({server:e.server,namespace:x}).toJS(),E=c.serverVariables({server:e.server}).toJS();e.serverVariables=D()(w).length?w:E,e.requestContentType=c.requestContentType(l,p),e.responseContentType=c.responseContentType(l,p)||"*/*";var S,C=c.requestBodyValue(l,p),k=c.requestBodyInclusionSetting(l,p);if(C&&C.toJS)e.requestBody=A()(S=v()(C).call(C,(function(e){return V.Map.isMap(e)?e.get("value"):e}))).call(S,(function(e,t){return(d()(e)?0!==e.length:!Object(ee.q)(e))||k.get(t)})).toJS();else e.requestBody=C}var O=B()({},e);O=o.buildRequest(O),a.setRequest(e.pathName,e.method,O);var j=function(){var t=u()(f.a.mark((function t(n){var r,o;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g.apply(undefined,[n]);case 2:return r=t.sent,o=B()({},r),a.setMutatedRequest(e.pathName,e.method,o),t.abrupt("return",r);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();e.requestInterceptor=j,e.responseInterceptor=y;var T=U()();return o.execute(e).then((function(t){t.duration=U()()-T,a.setResponse(e.pathName,e.method,t)})).catch((function(t){"Failed to fetch"===t.message&&(t.name="",t.message='**Failed to fetch.** \n**Possible Reasons:** \n - CORS \n - Network Failure \n - URL scheme must be "http" or "https" for CORS request.'),a.setResponse(e.pathName,e.method,{error:!0,err:J()(t)})}))}},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=i()(e,["path","method"]);return function(e){var a=e.fn.fetch,i=e.specSelectors,s=e.specActions,u=i.specJsonWithResolvedSubtrees().toJS(),c=i.operationScheme(t,n),l=i.contentTypeValues([t,n]).toJS(),p=l.requestContentType,f=l.responseContentType,h=/xml/i.test(p),d=i.parameterValues([t,n],h).toJS();return s.executeRequest(o()(o()({},r),{},{fetch:a,spec:u,pathName:t,method:n,parameters:d,requestContentType:p,scheme:c,responseContentType:f}))}};function Ve(e,t){return{type:pe,payload:{path:e,method:t}}}function We(e,t){return{type:fe,payload:{path:e,method:t}}}function He(e,t,n){return{type:ge,payload:{scheme:e,path:t,method:n}}}},function(e,t,n){var r=n(34),o=n(55),a=n(240),i=n(70).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||i(t,e,{value:a.f(e)})}},function(e,t,n){"use strict";var r=n(166),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],a=["scalar","sequence","mapping"];e.exports=function(e,t){var n,i;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===o.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,i={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){i[String(t)]=e}))})),i),-1===a.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(38);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(180),o=n(655),a=n(247),i=n(403),s=n(188);e.exports=function(e,t){var n;if(void 0===r||null==o(e)){if(a(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var u=0,c=function(){};return{s:c,n:function(){return u>=e.length?{done:!0}:{done:!1,value:e[u++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,p=!0,f=!1;return{s:function(){n=i(e)},n:function(){var e=n.next();return p=e.done,e},e:function(e){f=!0,l=e},f:function(){try{p||null==n.return||n.return()}finally{if(f)throw l}}}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(46);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(456),o=n(458),a=n(903);e.exports=function(e,t){if(null==e)return{};var n,i,s=a(e,t);if(r){var u=r(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_SELECTED_SERVER",(function(){return r})),n.d(t,"UPDATE_REQUEST_BODY_VALUE",(function(){return o})),n.d(t,"UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG",(function(){return a})),n.d(t,"UPDATE_REQUEST_BODY_INCLUSION",(function(){return i})),n.d(t,"UPDATE_ACTIVE_EXAMPLES_MEMBER",(function(){return s})),n.d(t,"UPDATE_REQUEST_CONTENT_TYPE",(function(){return u})),n.d(t,"UPDATE_RESPONSE_CONTENT_TYPE",(function(){return c})),n.d(t,"UPDATE_SERVER_VARIABLE_VALUE",(function(){return l})),n.d(t,"SET_REQUEST_BODY_VALIDATE_ERROR",(function(){return p})),n.d(t,"CLEAR_REQUEST_BODY_VALIDATE_ERROR",(function(){return f})),n.d(t,"CLEAR_REQUEST_BODY_VALUE",(function(){return h})),n.d(t,"setSelectedServer",(function(){return d})),n.d(t,"setRequestBodyValue",(function(){return m})),n.d(t,"setRetainRequestBodyValueFlag",(function(){return v})),n.d(t,"setRequestBodyInclusion",(function(){return g})),n.d(t,"setActiveExamplesMember",(function(){return y})),n.d(t,"setRequestContentType",(function(){return b})),n.d(t,"setResponseContentType",(function(){return _})),n.d(t,"setServerVariableValue",(function(){return x})),n.d(t,"setRequestBodyValidateError",(function(){return w})),n.d(t,"clearRequestBodyValidateError",(function(){return E})),n.d(t,"initRequestBodyValidateError",(function(){return S})),n.d(t,"clearRequestBodyValue",(function(){return C}));var r="oas3_set_servers",o="oas3_set_request_body_value",a="oas3_set_request_body_retain_flag",i="oas3_set_request_body_inclusion",s="oas3_set_active_examples_member",u="oas3_set_request_content_type",c="oas3_set_response_content_type",l="oas3_set_server_variable_value",p="oas3_set_request_body_validate_error",f="oas3_clear_request_body_validate_error",h="oas3_clear_request_body_value";function d(e,t){return{type:r,payload:{selectedServerUrl:e,namespace:t}}}function m(e){var t=e.value,n=e.pathMethod;return{type:o,payload:{value:t,pathMethod:n}}}var v=function(e){var t=e.value,n=e.pathMethod;return{type:a,payload:{value:t,pathMethod:n}}};function g(e){var t=e.value,n=e.pathMethod,r=e.name;return{type:i,payload:{value:t,pathMethod:n,name:r}}}function y(e){var t=e.name,n=e.pathMethod,r=e.contextType,o=e.contextName;return{type:s,payload:{name:t,pathMethod:n,contextType:r,contextName:o}}}function b(e){var t=e.value,n=e.pathMethod;return{type:u,payload:{value:t,pathMethod:n}}}function _(e){var t=e.value,n=e.path,r=e.method;return{type:c,payload:{value:t,path:n,method:r}}}function x(e){var t=e.server,n=e.namespace,r=e.key,o=e.val;return{type:l,payload:{server:t,namespace:n,key:r,val:o}}}var w=function(e){var t=e.path,n=e.method,r=e.validationErrors;return{type:p,payload:{path:t,method:n,validationErrors:r}}},E=function(e){var t=e.path,n=e.method;return{type:f,payload:{path:t,method:n}}},S=function(e){var t=e.pathMethod;return{type:f,payload:{path:t[0],method:t[1]}}},C=function(e){var t=e.pathMethod;return{type:h,payload:{pathMethod:t}}}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},function(e,t,n){e.exports=n(682)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"e",(function(){return _})),n.d(t,"c",(function(){return w})),n.d(t,"a",(function(){return E})),n.d(t,"d",(function(){return S}));var r=n(51),o=n.n(r),a=n(17),i=n.n(a),s=n(37),u=n.n(s),c=n(2),l=n.n(c),p=n(20),f=n.n(p),h=n(60),d=n.n(h),m=n(359),v=n.n(m),g=function(e){return String.prototype.toLowerCase.call(e)},y=function(e){return e.replace(/[^\w]/gi,"_")};function b(e){var t=e.openapi;return!!t&&v()(t,"3")}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==f()(e))return null;var a=(e.operationId||"").replace(/\s/g,"");return a.length?y(e.operationId):x(t,n,{v2OperationIdCompatibilityMode:o})}function x(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var a,i,s=l()(a="".concat(t.toLowerCase(),"_")).call(a,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(s=s||l()(i="".concat(e.substring(1),"_")).call(i,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return l()(n="".concat(g(t))).call(n,y(e))}function w(e,t){var n;return l()(n="".concat(g(t),"-")).call(n,e)}function E(e,t){return e&&e.paths?function(e,t){return function(e,t,n){if(!e||"object"!==f()(e)||!e.paths||"object"!==f()(e.paths))return null;var r=e.paths;for(var o in r)for(var a in r[o])if("PARAMETERS"!==a.toUpperCase()){var i=r[o][a];if(i&&"object"===f()(i)){var s={spec:e,pathName:o,method:a.toUpperCase(),operation:i},u=t(s);if(n&&u)return s}}return}(e,t,!0)||null}(e,(function(e){var n,r=e.pathName,o=e.method,a=e.operation;if(!a||"object"!==f()(a))return!1;var i=a.operationId,s=_(a,r,o),c=w(r,o);return u()(n=[s,c,i]).call(n,(function(e){return e&&e===t}))})):null}function S(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var a in n){var s=n[a];if(d()(s)){var c=s.parameters,p=function(e){var n=s[e];if(!d()(n))return"continue";var p=_(n,a,e);if(p){r[p]?r[p].push(n):r[p]=[n];var f=r[p];if(f.length>1)i()(f).call(f,(function(e,t){var n;e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=l()(n="".concat(p)).call(n,t+1)}));else if(void 0!==n.operationId){var h=f[0];h.__originalOperationId=h.__originalOperationId||n.operationId,h.operationId=p}}if("parameters"!==e){var m=[],v={};for(var g in t)"produces"!==g&&"consumes"!==g&&"security"!==g||(v[g]=t[g],m.push(v));if(c&&(v.parameters=c,m.push(v)),m.length){var y,b=o()(m);try{for(b.s();!(y=b.n()).done;){var x=y.value;for(var w in x)if(n[w]){if("parameters"===w){var E,S=o()(x[w]);try{var C=function(){var e,t=E.value;u()(e=n[w]).call(e,(function(e){return e.name&&e.name===t.name||e.$ref&&e.$ref===t.$ref||e.$$ref&&e.$$ref===t.$$ref||e===t}))||n[w].push(t)};for(S.s();!(E=S.n()).done;)C()}catch(e){S.e(e)}finally{S.f()}}}else n[w]=x[w]}}catch(e){b.e(e)}finally{b.f()}}}};for(var f in s)p(f)}}return t.$$normalized=!0,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"NEW_THROWN_ERR",(function(){return a})),n.d(t,"NEW_THROWN_ERR_BATCH",(function(){return i})),n.d(t,"NEW_SPEC_ERR",(function(){return s})),n.d(t,"NEW_SPEC_ERR_BATCH",(function(){return u})),n.d(t,"NEW_AUTH_ERR",(function(){return c})),n.d(t,"CLEAR",(function(){return l})),n.d(t,"CLEAR_BY",(function(){return p})),n.d(t,"newThrownErr",(function(){return f})),n.d(t,"newThrownErrBatch",(function(){return h})),n.d(t,"newSpecErr",(function(){return d})),n.d(t,"newSpecErrBatch",(function(){return m})),n.d(t,"newAuthErr",(function(){return v})),n.d(t,"clear",(function(){return g})),n.d(t,"clearBy",(function(){return y}));var r=n(145),o=n.n(r),a="err_new_thrown_err",i="err_new_thrown_err_batch",s="err_new_spec_err",u="err_new_spec_err_batch",c="err_new_auth_err",l="err_clear",p="err_clear_by";function f(e){return{type:a,payload:o()(e)}}function h(e){return{type:i,payload:e}}function d(e){return{type:s,payload:e}}function m(e){return{type:u,payload:e}}function v(e){return{type:c,payload:e}}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l,payload:e}}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return{type:p,payload:e}}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(76),o=r.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(a(r,t),t.Buffer=i),a(o,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return j(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var a,i=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var l=-1;for(a=n;as&&(n=s-u),a=n;a>=0;a--){for(var p=!0,f=0;fo&&(r=o):r=o;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var i=0;i>8,o=n%256,a.push(o),a.push(r);return a}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o239?4:c>223?3:c>191?2:1;if(o+p<=n)switch(p){case 1:c<128&&(l=c);break;case 2:128==(192&(a=e[o+1]))&&(u=(31&c)<<6|63&a)>127&&(l=u);break;case 3:a=e[o+1],i=e[o+2],128==(192&a)&&128==(192&i)&&(u=(15&c)<<12|(63&a)<<6|63&i)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:a=e[o+1],i=e[o+2],s=e[o+3],128==(192&a)&&128==(192&i)&&128==(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,p=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=p}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},u.prototype.compare=function(e,t,n,r,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),s=Math.min(a,i),c=this.slice(r,o),l=e.slice(t,n),p=0;po)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function O(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;or)&&(n=r);for(var o="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,o,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function R(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function D(e,t,n,r,o,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,a){return a||D(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,a){return a||D(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],o=1,a=0;++a=(o*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,o=1,a=this[e+--r];r>0&&(o*=256);)a+=this[e+--r]*o;return a>=(o*=128)&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||N(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=0,i=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);N(this,e,t,n,o-1,-o)}var a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}}).call(this,n(54))},function(e,t,n){"use strict";var r=n(857);e.exports=r},function(e,t,n){"use strict";(function(t){var r=n(924),o=n(925),a=/^[A-Za-z][A-Za-z0-9+-.]*:[\\/]+/,i=/^([a-z][a-z0-9.+-]*:)?([\\/]{1,})?([\S\s]*)/i,s=new RegExp("^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+");function u(e){return(e||"").toString().replace(s,"")}var c=[["#","hash"],["?","query"],function(e){return e.replace("\\","/")},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d+)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],l={hash:1,query:1};function p(e){var n,r=("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).location||{},o={},i=typeof(e=e||r);if("blob:"===e.protocol)o=new h(unescape(e.pathname),{});else if("string"===i)for(n in o=new h(e,{}),l)delete o[n];else if("object"===i){for(n in e)n in l||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function f(e){e=u(e);var t=i.exec(e);return{protocol:t[1]?t[1].toLowerCase():"",slashes:!!(t[2]&&t[2].length>=2),rest:t[2]&&1===t[2].length?"/"+t[3]:t[3]}}function h(e,t,n){if(e=u(e),!(this instanceof h))return new h(e,t,n);var a,i,s,l,d,m,v=c.slice(),g=typeof t,y=this,b=0;for("object"!==g&&"string"!==g&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),t=p(t),a=!(i=f(e||"")).protocol&&!i.slashes,y.slashes=i.slashes||a&&t.slashes,y.protocol=i.protocol||t.protocol||"",e=i.rest,i.slashes||(v[3]=[/(.*)/,"pathname"]);b0?o(r(e),9007199254740991):0}},function(e,t,n){var r,o,a,i=n(369),s=n(42),u=n(46),c=n(69),l=n(55),p=n(232),f=n(187),h=n(158),d=s.WeakMap;if(i){var m=p.state||(p.state=new d),v=m.get,g=m.has,y=m.set;r=function(e,t){return t.facade=e,y.call(m,e,t),t},o=function(e){return v.call(m,e)||{}},a=function(e){return g.call(m,e)}}else{var b=f("state");h[b]=!0,r=function(e,t){return t.facade=e,c(e,b,t),t},o=function(e){return l(e,b)?e[b]:{}},a=function(e){return l(e,b)}}e.exports={set:r,get:o,has:a,enforce:function(e){return a(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";var r=n(33),o=n(40),a=n(480),i=n(126),s=n(481),u=n(142),c=n(206),l=n(26),p=[],f=0,h=a.getPooled(),d=!1,m=null;function v(){w.ReactReconcileTransaction&&m||r("123")}var g=[{initialize:function(){this.dirtyComponentsLength=p.length},close:function(){this.dirtyComponentsLength!==p.length?(p.splice(0,this.dirtyComponentsLength),x()):p.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];function y(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=a.getPooled(),this.reconcileTransaction=w.ReactReconcileTransaction.getPooled(!0)}function b(e,t){return e._mountOrder-t._mountOrder}function _(e){var t=e.dirtyComponentsLength;t!==p.length&&r("124",t,p.length),p.sort(b),f++;for(var n=0;n",'"',"`"," ","\r","\n","\t"]),l=["'"].concat(c),p=["%","/","?",";","#"].concat(l),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(1103);function b(e,t,n){if(e&&o.isObject(e)&&e instanceof a)return e;var r=new a;return r.parse(e,t,n),r}a.prototype.parse=function(e,t,n){if(!o.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?N+="x":N+=P[M];if(!N.match(h)){var D=T.slice(0,k),L=T.slice(k+1),B=P.match(d);B&&(D.push(B[1]),L.unshift(B[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),j||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+F,this.href+=this.host,j&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[w])for(k=0,I=l.length;k0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift());return n.search=e.search,n.query=e.query,o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!E.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=E.slice(-1)[0],A=(n.host||e.host||E.length>1)&&("."===C||".."===C)||""===C,k=0,O=E.length;O>=0;O--)"."===(C=E[O])?E.splice(O,1):".."===C?(E.splice(O,1),k++):k&&(E.splice(O,1),k--);if(!x&&!w)for(;k--;k)E.unshift("..");!x||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var j,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);S&&(n.hostname=n.host=T?"":E.length?E.shift():"",(j=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=j.shift(),n.host=n.hostname=j.shift()));return(x=x||n.host&&E.length)&&!T&&E.unshift(""),E.length?n.pathname=E.join("/"):(n.pathname=null,n.path=null),o.isNull(n.pathname)&&o.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},a.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";n.r(t),n.d(t,"SHOW_AUTH_POPUP",(function(){return h})),n.d(t,"AUTHORIZE",(function(){return d})),n.d(t,"LOGOUT",(function(){return m})),n.d(t,"PRE_AUTHORIZE_OAUTH2",(function(){return v})),n.d(t,"AUTHORIZE_OAUTH2",(function(){return g})),n.d(t,"VALIDATE",(function(){return y})),n.d(t,"CONFIGURE_AUTH",(function(){return b})),n.d(t,"RESTORE_AUTHORIZATION",(function(){return _})),n.d(t,"showDefinitions",(function(){return x})),n.d(t,"authorize",(function(){return w})),n.d(t,"authorizeWithPersistOption",(function(){return E})),n.d(t,"logout",(function(){return S})),n.d(t,"logoutWithPersistOption",(function(){return C})),n.d(t,"preAuthorizeImplicit",(function(){return A})),n.d(t,"authorizeOauth2",(function(){return k})),n.d(t,"authorizeOauth2WithPersistOption",(function(){return O})),n.d(t,"authorizePassword",(function(){return j})),n.d(t,"authorizeApplication",(function(){return T})),n.d(t,"authorizeAccessCodeWithFormParams",(function(){return I})),n.d(t,"authorizeAccessCodeWithBasicAuthentication",(function(){return P})),n.d(t,"authorizeRequest",(function(){return N})),n.d(t,"configureAuth",(function(){return M})),n.d(t,"restoreAuthorization",(function(){return R})),n.d(t,"persistAuthorizationIfNeeded",(function(){return D}));var r=n(20),o=n.n(r),a=n(32),i=n.n(a),s=n(23),u=n.n(s),c=n(78),l=n.n(c),p=n(27),f=n(5),h="show_popup",d="authorize",m="logout",v="pre_authorize_oauth2",g="authorize_oauth2",y="validate",b="configure_auth",_="restore_authorization";function x(e){return{type:h,payload:e}}function w(e){return{type:d,payload:e}}var E=function(e){return function(t){var n=t.authActions;n.authorize(e),n.persistAuthorizationIfNeeded()}};function S(e){return{type:m,payload:e}}var C=function(e){return function(t){var n=t.authActions;n.logout(e),n.persistAuthorizationIfNeeded()}},A=function(e){return function(t){var n=t.authActions,r=t.errActions,o=e.auth,a=e.token,s=e.isValid,u=o.schema,c=o.name,l=u.get("flow");delete p.a.swaggerUIRedirectOauth2,"accessCode"===l||s||r.newAuthErr({authId:c,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),a.error?r.newAuthErr({authId:c,source:"auth",level:"error",message:i()(a)}):n.authorizeOauth2WithPersistOption({auth:o,token:a})}};function k(e){return{type:g,payload:e}}var O=function(e){return function(t){var n=t.authActions;n.authorizeOauth2(e),n.persistAuthorizationIfNeeded()}},j=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.name,a=e.username,i=e.password,s=e.passwordType,c=e.clientId,l=e.clientSecret,p={grant_type:"password",scope:e.scopes.join(" "),username:a,password:i},h={};switch(s){case"request-body":!function(e,t,n){t&&u()(e,{client_id:t});n&&u()(e,{client_secret:n})}(p,c,l);break;case"basic":h.Authorization="Basic "+Object(f.a)(c+":"+l);break;default:console.warn("Warning: invalid passwordType ".concat(s," was passed, not including client id and secret"))}return n.authorizeRequest({body:Object(f.b)(p),url:r.get("tokenUrl"),name:o,headers:h,query:{},auth:e})}};var T=function(e){return function(t){var n=t.authActions,r=e.schema,o=e.scopes,a=e.name,i=e.clientId,s=e.clientSecret,u={Authorization:"Basic "+Object(f.a)(i+":"+s)},c={grant_type:"client_credentials",scope:o.join(" ")};return n.authorizeRequest({body:Object(f.b)(c),name:a,url:r.get("tokenUrl"),auth:e,headers:u})}},I=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={grant_type:"authorization_code",code:t.code,client_id:i,client_secret:s,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(f.b)(c),name:a,url:o.get("tokenUrl"),auth:t})}},P=function(e){var t=e.auth,n=e.redirectUrl;return function(e){var r=e.authActions,o=t.schema,a=t.name,i=t.clientId,s=t.clientSecret,u=t.codeVerifier,c={Authorization:"Basic "+Object(f.a)(i+":"+s)},l={grant_type:"authorization_code",code:t.code,client_id:i,redirect_uri:n,code_verifier:u};return r.authorizeRequest({body:Object(f.b)(l),name:a,url:o.get("tokenUrl"),auth:t,headers:c})}},N=function(e){return function(t){var n,r=t.fn,a=t.getConfigs,s=t.authActions,c=t.errActions,p=t.oas3Selectors,f=t.specSelectors,h=t.authSelectors,d=e.body,m=e.query,v=void 0===m?{}:m,g=e.headers,y=void 0===g?{}:g,b=e.name,_=e.url,x=e.auth,w=(h.getConfigs()||{}).additionalQueryStringParams;if(f.isOAS3()){var E=p.serverEffectiveValue(p.selectedServer());n=l()(_,E,!0)}else n=l()(_,f.url(),!0);"object"===o()(w)&&(n.query=u()({},n.query,w));var S=n.toString(),C=u()({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},y);r.fetch({url:S,method:"post",headers:C,query:v,body:d,requestInterceptor:a().requestInterceptor,responseInterceptor:a().responseInterceptor}).then((function(e){var t=JSON.parse(e.data),n=t&&(t.error||""),r=t&&(t.parseError||"");e.ok?n||r?c.newAuthErr({authId:b,level:"error",source:"auth",message:i()(t)}):s.authorizeOauth2WithPersistOption({auth:x,token:t}):c.newAuthErr({authId:b,level:"error",source:"auth",message:e.statusText})})).catch((function(e){var t=new Error(e).message;if(e.response&&e.response.data){var n=e.response.data;try{var r="string"==typeof n?JSON.parse(n):n;r.error&&(t+=", error: ".concat(r.error)),r.error_description&&(t+=", description: ".concat(r.error_description))}catch(e){}}c.newAuthErr({authId:b,level:"error",source:"auth",message:t})}))}};function M(e){return{type:b,payload:e}}function R(e){return{type:_,payload:e}}var D=function(){return function(e){var t=e.authSelectors;if((0,e.getConfigs)().persistAuthorization){var n=t.authorized();localStorage.setItem("authorized",i()(n.toJS()))}}}},function(e,t,n){var r=n(1076);e.exports=function(e){for(var t=1;tS;S++)if((h||S in x)&&(b=w(y=x[S],S,_),e))if(t)A[S]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:u.call(A,y)}else switch(e){case 4:return!1;case 7:u.call(A,y)}return p?-1:c||l?l:A}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(e,t,n){"use strict";e.exports={current:null}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,c=[],l=!1,p=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):p=-1,c.length&&h())}function h(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++p1)for(var n=1;n0&&"/"!==t[0]}));function Se(e,t,n){var r;t=t||[];var o=xe.apply(void 0,u()(r=[e]).call(r,i()(t))).get("parameters",Object(I.List)());return w()(o).call(o,(function(e,t){var r=n&&"body"===t.get("in")?t.get("value_xml"):t.get("value");return e.set(Object(T.A)(t,{allowHashes:!1}),r)}),Object(I.fromJS)({}))}function Ce(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("in")===t}))}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(I.List.isList(e))return A()(e).call(e,(function(e){return I.Map.isMap(e)&&e.get("type")===t}))}function ke(e,t){var n,r;t=t||[];var o=z(e).getIn(u()(n=["paths"]).call(n,i()(t)),Object(I.fromJS)({})),a=e.getIn(u()(r=["meta","paths"]).call(r,i()(t)),Object(I.fromJS)({})),s=Oe(e,t),c=o.get("parameters")||new I.List,l=a.get("consumes_value")?a.get("consumes_value"):Ae(c,"file")?"multipart/form-data":Ae(c,"formData")?"application/x-www-form-urlencoded":void 0;return Object(I.fromJS)({requestContentType:l,responseContentType:s})}function Oe(e,t){var n,r;t=t||[];var o=z(e).getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==o){var a=e.getIn(u()(r=["meta","paths"]).call(r,i()(t),["produces_value"]),null),s=o.getIn(["produces",0],null);return a||s||"application/json"}}function je(e,t){var n;t=t||[];var r=z(e),a=r.getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var s=t,c=o()(s,1)[0],l=a.get("produces",null),p=r.getIn(["paths",c,"produces"],null),f=r.getIn(["produces"],null);return l||p||f}}function Te(e,t){var n;t=t||[];var r=z(e),a=r.getIn(u()(n=["paths"]).call(n,i()(t)),null);if(null!==a){var s=t,c=o()(s,1)[0],l=a.get("consumes",null),p=r.getIn(["paths",c,"consumes"],null),f=r.getIn(["consumes"],null);return l||p||f}}var Ie=function(e,t,n){var r=e.get("url").match(/^([a-z][a-z0-9+\-.]*):/),o=O()(r)?r[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""},Pe=function(e,t,n){var r;return d()(r=["http","https"]).call(r,Ie(e,t,n))>-1},Ne=function(e,t){var n;t=t||[];var r=e.getIn(u()(n=["meta","paths"]).call(n,i()(t),["parameters"]),Object(I.fromJS)([])),o=!0;return f()(r).call(r,(function(e){var t=e.get("errors");t&&t.count()&&(o=!1)})),o},Me=function(e,t){var n,r,o={requestBody:!1,requestContentType:{}},a=e.getIn(u()(n=["resolvedSubtrees","paths"]).call(n,i()(t),["requestBody"]),Object(I.fromJS)([]));return a.size<1||(a.getIn(["required"])&&(o.requestBody=a.getIn(["required"])),f()(r=a.getIn(["content"]).entrySeq()).call(r,(function(e){var t=e[0];if(e[1].getIn(["schema","required"])){var n=e[1].getIn(["schema","required"]).toJS();o.requestContentType[t]=n}}))),o},Re=function(e,t,n,r){var o;if((n||r)&&n===r)return!0;var a=e.getIn(u()(o=["resolvedSubtrees","paths"]).call(o,i()(t),["requestBody","content"]),Object(I.fromJS)([]));if(a.size<2||!n||!r)return!1;var s=a.getIn([n,"schema","properties"],Object(I.fromJS)([])),c=a.getIn([r,"schema","properties"],Object(I.fromJS)([]));return!!s.equals(c)};function De(e){return I.Map.isMap(e)?e:new I.Map}},function(e,t,n){e.exports=n(1109)},function(e,t,n){"use strict";n.d(t,"b",(function(){return ee})),n.d(t,"a",(function(){return D}));var r=n(18),o=n.n(r),a=n(31),i=n.n(a),s=n(530),u=n.n(s),c=n(531),l=n.n(c),p=n(89),f=n.n(p),h=n(0),d=n.n(h),m=n(532),v=n.n(m);var g={};function y(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return g[r]||(g[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),g[r]}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),o=y(r);return o.reduce((function(e,t){return f()({},e,n[t])}),t)}function _(e){return e.join(" ")}function x(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,a=e.useInlineStyles,i=e.key,s=t.properties,u=t.type,c=t.tagName,l=t.value;if("text"===u)return l;if(c){var p,h=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return x({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,a);if(a){var m=Object.keys(n).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=s.className&&s.className.includes("token")?["token"]:[],y=s.className&&g.concat(s.className.filter((function(e){return!m.includes(e)})));p=f()({},s,{className:_(y)||void 0,style:b(s.className,Object.assign({},s.style,o),n)})}else p=f()({},s,{className:_(s.className)});var w=h(t.children);return d.a.createElement(c,v()({key:i},p),w)}}var w=/\n/g;function E(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,o=void 0===r?{float:"left",paddingRight:"10px"}:r,a=e.numberStyle,i=void 0===a?{}:a,s=e.startingLineNumber;return d.a.createElement("code",{style:Object.assign({},n,o)},function(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map((function(e,t){var o=t+n;return d.a.createElement("span",{key:"line-".concat(t),className:"react-syntax-highlighter-line-number",style:"function"==typeof r?r(o):r},"".concat(o,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),style:i,startingLineNumber:s}))}function S(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function C(e,t,n){var r,o={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},a="function"==typeof e?e(t):e;return f()({},o,a)}function A(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,o=e.largestLineNumber,a=e.showInlineLineNumbers,i=e.lineProps,s=void 0===i?{}:i,u=e.className,c=void 0===u?[]:u,l=e.showLineNumbers,p=e.wrapLongLines,h="function"==typeof s?s(n):s;if(h.className=c,n&&a){var d=C(r,n,o);t.unshift(S(n,d))}return p&l&&(h.style=f()({},h.style,{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function k(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return A({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:i,showInlineLineNumbers:o,lineProps:n,className:a,showLineNumbers:r,wrapLongLines:u})}function m(e,t){if(r&&t&&o){var n=C(s,t,i);e.unshift(S(t,n))}return e}function v(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?d(e,n,r):m(e,n)}for(var g=function(){var e=l[h],t=e.children[0].value;if(t.match(w)){var n=t.split("\n");n.forEach((function(t,o){var i=r&&p.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===o){var u=v(l.slice(f+1,h).concat(A({children:[s],className:e.properties.className})),i);p.push(u)}else if(o===n.length-1){if(l[h+1]&&l[h+1].children&&l[h+1].children[0]){var c=A({children:[{type:"text",value:"".concat(t)}],className:e.properties.className});l.splice(h+1,0,c)}else{var d=v([s],i,e.properties.className);p.push(d)}}else{var m=v([s],i,e.properties.className);p.push(m)}})),f=h}h++};h .hljs-title":{color:"#88C0D0"},"hljs-keyword":{color:"#81A1C1"},"hljs-literal":{color:"#81A1C1"},"hljs-symbol":{color:"#81A1C1"},"hljs-number":{color:"#B48EAD"},"hljs-regexp":{color:"#EBCB8B"},"hljs-string":{color:"#A3BE8C"},"hljs-title":{color:"#8FBCBB"},"hljs-params":{color:"#D8DEE9"},"hljs-bullet":{color:"#81A1C1"},"hljs-code":{color:"#8FBCBB"},"hljs-emphasis":{fontStyle:"italic"},"hljs-formula":{color:"#8FBCBB"},"hljs-strong":{fontWeight:"bold"},"hljs-link:hover":{textDecoration:"underline"},"hljs-quote":{color:"#4C566A"},"hljs-comment":{color:"#4C566A"},"hljs-doctag":{color:"#8FBCBB"},"hljs-meta":{color:"#5E81AC"},"hljs-meta-keyword":{color:"#5E81AC"},"hljs-meta-string":{color:"#A3BE8C"},"hljs-attr":{color:"#8FBCBB"},"hljs-attribute":{color:"#D8DEE9"},"hljs-builtin-name":{color:"#81A1C1"},"hljs-name":{color:"#81A1C1"},"hljs-section":{color:"#88C0D0"},"hljs-tag":{color:"#81A1C1"},"hljs-variable":{color:"#D8DEE9"},"hljs-template-variable":{color:"#D8DEE9"},"hljs-template-tag":{color:"#5E81AC"},"abnf .hljs-attribute":{color:"#88C0D0"},"abnf .hljs-symbol":{color:"#EBCB8B"},"apache .hljs-attribute":{color:"#88C0D0"},"apache .hljs-section":{color:"#81A1C1"},"arduino .hljs-built_in":{color:"#88C0D0"},"aspectj .hljs-meta":{color:"#D08770"},"aspectj > .hljs-title":{color:"#88C0D0"},"bnf .hljs-attribute":{color:"#8FBCBB"},"clojure .hljs-name":{color:"#88C0D0"},"clojure .hljs-symbol":{color:"#EBCB8B"},"coq .hljs-built_in":{color:"#88C0D0"},"cpp .hljs-meta-string":{color:"#8FBCBB"},"css .hljs-built_in":{color:"#88C0D0"},"css .hljs-keyword":{color:"#D08770"},"diff .hljs-meta":{color:"#8FBCBB"},"ebnf .hljs-attribute":{color:"#8FBCBB"},"glsl .hljs-built_in":{color:"#88C0D0"},"groovy .hljs-meta:not(:first-child)":{color:"#D08770"},"haxe .hljs-meta":{color:"#D08770"},"java .hljs-meta":{color:"#D08770"},"ldif .hljs-attribute":{color:"#8FBCBB"},"lisp .hljs-name":{color:"#88C0D0"},"lua .hljs-built_in":{color:"#88C0D0"},"moonscript .hljs-built_in":{color:"#88C0D0"},"nginx .hljs-attribute":{color:"#88C0D0"},"nginx .hljs-section":{color:"#5E81AC"},"pf .hljs-built_in":{color:"#88C0D0"},"processing .hljs-built_in":{color:"#88C0D0"},"scss .hljs-keyword":{color:"#81A1C1"},"stylus .hljs-keyword":{color:"#81A1C1"},"swift .hljs-meta":{color:"#D08770"},"vim .hljs-built_in":{color:"#88C0D0",fontStyle:"italic"},"yaml .hljs-meta":{color:"#D08770"}},obsidian:{hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#282b2e",color:"#e0e2e4"},"hljs-keyword":{color:"#93c763",fontWeight:"bold"},"hljs-selector-tag":{color:"#93c763",fontWeight:"bold"},"hljs-literal":{color:"#93c763",fontWeight:"bold"},"hljs-selector-id":{color:"#93c763"},"hljs-number":{color:"#ffcd22"},"hljs-attribute":{color:"#668bb0"},"hljs-code":{color:"white"},"hljs-class .hljs-title":{color:"white"},"hljs-section":{color:"white",fontWeight:"bold"},"hljs-regexp":{color:"#d39745"},"hljs-link":{color:"#d39745"},"hljs-meta":{color:"#557182"},"hljs-tag":{color:"#8cbbad"},"hljs-name":{color:"#8cbbad",fontWeight:"bold"},"hljs-bullet":{color:"#8cbbad"},"hljs-subst":{color:"#8cbbad"},"hljs-emphasis":{color:"#8cbbad"},"hljs-type":{color:"#8cbbad",fontWeight:"bold"},"hljs-built_in":{color:"#8cbbad"},"hljs-selector-attr":{color:"#8cbbad"},"hljs-selector-pseudo":{color:"#8cbbad"},"hljs-addition":{color:"#8cbbad"},"hljs-variable":{color:"#8cbbad"},"hljs-template-tag":{color:"#8cbbad"},"hljs-template-variable":{color:"#8cbbad"},"hljs-string":{color:"#ec7600"},"hljs-symbol":{color:"#ec7600"},"hljs-comment":{color:"#818e96"},"hljs-quote":{color:"#818e96"},"hljs-deletion":{color:"#818e96"},"hljs-selector-class":{color:"#A082BD"},"hljs-doctag":{fontWeight:"bold"},"hljs-title":{fontWeight:"bold"},"hljs-strong":{fontWeight:"bold"}},"tomorrow-night":{"hljs-comment":{color:"#969896"},"hljs-quote":{color:"#969896"},"hljs-variable":{color:"#cc6666"},"hljs-template-variable":{color:"#cc6666"},"hljs-tag":{color:"#cc6666"},"hljs-name":{color:"#cc6666"},"hljs-selector-id":{color:"#cc6666"},"hljs-selector-class":{color:"#cc6666"},"hljs-regexp":{color:"#cc6666"},"hljs-deletion":{color:"#cc6666"},"hljs-number":{color:"#de935f"},"hljs-built_in":{color:"#de935f"},"hljs-builtin-name":{color:"#de935f"},"hljs-literal":{color:"#de935f"},"hljs-type":{color:"#de935f"},"hljs-params":{color:"#de935f"},"hljs-meta":{color:"#de935f"},"hljs-link":{color:"#de935f"},"hljs-attribute":{color:"#f0c674"},"hljs-string":{color:"#b5bd68"},"hljs-symbol":{color:"#b5bd68"},"hljs-bullet":{color:"#b5bd68"},"hljs-addition":{color:"#b5bd68"},"hljs-title":{color:"#81a2be"},"hljs-section":{color:"#81a2be"},"hljs-keyword":{color:"#b294bb"},"hljs-selector-tag":{color:"#b294bb"},hljs:{display:"block",overflowX:"auto",background:"#1d1f21",color:"#c5c8c6",padding:"0.5em"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}}},Q=o()(X),ee=function(e){return i()(Q).call(Q,e)?X[e]:(console.warn("Request style '".concat(e,"' is not available, returning default instead")),Z)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(241),o=n(70).f,a=n(69),i=n(55),s=n(561),u=n(39)("toStringTag");e.exports=function(e,t,n,c){if(e){var l=n?e:e.prototype;i(l,u)||o(l,u,{configurable:!0,value:t}),c&&!r&&a(l,"toString",s)}}},function(e,t,n){"use strict";var r=n(372).charAt,o=n(82),a=n(242),i="String Iterator",s=o.set,u=o.getterFor(i);a(String,"String",(function(e){s(this,{type:i,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){e.exports=n(690)},function(e,t,n){e.exports=n(878)},function(e,t,n){"use strict";n.r(t),n.d(t,"UPDATE_LAYOUT",(function(){return o})),n.d(t,"UPDATE_FILTER",(function(){return a})),n.d(t,"UPDATE_MODE",(function(){return i})),n.d(t,"SHOW",(function(){return s})),n.d(t,"updateLayout",(function(){return u})),n.d(t,"updateFilter",(function(){return c})),n.d(t,"show",(function(){return l})),n.d(t,"changeMode",(function(){return p}));var r=n(5),o="layout_update_layout",a="layout_update_filter",i="layout_update_mode",s="layout_show";function u(e){return{type:o,payload:e}}function c(e){return{type:a,payload:e}}function l(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=Object(r.v)(e),{type:s,payload:{thing:e,shown:t}}}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=Object(r.v)(e),{type:i,payload:{thing:e,mode:t}}}},function(e,t,n){var r=n(426),o=n(164),a=n(195),i=n(53),s=n(119),u=n(196),c=n(163),l=n(253),p=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||l(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(p.call(e,n))return!1;return!0}},function(e,t,n){var r=n(50),o=n(181),a=n(109),i=n(68),s=n(183),u=n(55),c=n(363),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=i(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return a(!o.f.call(e,t),e[t])}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(80);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r,o=n(52),a=n(234),i=n(237),s=n(158),u=n(368),c=n(229),l=n(187),p=l("IE_PROTO"),f=function(){},h=function(e){return" - + + diff --git a/swagger.json b/swagger.json index 39e6678..e0d1a25 100644 --- a/swagger.json +++ b/swagger.json @@ -1,2860 +1,3132 @@ -{ - "swagger": "2.0", - "info": { - "description": "This document describes passbolt backend REST APIs. They work over HTTPS so they are language/framework agnostic. Clients can consume them in their language of choice using the HTTPS protocol.\n", - "version": "2.8.3", - "title": "passbolt API Reference", - "termsOfService": "https://www.passbolt.com/terms", - "contact": { - "email": "contact@passbolt.com" - }, - "license": { - "name": "AGPL-3.0", - "url": "http://www.gnu.org/licenses/agpl-3.0.html" - } - }, - "host": "www.passbolt.com", - "basePath": "/", - "tags": [ - { - "name": "Auth", - "description": "Authentication endpoints" - }, - { - "name": "Resource", - "description": "In passbolt, passwords are split into two different entities: Resources and Secrets. Passwords metadata are internally known as `Resources` and are represented as one object containing the name, username, the URL amongst other fields. While the actual password is part of the `Secrets` entity. The API allows you to create, delete, and update your passwords. You can retrieve individual passwords as well as a list of all your passwords.\n" - }, - { - "name": "User", - "description": "User are entities with the ability to interact with the passbolt backend with their unique username and passwords. They are usually represented by one person. The User object returned by the API hence contains the relevant associated fields like `gpgkey`, `profile`, `role` etc.\n" - }, - { - "name": "Group", - "description": "Group of users" - } - ], - "schemes": [ - "https" - ], - "paths": { - "/auth/verify.json": { - "get": { - "summary": "Fetches server's identity for verification", - "description": "Returns server's public key with it's fingerprint. Useful when you want to send sensitive data to the server from a client. The sensitive data needs to be encrypted using this public key.\n", - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object", - "properties": { - "fingerprint": { - "type": "string" - }, - "keydata": { - "type": "string", - "description": "Server's PGP encrypted public key" - } - } - } - } - } - } - } - } - }, - "/auth/login.json": { - "post": { - "summary": "Logs a user in", - "description": "The same URL works for two login steps. The server recognises the step from the request payload and headers.\n\nStep 1. Encrypts a random string using server's public key and send to the server as request body in `server_verify_token`\n\nStep 2. After verification, the server responds back with a random token encrypted using client's public key in the header called `X-GPGAuth-User-Auth-Token`. \n\nStep 3. Client then decrypts and sends the decrypted text in the request body in `user_token_result`.\n\nStep 4. Finally, the server verifies if the decrypted `user_token_result` matches with the original text and is still valid. Upon verification the server creates and returns \"authenticated\" cookies that can be used to make further requests.\n\nTo know more about Passbolt's authentication. Please visit https://help.passbolt.com/tech/auth\n", - "tags": [ - "Auth" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "in": "body", - "name": "auth", - "schema": { - "type": "object", - "required": [ - "gpg_auth" - ], - "properties": { - "gpg_auth": { - "type": "object", - "properties": { - "keyid": { - "type": "string", - "description": "Fingerprint of the user's", - "example": "252B91CB28A96C6D67E8FC139020576F08D8B763" - }, - "server_verify_token": { - "type": "string", - "description": "Token encrypted by the client using server's public key. This acts as a challenge that the server must solve to confirm it\\'s integrity." - }, - "user_token_result": { - "type": "string", - "description": "Plaintext string that was decrypted using client's private key." - } - } - } - } - } - } - ], - "responses": { - "200": { - "description": "OK" - } - } - } - }, - "/resources.json": { - "get": { - "description": "Returns a list of your passwords. The passwords are returned sorted alphabetically by their name.", - "summary": "List all Passwords", - "operationId": "getPasswords", - "tags": [ - "Resource" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "contain", - "description": "Fields that must be included in the response. Takes a comma separated list.", - "in": "query", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "creator", - "favorite", - "modifier", - "permission", - "permissions.user.profile", - "permissions.group", - "secret" - ] - } - }, - { - "name": "filter", - "in": "query", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "is-favorite", - "is-shared-with-group", - "is-owned-by-me", - "is-shared-with-me", - "has-id" - ] - } - }, - { - "name": "order", - "in": "query", - "description": "How the result list should be sorted.", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "is-favorite", - "is-shared-with-group", - "is-owned-by-me", - "is-shared-with-me", - "has-id" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "code": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "servertime": { - "type": "integer", - "format": "timestamp" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string", - "format": "url" - } - } - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/Resource" - } - } - } - } - }, - "403": { - "description": "Authentication failure.\n--\nWhen the user making the request is not authenticated\n" - } - } - }, - "post": { - "operationId": "createPassword", - "tags": [ - "Resource" - ], - "summary": "Creates a new Resource.", - "description": "Creates a new Resource with metadata and secrets.", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "in": "body", - "name": "resource", - "schema": { - "type": "object", - "required": [ - "name", - "secrets" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string", - "description": "Description of the Resource." - }, - "uri": { - "type": "string", - "format": "url" - }, - "secrets": { - "type": "array", - "items": { - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "data": { - "type": "string", - "description": "Encrypted password string" - } - } - } - } - } - } - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\n" - }, - "403": { - "description": "Forbidden\n--\n" - } - } - } - }, - "/resources/{resourceId}.json": { - "get": { - "operationId": "getPassword", - "tags": [ - "Resource" - ], - "summary": "Find password by ID", - "description": "Returns a single password", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "resourceId", - "in": "path", - "description": "ID of the Resource to return", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "$ref": "#/definitions/Resource" - } - } - } - }, - "400": { - "description": "Bad Request\n--\nThe `resourceId` is not valid.\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A password with the given `resourceId` does not exist.\n - The current user does not have `READ` permission on the password\n" - } - } - }, - "put": { - "tags": [ - "Resource" - ], - "summary": "Update an existing password", - "description": "Updates the specified password by setting the values of the parameters passed. Any parameters not provided will be left unchanged. \n \n This request accepts mostly the same arguments as the `Password` creation call.\n", - "operationId": "updatePassword", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "resourceId", - "in": "path", - "description": "ID of the password to update", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "name": "resource", - "in": "body", - "description": "Password data to update", - "required": true, - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "secrets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "data": { - "type": "string", - "description": "Encrypted password string" - } - } - } - }, - "uri": { - "type": "string", - "format": "url" - } - } - } - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\nSome required parameters are missing\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A password with the given `resourceId` does not exist\n - The current user does not have sufficient permission on the password\n" - } - } - }, - "delete": { - "operationId": "deletePassword", - "tags": [ - "Resource" - ], - "summary": "Deletes a password", - "produces": [ - "application/json" - ], - "description": "Deletes the password and also drops all the associated permissions.\n", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "resourceId", - "in": "path", - "description": "Password id to delete", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\nWhen `resourceId` is not a valid `UUID`\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n- The `resourceId` does not exist.\n- The Resource is already deleted.\n- If the user does not have access to the Resource.\n- If the user does not have permission to delete the Resource.\n" - }, - "500": { - "description": "Server Error\n--\nif the resource could not be deleted for other reasons\n" - } - } - } - }, - "/users.json": { - "get": { - "description": "Returns a list of your users. The users are returned sorted alphabetically by their name.", - "summary": "List all users", - "operationId": "getUsers", - "tags": [ - "User" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "contain", - "description": "Fields that must be included in the response. Takes a comma separated list.", - "in": "query", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "LastLoggedIn" - ] - } - }, - { - "name": "filter", - "in": "query", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "search", - "has-groups", - "has-access", - "is-admin" - ] - } - }, - { - "name": "order", - "in": "query", - "description": "How the result list should be sorted.", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "User.username", - "User.created", - "User.modified", - "Profile.first_name", - "Profile.last_name", - "Profile.created", - "Profile.modified" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/UserFull" - } - } - } - } - }, - "403": { - "description": "Authentication failure.\n--\nWhen the user making the request is not authenticated\n" - } - } - }, - "post": { - "operationId": "createUser", - "tags": [ - "User" - ], - "summary": "Creates a new user.", - "description": "Creates a new user.", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "in": "body", - "name": "user", - "schema": { - "type": "object", - "required": [ - "first_name", - "last_name", - "username", - "is_admin" - ], - "properties": { - "first_name": { - "type": "string", - "maxLength": 255 - }, - "last_name": { - "type": "string", - "maxLength": 255 - }, - "username": { - "type": "string", - "format": "email" - }, - "is_admin": { - "type": "boolean" - } - } - } - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\n" - }, - "403": { - "description": "Forbidden\n--\n" - } - } - } - }, - "/users/{userId}.json": { - "get": { - "operationId": "getUser", - "tags": [ - "User" - ], - "summary": "Find user by ID", - "description": "Returns a single user", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "userId", - "in": "path", - "description": "ID of the user to return", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "$ref": "#/definitions/User" - } - } - } - }, - "400": { - "description": "Bad Request\n--\nThe `userId` is not valid.\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A user with the given `userId` does not exist.\n - The current user does not have `READ` permission on the user\n" - } - } - }, - "put": { - "tags": [ - "User" - ], - "summary": "Update an existing user", - "description": "Updates the specified user by setting the values of the parameters passed. Any parameters not provided will be left unchanged. \n \n This request accepts mostly the same arguments as the `User` creation call.\n", - "operationId": "updateUser", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "userId", - "in": "path", - "description": "ID of the user to update", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "name": "user", - "in": "body", - "description": "User data to update", - "required": true, - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "secrets": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "data": { - "type": "string", - "description": "Encrypted user string" - } - } - } - }, - "uri": { - "type": "string", - "format": "url" - } - } - } - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\nSome required parameters are missing\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A user with the given `userId` does not exist\n - The current user does not have sufficient permission on the user\n" - } - } - }, - "delete": { - "operationId": "deleteUser", - "tags": [ - "User" - ], - "summary": "Deletes a user", - "produces": [ - "application/json" - ], - "description": "Deletes the user and also drops all the associated permissions.\n", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "userId", - "in": "path", - "description": "User id to delete", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\nWhen `userId` is not a valid `UUID`\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n- The `userId` does not exist.\n- The User is already deleted.\n- If the user does not have access to the user.\n- If the user does not have the permission to delete the user.\n" - }, - "500": { - "description": "Server Error\n--\nif the user could not be deleted for other reasons\n" - } - } - } - }, - "/users/{userId}/dry-run": { - "delete": { - "tags": [ - "User" - ], - "summary": "Checks if a user can be deleted", - "description": "A User can not be deleted if \n* it's the sole owner of a shared Resource or\n* it's the sole manager of a Group or\n* it's the sole manager of a Group that is the sole owner of a shared Resource\n\nThis endpoint is useful when you want to check and avoid any side effects of deleting a user.\n", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "userId", - "in": "path", - "description": "User id to check for deletion", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\nThe User can be deleted safely\n" - }, - "400": { - "description": "Bad Request\n--\nSome of the validation checks failed. The User can not be deleted safely.\n" - } - } - } - }, - "/groups.json": { - "get": { - "description": "Returns a list of your groups. The groups are returned sorted alphabetically by their name.", - "summary": "List all groups", - "operationId": "getGroups", - "tags": [ - "Group" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "contain", - "description": "Fields that must be included in the response. Takes a comma separated list.", - "in": "query", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "modifier", - "modifier.profile", - "user", - "group_user", - "my_group_user" - ] - } - }, - { - "name": "filter", - "in": "query", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "has-users", - "has-managers" - ] - } - }, - { - "name": "order", - "in": "query", - "description": "How the result list should be sorted.", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "Group.name" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/Group" - } - } - } - } - }, - "403": { - "description": "Authentication failure.\n--\nWhen the group making the request is not authenticated\n" - } - } - }, - "post": { - "operationId": "createGroup", - "tags": [ - "Group" - ], - "summary": "Creates a new group.", - "description": "Creates a new group.", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "in": "body", - "name": "group", - "schema": { - "type": "object", - "required": [ - "name", - "group_users" - ], - "properties": { - "name": { - "type": "string" - }, - "group_users": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "is_admin": { - "type": "boolean" - } - } - } - } - } - } - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\n" - }, - "403": { - "description": "Forbidden\n--\n" - } - } - } - }, - "/groups/{groupId}.json": { - "get": { - "operationId": "getGroup", - "tags": [ - "Group" - ], - "summary": "Find group by ID", - "description": "Returns a single group", - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "groupId", - "in": "path", - "description": "ID of the group to return", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "$ref": "#/definitions/Group" - } - } - } - }, - "400": { - "description": "Bad Request\n--\nThe `groupId` is not valid.\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A group with the given `groupId` does not exist.\n - The current group does not have `READ` permission on the group\n" - } - } - }, - "put": { - "tags": [ - "Group" - ], - "summary": "Update an existing group", - "description": "Updates the specified group by setting the values of the parameters passed. Any parameters not provided will be left unchanged. \n \n This request accepts mostly the same arguments as the `Group` creation call.\n", - "operationId": "updateGroup", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "groupId", - "in": "path", - "description": "ID of the group to update", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "group", - "schema": { - "type": "object", - "required": [ - "name", - "group_users" - ], - "properties": { - "name": { - "type": "string" - }, - "group_users": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_id": { - "type": "string", - "format": "uuid" - }, - "is_admin": { - "type": "boolean" - } - } - } - } - } - } - } - ], - "responses": { - "200": { - "description": "OK\n--\n", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "$ref": "#/definitions/Group" - } - } - } - }, - "400": { - "description": "Bad Request\n--\nSome required parameters are missing\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A group with the given `groupId` does not exist\n - The current group does not have sufficient permission on the group\n" - } - } - }, - "delete": { - "operationId": "deleteGroup", - "tags": [ - "Group" - ], - "summary": "Deletes a group", - "produces": [ - "application/json" - ], - "description": "Deletes the Group and also all the Resources that belong only to this group.\n", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "groupId", - "in": "path", - "description": "Group id to delete", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\nWhen `groupId` is not a valid `UUID`\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n- The `groupId` does not exist.\n- The Group is already deleted.\n- If the user is neither a Group manager nor Admin.\n" - }, - "500": { - "description": "Server Error\n--\nif the group could not be deleted for other reasons\n" - } - } - } - }, - "/groups/{groupId}/dry-run": { - "put": { - "tags": [ - "Group" - ], - "summary": "Checks if a group can be updated.", - "description": "The endpoint performs all the validation checks required for a Group update. This is useful to determine if it's safe to update a Group. It returns a success response if the Group can be updated, on validation failures, the response will have the reason and suggestions for the failed checks.\n", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "groupId", - "in": "path", - "description": "Group id to check for update.", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\nThe group can be updated safely\n" - }, - "400": { - "description": "Bad Request\n--\nIf `groupId` is not a valid UUID.\n" - }, - "403": { - "description": "Forbidden\n--\nIf the user making the request is neither the Group manager nor an Admin.\n" - }, - "404": { - "description": "Not Found\n--\n* No Group found for the given `groupId` or\n* The Group has been deleted.\n" - } - } - }, - "delete": { - "tags": [ - "Group" - ], - "summary": "Checks if a group can be deleted", - "description": "A Group can not be deleted if it's the sole owner of a Resource. This endpoint is useful when you want to check and avoid any side effects of deleting a group.", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "groupId", - "in": "path", - "description": "Group id to check for deletion", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\nThe Group can be deleted safely.\n" - }, - "400": { - "description": "Bad Request\n--\nThe Group is the sole owner of a Resource and hence can not be deleted.\n" - } - } - } - }, - "/share/search-aros.json": { - "get": { - "tags": [ - "Share" - ], - "summary": "Get a list of Access Resource Objects or AROs", - "description": "Get a list of all the users/groups with whom an item can be shared", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "filter", - "in": "query", - "type": "array", - "collectionFormat": "csv", - "items": { - "type": "string", - "enum": [ - "search" - ] - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "type": "object", - "properties": { - "user_count": { - "type": "number" - }, - "id": { - "type": "string", - "format": "uuid" - }, - "deleted": { - "type": "boolean" - }, - "created": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - }, - "created_by": { - "type": "string", - "format": "uuid" - }, - "modified_by": { - "type": "string", - "format": "uuid" - } - } - } - } - } - } - } - } - } - }, - "/share/simulate/resource/{resourceId}.json": { - "post": { - "tags": [ - "Share" - ], - "summary": "Simulates sharing a password.", - "description": "Simulates sharing a resource with a user and/or group. Useful for avoiding any side effects and checking the possible errors.\n", - "operationId": "simulateShare", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "resourceId", - "in": "path", - "description": "The identifier of the resource to dry run a share on", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object", - "properties": { - "changes": { - "type": "object", - "properties": { - "added": { - "type": "array", - "items": { - "type": "object" - } - }, - "changed": { - "type": "array", - "items": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "400": { - "description": "Bad Request\n--\nIf the `resourceId` is not a valid uuid\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A resource with the given `resourceId` does not exist\n - The resource is soft deleted\n - The user does not have access to the resource\n" - } - } - } - }, - "/share/resource/{resourceId}.json": { - "put": { - "tags": [ - "Share" - ], - "summary": "Share a password", - "description": "Shares a password.\n", - "operationId": "shareResource", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "resourceId", - "in": "path", - "description": "The identifier of the resource to dry run a share on", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n" - }, - "400": { - "description": "Bad Request\n--\nIf the `resourceId` is not a valid uuid\n" - }, - "404": { - "description": "Not Found\n--\nWhen either of the following is true\n - A resource with the given `resourceId` does not exist\n - The resource is soft deleted\n - The user does not have access to the resource\n" - } - } - } - }, - "/permissions/resource/{resourceId}.json": { - "get": { - "tags": [ - "Permission" - ], - "summary": "TODO Summary", - "description": "TODO Description", - "parameters": [ - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - }, - { - "name": "resourceId", - "in": "path", - "description": "UUID of the password to check permissions for", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "OK\n--\n", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "aco": { - "type": "string" - }, - "aco_foreign_key": { - "type": "string", - "format": "uuid" - }, - "aro": { - "type": "string" - }, - "aro_foreign_key": { - "type": "string", - "format": "uuid" - }, - "created": { - "type": "string", - "format": "datetime" - }, - "group": { - "type": "string" - }, - "modified": { - "type": "string", - "format": "datetime" - }, - "type": { - "type": "number" - } - } - } - } - } - } - } - } - } - }, - "/favorites/resource/{resourceId}.json": { - "post": { - "tags": [ - "Favorite" - ], - "summary": "Add Password to favourites", - "description": "Add the given password to list of favourites", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "user_id": { - "type": "string", - "format": "uuid" - }, - "foreign_key": { - "type": "string", - "format": "uuid" - }, - "foreign_model": { - "type": "string", - "format": "uuid" - }, - "created": { - "type": "string", - "format": "datetime" - }, - "modified": { - "type": "string", - "format": "datetime" - } - } - } - } - } - }, - "404": { - "description": "Not Found\n---\n - If the resource id is not valid\n - If the resource does not exist\n - If the resource is soft deleted\n - If the user does not have access to the resource\n" - } - } - } - }, - "/favorites/{favoriteId}.json": { - "delete": { - "tags": [ - "Favorite" - ], - "summary": "Delete a favorite entry", - "description": "Remove a password from the list of favorites", - "parameters": [ - { - "name": "favoriteId", - "in": "path", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "name": "api-version", - "in": "query", - "description": "API Version to target for this request", - "type": "string", - "default": "v1", - "enum": [ - "v1", - "v2" - ] - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object" - } - } - } - }, - "400": { - "description": "Bad Request\n--\nWhen the given `favoriteId` is not a valid uuid\n" - }, - "404": { - "description": "Not Found\n---\n - If the favorite does not exist\n" - } - } - } - }, - "/comments/resource/{resourceId}.json": { - "get": { - "tags": [ - "Comment" - ], - "summary": "List all comments on the record", - "description": "List all comments on an entity of `model` type and identified by `modelId`", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "type": "string", - "format": "uuid", - "required": true, - "description": "ID of the resource to fetch comments for" - }, - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/Comment" - } - } - } - } - }, - "400": { - "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID\n" - }, - "404": { - "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found\n" - } - } - }, - "post": { - "tags": [ - "Comment" - ], - "summary": "Add a comment to a resource", - "description": "Add a comment to a resource", - "parameters": [ - { - "name": "resourceId", - "in": "path", - "type": "string", - "format": "uuid", - "required": true, - "description": "ID of the resource to add comment to" - }, - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - }, - { - "in": "body", - "name": "comment", - "schema": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "The comment text" - } - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/Comment" - } - } - } - } - }, - "400": { - "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID\n" - }, - "404": { - "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found\n" - } - } - } - }, - "/comments/{commentId}.json": { - "put": { - "tags": [ - "Comment" - ], - "summary": "Update a comment", - "description": "Update a comment", - "parameters": [ - { - "name": "commentId", - "in": "path", - "type": "string", - "format": "uuid", - "required": true, - "description": "ID of the comment to update" - }, - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - }, - { - "in": "body", - "name": "comment", - "schema": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "The new content to update" - } - } - } - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/Comment" - } - } - } - } - }, - "400": { - "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID\n" - }, - "404": { - "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found\n" - } - } - }, - "delete": { - "tags": [ - "Comment" - ], - "summary": "Delete a comment", - "description": "Delete a comment", - "parameters": [ - { - "name": "commentId", - "in": "path", - "type": "string", - "format": "uuid", - "required": true, - "description": "ID of the comment to delete" - }, - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object" - } - } - } - }, - "400": { - "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID\n" - }, - "404": { - "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found\nIf the current user does not have enough permission to delete the comment\n" - } - } - } - }, - "/gpgkeys.json": { - "get": { - "tags": [ - "GPG Key" - ], - "summary": "List all the GPG keys", - "description": "Fetches a list of all your GPG keys", - "parameters": [ - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/GpgKey" - } - } - } - } - } - } - } - }, - "/gpgkeys/{keyId}.json": { - "get": { - "tags": [ - "GPG Key" - ], - "summary": "Find GPG key by ID", - "description": "Returns a single GPG key", - "parameters": [ - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - }, - { - "name": "keyId", - "in": "path", - "type": "string", - "format": "uuid", - "required": true, - "description": "ID of the GPG key to fetch" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "$ref": "#/definitions/GpgKey" - } - } - } - }, - "400": { - "description": "Bad Request\n---\nIf the given `keyId` is not a valid UUID\n" - }, - "404": { - "description": "Not Found\n---\nIf a GPGKey with the given `keyId` could not be found\n" - } - } - } - }, - "/secrets/resource/{resourceId}.json": { - "get": { - "tags": [ - "Secret" - ], - "summary": "Get password for a given resource.", - "description": "Will return the secret password encoded with user's GPG key. This will need to be decrypted on the client end to get the actual password string.", - "parameters": [ - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - }, - { - "name": "resourceId", - "in": "path", - "type": "string", - "format": "uuid", - "required": true, - "description": "ID of resource of which the password should be returned" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "type": "object", - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "created": { - "type": "string", - "format": "datetime" - }, - "data": { - "type": "string", - "description": "PGP encrypted string containing the password string" - }, - "modified": { - "type": "string", - "format": "datetime" - }, - "resource_id": { - "type": "string", - "format": "uuid" - }, - "user_id": { - "type": "string", - "format": "uuid" - } - } - } - } - } - } - } - } - }, - "/settings.json": { - "get": { - "tags": [ - "Settings" - ], - "summary": "List the user level settings", - "parameters": [ - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "type": "object", - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object", - "properties": { - "app": { - "type": "object", - "properties": { - "debug": { - "type": "boolean" - }, - "image_storage": { - "type": "object", - "properties": { - "public_path": { - "type": "string", - "format": "uri" - } - } - }, - "server_timezone": { - "type": "string" - }, - "session_timeout": { - "type": "number" - }, - "url": { - "type": "string", - "format": "url" - }, - "version": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "number": { - "type": "string" - } - } - } - } - }, - "passbolt": { - "properties": { - "edition": { - "type": "string", - "enum": [ - "ce", - "pro" - ] - }, - "plugins": { - "type": "object" - } - } - } - } - } - } - } - } - } - } - }, - "/roles.json": { - "get": { - "tags": [ - "Role" - ], - "summary": "List the available user roles", - "parameters": [ - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "$ref": "#/definitions/Role" - } - } - } - } - } - } - } - }, - "/healthcheck.json": { - "get": { - "tags": [ - "Health Check" - ], - "summary": "Perform a health check", - "description": "Return server status report", - "parameters": [ - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "object", - "properties": { - "ssl": { - "type": "object" - }, - "database": { - "type": "object" - }, - "application": { - "type": "object" - }, - "environment": { - "type": "object" - }, - "configFile": { - "type": "object" - }, - "core": { - "type": "object" - }, - "gpg": { - "type": "object" - } - } - } - } - } - } - } - } - }, - "/healthcheck/status.json": { - "get": { - "tags": [ - "Health Check" - ], - "summary": "Get the health check status", - "description": "Return server status", - "parameters": [ - { - "name": "api-version", - "in": "query", - "type": "string", - "enum": [ - "v1", - "v2" - ], - "default": "v1" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "object", - "properties": { - "header": { - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "string", - "enum": [ - "OK" - ] - } - } - } - } - } - } - } - }, - "definitions": { - "ApiResponseHeader": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "code": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "servertime": { - "type": "integer", - "format": "timestamp" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string", - "format": "url" - } - } - }, - "ApiResponse": { - "type": "object", - "properties": { - "header": { - "type": "object", - "$ref": "#/definitions/ApiResponseHeader" - }, - "body": { - "type": "array", - "items": { - "type": "object" - } - } - } - }, - "Avatar": { - "type": "object", - "properties": { - "url": { - "type": "object", - "properties": { - "medium": { - "type": "string", - "format": "uri" - }, - "small": { - "type": "string", - "format": "uri" - } - } - } - } - }, - "Comment": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "parent_id": { - "type": "string", - "format": "uuid" - }, - "foreign_key": { - "type": "string", - "format": "uuid" - }, - "foreign_model": { - "type": "string" - }, - "content": { - "type": "string" - }, - "created": { - "type": "string", - "format": "datetime" - }, - "modified": { - "type": "string", - "format": "datetime" - }, - "created_by": { - "type": "string", - "format": "uuid" - }, - "modified_by": { - "type": "string", - "format": "uuid" - }, - "user_id": { - "type": "string", - "format": "uuid" - }, - "creator": { - "$ref": "#/definitions/User" - }, - "children": { - "type": "array", - "items": { - "$ref": "#/definitions/Comment" - } - } - } - }, - "Favorite": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "created": { - "type": "string", - "format": "date" - }, - "foreign_key": { - "type": "string", - "format": "uuid" - }, - "foreign_model": { - "type": "string" - }, - "modified": { - "type": "string", - "format": "date" - }, - "user_id": { - "type": "string", - "format": "uuid" - } - } - }, - "GpgKey": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "user_id": { - "type": "string", - "format": "uuid" - }, - "armored_key": { - "type": "string" - }, - "bits": { - "type": "number" - }, - "uid": { - "type": "string" - }, - "key_id": { - "type": "string" - }, - "fingerprint": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "RSA", - "ELGAMAL", - "DSA", - "ECC", - "ECDSA", - "DH" - ] - }, - "expires": { - "type": "string", - "format": "date" - }, - "key_created": { - "type": "string", - "format": "date" - }, - "deleted": { - "type": "boolean" - }, - "created": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - } - } - }, - "Group": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - }, - "deleted": { - "type": "string", - "format": "date" - }, - "created": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - }, - "created_by": { - "type": "string", - "format": "uuid" - }, - "modified_by": { - "type": "string", - "format": "uuid" - }, - "groups_users": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "user_id": { - "type": "string", - "format": "uuid" - }, - "group_id": { - "type": "string", - "format": "uuid" - }, - "created": { - "type": "string", - "format": "datetime" - }, - "is_admin": { - "type": "boolean" - }, - "user": { - "$ref": "#/definitions/UserFull" - } - } - } - } - } - }, - "Permission": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "aco": { - "type": "string" - }, - "aco_foreign_key": { - "type": "string", - "format": "uuid" - }, - "aro": { - "type": "string" - }, - "aro_foreign_key": { - "type": "string", - "format": "uuid" - }, - "created": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - }, - "type": { - "type": "integer" - } - } - }, - "Profile": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "user_id": { - "type": "string", - "format": "uuid" - }, - "first_name": { - "type": "string", - "maxLength": 255 - }, - "last_name": { - "type": "string", - "maxLength": 255 - }, - "created": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - } - } - }, - "Resource": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Unique ID of the password in `UUID` format\n" - }, - "created": { - "type": "string", - "format": "date", - "description": "Datetime on when the password was created.\n" - }, - "created_by": { - "type": "string", - "format": "uuid", - "description": "`ID` of the `User` who created the password in `UUID` format\n" - }, - "creator": { - "$ref": "#/definitions/User" - }, - "deleted": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "favorite": { - "$ref": "#/definitions/Favorite" - }, - "modified": { - "type": "string", - "format": "date" - }, - "modified_by": { - "type": "string", - "format": "uuid" - }, - "modifier": { - "$ref": "#/definitions/User" - }, - "name": { - "type": "string" - }, - "permission": { - "$ref": "#/definitions/Permission" - }, - "uri": { - "type": "string", - "format": "url" - }, - "username": { - "type": "string" - } - } - }, - "Role": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "created": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - } - } - }, - "User": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "active": { - "type": "boolean" - }, - "created": { - "type": "string", - "format": "date" - }, - "deleted": { - "type": "boolean" - }, - "last_logged_in": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - }, - "role_id": { - "type": "string", - "format": "uuid" - }, - "username": { - "type": "string", - "format": "email" - } - } - }, - "UserFull": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid" - }, - "role_id": { - "type": "string", - "format": "uuid" - }, - "username": { - "type": "string", - "format": "email" - }, - "active": { - "type": "boolean" - }, - "deleted": { - "type": "boolean" - }, - "created": { - "type": "string", - "format": "date" - }, - "modified": { - "type": "string", - "format": "date" - }, - "profile": { - "$ref": "#/definitions/Profile" - }, - "group_users": { - "type": "array", - "items": { - "$ref": "#/definitions/User" - } - }, - "role": { - "$ref": "#/definitions/Role" - }, - "gpgkey": { - "$ref": "#/definitions/GpgKey" - }, - "last_logged_in": { - "type": "string", - "format": "date" - } - } - } - } +{ + "openapi": "3.0.0", + "info": { + "title": "passbolt API Reference", + "version": "2.8.3", + "description": "This document describes the passbolt backend API endpoints which require a cookie - based session. The API works over the HTTP protocol and so is language/framework agnostic.\\n\\n All endpoints require a session cookie named CAKEPHP . Endpoints that create or alter data need an additional cookie named csrfToken . This second cookie is sent via a header name X-CRSF-Token as needed.", + "termsOfService": "https://www.passbolt.com/terms", + "contact": { + "email": "contact@passbolt.com" + }, + "license": { + "name": "AGPL-3.0", + "url": "http://www.gnu.org/licenses/agpl-3.0.html" + } + }, + "servers": [ + { + "url": "https://passbolt.com" + } + ], + "tags": [ + { + "name": "Auth", + "description": "Authentication endpoints" + }, + { + "name": "Resources", + "description": "In passbolt, passwords are split into two different entities: Resources and Secrets. Passwords metadata are internally known as `Resources` and are represented as one object containing the name, username, the URL in addition to other fields. The actual password is part of the `Secrets` entity. The API allows you to create, delete, and update your passwords. You can retrieve individual passwords as well as a list of all your passwords." + }, + { + "name": "Users", + "description": "User are entities with the ability to interact with the passbolt backend with their unique username and passwords. They are usually represented by one person. The User object returned by the API hence contains the relevant associated fields like `gpgkey`, `profile`, `role`. etc." + }, + { + "name": "Groups", + "description": "Group of users" + } + ], + "paths": { + "/auth/verify.json": { + "get": { + "summary": "Fetches server's identity for verification", + "description": "Returns server's public PGP key and fingerprint. Useful when we want to send sensitive data to the server from the client. Sensitive data can be encrypted using this public key.", + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object", + "properties": { + "fingerprint": { + "type": "string" + }, + "keydata": { + "type": "string", + "description": "Server's PGP encrypted public key" + } + } + } + }, + "example": { + "header": { + "id": "138bd33d-e26c-4a15-8972-e8c70a7b478b", + "status": "success", + "servertime": 1611780195, + "action": "748dcd10-7d15-5498-9aa6-d26de348ff02", + "message": "The operation was successful.", + "url": "/auth/verify.json", + "code": 200 + }, + "body": { + "fingerprint": "96ACA7F95D5E064A947E9B1EEE0AE701E483DEB7", + "keydata": "-----BEGIN PGP PUBLIC KEY BLOCK-----\\r\\nVersion: OpenPGP.js v4.6.2\\r\\nComment: https://openpgpjs.org\\r\\n\\r\\nx sBNBFM/GcoSN65WN9M3V+IWzkoT6O5vW\\r\\nGgu7TAjliAIO7NHaOeoYp/lTYmjh \\r\\n=kPFx\\r\\n-----END PGP PUBLIC KEY BLOCK-----" + } + } + } + } + } + } + } + }, + "post": { + "summary": "Used in server identification process", + "description": "Send user's public key fingerprint and token encrypted with server's public gpg key.\n\n Client-created token which includes a v4 UUID must follow this format: `gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0` \n\n For the token in it's encrypted form, replace the PGP block's line endings with \\r\\n and put the key in single-line string form.\n\n If using curl in Insomnia (or other API tools which generate curl commands) these tools often have trouble handing the PGP key in block form and turn `\\r\\n` into `\\\\r\\`, adding a leading slash and dropping the `n`. Add the `n` back in, and run the curl command with `-v` flag verbose mode to see headers.", + "tags": [ + "Auth" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "gpg_auth": { + "type": "object", + "properties": { + "keyid": { + "type": "string", + "example": "5df19d50db2d11318e0993b2d3c43f6d4678554e", + "description": "User's public key fingerprint" + }, + "server_verify_token": { + "type": "string", + "example": "-----BEGIN PGP MESSAGE----- \r\n\r\nhQEMA/+ePtqRgfhuAQf/ Sc6qtG8OFxVRwBDPzco2e3HHKs7JRBGgI+UnHNivL3ut\r\nml+G5LsePwpRfZNMq495VFU07ZI2N43... .FFFY2lkQ==\r\n=gBcQ\r\n-----END PGP MESSAGE-----", + "description": "Token encrypted using server's public key" + } + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK\n\n The example below shows a status of `error` because the user is not logged in at this point. This is emphasized with the message as well and is expected. You must check the `X-GPGAuth-Verify-Response` header for the decrypted token and then compare to the client-created token.", + "headers": { + "X-GPGAuth-Authenticated": { + "schema": { + "type": "string", + "example": "false" + }, + "description": "Auth_Status" + }, + "X-GPGAuth-Progress": { + "schema": { + "type": "string", + "example": "stage0" + }, + "description": "Auth_Stage" + }, + "X-GPGAuth-Verify-Response": { + "schema": { + "type": "string", + "example": "gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0" + }, + "description": "Encrypted token" + }, + "X-GPGAuth-Debug": { + "schema": { + "type": "string", + "example": "There is no user associated with this key. User not found. " + }, + "description": "Error details" + } + }, + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + } + }, + "example": { + "header": { + "id": "1e633dcc-8601-49e2-b5ad-5968e901610a", + "status": "error", + "servertime": 1611931136, + "action": "a3c19ad2-8920-5395-86d0-8567cb34f382", + "message": "The authentication failed.", + "url": "/auth/verify.json", + "code": 200 + }, + "body": null + } + } + } + } + } + } + } + }, + "/auth/login.json": { + "post": { + "summary": "Authenticate the user", + "description": "The same URL works for multiple Request/Response login steps. The server recognizes which step from the request payload and headers.\n\n Step 1. Client sends user fingerprint to server. If user exists, server sends back encrypted token in header `X-GPGAuth-User-Auth-Token` using user's public key. The client/user needs to decode and decrypt this encrypted token using the user's private key and passphrase.\n\n Step 2. Client then sends the decrypted text in the request body in `user_token_result`. This is checked by the server against its stored plain text token used to verify the user.\n\n Upon verification the server creates and returns \"authenticated\" cookies that can be used to make further requests. The `CAKEPHP` session cookie will work for all GET endpoints but the `csrfToken` cookie is needed for endpoints where data is written.\n\n To know more about Passbolt's authentication, please visit https://help.passbolt.com/tech/auth", + "tags": [ + "Auth" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "gpg_auth" + ], + "properties": { + "data": { + "type": "object", + "properties": { + "gpg_auth": { + "type": "object", + "properties": { + "keyid": { + "type": "string", + "example": "5df19d50db2d11318e0993b2d3c43f6d4678554e", + "description": "User's public key fingerprint" + }, + "user_token_result": { + "type": "string", + "description": "Plaintext string that was decrypted using client 's private key.\n" + } + } + } + } + } + } + }, + "examples": { + "Step_1": { + "value": { + "data": { + "gpg_auth": { + "keyid": "5df19d50db2d11318e0993b2d3c43f6d4678554e" + } + } + } + }, + "Step_2": { + "value": { + "data": { + "gpg_auth": { + "keyid": "5df19d50db2d11318e0993b2d3c43f6d4678554e", + "user_token_result": "gpgauthv1.3.0|36|90b2189b-2ab8-4c4b-9898-c763c546ece3|gpgauthv1.3.0" + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "X-GPGAuth-Authenticated": { + "schema": { + "type": "string", + "example": "false|true" + }, + "description": "Auth_Status: false in Step 1, true in Step 2 " + }, + "X-GPGAuth-Progress": { + "schema": { + "type": "string", + "example": "stage1|stage2" + }, + "description": "Auth_Stage, stage1 in Step 1, stage2 in Step 2 if successful " + }, + "X-GPGAuth-User-Auth-Token": { + "schema": { + "type": "string", + "example": "-----BEGIN\\+PGP\\+MESSAGE-----%0A%0AhQEMA%2BPe13g5TkINAQ6tf%2FY9Cm%2Fq... aOeKqkMU % 2 FNq8Wei % 0 A % 3 D88Wo % 0 A-- -- - END\\ + PGP\\ + MESSAGE-- -- - \n " + }, + "description": "Step 1: Ecrypted token sent by server" + } + }, + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + } + } + }, + "examples": { + "Step_1_Success": { + "value": { + "header": { + "id": "1e633dcc-8601-49e2-b5ad-5968e901610a", + "status": "error", + "servertime": 1611931136, + "action": "a3c19ad2-8920-5395-86d0-8567cb34f382", + "message": "The authentication failed.", + "url": "/auth/login.json", + "code": 200 + }, + "body": null + } + }, + "Step_1_Invalid_Fingerprint": { + "value": { + "header": { + "id": "1e633dcc-8601-49e2-b5ad-5968e901610a", + "status": "error", + "servertime": 1611931136, + "action": "a3c19ad2-8920-5395-86d0-8567cb34f382", + "message": "The authentication failed. There is no user associated with this key. Invalid fingerprint.", + "url": "/auth/login.json", + "code": 200 + }, + "body": null + } + }, + "Step_2_Success": { + "value": { + "header": { + "id": "2e1ec79a-6700-4c4f-bdca-19db4b0e743a", + "status": "success", + "servertime": 1617022931, + "action": "a3c19ad2-8920-5395-86d0-8567cb34f382", + "message": "You are successfully logged in.", + "url": "/auth/login.json", + "code": 200 + }, + "body": { + "id": "0340beb0-f642-4fc1-8922-7e98cf763d91", + "role_id": "28f2c4d9-97d7-470d-82f0-10c38e6306bd", + "username": "ada@passbolt.com", + "active": "true", + "deleted": "false", + "created": "2020-12-10T14:17:34+00:00", + "modified": "2020-12-10T14:18:47+00:00", + "groups_users": [], + "profile": { + "id": "2a5067c6-0459-4000-8b0a-22074de3f545", + "user_id": "0340beb0-f642-4fc1-8922-7e98cf763d91", + "first_name": "Test", + "last_name": "User", + "created": "2020-12-10T14:17:34+00:00", + "modified": "2020-12-10T14:17:34+00:00", + "avatar": { + "url": { + "medium": "img/avatar/user_medium.png", + "small": "img/avatar/user.png" + } + } + }, + "gpgkey": { + "id": "30380fa2-9dad-4ba1-9c75-b79dbe7c4a91,", + "user_id": "0340beb0-f642-4fc1-8922-7e98cf763d91,", + "armored_key": "-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nVersion: OpenPGP.js v4.10.4\r\nComment: https: //openpgpjs.org\r\n\r\nxsBNBF/SLiBCACsXwu+v8pL /MYflZpX4X5K26S8IrWgIF0SgKyWpKi5n+g2\r\nvrEQkwk1ZVka3RA5...Smn\r\n=Y9L+\r\n-----END PGP PUBLIC KEY BLOCK-----", + "bits": "2048", + "uid": "Test User ", + "key_id": "4678554E", + "fingerprint": "5DF19D50DB2D11318E0993B2D3C43F6D4678554E", + "type": "RSA", + "expires": "null", + "key_created": "2020-12-10T14:18:19+00:00", + "deleted": "false", + "created": "2020-12-10T14:18:47+00:00", + "modified": "2020-12-10T14:18:47.000Z" + }, + "role": { + "id": "28f2c4d9-97d7-470d-82f0-10c38e6306bd", + "name": "admin", + "description": "Organization administrator", + "created": "2012-07-04T13:39:25+00:00", + "modified": "2012-07-04T13:39:25.000Z" + }, + "is_mfa_enabled": "false", + "last_logged_in": null + } + } + }, + "Step_2_Failed_Token_Decryption": { + "value": { + "header": { + "id": "1e633dcc-8601-49e2-b5ad-5968e901610a", + "status": "error", + "servertime": 1611931136, + "action": "a3c19ad2-8920-5395-86d0-8567cb34f382", + "message": "The authentication failed.", + "url": "/auth/login.json", + "code": 200 + }, + "body": null + } + } + } + } + } + } + } + } + }, + "/resources.json": { + "get": { + "description": "Returns a list of your passwords.The passwords are returned sorted alphabetically by their name.", + "summary": "List all Passwords", + "operationId": "getPasswords", + "tags": [ + "Resources" + ], + "parameters": [ + { + "name": "contain[creator]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[favorite]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[modifier]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[secret]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[resource-type]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[permission]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[permissions]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[permissions.user.profile]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "contain[permissions.group]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "filter[is-favorite]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "filter[is-shared-with-group]", + "in": "query", + "schema": { + "type": "string", + "format": "uuid" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": "paste group UUID here" + } + } + }, + { + "name": "filter[is-owned-by-me]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "filter[is-shared-with-me]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "filter[has-id]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": "paste Resource UUID here" + } + } + }, + { + "name": "filter[has-tag]", + "in": "query", + "schema": { + "type": "integer" + }, + "examples": { + "Unused": { + "value": null + }, + "Used": { + "value": 1 + } + } + }, + { + "name": "order[Resource.modified]", + "in": "query", + "schema": { + "type": "string" + }, + "examples": { + "Unused": { + "value": null + }, + "Ascending": { + "value": "ASC" + }, + "Descending": { + "value": "DESC" + } + } + } + ], + "responses": { + "200": { + "description": "OK
This example shows most optional parameters included.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "servertime": { + "type": "integer", + "format": "timestamp" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "url" + } + } + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Resource" + } + } + } + } + } + } + }, + "403": { + "description": "Error: Forbidden.
When user is not authenticated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "example": "a079d24a-9253-455c-8bd8-ac59ff2defab" + }, + "status": { + "type": "string", + "example": "error" + }, + "servertime": { + "type": "integer", + "format": "timestamp", + "example": 1617049171 + }, + "action": { + "type": "string", + "format": "uuid", + "example": "c506210f-7866-5691-8fc1-58772e8f49f1" + }, + "message": { + "type": "string", + "example": "You need to login to access this location. " + }, + "url": { + "type": "string", + "example": "/resources.json" + }, + "code": { + "type": "integer", + "example": 403 + } + } + }, + "body": { + "type": "string", + "example": "" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "createPassword", + "tags": [ + "Resources" + ], + "summary": "Creates a new Resource.", + "description": "Creates a new Resource with metadata and secrets.", + "parameters": [ + { + "name": "X-CSRF-Token", + "in": "header", + "schema": { + "type": "string" + }, + "description": "csrfToken", + "required": true, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "secrets" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string", + "description": "Description of the Resource." + }, + "uri": { + "type": "string", + "format": "url" + }, + "secrets": { + "type": "array", + "items": { + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "data": { + "type": "string", + "description": "Encrypted password string" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\n" + }, + "403": { + "description": "Forbidden\n--\n" + } + } + } + }, + "/resources/{resourceId}.json": { + "get": { + "operationId": "getPassword", + "tags": [ + "Resources" + ], + "summary": "Find password by ID", + "description": "Returns a single password", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "ID of the Resource to return", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "$ref": "#/components/schemas/Resource" + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n--\nThe `resourceId` is not valid.\n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A password with the given `resourceId` does not exist.\n - The current user does not have `READ` permission on the password n " + } + } + }, + "put": { + "tags": [ + "Resources" + ], + "summary": "Update an existing password", + "description": "Updates the specified password by setting the values of the parameters passed. Any parameters not provided will be left unchanged.\n\nThis request accepts mostly the same arguments as the `Password` creation call.", + "operationId": "updatePassword", + "parameters": [ + { + "name": "api-version", + "in": "query", + "description": "API Version to target for this request ", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + }, + { + "name": "resourceId", + "in": "path", + "description": "ID of the password to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "secrets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "data": { + "type": "string", + "description": "Encrypted password string" + } + } + } + }, + "uri": { + "type": "string", + "format": "url" + } + } + } + } + }, + "description": "Password data to update", + "required": true + }, + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\nSome required parameters are missing n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A password with the given `resourceId` does not exist n - The current user does not have sufficient permission on the password n " + } + } + }, + "delete": { + "operationId": "deletePassword", + "tags": [ + "Resources" + ], + "summary": "Deletes a password", + "description": "Deletes the password and also drops all the associated permissions.\n ", + "parameters": [ + { + "name": "api-version", + "in": "query", + "description": "API Version to target for this request ", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + }, + { + "name": "resourceId", + "in": "path", + "description": "Password id to delete ", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\nWhen `resourceId` is not a valid `UUID`n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - The `resourceId` does not exist.\n - The Resource is already deleted.\n - If the user does not have access to the Resource.\n - If the user does not have permission to delete the Resource.\n " + }, + "500": { + "description": "Server Error\n--\nif the resource could not be deleted for other reasons n " + } + } + } + }, + "/users.json": { + "get": { + "description": "Returns a list of your users.The users are returned sorted alphabetically by their name. ", + "summary": "List all users", + "operationId": "getUsers", + "tags": [ + "Users" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserFull" + } + } + } + } + } + } + }, + "403": { + "description": "Authentication failure.\n--\nWhen the user making the request is not authenticated n " + } + } + }, + "post": { + "operationId": "createUser", + "tags": [ + "Users" + ], + "summary": "Creates a new user.", + "description": "Creates a new user.", + "parameters": [ + { + "name": "api-version", + "in": "query", + "description": "API Version to target for this request", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "first_name", + "last_name", + "username", + "is_admin" + ], + "properties": { + "first_name": { + "type": "string", + "maxLength": 255 + }, + "last_name": { + "type": "string", + "maxLength": 255 + }, + "username": { + "type": "string", + "format": "email" + }, + "is_admin": { + "type": "boolean" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\n" + }, + "403": { + "description": "Forbidden\n--\n" + } + } + } + }, + "/users/{userId}.json": { + "get": { + "operationId": "getUser", + "tags": [ + "Users" + ], + "summary": "Find user by ID", + "description": "Returns a single user", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user to return", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "$ref": "#/components/schemas/User" + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n--\nThe `userId` is not valid.\n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A user with the given `userId` does not exist.\n - The current user does not have `READ` permission on the user n " + } + } + }, + "put": { + "tags": [ + "Users" + ], + "summary": "Update an existing user", + "description": "Updates the specified user by setting the values of the parameters passed.Any parameters not provided will be left unchanged.\n\n This request accepts mostly the same arguments as the `User` creation call.", + "operationId": "updateUser", + "parameters": [ + { + "name": "api-version", + "in": "query", + "description": "API Version to target for this request", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + }, + { + "name": "userId", + "in": "path", + "description": "ID of the user to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "secrets": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "data": { + "type": "string", + "description": "Encrypted user string" + } + } + } + }, + "uri": { + "type": "string", + "format": "url" + } + } + } + } + }, + "description": "User data to update", + "required": true + }, + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\nSome required parameters are missing n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A user with the given `userId` does not exist n - The current user does not have sufficient permission on the user n " + } + } + }, + "delete": { + "operationId": "deleteUser", + "tags": [ + "Users" + ], + "summary": "Deletes a user", + "description": "Deletes the user and also drops all the associated permissions.", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "User id to delete", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\nWhen `userId` is not a valid `UUID`n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - The `userId` does not exist.\n - The User is already deleted.\n - If the user does not have access to the user.\n - If the user does not have the permission to delete the user.\n " + }, + "500": { + "description": "Server Error\n--\nif the user could not be deleted for other reasons n " + } + } + } + }, + "/users/{userId}/dry-run": { + "delete": { + "tags": [ + "Users" + ], + "summary": "Checks if a user can be deleted", + "description": "A User can not be deleted if n * it 's the sole owner of a shared Resource or n * it 's the sole manager of a Group or\n* it' s the sole manager of a Group that is the sole owner of a shared Resource n nThis endpoint is useful when you want to check and avoid any side effects of deleting a user.", + "parameters": [ + { + "name": "api-version", + "in": "query", + "description": "API Version to target for this request ", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + }, + { + "name": "userId", + "in": "path", + "description": "User id to check for deletion", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\nThe User can be deleted safely n " + }, + "400": { + "description": "Bad Request\n--\nSome of the validation checks failed.The User can not be deleted safely.\n " + } + } + } + }, + "/groups.json": { + "get": { + "description": "Returns a list of your groups.The groups are returned sorted alphabetically by their name.", + "summary": "List all groups", + "operationId": "getGroups", + "tags": [ + "Groups" + ], + "parameters": [ + { + "name": "api-version", + "in": "query", + "description": "API Version to target for this request", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + }, + { + "name": "contain", + "description": "Fields that must be included in the response.Takes a comma separated list. ", + "in": "query", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "modifier", + "modifier.profile", + "user", + "group_user", + "my_group_user" + ] + } + } + }, + { + "name": "filter", + "in": "query", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "has-users", + "has-managers" + ] + } + } + }, + { + "name": "order", + "in": "query", + "description": "How the result list should be sorted.", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "Group.name" + ] + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Group" + } + } + } + } + } + } + }, + "403": { + "description": "Authentication failure.\n--\nWhen the group making the request is not authenticated n " + } + } + }, + "post": { + "operationId": "createGroup", + "tags": [ + "Groups" + ], + "summary": "Creates a new group.", + "description": "Creates a new group.", + "requestBody": { + "$ref": "#/components/requestBodies/createGroupGroup" + }, + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\n" + }, + "403": { + "description": "Forbidden\n--\n" + } + } + } + }, + "/groups/{groupId}.json": { + "get": { + "operationId": "getGroup", + "tags": [ + "Groups" + ], + "summary": "Find group by ID", + "description": "Returns a single group", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group to return", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "$ref": "#/components/schemas/Group" + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n--\nThe `groupId` is not valid.\n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A group with the given `groupId` does not exist.\n - The current group does not have `READ` permission on the group n " + } + } + }, + "put": { + "tags": [ + "Groups" + ], + "summary": "Update an existing group", + "description": "Updates the specified group by setting the values of the parameters passed.Any parameters not provided will be left unchanged.\n\n This request accepts mostly the same arguments as the `Group` creation call.", + "operationId": "updateGroup", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "ID of the group to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/createGroupGroup" + }, + "responses": { + "200": { + "description": "OK\n--\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "$ref": "#/components/schemas/Group" + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n--\nSome required parameters are missing n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A group with the given `groupId` does not exist n - The current group does not have sufficient permission on the group n " + } + } + }, + "delete": { + "operationId": "deleteGroup", + "tags": [ + "Groups" + ], + "summary": "Deletes a group", + "description": "Deletes the Group and also all the Resources that belong only to this group.\n ", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "Group id to delete", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\nWhen `groupId` is not a valid `UUID`n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - The `groupId` does not exist.\n - The Group is already deleted.\n - If the user is neither a Group manager nor Admin.\n " + }, + "500": { + "description": "Server Error\n--\nif the group could not be deleted for other reasons n " + } + } + } + }, + "/groups/{groupId}/dry-run": { + "put": { + "tags": [ + "Groups" + ], + "summary": "Checks if a group can be updated.", + "description": "The endpoint performs all the validation checks required for a Group update. This is useful to determine if it's safe to update a Group. It returns a success response if the Group can be updated, on validation failures, the response will have the reason and suggestions for the failed checks.", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "Group id to check for update.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\nThe group can be updated safely n " + }, + "400": { + "description": "Bad Request\n--\nIf `groupId` is not a valid UUID.\n " + }, + "403": { + "description": "Forbidden\n--\nIf the user making the request is neither the Group manager nor an Admin.\n " + }, + "404": { + "description": "Not Found\n--\n* No Group found for the given `groupId` or n * The Group has been deleted.\n " + } + } + }, + "delete": { + "tags": [ + "Groups" + ], + "summary": "Checks if a group can be deleted", + "description": "A Group can not be deleted if it's the sole owner of a Resource. This endpoint is useful when you want to check and avoid any side effects of deleting a group.", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "Group id to check for deletion", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\nThe Group can be deleted safely.\n " + }, + "400": { + "description": "Bad Request\n--\nThe Group is the sole owner of a Resource and hence can not be deleted.\n " + } + } + } + }, + "/share/search-aros.json": { + "get": { + "tags": [ + "Share" + ], + "summary": "Get a list of Access Resource Objects or AROs", + "description": "Get a list of all the users/groups with whom an item can be shared", + "parameters": [ + { + "name": "filter", + "in": "query", + "style": "form", + "explode": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "search" + ] + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_count": { + "type": "number" + }, + "id": { + "type": "string", + "format": "uuid" + }, + "deleted": { + "type": "boolean" + }, + "created": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + }, + "created_by": { + "type": "string", + "format": "uuid" + }, + "modified_by": { + "type": "string", + "format": "uuid" + } + } + } + } + } + } + } + } + } + } + } + }, + "/share/simulate/resource/{resourceId}.json": { + "post": { + "tags": [ + "Share" + ], + "summary": "Simulates sharing a password.", + "description": "Simulates sharing a resource with a user and/or group. Useful for avoiding any side effects and checking the possible errors.\n ", + "operationId": "simulateShare", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "The identifier of the resource to dry run a share on", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object", + "properties": { + "changes": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "object" + } + }, + "changed": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n--\nIf the `resourceId` is not a valid uuid n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A resource with the given `resourceId` does not exist n - The resource is soft deleted n - The user does not have access to the resource n " + } + } + } + }, + "/share/resource/{resourceId}.json": { + "put": { + "tags": [ + "Share" + ], + "summary": "Share a password", + "description": "Shares a password.", + "operationId": "shareResource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "The identifier of the resource to dry run a share on", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n" + }, + "400": { + "description": "Bad Request\n--\nIf the `resourceId` is not a valid uuid n " + }, + "404": { + "description": "Not Found\n--\nWhen either of the following is true n - A resource with the given `resourceId` does not exist n - The resource is soft deleted n - The user does not have access to the resource n " + } + } + } + }, + "/permissions/resource/{resourceId}.json": { + "get": { + "tags": [ + "Permissions" + ], + "summary": "TODO Summary", + "description": "TODO Description", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "UUID of the password to check permissions for", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK\n--\n", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "aco": { + "type": "string" + }, + "aco_foreign_key": { + "type": "string", + "format": "uuid" + }, + "aro": { + "type": "string" + }, + "aro_foreign_key": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "format": "datetime" + }, + "group": { + "type": "string" + }, + "modified": { + "type": "string", + "format": "datetime" + }, + "type": { + "type": "number" + } + } + } + } + } + } + } + } + } + } + } + }, + "/favorites/resource/{resourceId}.json": { + "post": { + "tags": [ + "Favorites" + ], + "summary": "Add Password to favorites", + "description": "Add the given password to list of favorites", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "user_id": { + "type": "string", + "format": "uuid" + }, + "foreign_key": { + "type": "string", + "format": "uuid" + }, + "foreign_model": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "format": "datetime" + }, + "modified": { + "type": "string", + "format": "datetime" + } + } + } + } + } + } + } + }, + "404": { + "description": "Not Found\n---\n - If the resource id is not valid n - If the resource does not exist n - If the resource is soft deleted n - If the user does not have access to the resource n " + } + } + } + }, + "/favorites/{favoriteId}.json": { + "delete": { + "tags": [ + "Favorites" + ], + "summary": "Delete a favorite entry", + "description": "Remove a password from the list of favorites", + "parameters": [ + { + "name": "favoriteId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object" + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n--\nWhen the given `favoriteId` is not a valid uuid n " + }, + "404": { + "description": "Not Found\n---\n - If the favorite does not exist n " + } + } + } + }, + "/comments/resource/{resourceId}.json": { + "get": { + "tags": [ + "Comments" + ], + "summary": "List all comments on the record", + "description": "List all comments on an entity of `model` type and identified by `modelId`", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "description": "ID of the resource to fetch comments for", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Comment" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID n " + }, + "404": { + "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found n " + } + } + }, + "post": { + "tags": [ + "Comments" + ], + "summary": "Add a comment to a resource", + "description": "Add a comment to a resource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "description": "ID of the resource to add comment to", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The comment text " + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Comment" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID n " + }, + "404": { + "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found n " + } + } + } + }, + "/comments/{commentId}.json": { + "put": { + "tags": [ + "Comments" + ], + "summary": "Update a comment", + "description": "Update a comment", + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "description": "ID of the comment to update", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The new content to update " + } + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Comment" + } + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID n " + }, + "404": { + "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found n " + } + } + }, + "delete": { + "tags": [ + "Comments" + ], + "summary": "Delete a comment", + "description": "Delete a comment", + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "description": "ID of the comment to delete", + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object" + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n---\nWhen the given `resourceId` is not a valid UUID n " + }, + "404": { + "description": "Not Found\n---\nIf a resource with the given `resourceId` is not found nIf the current user does not have enough permission to delete the comment n " + } + } + } + }, + "/gpgkeys.json": { + "get": { + "tags": [ + "GPG Keys" + ], + "summary": "List all the GPG keys", + "description": "Fetches a list of all your GPG keys", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GpgKey" + } + } + } + } + } + } + } + } + } + }, + "/gpgkeys/{keyId}.json": { + "get": { + "tags": [ + "GPG Keys" + ], + "summary": "Find GPG key by ID", + "description": "Returns a single GPG key", + "parameters": [ + { + "name": "api-version", + "in": "query", + "schema": { + "type": "string", + "enum": [ + "v1", + "v2" + ], + "default": "v1" + } + }, + { + "name": "keyId", + "in": "path", + "required": true, + "description": "ID of the GPG key to fetch", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "$ref": "#/components/schemas/GpgKey" + } + } + } + } + } + }, + "400": { + "description": "Bad Request\n---\nIf the given `keyId` is not a valid UUID n " + }, + "404": { + "description": "Not Found\n---\nIf a GPGKey with the given `keyId` could not be found n " + } + } + } + }, + "/secrets/resource/{resourceId}.json": { + "get": { + "tags": [ + "Secrets" + ], + "summary": "Get password for a given resource.", + "description": "Will return the secret password encoded with user's GPG key. This will need to be decrypted on the client end to get the actual password string.", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "required": true, + "description": "ID of resource of which the password should be returned", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "format": "datetime" + }, + "data": { + "type": "string", + "description": "PGP encrypted string containing the password string " + }, + "modified": { + "type": "string", + "format": "datetime" + }, + "resource_id": { + "type": "string", + "format": "uuid" + }, + "user_id": { + "type": "string", + "format": "uuid" + } + } + } + } + } + } + } + } + } + } + }, + "/settings.json": { + "get": { + "tags": [ + "Settings" + ], + "summary": "List the user level settings", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object", + "properties": { + "app": { + "type": "object", + "properties": { + "debug": { + "type": "boolean" + }, + "image_storage": { + "type": "object", + "properties": { + "public_path": { + "type": "string", + "format": "uri" + } + } + }, + "server_timezone": { + "type": "string" + }, + "session_timeout": { + "type": "number" + }, + "url": { + "type": "string", + "format": "url" + }, + "version": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "number": { + "type": "string" + } + } + } + } + }, + "passbolt": { + "properties": { + "edition": { + "type": "string", + "enum": [ + "ce", + "pro" + ] + }, + "plugins": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/roles.json": { + "get": { + "tags": [ + "Role" + ], + "summary": "List the available user roles", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + } + } + } + } + } + }, + "/healthcheck.json": { + "get": { + "tags": [ + "Health Check" + ], + "summary": "Perform a health check", + "description": "Return server status report", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "object", + "properties": { + "ssl": { + "type": "object" + }, + "database": { + "type": "object" + }, + "application": { + "type": "object" + }, + "environment": { + "type": "object" + }, + "configFile": { + "type": "object" + }, + "core": { + "type": "object" + }, + "gpg": { + "type": "object" + } + } + } + } + } + } + } + } + } + } + }, + "/healthcheck/status.json": { + "get": { + "tags": [ + "Health Check" + ], + "summary": "Get the health check status", + "description": "Return server status", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "header": { + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "string", + "enum": [ + "OK" + ] + } + } + } + } + } + } + } + } + } + }, + "components": { + "requestBodies": { + "createGroupGroup": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name", + "group_users" + ], + "properties": { + "name": { + "type": "string" + }, + "group_users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "user_id": { + "type": "string", + "format": "uuid" + }, + "is_admin": { + "type": "boolean" + } + } + } + } + } + } + } + } + } + }, + "schemas": { + "ApiResponseHeader": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "servertime": { + "type": "integer", + "format": "timestamp" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "url" + } + } + }, + "ApiResponse": { + "type": "object", + "properties": { + "header": { + "type": "object", + "$ref": "#/components/schemas/ApiResponseHeader" + }, + "body": { + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "Avatar": { + "type": "object", + "properties": { + "url": { + "type": "object", + "properties": { + "medium": { + "type": "string", + "format": "uri" + }, + "small": { + "type": "string", + "format": "uri" + } + } + } + } + }, + "Comment": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "parent_id": { + "type": "string", + "format": "uuid" + }, + "foreign_key": { + "type": "string", + "format": "uuid" + }, + "foreign_model": { + "type": "string" + }, + "content": { + "type": "string" + }, + "created": { + "type": "string", + "format": "datetime" + }, + "modified": { + "type": "string", + "format": "datetime" + }, + "created_by": { + "type": "string", + "format": "uuid" + }, + "modified_by": { + "type": "string", + "format": "uuid" + }, + "user_id": { + "type": "string", + "format": "uuid" + }, + "creator": { + "$ref": "#/components/schemas/User" + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Comment" + } + } + } + }, + "Favorite": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "format": "date" + }, + "foreign_key": { + "type": "string", + "format": "uuid" + }, + "foreign_model": { + "type": "string" + }, + "modified": { + "type": "string", + "format": "date" + }, + "user_id": { + "type": "string", + "format": "uuid" + } + } + }, + "GpgKey": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "user_id": { + "type": "string", + "format": "uuid" + }, + "armored_key": { + "type": "string" + }, + "bits": { + "type": "number" + }, + "uid": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "fingerprint": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "RSA", + "ELGAMAL", + "DSA", + "ECC", + "ECDSA", + "DH" + ] + }, + "expires": { + "type": "string", + "format": "date" + }, + "key_created": { + "type": "string", + "format": "date" + }, + "deleted": { + "type": "boolean" + }, + "created": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + } + } + }, + "Group": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "deleted": { + "type": "string", + "format": "date" + }, + "created": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + }, + "created_by": { + "type": "string", + "format": "uuid" + }, + "modified_by": { + "type": "string", + "format": "uuid" + }, + "groups_users": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "user_id": { + "type": "string", + "format": "uuid" + }, + "group_id": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "format": "datetime" + }, + "is_admin": { + "type": "boolean" + }, + "user": { + "$ref": "#/components/schemas/UserFull" + } + } + } + } + } + }, + "Permission": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "aco": { + "type": "string" + }, + "aco_foreign_key": { + "type": "string", + "format": "uuid" + }, + "aro": { + "type": "string" + }, + "aro_foreign_key": { + "type": "string", + "format": "uuid" + }, + "created": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + }, + "type": { + "type": "integer" + } + } + }, + "Profile": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "user_id": { + "type": "string", + "format": "uuid" + }, + "first_name": { + "type": "string", + "maxLength": 255 + }, + "last_name": { + "type": "string", + "maxLength": 255 + }, + "created": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + } + } + }, + "Resource": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Unique ID of the password in `UUID` format\n" + }, + "created": { + "type": "string", + "format": "date", + "description": "Datetime on when the password was created.\n" + }, + "created_by": { + "type": "string", + "format": "uuid", + "description": "`ID` of the `User` who created the password in `UUID` format\n" + }, + "creator": { + "$ref": "#/components/schemas/User" + }, + "deleted": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "favorite": { + "$ref": "#/components/schemas/Favorite" + }, + "modified": { + "type": "string", + "format": "date" + }, + "modified_by": { + "type": "string", + "format": "uuid" + }, + "modifier": { + "$ref": "#/components/schemas/User" + }, + "name": { + "type": "string" + }, + "permission": { + "$ref": "#/components/schemas/Permission" + }, + "uri": { + "type": "string", + "format": "url" + }, + "username": { + "type": "string" + } + } + }, + "Role": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "created": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + } + } + }, + "User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "active": { + "type": "boolean" + }, + "created": { + "type": "string", + "format": "date" + }, + "deleted": { + "type": "boolean" + }, + "last_logged_in": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + }, + "role_id": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string", + "format": "email" + } + } + }, + "UserFull": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "role_id": { + "type": "string", + "format": "uuid" + }, + "username": { + "type": "string", + "format": "email" + }, + "active": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + }, + "created": { + "type": "string", + "format": "date" + }, + "modified": { + "type": "string", + "format": "date" + }, + "profile": { + "$ref": "#/components/schemas/Profile" + }, + "group_users": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + }, + "role": { + "$ref": "#/components/schemas/Role" + }, + "gpgkey": { + "$ref": "#/components/schemas/GpgKey" + }, + "last_logged_in": { + "type": "string", + "format": "date" + } + } + } + } + } } \ No newline at end of file diff --git a/swagger.yaml b/swagger.yaml index ebdc8b8..27cbe7a 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -1,240 +1,602 @@ -swagger: '2.0' +openapi: 3.0.0 info: - description: | - This document describes passbolt backend REST APIs. They work over HTTPS so they are language/framework agnostic. Clients can consume them in their language of choice using the HTTPS protocol. - version: "2.8.3" - title: "passbolt API Reference" - termsOfService: "https://www.passbolt.com/terms" + title: passbolt API Reference + version: 2.8.3 + description: >- + This document describes the passbolt backend API endpoints which require a + cookie - based session. The API works over the HTTP protocol and so is + language/framework agnostic.\n\n All endpoints require a session cookie + named CAKEPHP . Endpoints that create or alter data need an + additional cookie named csrfToken . This second cookie is sent via + a header name X-CRSF-Token as needed. + termsOfService: 'https://www.passbolt.com/terms' contact: email: contact@passbolt.com license: name: AGPL-3.0 url: 'http://www.gnu.org/licenses/agpl-3.0.html' -host: www.passbolt.com -basePath: / +servers: + - url: 'https://passbolt.com' tags: - name: Auth description: Authentication endpoints - - name: Resource - description: | - In passbolt, passwords are split into two different entities: Resources and Secrets. Passwords metadata are internally known as `Resources` and are represented as one object containing the name, username, the URL amongst other fields. While the actual password is part of the `Secrets` entity. The API allows you to create, delete, and update your passwords. You can retrieve individual passwords as well as a list of all your passwords. - - name: User - description: | - User are entities with the ability to interact with the passbolt backend with their unique username and passwords. They are usually represented by one person. The User object returned by the API hence contains the relevant associated fields like `gpgkey`, `profile`, `role` etc. - - name: Group + - name: Resources + description: >- + In passbolt, passwords are split into two different entities: Resources + and Secrets. Passwords metadata are internally known as `Resources` and + are represented as one object containing the name, username, the URL in + addition to other fields. The actual password is part of the `Secrets` + entity. The API allows you to create, delete, and update your passwords. + You can retrieve individual passwords as well as a list of all your + passwords. + - name: Users + description: >- + User are entities with the ability to interact with the passbolt backend + with their unique username and passwords. They are usually represented by + one person. The User object returned by the API hence contains the + relevant associated fields like `gpgkey`, `profile`, `role`. etc. + - name: Groups description: Group of users -schemes: - - https paths: /auth/verify.json: get: summary: Fetches server's identity for verification - description: | - Returns server's public key with it's fingerprint. Useful when you want to send sensitive data to the server from a client. The sensitive data needs to be encrypted using this public key. + description: >- + Returns server's public PGP key and fingerprint. Useful when we want to + send sensitive data to the server from the client. Sensitive data can + be encrypted using this public key. tags: - Auth responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: + content: + '*/*': + schema: type: object properties: - fingerprint: - type: string - keydata: - type: string - description: Server's PGP encrypted public key - /auth/login.json: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: object + properties: + fingerprint: + type: string + keydata: + type: string + description: Server's PGP encrypted public key + example: + header: + id: 138bd33d-e26c-4a15-8972-e8c70a7b478b + status: success + servertime: 1611780195 + action: 748dcd10-7d15-5498-9aa6-d26de348ff02 + message: The operation was successful. + url: /auth/verify.json + code: 200 + body: + fingerprint: 96ACA7F95D5E064A947E9B1EEE0AE701E483DEB7 + keydata: >- + -----BEGIN PGP PUBLIC KEY BLOCK-----\r\nVersion: + OpenPGP.js v4.6.2\r\nComment: + https://openpgpjs.org\r\n\r\nx + sBNBFM/GcoSN65WN9M3V+IWzkoT6O5vW\r\nGgu7TAjliAIO7NHaOeoYp/lTYmjh + \r\n=kPFx\r\n-----END PGP PUBLIC KEY BLOCK----- post: - summary: Logs a user in - description: | - The same URL works for two login steps. The server recognises the step from the request payload and headers. - - Step 1. Encrypts a random string using server's public key and send to the server as request body in `server_verify_token` - - Step 2. After verification, the server responds back with a random token encrypted using client's public key in the header called `X-GPGAuth-User-Auth-Token`. + summary: Used in server identification process + description: >- + Send user's public key fingerprint and token encrypted with server's + public gpg key. - Step 3. Client then decrypts and sends the decrypted text in the request body in `user_token_result`. + Client-created token which includes a v4 UUID must follow this format: `gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0` - Step 4. Finally, the server verifies if the decrypted `user_token_result` matches with the original text and is still valid. Upon verification the server creates and returns "authenticated" cookies that can be used to make further requests. + For the token in it's encrypted form, replace the PGP block's line endings with \r\n and put the key in single-line string form. - To know more about Passbolt's authentication. Please visit https://help.passbolt.com/tech/auth + If using curl in Insomnia (or other API tools which generate curl commands) these tools often have trouble handing the PGP key in block form and turn `\r\n` into `\\r\`, adding a leading slash and dropping the `n`. Add the `n` back in, and run the curl command with `-v` flag verbose mode to see headers. tags: - Auth - parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - - in: body - name: auth - schema: - type: object - required: - - gpg_auth - properties: - gpg_auth: + requestBody: + content: + application/json: + schema: + type: object + properties: + data: + type: object + properties: + gpg_auth: + type: object + properties: + keyid: + type: string + example: 5df19d50db2d11318e0993b2d3c43f6d4678554e + description: User's public key fingerprint + server_verify_token: + type: string + example: "-----BEGIN PGP MESSAGE----- \r\n\r\nhQEMA/+ePtqRgfhuAQf/ Sc6qtG8OFxVRwBDPzco2e3HHKs7JRBGgI+UnHNivL3ut\r\nml+G5LsePwpRfZNMq495VFU07ZI2N43... .FFFY2lkQ==\r\n=gBcQ\r\n-----END PGP MESSAGE-----" + description: Token encrypted using server's public key + responses: + '200': + description: |- + OK + + The example below shows a status of `error` because the user is not logged in at this point. This is emphasized with the message as well and is expected. You must check the `X-GPGAuth-Verify-Response` header for the decrypted token and then compare to the client-created token. + headers: + X-GPGAuth-Authenticated: + schema: + type: string + example: 'false' + description: Auth_Status + X-GPGAuth-Progress: + schema: + type: string + example: stage0 + description: Auth_Stage + X-GPGAuth-Verify-Response: + schema: + type: string + example: >- + gpgauthv1.3.0|36|10e2074b-f610-42be-8525-100d4e68c481|gpgauthv1.3.0 + description: Encrypted token + X-GPGAuth-Debug: + schema: + type: string + example: 'There is no user associated with this key. User not found. ' + description: Error details + content: + '*/*': + schema: type: object properties: - keyid: - type: string - description: Fingerprint of the user's - example: 252B91CB28A96C6D67E8FC139020576F08D8B763 - server_verify_token: - type: string - description: Token encrypted by the client using server's public key. This acts as a challenge that the server must solve to confirm it\'s integrity. - user_token_result: - type: string - description: Plaintext string that was decrypted using client's private key. + header: + $ref: '#/components/schemas/ApiResponseHeader' + example: + header: + id: 1e633dcc-8601-49e2-b5ad-5968e901610a + status: error + servertime: 1611931136 + action: a3c19ad2-8920-5395-86d0-8567cb34f382 + message: The authentication failed. + url: /auth/verify.json + code: 200 + body: null + /auth/login.json: + post: + summary: Authenticate the user + description: >- + The same URL works for multiple Request/Response login steps. The + server recognizes which step from the request payload and headers. + + Step 1. Client sends user fingerprint to server. If user exists, server sends back encrypted token in header `X-GPGAuth-User-Auth-Token` using user's public key. The client/user needs to decode and decrypt this encrypted token using the user's private key and passphrase. + + Step 2. Client then sends the decrypted text in the request body in `user_token_result`. This is checked by the server against its stored plain text token used to verify the user. + + Upon verification the server creates and returns "authenticated" cookies that can be used to make further requests. The `CAKEPHP` session cookie will work for all GET endpoints but the `csrfToken` cookie is needed for endpoints where data is written. + + To know more about Passbolt's authentication, please visit https://help.passbolt.com/tech/auth + tags: + - Auth + requestBody: + content: + application/json: + schema: + type: object + required: + - gpg_auth + properties: + data: + type: object + properties: + gpg_auth: + type: object + properties: + keyid: + type: string + example: 5df19d50db2d11318e0993b2d3c43f6d4678554e + description: User's public key fingerprint + user_token_result: + type: string + description: > + Plaintext string that was decrypted using client 's + private key. + examples: + Step_1: + value: + data: + gpg_auth: + keyid: 5df19d50db2d11318e0993b2d3c43f6d4678554e + Step_2: + value: + data: + gpg_auth: + keyid: 5df19d50db2d11318e0993b2d3c43f6d4678554e + user_token_result: >- + gpgauthv1.3.0|36|90b2189b-2ab8-4c4b-9898-c763c546ece3|gpgauthv1.3.0 responses: '200': description: OK + headers: + X-GPGAuth-Authenticated: + schema: + type: string + example: false|true + description: 'Auth_Status: false in Step 1, true in Step 2 ' + X-GPGAuth-Progress: + schema: + type: string + example: stage1|stage2 + description: 'Auth_Stage, stage1 in Step 1, stage2 in Step 2 if successful ' + X-GPGAuth-User-Auth-Token: + schema: + type: string + example: >- + -----BEGIN\+PGP\+MESSAGE-----%0A%0AhQEMA%2BPe13g5TkINAQ6tf%2FY9Cm%2Fq... + aOeKqkMU % 2 FNq8Wei % 0 A % 3 D88Wo % 0 A-- -- - END\ + PGP\ + + MESSAGE-- -- - + + description: 'Step 1: Ecrypted token sent by server' + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + examples: + Step_1_Success: + value: + header: + id: 1e633dcc-8601-49e2-b5ad-5968e901610a + status: error + servertime: 1611931136 + action: a3c19ad2-8920-5395-86d0-8567cb34f382 + message: The authentication failed. + url: /auth/login.json + code: 200 + body: null + Step_1_Invalid_Fingerprint: + value: + header: + id: 1e633dcc-8601-49e2-b5ad-5968e901610a + status: error + servertime: 1611931136 + action: a3c19ad2-8920-5395-86d0-8567cb34f382 + message: >- + The authentication failed. There is no user associated + with this key. Invalid fingerprint. + url: /auth/login.json + code: 200 + body: null + Step_2_Success: + value: + header: + id: 2e1ec79a-6700-4c4f-bdca-19db4b0e743a + status: success + servertime: 1617022931 + action: a3c19ad2-8920-5395-86d0-8567cb34f382 + message: You are successfully logged in. + url: /auth/login.json + code: 200 + body: + id: 0340beb0-f642-4fc1-8922-7e98cf763d91 + role_id: 28f2c4d9-97d7-470d-82f0-10c38e6306bd + username: ada@passbolt.com + active: 'true' + deleted: 'false' + created: '2020-12-10T14:17:34+00:00' + modified: '2020-12-10T14:18:47+00:00' + groups_users: [] + profile: + id: 2a5067c6-0459-4000-8b0a-22074de3f545 + user_id: 0340beb0-f642-4fc1-8922-7e98cf763d91 + first_name: Test + last_name: User + created: '2020-12-10T14:17:34+00:00' + modified: '2020-12-10T14:17:34+00:00' + avatar: + url: + medium: img/avatar/user_medium.png + small: img/avatar/user.png + gpgkey: + id: '30380fa2-9dad-4ba1-9c75-b79dbe7c4a91,' + user_id: '0340beb0-f642-4fc1-8922-7e98cf763d91,' + armored_key: "-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nVersion: OpenPGP.js v4.10.4\r\nComment: https: //openpgpjs.org\r\n\r\nxsBNBF/SLiBCACsXwu+v8pL /MYflZpX4X5K26S8IrWgIF0SgKyWpKi5n+g2\r\nvrEQkwk1ZVka3RA5...Smn\r\n=Y9L+\r\n-----END PGP PUBLIC KEY BLOCK-----" + bits: '2048' + uid: Test User + key_id: 4678554E + fingerprint: 5DF19D50DB2D11318E0993B2D3C43F6D4678554E + type: RSA + expires: 'null' + key_created: '2020-12-10T14:18:19+00:00' + deleted: 'false' + created: '2020-12-10T14:18:47+00:00' + modified: '2020-12-10T14:18:47.000Z' + role: + id: 28f2c4d9-97d7-470d-82f0-10c38e6306bd + name: admin + description: Organization administrator + created: '2012-07-04T13:39:25+00:00' + modified: '2012-07-04T13:39:25.000Z' + is_mfa_enabled: 'false' + last_logged_in: null + Step_2_Failed_Token_Decryption: + value: + header: + id: 1e633dcc-8601-49e2-b5ad-5968e901610a + status: error + servertime: 1611931136 + action: a3c19ad2-8920-5395-86d0-8567cb34f382 + message: The authentication failed. + url: /auth/login.json + code: 200 + body: null /resources.json: get: - description: Returns a list of your passwords. The passwords are returned sorted alphabetically by their name. + description: >- + Returns a list of your passwords.The passwords are returned sorted + alphabetically by their name. summary: List all Passwords operationId: getPasswords tags: - - Resource - produces: - - application/json + - Resources parameters: - - name: api-version + - name: 'contain[creator]' in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - - name: contain - description: Fields that must be included in the response. Takes a comma separated list. + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[favorite]' in: query - type: array - collectionFormat: csv - items: - type: string - enum: - - creator - - favorite - - modifier - - permission - - permissions.user.profile - - permissions.group - - secret - - name: filter + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[modifier]' in: query - type: array - collectionFormat: csv - items: - type: string - enum: - - is-favorite - - is-shared-with-group - - is-owned-by-me - - is-shared-with-me - - has-id - - name: order + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[secret]' in: query - description: How the result list should be sorted. - type: array - collectionFormat: csv - items: - type: string - enum: - - is-favorite - - is-shared-with-group - - is-owned-by-me - - is-shared-with-me - - has-id + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[resource-type]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[permission]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[permissions]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[permissions.user.profile]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'contain[permissions.group]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'filter[is-favorite]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'filter[is-shared-with-group]' + in: query + schema: + type: string + format: uuid + examples: + Unused: + value: null + Used: + value: paste group UUID here + - name: 'filter[is-owned-by-me]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'filter[is-shared-with-me]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'filter[has-id]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: paste Resource UUID here + - name: 'filter[has-tag]' + in: query + schema: + type: integer + examples: + Unused: + value: null + Used: + value: 1 + - name: 'order[Resource.modified]' + in: query + schema: + type: string + examples: + Unused: + value: null + Ascending: + value: ASC + Descending: + value: DESC responses: '200': - description: OK - schema: - type: object - properties: - header: + description: OK
This example shows most optional parameters included. + content: + application/json: + schema: type: object properties: - id: - type: string - format: uuid - code: - type: integer - message: - type: string - servertime: - type: integer - format: timestamp - status: - type: string - title: - type: string - url: - type: string - format: url - body: - type: array - items: - $ref: '#/definitions/Resource' + header: + type: object + properties: + id: + type: string + format: uuid + code: + type: integer + message: + type: string + servertime: + type: integer + format: timestamp + status: + type: string + title: + type: string + url: + type: string + format: url + body: + type: array + items: + $ref: '#/components/schemas/Resource' '403': - description: | - Authentication failure. - -- - When the user making the request is not authenticated - + description: 'Error: Forbidden.
When user is not authenticated.' + content: + application/json: + schema: + type: object + properties: + header: + type: object + properties: + id: + type: string + format: uuid + example: a079d24a-9253-455c-8bd8-ac59ff2defab + status: + type: string + example: error + servertime: + type: integer + format: timestamp + example: 1617049171 + action: + type: string + format: uuid + example: c506210f-7866-5691-8fc1-58772e8f49f1 + message: + type: string + example: 'You need to login to access this location. ' + url: + type: string + example: /resources.json + code: + type: integer + example: 403 + body: + type: string + example: '' post: operationId: createPassword tags: - - Resource + - Resources summary: Creates a new Resource. description: Creates a new Resource with metadata and secrets. - consumes: - - application/json parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - - in: body - name: resource + - name: X-CSRF-Token + in: header schema: - type: object - required: - - name - - secrets - properties: - name: - type: string - description: - type: string - description: Description of the Resource. - uri: - type: string - format: url - secrets: - type: array - items: - properties: - user_id: - type: string - format: uuid - data: - type: string - description: Encrypted password string + type: string + description: csrfToken + required: true + style: simple + requestBody: + content: + application/json: + schema: + type: object + required: + - name + - secrets + properties: + name: + type: string + description: + type: string + description: Description of the Resource. + uri: + type: string + format: url + secrets: + type: array + items: + properties: + user_id: + type: string + format: uuid + data: + type: string + description: Encrypted password string responses: '200': description: | @@ -248,285 +610,242 @@ paths: description: | Forbidden -- - '/resources/{resourceId}.json': get: operationId: getPassword tags: - - Resource + - Resources summary: Find password by ID description: Returns a single password - produces: - - application/json parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: resourceId in: path description: ID of the Resource to return required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - $ref: '#/definitions/Resource' + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + $ref: '#/components/schemas/Resource' '400': - description: | + description: |- Bad Request -- - The `resourceId` is not valid. + The `resourceId` is not valid. + '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A password with the given `resourceId` does not exist. - - The current user does not have `READ` permission on the password + When either of the following is true n - A password with the given + `resourceId` does not exist. + - The current user does not have `READ` permission on the password n put: tags: - - Resource + - Resources summary: Update an existing password - description: | - Updates the specified password by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + description: >- + Updates the specified password by setting the values of the parameters + passed. Any parameters not provided will be left unchanged. - This request accepts mostly the same arguments as the `Password` creation call. + + This request accepts mostly the same arguments as the `Password` + creation call. operationId: updatePassword - consumes: - - application/json - produces: - - application/json parameters: - name: api-version in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 + description: 'API Version to target for this request ' + schema: + type: string + enum: + - v1 + - v2 + default: v1 - name: resourceId in: path description: ID of the password to update required: true - type: string - format: uuid - - name: resource - in: body - description: Password data to update - required: true schema: - type: object - properties: - description: - type: string - name: - type: string - secrets: - type: array - items: - type: object - properties: - user_id: - type: string - format: uuid - data: - type: string - description: Encrypted password string - uri: - type: string - format: url + type: string + format: uuid + requestBody: + content: + application/json: + schema: + type: object + properties: + description: + type: string + name: + type: string + secrets: + type: array + items: + type: object + properties: + user_id: + type: string + format: uuid + data: + type: string + description: Encrypted password string + uri: + type: string + format: url + description: Password data to update + required: true responses: '200': description: | OK -- '400': - description: | + description: |- Bad Request -- - Some required parameters are missing + Some required parameters are missing n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A password with the given `resourceId` does not exist - - The current user does not have sufficient permission on the password + When either of the following is true n - A password with the given + `resourceId` does not exist n - The current user does not have + sufficient permission on the password n delete: operationId: deletePassword tags: - - Resource + - Resources summary: Deletes a password - produces: - - application/json - description: | - Deletes the password and also drops all the associated permissions. + description: |- + Deletes the password and also drops all the associated permissions. + parameters: - name: api-version in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 + description: 'API Version to target for this request ' + schema: + type: string + enum: + - v1 + - v2 + default: v1 - name: resourceId in: path - description: Password id to delete + description: 'Password id to delete ' required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- '400': - description: | + description: |- Bad Request -- - When `resourceId` is not a valid `UUID` + When `resourceId` is not a valid `UUID`n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - The `resourceId` does not exist. - - The Resource is already deleted. - - If the user does not have access to the Resource. - - If the user does not have permission to delete the Resource. + + When either of the following is true n - The `resourceId` does not + exist. + - The Resource is already deleted. + - If the user does not have access to the Resource. + - If the user does not have permission to delete the Resource. + '500': - description: | + description: |- Server Error -- - if the resource could not be deleted for other reasons - + if the resource could not be deleted for other reasons n /users.json: get: - description: Returns a list of your users. The users are returned sorted alphabetically by their name. + description: >- + Returns a list of your users.The users are returned sorted + alphabetically by their name. summary: List all users operationId: getUsers tags: - - User - produces: - - application/json + - Users + responses: + '200': + description: OK + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + $ref: '#/components/schemas/UserFull' + '403': + description: |- + Authentication failure. + -- + When the user making the request is not authenticated n + post: + operationId: createUser + tags: + - Users + summary: Creates a new user. + description: Creates a new user. parameters: - name: api-version in: query description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - - name: contain - description: Fields that must be included in the response. Takes a comma separated list. - in: query - type: array - collectionFormat: csv - items: - type: string - enum: - - LastLoggedIn - - name: filter - in: query - type: array - collectionFormat: csv - items: + schema: type: string enum: - - search - - has-groups - - has-access - - is-admin - - name: order - in: query - description: How the result list should be sorted. - type: array - collectionFormat: csv - items: - type: string - enum: - - User.username - - User.created - - User.modified - - Profile.first_name - - Profile.last_name - - Profile.created - - Profile.modified - responses: - '200': - description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - $ref: '#/definitions/UserFull' - '403': - description: | - Authentication failure. - -- - When the user making the request is not authenticated - - post: - operationId: createUser - tags: - - User - summary: Creates a new user. - description: Creates a new user. - consumes: - - application/json - parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - - in: body - name: user - schema: - type: object - required: - - first_name - - last_name - - username - - is_admin - properties: - first_name: - type: string - maxLength: 255 - last_name: - type: string - maxLength: 255 - username: - type: string - format: email - is_admin: - type: boolean + - v1 + - v2 + default: v1 + requestBody: + content: + application/json: + schema: + type: object + required: + - first_name + - last_name + - username + - is_admin + properties: + first_name: + type: string + maxLength: 255 + last_name: + type: string + maxLength: 255 + username: + type: string + format: email + is_admin: + type: boolean responses: '200': description: | @@ -540,319 +859,292 @@ paths: description: | Forbidden -- - '/users/{userId}.json': get: operationId: getUser tags: - - User + - Users summary: Find user by ID description: Returns a single user - produces: - - application/json parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: userId in: path description: ID of the user to return required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - $ref: '#/definitions/User' + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + $ref: '#/components/schemas/User' '400': - description: | + description: |- Bad Request -- - The `userId` is not valid. + The `userId` is not valid. + '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A user with the given `userId` does not exist. - - The current user does not have `READ` permission on the user + When either of the following is true n - A user with the given + `userId` does not exist. + - The current user does not have `READ` permission on the user n put: tags: - - User + - Users summary: Update an existing user - description: | - Updates the specified user by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + description: >- + Updates the specified user by setting the values of the parameters + passed.Any parameters not provided will be left unchanged. - This request accepts mostly the same arguments as the `User` creation call. + This request accepts mostly the same arguments as the `User` creation call. operationId: updateUser - consumes: - - application/json - produces: - - application/json parameters: - name: api-version in: query description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 + schema: + type: string + enum: + - v1 + - v2 + default: v1 - name: userId in: path description: ID of the user to update required: true - type: string - format: uuid - - name: user - in: body - description: User data to update - required: true schema: - type: object - properties: - description: - type: string - name: - type: string - secrets: - type: array - items: - type: object - properties: - user_id: - type: string - format: uuid - data: - type: string - description: Encrypted user string - uri: - type: string - format: url + type: string + format: uuid + requestBody: + content: + application/json: + schema: + type: object + properties: + description: + type: string + name: + type: string + secrets: + type: array + items: + type: object + properties: + user_id: + type: string + format: uuid + data: + type: string + description: Encrypted user string + uri: + type: string + format: url + description: User data to update + required: true responses: '200': description: | OK -- '400': - description: | + description: |- Bad Request -- - Some required parameters are missing + Some required parameters are missing n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A user with the given `userId` does not exist - - The current user does not have sufficient permission on the user + When either of the following is true n - A user with the given + `userId` does not exist n - The current user does not have + sufficient permission on the user n delete: operationId: deleteUser tags: - - User + - Users summary: Deletes a user - produces: - - application/json - description: | - Deletes the user and also drops all the associated permissions. + description: Deletes the user and also drops all the associated permissions. parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: userId in: path description: User id to delete required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- '400': - description: | + description: |- Bad Request -- - When `userId` is not a valid `UUID` + When `userId` is not a valid `UUID`n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - The `userId` does not exist. - - The User is already deleted. - - If the user does not have access to the user. - - If the user does not have the permission to delete the user. + + When either of the following is true n - The `userId` does not + exist. + - The User is already deleted. + - If the user does not have access to the user. + - If the user does not have the permission to delete the user. + '500': - description: | + description: |- Server Error -- - if the user could not be deleted for other reasons - + if the user could not be deleted for other reasons n '/users/{userId}/dry-run': delete: tags: - - User + - Users summary: Checks if a user can be deleted - description: | - A User can not be deleted if - * it's the sole owner of a shared Resource or - * it's the sole manager of a Group or - * it's the sole manager of a Group that is the sole owner of a shared Resource + description: >- + A User can not be deleted if n * it 's the sole owner of a shared + Resource or n * it 's the sole manager of a Group or - This endpoint is useful when you want to check and avoid any side effects of deleting a user. + * it' s the sole manager of a Group that is the sole owner of a shared + Resource n nThis endpoint is useful when you want to check and avoid any + side effects of deleting a user. parameters: - name: api-version in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 + description: 'API Version to target for this request ' + schema: + type: string + enum: + - v1 + - v2 + default: v1 - name: userId in: path description: User id to check for deletion required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': - description: | + description: |- OK -- - The User can be deleted safely + The User can be deleted safely n '400': - description: | + description: >- Bad Request + -- - Some of the validation checks failed. The User can not be deleted safely. + Some of the validation checks failed.The User can not be deleted + safely. + /groups.json: get: - description: Returns a list of your groups. The groups are returned sorted alphabetically by their name. + description: >- + Returns a list of your groups.The groups are returned sorted + alphabetically by their name. summary: List all groups operationId: getGroups tags: - - Group - produces: - - application/json + - Groups parameters: - name: api-version in: query description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - - name: contain - description: Fields that must be included in the response. Takes a comma separated list. - in: query - type: array - collectionFormat: csv - items: + schema: type: string enum: - - modifier - - modifier.profile - - user - - group_user - - my_group_user + - v1 + - v2 + default: v1 + - name: contain + description: >- + Fields that must be included in the response.Takes a comma + separated list. + in: query + style: form + explode: false + schema: + type: array + items: + type: string + enum: + - modifier + - modifier.profile + - user + - group_user + - my_group_user - name: filter in: query - type: array - collectionFormat: csv - items: - type: string - enum: - - has-users - - has-managers + style: form + explode: false + schema: + type: array + items: + type: string + enum: + - has-users + - has-managers - name: order in: query description: How the result list should be sorted. - type: array - collectionFormat: csv - items: - type: string - enum: - - Group.name + style: form + explode: false + schema: + type: array + items: + type: string + enum: + - Group.name responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - $ref: '#/definitions/Group' + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + $ref: '#/components/schemas/Group' '403': - description: | + description: |- Authentication failure. -- - When the group making the request is not authenticated - + When the group making the request is not authenticated n post: operationId: createGroup tags: - - Group + - Groups summary: Creates a new group. description: Creates a new group. - consumes: - - application/json - parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - - in: body - name: group - schema: - type: object - required: - - name - - group_users - properties: - name: - type: string - group_users: - type: array - items: - type: object - properties: - user_id: - type: string - format: uuid - is_admin: - type: boolean + requestBody: + $ref: '#/components/requestBodies/createGroupGroup' responses: '200': description: | @@ -866,1380 +1158,1296 @@ paths: description: | Forbidden -- - '/groups/{groupId}.json': get: operationId: getGroup tags: - - Group + - Groups summary: Find group by ID description: Returns a single group - produces: - - application/json parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: groupId in: path description: ID of the group to return required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - $ref: '#/definitions/Group' + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + $ref: '#/components/schemas/Group' '400': - description: | + description: |- Bad Request -- - The `groupId` is not valid. + The `groupId` is not valid. + '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A group with the given `groupId` does not exist. - - The current group does not have `READ` permission on the group + When either of the following is true n - A group with the given + `groupId` does not exist. + - The current group does not have `READ` permission on the group n put: tags: - - Group + - Groups summary: Update an existing group - description: | - Updates the specified group by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + description: >- + Updates the specified group by setting the values of the parameters + passed.Any parameters not provided will be left unchanged. - This request accepts mostly the same arguments as the `Group` creation call. + This request accepts mostly the same arguments as the `Group` creation call. operationId: updateGroup - consumes: - - application/json - produces: - - application/json parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: groupId in: path description: ID of the group to update required: true - type: string - format: uuid - - in: body - name: group schema: - type: object - required: - - name - - group_users - properties: - name: - type: string - group_users: - type: array - items: - type: object - properties: - user_id: - type: string - format: uuid - is_admin: - type: boolean + type: string + format: uuid + requestBody: + $ref: '#/components/requestBodies/createGroupGroup' responses: '200': description: | OK -- - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - $ref: '#/definitions/Group' + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + $ref: '#/components/schemas/Group' '400': - description: | + description: |- Bad Request -- - Some required parameters are missing + Some required parameters are missing n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A group with the given `groupId` does not exist - - The current group does not have sufficient permission on the group + + When either of the following is true n - A group with the given + `groupId` does not exist n - The current group does not have + sufficient permission on the group n delete: operationId: deleteGroup tags: - - Group + - Groups summary: Deletes a group - produces: - - application/json - description: | - Deletes the Group and also all the Resources that belong only to this group. + description: >- + Deletes the Group and also all the Resources that belong only to this + group. + parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: groupId in: path description: Group id to delete required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- '400': - description: | + description: |- Bad Request -- - When `groupId` is not a valid `UUID` + When `groupId` is not a valid `UUID`n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - The `groupId` does not exist. - - The Group is already deleted. - - If the user is neither a Group manager nor Admin. + + When either of the following is true n - The `groupId` does not + exist. + - The Group is already deleted. + - If the user is neither a Group manager nor Admin. + '500': - description: | + description: |- Server Error -- - if the group could not be deleted for other reasons - + if the group could not be deleted for other reasons n '/groups/{groupId}/dry-run': put: tags: - - Group + - Groups summary: Checks if a group can be updated. - description: | - The endpoint performs all the validation checks required for a Group update. This is useful to determine if it's safe to update a Group. It returns a success response if the Group can be updated, on validation failures, the response will have the reason and suggestions for the failed checks. + description: >- + The endpoint performs all the validation checks required for a Group + update. This is useful to determine if it's safe to update a Group. It + returns a success response if the Group can be updated, on validation + failures, the response will have the reason and suggestions for the + failed checks. parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: groupId in: path description: Group id to check for update. required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': - description: | + description: |- OK -- - The group can be updated safely + The group can be updated safely n '400': - description: | + description: |- Bad Request -- - If `groupId` is not a valid UUID. + If `groupId` is not a valid UUID. + '403': - description: | + description: >- Forbidden + -- - If the user making the request is neither the Group manager nor an Admin. + + If the user making the request is neither the Group manager nor an + Admin. + '404': - description: | + description: >- Not Found + -- - * No Group found for the given `groupId` or - * The Group has been deleted. + * No Group found for the given `groupId` or n * The Group has been + deleted. + delete: tags: - - Group + - Groups summary: Checks if a group can be deleted - description: A Group can not be deleted if it's the sole owner of a Resource. This endpoint is useful when you want to check and avoid any side effects of deleting a group. + description: >- + A Group can not be deleted if it's the sole owner of a Resource. This + endpoint is useful when you want to check and avoid any side effects of + deleting a group. parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: groupId in: path description: Group id to check for deletion required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': - description: | + description: |- OK -- - The Group can be deleted safely. + The Group can be deleted safely. + '400': - description: | + description: >- Bad Request + -- - The Group is the sole owner of a Resource and hence can not be deleted. + The Group is the sole owner of a Resource and hence can not be + deleted. + /share/search-aros.json: get: tags: - Share summary: Get a list of Access Resource Objects or AROs - description: Get a list of all the users/groups with whom an item can be shared + description: Get a list of all the users/groups with whom an item can be shared parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: filter in: query - type: array - collectionFormat: csv - items: - type: string - enum: - - search + style: form + explode: false + schema: + type: array + items: + type: string + enum: + - search responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - type: object - properties: - user_count: - type: number - id: - type: string - format: uuid - deleted: - type: boolean - created: - type: string - format: date - modified: - type: string - format: date - created_by: - type: string - format: uuid - modified_by: - type: string - format: uuid + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + type: object + properties: + user_count: + type: number + id: + type: string + format: uuid + deleted: + type: boolean + created: + type: string + format: date + modified: + type: string + format: date + created_by: + type: string + format: uuid + modified_by: + type: string + format: uuid '/share/simulate/resource/{resourceId}.json': post: tags: - Share summary: Simulates sharing a password. - description: | - Simulates sharing a resource with a user and/or group. Useful for avoiding any side effects and checking the possible errors. + description: >- + Simulates sharing a resource with a user and/or group. Useful for + avoiding any side effects and checking the possible errors. + operationId: simulateShare - consumes: - - application/json - produces: - - application/json parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: resourceId in: path description: The identifier of the resource to dry run a share on required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: + content: + application/json: + schema: type: object properties: - changes: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: type: object properties: - added: - type: array - items: - type: object - changed: - type: array - items: - type: object + changes: + type: object + properties: + added: + type: array + items: + type: object + changed: + type: array + items: + type: object '400': - description: | + description: |- Bad Request -- - If the `resourceId` is not a valid uuid + If the `resourceId` is not a valid uuid n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A resource with the given `resourceId` does not exist - - The resource is soft deleted - - The user does not have access to the resource + When either of the following is true n - A resource with the given + `resourceId` does not exist n - The resource is soft deleted n - The + user does not have access to the resource n '/share/resource/{resourceId}.json': put: tags: - Share summary: Share a password - description: | - Shares a password. + description: Shares a password. operationId: shareResource - consumes: - - application/json - produces: - - application/json parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: resourceId in: path description: The identifier of the resource to dry run a share on required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- '400': - description: | + description: |- Bad Request -- - If the `resourceId` is not a valid uuid + If the `resourceId` is not a valid uuid n '404': - description: | + description: >- Not Found + -- - When either of the following is true - - A resource with the given `resourceId` does not exist - - The resource is soft deleted - - The user does not have access to the resource + When either of the following is true n - A resource with the given + `resourceId` does not exist n - The resource is soft deleted n - The + user does not have access to the resource n '/permissions/resource/{resourceId}.json': get: tags: - - Permission + - Permissions summary: TODO Summary description: TODO Description parameters: - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 - name: resourceId in: path description: UUID of the password to check permissions for required: true - type: string - format: uuid + schema: + type: string + format: uuid responses: '200': description: | OK -- - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - aco: - type: string - aco_foreign_key: - type: string - format: uuid - aro: - type: string - aro_foreign_key: - type: string - format: uuid - created: - type: string - format: datetime - group: - type: string - modified: - type: string - format: datetime - type: - type: number + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + aco: + type: string + aco_foreign_key: + type: string + format: uuid + aro: + type: string + aro_foreign_key: + type: string + format: uuid + created: + type: string + format: datetime + group: + type: string + modified: + type: string + format: datetime + type: + type: number '/favorites/resource/{resourceId}.json': post: tags: - - Favorite - summary: Add Password to favourites - description: Add the given password to list of favourites + - Favorites + summary: Add Password to favorites + description: Add the given password to list of favorites parameters: - name: resourceId in: path required: true - type: string - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 + schema: + type: string responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: + content: + '*/*': + schema: type: object properties: - id: - type: string - format: uuid - user_id: - type: string - format: uuid - foreign_key: - type: string - format: uuid - foreign_model: - type: string - format: uuid - created: - type: string - format: datetime - modified: - type: string - format: datetime + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: object + properties: + id: + type: string + format: uuid + user_id: + type: string + format: uuid + foreign_key: + type: string + format: uuid + foreign_model: + type: string + format: uuid + created: + type: string + format: datetime + modified: + type: string + format: datetime '404': - description: | + description: |- Not Found --- - - If the resource id is not valid - - If the resource does not exist - - If the resource is soft deleted - - If the user does not have access to the resource + - If the resource id is not valid n - If the resource does not exist n - If the resource is soft deleted n - If the user does not have access to the resource n '/favorites/{favoriteId}.json': delete: tags: - - Favorite + - Favorites summary: Delete a favorite entry description: Remove a password from the list of favorites parameters: - name: favoriteId in: path required: true - type: string - format: uuid - - name: api-version - in: query - description: API Version to target for this request - type: string - default: v1 - enum: - - v1 - - v2 + schema: + type: string + format: uuid responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: + content: + '*/*': + schema: type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: object '400': - description: | + description: |- Bad Request -- - When the given `favoriteId` is not a valid uuid + When the given `favoriteId` is not a valid uuid n '404': - description: | + description: |- Not Found --- - - If the favorite does not exist + - If the favorite does not exist n '/comments/resource/{resourceId}.json': get: tags: - - Comment + - Comments summary: List all comments on the record - description: List all comments on an entity of `model` type and identified by `modelId` + description: >- + List all comments on an entity of `model` type and identified by + `modelId` parameters: - name: resourceId in: path - type: string - format: uuid required: true description: ID of the resource to fetch comments for - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 + schema: + type: string + format: uuid responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - $ref: '#/definitions/Comment' + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + $ref: '#/components/schemas/Comment' '400': - description: | + description: |- Bad Request --- - When the given `resourceId` is not a valid UUID + When the given `resourceId` is not a valid UUID n '404': - description: | + description: |- Not Found --- - If a resource with the given `resourceId` is not found - + If a resource with the given `resourceId` is not found n post: tags: - - Comment + - Comments summary: Add a comment to a resource description: Add a comment to a resource parameters: - name: resourceId in: path - type: string - format: uuid required: true description: ID of the resource to add comment to - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 - - in: body - name: comment schema: - type: object - properties: - content: - type: string - description: The comment text + type: string + format: uuid + requestBody: + content: + application/json: + schema: + type: object + properties: + content: + type: string + description: 'The comment text ' responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - $ref: '#/definitions/Comment' + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + $ref: '#/components/schemas/Comment' '400': - description: | + description: |- Bad Request --- - When the given `resourceId` is not a valid UUID + When the given `resourceId` is not a valid UUID n '404': - description: | + description: |- Not Found --- - If a resource with the given `resourceId` is not found - + If a resource with the given `resourceId` is not found n '/comments/{commentId}.json': put: tags: - - Comment + - Comments summary: Update a comment description: Update a comment parameters: - name: commentId in: path - type: string - format: uuid required: true description: ID of the comment to update + schema: + type: string + format: uuid - name: api-version in: query - type: string - enum: - - v1 - - v2 - default: v1 - - in: body - name: comment schema: - type: object - properties: - content: - type: string - description: The new content to update + type: string + enum: + - v1 + - v2 + default: v1 + requestBody: + content: + application/json: + schema: + type: object + properties: + content: + type: string + description: 'The new content to update ' responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - $ref: '#/definitions/Comment' + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + $ref: '#/components/schemas/Comment' '400': - description: | + description: |- Bad Request --- - When the given `resourceId` is not a valid UUID + When the given `resourceId` is not a valid UUID n '404': - description: | + description: |- Not Found --- - If a resource with the given `resourceId` is not found - + If a resource with the given `resourceId` is not found n delete: tags: - - Comment + - Comments summary: Delete a comment description: Delete a comment parameters: - name: commentId in: path - type: string - format: uuid required: true description: ID of the comment to delete + schema: + type: string + format: uuid - name: api-version in: query - type: string - enum: - - v1 - - v2 - default: v1 + schema: + type: string + enum: + - v1 + - v2 + default: v1 responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: + content: + '*/*': + schema: type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: object '400': - description: | + description: |- Bad Request --- - When the given `resourceId` is not a valid UUID + When the given `resourceId` is not a valid UUID n '404': - description: | + description: >- Not Found + --- - If a resource with the given `resourceId` is not found - If the current user does not have enough permission to delete the comment + If a resource with the given `resourceId` is not found nIf the + current user does not have enough permission to delete the comment + n /gpgkeys.json: get: tags: - - GPG Key + - GPG Keys summary: List all the GPG keys description: Fetches a list of all your GPG keys - parameters: - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - $ref: '#/definitions/GpgKey' - + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + $ref: '#/components/schemas/GpgKey' '/gpgkeys/{keyId}.json': get: tags: - - GPG Key + - GPG Keys summary: Find GPG key by ID description: Returns a single GPG key parameters: - name: api-version in: query - type: string - enum: - - v1 - - v2 - default: v1 + schema: + type: string + enum: + - v1 + - v2 + default: v1 - name: keyId in: path - type: string - format: uuid required: true description: ID of the GPG key to fetch + schema: + type: string + format: uuid responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - $ref: '#/definitions/GpgKey' + content: + '*/*': + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + $ref: '#/components/schemas/GpgKey' '400': - description: | + description: |- Bad Request --- - If the given `keyId` is not a valid UUID + If the given `keyId` is not a valid UUID n '404': - description: | + description: |- Not Found --- - If a GPGKey with the given `keyId` could not be found - + If a GPGKey with the given `keyId` could not be found n '/secrets/resource/{resourceId}.json': get: tags: - - Secret + - Secrets summary: Get password for a given resource. - description: Will return the secret password encoded with user's GPG key. This will need to be decrypted on the client end to get the actual password string. + description: >- + Will return the secret password encoded with user's GPG key. This will + need to be decrypted on the client end to get the actual password + string. parameters: - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 - name: resourceId in: path - type: string - format: uuid required: true description: ID of resource of which the password should be returned + schema: + type: string + format: uuid responses: '200': description: OK - schema: - type: object - properties: - header: - type: object - $ref: '#/definitions/ApiResponseHeader' - body: + content: + '*/*': + schema: type: object properties: - id: - type: string - format: uuid - created: - type: string - format: datetime - data: - type: string - description: PGP encrypted string containing the password string - modified: - type: string - format: datetime - resource_id: - type: string - format: uuid - user_id: - type: string - format: uuid - + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: object + properties: + id: + type: string + format: uuid + created: + type: string + format: datetime + data: + type: string + description: 'PGP encrypted string containing the password string ' + modified: + type: string + format: datetime + resource_id: + type: string + format: uuid + user_id: + type: string + format: uuid /settings.json: get: tags: - Settings summary: List the user level settings - parameters: - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 responses: '200': description: OK - schema: - type: object - properties: - header: - type: object - $ref: '#/definitions/ApiResponseHeader' - body: + content: + '*/*': + schema: type: object properties: - app: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: type: object properties: - debug: - type: boolean - image_storage: + app: type: object properties: - public_path: + debug: + type: boolean + image_storage: + type: object + properties: + public_path: + type: string + format: uri + server_timezone: type: string - format: uri - server_timezone: - type: string - session_timeout: - type: number - url: - type: string - format: url - version: - type: object - properties: - name: + session_timeout: + type: number + url: type: string - number: + format: url + version: + type: object + properties: + name: + type: string + number: + type: string + passbolt: + properties: + edition: type: string - passbolt: - properties: - edition: - type: string - enum: - - ce - - pro - plugins: - type: object - + enum: + - ce + - pro + plugins: + type: object /roles.json: get: tags: - Role summary: List the available user roles - parameters: - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: - $ref: '#/definitions/Role' - + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + $ref: '#/components/schemas/Role' /healthcheck.json: get: tags: - Health Check summary: Perform a health check description: Return server status report - parameters: - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 responses: '200': description: OK - schema: - type: object - properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: + content: + application/json: + schema: type: object properties: - ssl: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: type: object - database: - type: object - application: - type: object - environment: - type: object - configFile: - type: object - core: - type: object - gpg: - type: object - + properties: + ssl: + type: object + database: + type: object + application: + type: object + environment: + type: object + configFile: + type: object + core: + type: object + gpg: + type: object /healthcheck/status.json: get: tags: - Health Check summary: Get the health check status description: Return server status - parameters: - - name: api-version - in: query - type: string - enum: - - v1 - - v2 - default: v1 responses: '200': description: OK + content: + application/json: + schema: + type: object + properties: + header: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: string + enum: + - OK +components: + requestBodies: + createGroupGroup: + content: + application/json: schema: type: object + required: + - name + - group_users properties: - header: - $ref: '#/definitions/ApiResponseHeader' - body: + name: type: string - enum: - - OK - - -definitions: - ApiResponseHeader: - type: object - properties: - id: - type: string - format: uuid - code: - type: integer - message: - type: string - servertime: - type: integer - format: timestamp - status: - type: string - title: - type: string - url: - type: string - format: url - ApiResponse: - type: object - properties: - header: - type: object - $ref: '#/definitions/ApiResponseHeader' - body: - type: array - items: + group_users: + type: array + items: + type: object + properties: + user_id: + type: string + format: uuid + is_admin: + type: boolean + schemas: + ApiResponseHeader: + type: object + properties: + id: + type: string + format: uuid + code: + type: integer + message: + type: string + servertime: + type: integer + format: timestamp + status: + type: string + title: + type: string + url: + type: string + format: url + ApiResponse: + type: object + properties: + header: type: object - Avatar: - type: object - properties: - url: - type: object - properties: - medium: - type: string - format: uri - small: - type: string - format: uri - Comment: - type: object - properties: - id: - type: string - format: uuid - parent_id: - type: string - format: uuid - foreign_key: - type: string - format: uuid - foreign_model: - type: string - content: - type: string - created: - type: string - format: datetime - modified: - type: string - format: datetime - created_by: - type: string - format: uuid - modified_by: - type: string - format: uuid - user_id: - type: string - format: uuid - creator: - $ref: '#/definitions/User' - children: - type: array - items: - $ref: '#/definitions/Comment' - Favorite: - type: object - properties: - id: - type: string - format: uuid - created: - type: string - format: date - foreign_key: - type: string - format: uuid - foreign_model: - type: string - modified: - type: string - format: date - user_id: - type: string - format: uuid - GpgKey: - type: object - properties: - id: - type: string - format: uuid - user_id: - type: string - format: uuid - armored_key: - type: string - bits: - type: number - uid: - type: string - key_id: - type: string - fingerprint: - type: string - type: - type: string - enum: - - RSA - - ELGAMAL - - DSA - - ECC - - ECDSA - - DH - expires: - type: string - format: date - key_created: - type: string - format: date - deleted: - type: boolean - created: - type: string - format: date - modified: - type: string - format: date - Group: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - deleted: - type: string - format: date - created: - type: string - format: date - modified: - type: string - format: date - created_by: - type: string - format: uuid - modified_by: - type: string - format: uuid - groups_users: - type: array - items: + $ref: '#/components/schemas/ApiResponseHeader' + body: + type: array + items: + type: object + Avatar: + type: object + properties: + url: type: object properties: - id: + medium: type: string - format: uuid - user_id: + format: uri + small: type: string - format: uuid - group_id: - type: string - format: uuid - created: - type: string - format: datetime - is_admin: - type: boolean - user: - $ref: '#/definitions/UserFull' - Permission: - type: object - properties: - id: - type: string - format: uuid - aco: - type: string - aco_foreign_key: - type: string - format: uuid - aro: - type: string - aro_foreign_key: - type: string - format: uuid - created: - type: string - format: date - modified: - type: string - format: date - type: - type: integer - Profile: - type: object - properties: - id: - type: string - format: uuid - user_id: - type: string - format: uuid - first_name: - type: string - maxLength: 255 - last_name: - type: string - maxLength: 255 - created: - type: string - format: date - modified: - type: string - format: date - Resource: - type: object - properties: - id: - type: string - format: uuid - description: | - Unique ID of the password in `UUID` format - created: - type: string - format: date - description: | - Datetime on when the password was created. - created_by: - type: string - format: uuid - description: | - `ID` of the `User` who created the password in `UUID` format - creator: - $ref: '#/definitions/User' - deleted: - type: boolean - description: - type: string - favorite: - $ref: '#/definitions/Favorite' - modified: - type: string - format: date - modified_by: - type: string - format: uuid - modifier: - $ref: '#/definitions/User' - name: - type: string - permission: - $ref: '#/definitions/Permission' - uri: - type: string - format: url - username: - type: string - Role: - type: object - properties: - id: - type: string - format: uuid - name: - type: string - description: - type: string - created: - type: string - format: date - modified: - type: string - format: date - User: - type: object - properties: - id: - type: string - format: uuid - active: - type: boolean - created: - type: string - format: date - deleted: - type: boolean - last_logged_in: - type: string - format: date - modified: - type: string - format: date - role_id: - type: string - format: uuid - username: - type: string - format: email - UserFull: - type: object - properties: - id: - type: string - format: uuid - role_id: - type: string - format: uuid - username: - type: string - format: email - active: - type: boolean - deleted: - type: boolean - created: - type: string - format: date - modified: - type: string - format: date - profile: - $ref: '#/definitions/Profile' - group_users: - type: array - items: - $ref: '#/definitions/User' - role: - $ref: '#/definitions/Role' - gpgkey: - $ref: '#/definitions/GpgKey' - last_logged_in: - type: string - format: date - + format: uri + Comment: + type: object + properties: + id: + type: string + format: uuid + parent_id: + type: string + format: uuid + foreign_key: + type: string + format: uuid + foreign_model: + type: string + content: + type: string + created: + type: string + format: datetime + modified: + type: string + format: datetime + created_by: + type: string + format: uuid + modified_by: + type: string + format: uuid + user_id: + type: string + format: uuid + creator: + $ref: '#/components/schemas/User' + children: + type: array + items: + $ref: '#/components/schemas/Comment' + Favorite: + type: object + properties: + id: + type: string + format: uuid + created: + type: string + format: date + foreign_key: + type: string + format: uuid + foreign_model: + type: string + modified: + type: string + format: date + user_id: + type: string + format: uuid + GpgKey: + type: object + properties: + id: + type: string + format: uuid + user_id: + type: string + format: uuid + armored_key: + type: string + bits: + type: number + uid: + type: string + key_id: + type: string + fingerprint: + type: string + type: + type: string + enum: + - RSA + - ELGAMAL + - DSA + - ECC + - ECDSA + - DH + expires: + type: string + format: date + key_created: + type: string + format: date + deleted: + type: boolean + created: + type: string + format: date + modified: + type: string + format: date + Group: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + deleted: + type: string + format: date + created: + type: string + format: date + modified: + type: string + format: date + created_by: + type: string + format: uuid + modified_by: + type: string + format: uuid + groups_users: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + user_id: + type: string + format: uuid + group_id: + type: string + format: uuid + created: + type: string + format: datetime + is_admin: + type: boolean + user: + $ref: '#/components/schemas/UserFull' + Permission: + type: object + properties: + id: + type: string + format: uuid + aco: + type: string + aco_foreign_key: + type: string + format: uuid + aro: + type: string + aro_foreign_key: + type: string + format: uuid + created: + type: string + format: date + modified: + type: string + format: date + type: + type: integer + Profile: + type: object + properties: + id: + type: string + format: uuid + user_id: + type: string + format: uuid + first_name: + type: string + maxLength: 255 + last_name: + type: string + maxLength: 255 + created: + type: string + format: date + modified: + type: string + format: date + Resource: + type: object + properties: + id: + type: string + format: uuid + description: | + Unique ID of the password in `UUID` format + created: + type: string + format: date + description: | + Datetime on when the password was created. + created_by: + type: string + format: uuid + description: | + `ID` of the `User` who created the password in `UUID` format + creator: + $ref: '#/components/schemas/User' + deleted: + type: boolean + description: + type: string + favorite: + $ref: '#/components/schemas/Favorite' + modified: + type: string + format: date + modified_by: + type: string + format: uuid + modifier: + $ref: '#/components/schemas/User' + name: + type: string + permission: + $ref: '#/components/schemas/Permission' + uri: + type: string + format: url + username: + type: string + Role: + type: object + properties: + id: + type: string + format: uuid + name: + type: string + description: + type: string + created: + type: string + format: date + modified: + type: string + format: date + User: + type: object + properties: + id: + type: string + format: uuid + active: + type: boolean + created: + type: string + format: date + deleted: + type: boolean + last_logged_in: + type: string + format: date + modified: + type: string + format: date + role_id: + type: string + format: uuid + username: + type: string + format: email + UserFull: + type: object + properties: + id: + type: string + format: uuid + role_id: + type: string + format: uuid + username: + type: string + format: email + active: + type: boolean + deleted: + type: boolean + created: + type: string + format: date + modified: + type: string + format: date + profile: + $ref: '#/components/schemas/Profile' + group_users: + type: array + items: + $ref: '#/components/schemas/User' + role: + $ref: '#/components/schemas/Role' + gpgkey: + $ref: '#/components/schemas/GpgKey' + last_logged_in: + type: string + format: date