update openapi generator and used api's

This commit is contained in:
Cam 2023-12-11 14:14:42 -06:00
parent 7c5680077c
commit 03b4c643c0
No known key found for this signature in database
GPG Key ID: 367B7C7EBD84A8BD
170 changed files with 13120 additions and 1444 deletions

1
.gitignore vendored
View File

@ -15,6 +15,7 @@ etc/dev-frontend.yml
# Generated files
.docusaurus
.cache-loader
openapitools.json
sdk/python/sdk/build/

View File

@ -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

18
ui/config-overrides.js Normal file
View File

@ -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;
}

305
ui/package-lock.json generated
View File

@ -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",

View File

@ -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": {

33
ui/src/api/.babelrc Normal file
View File

@ -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"
]
}

130
ui/src/api/.gitignore vendored Normal file
View File

@ -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.*

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
7.1.0

206
ui/src/api/README.md Normal file
View File

@ -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/<JAVASCRIPT_CLIENT_DIR>
```
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

View File

@ -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<object>} 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<module:types.loginResponse>} 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<module:types.registerResponse>} 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<object>} 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<object>} 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<module:types.verifyResponse>} 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'
}

View File

@ -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<module:types.createFrontendResponse>} 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<object>} 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<object>} 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<object>} 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<object>} 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'
}
]
}

View File

@ -0,0 +1,10 @@
# Zrok.AccessRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**envZId** | **String** | | [optional]
**shrToken** | **String** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.AccessResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontendToken** | **String** | | [optional]
**backendMode** | **String** | | [optional]

View File

@ -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

308
ui/src/api/docs/AdminApi.md Normal file
View File

@ -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

View File

@ -0,0 +1,10 @@
# Zrok.AuthUser
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **String** | | [optional]
**password** | **String** | | [optional]

View File

@ -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]

View File

@ -0,0 +1,11 @@
# Zrok.CreateFrontendRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**zId** | **String** | | [optional]
**urlTemplate** | **String** | | [optional]
**publicName** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.CreateFrontendResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.CreateIdentity201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**identity** | **String** | | [optional]
**cfg** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.CreateIdentityRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.DeleteFrontendRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontendToken** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.DisableRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**identity** | **String** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.EnableRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **String** | | [optional]
**host** | **String** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.EnableResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**identity** | **String** | | [optional]
**cfg** | **String** | | [optional]

View File

@ -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]

View File

@ -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]

View File

@ -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

View File

@ -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]

View File

@ -0,0 +1,10 @@
# Zrok.InviteRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **String** | | [optional]
**token** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.InviteTokenGenerateRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tokens** | **[String]** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.LoginRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **String** | | [optional]
**password** | **String** | | [optional]

View File

@ -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

View File

@ -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]

View File

@ -0,0 +1,11 @@
# Zrok.MetricsSample
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**rx** | **Number** | | [optional]
**tx** | **Number** | | [optional]
**timestamp** | **Number** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.Overview
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accountLimited** | **Boolean** | | [optional]
**environments** | [**[EnvironmentAndResources]**](EnvironmentAndResources.md) | | [optional]

View File

@ -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]

View File

@ -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]

View File

@ -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]

View File

@ -0,0 +1,10 @@
# Zrok.RegisterRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]
**password** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.RegisterResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.ResetPasswordRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]
**password** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.ResetPasswordRequestRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**emailAddress** | **String** | | [optional]

20
ui/src/api/docs/Share.md Normal file
View File

@ -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]

263
ui/src/api/docs/ShareApi.md Normal file
View File

@ -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

View File

@ -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"`)

View File

@ -0,0 +1,10 @@
# Zrok.ShareResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontendProxyEndpoints** | **[String]** | | [optional]
**shrToken** | **String** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.SparkDataSample
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**rx** | **Number** | | [optional]
**tx** | **Number** | | [optional]

View File

@ -0,0 +1,11 @@
# Zrok.UnaccessRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontendToken** | **String** | | [optional]
**envZId** | **String** | | [optional]
**shrToken** | **String** | | [optional]

View File

@ -0,0 +1,11 @@
# Zrok.UnshareRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**envZId** | **String** | | [optional]
**shrToken** | **String** | | [optional]
**reserved** | **Boolean** | | [optional]

