diff --git a/.gitignore b/.gitignore index 80b802a2..147cebcd 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ etc/dev-frontend.yml # Generated files .docusaurus .cache-loader +openapitools.json sdk/python/sdk/build/ diff --git a/bin/generate_rest.sh b/bin/generate_rest.sh index 374ff612..835c0060 100755 --- a/bin/generate_rest.sh +++ b/bin/generate_rest.sh @@ -7,8 +7,8 @@ command -v swagger >/dev/null 2>&1 || { exit 1 } -command -v openapi >/dev/null 2>&1 || { - echo >&2 "command 'openapi' not installed. see: https://www.npmjs.com/package/openapi-client for installation" +command -v openapi-generator-cli >/dev/null 2>&1 || { + echo >&2 "command 'openapi-generator-cli' not installed. see: https://github.com/OpenAPITools/openapi-generator-cli#installation for installation" } command -v swagger-codegen 2>&1 || { @@ -31,7 +31,7 @@ echo "...generating zrok client" swagger generate client -P rest_model_zrok.Principal -f "$zrokSpec" -c rest_client_zrok -t "$zrokDir" -m "rest_model_zrok" echo "...generating js client" -openapi -s specs/zrok.yml -o ui/src/api -l js +openapi-generator-cli generate -i specs/zrok.yml -o ui/src/api -g javascript --additional-properties=usePromises=true,useES6=true echo "...generating python client" swagger-codegen generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConfig -l python diff --git a/ui/config-overrides.js b/ui/config-overrides.js new file mode 100644 index 00000000..3363bdee --- /dev/null +++ b/ui/config-overrides.js @@ -0,0 +1,18 @@ +const ModuleScopePlugin = require("react-dev-utils/ModuleScopePlugin"); +const path = require("path"); + +module.exports = function override(config, env) { + //do stuff with the webpack config... + + config.resolve.plugins.forEach(plugin => { + if (plugin instanceof ModuleScopePlugin) { + plugin.allowedFiles.add(path.resolve("./node_modules/querystring-es3/index.js")); + } + }); + + let loaders = config.resolve + loaders.fallback = { + "querystring": require.resolve("querystring-es3") + } + return config; +} diff --git a/ui/package-lock.json b/ui/package-lock.json index 65c57a25..f391254f 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -18,6 +18,7 @@ "eslint-config-react-app": "^7.0.1", "humanize-duration": "^3.27.3", "moment": "^2.29.4", + "querystring-es3": "^0.2.1", "react": "^18.2.0", "react-bootstrap": "^2.7.0", "react-data-table-component": "^7.5.2", @@ -27,9 +28,11 @@ "react-sizeme": "^3.0.2", "recharts": "^2.6.1", "styled-components": "^5.3.5", + "superagent": "^8.1.2", "svgo": "^3.0.2" }, "devDependencies": { + "react-app-rewired": "^2.2.1", "react-scripts": "^5.0.1" } }, @@ -5426,8 +5429,7 @@ "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, "node_modules/ast-types-flow": { "version": "0.0.7", @@ -5443,8 +5445,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/at-least-node": { "version": "1.0.0", @@ -6450,7 +6451,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "dependencies": { "delayed-stream": "~1.0.0" }, @@ -6488,6 +6488,14 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "node_modules/component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -6599,6 +6607,11 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "node_modules/cookiejar": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", + "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==" + }, "node_modules/core-js": { "version": "3.27.2", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.27.2.tgz", @@ -7535,7 +7548,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, "engines": { "node": ">=0.4.0" } @@ -7631,6 +7643,15 @@ "node": ">=0.8.0" } }, + "node_modules/dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, "node_modules/didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -8981,6 +9002,11 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -9452,6 +9478,20 @@ "node": ">= 6" } }, + "node_modules/formidable": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", + "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", + "dependencies": { + "dezalgo": "^1.0.4", + "hexoid": "^1.0.0", + "once": "^1.4.0", + "qs": "^6.11.0" + }, + "funding": { + "url": "https://ko-fi.com/tunnckoCore/commissions" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -9912,6 +9952,14 @@ "he": "bin/he" } }, + "node_modules/hexoid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", + "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==", + "engines": { + "node": ">=8" + } + }, "node_modules/hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -13473,7 +13521,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -13505,7 +13552,6 @@ "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -13514,7 +13560,6 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "dependencies": { "mime-db": "1.52.0" }, @@ -15926,7 +15971,6 @@ "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -15960,6 +16004,14 @@ "node": ">=0.10.0" } }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -16088,6 +16140,30 @@ "node": ">=14" } }, + "node_modules/react-app-rewired": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/react-app-rewired/-/react-app-rewired-2.2.1.tgz", + "integrity": "sha512-uFQWTErXeLDrMzOJHKp0h8P1z0LV9HzPGsJ6adOtGlA/B9WfT6Shh4j2tLTTGlXOfiVx6w6iWpp7SOC5pvk+gA==", + "dev": true, + "dependencies": { + "semver": "^5.6.0" + }, + "bin": { + "react-app-rewired": "bin/index.js" + }, + "peerDependencies": { + "react-scripts": ">=2.1.3" + } + }, + "node_modules/react-app-rewired/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/react-bootstrap": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.7.0.tgz", @@ -17825,6 +17901,80 @@ "resolved": "https://registry.npmjs.org/super-three/-/super-three-0.147.1.tgz", "integrity": "sha512-H8yhlXqjscWpqYLhPQ/h3EfElNBxe3Ktp1tGVp13vBjIxF5sMVkAo2NpIDXkY8+MVhuTrA0ZN42IMNPdOKwKLg==" }, + "node_modules/superagent": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz", + "integrity": "sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==", + "dependencies": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.4", + "debug": "^4.3.4", + "fast-safe-stringify": "^2.1.1", + "form-data": "^4.0.0", + "formidable": "^2.1.2", + "methods": "^1.1.2", + "mime": "2.6.0", + "qs": "^6.11.0", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=6.4.0 <13 || >=14" + } + }, + "node_modules/superagent/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/superagent/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/superagent/node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/superagent/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/superagent/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -23715,8 +23865,7 @@ "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "dev": true + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" }, "ast-types-flow": { "version": "0.0.7", @@ -23732,8 +23881,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "at-least-node": { "version": "1.0.0", @@ -24466,7 +24614,6 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -24495,6 +24642,11 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, + "component-emitter": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.1.tgz", + "integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==" + }, "compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -24590,6 +24742,11 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "cookiejar": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz", + "integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==" + }, "core-js": { "version": "3.27.2", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.27.2.tgz", @@ -25263,8 +25420,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" }, "depd": { "version": "2.0.0", @@ -25333,6 +25489,15 @@ "minimist": "^1.2.6" } }, + "dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "requires": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, "didyoumean": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz", @@ -26360,6 +26525,11 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" }, + "fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + }, "fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -26710,6 +26880,17 @@ "mime-types": "^2.1.12" } }, + "formidable": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-2.1.2.tgz", + "integrity": "sha512-CM3GuJ57US06mlpQ47YcunuUZ9jpm8Vx+P2CGt2j7HpgkKZO/DJYQ0Bobim8G6PFQmK5lOqOOdUXboU+h73A4g==", + "requires": { + "dezalgo": "^1.0.4", + "hexoid": "^1.0.0", + "once": "^1.4.0", + "qs": "^6.11.0" + } + }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -27027,6 +27208,11 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "hexoid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", + "integrity": "sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==" + }, "hoist-non-react-statics": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", @@ -29692,8 +29878,7 @@ "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==" }, "micromatch": { "version": "4.0.5", @@ -29712,14 +29897,12 @@ "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" }, "mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, "requires": { "mime-db": "1.52.0" } @@ -31339,7 +31522,6 @@ "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, "requires": { "side-channel": "^1.0.4" } @@ -31364,6 +31546,11 @@ "strict-uri-encode": "^1.0.0" } }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==" + }, "querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -31456,6 +31643,23 @@ "whatwg-fetch": "^3.6.2" } }, + "react-app-rewired": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/react-app-rewired/-/react-app-rewired-2.2.1.tgz", + "integrity": "sha512-uFQWTErXeLDrMzOJHKp0h8P1z0LV9HzPGsJ6adOtGlA/B9WfT6Shh4j2tLTTGlXOfiVx6w6iWpp7SOC5pvk+gA==", + "dev": true, + "requires": { + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } + } + }, "react-bootstrap": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.7.0.tgz", @@ -32763,6 +32967,61 @@ "resolved": "https://registry.npmjs.org/super-three/-/super-three-0.147.1.tgz", "integrity": "sha512-H8yhlXqjscWpqYLhPQ/h3EfElNBxe3Ktp1tGVp13vBjIxF5sMVkAo2NpIDXkY8+MVhuTrA0ZN42IMNPdOKwKLg==" }, + "superagent": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-8.1.2.tgz", + "integrity": "sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==", + "requires": { + "component-emitter": "^1.3.0", + "cookiejar": "^2.1.4", + "debug": "^4.3.4", + "fast-safe-stringify": "^2.1.1", + "form-data": "^4.0.0", + "formidable": "^2.1.2", + "methods": "^1.1.2", + "mime": "2.6.0", + "qs": "^6.11.0", + "semver": "^7.3.8" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==" + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", diff --git a/ui/package.json b/ui/package.json index a585b11d..6f067125 100644 --- a/ui/package.json +++ b/ui/package.json @@ -13,6 +13,7 @@ "eslint-config-react-app": "^7.0.1", "humanize-duration": "^3.27.3", "moment": "^2.29.4", + "querystring-es3": "^0.2.1", "react": "^18.2.0", "react-bootstrap": "^2.7.0", "react-data-table-component": "^7.5.2", @@ -22,15 +23,17 @@ "react-sizeme": "^3.0.2", "recharts": "^2.6.1", "styled-components": "^5.3.5", + "superagent": "^8.1.2", "svgo": "^3.0.2" }, "devDependencies": { + "react-app-rewired": "^2.2.1", "react-scripts": "^5.0.1" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", + "start": "react-app-rewired start", + "build": "react-app-rewired build", + "test": "react-app-rewired test", "eject": "react-scripts eject" }, "eslintConfig": { diff --git a/ui/src/api/.babelrc b/ui/src/api/.babelrc new file mode 100644 index 00000000..c73df9d5 --- /dev/null +++ b/ui/src/api/.babelrc @@ -0,0 +1,33 @@ +{ + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-json-strings", + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions", + "@babel/plugin-proposal-export-default-from", + "@babel/plugin-proposal-logical-assignment-operators", + "@babel/plugin-proposal-optional-chaining", + [ + "@babel/plugin-proposal-pipeline-operator", + { + "proposal": "minimal" + } + ], + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-do-expressions", + "@babel/plugin-proposal-function-bind" + ] +} diff --git a/ui/src/api/.gitignore b/ui/src/api/.gitignore new file mode 100644 index 00000000..6a7d6d8e --- /dev/null +++ b/ui/src/api/.gitignore @@ -0,0 +1,130 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file diff --git a/ui/src/api/.openapi-generator-ignore b/ui/src/api/.openapi-generator-ignore new file mode 100644 index 00000000..0dc0a98d --- /dev/null +++ b/ui/src/api/.openapi-generator-ignore @@ -0,0 +1,25 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md +git_push.sh +.travis.yml diff --git a/ui/src/api/.openapi-generator/FILES b/ui/src/api/.openapi-generator/FILES new file mode 100644 index 00000000..bba1bbcc --- /dev/null +++ b/ui/src/api/.openapi-generator/FILES @@ -0,0 +1,93 @@ +.babelrc +.gitignore +README.md +docs/AccessRequest.md +docs/AccessResponse.md +docs/AccountApi.md +docs/AdminApi.md +docs/AuthUser.md +docs/Configuration.md +docs/CreateFrontendRequest.md +docs/CreateFrontendResponse.md +docs/CreateIdentity201Response.md +docs/CreateIdentityRequest.md +docs/DeleteFrontendRequest.md +docs/DisableRequest.md +docs/EnableRequest.md +docs/EnableResponse.md +docs/Environment.md +docs/EnvironmentAndResources.md +docs/EnvironmentApi.md +docs/Frontend.md +docs/InviteRequest.md +docs/InviteTokenGenerateRequest.md +docs/LoginRequest.md +docs/MetadataApi.md +docs/Metrics.md +docs/MetricsSample.md +docs/Overview.md +docs/PasswordRequirements.md +docs/Principal.md +docs/PublicFrontend.md +docs/RegisterRequest.md +docs/RegisterResponse.md +docs/ResetPasswordRequest.md +docs/ResetPasswordRequestRequest.md +docs/Share.md +docs/ShareApi.md +docs/ShareRequest.md +docs/ShareResponse.md +docs/SparkDataSample.md +docs/UnaccessRequest.md +docs/UnshareRequest.md +docs/UpdateFrontendRequest.md +docs/UpdateShareRequest.md +docs/VerifyRequest.md +docs/VerifyResponse.md +mocha.opts +package.json +src/ApiClient.js +src/api/AccountApi.js +src/api/AdminApi.js +src/api/EnvironmentApi.js +src/api/MetadataApi.js +src/api/ShareApi.js +src/index.js +src/model/AccessRequest.js +src/model/AccessResponse.js +src/model/AuthUser.js +src/model/Configuration.js +src/model/CreateFrontendRequest.js +src/model/CreateFrontendResponse.js +src/model/CreateIdentity201Response.js +src/model/CreateIdentityRequest.js +src/model/DeleteFrontendRequest.js +src/model/DisableRequest.js +src/model/EnableRequest.js +src/model/EnableResponse.js +src/model/Environment.js +src/model/EnvironmentAndResources.js +src/model/Frontend.js +src/model/InviteRequest.js +src/model/InviteTokenGenerateRequest.js +src/model/LoginRequest.js +src/model/Metrics.js +src/model/MetricsSample.js +src/model/Overview.js +src/model/PasswordRequirements.js +src/model/Principal.js +src/model/PublicFrontend.js +src/model/RegisterRequest.js +src/model/RegisterResponse.js +src/model/ResetPasswordRequest.js +src/model/ResetPasswordRequestRequest.js +src/model/Share.js +src/model/ShareRequest.js +src/model/ShareResponse.js +src/model/SparkDataSample.js +src/model/UnaccessRequest.js +src/model/UnshareRequest.js +src/model/UpdateFrontendRequest.js +src/model/UpdateShareRequest.js +src/model/VerifyRequest.js +src/model/VerifyResponse.js diff --git a/ui/src/api/.openapi-generator/VERSION b/ui/src/api/.openapi-generator/VERSION new file mode 100644 index 00000000..3769235d --- /dev/null +++ b/ui/src/api/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.1.0 \ No newline at end of file diff --git a/ui/src/api/README.md b/ui/src/api/README.md new file mode 100644 index 00000000..03f4dabb --- /dev/null +++ b/ui/src/api/README.md @@ -0,0 +1,206 @@ +# zrok + +Zrok - JavaScript client for zrok +zrok client access +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 0.3.0 +- Package version: 0.3.0 +- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen + +## Installation + +### For [Node.js](https://nodejs.org/) + +#### npm + +To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). + +Then install it via: + +```shell +npm install zrok --save +``` + +Finally, you need to build the module: + +```shell +npm run build +``` + +##### Local development + +To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run: + +```shell +npm install +``` + +Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: + +```shell +npm link +``` + +To use the link you just defined in your project, switch to the directory you want to use your zrok from, and run: + +```shell +npm link /path/to/ +``` + +Finally, you need to build the module: + +```shell +npm run build +``` + +#### git + +If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID +then install it via: + +```shell + npm install GIT_USER_ID/GIT_REPO_ID --save +``` + +### For browser + +The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following +the above steps with Node.js and installing browserify with `npm install -g browserify`, +perform the following (assuming *main.js* is your entry file): + +```shell +browserify main.js > bundle.js +``` + +Then include *bundle.js* in the HTML pages. + +### Webpack Configuration + +Using Webpack you may encounter the following error: "Module not found: Error: +Cannot resolve module", most certainly you should disable AMD loader. Add/merge +the following section to your webpack config: + +```javascript +module: { + rules: [ + { + parser: { + amd: false + } + } + ] +} +``` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following JS code: + +```javascript +var Zrok = require('zrok'); + + +var api = new Zrok.AccountApi() +var opts = { + 'body': new Zrok.InviteRequest() // {InviteRequest} +}; +api.invite(opts).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + + +``` + +## Documentation for API Endpoints + +All URIs are relative to */api/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*Zrok.AccountApi* | [**invite**](docs/AccountApi.md#invite) | **POST** /invite | +*Zrok.AccountApi* | [**login**](docs/AccountApi.md#login) | **POST** /login | +*Zrok.AccountApi* | [**register**](docs/AccountApi.md#register) | **POST** /register | +*Zrok.AccountApi* | [**resetPassword**](docs/AccountApi.md#resetPassword) | **POST** /resetPassword | +*Zrok.AccountApi* | [**resetPasswordRequest**](docs/AccountApi.md#resetPasswordRequest) | **POST** /resetPasswordRequest | +*Zrok.AccountApi* | [**verify**](docs/AccountApi.md#verify) | **POST** /verify | +*Zrok.AdminApi* | [**createFrontend**](docs/AdminApi.md#createFrontend) | **POST** /frontend | +*Zrok.AdminApi* | [**createIdentity**](docs/AdminApi.md#createIdentity) | **POST** /identity | +*Zrok.AdminApi* | [**deleteFrontend**](docs/AdminApi.md#deleteFrontend) | **DELETE** /frontend | +*Zrok.AdminApi* | [**inviteTokenGenerate**](docs/AdminApi.md#inviteTokenGenerate) | **POST** /invite/token/generate | +*Zrok.AdminApi* | [**listFrontends**](docs/AdminApi.md#listFrontends) | **GET** /frontends | +*Zrok.AdminApi* | [**updateFrontend**](docs/AdminApi.md#updateFrontend) | **PATCH** /frontend | +*Zrok.EnvironmentApi* | [**disable**](docs/EnvironmentApi.md#disable) | **POST** /disable | +*Zrok.EnvironmentApi* | [**enable**](docs/EnvironmentApi.md#enable) | **POST** /enable | +*Zrok.MetadataApi* | [**configuration**](docs/MetadataApi.md#configuration) | **GET** /configuration | +*Zrok.MetadataApi* | [**getAccountDetail**](docs/MetadataApi.md#getAccountDetail) | **GET** /detail/account | +*Zrok.MetadataApi* | [**getAccountMetrics**](docs/MetadataApi.md#getAccountMetrics) | **GET** /metrics/account | +*Zrok.MetadataApi* | [**getEnvironmentDetail**](docs/MetadataApi.md#getEnvironmentDetail) | **GET** /detail/environment/{envZId} | +*Zrok.MetadataApi* | [**getEnvironmentMetrics**](docs/MetadataApi.md#getEnvironmentMetrics) | **GET** /metrics/environment/{envId} | +*Zrok.MetadataApi* | [**getFrontendDetail**](docs/MetadataApi.md#getFrontendDetail) | **GET** /detail/frontend/{feId} | +*Zrok.MetadataApi* | [**getShareDetail**](docs/MetadataApi.md#getShareDetail) | **GET** /detail/share/{shrToken} | +*Zrok.MetadataApi* | [**getShareMetrics**](docs/MetadataApi.md#getShareMetrics) | **GET** /metrics/share/{shrToken} | +*Zrok.MetadataApi* | [**overview**](docs/MetadataApi.md#overview) | **GET** /overview | +*Zrok.MetadataApi* | [**version**](docs/MetadataApi.md#version) | **GET** /version | +*Zrok.ShareApi* | [**access**](docs/ShareApi.md#access) | **POST** /access | +*Zrok.ShareApi* | [**share**](docs/ShareApi.md#share) | **POST** /share | +*Zrok.ShareApi* | [**unaccess**](docs/ShareApi.md#unaccess) | **DELETE** /unaccess | +*Zrok.ShareApi* | [**unshare**](docs/ShareApi.md#unshare) | **DELETE** /unshare | +*Zrok.ShareApi* | [**updateShare**](docs/ShareApi.md#updateShare) | **PATCH** /share | + + +## Documentation for Models + + - [Zrok.AccessRequest](docs/AccessRequest.md) + - [Zrok.AccessResponse](docs/AccessResponse.md) + - [Zrok.AuthUser](docs/AuthUser.md) + - [Zrok.Configuration](docs/Configuration.md) + - [Zrok.CreateFrontendRequest](docs/CreateFrontendRequest.md) + - [Zrok.CreateFrontendResponse](docs/CreateFrontendResponse.md) + - [Zrok.CreateIdentity201Response](docs/CreateIdentity201Response.md) + - [Zrok.CreateIdentityRequest](docs/CreateIdentityRequest.md) + - [Zrok.DeleteFrontendRequest](docs/DeleteFrontendRequest.md) + - [Zrok.DisableRequest](docs/DisableRequest.md) + - [Zrok.EnableRequest](docs/EnableRequest.md) + - [Zrok.EnableResponse](docs/EnableResponse.md) + - [Zrok.Environment](docs/Environment.md) + - [Zrok.EnvironmentAndResources](docs/EnvironmentAndResources.md) + - [Zrok.Frontend](docs/Frontend.md) + - [Zrok.InviteRequest](docs/InviteRequest.md) + - [Zrok.InviteTokenGenerateRequest](docs/InviteTokenGenerateRequest.md) + - [Zrok.LoginRequest](docs/LoginRequest.md) + - [Zrok.Metrics](docs/Metrics.md) + - [Zrok.MetricsSample](docs/MetricsSample.md) + - [Zrok.Overview](docs/Overview.md) + - [Zrok.PasswordRequirements](docs/PasswordRequirements.md) + - [Zrok.Principal](docs/Principal.md) + - [Zrok.PublicFrontend](docs/PublicFrontend.md) + - [Zrok.RegisterRequest](docs/RegisterRequest.md) + - [Zrok.RegisterResponse](docs/RegisterResponse.md) + - [Zrok.ResetPasswordRequest](docs/ResetPasswordRequest.md) + - [Zrok.ResetPasswordRequestRequest](docs/ResetPasswordRequestRequest.md) + - [Zrok.Share](docs/Share.md) + - [Zrok.ShareRequest](docs/ShareRequest.md) + - [Zrok.ShareResponse](docs/ShareResponse.md) + - [Zrok.SparkDataSample](docs/SparkDataSample.md) + - [Zrok.UnaccessRequest](docs/UnaccessRequest.md) + - [Zrok.UnshareRequest](docs/UnshareRequest.md) + - [Zrok.UpdateFrontendRequest](docs/UpdateFrontendRequest.md) + - [Zrok.UpdateShareRequest](docs/UpdateShareRequest.md) + - [Zrok.VerifyRequest](docs/VerifyRequest.md) + - [Zrok.VerifyResponse](docs/VerifyResponse.md) + + +## Documentation for Authorization + + +Authentication schemes defined for the API: +### key + + +- **Type**: API key +- **API key parameter name**: x-token +- **Location**: HTTP header + diff --git a/ui/src/api/account.js b/ui/src/api/account.js deleted file mode 100644 index 4c1f52fd..00000000 --- a/ui/src/api/account.js +++ /dev/null @@ -1,129 +0,0 @@ -/** @module account */ -// Auto-generated, edits will be overwritten -import * as gateway from './gateway' - -/** - * @param {object} options Optional options - * @param {module:types.inviteRequest} [options.body] - * @return {Promise} invitation created - */ -export function invite(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(inviteOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.loginRequest} [options.body] - * @return {Promise} login successful - */ -export function login(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(loginOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.registerRequest} [options.body] - * @return {Promise} account created - */ -export function register(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(registerOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.resetPasswordRequest} [options.body] - * @return {Promise} password reset - */ -export function resetPassword(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(resetPasswordOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {object} [options.body] - * @return {Promise} forgot password request created - */ -export function resetPasswordRequest(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(resetPasswordRequestOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.verifyRequest} [options.body] - * @return {Promise} token ready - */ -export function verify(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(verifyOperation, parameters) -} - -const inviteOperation = { - path: '/invite', - contentTypes: ['application/zrok.v1+json'], - method: 'post' -} - -const loginOperation = { - path: '/login', - contentTypes: ['application/zrok.v1+json'], - method: 'post' -} - -const registerOperation = { - path: '/register', - contentTypes: ['application/zrok.v1+json'], - method: 'post' -} - -const resetPasswordOperation = { - path: '/resetPassword', - contentTypes: ['application/zrok.v1+json'], - method: 'post' -} - -const resetPasswordRequestOperation = { - path: '/resetPasswordRequest', - contentTypes: ['application/zrok.v1+json'], - method: 'post' -} - -const verifyOperation = { - path: '/verify', - contentTypes: ['application/zrok.v1+json'], - method: 'post' -} diff --git a/ui/src/api/admin.js b/ui/src/api/admin.js deleted file mode 100644 index 14974e5e..00000000 --- a/ui/src/api/admin.js +++ /dev/null @@ -1,149 +0,0 @@ -/** @module admin */ -// Auto-generated, edits will be overwritten -import * as gateway from './gateway' - -/** - * @param {object} options Optional options - * @param {module:types.createFrontendRequest} [options.body] - * @return {Promise} frontend created - */ -export function createFrontend(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(createFrontendOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.updateFrontendRequest} [options.body] - * @return {Promise} frontend updated - */ -export function updateFrontend(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(updateFrontendOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.deleteFrontendRequest} [options.body] - * @return {Promise} frontend deleted - */ -export function deleteFrontend(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(deleteFrontendOperation, parameters) -} - -/** - */ -export function listFrontends() { - return gateway.request(listFrontendsOperation) -} - -/** - * @param {object} options Optional options - * @param {object} [options.body] - * @return {Promise} created - */ -export function createIdentity(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(createIdentityOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.inviteTokenGenerateRequest} [options.body] - * @return {Promise} invitation tokens created - */ -export function inviteTokenGenerate(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(inviteTokenGenerateOperation, parameters) -} - -const createFrontendOperation = { - path: '/frontend', - contentTypes: ['application/zrok.v1+json'], - method: 'post', - security: [ - { - id: 'key' - } - ] -} - -const updateFrontendOperation = { - path: '/frontend', - contentTypes: ['application/zrok.v1+json'], - method: 'patch', - security: [ - { - id: 'key' - } - ] -} - -const deleteFrontendOperation = { - path: '/frontend', - contentTypes: ['application/zrok.v1+json'], - method: 'delete', - security: [ - { - id: 'key' - } - ] -} - -const listFrontendsOperation = { - path: '/frontends', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const createIdentityOperation = { - path: '/identity', - contentTypes: ['application/zrok.v1+json'], - method: 'post', - security: [ - { - id: 'key' - } - ] -} - -const inviteTokenGenerateOperation = { - path: '/invite/token/generate', - contentTypes: ['application/zrok.v1+json'], - method: 'post', - security: [ - { - id: 'key' - } - ] -} diff --git a/ui/src/api/docs/AccessRequest.md b/ui/src/api/docs/AccessRequest.md new file mode 100644 index 00000000..6419ca13 --- /dev/null +++ b/ui/src/api/docs/AccessRequest.md @@ -0,0 +1,10 @@ +# Zrok.AccessRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envZId** | **String** | | [optional] +**shrToken** | **String** | | [optional] + + diff --git a/ui/src/api/docs/AccessResponse.md b/ui/src/api/docs/AccessResponse.md new file mode 100644 index 00000000..c982e98b --- /dev/null +++ b/ui/src/api/docs/AccessResponse.md @@ -0,0 +1,10 @@ +# Zrok.AccessResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontendToken** | **String** | | [optional] +**backendMode** | **String** | | [optional] + + diff --git a/ui/src/api/docs/AccountApi.md b/ui/src/api/docs/AccountApi.md new file mode 100644 index 00000000..1db1b861 --- /dev/null +++ b/ui/src/api/docs/AccountApi.md @@ -0,0 +1,278 @@ +# Zrok.AccountApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**invite**](AccountApi.md#invite) | **POST** /invite | +[**login**](AccountApi.md#login) | **POST** /login | +[**register**](AccountApi.md#register) | **POST** /register | +[**resetPassword**](AccountApi.md#resetPassword) | **POST** /resetPassword | +[**resetPasswordRequest**](AccountApi.md#resetPasswordRequest) | **POST** /resetPasswordRequest | +[**verify**](AccountApi.md#verify) | **POST** /verify | + + + +## invite + +> invite(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.AccountApi(); +let opts = { + 'body': new Zrok.InviteRequest() // InviteRequest | +}; +apiInstance.invite(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**InviteRequest**](InviteRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## login + +> String login(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.AccountApi(); +let opts = { + 'body': new Zrok.LoginRequest() // LoginRequest | +}; +apiInstance.login(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**LoginRequest**](LoginRequest.md)| | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## register + +> RegisterResponse register(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.AccountApi(); +let opts = { + 'body': new Zrok.RegisterRequest() // RegisterRequest | +}; +apiInstance.register(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**RegisterRequest**](RegisterRequest.md)| | [optional] + +### Return type + +[**RegisterResponse**](RegisterResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## resetPassword + +> resetPassword(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.AccountApi(); +let opts = { + 'body': new Zrok.ResetPasswordRequest() // ResetPasswordRequest | +}; +apiInstance.resetPassword(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ResetPasswordRequest**](ResetPasswordRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## resetPasswordRequest + +> resetPasswordRequest(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.AccountApi(); +let opts = { + 'body': new Zrok.ResetPasswordRequestRequest() // ResetPasswordRequestRequest | +}; +apiInstance.resetPasswordRequest(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ResetPasswordRequestRequest**](ResetPasswordRequestRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: Not defined + + +## verify + +> VerifyResponse verify(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.AccountApi(); +let opts = { + 'body': new Zrok.VerifyRequest() // VerifyRequest | +}; +apiInstance.verify(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**VerifyRequest**](VerifyRequest.md)| | [optional] + +### Return type + +[**VerifyResponse**](VerifyResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + diff --git a/ui/src/api/docs/AdminApi.md b/ui/src/api/docs/AdminApi.md new file mode 100644 index 00000000..ad66a8d2 --- /dev/null +++ b/ui/src/api/docs/AdminApi.md @@ -0,0 +1,308 @@ +# Zrok.AdminApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFrontend**](AdminApi.md#createFrontend) | **POST** /frontend | +[**createIdentity**](AdminApi.md#createIdentity) | **POST** /identity | +[**deleteFrontend**](AdminApi.md#deleteFrontend) | **DELETE** /frontend | +[**inviteTokenGenerate**](AdminApi.md#inviteTokenGenerate) | **POST** /invite/token/generate | +[**listFrontends**](AdminApi.md#listFrontends) | **GET** /frontends | +[**updateFrontend**](AdminApi.md#updateFrontend) | **PATCH** /frontend | + + + +## createFrontend + +> CreateFrontendResponse createFrontend(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.AdminApi(); +let opts = { + 'body': new Zrok.CreateFrontendRequest() // CreateFrontendRequest | +}; +apiInstance.createFrontend(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateFrontendRequest**](CreateFrontendRequest.md)| | [optional] + +### Return type + +[**CreateFrontendResponse**](CreateFrontendResponse.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## createIdentity + +> CreateIdentity201Response createIdentity(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.AdminApi(); +let opts = { + 'body': new Zrok.CreateIdentityRequest() // CreateIdentityRequest | +}; +apiInstance.createIdentity(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateIdentityRequest**](CreateIdentityRequest.md)| | [optional] + +### Return type + +[**CreateIdentity201Response**](CreateIdentity201Response.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## deleteFrontend + +> deleteFrontend(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.AdminApi(); +let opts = { + 'body': new Zrok.DeleteFrontendRequest() // DeleteFrontendRequest | +}; +apiInstance.deleteFrontend(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DeleteFrontendRequest**](DeleteFrontendRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: Not defined + + +## inviteTokenGenerate + +> inviteTokenGenerate(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.AdminApi(); +let opts = { + 'body': new Zrok.InviteTokenGenerateRequest() // InviteTokenGenerateRequest | +}; +apiInstance.inviteTokenGenerate(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**InviteTokenGenerateRequest**](InviteTokenGenerateRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: Not defined + + +## listFrontends + +> [PublicFrontend] listFrontends() + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.AdminApi(); +apiInstance.listFrontends().then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**[PublicFrontend]**](PublicFrontend.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## updateFrontend + +> updateFrontend(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.AdminApi(); +let opts = { + 'body': new Zrok.UpdateFrontendRequest() // UpdateFrontendRequest | +}; +apiInstance.updateFrontend(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateFrontendRequest**](UpdateFrontendRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: Not defined + diff --git a/ui/src/api/docs/AuthUser.md b/ui/src/api/docs/AuthUser.md new file mode 100644 index 00000000..3f0b8de4 --- /dev/null +++ b/ui/src/api/docs/AuthUser.md @@ -0,0 +1,10 @@ +# Zrok.AuthUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | [optional] +**password** | **String** | | [optional] + + diff --git a/ui/src/api/docs/Configuration.md b/ui/src/api/docs/Configuration.md new file mode 100644 index 00000000..114771a6 --- /dev/null +++ b/ui/src/api/docs/Configuration.md @@ -0,0 +1,14 @@ +# Zrok.Configuration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**version** | **String** | | [optional] +**touLink** | **String** | | [optional] +**invitesOpen** | **Boolean** | | [optional] +**requiresInviteToken** | **Boolean** | | [optional] +**inviteTokenContact** | **String** | | [optional] +**passwordRequirements** | [**PasswordRequirements**](PasswordRequirements.md) | | [optional] + + diff --git a/ui/src/api/docs/CreateFrontendRequest.md b/ui/src/api/docs/CreateFrontendRequest.md new file mode 100644 index 00000000..d75c4886 --- /dev/null +++ b/ui/src/api/docs/CreateFrontendRequest.md @@ -0,0 +1,11 @@ +# Zrok.CreateFrontendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**zId** | **String** | | [optional] +**urlTemplate** | **String** | | [optional] +**publicName** | **String** | | [optional] + + diff --git a/ui/src/api/docs/CreateFrontendResponse.md b/ui/src/api/docs/CreateFrontendResponse.md new file mode 100644 index 00000000..08cd5b40 --- /dev/null +++ b/ui/src/api/docs/CreateFrontendResponse.md @@ -0,0 +1,9 @@ +# Zrok.CreateFrontendResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | | [optional] + + diff --git a/ui/src/api/docs/CreateIdentity201Response.md b/ui/src/api/docs/CreateIdentity201Response.md new file mode 100644 index 00000000..4605efad --- /dev/null +++ b/ui/src/api/docs/CreateIdentity201Response.md @@ -0,0 +1,10 @@ +# Zrok.CreateIdentity201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **String** | | [optional] +**cfg** | **String** | | [optional] + + diff --git a/ui/src/api/docs/CreateIdentityRequest.md b/ui/src/api/docs/CreateIdentityRequest.md new file mode 100644 index 00000000..58dd822a --- /dev/null +++ b/ui/src/api/docs/CreateIdentityRequest.md @@ -0,0 +1,9 @@ +# Zrok.CreateIdentityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + diff --git a/ui/src/api/docs/DeleteFrontendRequest.md b/ui/src/api/docs/DeleteFrontendRequest.md new file mode 100644 index 00000000..9025cdca --- /dev/null +++ b/ui/src/api/docs/DeleteFrontendRequest.md @@ -0,0 +1,9 @@ +# Zrok.DeleteFrontendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontendToken** | **String** | | [optional] + + diff --git a/ui/src/api/docs/DisableRequest.md b/ui/src/api/docs/DisableRequest.md new file mode 100644 index 00000000..4e88904d --- /dev/null +++ b/ui/src/api/docs/DisableRequest.md @@ -0,0 +1,9 @@ +# Zrok.DisableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **String** | | [optional] + + diff --git a/ui/src/api/docs/EnableRequest.md b/ui/src/api/docs/EnableRequest.md new file mode 100644 index 00000000..122e2281 --- /dev/null +++ b/ui/src/api/docs/EnableRequest.md @@ -0,0 +1,10 @@ +# Zrok.EnableRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] +**host** | **String** | | [optional] + + diff --git a/ui/src/api/docs/EnableResponse.md b/ui/src/api/docs/EnableResponse.md new file mode 100644 index 00000000..909bee69 --- /dev/null +++ b/ui/src/api/docs/EnableResponse.md @@ -0,0 +1,10 @@ +# Zrok.EnableResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**identity** | **String** | | [optional] +**cfg** | **String** | | [optional] + + diff --git a/ui/src/api/docs/Environment.md b/ui/src/api/docs/Environment.md new file mode 100644 index 00000000..e226344c --- /dev/null +++ b/ui/src/api/docs/Environment.md @@ -0,0 +1,16 @@ +# Zrok.Environment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | | [optional] +**host** | **String** | | [optional] +**address** | **String** | | [optional] +**zId** | **String** | | [optional] +**activity** | [**[SparkDataSample]**](SparkDataSample.md) | | [optional] +**limited** | **Boolean** | | [optional] +**createdAt** | **Number** | | [optional] +**updatedAt** | **Number** | | [optional] + + diff --git a/ui/src/api/docs/EnvironmentAndResources.md b/ui/src/api/docs/EnvironmentAndResources.md new file mode 100644 index 00000000..12ee965c --- /dev/null +++ b/ui/src/api/docs/EnvironmentAndResources.md @@ -0,0 +1,11 @@ +# Zrok.EnvironmentAndResources + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**environment** | [**Environment**](Environment.md) | | [optional] +**frontends** | [**[Frontend]**](Frontend.md) | | [optional] +**shares** | [**[Share]**](Share.md) | | [optional] + + diff --git a/ui/src/api/docs/EnvironmentApi.md b/ui/src/api/docs/EnvironmentApi.md new file mode 100644 index 00000000..94e53b15 --- /dev/null +++ b/ui/src/api/docs/EnvironmentApi.md @@ -0,0 +1,110 @@ +# Zrok.EnvironmentApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**disable**](EnvironmentApi.md#disable) | **POST** /disable | +[**enable**](EnvironmentApi.md#enable) | **POST** /enable | + + + +## disable + +> disable(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.EnvironmentApi(); +let opts = { + 'body': new Zrok.DisableRequest() // DisableRequest | +}; +apiInstance.disable(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DisableRequest**](DisableRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: Not defined + + +## enable + +> EnableResponse enable(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.EnvironmentApi(); +let opts = { + 'body': new Zrok.EnableRequest() // EnableRequest | +}; +apiInstance.enable(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**EnableRequest**](EnableRequest.md)| | [optional] + +### Return type + +[**EnableResponse**](EnableResponse.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + diff --git a/ui/src/api/docs/Frontend.md b/ui/src/api/docs/Frontend.md new file mode 100644 index 00000000..25e597fc --- /dev/null +++ b/ui/src/api/docs/Frontend.md @@ -0,0 +1,13 @@ +# Zrok.Frontend + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | | [optional] +**shrToken** | **String** | | [optional] +**zId** | **String** | | [optional] +**createdAt** | **Number** | | [optional] +**updatedAt** | **Number** | | [optional] + + diff --git a/ui/src/api/docs/InviteRequest.md b/ui/src/api/docs/InviteRequest.md new file mode 100644 index 00000000..51683656 --- /dev/null +++ b/ui/src/api/docs/InviteRequest.md @@ -0,0 +1,10 @@ +# Zrok.InviteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**token** | **String** | | [optional] + + diff --git a/ui/src/api/docs/InviteTokenGenerateRequest.md b/ui/src/api/docs/InviteTokenGenerateRequest.md new file mode 100644 index 00000000..bd61785a --- /dev/null +++ b/ui/src/api/docs/InviteTokenGenerateRequest.md @@ -0,0 +1,9 @@ +# Zrok.InviteTokenGenerateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tokens** | **[String]** | | [optional] + + diff --git a/ui/src/api/docs/LoginRequest.md b/ui/src/api/docs/LoginRequest.md new file mode 100644 index 00000000..303b1677 --- /dev/null +++ b/ui/src/api/docs/LoginRequest.md @@ -0,0 +1,10 @@ +# Zrok.LoginRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**password** | **String** | | [optional] + + diff --git a/ui/src/api/docs/MetadataApi.md b/ui/src/api/docs/MetadataApi.md new file mode 100644 index 00000000..1b4373a1 --- /dev/null +++ b/ui/src/api/docs/MetadataApi.md @@ -0,0 +1,480 @@ +# Zrok.MetadataApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**configuration**](MetadataApi.md#configuration) | **GET** /configuration | +[**getAccountDetail**](MetadataApi.md#getAccountDetail) | **GET** /detail/account | +[**getAccountMetrics**](MetadataApi.md#getAccountMetrics) | **GET** /metrics/account | +[**getEnvironmentDetail**](MetadataApi.md#getEnvironmentDetail) | **GET** /detail/environment/{envZId} | +[**getEnvironmentMetrics**](MetadataApi.md#getEnvironmentMetrics) | **GET** /metrics/environment/{envId} | +[**getFrontendDetail**](MetadataApi.md#getFrontendDetail) | **GET** /detail/frontend/{feId} | +[**getShareDetail**](MetadataApi.md#getShareDetail) | **GET** /detail/share/{shrToken} | +[**getShareMetrics**](MetadataApi.md#getShareMetrics) | **GET** /metrics/share/{shrToken} | +[**overview**](MetadataApi.md#overview) | **GET** /overview | +[**version**](MetadataApi.md#version) | **GET** /version | + + + +## configuration + +> Configuration configuration() + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.MetadataApi(); +apiInstance.configuration().then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Configuration**](Configuration.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## getAccountDetail + +> [Environment] getAccountDetail() + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +apiInstance.getAccountDetail().then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**[Environment]**](Environment.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## getAccountMetrics + +> Metrics getAccountMetrics(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +let opts = { + 'duration': "duration_example" // String | +}; +apiInstance.getAccountMetrics(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **duration** | **String**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## getEnvironmentDetail + +> EnvironmentAndResources getEnvironmentDetail(envZId) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +let envZId = "envZId_example"; // String | +apiInstance.getEnvironmentDetail(envZId).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **envZId** | **String**| | + +### Return type + +[**EnvironmentAndResources**](EnvironmentAndResources.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## getEnvironmentMetrics + +> Metrics getEnvironmentMetrics(envId, opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +let envId = "envId_example"; // String | +let opts = { + 'duration': "duration_example" // String | +}; +apiInstance.getEnvironmentMetrics(envId, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **envId** | **String**| | + **duration** | **String**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## getFrontendDetail + +> Frontend getFrontendDetail(feId) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +let feId = 56; // Number | +apiInstance.getFrontendDetail(feId).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **feId** | **Number**| | + +### Return type + +[**Frontend**](Frontend.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## getShareDetail + +> Share getShareDetail(shrToken) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +let shrToken = "shrToken_example"; // String | +apiInstance.getShareDetail(shrToken).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **shrToken** | **String**| | + +### Return type + +[**Share**](Share.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## getShareMetrics + +> Metrics getShareMetrics(shrToken, opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +let shrToken = "shrToken_example"; // String | +let opts = { + 'duration': "duration_example" // String | +}; +apiInstance.getShareMetrics(shrToken, opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **shrToken** | **String**| | + **duration** | **String**| | [optional] + +### Return type + +[**Metrics**](Metrics.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## overview + +> Overview overview() + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.MetadataApi(); +apiInstance.overview().then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**Overview**](Overview.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + + +## version + +> String version() + + + +### Example + +```javascript +import Zrok from 'zrok'; + +let apiInstance = new Zrok.MetadataApi(); +apiInstance.version().then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/zrok.v1+json + diff --git a/ui/src/api/docs/Metrics.md b/ui/src/api/docs/Metrics.md new file mode 100644 index 00000000..9e03cf12 --- /dev/null +++ b/ui/src/api/docs/Metrics.md @@ -0,0 +1,12 @@ +# Zrok.Metrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **String** | | [optional] +**id** | **String** | | [optional] +**period** | **Number** | | [optional] +**samples** | [**[MetricsSample]**](MetricsSample.md) | | [optional] + + diff --git a/ui/src/api/docs/MetricsSample.md b/ui/src/api/docs/MetricsSample.md new file mode 100644 index 00000000..f6e67810 --- /dev/null +++ b/ui/src/api/docs/MetricsSample.md @@ -0,0 +1,11 @@ +# Zrok.MetricsSample + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **Number** | | [optional] +**tx** | **Number** | | [optional] +**timestamp** | **Number** | | [optional] + + diff --git a/ui/src/api/docs/Overview.md b/ui/src/api/docs/Overview.md new file mode 100644 index 00000000..b163a7d3 --- /dev/null +++ b/ui/src/api/docs/Overview.md @@ -0,0 +1,10 @@ +# Zrok.Overview + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accountLimited** | **Boolean** | | [optional] +**environments** | [**[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional] + + diff --git a/ui/src/api/docs/PasswordRequirements.md b/ui/src/api/docs/PasswordRequirements.md new file mode 100644 index 00000000..5baf4e59 --- /dev/null +++ b/ui/src/api/docs/PasswordRequirements.md @@ -0,0 +1,13 @@ +# Zrok.PasswordRequirements + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**length** | **Number** | | [optional] +**requireCapital** | **Boolean** | | [optional] +**requireNumeric** | **Boolean** | | [optional] +**requireSpecial** | **Boolean** | | [optional] +**validSpecialCharacters** | **String** | | [optional] + + diff --git a/ui/src/api/docs/Principal.md b/ui/src/api/docs/Principal.md new file mode 100644 index 00000000..d3fa1bc6 --- /dev/null +++ b/ui/src/api/docs/Principal.md @@ -0,0 +1,13 @@ +# Zrok.Principal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | | [optional] +**email** | **String** | | [optional] +**token** | **String** | | [optional] +**limitless** | **Boolean** | | [optional] +**admin** | **Boolean** | | [optional] + + diff --git a/ui/src/api/docs/PublicFrontend.md b/ui/src/api/docs/PublicFrontend.md new file mode 100644 index 00000000..35cd3635 --- /dev/null +++ b/ui/src/api/docs/PublicFrontend.md @@ -0,0 +1,14 @@ +# Zrok.PublicFrontend + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | | [optional] +**zId** | **String** | | [optional] +**urlTemplate** | **String** | | [optional] +**publicName** | **String** | | [optional] +**createdAt** | **Number** | | [optional] +**updatedAt** | **Number** | | [optional] + + diff --git a/ui/src/api/docs/RegisterRequest.md b/ui/src/api/docs/RegisterRequest.md new file mode 100644 index 00000000..bb07594c --- /dev/null +++ b/ui/src/api/docs/RegisterRequest.md @@ -0,0 +1,10 @@ +# Zrok.RegisterRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | | [optional] +**password** | **String** | | [optional] + + diff --git a/ui/src/api/docs/RegisterResponse.md b/ui/src/api/docs/RegisterResponse.md new file mode 100644 index 00000000..d7a0cc41 --- /dev/null +++ b/ui/src/api/docs/RegisterResponse.md @@ -0,0 +1,9 @@ +# Zrok.RegisterResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | | [optional] + + diff --git a/ui/src/api/docs/ResetPasswordRequest.md b/ui/src/api/docs/ResetPasswordRequest.md new file mode 100644 index 00000000..53844be3 --- /dev/null +++ b/ui/src/api/docs/ResetPasswordRequest.md @@ -0,0 +1,10 @@ +# Zrok.ResetPasswordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | | [optional] +**password** | **String** | | [optional] + + diff --git a/ui/src/api/docs/ResetPasswordRequestRequest.md b/ui/src/api/docs/ResetPasswordRequestRequest.md new file mode 100644 index 00000000..467d1d4c --- /dev/null +++ b/ui/src/api/docs/ResetPasswordRequestRequest.md @@ -0,0 +1,9 @@ +# Zrok.ResetPasswordRequestRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emailAddress** | **String** | | [optional] + + diff --git a/ui/src/api/docs/Share.md b/ui/src/api/docs/Share.md new file mode 100644 index 00000000..82853ef6 --- /dev/null +++ b/ui/src/api/docs/Share.md @@ -0,0 +1,20 @@ +# Zrok.Share + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | | [optional] +**zId** | **String** | | [optional] +**shareMode** | **String** | | [optional] +**backendMode** | **String** | | [optional] +**frontendSelection** | **String** | | [optional] +**frontendEndpoint** | **String** | | [optional] +**backendProxyEndpoint** | **String** | | [optional] +**reserved** | **Boolean** | | [optional] +**activity** | [**[SparkDataSample]**](SparkDataSample.md) | | [optional] +**limited** | **Boolean** | | [optional] +**createdAt** | **Number** | | [optional] +**updatedAt** | **Number** | | [optional] + + diff --git a/ui/src/api/docs/ShareApi.md b/ui/src/api/docs/ShareApi.md new file mode 100644 index 00000000..1ecff0c9 --- /dev/null +++ b/ui/src/api/docs/ShareApi.md @@ -0,0 +1,263 @@ +# Zrok.ShareApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**access**](ShareApi.md#access) | **POST** /access | +[**share**](ShareApi.md#share) | **POST** /share | +[**unaccess**](ShareApi.md#unaccess) | **DELETE** /unaccess | +[**unshare**](ShareApi.md#unshare) | **DELETE** /unshare | +[**updateShare**](ShareApi.md#updateShare) | **PATCH** /share | + + + +## access + +> AccessResponse access(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.ShareApi(); +let opts = { + 'body': new Zrok.AccessRequest() // AccessRequest | +}; +apiInstance.access(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**AccessRequest**](AccessRequest.md)| | [optional] + +### Return type + +[**AccessResponse**](AccessResponse.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## share + +> ShareResponse share(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.ShareApi(); +let opts = { + 'body': new Zrok.ShareRequest() // ShareRequest | +}; +apiInstance.share(opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ShareRequest**](ShareRequest.md)| | [optional] + +### Return type + +[**ShareResponse**](ShareResponse.md) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## unaccess + +> unaccess(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.ShareApi(); +let opts = { + 'body': new Zrok.UnaccessRequest() // UnaccessRequest | +}; +apiInstance.unaccess(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnaccessRequest**](UnaccessRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: Not defined + + +## unshare + +> unshare(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.ShareApi(); +let opts = { + 'body': new Zrok.UnshareRequest() // UnshareRequest | +}; +apiInstance.unshare(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UnshareRequest**](UnshareRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: application/zrok.v1+json + + +## updateShare + +> updateShare(opts) + + + +### Example + +```javascript +import Zrok from 'zrok'; +let defaultClient = Zrok.ApiClient.instance; +// Configure API key authorization: key +let key = defaultClient.authentications['key']; +key.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//key.apiKeyPrefix = 'Token'; + +let apiInstance = new Zrok.ShareApi(); +let opts = { + 'body': new Zrok.UpdateShareRequest() // UpdateShareRequest | +}; +apiInstance.updateShare(opts).then(() => { + console.log('API called successfully.'); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateShareRequest**](UpdateShareRequest.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[key](../README.md#key) + +### HTTP request headers + +- **Content-Type**: application/zrok.v1+json +- **Accept**: Not defined + diff --git a/ui/src/api/docs/ShareRequest.md b/ui/src/api/docs/ShareRequest.md new file mode 100644 index 00000000..f8ac7988 --- /dev/null +++ b/ui/src/api/docs/ShareRequest.md @@ -0,0 +1,60 @@ +# Zrok.ShareRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envZId** | **String** | | [optional] +**shareMode** | **String** | | [optional] +**frontendSelection** | **[String]** | | [optional] +**backendMode** | **String** | | [optional] +**backendProxyEndpoint** | **String** | | [optional] +**authScheme** | **String** | | [optional] +**authUsers** | [**[AuthUser]**](AuthUser.md) | | [optional] +**oauthProvider** | **String** | | [optional] +**oauthEmailDomains** | **[String]** | | [optional] +**oauthAuthorizationCheckInterval** | **String** | | [optional] +**reserved** | **Boolean** | | [optional] + + + +## Enum: ShareModeEnum + + +* `public` (value: `"public"`) + +* `private` (value: `"private"`) + + + + + +## Enum: BackendModeEnum + + +* `proxy` (value: `"proxy"`) + +* `web` (value: `"web"`) + +* `tcpTunnel` (value: `"tcpTunnel"`) + +* `udpTunnel` (value: `"udpTunnel"`) + +* `caddy` (value: `"caddy"`) + +* `drive` (value: `"drive"`) + + + + + +## Enum: OauthProviderEnum + + +* `github` (value: `"github"`) + +* `google` (value: `"google"`) + + + + diff --git a/ui/src/api/docs/ShareResponse.md b/ui/src/api/docs/ShareResponse.md new file mode 100644 index 00000000..97da2847 --- /dev/null +++ b/ui/src/api/docs/ShareResponse.md @@ -0,0 +1,10 @@ +# Zrok.ShareResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontendProxyEndpoints** | **[String]** | | [optional] +**shrToken** | **String** | | [optional] + + diff --git a/ui/src/api/docs/SparkDataSample.md b/ui/src/api/docs/SparkDataSample.md new file mode 100644 index 00000000..b823e0cf --- /dev/null +++ b/ui/src/api/docs/SparkDataSample.md @@ -0,0 +1,10 @@ +# Zrok.SparkDataSample + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rx** | **Number** | | [optional] +**tx** | **Number** | | [optional] + + diff --git a/ui/src/api/docs/UnaccessRequest.md b/ui/src/api/docs/UnaccessRequest.md new file mode 100644 index 00000000..037ef9f5 --- /dev/null +++ b/ui/src/api/docs/UnaccessRequest.md @@ -0,0 +1,11 @@ +# Zrok.UnaccessRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontendToken** | **String** | | [optional] +**envZId** | **String** | | [optional] +**shrToken** | **String** | | [optional] + + diff --git a/ui/src/api/docs/UnshareRequest.md b/ui/src/api/docs/UnshareRequest.md new file mode 100644 index 00000000..b8d4e5ce --- /dev/null +++ b/ui/src/api/docs/UnshareRequest.md @@ -0,0 +1,11 @@ +# Zrok.UnshareRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**envZId** | **String** | | [optional] +**shrToken** | **String** | | [optional] +**reserved** | **Boolean** | | [optional] + + diff --git a/ui/src/api/docs/UpdateFrontendRequest.md b/ui/src/api/docs/UpdateFrontendRequest.md new file mode 100644 index 00000000..fa798b38 --- /dev/null +++ b/ui/src/api/docs/UpdateFrontendRequest.md @@ -0,0 +1,11 @@ +# Zrok.UpdateFrontendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**frontendToken** | **String** | | [optional] +**publicName** | **String** | | [optional] +**urlTemplate** | **String** | | [optional] + + diff --git a/ui/src/api/docs/UpdateShareRequest.md b/ui/src/api/docs/UpdateShareRequest.md new file mode 100644 index 00000000..6ac4f22b --- /dev/null +++ b/ui/src/api/docs/UpdateShareRequest.md @@ -0,0 +1,10 @@ +# Zrok.UpdateShareRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**shrToken** | **String** | | [optional] +**backendProxyEndpoint** | **String** | | [optional] + + diff --git a/ui/src/api/docs/VerifyRequest.md b/ui/src/api/docs/VerifyRequest.md new file mode 100644 index 00000000..268fd7e9 --- /dev/null +++ b/ui/src/api/docs/VerifyRequest.md @@ -0,0 +1,9 @@ +# Zrok.VerifyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **String** | | [optional] + + diff --git a/ui/src/api/docs/VerifyResponse.md b/ui/src/api/docs/VerifyResponse.md new file mode 100644 index 00000000..7283792b --- /dev/null +++ b/ui/src/api/docs/VerifyResponse.md @@ -0,0 +1,9 @@ +# Zrok.VerifyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] + + diff --git a/ui/src/api/environment.js b/ui/src/api/environment.js deleted file mode 100644 index 99c503cc..00000000 --- a/ui/src/api/environment.js +++ /dev/null @@ -1,55 +0,0 @@ -/** @module environment */ -// Auto-generated, edits will be overwritten -import * as gateway from './gateway' - -/** - * @param {object} options Optional options - * @param {module:types.enableRequest} [options.body] - * @return {Promise} environment enabled - */ -export function enable(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(enableOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.disableRequest} [options.body] - * @return {Promise} environment disabled - */ -export function disable(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(disableOperation, parameters) -} - -const enableOperation = { - path: '/enable', - contentTypes: ['application/zrok.v1+json'], - method: 'post', - security: [ - { - id: 'key' - } - ] -} - -const disableOperation = { - path: '/disable', - contentTypes: ['application/zrok.v1+json'], - method: 'post', - security: [ - { - id: 'key' - } - ] -} diff --git a/ui/src/api/gateway/index.js b/ui/src/api/gateway/index.js deleted file mode 100644 index 881798d7..00000000 --- a/ui/src/api/gateway/index.js +++ /dev/null @@ -1,281 +0,0 @@ -// Auto-generated, edits will be overwritten -import spec from './spec' - -export class ServiceError extends Error {} - -let options = {} - -export function init(serviceOptions) { - options = serviceOptions -} - -export function request(op, parameters, attempt) { - if (!attempt) attempt = 1; - return acquireRights(op, spec, options) - .then(rights => { - parameters = parameters || {} - const baseUrl = getBaseUrl(spec) - let reqInfo = { parameters, baseUrl } - if (options.processRequest) { - reqInfo = options.processRequest(op, reqInfo) - } - const req = buildRequest(op, reqInfo.baseUrl, reqInfo.parameters, rights) - return makeFetchRequest(req) - .then(res => processResponse(req, res, attempt, options), e => processError(req, e)) - .then(outcome => outcome.retry ? request(op, parameters, attempt + 1) : outcome.res) - }) -} - -function acquireRights(op, spec, options) { - if (op.security && options.getAuthorization) { - return op.security.reduce((promise, security) => { - return promise.then(rights => { - const securityDefinition = spec.securityDefinitions[security.id] - return options.getAuthorization(security, securityDefinition, op) - .then(auth => { - rights[security.id] = auth - return rights - }) - }) - }, Promise.resolve({})) - } - return Promise.resolve({}) -} - -function makeFetchRequest(req) { - let fetchOptions = { - compress: true, - method: (req.method || 'get').toUpperCase(), - headers: req.headers, - body: req.body ? JSON.stringify(req.body) : undefined - } - - if (options.fetchOptions) { - const opts = options.fetchOptions - const headers = opts.headers - ? Object.assign(fetchOptions.headers, opts.headers) - : fetchOptions.headers - - fetchOptions = Object.assign({}, fetchOptions, opts) - fetchOptions.headers = headers - } - - let promise = fetch(req.url, fetchOptions) - return promise -} - -function buildRequest(op, baseUrl, parameters, rights) { - let paramGroups = groupParams(op, parameters) - paramGroups = applyAuthorization(paramGroups, rights, spec) - const url = buildUrl(op, baseUrl, paramGroups, spec) - const headers = buildHeaders(op, paramGroups) - const body = buildBody(parameters.body) - return { - method: op.method, - url, - headers, - body - } -} - -function groupParams(op, parameters) { - const groups = ['header', 'path', 'query', 'formData'].reduce((groups, name) => { - groups[name] = formatParamsGroup(groups[name]) - return groups - }, parameters) - if (!groups.header) groups.header = {} - return groups -} - -function formatParamsGroup(groups) { - return Object.keys(groups || {}).reduce((g, name) => { - const param = groups[name] - if (param !== undefined) { - g[name] = formatParam(param) - } - return g - }, {}) -} - -function formatParam(param) { - if (param === undefined || param === null) return '' - else if (param instanceof Date) return param.toJSON() - else if (Array.isArray(param)) return param - else return param.toString() -} - -function buildUrl(op, baseUrl, parameters, spec) { - let url = `${baseUrl}${op.path}` - if (parameters.path) { - url = Object.keys(parameters.path) - .reduce((url, name) => url.replace(`{${name}}`, parameters.path[name]), url) - } - const query = createQueryString(parameters.query) - return url + query -} - -function getBaseUrl(spec) { - return options.url || `${spec.schemes[0] || 'https'}://${spec.host}${spec.basePath}` -} - -function createQueryParam(name, value) { - const v = formatParam(value) - if (v && typeof v === 'string') return `${name}=${encodeURIComponent(v)}` - return name; -} - -function createQueryString(query) { - const names = Object.keys(query || {}) - if (!names.length) return '' - const params = names.map(name => ({name, value: query[name]})) - .reduce((acc, value) => { - if (Array.isArray(value.value)) { - return acc.concat(value.value) - } else { - acc.push(createQueryParam(value.name, value.value)) - return acc - } - }, []) - return '?' + params.sort().join('&') -} - -function buildHeaders(op, parameters) { - const headers = {} - - let accepts - if (op.accepts && op.accepts.length) accepts = op.accepts - else if (spec.accepts && spec.accepts.length) accepts = spec.accepts - else accepts = [ 'application/json' ] - - headers.Accept = accepts.join(', ') - - let contentType - if (op.contentTypes && op.contentTypes[0]) contentType = op.contentTypes[0] - else if (spec.contentTypes && spec.contentTypes[0]) contentType = spec.contentTypes[0] - if (contentType) headers['Content-Type'] = contentType - - return Object.assign(headers, parameters.header) -} - -function buildBody(bodyParams) { - if (bodyParams) { - if (bodyParams.body) return bodyParams.body - const key = Object.keys(bodyParams)[0] - if (key) return bodyParams[key] - } - return undefined -} - -function resolveAuthHeaderName(headerName){ - if (options.authorizationHeader && headerName.toLowerCase() === 'authorization') { - return options.authorizationHeader - } else { - return headerName - } -} - -function applyAuthorization(req, rights, spec) { - Object.keys(rights).forEach(name => { - const rightsInfo = rights[name] - const definition = spec.securityDefinitions[name] - switch (definition.type) { - case 'basic': - const creds = `${rightsInfo.username}:${rightsInfo.password}` - const token = (typeof window !== 'undefined' && window.btoa) - ? window.btoa(creds) - : new Buffer(creds).toString('base64') - req.header[resolveAuthHeaderName('Authorization')] = `Basic ${token}` - break - case 'oauth2': - req.header[resolveAuthHeaderName('Authorization')] = `Bearer ${rightsInfo.token}` - break - case 'apiKey': - if (definition.in === 'header') { - req.header[resolveAuthHeaderName(definition.name)] = rightsInfo.apiKey - } else if (definition.in === 'query') { - req.query[definition.name] = rightsInfo.apiKey - } else { - throw new Error(`Api key must be in header or query not '${definition.in}'`) - } - break - default: - throw new Error(`Security definition type '${definition.type}' not supported`) - } - }) - return req -} - -function processResponse(req, response, attempt, options) { - const format = response.ok ? formatResponse : formatServiceError - const contentType = response.headers.get('content-type') || '' - - let parse - if (response.status === 204) { - parse = Promise.resolve() - } else if (~contentType.indexOf('json')) { - parse = response.json() - } else if (~contentType.indexOf('octet-stream')) { - parse = response.blob() - } else if (~contentType.indexOf('text')) { - parse = response.text() - } else { - parse = Promise.resolve() - } - - return parse - .then(data => format(response, data, options)) - .then(res => { - if (options.processResponse) return options.processResponse(req, res, attempt) - else return Promise.resolve({ res }) - }) -} - -function formatResponse(response, data, options) { - return { raw: response, data } -} - -function formatServiceError(response, data, options) { - if (options.formatServiceError) { - data = options.formatServiceError(response, data) - } else { - const serviceError = new ServiceError() - if (data) { - if (typeof data === 'string') serviceError.message = data - else { - if (data.message) serviceError.message = data.message - if (data.body) serviceError.body = data.body - else serviceError.body = data - } - - if (data.code) serviceError.code = data.code - } else { - serviceError.message = response.statusText - } - serviceError.status = response.status - data = serviceError - } - return { raw: response, data, error: true } -} - -function processError(req, error) { - const { processError } = options - const res = { res: { raw: {}, data: error, error: true } } - - return Promise.resolve(processError ? processError(req, res) : res) -} - -const COLLECTION_DELIM = { csv: ',', multi: '&', pipes: '|', ssv: ' ', tsv: '\t' } - -export function formatArrayParam(array, format, name) { - if (!array) return - if (format === 'multi') return array.map(value => createQueryParam(name, value)) - const delim = COLLECTION_DELIM[format] - if (!delim) throw new Error(`Invalid collection format '${format}'`) - return array.map(formatParam).join(delim) -} - -export function formatDate(date, format) { - if (!date) return - const str = date.toISOString() - return (format === 'date') ? str.split('T')[0] : str -} diff --git a/ui/src/api/gateway/spec.js b/ui/src/api/gateway/spec.js deleted file mode 100644 index 1e69e5a3..00000000 --- a/ui/src/api/gateway/spec.js +++ /dev/null @@ -1,23 +0,0 @@ - -// Auto-generated, edits will be overwritten -const spec = { - 'host': 'localhost', - 'schemes': [ - 'http' - ], - 'basePath': '/api/v1', - 'contentTypes': [ - 'application/zrok.v1+json' - ], - 'accepts': [ - 'application/zrok.v1+json' - ], - 'securityDefinitions': { - 'key': { - 'type': 'apiKey', - 'in': 'header', - 'name': 'x-token' - } - } -} -export default spec diff --git a/ui/src/api/metadata.js b/ui/src/api/metadata.js deleted file mode 100644 index 463128c3..00000000 --- a/ui/src/api/metadata.js +++ /dev/null @@ -1,209 +0,0 @@ -/** @module metadata */ -// Auto-generated, edits will be overwritten -import * as gateway from './gateway' - -/** - */ -export function configuration() { - return gateway.request(configurationOperation) -} - -/** - */ -export function getAccountDetail() { - return gateway.request(getAccountDetailOperation) -} - -/** - * @param {string} envZId - * @return {Promise} ok - */ -export function getEnvironmentDetail(envZId) { - const parameters = { - path: { - envZId - } - } - return gateway.request(getEnvironmentDetailOperation, parameters) -} - -/** - * @param {number} feId - * @return {Promise} ok - */ -export function getFrontendDetail(feId) { - const parameters = { - path: { - feId - } - } - return gateway.request(getFrontendDetailOperation, parameters) -} - -/** - * @param {string} shrToken - * @return {Promise} ok - */ -export function getShareDetail(shrToken) { - const parameters = { - path: { - shrToken - } - } - return gateway.request(getShareDetailOperation, parameters) -} - -/** - */ -export function overview() { - return gateway.request(overviewOperation) -} - -/** - * @param {object} options Optional options - * @param {string} [options.duration] - * @return {Promise} account metrics - */ -export function getAccountMetrics(options) { - if (!options) options = {} - const parameters = { - query: { - duration: options.duration - } - } - return gateway.request(getAccountMetricsOperation, parameters) -} - -/** - * @param {string} envId - * @param {object} options Optional options - * @param {string} [options.duration] - * @return {Promise} environment metrics - */ -export function getEnvironmentMetrics(envId, options) { - if (!options) options = {} - const parameters = { - path: { - envId - }, - query: { - duration: options.duration - } - } - return gateway.request(getEnvironmentMetricsOperation, parameters) -} - -/** - * @param {string} shrToken - * @param {object} options Optional options - * @param {string} [options.duration] - * @return {Promise} share metrics - */ -export function getShareMetrics(shrToken, options) { - if (!options) options = {} - const parameters = { - path: { - shrToken - }, - query: { - duration: options.duration - } - } - return gateway.request(getShareMetricsOperation, parameters) -} - -/** - */ -export function version() { - return gateway.request(versionOperation) -} - -const configurationOperation = { - path: '/configuration', - method: 'get' -} - -const getAccountDetailOperation = { - path: '/detail/account', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const getEnvironmentDetailOperation = { - path: '/detail/environment/{envZId}', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const getFrontendDetailOperation = { - path: '/detail/frontend/{feId}', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const getShareDetailOperation = { - path: '/detail/share/{shrToken}', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const overviewOperation = { - path: '/overview', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const getAccountMetricsOperation = { - path: '/metrics/account', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const getEnvironmentMetricsOperation = { - path: '/metrics/environment/{envId}', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const getShareMetricsOperation = { - path: '/metrics/share/{shrToken}', - method: 'get', - security: [ - { - id: 'key' - } - ] -} - -const versionOperation = { - path: '/version', - method: 'get' -} diff --git a/ui/src/api/mocha.opts b/ui/src/api/mocha.opts new file mode 100644 index 00000000..90701180 --- /dev/null +++ b/ui/src/api/mocha.opts @@ -0,0 +1 @@ +--timeout 10000 diff --git a/ui/src/api/package.json b/ui/src/api/package.json new file mode 100644 index 00000000..95dbd75d --- /dev/null +++ b/ui/src/api/package.json @@ -0,0 +1,46 @@ +{ + "name": "zrok", + "version": "0.3.0", + "description": "zrok client access", + "license": "Unlicense", + "main": "dist/index.js", + "scripts": { + "build": "babel src -d dist", + "prepare": "npm run build", + "test": "mocha --require @babel/register --recursive" + }, + "browser": { + "fs": false + }, + "dependencies": { + "@babel/cli": "^7.0.0", + "superagent": "^5.3.0" + }, + "devDependencies": { + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-bind": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-proposal-pipeline-operator": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", + "expect.js": "^0.3.1", + "mocha": "^8.0.1", + "sinon": "^7.2.0" + }, + "files": [ + "dist" + ] +} diff --git a/ui/src/api/share.js b/ui/src/api/share.js deleted file mode 100644 index 3bf46930..00000000 --- a/ui/src/api/share.js +++ /dev/null @@ -1,133 +0,0 @@ -/** @module share */ -// Auto-generated, edits will be overwritten -import * as gateway from './gateway' - -/** - * @param {object} options Optional options - * @param {module:types.accessRequest} [options.body] - * @return {Promise} access created - */ -export function access(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(accessOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.shareRequest} [options.body] - * @return {Promise} share created - */ -export function share(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(shareOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.updateShareRequest} [options.body] - * @return {Promise} share updated - */ -export function updateShare(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(updateShareOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.unaccessRequest} [options.body] - * @return {Promise} access removed - */ -export function unaccess(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(unaccessOperation, parameters) -} - -/** - * @param {object} options Optional options - * @param {module:types.unshareRequest} [options.body] - * @return {Promise} share removed - */ -export function unshare(options) { - if (!options) options = {} - const parameters = { - body: { - body: options.body - } - } - return gateway.request(unshareOperation, parameters) -} - -const accessOperation = { - path: '/access', - contentTypes: ['application/zrok.v1+json'], - method: 'post', - security: [ - { - id: 'key' - } - ] -} - -const shareOperation = { - path: '/share', - contentTypes: ['application/zrok.v1+json'], - method: 'post', - security: [ - { - id: 'key' - } - ] -} - -const updateShareOperation = { - path: '/share', - contentTypes: ['application/zrok.v1+json'], - method: 'patch', - security: [ - { - id: 'key' - } - ] -} - -const unaccessOperation = { - path: '/unaccess', - contentTypes: ['application/zrok.v1+json'], - method: 'delete', - security: [ - { - id: 'key' - } - ] -} - -const unshareOperation = { - path: '/unshare', - contentTypes: ['application/zrok.v1+json'], - method: 'delete', - security: [ - { - id: 'key' - } - ] -} diff --git a/ui/src/api/src/ApiClient.js b/ui/src/api/src/ApiClient.js new file mode 100644 index 00000000..9525aef3 --- /dev/null +++ b/ui/src/api/src/ApiClient.js @@ -0,0 +1,693 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import superagent from "superagent"; +import querystring from "querystring"; + +/** +* @module ApiClient +* @version 0.3.0 +*/ + +/** +* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an +* application to use this class directly - the *Api and model classes provide the public API for the service. The +* contents of this file should be regarded as internal but are documented for completeness. +* @alias module:ApiClient +* @class +*/ +class ApiClient { + /** + * The base URL against which to resolve every API call's (relative) path. + * Overrides the default value set in spec file if present + * @param {String} basePath + */ + constructor(basePath = '/api/v1') { + /** + * The base URL against which to resolve every API call's (relative) path. + * @type {String} + * @default /api/v1 + */ + this.basePath = basePath.replace(/\/+$/, ''); + + /** + * The authentication methods to be included for all API calls. + * @type {Array.} + */ + this.authentications = { + 'key': {type: 'apiKey', 'in': 'header', name: 'x-token'} + } + + /** + * The default HTTP headers to be included for all API calls. + * @type {Array.} + * @default {} + */ + this.defaultHeaders = { + 'User-Agent': 'OpenAPI-Generator/0.3.0/Javascript' + }; + + /** + * The default HTTP timeout for all API calls. + * @type {Number} + * @default 60000 + */ + this.timeout = 60000; + + /** + * If set to false an additional timestamp parameter is added to all API GET calls to + * prevent browser caching + * @type {Boolean} + * @default true + */ + this.cache = true; + + /** + * If set to true, the client will save the cookies from each server + * response, and return them in the next request. + * @default false + */ + this.enableCookies = false; + + /* + * Used to save and return cookies in a node.js (non-browser) setting, + * if this.enableCookies is set to true. + */ + if (typeof window === 'undefined') { + this.agent = new superagent.agent(); + } + + /* + * Allow user to override superagent agent + */ + this.requestAgent = null; + + /* + * Allow user to add superagent plugins + */ + this.plugins = null; + + } + + /** + * Returns a string representation for an actual parameter. + * @param param The actual parameter. + * @returns {String} The string representation of param. + */ + paramToString(param) { + if (param == undefined || param == null) { + return ''; + } + if (param instanceof Date) { + return param.toJSON(); + } + if (ApiClient.canBeJsonified(param)) { + return JSON.stringify(param); + } + + return param.toString(); + } + + /** + * Returns a boolean indicating if the parameter could be JSON.stringified + * @param param The actual parameter + * @returns {Boolean} Flag indicating if param can be JSON.stringified + */ + static canBeJsonified(str) { + if (typeof str !== 'string' && typeof str !== 'object') return false; + try { + const type = str.toString(); + return type === '[object Object]' + || type === '[object Array]'; + } catch (err) { + return false; + } + }; + + /** + * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. + * NOTE: query parameters are not handled here. + * @param {String} path The path to append to the base URL. + * @param {Object} pathParams The parameter values to append. + * @param {String} apiBasePath Base path defined in the path, operation level to override the default one + * @returns {String} The encoded path with parameter values substituted. + */ + buildUrl(path, pathParams, apiBasePath) { + if (!path.match(/^\//)) { + path = '/' + path; + } + + var url = this.basePath + path; + + // use API (operation, path) base path if defined + if (apiBasePath !== null && apiBasePath !== undefined) { + url = apiBasePath + path; + } + + url = url.replace(/\{([\w-\.]+)\}/g, (fullMatch, key) => { + var value; + if (pathParams.hasOwnProperty(key)) { + value = this.paramToString(pathParams[key]); + } else { + value = fullMatch; + } + + return encodeURIComponent(value); + }); + + return url; + } + + /** + * Checks whether the given content type represents JSON.
+ * JSON content type examples:
+ *
    + *
  • application/json
  • + *
  • application/json; charset=UTF8
  • + *
  • APPLICATION/JSON
  • + *