View File

@ -0,0 +1,11 @@
# Zrok.UpdateFrontendRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontendToken** | **String** | | [optional]
**publicName** | **String** | | [optional]
**urlTemplate** | **String** | | [optional]

View File

@ -0,0 +1,10 @@
# Zrok.UpdateShareRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shrToken** | **String** | | [optional]
**backendProxyEndpoint** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.VerifyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]

View File

@ -0,0 +1,9 @@
# Zrok.VerifyResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **String** | | [optional]

View File

@ -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<module:types.enableResponse>} 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<object>} 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'
}
]
}

View File

@ -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
}

View File

@ -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

View File

@ -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<module:types.environmentAndResources>} ok
*/
export function getEnvironmentDetail(envZId) {
const parameters = {
path: {
envZId
}
}
return gateway.request(getEnvironmentDetailOperation, parameters)
}
/**
* @param {number} feId
* @return {Promise<module:types.frontend>} ok
*/
export function getFrontendDetail(feId) {
const parameters = {
path: {
feId
}
}
return gateway.request(getFrontendDetailOperation, parameters)
}
/**
* @param {string} shrToken
* @return {Promise<module:types.share>} 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<module:types.metrics>} 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<module:types.metrics>} 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<module:types.metrics>} 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'
}

1
ui/src/api/mocha.opts Normal file
View File

@ -0,0 +1 @@
--timeout 10000

46
ui/src/api/package.json Normal file
View File

@ -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"
]
}

View File

@ -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<module:types.accessResponse>} 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<module:types.shareResponse>} 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<object>} 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<object>} 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<object>} 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'
}
]
}

693
ui/src/api/src/ApiClient.js Normal file
View File

@ -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.<String>}
*/
this.authentications = {
'key': {type: 'apiKey', 'in': 'header', name: 'x-token'}
}
/**
* The default HTTP headers to be included for all API calls.
* @type {Array.<String>}
* @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 <code>param</code>.
*/
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 <code>param</code> 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.<br>
* JSON content type examples:<br>
* <ul>
* <li>application/json</li>
* <li>application/json; charset=UTF8</li>
* <li>APPLICATION/JSON</li>
* </ul>
* @param {String} contentType The MIME content type to check.
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
*/
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.<String>} 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} <code>true</code> if <code>param</code> 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:
* <ul>
* <li>remove nils</li>
* <li>keep files and arrays</li>
* <li>format to string with `paramToString` for other cases</li>
* </ul>
* @param {Object.<String, Object>} params The parameters as object properties.
* @returns {Object.<String, 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
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
*/
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 <code>superagent()</code> call.
* @param {Array.<String>} 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.<String>|Object.<String, 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 <code>data<code> 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.<String, String>} pathParams A map of path parameters and their values.
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
* @param {Object} bodyParam The value to pass as the request body.
* @param {Array.<String>} authNames An array of authentication type names.
* @param {Array.<String>} contentTypes An array of request MIME types.
* @param {Array.<String>} 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.<String>|Object.<String, 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 <code>data<code> 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: <code>csv</code>
* @const
*/
CSV: ',',
/**
* Space-separated values. Value: <code>ssv</code>
* @const
*/
SSV: ' ',
/**
* Tab-separated values. Value: <code>tsv</code>
* @const
*/
TSV: '\t',
/**
* Pipe(|)-separated values. Value: <code>pipes</code>
* @const
*/
PIPES: '|',
/**
* Native array. Value: <code>multi</code>
* @const
*/
MULTI: 'multi'
};
/**
* The default API client implementation.
* @type {module:ApiClient}
*/
ApiClient.instance = new ApiClient();
export default ApiClient;

View File

@ -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;
});
}
}

View File

@ -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.<module:model/PublicFrontend>} 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.<module:model/PublicFrontend>}
*/
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;
});
}
}

View File

@ -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;
});
}
}

View File

@ -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.<module:model/Environment>} 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.<module:model/Environment>}
*/
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;
});
}
}

View File

@ -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;
});
}
}

356
ui/src/api/src/index.js Normal file
View File

@ -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.<br>
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
* <p>
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
* <pre>
* 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.
* ...
* </pre>
* <em>*NOTE: For a top-level AMD script, use require(['index'], function(){...})
* and put the application logic within the callback function.</em>
* </p>
* <p>
* A non-AMD browser application (discouraged) might do something like this:
* <pre>
* 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.
* ...
* </pre>
* </p>
* @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
};

View File

@ -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 <code>AccessRequest</code>.
* @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 <code>AccessRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>AccessRequest</code> 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 <code>AccessRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AccessRequest</code>.
*/
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;

View File

@ -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 <code>AccessResponse</code>.
* @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 <code>AccessResponse</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>AccessResponse</code> 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 <code>AccessResponse</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AccessResponse</code>.
*/
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;

View File

@ -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 <code>AuthUser</code>.
* @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 <code>AuthUser</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>AuthUser</code> 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 <code>AuthUser</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>AuthUser</code>.
*/
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;

View File

@ -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 <code>Configuration</code>.
* @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 <code>Configuration</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>Configuration</code> 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 <code>Configuration</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Configuration</code>.
*/
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;

View File

@ -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 <code>CreateFrontendRequest</code>.
* @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 <code>CreateFrontendRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>CreateFrontendRequest</code> 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 <code>CreateFrontendRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateFrontendRequest</code>.
*/
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;

View File

@ -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 <code>CreateFrontendResponse</code>.
* @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 <code>CreateFrontendResponse</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>CreateFrontendResponse</code> 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 <code>CreateFrontendResponse</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateFrontendResponse</code>.
*/
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;

View File

@ -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 <code>CreateIdentity201Response</code>.
* @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 <code>CreateIdentity201Response</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>CreateIdentity201Response</code> 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 <code>CreateIdentity201Response</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateIdentity201Response</code>.
*/
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;

View File

@ -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 <code>CreateIdentityRequest</code>.
* @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 <code>CreateIdentityRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>CreateIdentityRequest</code> 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 <code>CreateIdentityRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateIdentityRequest</code>.
*/
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;

View File

@ -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 <code>DeleteFrontendRequest</code>.
* @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 <code>DeleteFrontendRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>DeleteFrontendRequest</code> 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 <code>DeleteFrontendRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DeleteFrontendRequest</code>.
*/
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;

View File

@ -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 <code>DisableRequest</code>.
* @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 <code>DisableRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>DisableRequest</code> 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 <code>DisableRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DisableRequest</code>.
*/
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;

View File

@ -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 <code>EnableRequest</code>.
* @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 <code>EnableRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>EnableRequest</code> 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 <code>EnableRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>EnableRequest</code>.
*/
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;

View File

@ -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 <code>EnableResponse</code>.
* @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 <code>EnableResponse</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>EnableResponse</code> 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 <code>EnableResponse</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>EnableResponse</code>.
*/
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;

View File

@ -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 <code>Environment</code>.
* @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 <code>Environment</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>Environment</code> 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 <code>Environment</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Environment</code>.
*/
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.<module:model/SparkDataSample>} 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;

View File

@ -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 <code>EnvironmentAndResources</code>.
* @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 <code>EnvironmentAndResources</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>EnvironmentAndResources</code> 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 <code>EnvironmentAndResources</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>EnvironmentAndResources</code>.
*/
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.<module:model/Frontend>} frontends
*/
EnvironmentAndResources.prototype['frontends'] = undefined;
/**
* @member {Array.<module:model/Share>} shares
*/
EnvironmentAndResources.prototype['shares'] = undefined;
export default EnvironmentAndResources;

View File

@ -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 <code>Frontend</code>.
* @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 <code>Frontend</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>Frontend</code> 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 <code>Frontend</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Frontend</code>.
*/
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;

View File

@ -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 <code>InviteRequest</code>.
* @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 <code>InviteRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>InviteRequest</code> 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 <code>InviteRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>InviteRequest</code>.
*/
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;

View File

@ -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 <code>InviteTokenGenerateRequest</code>.
* @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 <code>InviteTokenGenerateRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>InviteTokenGenerateRequest</code> 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 <code>InviteTokenGenerateRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>InviteTokenGenerateRequest</code>.
*/
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.<String>} tokens
*/
InviteTokenGenerateRequest.prototype['tokens'] = undefined;
export default InviteTokenGenerateRequest;

View File