+ * @param {String} contentType The MIME content type to check. + * @returns {Boolean} true if contentType represents JSON, otherwise false. + */ + isJsonMime(contentType) { + return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); + } + + /** + * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. + * @param {Array.} contentTypes + * @returns {String} The chosen content type, preferring JSON. + */ + jsonPreferredMime(contentTypes) { + for (var i = 0; i < contentTypes.length; i++) { + if (this.isJsonMime(contentTypes[i])) { + return contentTypes[i]; + } + } + + return contentTypes[0]; + } + + /** + * Checks whether the given parameter value represents file-like content. + * @param param The parameter to check. + * @returns {Boolean} true if param represents a file. + */ + isFileParam(param) { + // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) + if (typeof require === 'function') { + let fs; + try { + fs = require('fs'); + } catch (err) {} + if (fs && fs.ReadStream && param instanceof fs.ReadStream) { + return true; + } + } + + // Buffer in Node.js + if (typeof Buffer === 'function' && param instanceof Buffer) { + return true; + } + + // Blob in browser + if (typeof Blob === 'function' && param instanceof Blob) { + return true; + } + + // File in browser (it seems File object is also instance of Blob, but keep this for safe) + if (typeof File === 'function' && param instanceof File) { + return true; + } + + return false; + } + + /** + * Normalizes parameter values: + *
    + *
  • remove nils
  • + *
  • keep files and arrays
  • + *
  • format to string with `paramToString` for other cases
  • + *
+ * @param {Object.} params The parameters as object properties. + * @returns {Object.} normalized parameters. + */ + normalizeParams(params) { + var newParams = {}; + for (var key in params) { + if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { + var value = params[key]; + if (this.isFileParam(value) || Array.isArray(value)) { + newParams[key] = value; + } else { + newParams[key] = this.paramToString(value); + } + } + } + + return newParams; + } + + /** + * Builds a string representation of an array-type actual parameter, according to the given collection format. + * @param {Array} param An array parameter. + * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. + * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns + * param as is if collectionFormat is multi. + */ + buildCollectionParam(param, collectionFormat) { + if (param == null) { + return null; + } + switch (collectionFormat) { + case 'csv': + return param.map(this.paramToString, this).join(','); + case 'ssv': + return param.map(this.paramToString, this).join(' '); + case 'tsv': + return param.map(this.paramToString, this).join('\t'); + case 'pipes': + return param.map(this.paramToString, this).join('|'); + case 'multi': + //return the array directly as SuperAgent will handle it as expected + return param.map(this.paramToString, this); + case 'passthrough': + return param; + default: + throw new Error('Unknown collection format: ' + collectionFormat); + } + } + + /** + * Applies authentication headers to the request. + * @param {Object} request The request object created by a superagent() call. + * @param {Array.} authNames An array of authentication method names. + */ + applyAuthToRequest(request, authNames) { + authNames.forEach((authName) => { + var auth = this.authentications[authName]; + switch (auth.type) { + case 'basic': + if (auth.username || auth.password) { + request.auth(auth.username || '', auth.password || ''); + } + + break; + case 'bearer': + if (auth.accessToken) { + var localVarBearerToken = typeof auth.accessToken === 'function' + ? auth.accessToken() + : auth.accessToken + request.set({'Authorization': 'Bearer ' + localVarBearerToken}); + } + + break; + case 'apiKey': + if (auth.apiKey) { + var data = {}; + if (auth.apiKeyPrefix) { + data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; + } else { + data[auth.name] = auth.apiKey; + } + + if (auth['in'] === 'header') { + request.set(data); + } else { + request.query(data); + } + } + + break; + case 'oauth2': + if (auth.accessToken) { + request.set({'Authorization': 'Bearer ' + auth.accessToken}); + } + + break; + default: + throw new Error('Unknown authentication type: ' + auth.type); + } + }); + } + + /** + * Deserializes an HTTP response body into a value of the specified type. + * @param {Object} response A SuperAgent response object. + * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns A value of the specified type. + */ + deserialize(response, returnType) { + if (response == null || returnType == null || response.status == 204) { + return null; + } + + // Rely on SuperAgent for parsing response body. + // See http://visionmedia.github.io/superagent/#parsing-response-bodies + var data = response.body; + if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { + // SuperAgent does not always produce a body; use the unparsed response as a fallback + data = response.text; + } + + return ApiClient.convertToType(data, returnType); + } + + + /** + * Invokes the REST service using the supplied settings and parameters. + * @param {String} path The base URL to invoke. + * @param {String} httpMethod The HTTP method to use. + * @param {Object.} pathParams A map of path parameters and their values. + * @param {Object.} queryParams A map of query parameters and their values. + * @param {Object.} headerParams A map of header parameters and their values. + * @param {Object.} formParams A map of form parameters and their values. + * @param {Object} bodyParam The value to pass as the request body. + * @param {Array.} authNames An array of authentication type names. + * @param {Array.} contentTypes An array of request MIME types. + * @param {Array.} accepts An array of acceptable response MIME types. + * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the + * constructor for a complex type. + * @param {String} apiBasePath base path defined in the operation/path level to override the default one + * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. + */ + callApi(path, httpMethod, pathParams, + queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, + returnType, apiBasePath) { + + var url = this.buildUrl(path, pathParams, apiBasePath); + var request = superagent(httpMethod, url); + + if (this.plugins !== null) { + for (var index in this.plugins) { + if (this.plugins.hasOwnProperty(index)) { + request.use(this.plugins[index]) + } + } + } + + // apply authentications + this.applyAuthToRequest(request, authNames); + + // set query parameters + if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { + queryParams['_'] = new Date().getTime(); + } + + request.query(this.normalizeParams(queryParams)); + + // set header parameters + request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); + + // set requestAgent if it is set by user + if (this.requestAgent) { + request.agent(this.requestAgent); + } + + // set request timeout + request.timeout(this.timeout); + + var contentType = this.jsonPreferredMime(contentTypes); + if (contentType) { + // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) + if(contentType != 'multipart/form-data') { + request.type(contentType); + } + } + + if (contentType === 'application/x-www-form-urlencoded') { + request.send(querystring.stringify(this.normalizeParams(formParams))); + } else if (contentType == 'multipart/form-data') { + var _formParams = this.normalizeParams(formParams); + for (var key in _formParams) { + if (_formParams.hasOwnProperty(key)) { + let _formParamsValue = _formParams[key]; + if (this.isFileParam(_formParamsValue)) { + // file field + request.attach(key, _formParamsValue); + } else if (Array.isArray(_formParamsValue) && _formParamsValue.length + && this.isFileParam(_formParamsValue[0])) { + // multiple files + _formParamsValue.forEach(file => request.attach(key, file)); + } else { + request.field(key, _formParamsValue); + } + } + } + } else if (bodyParam !== null && bodyParam !== undefined) { + if (!request.header['Content-Type']) { + request.type('application/json'); + } + request.send(bodyParam); + } + + var accept = this.jsonPreferredMime(accepts); + if (accept) { + request.accept(accept); + } + + if (returnType === 'Blob') { + request.responseType('blob'); + } else if (returnType === 'String') { + request.responseType('text'); + } + + // Attach previously saved cookies, if enabled + if (this.enableCookies){ + if (typeof window === 'undefined') { + this.agent._attachCookies(request); + } + else { + request.withCredentials(); + } + } + + return new Promise((resolve, reject) => { + request.end((error, response) => { + if (error) { + var err = {}; + if (response) { + err.status = response.status; + err.statusText = response.statusText; + err.body = response.body; + err.response = response; + } + err.error = error; + + reject(err); + } else { + try { + var data = this.deserialize(response, returnType); + if (this.enableCookies && typeof window === 'undefined'){ + this.agent._saveCookies(response); + } + + resolve({data, response}); + } catch (err) { + reject(err); + } + } + }); + }); + + } + + /** + * Parses an ISO-8601 string representation or epoch representation of a date value. + * @param {String} str The date value as a string. + * @returns {Date} The parsed date object. + */ + static parseDate(str) { + if (isNaN(str)) { + return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); + } + return new Date(+str); + } + + /** + * Converts a value to the specified type. + * @param {(String|Object)} data The data to convert, as a string or object. + * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns An instance of the specified type or null or undefined if data is null or undefined. + */ + static convertToType(data, type) { + if (data === null || data === undefined) + return data + + switch (type) { + case 'Boolean': + return Boolean(data); + case 'Integer': + return parseInt(data, 10); + case 'Number': + return parseFloat(data); + case 'String': + return String(data); + case 'Date': + return ApiClient.parseDate(String(data)); + case 'Blob': + return data; + default: + if (type === Object) { + // generic object, return directly + return data; + } else if (typeof type.constructFromObject === 'function') { + // for model type like User and enum class + return type.constructFromObject(data); + } else if (Array.isArray(type)) { + // for array type like: ['String'] + var itemType = type[0]; + + return data.map((item) => { + return ApiClient.convertToType(item, itemType); + }); + } else if (typeof type === 'object') { + // for plain object type like: {'String': 'Integer'} + var keyType, valueType; + for (var k in type) { + if (type.hasOwnProperty(k)) { + keyType = k; + valueType = type[k]; + break; + } + } + + var result = {}; + for (var k in data) { + if (data.hasOwnProperty(k)) { + var key = ApiClient.convertToType(k, keyType); + var value = ApiClient.convertToType(data[k], valueType); + result[key] = value; + } + } + + return result; + } else { + // for unknown type, return the data directly + return data; + } + } + } + + /** + * Gets an array of host settings + * @returns An array of host settings + */ + hostSettings() { + return [ + { + 'url': "/api/v1", + 'description': "No description provided", + } + ]; + } + + getBasePathFromSettings(index, variables={}) { + var servers = this.hostSettings(); + + // check array index out of bound + if (index < 0 || index >= servers.length) { + throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); + } + + var server = servers[index]; + var url = server['url']; + + // go through variable and assign a value + for (var variable_name in server['variables']) { + if (variable_name in variables) { + let variable = server['variables'][variable_name]; + if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) { + url = url.replace("{" + variable_name + "}", variables[variable_name]); + } else { + throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); + } + } else { + // use default value + url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']) + } + } + return url; + } + + /** + * Constructs a new map or array model from REST data. + * @param data {Object|Array} The REST data. + * @param obj {Object|Array} The target object or array. + */ + static constructFromObject(data, obj, itemType) { + if (Array.isArray(data)) { + for (var i = 0; i < data.length; i++) { + if (data.hasOwnProperty(i)) + obj[i] = ApiClient.convertToType(data[i], itemType); + } + } else { + for (var k in data) { + if (data.hasOwnProperty(k)) + obj[k] = ApiClient.convertToType(data[k], itemType); + } + } + }; +} + +/** + * Enumeration of collection format separator strategies. + * @enum {String} + * @readonly + */ +ApiClient.CollectionFormatEnum = { + /** + * Comma-separated values. Value: csv + * @const + */ + CSV: ',', + + /** + * Space-separated values. Value: ssv + * @const + */ + SSV: ' ', + + /** + * Tab-separated values. Value: tsv + * @const + */ + TSV: '\t', + + /** + * Pipe(|)-separated values. Value: pipes + * @const + */ + PIPES: '|', + + /** + * Native array. Value: multi + * @const + */ + MULTI: 'multi' +}; + +/** +* The default API client implementation. +* @type {module:ApiClient} +*/ +ApiClient.instance = new ApiClient(); +export default ApiClient; diff --git a/ui/src/api/src/api/AccountApi.js b/ui/src/api/src/api/AccountApi.js new file mode 100644 index 00000000..61bf2515 --- /dev/null +++ b/ui/src/api/src/api/AccountApi.js @@ -0,0 +1,297 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import InviteRequest from '../model/InviteRequest'; +import LoginRequest from '../model/LoginRequest'; +import RegisterRequest from '../model/RegisterRequest'; +import RegisterResponse from '../model/RegisterResponse'; +import ResetPasswordRequest from '../model/ResetPasswordRequest'; +import ResetPasswordRequestRequest from '../model/ResetPasswordRequestRequest'; +import VerifyRequest from '../model/VerifyRequest'; +import VerifyResponse from '../model/VerifyResponse'; + +/** +* Account service. +* @module api/AccountApi +* @version 0.3.0 +*/ +export default class AccountApi { + + /** + * Constructs a new AccountApi. + * @alias module:api/AccountApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/InviteRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + inviteWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = null; + return this.apiClient.callApi( + '/invite', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/InviteRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + invite(opts) { + return this.inviteWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/LoginRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link String} and HTTP response + */ + loginWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = 'String'; + return this.apiClient.callApi( + '/login', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/LoginRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link String} + */ + login(opts) { + return this.loginWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/RegisterRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/RegisterResponse} and HTTP response + */ + registerWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = RegisterResponse; + return this.apiClient.callApi( + '/register', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/RegisterRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/RegisterResponse} + */ + register(opts) { + return this.registerWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/ResetPasswordRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + resetPasswordWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = null; + return this.apiClient.callApi( + '/resetPassword', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/ResetPasswordRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + resetPassword(opts) { + return this.resetPasswordWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/ResetPasswordRequestRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + resetPasswordRequestWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/zrok.v1+json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/resetPasswordRequest', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/ResetPasswordRequestRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + resetPasswordRequest(opts) { + return this.resetPasswordRequestWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/VerifyRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/VerifyResponse} and HTTP response + */ + verifyWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = VerifyResponse; + return this.apiClient.callApi( + '/verify', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/VerifyRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/VerifyResponse} + */ + verify(opts) { + return this.verifyWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/ui/src/api/src/api/AdminApi.js b/ui/src/api/src/api/AdminApi.js new file mode 100644 index 00000000..d6f3af0f --- /dev/null +++ b/ui/src/api/src/api/AdminApi.js @@ -0,0 +1,292 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import CreateFrontendRequest from '../model/CreateFrontendRequest'; +import CreateFrontendResponse from '../model/CreateFrontendResponse'; +import CreateIdentity201Response from '../model/CreateIdentity201Response'; +import CreateIdentityRequest from '../model/CreateIdentityRequest'; +import DeleteFrontendRequest from '../model/DeleteFrontendRequest'; +import InviteTokenGenerateRequest from '../model/InviteTokenGenerateRequest'; +import PublicFrontend from '../model/PublicFrontend'; +import UpdateFrontendRequest from '../model/UpdateFrontendRequest'; + +/** +* Admin service. +* @module api/AdminApi +* @version 0.3.0 +*/ +export default class AdminApi { + + /** + * Constructs a new AdminApi. + * @alias module:api/AdminApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/CreateFrontendRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateFrontendResponse} and HTTP response + */ + createFrontendWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = CreateFrontendResponse; + return this.apiClient.callApi( + '/frontend', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/CreateFrontendRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateFrontendResponse} + */ + createFrontend(opts) { + return this.createFrontendWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/CreateIdentityRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/CreateIdentity201Response} and HTTP response + */ + createIdentityWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = CreateIdentity201Response; + return this.apiClient.callApi( + '/identity', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/CreateIdentityRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/CreateIdentity201Response} + */ + createIdentity(opts) { + return this.createIdentityWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/DeleteFrontendRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + deleteFrontendWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/frontend', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/DeleteFrontendRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + deleteFrontend(opts) { + return this.deleteFrontendWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/InviteTokenGenerateRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + inviteTokenGenerateWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/invite/token/generate', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/InviteTokenGenerateRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + inviteTokenGenerate(opts) { + return this.inviteTokenGenerateWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + listFrontendsWithHttpInfo() { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = [PublicFrontend]; + return this.apiClient.callApi( + '/frontends', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + listFrontends() { + return this.listFrontendsWithHttpInfo() + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UpdateFrontendRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + updateFrontendWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/frontend', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UpdateFrontendRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + updateFrontend(opts) { + return this.updateFrontendWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/ui/src/api/src/api/EnvironmentApi.js b/ui/src/api/src/api/EnvironmentApi.js new file mode 100644 index 00000000..90175e35 --- /dev/null +++ b/ui/src/api/src/api/EnvironmentApi.js @@ -0,0 +1,124 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import DisableRequest from '../model/DisableRequest'; +import EnableRequest from '../model/EnableRequest'; +import EnableResponse from '../model/EnableResponse'; + +/** +* Environment service. +* @module api/EnvironmentApi +* @version 0.3.0 +*/ +export default class EnvironmentApi { + + /** + * Constructs a new EnvironmentApi. + * @alias module:api/EnvironmentApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/DisableRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + disableWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/disable', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/DisableRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + disable(opts) { + return this.disableWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/EnableRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnableResponse} and HTTP response + */ + enableWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = EnableResponse; + return this.apiClient.callApi( + '/enable', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/EnableRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnableResponse} + */ + enable(opts) { + return this.enableWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/ui/src/api/src/api/MetadataApi.js b/ui/src/api/src/api/MetadataApi.js new file mode 100644 index 00000000..8d214495 --- /dev/null +++ b/ui/src/api/src/api/MetadataApi.js @@ -0,0 +1,467 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import Configuration from '../model/Configuration'; +import Environment from '../model/Environment'; +import EnvironmentAndResources from '../model/EnvironmentAndResources'; +import Frontend from '../model/Frontend'; +import Metrics from '../model/Metrics'; +import Overview from '../model/Overview'; +import Share from '../model/Share'; + +/** +* Metadata service. +* @module api/MetadataApi +* @version 0.3.0 +*/ +export default class MetadataApi { + + /** + * Constructs a new MetadataApi. + * @alias module:api/MetadataApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Configuration} and HTTP response + */ + configurationWithHttpInfo() { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = Configuration; + return this.apiClient.callApi( + '/configuration', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Configuration} + */ + configuration() { + return this.configurationWithHttpInfo() + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + getAccountDetailWithHttpInfo() { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = [Environment]; + return this.apiClient.callApi( + '/detail/account', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + getAccountDetail() { + return this.getAccountDetailWithHttpInfo() + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {String} [duration] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Metrics} and HTTP response + */ + getAccountMetricsWithHttpInfo(opts) { + opts = opts || {}; + let postBody = null; + + let pathParams = { + }; + let queryParams = { + 'duration': opts['duration'] + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = Metrics; + return this.apiClient.callApi( + '/metrics/account', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {String} opts.duration + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Metrics} + */ + getAccountMetrics(opts) { + return this.getAccountMetricsWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {String} envZId + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/EnvironmentAndResources} and HTTP response + */ + getEnvironmentDetailWithHttpInfo(envZId) { + let postBody = null; + // verify the required parameter 'envZId' is set + if (envZId === undefined || envZId === null) { + throw new Error("Missing the required parameter 'envZId' when calling getEnvironmentDetail"); + } + + let pathParams = { + 'envZId': envZId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = EnvironmentAndResources; + return this.apiClient.callApi( + '/detail/environment/{envZId}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {String} envZId + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/EnvironmentAndResources} + */ + getEnvironmentDetail(envZId) { + return this.getEnvironmentDetailWithHttpInfo(envZId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {String} envId + * @param {Object} opts Optional parameters + * @param {String} [duration] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Metrics} and HTTP response + */ + getEnvironmentMetricsWithHttpInfo(envId, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'envId' is set + if (envId === undefined || envId === null) { + throw new Error("Missing the required parameter 'envId' when calling getEnvironmentMetrics"); + } + + let pathParams = { + 'envId': envId + }; + let queryParams = { + 'duration': opts['duration'] + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = Metrics; + return this.apiClient.callApi( + '/metrics/environment/{envId}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {String} envId + * @param {Object} opts Optional parameters + * @param {String} opts.duration + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Metrics} + */ + getEnvironmentMetrics(envId, opts) { + return this.getEnvironmentMetricsWithHttpInfo(envId, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Number} feId + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Frontend} and HTTP response + */ + getFrontendDetailWithHttpInfo(feId) { + let postBody = null; + // verify the required parameter 'feId' is set + if (feId === undefined || feId === null) { + throw new Error("Missing the required parameter 'feId' when calling getFrontendDetail"); + } + + let pathParams = { + 'feId': feId + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = Frontend; + return this.apiClient.callApi( + '/detail/frontend/{feId}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Number} feId + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Frontend} + */ + getFrontendDetail(feId) { + return this.getFrontendDetailWithHttpInfo(feId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {String} shrToken + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Share} and HTTP response + */ + getShareDetailWithHttpInfo(shrToken) { + let postBody = null; + // verify the required parameter 'shrToken' is set + if (shrToken === undefined || shrToken === null) { + throw new Error("Missing the required parameter 'shrToken' when calling getShareDetail"); + } + + let pathParams = { + 'shrToken': shrToken + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = Share; + return this.apiClient.callApi( + '/detail/share/{shrToken}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {String} shrToken + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Share} + */ + getShareDetail(shrToken) { + return this.getShareDetailWithHttpInfo(shrToken) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {String} shrToken + * @param {Object} opts Optional parameters + * @param {String} [duration] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Metrics} and HTTP response + */ + getShareMetricsWithHttpInfo(shrToken, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'shrToken' is set + if (shrToken === undefined || shrToken === null) { + throw new Error("Missing the required parameter 'shrToken' when calling getShareMetrics"); + } + + let pathParams = { + 'shrToken': shrToken + }; + let queryParams = { + 'duration': opts['duration'] + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = Metrics; + return this.apiClient.callApi( + '/metrics/share/{shrToken}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {String} shrToken + * @param {Object} opts Optional parameters + * @param {String} opts.duration + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Metrics} + */ + getShareMetrics(shrToken, opts) { + return this.getShareMetricsWithHttpInfo(shrToken, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Overview} and HTTP response + */ + overviewWithHttpInfo() { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = Overview; + return this.apiClient.callApi( + '/overview', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Overview} + */ + overview() { + return this.overviewWithHttpInfo() + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link String} and HTTP response + */ + versionWithHttpInfo() { + let postBody = null; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = ['application/zrok.v1+json']; + let returnType = 'String'; + return this.apiClient.callApi( + '/version', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link String} + */ + version() { + return this.versionWithHttpInfo() + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/ui/src/api/src/api/ShareApi.js b/ui/src/api/src/api/ShareApi.js new file mode 100644 index 00000000..b8705b69 --- /dev/null +++ b/ui/src/api/src/api/ShareApi.js @@ -0,0 +1,254 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import AccessRequest from '../model/AccessRequest'; +import AccessResponse from '../model/AccessResponse'; +import ShareRequest from '../model/ShareRequest'; +import ShareResponse from '../model/ShareResponse'; +import UnaccessRequest from '../model/UnaccessRequest'; +import UnshareRequest from '../model/UnshareRequest'; +import UpdateShareRequest from '../model/UpdateShareRequest'; + +/** +* Share service. +* @module api/ShareApi +* @version 0.3.0 +*/ +export default class ShareApi { + + /** + * Constructs a new ShareApi. + * @alias module:api/ShareApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/AccessRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AccessResponse} and HTTP response + */ + accessWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = AccessResponse; + return this.apiClient.callApi( + '/access', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/AccessRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AccessResponse} + */ + access(opts) { + return this.accessWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/ShareRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ShareResponse} and HTTP response + */ + shareWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = ShareResponse; + return this.apiClient.callApi( + '/share', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/ShareRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ShareResponse} + */ + share(opts) { + return this.shareWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UnaccessRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + unaccessWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/unaccess', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UnaccessRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + unaccess(opts) { + return this.unaccessWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UnshareRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + unshareWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = ['application/zrok.v1+json']; + let returnType = null; + return this.apiClient.callApi( + '/unshare', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UnshareRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + unshare(opts) { + return this.unshareWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UpdateShareRequest} [body] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + updateShareWithHttpInfo(opts) { + opts = opts || {}; + let postBody = opts['body']; + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['key']; + let contentTypes = ['application/zrok.v1+json']; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/share', 'PATCH', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {Object} opts Optional parameters + * @param {module:model/UpdateShareRequest} opts.body + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + updateShare(opts) { + return this.updateShareWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/ui/src/api/src/index.js b/ui/src/api/src/index.js new file mode 100644 index 00000000..32c9f3e5 --- /dev/null +++ b/ui/src/api/src/index.js @@ -0,0 +1,356 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from './ApiClient'; +import AccessRequest from './model/AccessRequest'; +import AccessResponse from './model/AccessResponse'; +import AuthUser from './model/AuthUser'; +import Configuration from './model/Configuration'; +import CreateFrontendRequest from './model/CreateFrontendRequest'; +import CreateFrontendResponse from './model/CreateFrontendResponse'; +import CreateIdentity201Response from './model/CreateIdentity201Response'; +import CreateIdentityRequest from './model/CreateIdentityRequest'; +import DeleteFrontendRequest from './model/DeleteFrontendRequest'; +import DisableRequest from './model/DisableRequest'; +import EnableRequest from './model/EnableRequest'; +import EnableResponse from './model/EnableResponse'; +import Environment from './model/Environment'; +import EnvironmentAndResources from './model/EnvironmentAndResources'; +import Frontend from './model/Frontend'; +import InviteRequest from './model/InviteRequest'; +import InviteTokenGenerateRequest from './model/InviteTokenGenerateRequest'; +import LoginRequest from './model/LoginRequest'; +import Metrics from './model/Metrics'; +import MetricsSample from './model/MetricsSample'; +import Overview from './model/Overview'; +import PasswordRequirements from './model/PasswordRequirements'; +import Principal from './model/Principal'; +import PublicFrontend from './model/PublicFrontend'; +import RegisterRequest from './model/RegisterRequest'; +import RegisterResponse from './model/RegisterResponse'; +import ResetPasswordRequest from './model/ResetPasswordRequest'; +import ResetPasswordRequestRequest from './model/ResetPasswordRequestRequest'; +import Share from './model/Share'; +import ShareRequest from './model/ShareRequest'; +import ShareResponse from './model/ShareResponse'; +import SparkDataSample from './model/SparkDataSample'; +import UnaccessRequest from './model/UnaccessRequest'; +import UnshareRequest from './model/UnshareRequest'; +import UpdateFrontendRequest from './model/UpdateFrontendRequest'; +import UpdateShareRequest from './model/UpdateShareRequest'; +import VerifyRequest from './model/VerifyRequest'; +import VerifyResponse from './model/VerifyResponse'; +import AccountApi from './api/AccountApi'; +import AdminApi from './api/AdminApi'; +import EnvironmentApi from './api/EnvironmentApi'; +import MetadataApi from './api/MetadataApi'; +import ShareApi from './api/ShareApi'; + + +/** +* zrok client access.
+* The index module provides access to constructors for all the classes which comprise the public API. +*

+* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: +*

+* var Zrok = require('index'); // See note below*.
+* var xxxSvc = new Zrok.XxxApi(); // Allocate the API class we're going to use.
+* var yyyModel = new Zrok.Yyy(); // Construct a model instance.
+* yyyModel.someProperty = 'someValue';
+* ...
+* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+* ...
+* 
+* *NOTE: For a top-level AMD script, use require(['index'], function(){...}) +* and put the application logic within the callback function. +*

+*

+* A non-AMD browser application (discouraged) might do something like this: +*

+* var xxxSvc = new Zrok.XxxApi(); // Allocate the API class we're going to use.
+* var yyy = new Zrok.Yyy(); // Construct a model instance.
+* yyyModel.someProperty = 'someValue';
+* ...
+* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+* ...
+* 
+*

+* @module index +* @version 0.3.0 +*/ +export { + /** + * The ApiClient constructor. + * @property {module:ApiClient} + */ + ApiClient, + + /** + * The AccessRequest model constructor. + * @property {module:model/AccessRequest} + */ + AccessRequest, + + /** + * The AccessResponse model constructor. + * @property {module:model/AccessResponse} + */ + AccessResponse, + + /** + * The AuthUser model constructor. + * @property {module:model/AuthUser} + */ + AuthUser, + + /** + * The Configuration model constructor. + * @property {module:model/Configuration} + */ + Configuration, + + /** + * The CreateFrontendRequest model constructor. + * @property {module:model/CreateFrontendRequest} + */ + CreateFrontendRequest, + + /** + * The CreateFrontendResponse model constructor. + * @property {module:model/CreateFrontendResponse} + */ + CreateFrontendResponse, + + /** + * The CreateIdentity201Response model constructor. + * @property {module:model/CreateIdentity201Response} + */ + CreateIdentity201Response, + + /** + * The CreateIdentityRequest model constructor. + * @property {module:model/CreateIdentityRequest} + */ + CreateIdentityRequest, + + /** + * The DeleteFrontendRequest model constructor. + * @property {module:model/DeleteFrontendRequest} + */ + DeleteFrontendRequest, + + /** + * The DisableRequest model constructor. + * @property {module:model/DisableRequest} + */ + DisableRequest, + + /** + * The EnableRequest model constructor. + * @property {module:model/EnableRequest} + */ + EnableRequest, + + /** + * The EnableResponse model constructor. + * @property {module:model/EnableResponse} + */ + EnableResponse, + + /** + * The Environment model constructor. + * @property {module:model/Environment} + */ + Environment, + + /** + * The EnvironmentAndResources model constructor. + * @property {module:model/EnvironmentAndResources} + */ + EnvironmentAndResources, + + /** + * The Frontend model constructor. + * @property {module:model/Frontend} + */ + Frontend, + + /** + * The InviteRequest model constructor. + * @property {module:model/InviteRequest} + */ + InviteRequest, + + /** + * The InviteTokenGenerateRequest model constructor. + * @property {module:model/InviteTokenGenerateRequest} + */ + InviteTokenGenerateRequest, + + /** + * The LoginRequest model constructor. + * @property {module:model/LoginRequest} + */ + LoginRequest, + + /** + * The Metrics model constructor. + * @property {module:model/Metrics} + */ + Metrics, + + /** + * The MetricsSample model constructor. + * @property {module:model/MetricsSample} + */ + MetricsSample, + + /** + * The Overview model constructor. + * @property {module:model/Overview} + */ + Overview, + + /** + * The PasswordRequirements model constructor. + * @property {module:model/PasswordRequirements} + */ + PasswordRequirements, + + /** + * The Principal model constructor. + * @property {module:model/Principal} + */ + Principal, + + /** + * The PublicFrontend model constructor. + * @property {module:model/PublicFrontend} + */ + PublicFrontend, + + /** + * The RegisterRequest model constructor. + * @property {module:model/RegisterRequest} + */ + RegisterRequest, + + /** + * The RegisterResponse model constructor. + * @property {module:model/RegisterResponse} + */ + RegisterResponse, + + /** + * The ResetPasswordRequest model constructor. + * @property {module:model/ResetPasswordRequest} + */ + ResetPasswordRequest, + + /** + * The ResetPasswordRequestRequest model constructor. + * @property {module:model/ResetPasswordRequestRequest} + */ + ResetPasswordRequestRequest, + + /** + * The Share model constructor. + * @property {module:model/Share} + */ + Share, + + /** + * The ShareRequest model constructor. + * @property {module:model/ShareRequest} + */ + ShareRequest, + + /** + * The ShareResponse model constructor. + * @property {module:model/ShareResponse} + */ + ShareResponse, + + /** + * The SparkDataSample model constructor. + * @property {module:model/SparkDataSample} + */ + SparkDataSample, + + /** + * The UnaccessRequest model constructor. + * @property {module:model/UnaccessRequest} + */ + UnaccessRequest, + + /** + * The UnshareRequest model constructor. + * @property {module:model/UnshareRequest} + */ + UnshareRequest, + + /** + * The UpdateFrontendRequest model constructor. + * @property {module:model/UpdateFrontendRequest} + */ + UpdateFrontendRequest, + + /** + * The UpdateShareRequest model constructor. + * @property {module:model/UpdateShareRequest} + */ + UpdateShareRequest, + + /** + * The VerifyRequest model constructor. + * @property {module:model/VerifyRequest} + */ + VerifyRequest, + + /** + * The VerifyResponse model constructor. + * @property {module:model/VerifyResponse} + */ + VerifyResponse, + + /** + * The AccountApi service constructor. + * @property {module:api/AccountApi} + */ + AccountApi, + + /** + * The AdminApi service constructor. + * @property {module:api/AdminApi} + */ + AdminApi, + + /** + * The EnvironmentApi service constructor. + * @property {module:api/EnvironmentApi} + */ + EnvironmentApi, + + /** + * The MetadataApi service constructor. + * @property {module:api/MetadataApi} + */ + MetadataApi, + + /** + * The ShareApi service constructor. + * @property {module:api/ShareApi} + */ + ShareApi +}; diff --git a/ui/src/api/src/model/AccessRequest.js b/ui/src/api/src/model/AccessRequest.js new file mode 100644 index 00000000..ae246a2b --- /dev/null +++ b/ui/src/api/src/model/AccessRequest.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The AccessRequest model module. + * @module model/AccessRequest + * @version 0.3.0 + */ +class AccessRequest { + /** + * Constructs a new AccessRequest. + * @alias module:model/AccessRequest + */ + constructor() { + + AccessRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a AccessRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/AccessRequest} obj Optional instance to populate. + * @return {module:model/AccessRequest} The populated AccessRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new AccessRequest(); + + if (data.hasOwnProperty('envZId')) { + obj['envZId'] = ApiClient.convertToType(data['envZId'], 'String'); + } + if (data.hasOwnProperty('shrToken')) { + obj['shrToken'] = ApiClient.convertToType(data['shrToken'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to AccessRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to AccessRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['envZId'] && !(typeof data['envZId'] === 'string' || data['envZId'] instanceof String)) { + throw new Error("Expected the field `envZId` to be a primitive type in the JSON string but got " + data['envZId']); + } + // ensure the json data is a string + if (data['shrToken'] && !(typeof data['shrToken'] === 'string' || data['shrToken'] instanceof String)) { + throw new Error("Expected the field `shrToken` to be a primitive type in the JSON string but got " + data['shrToken']); + } + + return true; + } + + +} + + + +/** + * @member {String} envZId + */ +AccessRequest.prototype['envZId'] = undefined; + +/** + * @member {String} shrToken + */ +AccessRequest.prototype['shrToken'] = undefined; + + + + + + +export default AccessRequest; + diff --git a/ui/src/api/src/model/AccessResponse.js b/ui/src/api/src/model/AccessResponse.js new file mode 100644 index 00000000..99417a40 --- /dev/null +++ b/ui/src/api/src/model/AccessResponse.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The AccessResponse model module. + * @module model/AccessResponse + * @version 0.3.0 + */ +class AccessResponse { + /** + * Constructs a new AccessResponse. + * @alias module:model/AccessResponse + */ + constructor() { + + AccessResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a AccessResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/AccessResponse} obj Optional instance to populate. + * @return {module:model/AccessResponse} The populated AccessResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new AccessResponse(); + + if (data.hasOwnProperty('frontendToken')) { + obj['frontendToken'] = ApiClient.convertToType(data['frontendToken'], 'String'); + } + if (data.hasOwnProperty('backendMode')) { + obj['backendMode'] = ApiClient.convertToType(data['backendMode'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to AccessResponse. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to AccessResponse. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['frontendToken'] && !(typeof data['frontendToken'] === 'string' || data['frontendToken'] instanceof String)) { + throw new Error("Expected the field `frontendToken` to be a primitive type in the JSON string but got " + data['frontendToken']); + } + // ensure the json data is a string + if (data['backendMode'] && !(typeof data['backendMode'] === 'string' || data['backendMode'] instanceof String)) { + throw new Error("Expected the field `backendMode` to be a primitive type in the JSON string but got " + data['backendMode']); + } + + return true; + } + + +} + + + +/** + * @member {String} frontendToken + */ +AccessResponse.prototype['frontendToken'] = undefined; + +/** + * @member {String} backendMode + */ +AccessResponse.prototype['backendMode'] = undefined; + + + + + + +export default AccessResponse; + diff --git a/ui/src/api/src/model/AuthUser.js b/ui/src/api/src/model/AuthUser.js new file mode 100644 index 00000000..e9badfea --- /dev/null +++ b/ui/src/api/src/model/AuthUser.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The AuthUser model module. + * @module model/AuthUser + * @version 0.3.0 + */ +class AuthUser { + /** + * Constructs a new AuthUser. + * @alias module:model/AuthUser + */ + constructor() { + + AuthUser.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a AuthUser from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/AuthUser} obj Optional instance to populate. + * @return {module:model/AuthUser} The populated AuthUser instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new AuthUser(); + + if (data.hasOwnProperty('username')) { + obj['username'] = ApiClient.convertToType(data['username'], 'String'); + } + if (data.hasOwnProperty('password')) { + obj['password'] = ApiClient.convertToType(data['password'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to AuthUser. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to AuthUser. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['username'] && !(typeof data['username'] === 'string' || data['username'] instanceof String)) { + throw new Error("Expected the field `username` to be a primitive type in the JSON string but got " + data['username']); + } + // ensure the json data is a string + if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) { + throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']); + } + + return true; + } + + +} + + + +/** + * @member {String} username + */ +AuthUser.prototype['username'] = undefined; + +/** + * @member {String} password + */ +AuthUser.prototype['password'] = undefined; + + + + + + +export default AuthUser; + diff --git a/ui/src/api/src/model/Configuration.js b/ui/src/api/src/model/Configuration.js new file mode 100644 index 00000000..372b6bda --- /dev/null +++ b/ui/src/api/src/model/Configuration.js @@ -0,0 +1,140 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import PasswordRequirements from './PasswordRequirements'; + +/** + * The Configuration model module. + * @module model/Configuration + * @version 0.3.0 + */ +class Configuration { + /** + * Constructs a new Configuration. + * @alias module:model/Configuration + */ + constructor() { + + Configuration.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Configuration from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Configuration} obj Optional instance to populate. + * @return {module:model/Configuration} The populated Configuration instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Configuration(); + + if (data.hasOwnProperty('version')) { + obj['version'] = ApiClient.convertToType(data['version'], 'String'); + } + if (data.hasOwnProperty('touLink')) { + obj['touLink'] = ApiClient.convertToType(data['touLink'], 'String'); + } + if (data.hasOwnProperty('invitesOpen')) { + obj['invitesOpen'] = ApiClient.convertToType(data['invitesOpen'], 'Boolean'); + } + if (data.hasOwnProperty('requiresInviteToken')) { + obj['requiresInviteToken'] = ApiClient.convertToType(data['requiresInviteToken'], 'Boolean'); + } + if (data.hasOwnProperty('inviteTokenContact')) { + obj['inviteTokenContact'] = ApiClient.convertToType(data['inviteTokenContact'], 'String'); + } + if (data.hasOwnProperty('passwordRequirements')) { + obj['passwordRequirements'] = PasswordRequirements.constructFromObject(data['passwordRequirements']); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Configuration. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Configuration. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) { + throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']); + } + // ensure the json data is a string + if (data['touLink'] && !(typeof data['touLink'] === 'string' || data['touLink'] instanceof String)) { + throw new Error("Expected the field `touLink` to be a primitive type in the JSON string but got " + data['touLink']); + } + // ensure the json data is a string + if (data['inviteTokenContact'] && !(typeof data['inviteTokenContact'] === 'string' || data['inviteTokenContact'] instanceof String)) { + throw new Error("Expected the field `inviteTokenContact` to be a primitive type in the JSON string but got " + data['inviteTokenContact']); + } + // validate the optional field `passwordRequirements` + if (data['passwordRequirements']) { // data not null + PasswordRequirements.validateJSON(data['passwordRequirements']); + } + + return true; + } + + +} + + + +/** + * @member {String} version + */ +Configuration.prototype['version'] = undefined; + +/** + * @member {String} touLink + */ +Configuration.prototype['touLink'] = undefined; + +/** + * @member {Boolean} invitesOpen + */ +Configuration.prototype['invitesOpen'] = undefined; + +/** + * @member {Boolean} requiresInviteToken + */ +Configuration.prototype['requiresInviteToken'] = undefined; + +/** + * @member {String} inviteTokenContact + */ +Configuration.prototype['inviteTokenContact'] = undefined; + +/** + * @member {module:model/PasswordRequirements} passwordRequirements + */ +Configuration.prototype['passwordRequirements'] = undefined; + + + + + + +export default Configuration; + diff --git a/ui/src/api/src/model/CreateFrontendRequest.js b/ui/src/api/src/model/CreateFrontendRequest.js new file mode 100644 index 00000000..1eba5db8 --- /dev/null +++ b/ui/src/api/src/model/CreateFrontendRequest.js @@ -0,0 +1,111 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The CreateFrontendRequest model module. + * @module model/CreateFrontendRequest + * @version 0.3.0 + */ +class CreateFrontendRequest { + /** + * Constructs a new CreateFrontendRequest. + * @alias module:model/CreateFrontendRequest + */ + constructor() { + + CreateFrontendRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a CreateFrontendRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CreateFrontendRequest} obj Optional instance to populate. + * @return {module:model/CreateFrontendRequest} The populated CreateFrontendRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new CreateFrontendRequest(); + + if (data.hasOwnProperty('zId')) { + obj['zId'] = ApiClient.convertToType(data['zId'], 'String'); + } + if (data.hasOwnProperty('url_template')) { + obj['url_template'] = ApiClient.convertToType(data['url_template'], 'String'); + } + if (data.hasOwnProperty('public_name')) { + obj['public_name'] = ApiClient.convertToType(data['public_name'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to CreateFrontendRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to CreateFrontendRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['zId'] && !(typeof data['zId'] === 'string' || data['zId'] instanceof String)) { + throw new Error("Expected the field `zId` to be a primitive type in the JSON string but got " + data['zId']); + } + // ensure the json data is a string + if (data['url_template'] && !(typeof data['url_template'] === 'string' || data['url_template'] instanceof String)) { + throw new Error("Expected the field `url_template` to be a primitive type in the JSON string but got " + data['url_template']); + } + // ensure the json data is a string + if (data['public_name'] && !(typeof data['public_name'] === 'string' || data['public_name'] instanceof String)) { + throw new Error("Expected the field `public_name` to be a primitive type in the JSON string but got " + data['public_name']); + } + + return true; + } + + +} + + + +/** + * @member {String} zId + */ +CreateFrontendRequest.prototype['zId'] = undefined; + +/** + * @member {String} url_template + */ +CreateFrontendRequest.prototype['url_template'] = undefined; + +/** + * @member {String} public_name + */ +CreateFrontendRequest.prototype['public_name'] = undefined; + + + + + + +export default CreateFrontendRequest; + diff --git a/ui/src/api/src/model/CreateFrontendResponse.js b/ui/src/api/src/model/CreateFrontendResponse.js new file mode 100644 index 00000000..e578224e --- /dev/null +++ b/ui/src/api/src/model/CreateFrontendResponse.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The CreateFrontendResponse model module. + * @module model/CreateFrontendResponse + * @version 0.3.0 + */ +class CreateFrontendResponse { + /** + * Constructs a new CreateFrontendResponse. + * @alias module:model/CreateFrontendResponse + */ + constructor() { + + CreateFrontendResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a CreateFrontendResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CreateFrontendResponse} obj Optional instance to populate. + * @return {module:model/CreateFrontendResponse} The populated CreateFrontendResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new CreateFrontendResponse(); + + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to CreateFrontendResponse. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to CreateFrontendResponse. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + + return true; + } + + +} + + + +/** + * @member {String} token + */ +CreateFrontendResponse.prototype['token'] = undefined; + + + + + + +export default CreateFrontendResponse; + diff --git a/ui/src/api/src/model/CreateIdentity201Response.js b/ui/src/api/src/model/CreateIdentity201Response.js new file mode 100644 index 00000000..533a6903 --- /dev/null +++ b/ui/src/api/src/model/CreateIdentity201Response.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The CreateIdentity201Response model module. + * @module model/CreateIdentity201Response + * @version 0.3.0 + */ +class CreateIdentity201Response { + /** + * Constructs a new CreateIdentity201Response. + * @alias module:model/CreateIdentity201Response + */ + constructor() { + + CreateIdentity201Response.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a CreateIdentity201Response from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CreateIdentity201Response} obj Optional instance to populate. + * @return {module:model/CreateIdentity201Response} The populated CreateIdentity201Response instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new CreateIdentity201Response(); + + if (data.hasOwnProperty('identity')) { + obj['identity'] = ApiClient.convertToType(data['identity'], 'String'); + } + if (data.hasOwnProperty('cfg')) { + obj['cfg'] = ApiClient.convertToType(data['cfg'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to CreateIdentity201Response. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to CreateIdentity201Response. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['identity'] && !(typeof data['identity'] === 'string' || data['identity'] instanceof String)) { + throw new Error("Expected the field `identity` to be a primitive type in the JSON string but got " + data['identity']); + } + // ensure the json data is a string + if (data['cfg'] && !(typeof data['cfg'] === 'string' || data['cfg'] instanceof String)) { + throw new Error("Expected the field `cfg` to be a primitive type in the JSON string but got " + data['cfg']); + } + + return true; + } + + +} + + + +/** + * @member {String} identity + */ +CreateIdentity201Response.prototype['identity'] = undefined; + +/** + * @member {String} cfg + */ +CreateIdentity201Response.prototype['cfg'] = undefined; + + + + + + +export default CreateIdentity201Response; + diff --git a/ui/src/api/src/model/CreateIdentityRequest.js b/ui/src/api/src/model/CreateIdentityRequest.js new file mode 100644 index 00000000..5e3bb3a3 --- /dev/null +++ b/ui/src/api/src/model/CreateIdentityRequest.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The CreateIdentityRequest model module. + * @module model/CreateIdentityRequest + * @version 0.3.0 + */ +class CreateIdentityRequest { + /** + * Constructs a new CreateIdentityRequest. + * @alias module:model/CreateIdentityRequest + */ + constructor() { + + CreateIdentityRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a CreateIdentityRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CreateIdentityRequest} obj Optional instance to populate. + * @return {module:model/CreateIdentityRequest} The populated CreateIdentityRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new CreateIdentityRequest(); + + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to CreateIdentityRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to CreateIdentityRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + + return true; + } + + +} + + + +/** + * @member {String} name + */ +CreateIdentityRequest.prototype['name'] = undefined; + + + + + + +export default CreateIdentityRequest; + diff --git a/ui/src/api/src/model/DeleteFrontendRequest.js b/ui/src/api/src/model/DeleteFrontendRequest.js new file mode 100644 index 00000000..582d8195 --- /dev/null +++ b/ui/src/api/src/model/DeleteFrontendRequest.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The DeleteFrontendRequest model module. + * @module model/DeleteFrontendRequest + * @version 0.3.0 + */ +class DeleteFrontendRequest { + /** + * Constructs a new DeleteFrontendRequest. + * @alias module:model/DeleteFrontendRequest + */ + constructor() { + + DeleteFrontendRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a DeleteFrontendRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DeleteFrontendRequest} obj Optional instance to populate. + * @return {module:model/DeleteFrontendRequest} The populated DeleteFrontendRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new DeleteFrontendRequest(); + + if (data.hasOwnProperty('frontendToken')) { + obj['frontendToken'] = ApiClient.convertToType(data['frontendToken'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to DeleteFrontendRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to DeleteFrontendRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['frontendToken'] && !(typeof data['frontendToken'] === 'string' || data['frontendToken'] instanceof String)) { + throw new Error("Expected the field `frontendToken` to be a primitive type in the JSON string but got " + data['frontendToken']); + } + + return true; + } + + +} + + + +/** + * @member {String} frontendToken + */ +DeleteFrontendRequest.prototype['frontendToken'] = undefined; + + + + + + +export default DeleteFrontendRequest; + diff --git a/ui/src/api/src/model/DisableRequest.js b/ui/src/api/src/model/DisableRequest.js new file mode 100644 index 00000000..da634b88 --- /dev/null +++ b/ui/src/api/src/model/DisableRequest.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The DisableRequest model module. + * @module model/DisableRequest + * @version 0.3.0 + */ +class DisableRequest { + /** + * Constructs a new DisableRequest. + * @alias module:model/DisableRequest + */ + constructor() { + + DisableRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a DisableRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/DisableRequest} obj Optional instance to populate. + * @return {module:model/DisableRequest} The populated DisableRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new DisableRequest(); + + if (data.hasOwnProperty('identity')) { + obj['identity'] = ApiClient.convertToType(data['identity'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to DisableRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to DisableRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['identity'] && !(typeof data['identity'] === 'string' || data['identity'] instanceof String)) { + throw new Error("Expected the field `identity` to be a primitive type in the JSON string but got " + data['identity']); + } + + return true; + } + + +} + + + +/** + * @member {String} identity + */ +DisableRequest.prototype['identity'] = undefined; + + + + + + +export default DisableRequest; + diff --git a/ui/src/api/src/model/EnableRequest.js b/ui/src/api/src/model/EnableRequest.js new file mode 100644 index 00000000..7be51c4a --- /dev/null +++ b/ui/src/api/src/model/EnableRequest.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The EnableRequest model module. + * @module model/EnableRequest + * @version 0.3.0 + */ +class EnableRequest { + /** + * Constructs a new EnableRequest. + * @alias module:model/EnableRequest + */ + constructor() { + + EnableRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a EnableRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/EnableRequest} obj Optional instance to populate. + * @return {module:model/EnableRequest} The populated EnableRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new EnableRequest(); + + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('host')) { + obj['host'] = ApiClient.convertToType(data['host'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to EnableRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to EnableRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // ensure the json data is a string + if (data['host'] && !(typeof data['host'] === 'string' || data['host'] instanceof String)) { + throw new Error("Expected the field `host` to be a primitive type in the JSON string but got " + data['host']); + } + + return true; + } + + +} + + + +/** + * @member {String} description + */ +EnableRequest.prototype['description'] = undefined; + +/** + * @member {String} host + */ +EnableRequest.prototype['host'] = undefined; + + + + + + +export default EnableRequest; + diff --git a/ui/src/api/src/model/EnableResponse.js b/ui/src/api/src/model/EnableResponse.js new file mode 100644 index 00000000..e641284d --- /dev/null +++ b/ui/src/api/src/model/EnableResponse.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The EnableResponse model module. + * @module model/EnableResponse + * @version 0.3.0 + */ +class EnableResponse { + /** + * Constructs a new EnableResponse. + * @alias module:model/EnableResponse + */ + constructor() { + + EnableResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a EnableResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/EnableResponse} obj Optional instance to populate. + * @return {module:model/EnableResponse} The populated EnableResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new EnableResponse(); + + if (data.hasOwnProperty('identity')) { + obj['identity'] = ApiClient.convertToType(data['identity'], 'String'); + } + if (data.hasOwnProperty('cfg')) { + obj['cfg'] = ApiClient.convertToType(data['cfg'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to EnableResponse. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to EnableResponse. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['identity'] && !(typeof data['identity'] === 'string' || data['identity'] instanceof String)) { + throw new Error("Expected the field `identity` to be a primitive type in the JSON string but got " + data['identity']); + } + // ensure the json data is a string + if (data['cfg'] && !(typeof data['cfg'] === 'string' || data['cfg'] instanceof String)) { + throw new Error("Expected the field `cfg` to be a primitive type in the JSON string but got " + data['cfg']); + } + + return true; + } + + +} + + + +/** + * @member {String} identity + */ +EnableResponse.prototype['identity'] = undefined; + +/** + * @member {String} cfg + */ +EnableResponse.prototype['cfg'] = undefined; + + + + + + +export default EnableResponse; + diff --git a/ui/src/api/src/model/Environment.js b/ui/src/api/src/model/Environment.js new file mode 100644 index 00000000..a2e800a4 --- /dev/null +++ b/ui/src/api/src/model/Environment.js @@ -0,0 +1,166 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import SparkDataSample from './SparkDataSample'; + +/** + * The Environment model module. + * @module model/Environment + * @version 0.3.0 + */ +class Environment { + /** + * Constructs a new Environment. + * @alias module:model/Environment + */ + constructor() { + + Environment.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Environment from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Environment} obj Optional instance to populate. + * @return {module:model/Environment} The populated Environment instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Environment(); + + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('host')) { + obj['host'] = ApiClient.convertToType(data['host'], 'String'); + } + if (data.hasOwnProperty('address')) { + obj['address'] = ApiClient.convertToType(data['address'], 'String'); + } + if (data.hasOwnProperty('zId')) { + obj['zId'] = ApiClient.convertToType(data['zId'], 'String'); + } + if (data.hasOwnProperty('activity')) { + obj['activity'] = ApiClient.convertToType(data['activity'], [SparkDataSample]); + } + if (data.hasOwnProperty('limited')) { + obj['limited'] = ApiClient.convertToType(data['limited'], 'Boolean'); + } + if (data.hasOwnProperty('createdAt')) { + obj['createdAt'] = ApiClient.convertToType(data['createdAt'], 'Number'); + } + if (data.hasOwnProperty('updatedAt')) { + obj['updatedAt'] = ApiClient.convertToType(data['updatedAt'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Environment. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Environment. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) { + throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']); + } + // ensure the json data is a string + if (data['host'] && !(typeof data['host'] === 'string' || data['host'] instanceof String)) { + throw new Error("Expected the field `host` to be a primitive type in the JSON string but got " + data['host']); + } + // ensure the json data is a string + if (data['address'] && !(typeof data['address'] === 'string' || data['address'] instanceof String)) { + throw new Error("Expected the field `address` to be a primitive type in the JSON string but got " + data['address']); + } + // ensure the json data is a string + if (data['zId'] && !(typeof data['zId'] === 'string' || data['zId'] instanceof String)) { + throw new Error("Expected the field `zId` to be a primitive type in the JSON string but got " + data['zId']); + } + if (data['activity']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['activity'])) { + throw new Error("Expected the field `activity` to be an array in the JSON data but got " + data['activity']); + } + // validate the optional field `activity` (array) + for (const item of data['activity']) { + SparkDataSample.validateJSON(item); + }; + } + + return true; + } + + +} + + + +/** + * @member {String} description + */ +Environment.prototype['description'] = undefined; + +/** + * @member {String} host + */ +Environment.prototype['host'] = undefined; + +/** + * @member {String} address + */ +Environment.prototype['address'] = undefined; + +/** + * @member {String} zId + */ +Environment.prototype['zId'] = undefined; + +/** + * @member {Array.} activity + */ +Environment.prototype['activity'] = undefined; + +/** + * @member {Boolean} limited + */ +Environment.prototype['limited'] = undefined; + +/** + * @member {Number} createdAt + */ +Environment.prototype['createdAt'] = undefined; + +/** + * @member {Number} updatedAt + */ +Environment.prototype['updatedAt'] = undefined; + + + + + + +export default Environment; + diff --git a/ui/src/api/src/model/EnvironmentAndResources.js b/ui/src/api/src/model/EnvironmentAndResources.js new file mode 100644 index 00000000..8de1326e --- /dev/null +++ b/ui/src/api/src/model/EnvironmentAndResources.js @@ -0,0 +1,126 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import Environment from './Environment'; +import Frontend from './Frontend'; +import Share from './Share'; + +/** + * The EnvironmentAndResources model module. + * @module model/EnvironmentAndResources + * @version 0.3.0 + */ +class EnvironmentAndResources { + /** + * Constructs a new EnvironmentAndResources. + * @alias module:model/EnvironmentAndResources + */ + constructor() { + + EnvironmentAndResources.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a EnvironmentAndResources from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/EnvironmentAndResources} obj Optional instance to populate. + * @return {module:model/EnvironmentAndResources} The populated EnvironmentAndResources instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new EnvironmentAndResources(); + + if (data.hasOwnProperty('environment')) { + obj['environment'] = Environment.constructFromObject(data['environment']); + } + if (data.hasOwnProperty('frontends')) { + obj['frontends'] = ApiClient.convertToType(data['frontends'], [Frontend]); + } + if (data.hasOwnProperty('shares')) { + obj['shares'] = ApiClient.convertToType(data['shares'], [Share]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to EnvironmentAndResources. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to EnvironmentAndResources. + */ + static validateJSON(data) { + // validate the optional field `environment` + if (data['environment']) { // data not null + Environment.validateJSON(data['environment']); + } + if (data['frontends']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['frontends'])) { + throw new Error("Expected the field `frontends` to be an array in the JSON data but got " + data['frontends']); + } + // validate the optional field `frontends` (array) + for (const item of data['frontends']) { + Frontend.validateJSON(item); + }; + } + if (data['shares']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['shares'])) { + throw new Error("Expected the field `shares` to be an array in the JSON data but got " + data['shares']); + } + // validate the optional field `shares` (array) + for (const item of data['shares']) { + Share.validateJSON(item); + }; + } + + return true; + } + + +} + + + +/** + * @member {module:model/Environment} environment + */ +EnvironmentAndResources.prototype['environment'] = undefined; + +/** + * @member {Array.} frontends + */ +EnvironmentAndResources.prototype['frontends'] = undefined; + +/** + * @member {Array.} shares + */ +EnvironmentAndResources.prototype['shares'] = undefined; + + + + + + +export default EnvironmentAndResources; + diff --git a/ui/src/api/src/model/Frontend.js b/ui/src/api/src/model/Frontend.js new file mode 100644 index 00000000..76325443 --- /dev/null +++ b/ui/src/api/src/model/Frontend.js @@ -0,0 +1,123 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Frontend model module. + * @module model/Frontend + * @version 0.3.0 + */ +class Frontend { + /** + * Constructs a new Frontend. + * @alias module:model/Frontend + */ + constructor() { + + Frontend.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Frontend from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Frontend} obj Optional instance to populate. + * @return {module:model/Frontend} The populated Frontend instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Frontend(); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + } + if (data.hasOwnProperty('shrToken')) { + obj['shrToken'] = ApiClient.convertToType(data['shrToken'], 'String'); + } + if (data.hasOwnProperty('zId')) { + obj['zId'] = ApiClient.convertToType(data['zId'], 'String'); + } + if (data.hasOwnProperty('createdAt')) { + obj['createdAt'] = ApiClient.convertToType(data['createdAt'], 'Number'); + } + if (data.hasOwnProperty('updatedAt')) { + obj['updatedAt'] = ApiClient.convertToType(data['updatedAt'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Frontend. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Frontend. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['shrToken'] && !(typeof data['shrToken'] === 'string' || data['shrToken'] instanceof String)) { + throw new Error("Expected the field `shrToken` to be a primitive type in the JSON string but got " + data['shrToken']); + } + // ensure the json data is a string + if (data['zId'] && !(typeof data['zId'] === 'string' || data['zId'] instanceof String)) { + throw new Error("Expected the field `zId` to be a primitive type in the JSON string but got " + data['zId']); + } + + return true; + } + + +} + + + +/** + * @member {Number} id + */ +Frontend.prototype['id'] = undefined; + +/** + * @member {String} shrToken + */ +Frontend.prototype['shrToken'] = undefined; + +/** + * @member {String} zId + */ +Frontend.prototype['zId'] = undefined; + +/** + * @member {Number} createdAt + */ +Frontend.prototype['createdAt'] = undefined; + +/** + * @member {Number} updatedAt + */ +Frontend.prototype['updatedAt'] = undefined; + + + + + + +export default Frontend; + diff --git a/ui/src/api/src/model/InviteRequest.js b/ui/src/api/src/model/InviteRequest.js new file mode 100644 index 00000000..501f0847 --- /dev/null +++ b/ui/src/api/src/model/InviteRequest.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The InviteRequest model module. + * @module model/InviteRequest + * @version 0.3.0 + */ +class InviteRequest { + /** + * Constructs a new InviteRequest. + * @alias module:model/InviteRequest + */ + constructor() { + + InviteRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a InviteRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/InviteRequest} obj Optional instance to populate. + * @return {module:model/InviteRequest} The populated InviteRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new InviteRequest(); + + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to InviteRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to InviteRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { + throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); + } + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + + return true; + } + + +} + + + +/** + * @member {String} email + */ +InviteRequest.prototype['email'] = undefined; + +/** + * @member {String} token + */ +InviteRequest.prototype['token'] = undefined; + + + + + + +export default InviteRequest; + diff --git a/ui/src/api/src/model/InviteTokenGenerateRequest.js b/ui/src/api/src/model/InviteTokenGenerateRequest.js new file mode 100644 index 00000000..47a418a3 --- /dev/null +++ b/ui/src/api/src/model/InviteTokenGenerateRequest.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The InviteTokenGenerateRequest model module. + * @module model/InviteTokenGenerateRequest + * @version 0.3.0 + */ +class InviteTokenGenerateRequest { + /** + * Constructs a new InviteTokenGenerateRequest. + * @alias module:model/InviteTokenGenerateRequest + */ + constructor() { + + InviteTokenGenerateRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a InviteTokenGenerateRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/InviteTokenGenerateRequest} obj Optional instance to populate. + * @return {module:model/InviteTokenGenerateRequest} The populated InviteTokenGenerateRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new InviteTokenGenerateRequest(); + + if (data.hasOwnProperty('tokens')) { + obj['tokens'] = ApiClient.convertToType(data['tokens'], ['String']); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to InviteTokenGenerateRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to InviteTokenGenerateRequest. + */ + static validateJSON(data) { + // ensure the json data is an array + if (!Array.isArray(data['tokens'])) { + throw new Error("Expected the field `tokens` to be an array in the JSON data but got " + data['tokens']); + } + + return true; + } + + +} + + + +/** + * @member {Array.} tokens + */ +InviteTokenGenerateRequest.prototype['tokens'] = undefined; + + + + + + +export default InviteTokenGenerateRequest; + diff --git a/ui/src/api/src/model/LoginRequest.js b/ui/src/api/src/model/LoginRequest.js new file mode 100644 index 00000000..82b2e4c5 --- /dev/null +++ b/ui/src/api/src/model/LoginRequest.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The LoginRequest model module. + * @module model/LoginRequest + * @version 0.3.0 + */ +class LoginRequest { + /** + * Constructs a new LoginRequest. + * @alias module:model/LoginRequest + */ + constructor() { + + LoginRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a LoginRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/LoginRequest} obj Optional instance to populate. + * @return {module:model/LoginRequest} The populated LoginRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new LoginRequest(); + + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + if (data.hasOwnProperty('password')) { + obj['password'] = ApiClient.convertToType(data['password'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to LoginRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to LoginRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { + throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); + } + // ensure the json data is a string + if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) { + throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']); + } + + return true; + } + + +} + + + +/** + * @member {String} email + */ +LoginRequest.prototype['email'] = undefined; + +/** + * @member {String} password + */ +LoginRequest.prototype['password'] = undefined; + + + + + + +export default LoginRequest; + diff --git a/ui/src/api/src/model/Metrics.js b/ui/src/api/src/model/Metrics.js new file mode 100644 index 00000000..e551b3c0 --- /dev/null +++ b/ui/src/api/src/model/Metrics.js @@ -0,0 +1,126 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import MetricsSample from './MetricsSample'; + +/** + * The Metrics model module. + * @module model/Metrics + * @version 0.3.0 + */ +class Metrics { + /** + * Constructs a new Metrics. + * @alias module:model/Metrics + */ + constructor() { + + Metrics.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Metrics from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Metrics} obj Optional instance to populate. + * @return {module:model/Metrics} The populated Metrics instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Metrics(); + + if (data.hasOwnProperty('scope')) { + obj['scope'] = ApiClient.convertToType(data['scope'], 'String'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('period')) { + obj['period'] = ApiClient.convertToType(data['period'], 'Number'); + } + if (data.hasOwnProperty('samples')) { + obj['samples'] = ApiClient.convertToType(data['samples'], [MetricsSample]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Metrics. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Metrics. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['scope'] && !(typeof data['scope'] === 'string' || data['scope'] instanceof String)) { + throw new Error("Expected the field `scope` to be a primitive type in the JSON string but got " + data['scope']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + if (data['samples']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['samples'])) { + throw new Error("Expected the field `samples` to be an array in the JSON data but got " + data['samples']); + } + // validate the optional field `samples` (array) + for (const item of data['samples']) { + MetricsSample.validateJSON(item); + }; + } + + return true; + } + + +} + + + +/** + * @member {String} scope + */ +Metrics.prototype['scope'] = undefined; + +/** + * @member {String} id + */ +Metrics.prototype['id'] = undefined; + +/** + * @member {Number} period + */ +Metrics.prototype['period'] = undefined; + +/** + * @member {Array.} samples + */ +Metrics.prototype['samples'] = undefined; + + + + + + +export default Metrics; + diff --git a/ui/src/api/src/model/MetricsSample.js b/ui/src/api/src/model/MetricsSample.js new file mode 100644 index 00000000..c8cbccf5 --- /dev/null +++ b/ui/src/api/src/model/MetricsSample.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The MetricsSample model module. + * @module model/MetricsSample + * @version 0.3.0 + */ +class MetricsSample { + /** + * Constructs a new MetricsSample. + * @alias module:model/MetricsSample + */ + constructor() { + + MetricsSample.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a MetricsSample from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/MetricsSample} obj Optional instance to populate. + * @return {module:model/MetricsSample} The populated MetricsSample instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new MetricsSample(); + + if (data.hasOwnProperty('rx')) { + obj['rx'] = ApiClient.convertToType(data['rx'], 'Number'); + } + if (data.hasOwnProperty('tx')) { + obj['tx'] = ApiClient.convertToType(data['tx'], 'Number'); + } + if (data.hasOwnProperty('timestamp')) { + obj['timestamp'] = ApiClient.convertToType(data['timestamp'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to MetricsSample. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to MetricsSample. + */ + static validateJSON(data) { + + return true; + } + + +} + + + +/** + * @member {Number} rx + */ +MetricsSample.prototype['rx'] = undefined; + +/** + * @member {Number} tx + */ +MetricsSample.prototype['tx'] = undefined; + +/** + * @member {Number} timestamp + */ +MetricsSample.prototype['timestamp'] = undefined; + + + + + + +export default MetricsSample; + diff --git a/ui/src/api/src/model/Overview.js b/ui/src/api/src/model/Overview.js new file mode 100644 index 00000000..aa8faad1 --- /dev/null +++ b/ui/src/api/src/model/Overview.js @@ -0,0 +1,102 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import EnvironmentAndResources from './EnvironmentAndResources'; + +/** + * The Overview model module. + * @module model/Overview + * @version 0.3.0 + */ +class Overview { + /** + * Constructs a new Overview. + * @alias module:model/Overview + */ + constructor() { + + Overview.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Overview from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Overview} obj Optional instance to populate. + * @return {module:model/Overview} The populated Overview instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Overview(); + + if (data.hasOwnProperty('accountLimited')) { + obj['accountLimited'] = ApiClient.convertToType(data['accountLimited'], 'Boolean'); + } + if (data.hasOwnProperty('environments')) { + obj['environments'] = ApiClient.convertToType(data['environments'], [EnvironmentAndResources]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Overview. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Overview. + */ + static validateJSON(data) { + if (data['environments']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['environments'])) { + throw new Error("Expected the field `environments` to be an array in the JSON data but got " + data['environments']); + } + // validate the optional field `environments` (array) + for (const item of data['environments']) { + EnvironmentAndResources.validateJSON(item); + }; + } + + return true; + } + + +} + + + +/** + * @member {Boolean} accountLimited + */ +Overview.prototype['accountLimited'] = undefined; + +/** + * @member {Array.} environments + */ +Overview.prototype['environments'] = undefined; + + + + + + +export default Overview; + diff --git a/ui/src/api/src/model/PasswordRequirements.js b/ui/src/api/src/model/PasswordRequirements.js new file mode 100644 index 00000000..34c9baed --- /dev/null +++ b/ui/src/api/src/model/PasswordRequirements.js @@ -0,0 +1,119 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The PasswordRequirements model module. + * @module model/PasswordRequirements + * @version 0.3.0 + */ +class PasswordRequirements { + /** + * Constructs a new PasswordRequirements. + * @alias module:model/PasswordRequirements + */ + constructor() { + + PasswordRequirements.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a PasswordRequirements from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/PasswordRequirements} obj Optional instance to populate. + * @return {module:model/PasswordRequirements} The populated PasswordRequirements instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new PasswordRequirements(); + + if (data.hasOwnProperty('length')) { + obj['length'] = ApiClient.convertToType(data['length'], 'Number'); + } + if (data.hasOwnProperty('requireCapital')) { + obj['requireCapital'] = ApiClient.convertToType(data['requireCapital'], 'Boolean'); + } + if (data.hasOwnProperty('requireNumeric')) { + obj['requireNumeric'] = ApiClient.convertToType(data['requireNumeric'], 'Boolean'); + } + if (data.hasOwnProperty('requireSpecial')) { + obj['requireSpecial'] = ApiClient.convertToType(data['requireSpecial'], 'Boolean'); + } + if (data.hasOwnProperty('validSpecialCharacters')) { + obj['validSpecialCharacters'] = ApiClient.convertToType(data['validSpecialCharacters'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to PasswordRequirements. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to PasswordRequirements. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['validSpecialCharacters'] && !(typeof data['validSpecialCharacters'] === 'string' || data['validSpecialCharacters'] instanceof String)) { + throw new Error("Expected the field `validSpecialCharacters` to be a primitive type in the JSON string but got " + data['validSpecialCharacters']); + } + + return true; + } + + +} + + + +/** + * @member {Number} length + */ +PasswordRequirements.prototype['length'] = undefined; + +/** + * @member {Boolean} requireCapital + */ +PasswordRequirements.prototype['requireCapital'] = undefined; + +/** + * @member {Boolean} requireNumeric + */ +PasswordRequirements.prototype['requireNumeric'] = undefined; + +/** + * @member {Boolean} requireSpecial + */ +PasswordRequirements.prototype['requireSpecial'] = undefined; + +/** + * @member {String} validSpecialCharacters + */ +PasswordRequirements.prototype['validSpecialCharacters'] = undefined; + + + + + + +export default PasswordRequirements; + diff --git a/ui/src/api/src/model/Principal.js b/ui/src/api/src/model/Principal.js new file mode 100644 index 00000000..38aa9605 --- /dev/null +++ b/ui/src/api/src/model/Principal.js @@ -0,0 +1,123 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Principal model module. + * @module model/Principal + * @version 0.3.0 + */ +class Principal { + /** + * Constructs a new Principal. + * @alias module:model/Principal + */ + constructor() { + + Principal.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Principal from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Principal} obj Optional instance to populate. + * @return {module:model/Principal} The populated Principal instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Principal(); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + if (data.hasOwnProperty('limitless')) { + obj['limitless'] = ApiClient.convertToType(data['limitless'], 'Boolean'); + } + if (data.hasOwnProperty('admin')) { + obj['admin'] = ApiClient.convertToType(data['admin'], 'Boolean'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Principal. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Principal. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { + throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); + } + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + + return true; + } + + +} + + + +/** + * @member {Number} id + */ +Principal.prototype['id'] = undefined; + +/** + * @member {String} email + */ +Principal.prototype['email'] = undefined; + +/** + * @member {String} token + */ +Principal.prototype['token'] = undefined; + +/** + * @member {Boolean} limitless + */ +Principal.prototype['limitless'] = undefined; + +/** + * @member {Boolean} admin + */ +Principal.prototype['admin'] = undefined; + + + + + + +export default Principal; + diff --git a/ui/src/api/src/model/PublicFrontend.js b/ui/src/api/src/model/PublicFrontend.js new file mode 100644 index 00000000..57c2ac52 --- /dev/null +++ b/ui/src/api/src/model/PublicFrontend.js @@ -0,0 +1,139 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The PublicFrontend model module. + * @module model/PublicFrontend + * @version 0.3.0 + */ +class PublicFrontend { + /** + * Constructs a new PublicFrontend. + * @alias module:model/PublicFrontend + */ + constructor() { + + PublicFrontend.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a PublicFrontend from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/PublicFrontend} obj Optional instance to populate. + * @return {module:model/PublicFrontend} The populated PublicFrontend instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new PublicFrontend(); + + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + if (data.hasOwnProperty('zId')) { + obj['zId'] = ApiClient.convertToType(data['zId'], 'String'); + } + if (data.hasOwnProperty('urlTemplate')) { + obj['urlTemplate'] = ApiClient.convertToType(data['urlTemplate'], 'String'); + } + if (data.hasOwnProperty('publicName')) { + obj['publicName'] = ApiClient.convertToType(data['publicName'], 'String'); + } + if (data.hasOwnProperty('createdAt')) { + obj['createdAt'] = ApiClient.convertToType(data['createdAt'], 'Number'); + } + if (data.hasOwnProperty('updatedAt')) { + obj['updatedAt'] = ApiClient.convertToType(data['updatedAt'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to PublicFrontend. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to PublicFrontend. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + // ensure the json data is a string + if (data['zId'] && !(typeof data['zId'] === 'string' || data['zId'] instanceof String)) { + throw new Error("Expected the field `zId` to be a primitive type in the JSON string but got " + data['zId']); + } + // ensure the json data is a string + if (data['urlTemplate'] && !(typeof data['urlTemplate'] === 'string' || data['urlTemplate'] instanceof String)) { + throw new Error("Expected the field `urlTemplate` to be a primitive type in the JSON string but got " + data['urlTemplate']); + } + // ensure the json data is a string + if (data['publicName'] && !(typeof data['publicName'] === 'string' || data['publicName'] instanceof String)) { + throw new Error("Expected the field `publicName` to be a primitive type in the JSON string but got " + data['publicName']); + } + + return true; + } + + +} + + + +/** + * @member {String} token + */ +PublicFrontend.prototype['token'] = undefined; + +/** + * @member {String} zId + */ +PublicFrontend.prototype['zId'] = undefined; + +/** + * @member {String} urlTemplate + */ +PublicFrontend.prototype['urlTemplate'] = undefined; + +/** + * @member {String} publicName + */ +PublicFrontend.prototype['publicName'] = undefined; + +/** + * @member {Number} createdAt + */ +PublicFrontend.prototype['createdAt'] = undefined; + +/** + * @member {Number} updatedAt + */ +PublicFrontend.prototype['updatedAt'] = undefined; + + + + + + +export default PublicFrontend; + diff --git a/ui/src/api/src/model/RegisterRequest.js b/ui/src/api/src/model/RegisterRequest.js new file mode 100644 index 00000000..87960782 --- /dev/null +++ b/ui/src/api/src/model/RegisterRequest.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The RegisterRequest model module. + * @module model/RegisterRequest + * @version 0.3.0 + */ +class RegisterRequest { + /** + * Constructs a new RegisterRequest. + * @alias module:model/RegisterRequest + */ + constructor() { + + RegisterRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a RegisterRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/RegisterRequest} obj Optional instance to populate. + * @return {module:model/RegisterRequest} The populated RegisterRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new RegisterRequest(); + + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + if (data.hasOwnProperty('password')) { + obj['password'] = ApiClient.convertToType(data['password'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to RegisterRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to RegisterRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + // ensure the json data is a string + if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) { + throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']); + } + + return true; + } + + +} + + + +/** + * @member {String} token + */ +RegisterRequest.prototype['token'] = undefined; + +/** + * @member {String} password + */ +RegisterRequest.prototype['password'] = undefined; + + + + + + +export default RegisterRequest; + diff --git a/ui/src/api/src/model/RegisterResponse.js b/ui/src/api/src/model/RegisterResponse.js new file mode 100644 index 00000000..b2389891 --- /dev/null +++ b/ui/src/api/src/model/RegisterResponse.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The RegisterResponse model module. + * @module model/RegisterResponse + * @version 0.3.0 + */ +class RegisterResponse { + /** + * Constructs a new RegisterResponse. + * @alias module:model/RegisterResponse + */ + constructor() { + + RegisterResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a RegisterResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/RegisterResponse} obj Optional instance to populate. + * @return {module:model/RegisterResponse} The populated RegisterResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new RegisterResponse(); + + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to RegisterResponse. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to RegisterResponse. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + + return true; + } + + +} + + + +/** + * @member {String} token + */ +RegisterResponse.prototype['token'] = undefined; + + + + + + +export default RegisterResponse; + diff --git a/ui/src/api/src/model/ResetPasswordRequest.js b/ui/src/api/src/model/ResetPasswordRequest.js new file mode 100644 index 00000000..eee25081 --- /dev/null +++ b/ui/src/api/src/model/ResetPasswordRequest.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ResetPasswordRequest model module. + * @module model/ResetPasswordRequest + * @version 0.3.0 + */ +class ResetPasswordRequest { + /** + * Constructs a new ResetPasswordRequest. + * @alias module:model/ResetPasswordRequest + */ + constructor() { + + ResetPasswordRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ResetPasswordRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ResetPasswordRequest} obj Optional instance to populate. + * @return {module:model/ResetPasswordRequest} The populated ResetPasswordRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ResetPasswordRequest(); + + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + if (data.hasOwnProperty('password')) { + obj['password'] = ApiClient.convertToType(data['password'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ResetPasswordRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ResetPasswordRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + // ensure the json data is a string + if (data['password'] && !(typeof data['password'] === 'string' || data['password'] instanceof String)) { + throw new Error("Expected the field `password` to be a primitive type in the JSON string but got " + data['password']); + } + + return true; + } + + +} + + + +/** + * @member {String} token + */ +ResetPasswordRequest.prototype['token'] = undefined; + +/** + * @member {String} password + */ +ResetPasswordRequest.prototype['password'] = undefined; + + + + + + +export default ResetPasswordRequest; + diff --git a/ui/src/api/src/model/ResetPasswordRequestRequest.js b/ui/src/api/src/model/ResetPasswordRequestRequest.js new file mode 100644 index 00000000..efb429a6 --- /dev/null +++ b/ui/src/api/src/model/ResetPasswordRequestRequest.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ResetPasswordRequestRequest model module. + * @module model/ResetPasswordRequestRequest + * @version 0.3.0 + */ +class ResetPasswordRequestRequest { + /** + * Constructs a new ResetPasswordRequestRequest. + * @alias module:model/ResetPasswordRequestRequest + */ + constructor() { + + ResetPasswordRequestRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ResetPasswordRequestRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ResetPasswordRequestRequest} obj Optional instance to populate. + * @return {module:model/ResetPasswordRequestRequest} The populated ResetPasswordRequestRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ResetPasswordRequestRequest(); + + if (data.hasOwnProperty('emailAddress')) { + obj['emailAddress'] = ApiClient.convertToType(data['emailAddress'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ResetPasswordRequestRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ResetPasswordRequestRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['emailAddress'] && !(typeof data['emailAddress'] === 'string' || data['emailAddress'] instanceof String)) { + throw new Error("Expected the field `emailAddress` to be a primitive type in the JSON string but got " + data['emailAddress']); + } + + return true; + } + + +} + + + +/** + * @member {String} emailAddress + */ +ResetPasswordRequestRequest.prototype['emailAddress'] = undefined; + + + + + + +export default ResetPasswordRequestRequest; + diff --git a/ui/src/api/src/model/Share.js b/ui/src/api/src/model/Share.js new file mode 100644 index 00000000..f6b8e44c --- /dev/null +++ b/ui/src/api/src/model/Share.js @@ -0,0 +1,210 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import SparkDataSample from './SparkDataSample'; + +/** + * The Share model module. + * @module model/Share + * @version 0.3.0 + */ +class Share { + /** + * Constructs a new Share. + * @alias module:model/Share + */ + constructor() { + + Share.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Share from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Share} obj Optional instance to populate. + * @return {module:model/Share} The populated Share instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Share(); + + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + if (data.hasOwnProperty('zId')) { + obj['zId'] = ApiClient.convertToType(data['zId'], 'String'); + } + if (data.hasOwnProperty('shareMode')) { + obj['shareMode'] = ApiClient.convertToType(data['shareMode'], 'String'); + } + if (data.hasOwnProperty('backendMode')) { + obj['backendMode'] = ApiClient.convertToType(data['backendMode'], 'String'); + } + if (data.hasOwnProperty('frontendSelection')) { + obj['frontendSelection'] = ApiClient.convertToType(data['frontendSelection'], 'String'); + } + if (data.hasOwnProperty('frontendEndpoint')) { + obj['frontendEndpoint'] = ApiClient.convertToType(data['frontendEndpoint'], 'String'); + } + if (data.hasOwnProperty('backendProxyEndpoint')) { + obj['backendProxyEndpoint'] = ApiClient.convertToType(data['backendProxyEndpoint'], 'String'); + } + if (data.hasOwnProperty('reserved')) { + obj['reserved'] = ApiClient.convertToType(data['reserved'], 'Boolean'); + } + if (data.hasOwnProperty('activity')) { + obj['activity'] = ApiClient.convertToType(data['activity'], [SparkDataSample]); + } + if (data.hasOwnProperty('limited')) { + obj['limited'] = ApiClient.convertToType(data['limited'], 'Boolean'); + } + if (data.hasOwnProperty('createdAt')) { + obj['createdAt'] = ApiClient.convertToType(data['createdAt'], 'Number'); + } + if (data.hasOwnProperty('updatedAt')) { + obj['updatedAt'] = ApiClient.convertToType(data['updatedAt'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Share. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Share. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + // ensure the json data is a string + if (data['zId'] && !(typeof data['zId'] === 'string' || data['zId'] instanceof String)) { + throw new Error("Expected the field `zId` to be a primitive type in the JSON string but got " + data['zId']); + } + // ensure the json data is a string + if (data['shareMode'] && !(typeof data['shareMode'] === 'string' || data['shareMode'] instanceof String)) { + throw new Error("Expected the field `shareMode` to be a primitive type in the JSON string but got " + data['shareMode']); + } + // ensure the json data is a string + if (data['backendMode'] && !(typeof data['backendMode'] === 'string' || data['backendMode'] instanceof String)) { + throw new Error("Expected the field `backendMode` to be a primitive type in the JSON string but got " + data['backendMode']); + } + // ensure the json data is a string + if (data['frontendSelection'] && !(typeof data['frontendSelection'] === 'string' || data['frontendSelection'] instanceof String)) { + throw new Error("Expected the field `frontendSelection` to be a primitive type in the JSON string but got " + data['frontendSelection']); + } + // ensure the json data is a string + if (data['frontendEndpoint'] && !(typeof data['frontendEndpoint'] === 'string' || data['frontendEndpoint'] instanceof String)) { + throw new Error("Expected the field `frontendEndpoint` to be a primitive type in the JSON string but got " + data['frontendEndpoint']); + } + // ensure the json data is a string + if (data['backendProxyEndpoint'] && !(typeof data['backendProxyEndpoint'] === 'string' || data['backendProxyEndpoint'] instanceof String)) { + throw new Error("Expected the field `backendProxyEndpoint` to be a primitive type in the JSON string but got " + data['backendProxyEndpoint']); + } + if (data['activity']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['activity'])) { + throw new Error("Expected the field `activity` to be an array in the JSON data but got " + data['activity']); + } + // validate the optional field `activity` (array) + for (const item of data['activity']) { + SparkDataSample.validateJSON(item); + }; + } + + return true; + } + + +} + + + +/** + * @member {String} token + */ +Share.prototype['token'] = undefined; + +/** + * @member {String} zId + */ +Share.prototype['zId'] = undefined; + +/** + * @member {String} shareMode + */ +Share.prototype['shareMode'] = undefined; + +/** + * @member {String} backendMode + */ +Share.prototype['backendMode'] = undefined; + +/** + * @member {String} frontendSelection + */ +Share.prototype['frontendSelection'] = undefined; + +/** + * @member {String} frontendEndpoint + */ +Share.prototype['frontendEndpoint'] = undefined; + +/** + * @member {String} backendProxyEndpoint + */ +Share.prototype['backendProxyEndpoint'] = undefined; + +/** + * @member {Boolean} reserved + */ +Share.prototype['reserved'] = undefined; + +/** + * @member {Array.} activity + */ +Share.prototype['activity'] = undefined; + +/** + * @member {Boolean} limited + */ +Share.prototype['limited'] = undefined; + +/** + * @member {Number} createdAt + */ +Share.prototype['createdAt'] = undefined; + +/** + * @member {Number} updatedAt + */ +Share.prototype['updatedAt'] = undefined; + + + + + + +export default Share; + diff --git a/ui/src/api/src/model/ShareRequest.js b/ui/src/api/src/model/ShareRequest.js new file mode 100644 index 00000000..622a11cf --- /dev/null +++ b/ui/src/api/src/model/ShareRequest.js @@ -0,0 +1,297 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import AuthUser from './AuthUser'; + +/** + * The ShareRequest model module. + * @module model/ShareRequest + * @version 0.3.0 + */ +class ShareRequest { + /** + * Constructs a new ShareRequest. + * @alias module:model/ShareRequest + */ + constructor() { + + ShareRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ShareRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ShareRequest} obj Optional instance to populate. + * @return {module:model/ShareRequest} The populated ShareRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ShareRequest(); + + if (data.hasOwnProperty('envZId')) { + obj['envZId'] = ApiClient.convertToType(data['envZId'], 'String'); + } + if (data.hasOwnProperty('shareMode')) { + obj['shareMode'] = ApiClient.convertToType(data['shareMode'], 'String'); + } + if (data.hasOwnProperty('frontendSelection')) { + obj['frontendSelection'] = ApiClient.convertToType(data['frontendSelection'], ['String']); + } + if (data.hasOwnProperty('backendMode')) { + obj['backendMode'] = ApiClient.convertToType(data['backendMode'], 'String'); + } + if (data.hasOwnProperty('backendProxyEndpoint')) { + obj['backendProxyEndpoint'] = ApiClient.convertToType(data['backendProxyEndpoint'], 'String'); + } + if (data.hasOwnProperty('authScheme')) { + obj['authScheme'] = ApiClient.convertToType(data['authScheme'], 'String'); + } + if (data.hasOwnProperty('authUsers')) { + obj['authUsers'] = ApiClient.convertToType(data['authUsers'], [AuthUser]); + } + if (data.hasOwnProperty('oauthProvider')) { + obj['oauthProvider'] = ApiClient.convertToType(data['oauthProvider'], 'String'); + } + if (data.hasOwnProperty('oauthEmailDomains')) { + obj['oauthEmailDomains'] = ApiClient.convertToType(data['oauthEmailDomains'], ['String']); + } + if (data.hasOwnProperty('oauthAuthorizationCheckInterval')) { + obj['oauthAuthorizationCheckInterval'] = ApiClient.convertToType(data['oauthAuthorizationCheckInterval'], 'String'); + } + if (data.hasOwnProperty('reserved')) { + obj['reserved'] = ApiClient.convertToType(data['reserved'], 'Boolean'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ShareRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ShareRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['envZId'] && !(typeof data['envZId'] === 'string' || data['envZId'] instanceof String)) { + throw new Error("Expected the field `envZId` to be a primitive type in the JSON string but got " + data['envZId']); + } + // ensure the json data is a string + if (data['shareMode'] && !(typeof data['shareMode'] === 'string' || data['shareMode'] instanceof String)) { + throw new Error("Expected the field `shareMode` to be a primitive type in the JSON string but got " + data['shareMode']); + } + // ensure the json data is an array + if (!Array.isArray(data['frontendSelection'])) { + throw new Error("Expected the field `frontendSelection` to be an array in the JSON data but got " + data['frontendSelection']); + } + // ensure the json data is a string + if (data['backendMode'] && !(typeof data['backendMode'] === 'string' || data['backendMode'] instanceof String)) { + throw new Error("Expected the field `backendMode` to be a primitive type in the JSON string but got " + data['backendMode']); + } + // ensure the json data is a string + if (data['backendProxyEndpoint'] && !(typeof data['backendProxyEndpoint'] === 'string' || data['backendProxyEndpoint'] instanceof String)) { + throw new Error("Expected the field `backendProxyEndpoint` to be a primitive type in the JSON string but got " + data['backendProxyEndpoint']); + } + // ensure the json data is a string + if (data['authScheme'] && !(typeof data['authScheme'] === 'string' || data['authScheme'] instanceof String)) { + throw new Error("Expected the field `authScheme` to be a primitive type in the JSON string but got " + data['authScheme']); + } + if (data['authUsers']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['authUsers'])) { + throw new Error("Expected the field `authUsers` to be an array in the JSON data but got " + data['authUsers']); + } + // validate the optional field `authUsers` (array) + for (const item of data['authUsers']) { + AuthUser.validateJSON(item); + }; + } + // ensure the json data is a string + if (data['oauthProvider'] && !(typeof data['oauthProvider'] === 'string' || data['oauthProvider'] instanceof String)) { + throw new Error("Expected the field `oauthProvider` to be a primitive type in the JSON string but got " + data['oauthProvider']); + } + // ensure the json data is an array + if (!Array.isArray(data['oauthEmailDomains'])) { + throw new Error("Expected the field `oauthEmailDomains` to be an array in the JSON data but got " + data['oauthEmailDomains']); + } + // ensure the json data is a string + if (data['oauthAuthorizationCheckInterval'] && !(typeof data['oauthAuthorizationCheckInterval'] === 'string' || data['oauthAuthorizationCheckInterval'] instanceof String)) { + throw new Error("Expected the field `oauthAuthorizationCheckInterval` to be a primitive type in the JSON string but got " + data['oauthAuthorizationCheckInterval']); + } + + return true; + } + + +} + + + +/** + * @member {String} envZId + */ +ShareRequest.prototype['envZId'] = undefined; + +/** + * @member {module:model/ShareRequest.ShareModeEnum} shareMode + */ +ShareRequest.prototype['shareMode'] = undefined; + +/** + * @member {Array.} frontendSelection + */ +ShareRequest.prototype['frontendSelection'] = undefined; + +/** + * @member {module:model/ShareRequest.BackendModeEnum} backendMode + */ +ShareRequest.prototype['backendMode'] = undefined; + +/** + * @member {String} backendProxyEndpoint + */ +ShareRequest.prototype['backendProxyEndpoint'] = undefined; + +/** + * @member {String} authScheme + */ +ShareRequest.prototype['authScheme'] = undefined; + +/** + * @member {Array.} authUsers + */ +ShareRequest.prototype['authUsers'] = undefined; + +/** + * @member {module:model/ShareRequest.OauthProviderEnum} oauthProvider + */ +ShareRequest.prototype['oauthProvider'] = undefined; + +/** + * @member {Array.} oauthEmailDomains + */ +ShareRequest.prototype['oauthEmailDomains'] = undefined; + +/** + * @member {String} oauthAuthorizationCheckInterval + */ +ShareRequest.prototype['oauthAuthorizationCheckInterval'] = undefined; + +/** + * @member {Boolean} reserved + */ +ShareRequest.prototype['reserved'] = undefined; + + + + + +/** + * Allowed values for the shareMode property. + * @enum {String} + * @readonly + */ +ShareRequest['ShareModeEnum'] = { + + /** + * value: "public" + * @const + */ + "public": "public", + + /** + * value: "private" + * @const + */ + "private": "private" +}; + + +/** + * Allowed values for the backendMode property. + * @enum {String} + * @readonly + */ +ShareRequest['BackendModeEnum'] = { + + /** + * value: "proxy" + * @const + */ + "proxy": "proxy", + + /** + * value: "web" + * @const + */ + "web": "web", + + /** + * value: "tcpTunnel" + * @const + */ + "tcpTunnel": "tcpTunnel", + + /** + * value: "udpTunnel" + * @const + */ + "udpTunnel": "udpTunnel", + + /** + * value: "caddy" + * @const + */ + "caddy": "caddy", + + /** + * value: "drive" + * @const + */ + "drive": "drive" +}; + + +/** + * Allowed values for the oauthProvider property. + * @enum {String} + * @readonly + */ +ShareRequest['OauthProviderEnum'] = { + + /** + * value: "github" + * @const + */ + "github": "github", + + /** + * value: "google" + * @const + */ + "google": "google" +}; + + + +export default ShareRequest; + diff --git a/ui/src/api/src/model/ShareResponse.js b/ui/src/api/src/model/ShareResponse.js new file mode 100644 index 00000000..4bcde801 --- /dev/null +++ b/ui/src/api/src/model/ShareResponse.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ShareResponse model module. + * @module model/ShareResponse + * @version 0.3.0 + */ +class ShareResponse { + /** + * Constructs a new ShareResponse. + * @alias module:model/ShareResponse + */ + constructor() { + + ShareResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ShareResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ShareResponse} obj Optional instance to populate. + * @return {module:model/ShareResponse} The populated ShareResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ShareResponse(); + + if (data.hasOwnProperty('frontendProxyEndpoints')) { + obj['frontendProxyEndpoints'] = ApiClient.convertToType(data['frontendProxyEndpoints'], ['String']); + } + if (data.hasOwnProperty('shrToken')) { + obj['shrToken'] = ApiClient.convertToType(data['shrToken'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ShareResponse. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ShareResponse. + */ + static validateJSON(data) { + // ensure the json data is an array + if (!Array.isArray(data['frontendProxyEndpoints'])) { + throw new Error("Expected the field `frontendProxyEndpoints` to be an array in the JSON data but got " + data['frontendProxyEndpoints']); + } + // ensure the json data is a string + if (data['shrToken'] && !(typeof data['shrToken'] === 'string' || data['shrToken'] instanceof String)) { + throw new Error("Expected the field `shrToken` to be a primitive type in the JSON string but got " + data['shrToken']); + } + + return true; + } + + +} + + + +/** + * @member {Array.} frontendProxyEndpoints + */ +ShareResponse.prototype['frontendProxyEndpoints'] = undefined; + +/** + * @member {String} shrToken + */ +ShareResponse.prototype['shrToken'] = undefined; + + + + + + +export default ShareResponse; + diff --git a/ui/src/api/src/model/SparkDataSample.js b/ui/src/api/src/model/SparkDataSample.js new file mode 100644 index 00000000..8d0c171d --- /dev/null +++ b/ui/src/api/src/model/SparkDataSample.js @@ -0,0 +1,91 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The SparkDataSample model module. + * @module model/SparkDataSample + * @version 0.3.0 + */ +class SparkDataSample { + /** + * Constructs a new SparkDataSample. + * @alias module:model/SparkDataSample + */ + constructor() { + + SparkDataSample.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a SparkDataSample from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/SparkDataSample} obj Optional instance to populate. + * @return {module:model/SparkDataSample} The populated SparkDataSample instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new SparkDataSample(); + + if (data.hasOwnProperty('rx')) { + obj['rx'] = ApiClient.convertToType(data['rx'], 'Number'); + } + if (data.hasOwnProperty('tx')) { + obj['tx'] = ApiClient.convertToType(data['tx'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to SparkDataSample. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to SparkDataSample. + */ + static validateJSON(data) { + + return true; + } + + +} + + + +/** + * @member {Number} rx + */ +SparkDataSample.prototype['rx'] = undefined; + +/** + * @member {Number} tx + */ +SparkDataSample.prototype['tx'] = undefined; + + + + + + +export default SparkDataSample; + diff --git a/ui/src/api/src/model/UnaccessRequest.js b/ui/src/api/src/model/UnaccessRequest.js new file mode 100644 index 00000000..96292848 --- /dev/null +++ b/ui/src/api/src/model/UnaccessRequest.js @@ -0,0 +1,111 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The UnaccessRequest model module. + * @module model/UnaccessRequest + * @version 0.3.0 + */ +class UnaccessRequest { + /** + * Constructs a new UnaccessRequest. + * @alias module:model/UnaccessRequest + */ + constructor() { + + UnaccessRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a UnaccessRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UnaccessRequest} obj Optional instance to populate. + * @return {module:model/UnaccessRequest} The populated UnaccessRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UnaccessRequest(); + + if (data.hasOwnProperty('frontendToken')) { + obj['frontendToken'] = ApiClient.convertToType(data['frontendToken'], 'String'); + } + if (data.hasOwnProperty('envZId')) { + obj['envZId'] = ApiClient.convertToType(data['envZId'], 'String'); + } + if (data.hasOwnProperty('shrToken')) { + obj['shrToken'] = ApiClient.convertToType(data['shrToken'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to UnaccessRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to UnaccessRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['frontendToken'] && !(typeof data['frontendToken'] === 'string' || data['frontendToken'] instanceof String)) { + throw new Error("Expected the field `frontendToken` to be a primitive type in the JSON string but got " + data['frontendToken']); + } + // ensure the json data is a string + if (data['envZId'] && !(typeof data['envZId'] === 'string' || data['envZId'] instanceof String)) { + throw new Error("Expected the field `envZId` to be a primitive type in the JSON string but got " + data['envZId']); + } + // ensure the json data is a string + if (data['shrToken'] && !(typeof data['shrToken'] === 'string' || data['shrToken'] instanceof String)) { + throw new Error("Expected the field `shrToken` to be a primitive type in the JSON string but got " + data['shrToken']); + } + + return true; + } + + +} + + + +/** + * @member {String} frontendToken + */ +UnaccessRequest.prototype['frontendToken'] = undefined; + +/** + * @member {String} envZId + */ +UnaccessRequest.prototype['envZId'] = undefined; + +/** + * @member {String} shrToken + */ +UnaccessRequest.prototype['shrToken'] = undefined; + + + + + + +export default UnaccessRequest; + diff --git a/ui/src/api/src/model/UnshareRequest.js b/ui/src/api/src/model/UnshareRequest.js new file mode 100644 index 00000000..46831d68 --- /dev/null +++ b/ui/src/api/src/model/UnshareRequest.js @@ -0,0 +1,107 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The UnshareRequest model module. + * @module model/UnshareRequest + * @version 0.3.0 + */ +class UnshareRequest { + /** + * Constructs a new UnshareRequest. + * @alias module:model/UnshareRequest + */ + constructor() { + + UnshareRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a UnshareRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UnshareRequest} obj Optional instance to populate. + * @return {module:model/UnshareRequest} The populated UnshareRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UnshareRequest(); + + if (data.hasOwnProperty('envZId')) { + obj['envZId'] = ApiClient.convertToType(data['envZId'], 'String'); + } + if (data.hasOwnProperty('shrToken')) { + obj['shrToken'] = ApiClient.convertToType(data['shrToken'], 'String'); + } + if (data.hasOwnProperty('reserved')) { + obj['reserved'] = ApiClient.convertToType(data['reserved'], 'Boolean'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to UnshareRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to UnshareRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['envZId'] && !(typeof data['envZId'] === 'string' || data['envZId'] instanceof String)) { + throw new Error("Expected the field `envZId` to be a primitive type in the JSON string but got " + data['envZId']); + } + // ensure the json data is a string + if (data['shrToken'] && !(typeof data['shrToken'] === 'string' || data['shrToken'] instanceof String)) { + throw new Error("Expected the field `shrToken` to be a primitive type in the JSON string but got " + data['shrToken']); + } + + return true; + } + + +} + + + +/** + * @member {String} envZId + */ +UnshareRequest.prototype['envZId'] = undefined; + +/** + * @member {String} shrToken + */ +UnshareRequest.prototype['shrToken'] = undefined; + +/** + * @member {Boolean} reserved + */ +UnshareRequest.prototype['reserved'] = undefined; + + + + + + +export default UnshareRequest; + diff --git a/ui/src/api/src/model/UpdateFrontendRequest.js b/ui/src/api/src/model/UpdateFrontendRequest.js new file mode 100644 index 00000000..f73564ee --- /dev/null +++ b/ui/src/api/src/model/UpdateFrontendRequest.js @@ -0,0 +1,111 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The UpdateFrontendRequest model module. + * @module model/UpdateFrontendRequest + * @version 0.3.0 + */ +class UpdateFrontendRequest { + /** + * Constructs a new UpdateFrontendRequest. + * @alias module:model/UpdateFrontendRequest + */ + constructor() { + + UpdateFrontendRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a UpdateFrontendRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UpdateFrontendRequest} obj Optional instance to populate. + * @return {module:model/UpdateFrontendRequest} The populated UpdateFrontendRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UpdateFrontendRequest(); + + if (data.hasOwnProperty('frontendToken')) { + obj['frontendToken'] = ApiClient.convertToType(data['frontendToken'], 'String'); + } + if (data.hasOwnProperty('publicName')) { + obj['publicName'] = ApiClient.convertToType(data['publicName'], 'String'); + } + if (data.hasOwnProperty('urlTemplate')) { + obj['urlTemplate'] = ApiClient.convertToType(data['urlTemplate'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to UpdateFrontendRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to UpdateFrontendRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['frontendToken'] && !(typeof data['frontendToken'] === 'string' || data['frontendToken'] instanceof String)) { + throw new Error("Expected the field `frontendToken` to be a primitive type in the JSON string but got " + data['frontendToken']); + } + // ensure the json data is a string + if (data['publicName'] && !(typeof data['publicName'] === 'string' || data['publicName'] instanceof String)) { + throw new Error("Expected the field `publicName` to be a primitive type in the JSON string but got " + data['publicName']); + } + // ensure the json data is a string + if (data['urlTemplate'] && !(typeof data['urlTemplate'] === 'string' || data['urlTemplate'] instanceof String)) { + throw new Error("Expected the field `urlTemplate` to be a primitive type in the JSON string but got " + data['urlTemplate']); + } + + return true; + } + + +} + + + +/** + * @member {String} frontendToken + */ +UpdateFrontendRequest.prototype['frontendToken'] = undefined; + +/** + * @member {String} publicName + */ +UpdateFrontendRequest.prototype['publicName'] = undefined; + +/** + * @member {String} urlTemplate + */ +UpdateFrontendRequest.prototype['urlTemplate'] = undefined; + + + + + + +export default UpdateFrontendRequest; + diff --git a/ui/src/api/src/model/UpdateShareRequest.js b/ui/src/api/src/model/UpdateShareRequest.js new file mode 100644 index 00000000..86dc058e --- /dev/null +++ b/ui/src/api/src/model/UpdateShareRequest.js @@ -0,0 +1,99 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The UpdateShareRequest model module. + * @module model/UpdateShareRequest + * @version 0.3.0 + */ +class UpdateShareRequest { + /** + * Constructs a new UpdateShareRequest. + * @alias module:model/UpdateShareRequest + */ + constructor() { + + UpdateShareRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a UpdateShareRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/UpdateShareRequest} obj Optional instance to populate. + * @return {module:model/UpdateShareRequest} The populated UpdateShareRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new UpdateShareRequest(); + + if (data.hasOwnProperty('shrToken')) { + obj['shrToken'] = ApiClient.convertToType(data['shrToken'], 'String'); + } + if (data.hasOwnProperty('backendProxyEndpoint')) { + obj['backendProxyEndpoint'] = ApiClient.convertToType(data['backendProxyEndpoint'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to UpdateShareRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to UpdateShareRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['shrToken'] && !(typeof data['shrToken'] === 'string' || data['shrToken'] instanceof String)) { + throw new Error("Expected the field `shrToken` to be a primitive type in the JSON string but got " + data['shrToken']); + } + // ensure the json data is a string + if (data['backendProxyEndpoint'] && !(typeof data['backendProxyEndpoint'] === 'string' || data['backendProxyEndpoint'] instanceof String)) { + throw new Error("Expected the field `backendProxyEndpoint` to be a primitive type in the JSON string but got " + data['backendProxyEndpoint']); + } + + return true; + } + + +} + + + +/** + * @member {String} shrToken + */ +UpdateShareRequest.prototype['shrToken'] = undefined; + +/** + * @member {String} backendProxyEndpoint + */ +UpdateShareRequest.prototype['backendProxyEndpoint'] = undefined; + + + + + + +export default UpdateShareRequest; + diff --git a/ui/src/api/src/model/VerifyRequest.js b/ui/src/api/src/model/VerifyRequest.js new file mode 100644 index 00000000..e4754ca2 --- /dev/null +++ b/ui/src/api/src/model/VerifyRequest.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The VerifyRequest model module. + * @module model/VerifyRequest + * @version 0.3.0 + */ +class VerifyRequest { + /** + * Constructs a new VerifyRequest. + * @alias module:model/VerifyRequest + */ + constructor() { + + VerifyRequest.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a VerifyRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/VerifyRequest} obj Optional instance to populate. + * @return {module:model/VerifyRequest} The populated VerifyRequest instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new VerifyRequest(); + + if (data.hasOwnProperty('token')) { + obj['token'] = ApiClient.convertToType(data['token'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to VerifyRequest. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to VerifyRequest. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['token'] && !(typeof data['token'] === 'string' || data['token'] instanceof String)) { + throw new Error("Expected the field `token` to be a primitive type in the JSON string but got " + data['token']); + } + + return true; + } + + +} + + + +/** + * @member {String} token + */ +VerifyRequest.prototype['token'] = undefined; + + + + + + +export default VerifyRequest; + diff --git a/ui/src/api/src/model/VerifyResponse.js b/ui/src/api/src/model/VerifyResponse.js new file mode 100644 index 00000000..6af88783 --- /dev/null +++ b/ui/src/api/src/model/VerifyResponse.js @@ -0,0 +1,87 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The VerifyResponse model module. + * @module model/VerifyResponse + * @version 0.3.0 + */ +class VerifyResponse { + /** + * Constructs a new VerifyResponse. + * @alias module:model/VerifyResponse + */ + constructor() { + + VerifyResponse.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a VerifyResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/VerifyResponse} obj Optional instance to populate. + * @return {module:model/VerifyResponse} The populated VerifyResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new VerifyResponse(); + + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to VerifyResponse. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to VerifyResponse. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { + throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); + } + + return true; + } + + +} + + + +/** + * @member {String} email + */ +VerifyResponse.prototype['email'] = undefined; + + + + + + +export default VerifyResponse; + diff --git a/ui/src/api/test/api/AccountApi.spec.js b/ui/src/api/test/api/AccountApi.spec.js new file mode 100644 index 00000000..1d9e8099 --- /dev/null +++ b/ui/src/api/test/api/AccountApi.spec.js @@ -0,0 +1,113 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.AccountApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AccountApi', function() { + describe('invite', function() { + it('should call invite successfully', function(done) { + //uncomment below and update the code to test invite + //instance.invite(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('login', function() { + it('should call login successfully', function(done) { + //uncomment below and update the code to test login + //instance.login(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('register', function() { + it('should call register successfully', function(done) { + //uncomment below and update the code to test register + //instance.register(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('resetPassword', function() { + it('should call resetPassword successfully', function(done) { + //uncomment below and update the code to test resetPassword + //instance.resetPassword(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('resetPasswordRequest', function() { + it('should call resetPasswordRequest successfully', function(done) { + //uncomment below and update the code to test resetPasswordRequest + //instance.resetPasswordRequest(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('verify', function() { + it('should call verify successfully', function(done) { + //uncomment below and update the code to test verify + //instance.verify(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/ui/src/api/test/api/AdminApi.spec.js b/ui/src/api/test/api/AdminApi.spec.js new file mode 100644 index 00000000..2c475a24 --- /dev/null +++ b/ui/src/api/test/api/AdminApi.spec.js @@ -0,0 +1,113 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.AdminApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AdminApi', function() { + describe('createFrontend', function() { + it('should call createFrontend successfully', function(done) { + //uncomment below and update the code to test createFrontend + //instance.createFrontend(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('createIdentity', function() { + it('should call createIdentity successfully', function(done) { + //uncomment below and update the code to test createIdentity + //instance.createIdentity(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteFrontend', function() { + it('should call deleteFrontend successfully', function(done) { + //uncomment below and update the code to test deleteFrontend + //instance.deleteFrontend(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('inviteTokenGenerate', function() { + it('should call inviteTokenGenerate successfully', function(done) { + //uncomment below and update the code to test inviteTokenGenerate + //instance.inviteTokenGenerate(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listFrontends', function() { + it('should call listFrontends successfully', function(done) { + //uncomment below and update the code to test listFrontends + //instance.listFrontends(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateFrontend', function() { + it('should call updateFrontend successfully', function(done) { + //uncomment below and update the code to test updateFrontend + //instance.updateFrontend(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/ui/src/api/test/api/EnvironmentApi.spec.js b/ui/src/api/test/api/EnvironmentApi.spec.js new file mode 100644 index 00000000..78374af4 --- /dev/null +++ b/ui/src/api/test/api/EnvironmentApi.spec.js @@ -0,0 +1,73 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.EnvironmentApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EnvironmentApi', function() { + describe('disable', function() { + it('should call disable successfully', function(done) { + //uncomment below and update the code to test disable + //instance.disable(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('enable', function() { + it('should call enable successfully', function(done) { + //uncomment below and update the code to test enable + //instance.enable(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/ui/src/api/test/api/MetadataApi.spec.js b/ui/src/api/test/api/MetadataApi.spec.js new file mode 100644 index 00000000..a4473321 --- /dev/null +++ b/ui/src/api/test/api/MetadataApi.spec.js @@ -0,0 +1,153 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.MetadataApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MetadataApi', function() { + describe('configuration', function() { + it('should call configuration successfully', function(done) { + //uncomment below and update the code to test configuration + //instance.configuration(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getAccountDetail', function() { + it('should call getAccountDetail successfully', function(done) { + //uncomment below and update the code to test getAccountDetail + //instance.getAccountDetail(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getAccountMetrics', function() { + it('should call getAccountMetrics successfully', function(done) { + //uncomment below and update the code to test getAccountMetrics + //instance.getAccountMetrics(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getEnvironmentDetail', function() { + it('should call getEnvironmentDetail successfully', function(done) { + //uncomment below and update the code to test getEnvironmentDetail + //instance.getEnvironmentDetail(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getEnvironmentMetrics', function() { + it('should call getEnvironmentMetrics successfully', function(done) { + //uncomment below and update the code to test getEnvironmentMetrics + //instance.getEnvironmentMetrics(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getFrontendDetail', function() { + it('should call getFrontendDetail successfully', function(done) { + //uncomment below and update the code to test getFrontendDetail + //instance.getFrontendDetail(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getShareDetail', function() { + it('should call getShareDetail successfully', function(done) { + //uncomment below and update the code to test getShareDetail + //instance.getShareDetail(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getShareMetrics', function() { + it('should call getShareMetrics successfully', function(done) { + //uncomment below and update the code to test getShareMetrics + //instance.getShareMetrics(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('overview', function() { + it('should call overview successfully', function(done) { + //uncomment below and update the code to test overview + //instance.overview(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('version', function() { + it('should call version successfully', function(done) { + //uncomment below and update the code to test version + //instance.version(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/ui/src/api/test/api/ShareApi.spec.js b/ui/src/api/test/api/ShareApi.spec.js new file mode 100644 index 00000000..26fc49dc --- /dev/null +++ b/ui/src/api/test/api/ShareApi.spec.js @@ -0,0 +1,103 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.ShareApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ShareApi', function() { + describe('access', function() { + it('should call access successfully', function(done) { + //uncomment below and update the code to test access + //instance.access(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('share', function() { + it('should call share successfully', function(done) { + //uncomment below and update the code to test share + //instance.share(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('unaccess', function() { + it('should call unaccess successfully', function(done) { + //uncomment below and update the code to test unaccess + //instance.unaccess(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('unshare', function() { + it('should call unshare successfully', function(done) { + //uncomment below and update the code to test unshare + //instance.unshare(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateShare', function() { + it('should call updateShare successfully', function(done) { + //uncomment below and update the code to test updateShare + //instance.updateShare(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/ui/src/api/test/model/AccessRequest.spec.js b/ui/src/api/test/model/AccessRequest.spec.js new file mode 100644 index 00000000..ee0981a9 --- /dev/null +++ b/ui/src/api/test/model/AccessRequest.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.AccessRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AccessRequest', function() { + it('should create an instance of AccessRequest', function() { + // uncomment below and update the code to test AccessRequest + //var instance = new Zrok.AccessRequest(); + //expect(instance).to.be.a(Zrok.AccessRequest); + }); + + it('should have the property envZId (base name: "envZId")', function() { + // uncomment below and update the code to test the property envZId + //var instance = new Zrok.AccessRequest(); + //expect(instance).to.be(); + }); + + it('should have the property shrToken (base name: "shrToken")', function() { + // uncomment below and update the code to test the property shrToken + //var instance = new Zrok.AccessRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/AccessResponse.spec.js b/ui/src/api/test/model/AccessResponse.spec.js new file mode 100644 index 00000000..7a68a32f --- /dev/null +++ b/ui/src/api/test/model/AccessResponse.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.AccessResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AccessResponse', function() { + it('should create an instance of AccessResponse', function() { + // uncomment below and update the code to test AccessResponse + //var instance = new Zrok.AccessResponse(); + //expect(instance).to.be.a(Zrok.AccessResponse); + }); + + it('should have the property frontendToken (base name: "frontendToken")', function() { + // uncomment below and update the code to test the property frontendToken + //var instance = new Zrok.AccessResponse(); + //expect(instance).to.be(); + }); + + it('should have the property backendMode (base name: "backendMode")', function() { + // uncomment below and update the code to test the property backendMode + //var instance = new Zrok.AccessResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/AuthUser.spec.js b/ui/src/api/test/model/AuthUser.spec.js new file mode 100644 index 00000000..4625f112 --- /dev/null +++ b/ui/src/api/test/model/AuthUser.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.AuthUser(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('AuthUser', function() { + it('should create an instance of AuthUser', function() { + // uncomment below and update the code to test AuthUser + //var instance = new Zrok.AuthUser(); + //expect(instance).to.be.a(Zrok.AuthUser); + }); + + it('should have the property username (base name: "username")', function() { + // uncomment below and update the code to test the property username + //var instance = new Zrok.AuthUser(); + //expect(instance).to.be(); + }); + + it('should have the property password (base name: "password")', function() { + // uncomment below and update the code to test the property password + //var instance = new Zrok.AuthUser(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/Configuration.spec.js b/ui/src/api/test/model/Configuration.spec.js new file mode 100644 index 00000000..d575021c --- /dev/null +++ b/ui/src/api/test/model/Configuration.spec.js @@ -0,0 +1,95 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.Configuration(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Configuration', function() { + it('should create an instance of Configuration', function() { + // uncomment below and update the code to test Configuration + //var instance = new Zrok.Configuration(); + //expect(instance).to.be.a(Zrok.Configuration); + }); + + it('should have the property version (base name: "version")', function() { + // uncomment below and update the code to test the property version + //var instance = new Zrok.Configuration(); + //expect(instance).to.be(); + }); + + it('should have the property touLink (base name: "touLink")', function() { + // uncomment below and update the code to test the property touLink + //var instance = new Zrok.Configuration(); + //expect(instance).to.be(); + }); + + it('should have the property invitesOpen (base name: "invitesOpen")', function() { + // uncomment below and update the code to test the property invitesOpen + //var instance = new Zrok.Configuration(); + //expect(instance).to.be(); + }); + + it('should have the property requiresInviteToken (base name: "requiresInviteToken")', function() { + // uncomment below and update the code to test the property requiresInviteToken + //var instance = new Zrok.Configuration(); + //expect(instance).to.be(); + }); + + it('should have the property inviteTokenContact (base name: "inviteTokenContact")', function() { + // uncomment below and update the code to test the property inviteTokenContact + //var instance = new Zrok.Configuration(); + //expect(instance).to.be(); + }); + + it('should have the property passwordRequirements (base name: "passwordRequirements")', function() { + // uncomment below and update the code to test the property passwordRequirements + //var instance = new Zrok.Configuration(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/CreateFrontendRequest.spec.js b/ui/src/api/test/model/CreateFrontendRequest.spec.js new file mode 100644 index 00000000..6add3e89 --- /dev/null +++ b/ui/src/api/test/model/CreateFrontendRequest.spec.js @@ -0,0 +1,77 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.CreateFrontendRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('CreateFrontendRequest', function() { + it('should create an instance of CreateFrontendRequest', function() { + // uncomment below and update the code to test CreateFrontendRequest + //var instance = new Zrok.CreateFrontendRequest(); + //expect(instance).to.be.a(Zrok.CreateFrontendRequest); + }); + + it('should have the property zId (base name: "zId")', function() { + // uncomment below and update the code to test the property zId + //var instance = new Zrok.CreateFrontendRequest(); + //expect(instance).to.be(); + }); + + it('should have the property urlTemplate (base name: "url_template")', function() { + // uncomment below and update the code to test the property urlTemplate + //var instance = new Zrok.CreateFrontendRequest(); + //expect(instance).to.be(); + }); + + it('should have the property publicName (base name: "public_name")', function() { + // uncomment below and update the code to test the property publicName + //var instance = new Zrok.CreateFrontendRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/CreateFrontendResponse.spec.js b/ui/src/api/test/model/CreateFrontendResponse.spec.js new file mode 100644 index 00000000..3eb74ca8 --- /dev/null +++ b/ui/src/api/test/model/CreateFrontendResponse.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.CreateFrontendResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('CreateFrontendResponse', function() { + it('should create an instance of CreateFrontendResponse', function() { + // uncomment below and update the code to test CreateFrontendResponse + //var instance = new Zrok.CreateFrontendResponse(); + //expect(instance).to.be.a(Zrok.CreateFrontendResponse); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.CreateFrontendResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/CreateIdentity201Response.spec.js b/ui/src/api/test/model/CreateIdentity201Response.spec.js new file mode 100644 index 00000000..54f82034 --- /dev/null +++ b/ui/src/api/test/model/CreateIdentity201Response.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.CreateIdentity201Response(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('CreateIdentity201Response', function() { + it('should create an instance of CreateIdentity201Response', function() { + // uncomment below and update the code to test CreateIdentity201Response + //var instance = new Zrok.CreateIdentity201Response(); + //expect(instance).to.be.a(Zrok.CreateIdentity201Response); + }); + + it('should have the property identity (base name: "identity")', function() { + // uncomment below and update the code to test the property identity + //var instance = new Zrok.CreateIdentity201Response(); + //expect(instance).to.be(); + }); + + it('should have the property cfg (base name: "cfg")', function() { + // uncomment below and update the code to test the property cfg + //var instance = new Zrok.CreateIdentity201Response(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/CreateIdentityRequest.spec.js b/ui/src/api/test/model/CreateIdentityRequest.spec.js new file mode 100644 index 00000000..edc14129 --- /dev/null +++ b/ui/src/api/test/model/CreateIdentityRequest.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.CreateIdentityRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('CreateIdentityRequest', function() { + it('should create an instance of CreateIdentityRequest', function() { + // uncomment below and update the code to test CreateIdentityRequest + //var instance = new Zrok.CreateIdentityRequest(); + //expect(instance).to.be.a(Zrok.CreateIdentityRequest); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new Zrok.CreateIdentityRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/DeleteFrontendRequest.spec.js b/ui/src/api/test/model/DeleteFrontendRequest.spec.js new file mode 100644 index 00000000..200a561e --- /dev/null +++ b/ui/src/api/test/model/DeleteFrontendRequest.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.DeleteFrontendRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DeleteFrontendRequest', function() { + it('should create an instance of DeleteFrontendRequest', function() { + // uncomment below and update the code to test DeleteFrontendRequest + //var instance = new Zrok.DeleteFrontendRequest(); + //expect(instance).to.be.a(Zrok.DeleteFrontendRequest); + }); + + it('should have the property frontendToken (base name: "frontendToken")', function() { + // uncomment below and update the code to test the property frontendToken + //var instance = new Zrok.DeleteFrontendRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/DisableRequest.spec.js b/ui/src/api/test/model/DisableRequest.spec.js new file mode 100644 index 00000000..ce2add82 --- /dev/null +++ b/ui/src/api/test/model/DisableRequest.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.DisableRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DisableRequest', function() { + it('should create an instance of DisableRequest', function() { + // uncomment below and update the code to test DisableRequest + //var instance = new Zrok.DisableRequest(); + //expect(instance).to.be.a(Zrok.DisableRequest); + }); + + it('should have the property identity (base name: "identity")', function() { + // uncomment below and update the code to test the property identity + //var instance = new Zrok.DisableRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/EnableRequest.spec.js b/ui/src/api/test/model/EnableRequest.spec.js new file mode 100644 index 00000000..5804158e --- /dev/null +++ b/ui/src/api/test/model/EnableRequest.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.EnableRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EnableRequest', function() { + it('should create an instance of EnableRequest', function() { + // uncomment below and update the code to test EnableRequest + //var instance = new Zrok.EnableRequest(); + //expect(instance).to.be.a(Zrok.EnableRequest); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new Zrok.EnableRequest(); + //expect(instance).to.be(); + }); + + it('should have the property host (base name: "host")', function() { + // uncomment below and update the code to test the property host + //var instance = new Zrok.EnableRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/EnableResponse.spec.js b/ui/src/api/test/model/EnableResponse.spec.js new file mode 100644 index 00000000..d4b2e754 --- /dev/null +++ b/ui/src/api/test/model/EnableResponse.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.EnableResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EnableResponse', function() { + it('should create an instance of EnableResponse', function() { + // uncomment below and update the code to test EnableResponse + //var instance = new Zrok.EnableResponse(); + //expect(instance).to.be.a(Zrok.EnableResponse); + }); + + it('should have the property identity (base name: "identity")', function() { + // uncomment below and update the code to test the property identity + //var instance = new Zrok.EnableResponse(); + //expect(instance).to.be(); + }); + + it('should have the property cfg (base name: "cfg")', function() { + // uncomment below and update the code to test the property cfg + //var instance = new Zrok.EnableResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/Environment.spec.js b/ui/src/api/test/model/Environment.spec.js new file mode 100644 index 00000000..2157fa8b --- /dev/null +++ b/ui/src/api/test/model/Environment.spec.js @@ -0,0 +1,107 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.Environment(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Environment', function() { + it('should create an instance of Environment', function() { + // uncomment below and update the code to test Environment + //var instance = new Zrok.Environment(); + //expect(instance).to.be.a(Zrok.Environment); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + it('should have the property host (base name: "host")', function() { + // uncomment below and update the code to test the property host + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + it('should have the property address (base name: "address")', function() { + // uncomment below and update the code to test the property address + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + it('should have the property zId (base name: "zId")', function() { + // uncomment below and update the code to test the property zId + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + it('should have the property activity (base name: "activity")', function() { + // uncomment below and update the code to test the property activity + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + it('should have the property limited (base name: "limited")', function() { + // uncomment below and update the code to test the property limited + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + it('should have the property createdAt (base name: "createdAt")', function() { + // uncomment below and update the code to test the property createdAt + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + it('should have the property updatedAt (base name: "updatedAt")', function() { + // uncomment below and update the code to test the property updatedAt + //var instance = new Zrok.Environment(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/EnvironmentAndResources.spec.js b/ui/src/api/test/model/EnvironmentAndResources.spec.js new file mode 100644 index 00000000..09907c36 --- /dev/null +++ b/ui/src/api/test/model/EnvironmentAndResources.spec.js @@ -0,0 +1,77 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.EnvironmentAndResources(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('EnvironmentAndResources', function() { + it('should create an instance of EnvironmentAndResources', function() { + // uncomment below and update the code to test EnvironmentAndResources + //var instance = new Zrok.EnvironmentAndResources(); + //expect(instance).to.be.a(Zrok.EnvironmentAndResources); + }); + + it('should have the property environment (base name: "environment")', function() { + // uncomment below and update the code to test the property environment + //var instance = new Zrok.EnvironmentAndResources(); + //expect(instance).to.be(); + }); + + it('should have the property frontends (base name: "frontends")', function() { + // uncomment below and update the code to test the property frontends + //var instance = new Zrok.EnvironmentAndResources(); + //expect(instance).to.be(); + }); + + it('should have the property shares (base name: "shares")', function() { + // uncomment below and update the code to test the property shares + //var instance = new Zrok.EnvironmentAndResources(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/Frontend.spec.js b/ui/src/api/test/model/Frontend.spec.js new file mode 100644 index 00000000..1944f8ff --- /dev/null +++ b/ui/src/api/test/model/Frontend.spec.js @@ -0,0 +1,89 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.Frontend(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Frontend', function() { + it('should create an instance of Frontend', function() { + // uncomment below and update the code to test Frontend + //var instance = new Zrok.Frontend(); + //expect(instance).to.be.a(Zrok.Frontend); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new Zrok.Frontend(); + //expect(instance).to.be(); + }); + + it('should have the property shrToken (base name: "shrToken")', function() { + // uncomment below and update the code to test the property shrToken + //var instance = new Zrok.Frontend(); + //expect(instance).to.be(); + }); + + it('should have the property zId (base name: "zId")', function() { + // uncomment below and update the code to test the property zId + //var instance = new Zrok.Frontend(); + //expect(instance).to.be(); + }); + + it('should have the property createdAt (base name: "createdAt")', function() { + // uncomment below and update the code to test the property createdAt + //var instance = new Zrok.Frontend(); + //expect(instance).to.be(); + }); + + it('should have the property updatedAt (base name: "updatedAt")', function() { + // uncomment below and update the code to test the property updatedAt + //var instance = new Zrok.Frontend(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/InviteRequest.spec.js b/ui/src/api/test/model/InviteRequest.spec.js new file mode 100644 index 00000000..4cddb531 --- /dev/null +++ b/ui/src/api/test/model/InviteRequest.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.InviteRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('InviteRequest', function() { + it('should create an instance of InviteRequest', function() { + // uncomment below and update the code to test InviteRequest + //var instance = new Zrok.InviteRequest(); + //expect(instance).to.be.a(Zrok.InviteRequest); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new Zrok.InviteRequest(); + //expect(instance).to.be(); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.InviteRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/InviteTokenGenerateRequest.spec.js b/ui/src/api/test/model/InviteTokenGenerateRequest.spec.js new file mode 100644 index 00000000..d4ff1615 --- /dev/null +++ b/ui/src/api/test/model/InviteTokenGenerateRequest.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.InviteTokenGenerateRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('InviteTokenGenerateRequest', function() { + it('should create an instance of InviteTokenGenerateRequest', function() { + // uncomment below and update the code to test InviteTokenGenerateRequest + //var instance = new Zrok.InviteTokenGenerateRequest(); + //expect(instance).to.be.a(Zrok.InviteTokenGenerateRequest); + }); + + it('should have the property tokens (base name: "tokens")', function() { + // uncomment below and update the code to test the property tokens + //var instance = new Zrok.InviteTokenGenerateRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/LoginRequest.spec.js b/ui/src/api/test/model/LoginRequest.spec.js new file mode 100644 index 00000000..fb9b2659 --- /dev/null +++ b/ui/src/api/test/model/LoginRequest.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.LoginRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('LoginRequest', function() { + it('should create an instance of LoginRequest', function() { + // uncomment below and update the code to test LoginRequest + //var instance = new Zrok.LoginRequest(); + //expect(instance).to.be.a(Zrok.LoginRequest); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new Zrok.LoginRequest(); + //expect(instance).to.be(); + }); + + it('should have the property password (base name: "password")', function() { + // uncomment below and update the code to test the property password + //var instance = new Zrok.LoginRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/Metrics.spec.js b/ui/src/api/test/model/Metrics.spec.js new file mode 100644 index 00000000..f575e9f4 --- /dev/null +++ b/ui/src/api/test/model/Metrics.spec.js @@ -0,0 +1,83 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.Metrics(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Metrics', function() { + it('should create an instance of Metrics', function() { + // uncomment below and update the code to test Metrics + //var instance = new Zrok.Metrics(); + //expect(instance).to.be.a(Zrok.Metrics); + }); + + it('should have the property scope (base name: "scope")', function() { + // uncomment below and update the code to test the property scope + //var instance = new Zrok.Metrics(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new Zrok.Metrics(); + //expect(instance).to.be(); + }); + + it('should have the property period (base name: "period")', function() { + // uncomment below and update the code to test the property period + //var instance = new Zrok.Metrics(); + //expect(instance).to.be(); + }); + + it('should have the property samples (base name: "samples")', function() { + // uncomment below and update the code to test the property samples + //var instance = new Zrok.Metrics(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/MetricsSample.spec.js b/ui/src/api/test/model/MetricsSample.spec.js new file mode 100644 index 00000000..d41294d7 --- /dev/null +++ b/ui/src/api/test/model/MetricsSample.spec.js @@ -0,0 +1,77 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.MetricsSample(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MetricsSample', function() { + it('should create an instance of MetricsSample', function() { + // uncomment below and update the code to test MetricsSample + //var instance = new Zrok.MetricsSample(); + //expect(instance).to.be.a(Zrok.MetricsSample); + }); + + it('should have the property rx (base name: "rx")', function() { + // uncomment below and update the code to test the property rx + //var instance = new Zrok.MetricsSample(); + //expect(instance).to.be(); + }); + + it('should have the property tx (base name: "tx")', function() { + // uncomment below and update the code to test the property tx + //var instance = new Zrok.MetricsSample(); + //expect(instance).to.be(); + }); + + it('should have the property timestamp (base name: "timestamp")', function() { + // uncomment below and update the code to test the property timestamp + //var instance = new Zrok.MetricsSample(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/Overview.spec.js b/ui/src/api/test/model/Overview.spec.js new file mode 100644 index 00000000..d8936c80 --- /dev/null +++ b/ui/src/api/test/model/Overview.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.Overview(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Overview', function() { + it('should create an instance of Overview', function() { + // uncomment below and update the code to test Overview + //var instance = new Zrok.Overview(); + //expect(instance).to.be.a(Zrok.Overview); + }); + + it('should have the property accountLimited (base name: "accountLimited")', function() { + // uncomment below and update the code to test the property accountLimited + //var instance = new Zrok.Overview(); + //expect(instance).to.be(); + }); + + it('should have the property environments (base name: "environments")', function() { + // uncomment below and update the code to test the property environments + //var instance = new Zrok.Overview(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/PasswordRequirements.spec.js b/ui/src/api/test/model/PasswordRequirements.spec.js new file mode 100644 index 00000000..90d474db --- /dev/null +++ b/ui/src/api/test/model/PasswordRequirements.spec.js @@ -0,0 +1,89 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.PasswordRequirements(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('PasswordRequirements', function() { + it('should create an instance of PasswordRequirements', function() { + // uncomment below and update the code to test PasswordRequirements + //var instance = new Zrok.PasswordRequirements(); + //expect(instance).to.be.a(Zrok.PasswordRequirements); + }); + + it('should have the property length (base name: "length")', function() { + // uncomment below and update the code to test the property length + //var instance = new Zrok.PasswordRequirements(); + //expect(instance).to.be(); + }); + + it('should have the property requireCapital (base name: "requireCapital")', function() { + // uncomment below and update the code to test the property requireCapital + //var instance = new Zrok.PasswordRequirements(); + //expect(instance).to.be(); + }); + + it('should have the property requireNumeric (base name: "requireNumeric")', function() { + // uncomment below and update the code to test the property requireNumeric + //var instance = new Zrok.PasswordRequirements(); + //expect(instance).to.be(); + }); + + it('should have the property requireSpecial (base name: "requireSpecial")', function() { + // uncomment below and update the code to test the property requireSpecial + //var instance = new Zrok.PasswordRequirements(); + //expect(instance).to.be(); + }); + + it('should have the property validSpecialCharacters (base name: "validSpecialCharacters")', function() { + // uncomment below and update the code to test the property validSpecialCharacters + //var instance = new Zrok.PasswordRequirements(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/Principal.spec.js b/ui/src/api/test/model/Principal.spec.js new file mode 100644 index 00000000..d46277df --- /dev/null +++ b/ui/src/api/test/model/Principal.spec.js @@ -0,0 +1,89 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.Principal(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Principal', function() { + it('should create an instance of Principal', function() { + // uncomment below and update the code to test Principal + //var instance = new Zrok.Principal(); + //expect(instance).to.be.a(Zrok.Principal); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new Zrok.Principal(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new Zrok.Principal(); + //expect(instance).to.be(); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.Principal(); + //expect(instance).to.be(); + }); + + it('should have the property limitless (base name: "limitless")', function() { + // uncomment below and update the code to test the property limitless + //var instance = new Zrok.Principal(); + //expect(instance).to.be(); + }); + + it('should have the property admin (base name: "admin")', function() { + // uncomment below and update the code to test the property admin + //var instance = new Zrok.Principal(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/PublicFrontend.spec.js b/ui/src/api/test/model/PublicFrontend.spec.js new file mode 100644 index 00000000..f708db57 --- /dev/null +++ b/ui/src/api/test/model/PublicFrontend.spec.js @@ -0,0 +1,95 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.PublicFrontend(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('PublicFrontend', function() { + it('should create an instance of PublicFrontend', function() { + // uncomment below and update the code to test PublicFrontend + //var instance = new Zrok.PublicFrontend(); + //expect(instance).to.be.a(Zrok.PublicFrontend); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.PublicFrontend(); + //expect(instance).to.be(); + }); + + it('should have the property zId (base name: "zId")', function() { + // uncomment below and update the code to test the property zId + //var instance = new Zrok.PublicFrontend(); + //expect(instance).to.be(); + }); + + it('should have the property urlTemplate (base name: "urlTemplate")', function() { + // uncomment below and update the code to test the property urlTemplate + //var instance = new Zrok.PublicFrontend(); + //expect(instance).to.be(); + }); + + it('should have the property publicName (base name: "publicName")', function() { + // uncomment below and update the code to test the property publicName + //var instance = new Zrok.PublicFrontend(); + //expect(instance).to.be(); + }); + + it('should have the property createdAt (base name: "createdAt")', function() { + // uncomment below and update the code to test the property createdAt + //var instance = new Zrok.PublicFrontend(); + //expect(instance).to.be(); + }); + + it('should have the property updatedAt (base name: "updatedAt")', function() { + // uncomment below and update the code to test the property updatedAt + //var instance = new Zrok.PublicFrontend(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/RegisterRequest.spec.js b/ui/src/api/test/model/RegisterRequest.spec.js new file mode 100644 index 00000000..b831cda7 --- /dev/null +++ b/ui/src/api/test/model/RegisterRequest.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.RegisterRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('RegisterRequest', function() { + it('should create an instance of RegisterRequest', function() { + // uncomment below and update the code to test RegisterRequest + //var instance = new Zrok.RegisterRequest(); + //expect(instance).to.be.a(Zrok.RegisterRequest); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.RegisterRequest(); + //expect(instance).to.be(); + }); + + it('should have the property password (base name: "password")', function() { + // uncomment below and update the code to test the property password + //var instance = new Zrok.RegisterRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/RegisterResponse.spec.js b/ui/src/api/test/model/RegisterResponse.spec.js new file mode 100644 index 00000000..a52bf787 --- /dev/null +++ b/ui/src/api/test/model/RegisterResponse.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.RegisterResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('RegisterResponse', function() { + it('should create an instance of RegisterResponse', function() { + // uncomment below and update the code to test RegisterResponse + //var instance = new Zrok.RegisterResponse(); + //expect(instance).to.be.a(Zrok.RegisterResponse); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.RegisterResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/ResetPasswordRequest.spec.js b/ui/src/api/test/model/ResetPasswordRequest.spec.js new file mode 100644 index 00000000..6b3b9854 --- /dev/null +++ b/ui/src/api/test/model/ResetPasswordRequest.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.ResetPasswordRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ResetPasswordRequest', function() { + it('should create an instance of ResetPasswordRequest', function() { + // uncomment below and update the code to test ResetPasswordRequest + //var instance = new Zrok.ResetPasswordRequest(); + //expect(instance).to.be.a(Zrok.ResetPasswordRequest); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.ResetPasswordRequest(); + //expect(instance).to.be(); + }); + + it('should have the property password (base name: "password")', function() { + // uncomment below and update the code to test the property password + //var instance = new Zrok.ResetPasswordRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/ResetPasswordRequestRequest.spec.js b/ui/src/api/test/model/ResetPasswordRequestRequest.spec.js new file mode 100644 index 00000000..fb01d22d --- /dev/null +++ b/ui/src/api/test/model/ResetPasswordRequestRequest.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.ResetPasswordRequestRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ResetPasswordRequestRequest', function() { + it('should create an instance of ResetPasswordRequestRequest', function() { + // uncomment below and update the code to test ResetPasswordRequestRequest + //var instance = new Zrok.ResetPasswordRequestRequest(); + //expect(instance).to.be.a(Zrok.ResetPasswordRequestRequest); + }); + + it('should have the property emailAddress (base name: "emailAddress")', function() { + // uncomment below and update the code to test the property emailAddress + //var instance = new Zrok.ResetPasswordRequestRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/Share.spec.js b/ui/src/api/test/model/Share.spec.js new file mode 100644 index 00000000..9cfe1423 --- /dev/null +++ b/ui/src/api/test/model/Share.spec.js @@ -0,0 +1,131 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.Share(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Share', function() { + it('should create an instance of Share', function() { + // uncomment below and update the code to test Share + //var instance = new Zrok.Share(); + //expect(instance).to.be.a(Zrok.Share); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property zId (base name: "zId")', function() { + // uncomment below and update the code to test the property zId + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property shareMode (base name: "shareMode")', function() { + // uncomment below and update the code to test the property shareMode + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property backendMode (base name: "backendMode")', function() { + // uncomment below and update the code to test the property backendMode + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property frontendSelection (base name: "frontendSelection")', function() { + // uncomment below and update the code to test the property frontendSelection + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property frontendEndpoint (base name: "frontendEndpoint")', function() { + // uncomment below and update the code to test the property frontendEndpoint + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property backendProxyEndpoint (base name: "backendProxyEndpoint")', function() { + // uncomment below and update the code to test the property backendProxyEndpoint + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property reserved (base name: "reserved")', function() { + // uncomment below and update the code to test the property reserved + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property activity (base name: "activity")', function() { + // uncomment below and update the code to test the property activity + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property limited (base name: "limited")', function() { + // uncomment below and update the code to test the property limited + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property createdAt (base name: "createdAt")', function() { + // uncomment below and update the code to test the property createdAt + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + it('should have the property updatedAt (base name: "updatedAt")', function() { + // uncomment below and update the code to test the property updatedAt + //var instance = new Zrok.Share(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/ShareRequest.spec.js b/ui/src/api/test/model/ShareRequest.spec.js new file mode 100644 index 00000000..65187883 --- /dev/null +++ b/ui/src/api/test/model/ShareRequest.spec.js @@ -0,0 +1,125 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.ShareRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ShareRequest', function() { + it('should create an instance of ShareRequest', function() { + // uncomment below and update the code to test ShareRequest + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be.a(Zrok.ShareRequest); + }); + + it('should have the property envZId (base name: "envZId")', function() { + // uncomment below and update the code to test the property envZId + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property shareMode (base name: "shareMode")', function() { + // uncomment below and update the code to test the property shareMode + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property frontendSelection (base name: "frontendSelection")', function() { + // uncomment below and update the code to test the property frontendSelection + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property backendMode (base name: "backendMode")', function() { + // uncomment below and update the code to test the property backendMode + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property backendProxyEndpoint (base name: "backendProxyEndpoint")', function() { + // uncomment below and update the code to test the property backendProxyEndpoint + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property authScheme (base name: "authScheme")', function() { + // uncomment below and update the code to test the property authScheme + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property authUsers (base name: "authUsers")', function() { + // uncomment below and update the code to test the property authUsers + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property oauthProvider (base name: "oauthProvider")', function() { + // uncomment below and update the code to test the property oauthProvider + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property oauthEmailDomains (base name: "oauthEmailDomains")', function() { + // uncomment below and update the code to test the property oauthEmailDomains + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property oauthAuthorizationCheckInterval (base name: "oauthAuthorizationCheckInterval")', function() { + // uncomment below and update the code to test the property oauthAuthorizationCheckInterval + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property reserved (base name: "reserved")', function() { + // uncomment below and update the code to test the property reserved + //var instance = new Zrok.ShareRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/ShareResponse.spec.js b/ui/src/api/test/model/ShareResponse.spec.js new file mode 100644 index 00000000..b1b00f78 --- /dev/null +++ b/ui/src/api/test/model/ShareResponse.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.ShareResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ShareResponse', function() { + it('should create an instance of ShareResponse', function() { + // uncomment below and update the code to test ShareResponse + //var instance = new Zrok.ShareResponse(); + //expect(instance).to.be.a(Zrok.ShareResponse); + }); + + it('should have the property frontendProxyEndpoints (base name: "frontendProxyEndpoints")', function() { + // uncomment below and update the code to test the property frontendProxyEndpoints + //var instance = new Zrok.ShareResponse(); + //expect(instance).to.be(); + }); + + it('should have the property shrToken (base name: "shrToken")', function() { + // uncomment below and update the code to test the property shrToken + //var instance = new Zrok.ShareResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/SparkDataSample.spec.js b/ui/src/api/test/model/SparkDataSample.spec.js new file mode 100644 index 00000000..5de98c3f --- /dev/null +++ b/ui/src/api/test/model/SparkDataSample.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.SparkDataSample(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('SparkDataSample', function() { + it('should create an instance of SparkDataSample', function() { + // uncomment below and update the code to test SparkDataSample + //var instance = new Zrok.SparkDataSample(); + //expect(instance).to.be.a(Zrok.SparkDataSample); + }); + + it('should have the property rx (base name: "rx")', function() { + // uncomment below and update the code to test the property rx + //var instance = new Zrok.SparkDataSample(); + //expect(instance).to.be(); + }); + + it('should have the property tx (base name: "tx")', function() { + // uncomment below and update the code to test the property tx + //var instance = new Zrok.SparkDataSample(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/UnaccessRequest.spec.js b/ui/src/api/test/model/UnaccessRequest.spec.js new file mode 100644 index 00000000..d4485730 --- /dev/null +++ b/ui/src/api/test/model/UnaccessRequest.spec.js @@ -0,0 +1,77 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.UnaccessRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('UnaccessRequest', function() { + it('should create an instance of UnaccessRequest', function() { + // uncomment below and update the code to test UnaccessRequest + //var instance = new Zrok.UnaccessRequest(); + //expect(instance).to.be.a(Zrok.UnaccessRequest); + }); + + it('should have the property frontendToken (base name: "frontendToken")', function() { + // uncomment below and update the code to test the property frontendToken + //var instance = new Zrok.UnaccessRequest(); + //expect(instance).to.be(); + }); + + it('should have the property envZId (base name: "envZId")', function() { + // uncomment below and update the code to test the property envZId + //var instance = new Zrok.UnaccessRequest(); + //expect(instance).to.be(); + }); + + it('should have the property shrToken (base name: "shrToken")', function() { + // uncomment below and update the code to test the property shrToken + //var instance = new Zrok.UnaccessRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/UnshareRequest.spec.js b/ui/src/api/test/model/UnshareRequest.spec.js new file mode 100644 index 00000000..c1c7d964 --- /dev/null +++ b/ui/src/api/test/model/UnshareRequest.spec.js @@ -0,0 +1,77 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.UnshareRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('UnshareRequest', function() { + it('should create an instance of UnshareRequest', function() { + // uncomment below and update the code to test UnshareRequest + //var instance = new Zrok.UnshareRequest(); + //expect(instance).to.be.a(Zrok.UnshareRequest); + }); + + it('should have the property envZId (base name: "envZId")', function() { + // uncomment below and update the code to test the property envZId + //var instance = new Zrok.UnshareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property shrToken (base name: "shrToken")', function() { + // uncomment below and update the code to test the property shrToken + //var instance = new Zrok.UnshareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property reserved (base name: "reserved")', function() { + // uncomment below and update the code to test the property reserved + //var instance = new Zrok.UnshareRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/UpdateFrontendRequest.spec.js b/ui/src/api/test/model/UpdateFrontendRequest.spec.js new file mode 100644 index 00000000..b90421b1 --- /dev/null +++ b/ui/src/api/test/model/UpdateFrontendRequest.spec.js @@ -0,0 +1,77 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.UpdateFrontendRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('UpdateFrontendRequest', function() { + it('should create an instance of UpdateFrontendRequest', function() { + // uncomment below and update the code to test UpdateFrontendRequest + //var instance = new Zrok.UpdateFrontendRequest(); + //expect(instance).to.be.a(Zrok.UpdateFrontendRequest); + }); + + it('should have the property frontendToken (base name: "frontendToken")', function() { + // uncomment below and update the code to test the property frontendToken + //var instance = new Zrok.UpdateFrontendRequest(); + //expect(instance).to.be(); + }); + + it('should have the property publicName (base name: "publicName")', function() { + // uncomment below and update the code to test the property publicName + //var instance = new Zrok.UpdateFrontendRequest(); + //expect(instance).to.be(); + }); + + it('should have the property urlTemplate (base name: "urlTemplate")', function() { + // uncomment below and update the code to test the property urlTemplate + //var instance = new Zrok.UpdateFrontendRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/UpdateShareRequest.spec.js b/ui/src/api/test/model/UpdateShareRequest.spec.js new file mode 100644 index 00000000..e23ec94f --- /dev/null +++ b/ui/src/api/test/model/UpdateShareRequest.spec.js @@ -0,0 +1,71 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.UpdateShareRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('UpdateShareRequest', function() { + it('should create an instance of UpdateShareRequest', function() { + // uncomment below and update the code to test UpdateShareRequest + //var instance = new Zrok.UpdateShareRequest(); + //expect(instance).to.be.a(Zrok.UpdateShareRequest); + }); + + it('should have the property shrToken (base name: "shrToken")', function() { + // uncomment below and update the code to test the property shrToken + //var instance = new Zrok.UpdateShareRequest(); + //expect(instance).to.be(); + }); + + it('should have the property backendProxyEndpoint (base name: "backendProxyEndpoint")', function() { + // uncomment below and update the code to test the property backendProxyEndpoint + //var instance = new Zrok.UpdateShareRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/VerifyRequest.spec.js b/ui/src/api/test/model/VerifyRequest.spec.js new file mode 100644 index 00000000..c0db8e2e --- /dev/null +++ b/ui/src/api/test/model/VerifyRequest.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.VerifyRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('VerifyRequest', function() { + it('should create an instance of VerifyRequest', function() { + // uncomment below and update the code to test VerifyRequest + //var instance = new Zrok.VerifyRequest(); + //expect(instance).to.be.a(Zrok.VerifyRequest); + }); + + it('should have the property token (base name: "token")', function() { + // uncomment below and update the code to test the property token + //var instance = new Zrok.VerifyRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/test/model/VerifyResponse.spec.js b/ui/src/api/test/model/VerifyResponse.spec.js new file mode 100644 index 00000000..622a3d96 --- /dev/null +++ b/ui/src/api/test/model/VerifyResponse.spec.js @@ -0,0 +1,65 @@ +/** + * zrok + * zrok client access + * + * The version of the OpenAPI document: 0.3.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.Zrok); + } +}(this, function(expect, Zrok) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new Zrok.VerifyResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('VerifyResponse', function() { + it('should create an instance of VerifyResponse', function() { + // uncomment below and update the code to test VerifyResponse + //var instance = new Zrok.VerifyResponse(); + //expect(instance).to.be.a(Zrok.VerifyResponse); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new Zrok.VerifyResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/ui/src/api/types.js b/ui/src/api/types.js deleted file mode 100644 index 5f06119b..00000000 --- a/ui/src/api/types.js +++ /dev/null @@ -1,325 +0,0 @@ -/** @module types */ -// Auto-generated, edits will be overwritten - -/** - * @typedef accessRequest - * @memberof module:types - * - * @property {string} envZId - * @property {string} shrToken - */ - -/** - * @typedef accessResponse - * @memberof module:types - * - * @property {string} frontendToken - * @property {string} backendMode - */ - -/** - * @typedef authUser - * @memberof module:types - * - * @property {string} username - * @property {string} password - */ - -/** - * @typedef configuration - * @memberof module:types - * - * @property {string} version - * @property {string} touLink - * @property {boolean} invitesOpen - * @property {boolean} requiresInviteToken - * @property {string} inviteTokenContact - * @property {module:types.passwordRequirements} passwordRequirements - */ - -/** - * @typedef createFrontendRequest - * @memberof module:types - * - * @property {string} zId - * @property {string} url_template - * @property {string} public_name - */ - -/** - * @typedef createFrontendResponse - * @memberof module:types - * - * @property {string} token - */ - -/** - * @typedef deleteFrontendRequest - * @memberof module:types - * - * @property {string} frontendToken - */ - -/** - * @typedef disableRequest - * @memberof module:types - * - * @property {string} identity - */ - -/** - * @typedef enableRequest - * @memberof module:types - * - * @property {string} description - * @property {string} host - */ - -/** - * @typedef enableResponse - * @memberof module:types - * - * @property {string} identity - * @property {string} cfg - */ - -/** - * @typedef environment - * @memberof module:types - * - * @property {string} description - * @property {string} host - * @property {string} address - * @property {string} zId - * @property {module:types.sparkData} activity - * @property {boolean} limited - * @property {number} createdAt - * @property {number} updatedAt - */ - -/** - * @typedef environmentAndResources - * @memberof module:types - * - * @property {module:types.environment} environment - * @property {module:types.frontends} frontends - * @property {module:types.shares} shares - */ - -/** - * @typedef frontend - * @memberof module:types - * - * @property {number} id - * @property {string} shrToken - * @property {string} zId - * @property {number} createdAt - * @property {number} updatedAt - */ - -/** - * @typedef inviteTokenGenerateRequest - * @memberof module:types - * - * @property {string[]} tokens - */ - -/** - * @typedef inviteRequest - * @memberof module:types - * - * @property {string} email - * @property {string} token - */ - -/** - * @typedef loginRequest - * @memberof module:types - * - * @property {string} email - * @property {string} password - */ - -/** - * @typedef metrics - * @memberof module:types - * - * @property {string} scope - * @property {string} id - * @property {number} period - * @property {module:types.metricsSample[]} samples - */ - -/** - * @typedef metricsSample - * @memberof module:types - * - * @property {number} rx - * @property {number} tx - * @property {number} timestamp - */ - -/** - * @typedef overview - * @memberof module:types - * - * @property {boolean} accountLimited - * @property {module:types.environmentAndResources[]} environments - */ - -/** - * @typedef passwordRequirements - * @memberof module:types - * - * @property {number} length - * @property {boolean} requireCapital - * @property {boolean} requireNumeric - * @property {boolean} requireSpecial - * @property {string} validSpecialCharacters - */ - -/** - * @typedef principal - * @memberof module:types - * - * @property {number} id - * @property {string} email - * @property {string} token - * @property {boolean} limitless - * @property {boolean} admin - */ - -/** - * @typedef publicFrontend - * @memberof module:types - * - * @property {string} token - * @property {string} zId - * @property {string} urlTemplate - * @property {string} publicName - * @property {number} createdAt - * @property {number} updatedAt - */ - -/** - * @typedef registerRequest - * @memberof module:types - * - * @property {string} token - * @property {string} password - */ - -/** - * @typedef registerResponse - * @memberof module:types - * - * @property {string} token - */ - -/** - * @typedef resetPasswordRequest - * @memberof module:types - * - * @property {string} token - * @property {string} password - */ - -/** - * @typedef share - * @memberof module:types - * - * @property {string} token - * @property {string} zId - * @property {string} shareMode - * @property {string} backendMode - * @property {string} frontendSelection - * @property {string} frontendEndpoint - * @property {string} backendProxyEndpoint - * @property {boolean} reserved - * @property {module:types.sparkData} activity - * @property {boolean} limited - * @property {number} createdAt - * @property {number} updatedAt - */ - -/** - * @typedef shareRequest - * @memberof module:types - * - * @property {string} envZId - * @property {string} shareMode - * @property {string[]} frontendSelection - * @property {string} backendMode - * @property {string} backendProxyEndpoint - * @property {string} authScheme - * @property {module:types.authUser[]} authUsers - * @property {string} oauthProvider - * @property {string[]} oauthEmailDomains - * @property {string} oauthAuthorizationCheckInterval - * @property {boolean} reserved - */ - -/** - * @typedef shareResponse - * @memberof module:types - * - * @property {string[]} frontendProxyEndpoints - * @property {string} shrToken - */ - -/** - * @typedef sparkDataSample - * @memberof module:types - * - * @property {number} rx - * @property {number} tx - */ - -/** - * @typedef unaccessRequest - * @memberof module:types - * - * @property {string} frontendToken - * @property {string} envZId - * @property {string} shrToken - */ - -/** - * @typedef unshareRequest - * @memberof module:types - * - * @property {string} envZId - * @property {string} shrToken - * @property {boolean} reserved - */ - -/** - * @typedef updateFrontendRequest - * @memberof module:types - * - * @property {string} frontendToken - * @property {string} publicName - * @property {string} urlTemplate - */ - -/** - * @typedef updateShareRequest - * @memberof module:types - * - * @property {string} shrToken - * @property {string} backendProxyEndpoint - */ - -/** - * @typedef verifyRequest - * @memberof module:types - * - * @property {string} token - */ - -/** - * @typedef verifyResponse - * @memberof module:types - * - * @property {string} email - */ diff --git a/ui/src/console/Console.js b/ui/src/console/Console.js index fc36ae1c..e7af5c39 100644 --- a/ui/src/console/Console.js +++ b/ui/src/console/Console.js @@ -3,7 +3,7 @@ import {useEffect, useState} from "react"; import Visualizer from "./visualizer/Visualizer"; import Enable from "./modals/Enable"; import Version from "./modals/Version"; -import * as metadata from "../api/metadata"; +import {MetadataApi} from "../api/src"; import Detail from "./detail/Detail"; const Console = (props) => { @@ -17,11 +17,13 @@ const Console = (props) => { const [overview, setOverview] = useState({}); + const metadata = new MetadataApi() + useEffect(() => { let mounted = true; metadata.overview().then(resp => { if(mounted) { - setOverview(resp.data); + setOverview(resp); } }); }, []); @@ -31,7 +33,7 @@ const Console = (props) => { let interval = setInterval(() => { metadata.overview().then(resp => { if(mounted) { - setOverview(resp.data); + setOverview(resp); } }) }, 1000); diff --git a/ui/src/console/detail/access/AccessDetail.js b/ui/src/console/detail/access/AccessDetail.js index 455fa016..0d2a031e 100644 --- a/ui/src/console/detail/access/AccessDetail.js +++ b/ui/src/console/detail/access/AccessDetail.js @@ -1,17 +1,18 @@ import {mdiAccessPointNetwork} from "@mdi/js"; import Icon from "@mdi/react"; import {useEffect, useState} from "react"; -import {getFrontendDetail} from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import {Tab, Tabs} from "react-bootstrap"; import DetailTab from "./DetailTab"; const AccessDetail = (props) => { const [detail, setDetail] = useState({}); + const metadata = new MetadataApi() useEffect(() => { - getFrontendDetail(props.selection.feId) + metadata.getFrontendDetail(props.selection.feId) .then(resp => { - setDetail(resp.data); + setDetail(resp); }); }, [props.selection]); diff --git a/ui/src/console/detail/account/EnvironmentsTab.js b/ui/src/console/detail/account/EnvironmentsTab.js index 4141365b..a3b76955 100644 --- a/ui/src/console/detail/account/EnvironmentsTab.js +++ b/ui/src/console/detail/account/EnvironmentsTab.js @@ -1,15 +1,16 @@ import React, {useEffect, useState} from "react"; -import * as metadata from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import {Area, AreaChart, ResponsiveContainer} from "recharts"; import DataTable from "react-data-table-component"; const EnvironmentsTab = (props) => { const [detail, setDetail] = useState([]); + const metadata = new MetadataApi() useEffect(() => { metadata.getAccountDetail() .then(resp => { - setDetail(resp.data); + setDetail(resp); }); }, [props.selection]); @@ -19,7 +20,7 @@ const EnvironmentsTab = (props) => { metadata.getAccountDetail() .then(resp => { if(mounted) { - setDetail(resp.data); + setDetail(resp); } }); }, 5000); diff --git a/ui/src/console/detail/account/MetricsTab.js b/ui/src/console/detail/account/MetricsTab.js index fdcbab7d..fd6ca610 100644 --- a/ui/src/console/detail/account/MetricsTab.js +++ b/ui/src/console/detail/account/MetricsTab.js @@ -1,25 +1,26 @@ import React, {useEffect, useState} from "react"; import {buildMetrics} from "../../metrics/util"; -import * as metadata from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import MetricsView from "../../metrics/MetricsView"; const MetricsTab = () => { const [metrics30, setMetrics30] = useState(buildMetrics([])); const [metrics7, setMetrics7] = useState(buildMetrics([])); const [metrics1, setMetrics1] = useState(buildMetrics([])); + const metadata = new MetadataApi() useEffect(() => { metadata.getAccountMetrics() .then(resp => { - setMetrics30(buildMetrics(resp.data)); + setMetrics30(buildMetrics(resp)); }); metadata.getAccountMetrics({duration: "168h"}) .then(resp => { - setMetrics7(buildMetrics(resp.data)); + setMetrics7(buildMetrics(resp)); }); metadata.getAccountMetrics({duration: "24h"}) .then(resp => { - setMetrics1(buildMetrics(resp.data)); + setMetrics1(buildMetrics(resp)); }); }, []); @@ -29,16 +30,16 @@ const MetricsTab = () => { metadata.getAccountMetrics() .then(resp => { if(mounted) { - setMetrics30(buildMetrics(resp.data)); + setMetrics30(buildMetrics(resp)); } }); metadata.getAccountMetrics({duration: "168h"}) .then(resp => { - setMetrics7(buildMetrics(resp.data)); + setMetrics7(buildMetrics(resp)); }); metadata.getAccountMetrics({duration: "24h"}) .then(resp => { - setMetrics1(buildMetrics(resp.data)); + setMetrics1(buildMetrics(resp)); }); }, 5000); return () => { diff --git a/ui/src/console/detail/environment/ActionsTab.js b/ui/src/console/detail/environment/ActionsTab.js index 4a242829..46d3fad6 100644 --- a/ui/src/console/detail/environment/ActionsTab.js +++ b/ui/src/console/detail/environment/ActionsTab.js @@ -1,7 +1,10 @@ import {Button} from "react-bootstrap"; -import * as environment from "../../../api/environment"; +import {EnvironmentApi} from "../../../api/src"; const ActionsTab = (props) => { + + const environment = new EnvironmentApi() + const deleteEnvironment = (envZId) => { if(window.confirm("Really delete environment '" + envZId + "' and all shares within?")) { environment.disable({body: {identity: envZId}}).then(resp => { diff --git a/ui/src/console/detail/environment/EnvironmentDetail.js b/ui/src/console/detail/environment/EnvironmentDetail.js index 818a4d97..466b6674 100644 --- a/ui/src/console/detail/environment/EnvironmentDetail.js +++ b/ui/src/console/detail/environment/EnvironmentDetail.js @@ -3,18 +3,19 @@ import SharesTab from "./SharesTab"; import {useEffect, useState} from "react"; import Icon from "@mdi/react"; import {mdiConsoleNetwork} from "@mdi/js"; -import {getEnvironmentDetail} from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import DetailTab from "./DetailTab"; import ActionsTab from "./ActionsTab"; import MetricsTab from "./MetricsTab"; const EnvironmentDetail = (props) => { const [detail, setDetail] = useState({}); + const metadata = new MetadataApi() useEffect(() => { - getEnvironmentDetail(props.selection.envZId) + metadata.getEnvironmentDetail(props.selection.envZId) .then(resp => { - setDetail(resp.data); + setDetail(resp); }); }, [props.selection]); diff --git a/ui/src/console/detail/environment/MetricsTab.js b/ui/src/console/detail/environment/MetricsTab.js index 4e46dd6f..91024f65 100644 --- a/ui/src/console/detail/environment/MetricsTab.js +++ b/ui/src/console/detail/environment/MetricsTab.js @@ -1,25 +1,26 @@ import React, {useEffect, useState} from "react"; import {buildMetrics} from "../../metrics/util"; -import * as metadata from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import MetricsView from "../../metrics/MetricsView"; const MetricsTab = (props) => { const [metrics30, setMetrics30] = useState(buildMetrics([])); const [metrics7, setMetrics7] = useState(buildMetrics([])); const [metrics1, setMetrics1] = useState(buildMetrics([])); + const metadata = new MetadataApi() useEffect(() => { metadata.getEnvironmentMetrics(props.selection.envZId) .then(resp => { - setMetrics30(buildMetrics(resp.data)); + setMetrics30(buildMetrics(resp)); }); metadata.getEnvironmentMetrics(props.selection.envZId, {duration: "168h"}) .then(resp => { - setMetrics7(buildMetrics(resp.data)); + setMetrics7(buildMetrics(resp)); }); metadata.getEnvironmentMetrics(props.selection.envZId, {duration: "24h"}) .then(resp => { - setMetrics1(buildMetrics(resp.data)); + setMetrics1(buildMetrics(resp)); }); // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.selection.id]); @@ -30,16 +31,16 @@ const MetricsTab = (props) => { metadata.getEnvironmentMetrics(props.selection.envZId) .then(resp => { if(mounted) { - setMetrics30(buildMetrics(resp.data)); + setMetrics30(buildMetrics(resp)); } }); metadata.getEnvironmentMetrics(props.selection.envZId, {duration: "168h"}) .then(resp => { - setMetrics7(buildMetrics(resp.data)); + setMetrics7(buildMetrics(resp)); }); metadata.getEnvironmentMetrics(props.selection.envZId, {duration: "24h"}) .then(resp => { - setMetrics1(buildMetrics(resp.data)); + setMetrics1(buildMetrics(resp)); }); }, 5000); return () => { diff --git a/ui/src/console/detail/environment/SharesTab.js b/ui/src/console/detail/environment/SharesTab.js index 301ed8a3..d5f89fd5 100644 --- a/ui/src/console/detail/environment/SharesTab.js +++ b/ui/src/console/detail/environment/SharesTab.js @@ -1,15 +1,16 @@ -import * as metadata from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import React, {useEffect, useState} from "react"; import DataTable from 'react-data-table-component'; import {Area, AreaChart, ResponsiveContainer} from "recharts"; const SharesTab = (props) => { const [detail, setDetail] = useState({}); + const metadata = new MetadataApi() useEffect(() => { metadata.getEnvironmentDetail(props.selection.envZId) .then(resp => { - setDetail(resp.data); + setDetail(resp); }); }, [props.selection]); @@ -19,7 +20,7 @@ const SharesTab = (props) => { metadata.getEnvironmentDetail(props.selection.envZId) .then(resp => { if(mounted) { - setDetail(resp.data); + setDetail(resp); } }); }, 5000); diff --git a/ui/src/console/detail/share/ActionsTab.js b/ui/src/console/detail/share/ActionsTab.js index 8d58bcab..b8b91204 100644 --- a/ui/src/console/detail/share/ActionsTab.js +++ b/ui/src/console/detail/share/ActionsTab.js @@ -1,7 +1,8 @@ -import * as share from "../../../api/share"; +import {ShareApi} from "../../../api/src"; import {Button} from "react-bootstrap"; const ActionsTab = (props) => { + const share = new ShareApi() const deleteShare = (envZId, shrToken, reserved) => { console.log(envZId, shrToken, reserved); if(window.confirm("Really delete share '" + shrToken + "'?")) { diff --git a/ui/src/console/detail/share/MetricsTab.js b/ui/src/console/detail/share/MetricsTab.js index b5289eaf..645ac4e9 100644 --- a/ui/src/console/detail/share/MetricsTab.js +++ b/ui/src/console/detail/share/MetricsTab.js @@ -1,26 +1,27 @@ import React, {useEffect, useState} from "react"; import {buildMetrics} from "../../metrics/util"; -import * as metadata from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import MetricsView from "../../metrics/MetricsView"; const MetricsTab = (props) => { const [metrics30, setMetrics30] = useState(buildMetrics([])); const [metrics7, setMetrics7] = useState(buildMetrics([])); const [metrics1, setMetrics1] = useState(buildMetrics([])); + const metadata = new MetadataApi() useEffect(() => { if(props.share.token) { metadata.getShareMetrics(props.share.token) .then(resp => { - setMetrics30(buildMetrics(resp.data)); + setMetrics30(buildMetrics(resp)); }); metadata.getShareMetrics(props.share.token, {duration: "168h"}) .then(resp => { - setMetrics7(buildMetrics(resp.data)); + setMetrics7(buildMetrics(resp)); }); metadata.getShareMetrics(props.share.token, {duration: "24h"}) .then(resp => { - setMetrics1(buildMetrics(resp.data)); + setMetrics1(buildMetrics(resp)); }); } }, [props.share]); @@ -32,19 +33,19 @@ const MetricsTab = (props) => { metadata.getShareMetrics(props.share.token) .then(resp => { if(mounted) { - setMetrics30(buildMetrics(resp.data)); + setMetrics30(buildMetrics(resp)); } }); metadata.getShareMetrics(props.share.token, {duration: "168h"}) .then(resp => { if(mounted) { - setMetrics7(buildMetrics(resp.data)); + setMetrics7(buildMetrics(resp)); } }); metadata.getShareMetrics(props.share.token, {duration: "24h"}) .then(resp => { if(mounted) { - setMetrics1(buildMetrics(resp.data)); + setMetrics1(buildMetrics(resp)); } }); } diff --git a/ui/src/console/detail/share/ShareDetail.js b/ui/src/console/detail/share/ShareDetail.js index d2c56d5a..526590d8 100644 --- a/ui/src/console/detail/share/ShareDetail.js +++ b/ui/src/console/detail/share/ShareDetail.js @@ -1,4 +1,4 @@ -import * as metadata from "../../../api/metadata"; +import {MetadataApi} from "../../../api/src"; import React, {useEffect, useState} from "react"; import {mdiShareVariant} from "@mdi/js"; import Icon from "@mdi/react"; @@ -12,10 +12,12 @@ import MetricsTab from "./MetricsTab"; const ShareDetail = (props) => { const [detail, setDetail] = useState({}); + const metadata = new MetadataApi() + useEffect(() => { metadata.getShareDetail(props.selection.shrToken) .then(resp => { - let detail = resp.data; + let detail = resp; detail.envZId = props.selection.envZId; setDetail(detail); }); @@ -27,7 +29,7 @@ const ShareDetail = (props) => { metadata.getShareDetail(props.selection.shrToken) .then(resp => { if(mounted) { - let detail = resp.data; + let detail = resp; detail.envZId = props.selection.envZId; setDetail(detail); } diff --git a/ui/src/console/login/Login.js b/ui/src/console/login/Login.js index 3c380899..a107197f 100644 --- a/ui/src/console/login/Login.js +++ b/ui/src/console/login/Login.js @@ -1,6 +1,5 @@ import {useEffect, useState} from "react"; -import * as account from '../../api/account'; -import * as metadata from "../../api/metadata" +import {MetadataApi, AccountApi} from "../../api/src" import {Button, Container, Form, Row} from "react-bootstrap"; import { Link } from "react-router-dom"; @@ -10,14 +9,17 @@ const Login = (props) => { const [message, setMessage] = useState(); const [tou, setTou] = useState(); + const metadata = new MetadataApi() + const account = new AccountApi() + const errorMessage =

Login Failed!

; useEffect(() => { metadata.configuration().then(resp => { console.log(resp) if(!resp.error) { - if (resp.data.touLink !== null && resp.data.touLink.trim() !== "") { - setTou(resp.data.touLink) + if (resp.touLink !== null && resp.touLink.trim() !== "") { + setTou(resp.touLink) } } }).catch(err => { @@ -31,22 +33,18 @@ const Login = (props) => { account.login({body: {"email": email, "password": password}}) .then(resp => { - if (!resp.error) { - let user = { - "email": email, - "token": resp.data - } - props.loginSuccess(user) - localStorage.setItem('user', JSON.stringify(user)) - console.log(user) - console.log('login succeeded', resp) - } else { - console.log('login failed') - setMessage(errorMessage); + let user = { + "email": email, + "token": resp } + props.loginSuccess(user) + localStorage.setItem('user', JSON.stringify(user)) + console.log(user) + console.log('login succeeded', resp) }) .catch((resp) => { console.log('login failed', resp) + setMessage(errorMessage); }); }; diff --git a/ui/src/console/modals/Version.js b/ui/src/console/modals/Version.js index 088ad6ec..8857c316 100644 --- a/ui/src/console/modals/Version.js +++ b/ui/src/console/modals/Version.js @@ -1,15 +1,17 @@ import {useEffect, useState} from "react"; -import * as metadata from "../../api/metadata"; +import {MetadataApi} from "../../api/src"; import Modal from "react-bootstrap/Modal"; const Version = (props) => { const [v, setV] = useState(''); + const metadata = new MetadataApi() + useEffect(() => { let mounted = true; metadata.version().then(resp => { if(mounted) { - setV(resp.data); + setV(resp); } }); return () => { diff --git a/ui/src/index.js b/ui/src/index.js index 2fd9ff79..432d11c0 100644 --- a/ui/src/index.js +++ b/ui/src/index.js @@ -1,7 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; -import * as gateway from "./api/gateway"; +import {ApiClient} from "./api/src" import App from "./App"; const root = ReactDOM.createRoot(document.getElementById('root')); @@ -9,18 +9,6 @@ root.render( ); -gateway.init({ - url: '/api/v1', - getAuthorization -}); - -function getAuthorization(security) { - switch(security.id) { - case 'key': return getApiKey(); - default: console.log('default'); - } -} - function getApiKey() { const localUser = JSON.parse(localStorage.getItem("user")) if(localUser) { @@ -28,4 +16,12 @@ function getApiKey() { } else { throw new Error("token not available"); } -} \ No newline at end of file +} + +getApiKey().then(key => { + let defaultClient = ApiClient.instance; + // Configure API key authorization: key + let k = defaultClient.authentications['key']; + k.apiKey = key.apiKey; + +}) \ No newline at end of file diff --git a/ui/src/register/Register.js b/ui/src/register/Register.js index 539baca3..5156ec14 100644 --- a/ui/src/register/Register.js +++ b/ui/src/register/Register.js @@ -1,6 +1,6 @@ import { useParams } from 'react-router-dom'; import {useEffect, useState} from "react"; -import * as account from "../api/account"; +import {AccountApi} from "../api/src"; import InvalidRequest from "./InvalidRequest"; import SetPasswordForm from "./SetPasswordForm"; @@ -11,6 +11,8 @@ const Register = () => { const [email, setEmail] = useState(); const [activeRequest, setActiveRequest] = useState(true); + const account = new AccountApi() + useEffect(() => { let mounted = true account.verify({body: {token: token}}).then(resp => { @@ -18,7 +20,7 @@ const Register = () => { if(resp.error) { setActiveRequest(false); } else { - setEmail(resp.data.email); + setEmail(resp.email); } } }).catch(err => { diff --git a/ui/src/register/SetPasswordForm.js b/ui/src/register/SetPasswordForm.js index ef979ae0..78dd91d9 100644 --- a/ui/src/register/SetPasswordForm.js +++ b/ui/src/register/SetPasswordForm.js @@ -1,6 +1,5 @@ import React, {useEffect, useState} from "react"; -import * as account from "../api/account"; -import * as metadata from "../api/metadata" +import {MetadataApi, AccountApi} from "../api/src" import Success from "./Success"; import {Button, Container, Form, Row} from "react-bootstrap"; import PasswordForm from "../components/password"; @@ -19,17 +18,20 @@ const SetPasswordForm = (props) => { const registerFailed =

Account creation failed!

+ const metadata = new MetadataApi() + const account = new AccountApi() + useEffect(() => { metadata.configuration().then(resp => { if(!resp.error) { - if (resp.data.touLink !== undefined && resp.data.touLink.trim() !== "") { - setTou(resp.data.touLink) + if (resp.touLink !== undefined && resp.touLink.trim() !== "") { + setTou(resp.touLink) } - setPasswordLength(resp.data.passwordRequirements.length) - setPasswordRequireCapital(resp.data.passwordRequirements.requireCapital) - setPasswordRequireNumeric(resp.data.passwordRequirements.requireNumeric) - setPasswordRequireSpecial(resp.data.passwordRequirements.requireSpecial) - setPasswordValidSpecialCharacters(resp.data.passwordRequirements.validSpecialCharacters) + setPasswordLength(resp.passwordRequirements.length) + setPasswordRequireCapital(resp.passwordRequirements.requireCapital) + setPasswordRequireNumeric(resp.passwordRequirements.requireNumeric) + setPasswordRequireSpecial(resp.passwordRequirements.requireSpecial) + setPasswordValidSpecialCharacters(resp.passwordRequirements.validSpecialCharacters) } }).catch(err => { console.log("err", err); @@ -41,14 +43,10 @@ const SetPasswordForm = (props) => { if (password !== undefined && password !== "") { account.register({body: {"token": props.token, "password": password}}) .then(resp => { - if(!resp.error) { - console.log("resp", resp) - setMessage(undefined); - setAuthToken(resp.data.token); - setComplete(true); - } else { - setMessage(registerFailed); - } + console.log("resp", resp) + setMessage(undefined); + setAuthToken(resp.token); + setComplete(true); }) .catch(resp => { console.log("resp", resp); diff --git a/ui/src/resetPassword/SendRequest.js b/ui/src/resetPassword/SendRequest.js index 1637ed8b..719cd259 100644 --- a/ui/src/resetPassword/SendRequest.js +++ b/ui/src/resetPassword/SendRequest.js @@ -1,22 +1,20 @@ import { useState } from "react"; -import * as account from '../api/account'; +import {AccountApi} from '../api/src'; import { Button, Container, Form, Row } from "react-bootstrap"; const SendRequest = () => { const [email, setEmail] = useState(''); const [complete, setComplete] = useState(false); + const account = new AccountApi() + const handleSubmit = async e => { e.preventDefault(); console.log(email); account.resetPasswordRequest({ body: { "emailAddress": email } }) .then(resp => { - if (!resp.error) { - setComplete(true) - } else { - setComplete(true) - } + setComplete(true) }) .catch((resp) => { setComplete(true) diff --git a/ui/src/resetPassword/SetNewPassword.js b/ui/src/resetPassword/SetNewPassword.js index 97e6f345..920f3a35 100644 --- a/ui/src/resetPassword/SetNewPassword.js +++ b/ui/src/resetPassword/SetNewPassword.js @@ -1,6 +1,5 @@ import {useEffect, useState} from "react"; -import * as account from '../api/account'; -import * as metadata from "../api/metadata" +import {MetadataApi, AccountApi, ResetPasswordRequest} from "../api/src" import {Button, Container, Form, Row} from "react-bootstrap"; import { Link } from "react-router-dom"; import PasswordForm from "../components/password"; @@ -17,14 +16,17 @@ const SetNewPassword = (props) => { const errorMessage =

Reset Password Failed!

; + const metadata = new MetadataApi() + const account = new AccountApi() + useEffect(() => { metadata.configuration().then(resp => { if(!resp.error) { - setPasswordLength(resp.data.passwordRequirements.length) - setPasswordRequireCapital(resp.data.passwordRequirements.requireCapital) - setPasswordRequireNumeric(resp.data.passwordRequirements.requireNumeric) - setPasswordRequireSpecial(resp.data.passwordRequirements.requireSpecial) - setPasswordValidSpecialCharacters(resp.data.passwordRequirements.validSpecialCharacters) + setPasswordLength(resp.passwordRequirements.length) + setPasswordRequireCapital(resp.passwordRequirements.requireCapital) + setPasswordRequireNumeric(resp.passwordRequirements.requireNumeric) + setPasswordRequireSpecial(resp.passwordRequirements.requireSpecial) + setPasswordValidSpecialCharacters(resp.passwordRequirements.validSpecialCharacters) } }).catch(err => { console.log("err", err); @@ -36,14 +38,12 @@ const SetNewPassword = (props) => { if (password !== undefined && password !== "") { account.resetPassword({body: {"token": props.token, "password": password}}) .then(resp => { - if(!resp.error) { - setMessage(undefined); - setComplete(true); - } else { - setMessage(errorMessage); - } + console.log(resp) + setMessage(undefined); + setComplete(true); }) .catch(resp => { + console.log(resp) setMessage(errorMessage); }) }