@ -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 <code>LoginRequest</code>.
* @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 <code>LoginRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>LoginRequest</code> 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 <code>LoginRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>LoginRequest</code>.
*/
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;

View File

@ -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 <code>Metrics</code>.
* @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 <code>Metrics</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>Metrics</code> 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 <code>Metrics</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Metrics</code>.
*/
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.<module:model/MetricsSample>} samples
*/
Metrics.prototype['samples'] = undefined;
export default Metrics;

View File

@ -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 <code>MetricsSample</code>.
* @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 <code>MetricsSample</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>MetricsSample</code> 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 <code>MetricsSample</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>MetricsSample</code>.
*/
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;

View File

@ -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 <code>Overview</code>.
* @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 <code>Overview</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>Overview</code> 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 <code>Overview</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Overview</code>.
*/
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.<module:model/EnvironmentAndResources>} environments
*/
Overview.prototype['environments'] = undefined;
export default Overview;

View File

@ -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 <code>PasswordRequirements</code>.
* @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 <code>PasswordRequirements</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>PasswordRequirements</code> 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 <code>PasswordRequirements</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PasswordRequirements</code>.
*/
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;

View File

@ -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 <code>Principal</code>.
* @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 <code>Principal</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>Principal</code> 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 <code>Principal</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Principal</code>.
*/
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;

View File

@ -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 <code>PublicFrontend</code>.
* @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 <code>PublicFrontend</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>PublicFrontend</code> 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 <code>PublicFrontend</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>PublicFrontend</code>.
*/
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;

View File

@ -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 <code>RegisterRequest</code>.
* @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 <code>RegisterRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>RegisterRequest</code> 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 <code>RegisterRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RegisterRequest</code>.
*/
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;

View File

@ -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 <code>RegisterResponse</code>.
* @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 <code>RegisterResponse</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>RegisterResponse</code> 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 <code>RegisterResponse</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RegisterResponse</code>.
*/
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;

View File

@ -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 <code>ResetPasswordRequest</code>.
* @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 <code>ResetPasswordRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>ResetPasswordRequest</code> 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 <code>ResetPasswordRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ResetPasswordRequest</code>.
*/
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;

View File

@ -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 <code>ResetPasswordRequestRequest</code>.
* @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 <code>ResetPasswordRequestRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>ResetPasswordRequestRequest</code> 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 <code>ResetPasswordRequestRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ResetPasswordRequestRequest</code>.
*/
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;

View File

@ -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 <code>Share</code>.
* @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 <code>Share</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>Share</code> 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 <code>Share</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>Share</code>.
*/
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.<module:model/SparkDataSample>} 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;

View File

@ -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 <code>ShareRequest</code>.
* @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 <code>ShareRequest</code> from a plain JavaScript object, optionally creating a new instance.
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>ShareRequest</code> 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 <code>ShareRequest</code>.
* @param {Object} data The plain JavaScript object bearing properties of interest.
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ShareRequest</code>.
*/
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.<String>} 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.<module:model/AuthUser>} authUsers
*/
ShareRequest.prototype['authUsers'] = undefined;
/**
* @member {module:model/ShareRequest.OauthProviderEnum} oauthProvider
*/
ShareRequest.prototype['oauthProvider'] = undefined;
/**
* @member {Array.<String>} oauthEmailDomains
*/
ShareRequest.prototype['oauthEmailDomains'] = undefined;
/**
* @member {String} oauthAuthorizationCheckInterval
*/
ShareRequest.prototype['oauthAuthorizationCheckInterval'] = undefined;
/**
* @member {Boolean} reserved
*/
ShareRequest.prototype['reserved'] = undefined;
/**
* Allowed values for the <code>shareMode</code> property.
* @enum {String}
* @readonly
*/
ShareRequest['ShareModeEnum'] = {
/**
* value: "public"
* @const
*/
"public": "public",
/**
* value: "private"
* @const
*/
"private": "private"
};
/**
* Allowed values for the <code>backendMode</code> 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 <code>oauthProvider</code> property.
* @enum {String}
* @readonly
*/
ShareRequest['OauthProviderEnum'] = {
/**
* value: "github"
* @const
*/
"github": "github",
/**
* value: "google"
* @const
*/
"google": "google"
};
export default ShareRequest;

Some files were not shown because too many files have changed in this diff Show More