mirror of
https://github.com/openziti/zrok.git
synced 2024-11-22 08:03:49 +01:00
throwing things at the wall (#221)
This commit is contained in:
parent
ba34f472bb
commit
fe97b6d4cd
7
agent/agentUi/package-lock.json
generated
7
agent/agentUi/package-lock.json
generated
@ -12,6 +12,7 @@
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@mui/icons-material": "^6.1.2",
|
||||
"@mui/material": "^6.1.2",
|
||||
"@ungap/structured-clone": "^1.2.0",
|
||||
"bootstrap": "^5.3.3",
|
||||
"formik": "^2.4.6",
|
||||
"react": "^18.3.1",
|
||||
@ -1800,6 +1801,12 @@
|
||||
"integrity": "sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@ungap/structured-clone": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
|
||||
"integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/@vitejs/plugin-react": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.2.tgz",
|
||||
|
@ -14,6 +14,7 @@
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@mui/icons-material": "^6.1.2",
|
||||
"@mui/material": "^6.1.2",
|
||||
"@ungap/structured-clone": "^1.2.0",
|
||||
"bootstrap": "^5.3.3",
|
||||
"formik": "^2.4.6",
|
||||
"react": "^18.3.1",
|
||||
|
@ -2,16 +2,15 @@ import {createBrowserRouter, RouterProvider} from "react-router-dom";
|
||||
import Overview from "./Overview.jsx";
|
||||
import ShareDetail from "./ShareDetail.jsx";
|
||||
import {useEffect, useState} from "react";
|
||||
import {AgentApi, ApiClient} from "./api/src/index.js";
|
||||
import buildOverview from "./model/overview.js";
|
||||
import NavBar from "./NavBar.jsx";
|
||||
import NewShareModal from "./NewShareModal.jsx";
|
||||
import NewAccessModal from "./NewAccessModal.jsx";
|
||||
import {accessHandler, releaseAccess, releaseShare, shareHandler} from "./model/handler.js";
|
||||
import {accessHandler, getAgentApi, releaseAccess, releaseShare, shareHandler} from "./model/handler.js";
|
||||
|
||||
const AgentUi = () => {
|
||||
const [version, setVersion] = useState("");
|
||||
const [overview, setOverview] = useState(new Map());
|
||||
const [overview, setOverview] = useState([]);
|
||||
|
||||
const [newShare, setNewShare] = useState(false);
|
||||
const openNewShare = () => {
|
||||
@ -29,36 +28,33 @@ const AgentUi = () => {
|
||||
setNewAccess(false);
|
||||
}
|
||||
|
||||
let api = new AgentApi(new ApiClient(window.location.protocol+'//'+window.location.host));
|
||||
|
||||
useEffect(() => {
|
||||
let mounted = true;
|
||||
api.agentVersion((err, data) => {
|
||||
if(mounted) {
|
||||
setVersion(data.v);
|
||||
}
|
||||
getAgentApi().agentVersion((err, data) => {
|
||||
setVersion(data.v);
|
||||
});
|
||||
return () => {
|
||||
setVersion("");
|
||||
}
|
||||
}, []);
|
||||
|
||||
const newStatus = (err, data) => {
|
||||
if(err) {
|
||||
console.log("newState", err);
|
||||
setOverview([]);
|
||||
} else {
|
||||
setOverview(buildOverview(data));
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
let mounted = true;
|
||||
api.agentStatus((err, data) => {
|
||||
if(mounted) {
|
||||
setOverview(buildOverview(data));
|
||||
}
|
||||
});
|
||||
let interval = setInterval(() => {
|
||||
api.agentStatus((err, data) => {
|
||||
if(mounted) {
|
||||
setOverview(buildOverview(data));
|
||||
}
|
||||
});
|
||||
getAgentApi().agentStatus(newStatus);
|
||||
}, 1000);
|
||||
return () => {
|
||||
mounted = false;
|
||||
clearInterval(interval);
|
||||
setOverview([]);
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
@ -85,7 +81,7 @@ const AgentUi = () => {
|
||||
<NewShareModal show={newShare} close={closeNewShare} handler={shareHandler} />
|
||||
<NewAccessModal show={newAccess} close={closeNewAccess} handler={accessHandler} />
|
||||
</>
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
export default AgentUi;
|
@ -4,10 +4,11 @@ import AccessCard from "./AccessCard.jsx";
|
||||
import LanIcon from "@mui/icons-material/Lan";
|
||||
import ShareIcon from "@mui/icons-material/Share";
|
||||
import {Card} from "@mui/material";
|
||||
import buildOverview from "./model/overview.js";
|
||||
|
||||
const Overview = (props) => {
|
||||
let cards = [];
|
||||
if(props.overview.size > 0) {
|
||||
if(props.overview.length > 0) {
|
||||
props.overview.forEach((row) => {
|
||||
switch(row.type) {
|
||||
case "share":
|
||||
|
130
agent/agentUi/src/api/.gitignore
vendored
130
agent/agentUi/src/api/.gitignore
vendored
@ -1,130 +0,0 @@
|
||||
# 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.*
|
@ -1,31 +0,0 @@
|
||||
.babelrc
|
||||
.gitignore
|
||||
.travis.yml
|
||||
README.md
|
||||
docs/AccessDetail.md
|
||||
docs/AccessPrivateResponse.md
|
||||
docs/AgentApi.md
|
||||
docs/ProtobufAny.md
|
||||
docs/RpcStatus.md
|
||||
docs/ShareDetail.md
|
||||
docs/SharePrivateResponse.md
|
||||
docs/SharePublicResponse.md
|
||||
docs/ShareReservedResponse.md
|
||||
docs/StatusResponse.md
|
||||
docs/VersionResponse.md
|
||||
git_push.sh
|
||||
mocha.opts
|
||||
package.json
|
||||
src/ApiClient.js
|
||||
src/api/AgentApi.js
|
||||
src/index.js
|
||||
src/model/AccessDetail.js
|
||||
src/model/AccessPrivateResponse.js
|
||||
src/model/ProtobufAny.js
|
||||
src/model/RpcStatus.js
|
||||
src/model/ShareDetail.js
|
||||
src/model/SharePrivateResponse.js
|
||||
src/model/SharePublicResponse.js
|
||||
src/model/ShareReservedResponse.js
|
||||
src/model/StatusResponse.js
|
||||
src/model/VersionResponse.js
|
@ -1 +0,0 @@
|
||||
7.7.0
|
@ -1,11 +1,11 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
# Swagger Codegen Ignore
|
||||
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||
|
||||
# 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:
|
||||
# You can make changes and tell Swagger Codgen 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 (*):
|
1
agent/agentUi/src/api/.swagger-codegen/VERSION
Normal file
1
agent/agentUi/src/api/.swagger-codegen/VERSION
Normal file
@ -0,0 +1 @@
|
||||
3.0.51
|
@ -1,5 +1,7 @@
|
||||
language: node_js
|
||||
cache: npm
|
||||
node_js:
|
||||
- "6"
|
||||
- "6.1"
|
||||
- "5"
|
||||
- "5.11"
|
||||
|
||||
|
155
agent/agentUi/src/api/Agent.js
Normal file
155
agent/agentUi/src/api/Agent.js
Normal file
@ -0,0 +1,155 @@
|
||||
/** @module Agent */
|
||||
// Auto-generated, edits will be overwritten
|
||||
import * as gateway from './gateway'
|
||||
|
||||
/**
|
||||
* @param {object} options Optional options
|
||||
* @param {string} [options.token]
|
||||
* @param {string} [options.bindAddress]
|
||||
* @param {string[]} [options.responseHeaders]
|
||||
* @return {Promise<module:types.AccessPrivateResponse>} A successful response.
|
||||
*/
|
||||
export function Agent_AccessPrivate(options) {
|
||||
if (!options) options = {}
|
||||
const parameters = {
|
||||
query: {
|
||||
token: options.token,
|
||||
bindAddress: options.bindAddress,
|
||||
responseHeaders: gateway.formatArrayParam(options.responseHeaders, 'multi', 'responseHeaders')
|
||||
}
|
||||
}
|
||||
return gateway.request(Agent_AccessPrivateOperation, parameters)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} options Optional options
|
||||
* @param {string} [options.frontendToken]
|
||||
* @return {Promise<module:types.ReleaseAccessResponse>} A successful response.
|
||||
*/
|
||||
export function Agent_ReleaseAccess(options) {
|
||||
if (!options) options = {}
|
||||
const parameters = {
|
||||
query: {
|
||||
frontendToken: options.frontendToken
|
||||
}
|
||||
}
|
||||
return gateway.request(Agent_ReleaseAccessOperation, parameters)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} options Optional options
|
||||
* @param {string} [options.token]
|
||||
* @return {Promise<module:types.ReleaseShareResponse>} A successful response.
|
||||
*/
|
||||
export function Agent_ReleaseShare(options) {
|
||||
if (!options) options = {}
|
||||
const parameters = {
|
||||
query: {
|
||||
token: options.token
|
||||
}
|
||||
}
|
||||
return gateway.request(Agent_ReleaseShareOperation, parameters)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} options Optional options
|
||||
* @param {string} [options.target]
|
||||
* @param {string} [options.backendMode]
|
||||
* @param {boolean} [options.insecure]
|
||||
* @param {boolean} [options.closed]
|
||||
* @param {string[]} [options.accessGrants]
|
||||
* @return {Promise<module:types.SharePrivateResponse>} A successful response.
|
||||
*/
|
||||
export function Agent_SharePrivate(options) {
|
||||
if (!options) options = {}
|
||||
const parameters = {
|
||||
query: {
|
||||
target: options.target,
|
||||
backendMode: options.backendMode,
|
||||
insecure: options.insecure,
|
||||
closed: options.closed,
|
||||
accessGrants: gateway.formatArrayParam(options.accessGrants, 'multi', 'accessGrants')
|
||||
}
|
||||
}
|
||||
return gateway.request(Agent_SharePrivateOperation, parameters)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {object} options Optional options
|
||||
* @param {string} [options.target]
|
||||
* @param {string[]} [options.basicAuth]
|
||||
* @param {string[]} [options.frontendSelection]
|
||||
* @param {string} [options.backendMode]
|
||||
* @param {boolean} [options.insecure]
|
||||
* @param {string} [options.oauthProvider]
|
||||
* @param {string[]} [options.oauthEmailAddressPatterns]
|
||||
* @param {string} [options.oauthCheckInterval]
|
||||
* @param {boolean} [options.closed]
|
||||
* @param {string[]} [options.accessGrants]
|
||||
* @return {Promise<module:types.SharePublicResponse>} A successful response.
|
||||
*/
|
||||
export function Agent_SharePublic(options) {
|
||||
if (!options) options = {}
|
||||
const parameters = {
|
||||
query: {
|
||||
target: options.target,
|
||||
basicAuth: gateway.formatArrayParam(options.basicAuth, 'multi', 'basicAuth'),
|
||||
frontendSelection: gateway.formatArrayParam(options.frontendSelection, 'multi', 'frontendSelection'),
|
||||
backendMode: options.backendMode,
|
||||
insecure: options.insecure,
|
||||
oauthProvider: options.oauthProvider,
|
||||
oauthEmailAddressPatterns: gateway.formatArrayParam(options.oauthEmailAddressPatterns, 'multi', 'oauthEmailAddressPatterns'),
|
||||
oauthCheckInterval: options.oauthCheckInterval,
|
||||
closed: options.closed,
|
||||
accessGrants: gateway.formatArrayParam(options.accessGrants, 'multi', 'accessGrants')
|
||||
}
|
||||
}
|
||||
return gateway.request(Agent_SharePublicOperation, parameters)
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
export function Agent_Status() {
|
||||
return gateway.request(Agent_StatusOperation)
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
export function Agent_Version() {
|
||||
return gateway.request(Agent_VersionOperation)
|
||||
}
|
||||
|
||||
const Agent_AccessPrivateOperation = {
|
||||
path: '/v1/agent/accessPrivate',
|
||||
method: 'post'
|
||||
}
|
||||
|
||||
const Agent_ReleaseAccessOperation = {
|
||||
path: '/v1/agent/releaseAccess',
|
||||
method: 'post'
|
||||
}
|
||||
|
||||
const Agent_ReleaseShareOperation = {
|
||||
path: '/v1/agent/releaseShare',
|
||||
method: 'post'
|
||||
}
|
||||
|
||||
const Agent_SharePrivateOperation = {
|
||||
path: '/v1/agent/sharePrivate',
|
||||
method: 'post'
|
||||
}
|
||||
|
||||
const Agent_SharePublicOperation = {
|
||||
path: '/v1/agent/sharePublic',
|
||||
method: 'post'
|
||||
}
|
||||
|
||||
const Agent_StatusOperation = {
|
||||
path: '/v1/agent/status',
|
||||
method: 'get'
|
||||
}
|
||||
|
||||
const Agent_VersionOperation = {
|
||||
path: '/v1/agent/version',
|
||||
method: 'get'
|
||||
}
|
@ -1,13 +1,12 @@
|
||||
# agent_agent_grpc_agent_proto
|
||||
# agentagent_grpcagentproto
|
||||
|
||||
AgentAgentGrpcAgentProto - JavaScript client for agent_agent_grpc_agent_proto
|
||||
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
AgentagentGrpcagentproto - JavaScript client for agentagent_grpcagentproto
|
||||
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||
|
||||
- API version: version not set
|
||||
- Package version: version not set
|
||||
- Generator version: 7.7.0
|
||||
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
|
||||
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
@ -15,49 +14,19 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
||||
|
||||
#### 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).
|
||||
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 agent_agent_grpc_agent_proto --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 agent_agent_grpc_agent_proto from, and run:
|
||||
|
||||
```shell
|
||||
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
|
||||
```
|
||||
|
||||
Finally, you need to build the module:
|
||||
|
||||
```shell
|
||||
npm run build
|
||||
npm install agentagent_grpcagentproto --save
|
||||
```
|
||||
|
||||
#### git
|
||||
|
||||
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
|
||||
#
|
||||
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
|
||||
@ -99,14 +68,13 @@ module: {
|
||||
Please follow the [installation](#installation) instruction and execute the following JS code:
|
||||
|
||||
```javascript
|
||||
var AgentAgentGrpcAgentProto = require('agent_agent_grpc_agent_proto');
|
||||
var AgentagentGrpcagentproto = require('agentagent_grpcagentproto');
|
||||
|
||||
|
||||
var api = new AgentAgentGrpcAgentProto.AgentApi()
|
||||
var opts = {
|
||||
var api = new AgentagentGrpcagentproto.AgentApi()
|
||||
var opts = {
|
||||
'token': "token_example", // {String}
|
||||
'bindAddress': "bindAddress_example", // {String}
|
||||
'responseHeaders': ["null"] // {[String]}
|
||||
'responseHeaders': ["responseHeaders_example"] // {[String]}
|
||||
};
|
||||
var callback = function(error, data, response) {
|
||||
if (error) {
|
||||
@ -116,39 +84,38 @@ var callback = function(error, data, response) {
|
||||
}
|
||||
};
|
||||
api.agentAccessPrivate(opts, callback);
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
All URIs are relative to */*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AgentAgentGrpcAgentProto.AgentApi* | [**agentAccessPrivate**](docs/AgentApi.md#agentAccessPrivate) | **POST** /v1/agent/accessPrivate |
|
||||
*AgentAgentGrpcAgentProto.AgentApi* | [**agentReleaseAccess**](docs/AgentApi.md#agentReleaseAccess) | **POST** /v1/agent/releaseAccess |
|
||||
*AgentAgentGrpcAgentProto.AgentApi* | [**agentReleaseShare**](docs/AgentApi.md#agentReleaseShare) | **POST** /v1/agent/releaseShare |
|
||||
*AgentAgentGrpcAgentProto.AgentApi* | [**agentSharePrivate**](docs/AgentApi.md#agentSharePrivate) | **POST** /v1/agent/sharePrivate |
|
||||
*AgentAgentGrpcAgentProto.AgentApi* | [**agentSharePublic**](docs/AgentApi.md#agentSharePublic) | **POST** /v1/agent/sharePublic |
|
||||
*AgentAgentGrpcAgentProto.AgentApi* | [**agentStatus**](docs/AgentApi.md#agentStatus) | **GET** /v1/agent/status |
|
||||
*AgentAgentGrpcAgentProto.AgentApi* | [**agentVersion**](docs/AgentApi.md#agentVersion) | **GET** /v1/agent/version |
|
||||
|
||||
*AgentagentGrpcagentproto.AgentApi* | [**agentAccessPrivate**](docs/AgentApi.md#agentAccessPrivate) | **POST** /v1/agent/accessPrivate |
|
||||
*AgentagentGrpcagentproto.AgentApi* | [**agentReleaseAccess**](docs/AgentApi.md#agentReleaseAccess) | **POST** /v1/agent/releaseAccess |
|
||||
*AgentagentGrpcagentproto.AgentApi* | [**agentReleaseShare**](docs/AgentApi.md#agentReleaseShare) | **POST** /v1/agent/releaseShare |
|
||||
*AgentagentGrpcagentproto.AgentApi* | [**agentSharePrivate**](docs/AgentApi.md#agentSharePrivate) | **POST** /v1/agent/sharePrivate |
|
||||
*AgentagentGrpcagentproto.AgentApi* | [**agentSharePublic**](docs/AgentApi.md#agentSharePublic) | **POST** /v1/agent/sharePublic |
|
||||
*AgentagentGrpcagentproto.AgentApi* | [**agentStatus**](docs/AgentApi.md#agentStatus) | **GET** /v1/agent/status |
|
||||
*AgentagentGrpcagentproto.AgentApi* | [**agentVersion**](docs/AgentApi.md#agentVersion) | **GET** /v1/agent/version |
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [AgentAgentGrpcAgentProto.AccessDetail](docs/AccessDetail.md)
|
||||
- [AgentAgentGrpcAgentProto.AccessPrivateResponse](docs/AccessPrivateResponse.md)
|
||||
- [AgentAgentGrpcAgentProto.ProtobufAny](docs/ProtobufAny.md)
|
||||
- [AgentAgentGrpcAgentProto.RpcStatus](docs/RpcStatus.md)
|
||||
- [AgentAgentGrpcAgentProto.ShareDetail](docs/ShareDetail.md)
|
||||
- [AgentAgentGrpcAgentProto.SharePrivateResponse](docs/SharePrivateResponse.md)
|
||||
- [AgentAgentGrpcAgentProto.SharePublicResponse](docs/SharePublicResponse.md)
|
||||
- [AgentAgentGrpcAgentProto.ShareReservedResponse](docs/ShareReservedResponse.md)
|
||||
- [AgentAgentGrpcAgentProto.StatusResponse](docs/StatusResponse.md)
|
||||
- [AgentAgentGrpcAgentProto.VersionResponse](docs/VersionResponse.md)
|
||||
|
||||
- [AgentagentGrpcagentproto.AccessDetail](docs/AccessDetail.md)
|
||||
- [AgentagentGrpcagentproto.AccessPrivateResponse](docs/AccessPrivateResponse.md)
|
||||
- [AgentagentGrpcagentproto.ProtobufAny](docs/ProtobufAny.md)
|
||||
- [AgentagentGrpcagentproto.ReleaseAccessResponse](docs/ReleaseAccessResponse.md)
|
||||
- [AgentagentGrpcagentproto.ReleaseShareResponse](docs/ReleaseShareResponse.md)
|
||||
- [AgentagentGrpcagentproto.RpcStatus](docs/RpcStatus.md)
|
||||
- [AgentagentGrpcagentproto.ShareDetail](docs/ShareDetail.md)
|
||||
- [AgentagentGrpcagentproto.SharePrivateResponse](docs/SharePrivateResponse.md)
|
||||
- [AgentagentGrpcagentproto.SharePublicResponse](docs/SharePublicResponse.md)
|
||||
- [AgentagentGrpcagentproto.ShareReservedResponse](docs/ShareReservedResponse.md)
|
||||
- [AgentagentGrpcagentproto.StatusResponse](docs/StatusResponse.md)
|
||||
- [AgentagentGrpcagentproto.VersionResponse](docs/VersionResponse.md)
|
||||
|
||||
## Documentation for Authorization
|
||||
|
||||
Endpoints do not require authorization.
|
||||
All endpoints do not require authorization.
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
# AgentAgentGrpcAgentProto.AccessDetail
|
||||
# AgentagentGrpcagentproto.AccessDetail
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**frontendToken** | **String** | | [optional]
|
||||
**token** | **String** | | [optional]
|
||||
**bindAddress** | **String** | | [optional]
|
||||
**responseHeaders** | **[String]** | | [optional]
|
||||
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
# AgentAgentGrpcAgentProto.AccessPrivateResponse
|
||||
# AgentagentGrpcagentproto.AccessPrivateResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**frontendToken** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# AgentAgentGrpcAgentProto.AgentApi
|
||||
# AgentagentGrpcagentproto.AgentApi
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
All URIs are relative to */*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
@ -12,24 +12,21 @@ Method | HTTP request | Description
|
||||
[**agentStatus**](AgentApi.md#agentStatus) | **GET** /v1/agent/status |
|
||||
[**agentVersion**](AgentApi.md#agentVersion) | **GET** /v1/agent/version |
|
||||
|
||||
|
||||
|
||||
## agentAccessPrivate
|
||||
|
||||
<a name="agentAccessPrivate"></a>
|
||||
# **agentAccessPrivate**
|
||||
> AccessPrivateResponse agentAccessPrivate(opts)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import AgentAgentGrpcAgentProto from 'agent_agent_grpc_agent_proto';
|
||||
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
|
||||
|
||||
let apiInstance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
let opts = {
|
||||
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
|
||||
let opts = {
|
||||
'token': "token_example", // String |
|
||||
'bindAddress': "bindAddress_example", // String |
|
||||
'responseHeaders': ["null"] // [String] |
|
||||
'responseHeaders': ["responseHeaders_example"] // [String] |
|
||||
};
|
||||
apiInstance.agentAccessPrivate(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
@ -42,7 +39,6 @@ apiInstance.agentAccessPrivate(opts, (error, data, response) => {
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**token** | **String**| | [optional]
|
||||
@ -59,23 +55,21 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## agentReleaseAccess
|
||||
|
||||
> Object agentReleaseAccess(opts)
|
||||
<a name="agentReleaseAccess"></a>
|
||||
# **agentReleaseAccess**
|
||||
> ReleaseAccessResponse agentReleaseAccess(opts)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import AgentAgentGrpcAgentProto from 'agent_agent_grpc_agent_proto';
|
||||
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
|
||||
|
||||
let apiInstance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
let opts = {
|
||||
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
|
||||
let opts = {
|
||||
'frontendToken': "frontendToken_example" // String |
|
||||
};
|
||||
apiInstance.agentReleaseAccess(opts, (error, data, response) => {
|
||||
@ -89,14 +83,13 @@ apiInstance.agentReleaseAccess(opts, (error, data, response) => {
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**frontendToken** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**Object**
|
||||
[**ReleaseAccessResponse**](ReleaseAccessResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -104,23 +97,21 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## agentReleaseShare
|
||||
|
||||
> Object agentReleaseShare(opts)
|
||||
<a name="agentReleaseShare"></a>
|
||||
# **agentReleaseShare**
|
||||
> ReleaseShareResponse agentReleaseShare(opts)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import AgentAgentGrpcAgentProto from 'agent_agent_grpc_agent_proto';
|
||||
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
|
||||
|
||||
let apiInstance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
let opts = {
|
||||
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
|
||||
let opts = {
|
||||
'token': "token_example" // String |
|
||||
};
|
||||
apiInstance.agentReleaseShare(opts, (error, data, response) => {
|
||||
@ -134,14 +125,13 @@ apiInstance.agentReleaseShare(opts, (error, data, response) => {
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**token** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
**Object**
|
||||
[**ReleaseShareResponse**](ReleaseShareResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -149,28 +139,26 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## agentSharePrivate
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="agentSharePrivate"></a>
|
||||
# **agentSharePrivate**
|
||||
> SharePrivateResponse agentSharePrivate(opts)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import AgentAgentGrpcAgentProto from 'agent_agent_grpc_agent_proto';
|
||||
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
|
||||
|
||||
let apiInstance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
let opts = {
|
||||
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
|
||||
let opts = {
|
||||
'target': "target_example", // String |
|
||||
'backendMode': "backendMode_example", // String |
|
||||
'insecure': true, // Boolean |
|
||||
'closed': true, // Boolean |
|
||||
'accessGrants': ["null"] // [String] |
|
||||
'accessGrants': ["accessGrants_example"] // [String] |
|
||||
};
|
||||
apiInstance.agentSharePrivate(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
@ -183,7 +171,6 @@ apiInstance.agentSharePrivate(opts, (error, data, response) => {
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**target** | **String**| | [optional]
|
||||
@ -202,33 +189,31 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## agentSharePublic
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="agentSharePublic"></a>
|
||||
# **agentSharePublic**
|
||||
> SharePublicResponse agentSharePublic(opts)
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import AgentAgentGrpcAgentProto from 'agent_agent_grpc_agent_proto';
|
||||
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
|
||||
|
||||
let apiInstance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
let opts = {
|
||||
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
|
||||
let opts = {
|
||||
'target': "target_example", // String |
|
||||
'basicAuth': ["null"], // [String] |
|
||||
'frontendSelection': ["null"], // [String] |
|
||||
'basicAuth': ["basicAuth_example"], // [String] |
|
||||
'frontendSelection': ["frontendSelection_example"], // [String] |
|
||||
'backendMode': "backendMode_example", // String |
|
||||
'insecure': true, // Boolean |
|
||||
'oauthProvider': "oauthProvider_example", // String |
|
||||
'oauthEmailAddressPatterns': ["null"], // [String] |
|
||||
'oauthEmailAddressPatterns': ["oauthEmailAddressPatterns_example"], // [String] |
|
||||
'oauthCheckInterval': "oauthCheckInterval_example", // String |
|
||||
'closed': true, // Boolean |
|
||||
'accessGrants': ["null"] // [String] |
|
||||
'accessGrants': ["accessGrants_example"] // [String] |
|
||||
};
|
||||
apiInstance.agentSharePublic(opts, (error, data, response) => {
|
||||
if (error) {
|
||||
@ -241,7 +226,6 @@ apiInstance.agentSharePublic(opts, (error, data, response) => {
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**target** | **String**| | [optional]
|
||||
@ -265,22 +249,20 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## agentStatus
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="agentStatus"></a>
|
||||
# **agentStatus**
|
||||
> StatusResponse agentStatus()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import AgentAgentGrpcAgentProto from 'agent_agent_grpc_agent_proto';
|
||||
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
|
||||
|
||||
let apiInstance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
|
||||
apiInstance.agentStatus((error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
@ -291,7 +273,6 @@ apiInstance.agentStatus((error, data, response) => {
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@ -304,22 +285,20 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
||||
## agentVersion
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="agentVersion"></a>
|
||||
# **agentVersion**
|
||||
> VersionResponse agentVersion()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
import AgentAgentGrpcAgentProto from 'agent_agent_grpc_agent_proto';
|
||||
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
|
||||
|
||||
let apiInstance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
|
||||
apiInstance.agentVersion((error, data, response) => {
|
||||
if (error) {
|
||||
console.error(error);
|
||||
@ -330,7 +309,6 @@ apiInstance.agentVersion((error, data, response) => {
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@ -343,6 +321,6 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
# AgentAgentGrpcAgentProto.ProtobufAny
|
||||
# AgentagentGrpcagentproto.ProtobufAny
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**type** | **String** | | [optional]
|
||||
|
||||
|
||||
|
5
agent/agentUi/src/api/docs/ReleaseAccessResponse.md
Normal file
5
agent/agentUi/src/api/docs/ReleaseAccessResponse.md
Normal file
@ -0,0 +1,5 @@
|
||||
# AgentagentGrpcagentproto.ReleaseAccessResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
5
agent/agentUi/src/api/docs/ReleaseShareResponse.md
Normal file
5
agent/agentUi/src/api/docs/ReleaseShareResponse.md
Normal file
@ -0,0 +1,5 @@
|
||||
# AgentagentGrpcagentproto.ReleaseShareResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
@ -1,11 +1,8 @@
|
||||
# AgentAgentGrpcAgentProto.RpcStatus
|
||||
# AgentagentGrpcagentproto.RpcStatus
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **Number** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
**details** | [**[ProtobufAny]**](ProtobufAny.md) | | [optional]
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
# AgentAgentGrpcAgentProto.ShareDetail
|
||||
# AgentagentGrpcagentproto.ShareDetail
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**token** | **String** | | [optional]
|
||||
@ -12,5 +11,3 @@ Name | Type | Description | Notes
|
||||
**backendEndpoint** | **String** | | [optional]
|
||||
**closed** | **Boolean** | | [optional]
|
||||
**status** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
# AgentAgentGrpcAgentProto.SharePrivateResponse
|
||||
# AgentagentGrpcagentproto.SharePrivateResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**token** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
# AgentAgentGrpcAgentProto.SharePublicResponse
|
||||
# AgentagentGrpcagentproto.SharePublicResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**token** | **String** | | [optional]
|
||||
**frontendEndpoints** | **[String]** | | [optional]
|
||||
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
# AgentAgentGrpcAgentProto.ShareReservedResponse
|
||||
# AgentagentGrpcagentproto.ShareReservedResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**token** | **String** | | [optional]
|
||||
@ -9,5 +8,3 @@ Name | Type | Description | Notes
|
||||
**shareMode** | **String** | | [optional]
|
||||
**frontendEndpoints** | **[String]** | | [optional]
|
||||
**target** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
# AgentAgentGrpcAgentProto.StatusResponse
|
||||
# AgentagentGrpcagentproto.StatusResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**accesses** | [**[AccessDetail]**](AccessDetail.md) | | [optional]
|
||||
**shares** | [**[ShareDetail]**](ShareDetail.md) | | [optional]
|
||||
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
# AgentAgentGrpcAgentProto.VersionResponse
|
||||
# AgentagentGrpcagentproto.VersionResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**v** | **String** | | [optional]
|
||||
**consoleEndpoint** | **String** | | [optional]
|
||||
|
||||
|
||||
|
281
agent/agentUi/src/api/gateway/index.js
Normal file
281
agent/agentUi/src/api/gateway/index.js
Normal file
@ -0,0 +1,281 @@
|
||||
// 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
|
||||
}
|
16
agent/agentUi/src/api/gateway/spec.js
Normal file
16
agent/agentUi/src/api/gateway/spec.js
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
// Auto-generated, edits will be overwritten
|
||||
const spec = {
|
||||
'host': 'localhost',
|
||||
'schemes': [
|
||||
'http'
|
||||
],
|
||||
'basePath': '',
|
||||
'contentTypes': [
|
||||
'application/json'
|
||||
],
|
||||
'accepts': [
|
||||
'application/json'
|
||||
]
|
||||
}
|
||||
export default spec
|
@ -1,17 +1,11 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
git_host=$4
|
||||
|
||||
if [ "$git_host" = "" ]; then
|
||||
git_host="github.com"
|
||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
||||
fi
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
@ -34,18 +28,18 @@ git init
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=$(git remote)
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the Git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
@ -53,5 +47,6 @@ fi
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
{
|
||||
"name": "agent_agent_grpc_agent_proto",
|
||||
"name": "agentagent_grpcagentproto",
|
||||
"version": "version not set",
|
||||
"description": "JS API client generated by OpenAPI Generator",
|
||||
"description": "Object",
|
||||
"license": "Unlicense",
|
||||
"main": "dist/index.js",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
"build": "babel src -d dist",
|
||||
"prepare": "npm run build",
|
||||
"test": "mocha --require @babel/register --recursive"
|
||||
},
|
||||
"browser": {
|
||||
@ -39,8 +37,5 @@
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^8.0.1",
|
||||
"sinon": "^7.2.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,17 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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";
|
||||
|
||||
@ -27,19 +27,14 @@ import querystring from "querystring";
|
||||
* @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 = 'http://localhost') {
|
||||
export class ApiClient {
|
||||
constructor() {
|
||||
/**
|
||||
* The base URL against which to resolve every API call's (relative) path.
|
||||
* @type {String}
|
||||
* @default http://localhost
|
||||
* @default /
|
||||
*/
|
||||
this.basePath = basePath.replace(/\/+$/, '');
|
||||
this.basePath = '/'.replace(/\/+$/, '');
|
||||
|
||||
/**
|
||||
* The authentication methods to be included for all API calls.
|
||||
@ -53,9 +48,7 @@ class ApiClient {
|
||||
* @type {Array.<String>}
|
||||
* @default {}
|
||||
*/
|
||||
this.defaultHeaders = {
|
||||
'User-Agent': 'OpenAPI-Generator/version not set/Javascript'
|
||||
};
|
||||
this.defaultHeaders = {};
|
||||
|
||||
/**
|
||||
* The default HTTP timeout for all API calls.
|
||||
@ -92,11 +85,6 @@ class ApiClient {
|
||||
*/
|
||||
this.requestAgent = null;
|
||||
|
||||
/*
|
||||
* Allow user to add superagent plugins
|
||||
*/
|
||||
this.plugins = null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -111,50 +99,24 @@ class ApiClient {
|
||||
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) {
|
||||
buildUrl(path, pathParams) {
|
||||
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) => {
|
||||
url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
|
||||
var value;
|
||||
if (pathParams.hasOwnProperty(key)) {
|
||||
value = this.paramToString(pathParams[key]);
|
||||
@ -259,6 +221,43 @@ class ApiClient {
|
||||
return newParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration of collection format separator strategies.
|
||||
* @enum {String}
|
||||
* @readonly
|
||||
*/
|
||||
static 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'
|
||||
};
|
||||
|
||||
/**
|
||||
* Builds a string representation of an array-type actual parameter, according to the given collection format.
|
||||
* @param {Array} param An array parameter.
|
||||
@ -272,18 +271,16 @@ class ApiClient {
|
||||
}
|
||||
switch (collectionFormat) {
|
||||
case 'csv':
|
||||
return param.map(this.paramToString, this).join(',');
|
||||
return param.map(this.paramToString).join(',');
|
||||
case 'ssv':
|
||||
return param.map(this.paramToString, this).join(' ');
|
||||
return param.map(this.paramToString).join(' ');
|
||||
case 'tsv':
|
||||
return param.map(this.paramToString, this).join('\t');
|
||||
return param.map(this.paramToString).join('\t');
|
||||
case 'pipes':
|
||||
return param.map(this.paramToString, this).join('|');
|
||||
return param.map(this.paramToString).join('|');
|
||||
case 'multi':
|
||||
//return the array directly as SuperAgent will handle it as expected
|
||||
return param.map(this.paramToString, this);
|
||||
case 'passthrough':
|
||||
return param;
|
||||
return param.map(this.paramToString);
|
||||
default:
|
||||
throw new Error('Unknown collection format: ' + collectionFormat);
|
||||
}
|
||||
@ -303,15 +300,6 @@ class ApiClient {
|
||||
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) {
|
||||
@ -342,7 +330,7 @@ class ApiClient {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 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
|
||||
@ -367,7 +355,7 @@ class ApiClient {
|
||||
return ApiClient.convertToType(data, returnType);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Callback function to receive the result of the operation.
|
||||
* @callback module:ApiClient~callApiCallback
|
||||
* @param {String} error Error message, if any.
|
||||
@ -375,7 +363,7 @@ class ApiClient {
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* 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.
|
||||
@ -389,25 +377,16 @@ class ApiClient {
|
||||
* @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
|
||||
* @param {module:ApiClient~callApiCallback} callback The callback function.
|
||||
* @returns {Object} The SuperAgent request object.
|
||||
*/
|
||||
callApi(path, httpMethod, pathParams,
|
||||
queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts,
|
||||
returnType, apiBasePath, callback) {
|
||||
returnType, callback) {
|
||||
|
||||
var url = this.buildUrl(path, pathParams, apiBasePath);
|
||||
var url = this.buildUrl(path, pathParams);
|
||||
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);
|
||||
|
||||
@ -435,6 +414,8 @@ class ApiClient {
|
||||
if(contentType != 'multipart/form-data') {
|
||||
request.type(contentType);
|
||||
}
|
||||
} else if (!request.header['Content-Type']) {
|
||||
request.type('application/json');
|
||||
}
|
||||
|
||||
if (contentType === 'application/x-www-form-urlencoded') {
|
||||
@ -443,23 +424,15 @@ class ApiClient {
|
||||
var _formParams = this.normalizeParams(formParams);
|
||||
for (var key in _formParams) {
|
||||
if (_formParams.hasOwnProperty(key)) {
|
||||
let _formParamsValue = _formParams[key];
|
||||
if (this.isFileParam(_formParamsValue)) {
|
||||
if (this.isFileParam(_formParams[key])) {
|
||||
// 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));
|
||||
request.attach(key, _formParams[key]);
|
||||
} else {
|
||||
request.field(key, _formParamsValue);
|
||||
request.field(key, _formParams[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (bodyParam !== null && bodyParam !== undefined) {
|
||||
if (!request.header['Content-Type']) {
|
||||
request.type('application/json');
|
||||
}
|
||||
} else if (bodyParam) {
|
||||
request.send(bodyParam);
|
||||
}
|
||||
|
||||
@ -471,19 +444,21 @@ class ApiClient {
|
||||
if (returnType === 'Blob') {
|
||||
request.responseType('blob');
|
||||
} else if (returnType === 'String') {
|
||||
request.responseType('text');
|
||||
request.responseType('string');
|
||||
}
|
||||
|
||||
// Attach previously saved cookies, if enabled
|
||||
if (this.enableCookies){
|
||||
if (typeof window === 'undefined') {
|
||||
this.agent._attachCookies(request);
|
||||
this.agent.attachCookies(request);
|
||||
}
|
||||
else {
|
||||
request.withCredentials();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
request.end((error, response) => {
|
||||
if (callback) {
|
||||
var data = null;
|
||||
@ -491,7 +466,7 @@ class ApiClient {
|
||||
try {
|
||||
data = this.deserialize(response, returnType);
|
||||
if (this.enableCookies && typeof window === 'undefined'){
|
||||
this.agent._saveCookies(response);
|
||||
this.agent.saveCookies(response);
|
||||
}
|
||||
} catch (err) {
|
||||
error = err;
|
||||
@ -506,15 +481,12 @@ class ApiClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses an ISO-8601 string representation or epoch representation of a date value.
|
||||
* Parses an ISO-8601 string 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);
|
||||
return new Date(str);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -547,8 +519,8 @@ class ApiClient {
|
||||
if (type === Object) {
|
||||
// generic object, return directly
|
||||
return data;
|
||||
} else if (typeof type.constructFromObject === 'function') {
|
||||
// for model type like User and enum class
|
||||
} else if (typeof type === 'function') {
|
||||
// for model type like: User
|
||||
return type.constructFromObject(data);
|
||||
} else if (Array.isArray(type)) {
|
||||
// for array type like: ['String']
|
||||
@ -585,47 +557,6 @@ class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of host settings
|
||||
* @returns An array of host settings
|
||||
*/
|
||||
hostSettings() {
|
||||
return [
|
||||
{
|
||||
'url': "",
|
||||
'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.
|
||||
@ -646,46 +577,8 @@ class ApiClient {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
@ -1,338 +1,350 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 AccessPrivateResponse from '../model/AccessPrivateResponse';
|
||||
import RpcStatus from '../model/RpcStatus';
|
||||
import SharePrivateResponse from '../model/SharePrivateResponse';
|
||||
import SharePublicResponse from '../model/SharePublicResponse';
|
||||
import StatusResponse from '../model/StatusResponse';
|
||||
import VersionResponse from '../model/VersionResponse';
|
||||
import {ApiClient} from "../ApiClient";
|
||||
import {AccessPrivateResponse} from '../model/AccessPrivateResponse';
|
||||
import {ReleaseAccessResponse} from '../model/ReleaseAccessResponse';
|
||||
import {ReleaseShareResponse} from '../model/ReleaseShareResponse';
|
||||
import {RpcStatus} from '../model/RpcStatus';
|
||||
import {SharePrivateResponse} from '../model/SharePrivateResponse';
|
||||
import {SharePublicResponse} from '../model/SharePublicResponse';
|
||||
import {StatusResponse} from '../model/StatusResponse';
|
||||
import {VersionResponse} from '../model/VersionResponse';
|
||||
|
||||
/**
|
||||
* Agent service.
|
||||
* @module api/AgentApi
|
||||
* @version version not set
|
||||
*/
|
||||
export default class AgentApi {
|
||||
export class AgentApi {
|
||||
|
||||
/**
|
||||
* Constructs a new AgentApi.
|
||||
* @alias module:api/AgentApi
|
||||
* @class
|
||||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
||||
* default to {@link module:ApiClient#instance} if unspecified.
|
||||
* default to {@link module:ApiClient#instanc
|
||||
e} if unspecified.
|
||||
*/
|
||||
constructor(apiClient) {
|
||||
this.apiClient = apiClient || ApiClient.instance;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the agentAccessPrivate operation.
|
||||
* @callback module:api/AgentApi~agentAccessPrivateCallback
|
||||
* @callback moduleapi/AgentApi~agentAccessPrivateCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/AccessPrivateResponse} data The data returned by the service call.
|
||||
* @param {module:model/AccessPrivateResponse{ data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} [token]
|
||||
* @param {String} [bindAddress]
|
||||
* @param {Array.<String>} [responseHeaders]
|
||||
* @param {String} opts.token
|
||||
* @param {String} opts.bindAddress
|
||||
* @param {Array.<String>} opts.responseHeaders
|
||||
* @param {module:api/AgentApi~agentAccessPrivateCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/AccessPrivateResponse}
|
||||
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
||||
*/
|
||||
agentAccessPrivate(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
|
||||
};
|
||||
let queryParams = {
|
||||
'token': opts['token'],
|
||||
'bindAddress': opts['bindAddress'],
|
||||
'responseHeaders': this.apiClient.buildCollectionParam(opts['responseHeaders'], 'multi')
|
||||
'token': opts['token'],'bindAddress': opts['bindAddress'],'responseHeaders': this.apiClient.buildCollectionParam(opts['responseHeaders'], 'multi')
|
||||
};
|
||||
let headerParams = {
|
||||
|
||||
};
|
||||
let formParams = {
|
||||
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = AccessPrivateResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/v1/agent/accessPrivate', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the agentReleaseAccess operation.
|
||||
* @callback module:api/AgentApi~agentReleaseAccessCallback
|
||||
* @callback moduleapi/AgentApi~agentReleaseAccessCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {Object} data The data returned by the service call.
|
||||
* @param {module:model/ReleaseAccessResponse{ data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} [frontendToken]
|
||||
* @param {String} opts.frontendToken
|
||||
* @param {module:api/AgentApi~agentReleaseAccessCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Object}
|
||||
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
||||
*/
|
||||
agentReleaseAccess(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
|
||||
};
|
||||
let queryParams = {
|
||||
'frontendToken': opts['frontendToken']
|
||||
};
|
||||
let headerParams = {
|
||||
|
||||
};
|
||||
let formParams = {
|
||||
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Object;
|
||||
let returnType = ReleaseAccessResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/v1/agent/releaseAccess', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the agentReleaseShare operation.
|
||||
* @callback module:api/AgentApi~agentReleaseShareCallback
|
||||
* @callback moduleapi/AgentApi~agentReleaseShareCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {Object} data The data returned by the service call.
|
||||
* @param {module:model/ReleaseShareResponse{ data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} [token]
|
||||
* @param {String} opts.token
|
||||
* @param {module:api/AgentApi~agentReleaseShareCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link Object}
|
||||
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
||||
*/
|
||||
agentReleaseShare(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
|
||||
};
|
||||
let queryParams = {
|
||||
'token': opts['token']
|
||||
};
|
||||
let headerParams = {
|
||||
|
||||
};
|
||||
let formParams = {
|
||||
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = Object;
|
||||
let returnType = ReleaseShareResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/v1/agent/releaseShare', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the agentSharePrivate operation.
|
||||
* @callback module:api/AgentApi~agentSharePrivateCallback
|
||||
* @callback moduleapi/AgentApi~agentSharePrivateCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/SharePrivateResponse} data The data returned by the service call.
|
||||
* @param {module:model/SharePrivateResponse{ data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} [target]
|
||||
* @param {String} [backendMode]
|
||||
* @param {Boolean} [insecure]
|
||||
* @param {Boolean} [closed]
|
||||
* @param {Array.<String>} [accessGrants]
|
||||
* @param {String} opts.target
|
||||
* @param {String} opts.backendMode
|
||||
* @param {Boolean} opts.insecure
|
||||
* @param {Boolean} opts.closed
|
||||
* @param {Array.<String>} opts.accessGrants
|
||||
* @param {module:api/AgentApi~agentSharePrivateCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/SharePrivateResponse}
|
||||
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
||||
*/
|
||||
agentSharePrivate(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
|
||||
};
|
||||
let queryParams = {
|
||||
'target': opts['target'],
|
||||
'backendMode': opts['backendMode'],
|
||||
'insecure': opts['insecure'],
|
||||
'closed': opts['closed'],
|
||||
'accessGrants': this.apiClient.buildCollectionParam(opts['accessGrants'], 'multi')
|
||||
'target': opts['target'],'backendMode': opts['backendMode'],'insecure': opts['insecure'],'closed': opts['closed'],'accessGrants': this.apiClient.buildCollectionParam(opts['accessGrants'], 'multi')
|
||||
};
|
||||
let headerParams = {
|
||||
|
||||
};
|
||||
let formParams = {
|
||||
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = SharePrivateResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/v1/agent/sharePrivate', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the agentSharePublic operation.
|
||||
* @callback module:api/AgentApi~agentSharePublicCallback
|
||||
* @callback moduleapi/AgentApi~agentSharePublicCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/SharePublicResponse} data The data returned by the service call.
|
||||
* @param {module:model/SharePublicResponse{ data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} [target]
|
||||
* @param {Array.<String>} [basicAuth]
|
||||
* @param {Array.<String>} [frontendSelection]
|
||||
* @param {String} [backendMode]
|
||||
* @param {Boolean} [insecure]
|
||||
* @param {String} [oauthProvider]
|
||||
* @param {Array.<String>} [oauthEmailAddressPatterns]
|
||||
* @param {String} [oauthCheckInterval]
|
||||
* @param {Boolean} [closed]
|
||||
* @param {Array.<String>} [accessGrants]
|
||||
* @param {String} opts.target
|
||||
* @param {Array.<String>} opts.basicAuth
|
||||
* @param {Array.<String>} opts.frontendSelection
|
||||
* @param {String} opts.backendMode
|
||||
* @param {Boolean} opts.insecure
|
||||
* @param {String} opts.oauthProvider
|
||||
* @param {Array.<String>} opts.oauthEmailAddressPatterns
|
||||
* @param {String} opts.oauthCheckInterval
|
||||
* @param {Boolean} opts.closed
|
||||
* @param {Array.<String>} opts.accessGrants
|
||||
* @param {module:api/AgentApi~agentSharePublicCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/SharePublicResponse}
|
||||
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
||||
*/
|
||||
agentSharePublic(opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
|
||||
};
|
||||
let queryParams = {
|
||||
'target': opts['target'],
|
||||
'basicAuth': this.apiClient.buildCollectionParam(opts['basicAuth'], 'multi'),
|
||||
'frontendSelection': this.apiClient.buildCollectionParam(opts['frontendSelection'], 'multi'),
|
||||
'backendMode': opts['backendMode'],
|
||||
'insecure': opts['insecure'],
|
||||
'oauthProvider': opts['oauthProvider'],
|
||||
'oauthEmailAddressPatterns': this.apiClient.buildCollectionParam(opts['oauthEmailAddressPatterns'], 'multi'),
|
||||
'oauthCheckInterval': opts['oauthCheckInterval'],
|
||||
'closed': opts['closed'],
|
||||
'accessGrants': this.apiClient.buildCollectionParam(opts['accessGrants'], 'multi')
|
||||
'target': opts['target'],'basicAuth': this.apiClient.buildCollectionParam(opts['basicAuth'], 'multi'),'frontendSelection': this.apiClient.buildCollectionParam(opts['frontendSelection'], 'multi'),'backendMode': opts['backendMode'],'insecure': opts['insecure'],'oauthProvider': opts['oauthProvider'],'oauthEmailAddressPatterns': this.apiClient.buildCollectionParam(opts['oauthEmailAddressPatterns'], 'multi'),'oauthCheckInterval': opts['oauthCheckInterval'],'closed': opts['closed'],'accessGrants': this.apiClient.buildCollectionParam(opts['accessGrants'], 'multi')
|
||||
};
|
||||
let headerParams = {
|
||||
|
||||
};
|
||||
let formParams = {
|
||||
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = SharePublicResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/v1/agent/sharePublic', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the agentStatus operation.
|
||||
* @callback module:api/AgentApi~agentStatusCallback
|
||||
* @callback moduleapi/AgentApi~agentStatusCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/StatusResponse} data The data returned by the service call.
|
||||
* @param {module:model/StatusResponse{ data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {module:api/AgentApi~agentStatusCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/StatusResponse}
|
||||
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
||||
*/
|
||||
agentStatus(callback) {
|
||||
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
|
||||
};
|
||||
let queryParams = {
|
||||
|
||||
};
|
||||
let headerParams = {
|
||||
|
||||
};
|
||||
let formParams = {
|
||||
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = StatusResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/v1/agent/status', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the agentVersion operation.
|
||||
* @callback module:api/AgentApi~agentVersionCallback
|
||||
* @callback moduleapi/AgentApi~agentVersionCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/VersionResponse} data The data returned by the service call.
|
||||
* @param {module:model/VersionResponse{ data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {module:api/AgentApi~agentVersionCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/VersionResponse}
|
||||
* data is of type: {@link <&vendorExtensions.x-jsdoc-type>}
|
||||
*/
|
||||
agentVersion(callback) {
|
||||
|
||||
let postBody = null;
|
||||
|
||||
let pathParams = {
|
||||
|
||||
};
|
||||
let queryParams = {
|
||||
|
||||
};
|
||||
let headerParams = {
|
||||
|
||||
};
|
||||
let formParams = {
|
||||
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = [];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = VersionResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/v1/agent/version', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,40 +1,41 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 AccessDetail from './model/AccessDetail';
|
||||
import AccessPrivateResponse from './model/AccessPrivateResponse';
|
||||
import ProtobufAny from './model/ProtobufAny';
|
||||
import RpcStatus from './model/RpcStatus';
|
||||
import ShareDetail from './model/ShareDetail';
|
||||
import SharePrivateResponse from './model/SharePrivateResponse';
|
||||
import SharePublicResponse from './model/SharePublicResponse';
|
||||
import ShareReservedResponse from './model/ShareReservedResponse';
|
||||
import StatusResponse from './model/StatusResponse';
|
||||
import VersionResponse from './model/VersionResponse';
|
||||
import AgentApi from './api/AgentApi';
|
||||
|
||||
import {ApiClient} from './ApiClient';
|
||||
import {AccessDetail} from './model/AccessDetail';
|
||||
import {AccessPrivateResponse} from './model/AccessPrivateResponse';
|
||||
import {ProtobufAny} from './model/ProtobufAny';
|
||||
import {ReleaseAccessResponse} from './model/ReleaseAccessResponse';
|
||||
import {ReleaseShareResponse} from './model/ReleaseShareResponse';
|
||||
import {RpcStatus} from './model/RpcStatus';
|
||||
import {ShareDetail} from './model/ShareDetail';
|
||||
import {SharePrivateResponse} from './model/SharePrivateResponse';
|
||||
import {SharePublicResponse} from './model/SharePublicResponse';
|
||||
import {ShareReservedResponse} from './model/ShareReservedResponse';
|
||||
import {StatusResponse} from './model/StatusResponse';
|
||||
import {VersionResponse} from './model/VersionResponse';
|
||||
import {AgentApi} from './api/AgentApi';
|
||||
|
||||
/**
|
||||
* JS API client generated by OpenAPI Generator.<br>
|
||||
* Object.<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 AgentAgentGrpcAgentProto = require('index'); // See note below*.
|
||||
* var xxxSvc = new AgentAgentGrpcAgentProto.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyyModel = new AgentAgentGrpcAgentProto.Yyy(); // Construct a model instance.
|
||||
* var AgentagentGrpcagentproto = require('index'); // See note below*.
|
||||
* var xxxSvc = new AgentagentGrpcagentproto.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyyModel = new AgentagentGrpcagentproto.Yyy(); // Construct a model instance.
|
||||
* yyyModel.someProperty = 'someValue';
|
||||
* ...
|
||||
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
|
||||
@ -46,8 +47,8 @@ import AgentApi from './api/AgentApi';
|
||||
* <p>
|
||||
* A non-AMD browser application (discouraged) might do something like this:
|
||||
* <pre>
|
||||
* var xxxSvc = new AgentAgentGrpcAgentProto.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyy = new AgentAgentGrpcAgentProto.Yyy(); // Construct a model instance.
|
||||
* var xxxSvc = new AgentagentGrpcagentproto.XxxApi(); // Allocate the API class we're going to use.
|
||||
* var yyy = new AgentagentGrpcagentproto.Yyy(); // Construct a model instance.
|
||||
* yyyModel.someProperty = 'someValue';
|
||||
* ...
|
||||
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
|
||||
@ -82,6 +83,18 @@ export {
|
||||
*/
|
||||
ProtobufAny,
|
||||
|
||||
/**
|
||||
* The ReleaseAccessResponse model constructor.
|
||||
* @property {module:model/ReleaseAccessResponse}
|
||||
*/
|
||||
ReleaseAccessResponse,
|
||||
|
||||
/**
|
||||
* The ReleaseShareResponse model constructor.
|
||||
* @property {module:model/ReleaseShareResponse}
|
||||
*/
|
||||
ReleaseShareResponse,
|
||||
|
||||
/**
|
||||
* The RpcStatus model constructor.
|
||||
* @property {module:model/RpcStatus}
|
||||
|
@ -1,123 +1,73 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AccessDetail model module.
|
||||
* @module model/AccessDetail
|
||||
* @version version not set
|
||||
*/
|
||||
class AccessDetail {
|
||||
/**
|
||||
* Constructs a new <code>AccessDetail</code>.
|
||||
* @alias module:model/AccessDetail
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AccessDetail.initialize(this);
|
||||
export class AccessDetail {
|
||||
/**
|
||||
* Constructs a new <code>AccessDetail</code>.
|
||||
* @alias module:model/AccessDetail
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AccessDetail</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/AccessDetail} obj Optional instance to populate.
|
||||
* @return {module:model/AccessDetail} The populated <code>AccessDetail</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AccessDetail();
|
||||
if (data.hasOwnProperty('frontendToken'))
|
||||
obj.frontendToken = ApiClient.convertToType(data['frontendToken'], 'String');
|
||||
if (data.hasOwnProperty('token'))
|
||||
obj.token = ApiClient.convertToType(data['token'], 'String');
|
||||
if (data.hasOwnProperty('bindAddress'))
|
||||
obj.bindAddress = ApiClient.convertToType(data['bindAddress'], 'String');
|
||||
if (data.hasOwnProperty('responseHeaders'))
|
||||
obj.responseHeaders = ApiClient.convertToType(data['responseHeaders'], ['String']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>AccessDetail</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/AccessDetail} obj Optional instance to populate.
|
||||
* @return {module:model/AccessDetail} The populated <code>AccessDetail</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AccessDetail();
|
||||
|
||||
if (data.hasOwnProperty('frontendToken')) {
|
||||
obj['frontendToken'] = ApiClient.convertToType(data['frontendToken'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('token')) {
|
||||
obj['token'] = ApiClient.convertToType(data['token'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('bindAddress')) {
|
||||
obj['bindAddress'] = ApiClient.convertToType(data['bindAddress'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('responseHeaders')) {
|
||||
obj['responseHeaders'] = ApiClient.convertToType(data['responseHeaders'], ['String']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>AccessDetail</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>AccessDetail</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['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['bindAddress'] && !(typeof data['bindAddress'] === 'string' || data['bindAddress'] instanceof String)) {
|
||||
throw new Error("Expected the field `bindAddress` to be a primitive type in the JSON string but got " + data['bindAddress']);
|
||||
}
|
||||
// ensure the json data is an array
|
||||
if (!Array.isArray(data['responseHeaders'])) {
|
||||
throw new Error("Expected the field `responseHeaders` to be an array in the JSON data but got " + data['responseHeaders']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} frontendToken
|
||||
*/
|
||||
AccessDetail.prototype['frontendToken'] = undefined;
|
||||
AccessDetail.prototype.frontendToken = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} token
|
||||
*/
|
||||
AccessDetail.prototype['token'] = undefined;
|
||||
AccessDetail.prototype.token = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} bindAddress
|
||||
*/
|
||||
AccessDetail.prototype['bindAddress'] = undefined;
|
||||
AccessDetail.prototype.bindAddress = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<String>} responseHeaders
|
||||
*/
|
||||
AccessDetail.prototype['responseHeaders'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AccessDetail;
|
||||
AccessDetail.prototype.responseHeaders = undefined;
|
||||
|
||||
|
@ -1,87 +1,52 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The AccessPrivateResponse model module.
|
||||
* @module model/AccessPrivateResponse
|
||||
* @version version not set
|
||||
*/
|
||||
class AccessPrivateResponse {
|
||||
/**
|
||||
* Constructs a new <code>AccessPrivateResponse</code>.
|
||||
* @alias module:model/AccessPrivateResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
AccessPrivateResponse.initialize(this);
|
||||
export class AccessPrivateResponse {
|
||||
/**
|
||||
* Constructs a new <code>AccessPrivateResponse</code>.
|
||||
* @alias module:model/AccessPrivateResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>AccessPrivateResponse</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/AccessPrivateResponse} obj Optional instance to populate.
|
||||
* @return {module:model/AccessPrivateResponse} The populated <code>AccessPrivateResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AccessPrivateResponse();
|
||||
if (data.hasOwnProperty('frontendToken'))
|
||||
obj.frontendToken = ApiClient.convertToType(data['frontendToken'], 'String');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>AccessPrivateResponse</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/AccessPrivateResponse} obj Optional instance to populate.
|
||||
* @return {module:model/AccessPrivateResponse} The populated <code>AccessPrivateResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new AccessPrivateResponse();
|
||||
|
||||
if (data.hasOwnProperty('frontendToken')) {
|
||||
obj['frontendToken'] = ApiClient.convertToType(data['frontendToken'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>AccessPrivateResponse</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>AccessPrivateResponse</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;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} frontendToken
|
||||
*/
|
||||
AccessPrivateResponse.prototype['frontendToken'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default AccessPrivateResponse;
|
||||
AccessPrivateResponse.prototype.frontendToken = undefined;
|
||||
|
||||
|
@ -1,91 +1,46 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ProtobufAny model module.
|
||||
* @module model/ProtobufAny
|
||||
* @version version not set
|
||||
*/
|
||||
class ProtobufAny {
|
||||
/**
|
||||
* Constructs a new <code>ProtobufAny</code>.
|
||||
* @alias module:model/ProtobufAny
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ProtobufAny.initialize(this);
|
||||
export class ProtobufAny {
|
||||
/**
|
||||
* Constructs a new <code>ProtobufAny</code>.
|
||||
* @alias module:model/ProtobufAny
|
||||
* @class
|
||||
* @extends Object
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ProtobufAny</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/ProtobufAny} obj Optional instance to populate.
|
||||
* @return {module:model/ProtobufAny} The populated <code>ProtobufAny</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ProtobufAny();
|
||||
ApiClient.constructFromObject(data, obj, 'Object');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>ProtobufAny</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/ProtobufAny} obj Optional instance to populate.
|
||||
* @return {module:model/ProtobufAny} The populated <code>ProtobufAny</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ProtobufAny();
|
||||
|
||||
ApiClient.constructFromObject(data, obj, 'Object');
|
||||
|
||||
|
||||
if (data.hasOwnProperty('@type')) {
|
||||
obj['@type'] = ApiClient.convertToType(data['@type'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>ProtobufAny</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>ProtobufAny</code>.
|
||||
*/
|
||||
static validateJSON(data) {
|
||||
// ensure the json data is a string
|
||||
if (data['@type'] && !(typeof data['@type'] === 'string' || data['@type'] instanceof String)) {
|
||||
throw new Error("Expected the field `@type` to be a primitive type in the JSON string but got " + data['@type']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} @type
|
||||
*/
|
||||
ProtobufAny.prototype['@type'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ProtobufAny;
|
||||
|
||||
|
44
agent/agentUi/src/api/src/model/ReleaseAccessResponse.js
Normal file
44
agent/agentUi/src/api/src/model/ReleaseAccessResponse.js
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
import {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ReleaseAccessResponse model module.
|
||||
* @module model/ReleaseAccessResponse
|
||||
* @version version not set
|
||||
*/
|
||||
export class ReleaseAccessResponse {
|
||||
/**
|
||||
* Constructs a new <code>ReleaseAccessResponse</code>.
|
||||
* @alias module:model/ReleaseAccessResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ReleaseAccessResponse</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/ReleaseAccessResponse} obj Optional instance to populate.
|
||||
* @return {module:model/ReleaseAccessResponse} The populated <code>ReleaseAccessResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ReleaseAccessResponse();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
44
agent/agentUi/src/api/src/model/ReleaseShareResponse.js
Normal file
44
agent/agentUi/src/api/src/model/ReleaseShareResponse.js
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
import {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ReleaseShareResponse model module.
|
||||
* @module model/ReleaseShareResponse
|
||||
* @version version not set
|
||||
*/
|
||||
export class ReleaseShareResponse {
|
||||
/**
|
||||
* Constructs a new <code>ReleaseShareResponse</code>.
|
||||
* @alias module:model/ReleaseShareResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ReleaseShareResponse</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/ReleaseShareResponse} obj Optional instance to populate.
|
||||
* @return {module:model/ReleaseShareResponse} The populated <code>ReleaseShareResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ReleaseShareResponse();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
}
|
@ -1,108 +1,67 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 ProtobufAny from './ProtobufAny';
|
||||
import {ApiClient} from '../ApiClient';
|
||||
import {ProtobufAny} from './ProtobufAny';
|
||||
|
||||
/**
|
||||
* The RpcStatus model module.
|
||||
* @module model/RpcStatus
|
||||
* @version version not set
|
||||
*/
|
||||
class RpcStatus {
|
||||
/**
|
||||
* Constructs a new <code>RpcStatus</code>.
|
||||
* @alias module:model/RpcStatus
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
RpcStatus.initialize(this);
|
||||
export class RpcStatus {
|
||||
/**
|
||||
* Constructs a new <code>RpcStatus</code>.
|
||||
* @alias module:model/RpcStatus
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>RpcStatus</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/RpcStatus} obj Optional instance to populate.
|
||||
* @return {module:model/RpcStatus} The populated <code>RpcStatus</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new RpcStatus();
|
||||
if (data.hasOwnProperty('code'))
|
||||
obj.code = ApiClient.convertToType(data['code'], 'Number');
|
||||
if (data.hasOwnProperty('message'))
|
||||
obj.message = ApiClient.convertToType(data['message'], 'String');
|
||||
if (data.hasOwnProperty('details'))
|
||||
obj.details = ApiClient.convertToType(data['details'], [ProtobufAny]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>RpcStatus</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/RpcStatus} obj Optional instance to populate.
|
||||
* @return {module:model/RpcStatus} The populated <code>RpcStatus</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new RpcStatus();
|
||||
|
||||
if (data.hasOwnProperty('code')) {
|
||||
obj['code'] = ApiClient.convertToType(data['code'], 'Number');
|
||||
}
|
||||
if (data.hasOwnProperty('message')) {
|
||||
obj['message'] = ApiClient.convertToType(data['message'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('details')) {
|
||||
obj['details'] = ApiClient.convertToType(data['details'], [ProtobufAny]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>RpcStatus</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>RpcStatus</code>.
|
||||
*/
|
||||
static validateJSON(data) {
|
||||
// ensure the json data is a string
|
||||
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
||||
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
||||
}
|
||||
// ensure the json data is an array
|
||||
if (!Array.isArray(data['details'])) {
|
||||
throw new Error("Expected the field `details` to be an array in the JSON data but got " + data['details']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {Number} code
|
||||
*/
|
||||
RpcStatus.prototype['code'] = undefined;
|
||||
RpcStatus.prototype.code = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} message
|
||||
*/
|
||||
RpcStatus.prototype['message'] = undefined;
|
||||
RpcStatus.prototype.message = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<module:model/ProtobufAny>} details
|
||||
*/
|
||||
RpcStatus.prototype['details'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default RpcStatus;
|
||||
RpcStatus.prototype.details = undefined;
|
||||
|
||||
|
@ -1,163 +1,101 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ShareDetail model module.
|
||||
* @module model/ShareDetail
|
||||
* @version version not set
|
||||
*/
|
||||
class ShareDetail {
|
||||
/**
|
||||
* Constructs a new <code>ShareDetail</code>.
|
||||
* @alias module:model/ShareDetail
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ShareDetail.initialize(this);
|
||||
export class ShareDetail {
|
||||
/**
|
||||
* Constructs a new <code>ShareDetail</code>.
|
||||
* @alias module:model/ShareDetail
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ShareDetail</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/ShareDetail} obj Optional instance to populate.
|
||||
* @return {module:model/ShareDetail} The populated <code>ShareDetail</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ShareDetail();
|
||||
if (data.hasOwnProperty('token'))
|
||||
obj.token = ApiClient.convertToType(data['token'], '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('reserved'))
|
||||
obj.reserved = ApiClient.convertToType(data['reserved'], 'Boolean');
|
||||
if (data.hasOwnProperty('frontendEndpoint'))
|
||||
obj.frontendEndpoint = ApiClient.convertToType(data['frontendEndpoint'], ['String']);
|
||||
if (data.hasOwnProperty('backendEndpoint'))
|
||||
obj.backendEndpoint = ApiClient.convertToType(data['backendEndpoint'], 'String');
|
||||
if (data.hasOwnProperty('closed'))
|
||||
obj.closed = ApiClient.convertToType(data['closed'], 'Boolean');
|
||||
if (data.hasOwnProperty('status'))
|
||||
obj.status = ApiClient.convertToType(data['status'], 'String');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>ShareDetail</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/ShareDetail} obj Optional instance to populate.
|
||||
* @return {module:model/ShareDetail} The populated <code>ShareDetail</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ShareDetail();
|
||||
|
||||
if (data.hasOwnProperty('token')) {
|
||||
obj['token'] = ApiClient.convertToType(data['token'], '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('reserved')) {
|
||||
obj['reserved'] = ApiClient.convertToType(data['reserved'], 'Boolean');
|
||||
}
|
||||
if (data.hasOwnProperty('frontendEndpoint')) {
|
||||
obj['frontendEndpoint'] = ApiClient.convertToType(data['frontendEndpoint'], ['String']);
|
||||
}
|
||||
if (data.hasOwnProperty('backendEndpoint')) {
|
||||
obj['backendEndpoint'] = ApiClient.convertToType(data['backendEndpoint'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('closed')) {
|
||||
obj['closed'] = ApiClient.convertToType(data['closed'], 'Boolean');
|
||||
}
|
||||
if (data.hasOwnProperty('status')) {
|
||||
obj['status'] = ApiClient.convertToType(data['status'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>ShareDetail</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>ShareDetail</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['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 an array
|
||||
if (!Array.isArray(data['frontendEndpoint'])) {
|
||||
throw new Error("Expected the field `frontendEndpoint` to be an array in the JSON data but got " + data['frontendEndpoint']);
|
||||
}
|
||||
// ensure the json data is a string
|
||||
if (data['backendEndpoint'] && !(typeof data['backendEndpoint'] === 'string' || data['backendEndpoint'] instanceof String)) {
|
||||
throw new Error("Expected the field `backendEndpoint` to be a primitive type in the JSON string but got " + data['backendEndpoint']);
|
||||
}
|
||||
// ensure the json data is a string
|
||||
if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
|
||||
throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} token
|
||||
*/
|
||||
ShareDetail.prototype['token'] = undefined;
|
||||
ShareDetail.prototype.token = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} shareMode
|
||||
*/
|
||||
ShareDetail.prototype['shareMode'] = undefined;
|
||||
ShareDetail.prototype.shareMode = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} backendMode
|
||||
*/
|
||||
ShareDetail.prototype['backendMode'] = undefined;
|
||||
ShareDetail.prototype.backendMode = undefined;
|
||||
|
||||
/**
|
||||
* @member {Boolean} reserved
|
||||
*/
|
||||
ShareDetail.prototype['reserved'] = undefined;
|
||||
ShareDetail.prototype.reserved = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<String>} frontendEndpoint
|
||||
*/
|
||||
ShareDetail.prototype['frontendEndpoint'] = undefined;
|
||||
ShareDetail.prototype.frontendEndpoint = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} backendEndpoint
|
||||
*/
|
||||
ShareDetail.prototype['backendEndpoint'] = undefined;
|
||||
ShareDetail.prototype.backendEndpoint = undefined;
|
||||
|
||||
/**
|
||||
* @member {Boolean} closed
|
||||
*/
|
||||
ShareDetail.prototype['closed'] = undefined;
|
||||
ShareDetail.prototype.closed = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} status
|
||||
*/
|
||||
ShareDetail.prototype['status'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ShareDetail;
|
||||
ShareDetail.prototype.status = undefined;
|
||||
|
||||
|
@ -1,87 +1,52 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The SharePrivateResponse model module.
|
||||
* @module model/SharePrivateResponse
|
||||
* @version version not set
|
||||
*/
|
||||
class SharePrivateResponse {
|
||||
/**
|
||||
* Constructs a new <code>SharePrivateResponse</code>.
|
||||
* @alias module:model/SharePrivateResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
SharePrivateResponse.initialize(this);
|
||||
export class SharePrivateResponse {
|
||||
/**
|
||||
* Constructs a new <code>SharePrivateResponse</code>.
|
||||
* @alias module:model/SharePrivateResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SharePrivateResponse</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/SharePrivateResponse} obj Optional instance to populate.
|
||||
* @return {module:model/SharePrivateResponse} The populated <code>SharePrivateResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new SharePrivateResponse();
|
||||
if (data.hasOwnProperty('token'))
|
||||
obj.token = ApiClient.convertToType(data['token'], 'String');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>SharePrivateResponse</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/SharePrivateResponse} obj Optional instance to populate.
|
||||
* @return {module:model/SharePrivateResponse} The populated <code>SharePrivateResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new SharePrivateResponse();
|
||||
|
||||
if (data.hasOwnProperty('token')) {
|
||||
obj['token'] = ApiClient.convertToType(data['token'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>SharePrivateResponse</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>SharePrivateResponse</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;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} token
|
||||
*/
|
||||
SharePrivateResponse.prototype['token'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default SharePrivateResponse;
|
||||
SharePrivateResponse.prototype.token = undefined;
|
||||
|
||||
|
@ -1,99 +1,59 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The SharePublicResponse model module.
|
||||
* @module model/SharePublicResponse
|
||||
* @version version not set
|
||||
*/
|
||||
class SharePublicResponse {
|
||||
/**
|
||||
* Constructs a new <code>SharePublicResponse</code>.
|
||||
* @alias module:model/SharePublicResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
SharePublicResponse.initialize(this);
|
||||
export class SharePublicResponse {
|
||||
/**
|
||||
* Constructs a new <code>SharePublicResponse</code>.
|
||||
* @alias module:model/SharePublicResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SharePublicResponse</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/SharePublicResponse} obj Optional instance to populate.
|
||||
* @return {module:model/SharePublicResponse} The populated <code>SharePublicResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new SharePublicResponse();
|
||||
if (data.hasOwnProperty('token'))
|
||||
obj.token = ApiClient.convertToType(data['token'], 'String');
|
||||
if (data.hasOwnProperty('frontendEndpoints'))
|
||||
obj.frontendEndpoints = ApiClient.convertToType(data['frontendEndpoints'], ['String']);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>SharePublicResponse</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/SharePublicResponse} obj Optional instance to populate.
|
||||
* @return {module:model/SharePublicResponse} The populated <code>SharePublicResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new SharePublicResponse();
|
||||
|
||||
if (data.hasOwnProperty('token')) {
|
||||
obj['token'] = ApiClient.convertToType(data['token'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('frontendEndpoints')) {
|
||||
obj['frontendEndpoints'] = ApiClient.convertToType(data['frontendEndpoints'], ['String']);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>SharePublicResponse</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>SharePublicResponse</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 an array
|
||||
if (!Array.isArray(data['frontendEndpoints'])) {
|
||||
throw new Error("Expected the field `frontendEndpoints` to be an array in the JSON data but got " + data['frontendEndpoints']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} token
|
||||
*/
|
||||
SharePublicResponse.prototype['token'] = undefined;
|
||||
SharePublicResponse.prototype.token = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<String>} frontendEndpoints
|
||||
*/
|
||||
SharePublicResponse.prototype['frontendEndpoints'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default SharePublicResponse;
|
||||
SharePublicResponse.prototype.frontendEndpoints = undefined;
|
||||
|
||||
|
@ -1,135 +1,80 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The ShareReservedResponse model module.
|
||||
* @module model/ShareReservedResponse
|
||||
* @version version not set
|
||||
*/
|
||||
class ShareReservedResponse {
|
||||
/**
|
||||
* Constructs a new <code>ShareReservedResponse</code>.
|
||||
* @alias module:model/ShareReservedResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
ShareReservedResponse.initialize(this);
|
||||
export class ShareReservedResponse {
|
||||
/**
|
||||
* Constructs a new <code>ShareReservedResponse</code>.
|
||||
* @alias module:model/ShareReservedResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>ShareReservedResponse</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/ShareReservedResponse} obj Optional instance to populate.
|
||||
* @return {module:model/ShareReservedResponse} The populated <code>ShareReservedResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ShareReservedResponse();
|
||||
if (data.hasOwnProperty('token'))
|
||||
obj.token = ApiClient.convertToType(data['token'], 'String');
|
||||
if (data.hasOwnProperty('backendMode'))
|
||||
obj.backendMode = ApiClient.convertToType(data['backendMode'], 'String');
|
||||
if (data.hasOwnProperty('shareMode'))
|
||||
obj.shareMode = ApiClient.convertToType(data['shareMode'], 'String');
|
||||
if (data.hasOwnProperty('frontendEndpoints'))
|
||||
obj.frontendEndpoints = ApiClient.convertToType(data['frontendEndpoints'], ['String']);
|
||||
if (data.hasOwnProperty('target'))
|
||||
obj.target = ApiClient.convertToType(data['target'], 'String');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>ShareReservedResponse</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/ShareReservedResponse} obj Optional instance to populate.
|
||||
* @return {module:model/ShareReservedResponse} The populated <code>ShareReservedResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new ShareReservedResponse();
|
||||
|
||||
if (data.hasOwnProperty('token')) {
|
||||
obj['token'] = ApiClient.convertToType(data['token'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('backendMode')) {
|
||||
obj['backendMode'] = ApiClient.convertToType(data['backendMode'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('shareMode')) {
|
||||
obj['shareMode'] = ApiClient.convertToType(data['shareMode'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('frontendEndpoints')) {
|
||||
obj['frontendEndpoints'] = ApiClient.convertToType(data['frontendEndpoints'], ['String']);
|
||||
}
|
||||
if (data.hasOwnProperty('target')) {
|
||||
obj['target'] = ApiClient.convertToType(data['target'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>ShareReservedResponse</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>ShareReservedResponse</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['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['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['frontendEndpoints'])) {
|
||||
throw new Error("Expected the field `frontendEndpoints` to be an array in the JSON data but got " + data['frontendEndpoints']);
|
||||
}
|
||||
// ensure the json data is a string
|
||||
if (data['target'] && !(typeof data['target'] === 'string' || data['target'] instanceof String)) {
|
||||
throw new Error("Expected the field `target` to be a primitive type in the JSON string but got " + data['target']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} token
|
||||
*/
|
||||
ShareReservedResponse.prototype['token'] = undefined;
|
||||
ShareReservedResponse.prototype.token = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} backendMode
|
||||
*/
|
||||
ShareReservedResponse.prototype['backendMode'] = undefined;
|
||||
ShareReservedResponse.prototype.backendMode = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} shareMode
|
||||
*/
|
||||
ShareReservedResponse.prototype['shareMode'] = undefined;
|
||||
ShareReservedResponse.prototype.shareMode = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<String>} frontendEndpoints
|
||||
*/
|
||||
ShareReservedResponse.prototype['frontendEndpoints'] = undefined;
|
||||
ShareReservedResponse.prototype.frontendEndpoints = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} target
|
||||
*/
|
||||
ShareReservedResponse.prototype['target'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ShareReservedResponse;
|
||||
ShareReservedResponse.prototype.target = undefined;
|
||||
|
||||
|
@ -1,113 +1,61 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 AccessDetail from './AccessDetail';
|
||||
import ShareDetail from './ShareDetail';
|
||||
import {ApiClient} from '../ApiClient';
|
||||
import {AccessDetail} from './AccessDetail';
|
||||
import {ShareDetail} from './ShareDetail';
|
||||
|
||||
/**
|
||||
* The StatusResponse model module.
|
||||
* @module model/StatusResponse
|
||||
* @version version not set
|
||||
*/
|
||||
class StatusResponse {
|
||||
/**
|
||||
* Constructs a new <code>StatusResponse</code>.
|
||||
* @alias module:model/StatusResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
StatusResponse.initialize(this);
|
||||
export class StatusResponse {
|
||||
/**
|
||||
* Constructs a new <code>StatusResponse</code>.
|
||||
* @alias module:model/StatusResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>StatusResponse</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/StatusResponse} obj Optional instance to populate.
|
||||
* @return {module:model/StatusResponse} The populated <code>StatusResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new StatusResponse();
|
||||
if (data.hasOwnProperty('accesses'))
|
||||
obj.accesses = ApiClient.convertToType(data['accesses'], [AccessDetail]);
|
||||
if (data.hasOwnProperty('shares'))
|
||||
obj.shares = ApiClient.convertToType(data['shares'], [ShareDetail]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>StatusResponse</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/StatusResponse} obj Optional instance to populate.
|
||||
* @return {module:model/StatusResponse} The populated <code>StatusResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new StatusResponse();
|
||||
|
||||
if (data.hasOwnProperty('accesses')) {
|
||||
obj['accesses'] = ApiClient.convertToType(data['accesses'], [AccessDetail]);
|
||||
}
|
||||
if (data.hasOwnProperty('shares')) {
|
||||
obj['shares'] = ApiClient.convertToType(data['shares'], [ShareDetail]);
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>StatusResponse</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>StatusResponse</code>.
|
||||
*/
|
||||
static validateJSON(data) {
|
||||
if (data['accesses']) { // data not null
|
||||
// ensure the json data is an array
|
||||
if (!Array.isArray(data['accesses'])) {
|
||||
throw new Error("Expected the field `accesses` to be an array in the JSON data but got " + data['accesses']);
|
||||
}
|
||||
// validate the optional field `accesses` (array)
|
||||
for (const item of data['accesses']) {
|
||||
AccessDetail.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']) {
|
||||
ShareDetail.validateJSON(item);
|
||||
};
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {Array.<module:model/AccessDetail>} accesses
|
||||
*/
|
||||
StatusResponse.prototype['accesses'] = undefined;
|
||||
StatusResponse.prototype.accesses = undefined;
|
||||
|
||||
/**
|
||||
* @member {Array.<module:model/ShareDetail>} shares
|
||||
*/
|
||||
StatusResponse.prototype['shares'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default StatusResponse;
|
||||
StatusResponse.prototype.shares = undefined;
|
||||
|
||||
|
@ -1,99 +1,59 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* 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 {ApiClient} from '../ApiClient';
|
||||
|
||||
/**
|
||||
* The VersionResponse model module.
|
||||
* @module model/VersionResponse
|
||||
* @version version not set
|
||||
*/
|
||||
class VersionResponse {
|
||||
/**
|
||||
* Constructs a new <code>VersionResponse</code>.
|
||||
* @alias module:model/VersionResponse
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
VersionResponse.initialize(this);
|
||||
export class VersionResponse {
|
||||
/**
|
||||
* Constructs a new <code>VersionResponse</code>.
|
||||
* @alias module:model/VersionResponse
|
||||
* @class
|
||||
*/
|
||||
constructor() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>VersionResponse</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/VersionResponse} obj Optional instance to populate.
|
||||
* @return {module:model/VersionResponse} The populated <code>VersionResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new VersionResponse();
|
||||
if (data.hasOwnProperty('v'))
|
||||
obj.v = ApiClient.convertToType(data['v'], 'String');
|
||||
if (data.hasOwnProperty('consoleEndpoint'))
|
||||
obj.consoleEndpoint = ApiClient.convertToType(data['consoleEndpoint'], 'String');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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>VersionResponse</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/VersionResponse} obj Optional instance to populate.
|
||||
* @return {module:model/VersionResponse} The populated <code>VersionResponse</code> instance.
|
||||
*/
|
||||
static constructFromObject(data, obj) {
|
||||
if (data) {
|
||||
obj = obj || new VersionResponse();
|
||||
|
||||
if (data.hasOwnProperty('v')) {
|
||||
obj['v'] = ApiClient.convertToType(data['v'], 'String');
|
||||
}
|
||||
if (data.hasOwnProperty('consoleEndpoint')) {
|
||||
obj['consoleEndpoint'] = ApiClient.convertToType(data['consoleEndpoint'], 'String');
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON data with respect to <code>VersionResponse</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>VersionResponse</code>.
|
||||
*/
|
||||
static validateJSON(data) {
|
||||
// ensure the json data is a string
|
||||
if (data['v'] && !(typeof data['v'] === 'string' || data['v'] instanceof String)) {
|
||||
throw new Error("Expected the field `v` to be a primitive type in the JSON string but got " + data['v']);
|
||||
}
|
||||
// ensure the json data is a string
|
||||
if (data['consoleEndpoint'] && !(typeof data['consoleEndpoint'] === 'string' || data['consoleEndpoint'] instanceof String)) {
|
||||
throw new Error("Expected the field `consoleEndpoint` to be a primitive type in the JSON string but got " + data['consoleEndpoint']);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @member {String} v
|
||||
*/
|
||||
VersionResponse.prototype['v'] = undefined;
|
||||
VersionResponse.prototype.v = undefined;
|
||||
|
||||
/**
|
||||
* @member {String} consoleEndpoint
|
||||
*/
|
||||
VersionResponse.prototype['consoleEndpoint'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default VersionResponse;
|
||||
VersionResponse.prototype.consoleEndpoint = undefined;
|
||||
|
||||
|
@ -1,71 +1,183 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.AgentApi();
|
||||
instance = new AgentagentGrpcagentproto.AgentApi();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
describe('(package)', function() {
|
||||
describe('AgentApi', function() {
|
||||
describe('agentAccessPrivate', function() {
|
||||
it('should call agentAccessPrivate successfully', function(done) {
|
||||
// TODO: uncomment, update parameter values for agentAccessPrivate call and complete the assertions
|
||||
/*
|
||||
var opts = {};
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
instance.agentAccessPrivate(opts, function(error, data, response) {
|
||||
if (error) {
|
||||
done(error);
|
||||
return;
|
||||
}
|
||||
// TODO: update response assertions
|
||||
expect(data).to.be.a(AgentagentGrpcagentproto.AccessPrivateResponse);
|
||||
|
||||
describe('AgentApi', function() {
|
||||
describe('agentStatus', function() {
|
||||
it('should call agentStatus successfully', function(done) {
|
||||
//uncomment below and update the code to test agentStatus
|
||||
//instance.agentStatus(function(error) {
|
||||
// if (error) throw error;
|
||||
//expect().to.be();
|
||||
//});
|
||||
done();
|
||||
done();
|
||||
});
|
||||
*/
|
||||
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('agentVersion', function() {
|
||||
it('should call agentVersion successfully', function(done) {
|
||||
//uncomment below and update the code to test agentVersion
|
||||
//instance.agentVersion(function(error) {
|
||||
// if (error) throw error;
|
||||
//expect().to.be();
|
||||
//});
|
||||
done();
|
||||
describe('agentReleaseAccess', function() {
|
||||
it('should call agentReleaseAccess successfully', function(done) {
|
||||
// TODO: uncomment, update parameter values for agentReleaseAccess call and complete the assertions
|
||||
/*
|
||||
var opts = {};
|
||||
|
||||
instance.agentReleaseAccess(opts, function(error, data, response) {
|
||||
if (error) {
|
||||
done(error);
|
||||
return;
|
||||
}
|
||||
// TODO: update response assertions
|
||||
expect(data).to.be.a(AgentagentGrpcagentproto.ReleaseAccessResponse);
|
||||
|
||||
done();
|
||||
});
|
||||
*/
|
||||
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
||||
done();
|
||||
});
|
||||
});
|
||||
describe('agentReleaseShare', function() {
|
||||
it('should call agentReleaseShare successfully', function(done) {
|
||||
// TODO: uncomment, update parameter values for agentReleaseShare call and complete the assertions
|
||||
/*
|
||||
var opts = {};
|
||||
|
||||
instance.agentReleaseShare(opts, function(error, data, response) {
|
||||
if (error) {
|
||||
done(error);
|
||||
return;
|
||||
}
|
||||
// TODO: update response assertions
|
||||
expect(data).to.be.a(AgentagentGrpcagentproto.ReleaseShareResponse);
|
||||
|
||||
done();
|
||||
});
|
||||
*/
|
||||
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
||||
done();
|
||||
});
|
||||
});
|
||||
describe('agentSharePrivate', function() {
|
||||
it('should call agentSharePrivate successfully', function(done) {
|
||||
// TODO: uncomment, update parameter values for agentSharePrivate call and complete the assertions
|
||||
/*
|
||||
var opts = {};
|
||||
|
||||
instance.agentSharePrivate(opts, function(error, data, response) {
|
||||
if (error) {
|
||||
done(error);
|
||||
return;
|
||||
}
|
||||
// TODO: update response assertions
|
||||
expect(data).to.be.a(AgentagentGrpcagentproto.SharePrivateResponse);
|
||||
|
||||
done();
|
||||
});
|
||||
*/
|
||||
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
||||
done();
|
||||
});
|
||||
});
|
||||
describe('agentSharePublic', function() {
|
||||
it('should call agentSharePublic successfully', function(done) {
|
||||
// TODO: uncomment, update parameter values for agentSharePublic call and complete the assertions
|
||||
/*
|
||||
var opts = {};
|
||||
|
||||
instance.agentSharePublic(opts, function(error, data, response) {
|
||||
if (error) {
|
||||
done(error);
|
||||
return;
|
||||
}
|
||||
// TODO: update response assertions
|
||||
expect(data).to.be.a(AgentagentGrpcagentproto.SharePublicResponse);
|
||||
|
||||
done();
|
||||
});
|
||||
*/
|
||||
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
||||
done();
|
||||
});
|
||||
});
|
||||
describe('agentStatus', function() {
|
||||
it('should call agentStatus successfully', function(done) {
|
||||
// TODO: uncomment agentStatus call and complete the assertions
|
||||
/*
|
||||
|
||||
instance.agentStatus(function(error, data, response) {
|
||||
if (error) {
|
||||
done(error);
|
||||
return;
|
||||
}
|
||||
// TODO: update response assertions
|
||||
expect(data).to.be.a(AgentagentGrpcagentproto.StatusResponse);
|
||||
|
||||
done();
|
||||
});
|
||||
*/
|
||||
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
||||
done();
|
||||
});
|
||||
});
|
||||
describe('agentVersion', function() {
|
||||
it('should call agentVersion successfully', function(done) {
|
||||
// TODO: uncomment agentVersion call and complete the assertions
|
||||
/*
|
||||
|
||||
instance.agentVersion(function(error, data, response) {
|
||||
if (error) {
|
||||
done(error);
|
||||
return;
|
||||
}
|
||||
// TODO: update response assertions
|
||||
expect(data).to.be.a(AgentagentGrpcagentproto.VersionResponse);
|
||||
|
||||
done();
|
||||
});
|
||||
*/
|
||||
// TODO: uncomment and complete method invocation above, then delete this line and the next:
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
81
agent/agentUi/src/api/test/assert-equals.js
Normal file
81
agent/agentUi/src/api/test/assert-equals.js
Normal file
@ -0,0 +1,81 @@
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
module.exports = factory();
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.assertEquals = factory();
|
||||
}
|
||||
}(this, function() {
|
||||
'use strict';
|
||||
|
||||
var assertEquals = function(expected, actual, ptr) {
|
||||
if (!ptr)
|
||||
ptr = "";
|
||||
if (actual === expected)
|
||||
return;
|
||||
if (expected instanceof Date || actual instanceof Date) {
|
||||
expected = toISODateString(expected);
|
||||
actual = toISODateString(actual);
|
||||
if (actual !== expected)
|
||||
fail(expected, actual, ptr, "date value incorrect;");
|
||||
}
|
||||
if (!expected || !actual || typeof expected != 'object' && typeof actual != 'object') {
|
||||
if (typeof actual != typeof expected)
|
||||
fail(typeof expected, typeof actual, ptr, "value type incorrect;");
|
||||
if (actual != expected)
|
||||
fail(expected, actual, ptr, "value incorrect;");
|
||||
}
|
||||
return checkObject(expected, actual, ptr);
|
||||
}
|
||||
|
||||
function toISODateString(value) {
|
||||
if (value instanceof Date) {
|
||||
// JavaScript's ISO string contains a milliseconds component that must be stripped out.
|
||||
value = value.toISOString().replace('.000', '');
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function checkObject(expected, actual, ptr) {
|
||||
if (undefOrNull(expected) || undefOrNull(actual))
|
||||
fail(expected, actual, ptr, "missing value;");
|
||||
if (typeof expected !== typeof actual)
|
||||
fail(typeof expected, typeof actual, ptr, "wrong type;");
|
||||
if (expected.prototype !== actual.prototype)
|
||||
fail(expected.prototype, actual.prototype, ptr, "wrong prototype;");
|
||||
try {
|
||||
var expectedKeys = Object.keys(expected);
|
||||
var actualKeys = Object.keys(actual);
|
||||
} catch (e) {
|
||||
fail(expectedKeys, actualKeys, ptr, "wrong keys;");
|
||||
}
|
||||
if (actualKeys.length != expectedKeys.length)
|
||||
fail(expectedKeys.length, actualKeys.length, ptr, "key count incorrect;");
|
||||
expectedKeys.sort();
|
||||
actualKeys.sort();
|
||||
for (var i = 0; i < expectedKeys.length; i++) {
|
||||
if (actualKeys[i] != expectedKeys[i])
|
||||
fail(expectedKeys, actualKeys, ptr, "wrong keys;");
|
||||
}
|
||||
for (i = 0; i < expectedKeys.length; i++) {
|
||||
var key = expectedKeys[i];
|
||||
assertEquals(expected[key], actual[key], ptr + '/' + key);
|
||||
}
|
||||
}
|
||||
|
||||
function undefOrNull(v) {
|
||||
return v === undefined || v === null;
|
||||
}
|
||||
|
||||
function fail(expected, actual, ptr, msg) {
|
||||
var text = ptr + ' ' + msg + " expected: " + expected + ", actual: " + actual;
|
||||
console.log(text);
|
||||
throw new Error(text);
|
||||
}
|
||||
|
||||
return assertEquals;
|
||||
}));
|
@ -1,83 +1,69 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.AccessDetail();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('AccessDetail', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.AccessDetail();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of AccessDetail', function() {
|
||||
// TODO: update the code to test AccessDetail
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.AccessDetail);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property frontendToken (base name: "frontendToken")', function() {
|
||||
// TODO: update the code to test the property frontendToken
|
||||
expect(instance).to.have.property('frontendToken');
|
||||
// expect(instance.frontendToken).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// TODO: update the code to test the property token
|
||||
expect(instance).to.have.property('token');
|
||||
// expect(instance.token).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property bindAddress (base name: "bindAddress")', function() {
|
||||
// TODO: update the code to test the property bindAddress
|
||||
expect(instance).to.have.property('bindAddress');
|
||||
// expect(instance.bindAddress).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property responseHeaders (base name: "responseHeaders")', function() {
|
||||
// TODO: update the code to test the property responseHeaders
|
||||
expect(instance).to.have.property('responseHeaders');
|
||||
// expect(instance.responseHeaders).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('AccessDetail', function() {
|
||||
it('should create an instance of AccessDetail', function() {
|
||||
// uncomment below and update the code to test AccessDetail
|
||||
//var instance = new AgentAgentGrpcAgentProto.AccessDetail();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.AccessDetail);
|
||||
});
|
||||
|
||||
it('should have the property frontendToken (base name: "frontendToken")', function() {
|
||||
// uncomment below and update the code to test the property frontendToken
|
||||
//var instance = new AgentAgentGrpcAgentProto.AccessDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// uncomment below and update the code to test the property token
|
||||
//var instance = new AgentAgentGrpcAgentProto.AccessDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property bindAddress (base name: "bindAddress")', function() {
|
||||
// uncomment below and update the code to test the property bindAddress
|
||||
//var instance = new AgentAgentGrpcAgentProto.AccessDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property responseHeaders (base name: "responseHeaders")', function() {
|
||||
// uncomment below and update the code to test the property responseHeaders
|
||||
//var instance = new AgentAgentGrpcAgentProto.AccessDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,65 +1,51 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.AccessPrivateResponse();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('AccessPrivateResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.AccessPrivateResponse();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of AccessPrivateResponse', function() {
|
||||
// TODO: update the code to test AccessPrivateResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.AccessPrivateResponse);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property frontendToken (base name: "frontendToken")', function() {
|
||||
// TODO: update the code to test the property frontendToken
|
||||
expect(instance).to.have.property('frontendToken');
|
||||
// expect(instance.frontendToken).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('AccessPrivateResponse', function() {
|
||||
it('should create an instance of AccessPrivateResponse', function() {
|
||||
// uncomment below and update the code to test AccessPrivateResponse
|
||||
//var instance = new AgentAgentGrpcAgentProto.AccessPrivateResponse();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.AccessPrivateResponse);
|
||||
});
|
||||
|
||||
it('should have the property frontendToken (base name: "frontendToken")', function() {
|
||||
// uncomment below and update the code to test the property frontendToken
|
||||
//var instance = new AgentAgentGrpcAgentProto.AccessPrivateResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,65 +1,45 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.ProtobufAny();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('ProtobufAny', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.ProtobufAny();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of ProtobufAny', function() {
|
||||
// TODO: update the code to test ProtobufAny
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.ProtobufAny);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
|
||||
describe('ProtobufAny', function() {
|
||||
it('should create an instance of ProtobufAny', function() {
|
||||
// uncomment below and update the code to test ProtobufAny
|
||||
//var instance = new AgentAgentGrpcAgentProto.ProtobufAny();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.ProtobufAny);
|
||||
});
|
||||
|
||||
it('should have the property type (base name: "@type")', function() {
|
||||
// uncomment below and update the code to test the property type
|
||||
//var instance = new AgentAgentGrpcAgentProto.ProtobufAny();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
describe('(package)', function() {
|
||||
describe('ReleaseAccessResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.ReleaseAccessResponse();
|
||||
});
|
||||
|
||||
it('should create an instance of ReleaseAccessResponse', function() {
|
||||
// TODO: update the code to test ReleaseAccessResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.ReleaseAccessResponse);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}));
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
describe('(package)', function() {
|
||||
describe('ReleaseShareResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.ReleaseShareResponse();
|
||||
});
|
||||
|
||||
it('should create an instance of ReleaseShareResponse', function() {
|
||||
// TODO: update the code to test ReleaseShareResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.ReleaseShareResponse);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}));
|
@ -1,77 +1,63 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.RpcStatus();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('RpcStatus', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.RpcStatus();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of RpcStatus', function() {
|
||||
// TODO: update the code to test RpcStatus
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.RpcStatus);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property code (base name: "code")', function() {
|
||||
// TODO: update the code to test the property code
|
||||
expect(instance).to.have.property('code');
|
||||
// expect(instance.code).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property message (base name: "message")', function() {
|
||||
// TODO: update the code to test the property message
|
||||
expect(instance).to.have.property('message');
|
||||
// expect(instance.message).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property details (base name: "details")', function() {
|
||||
// TODO: update the code to test the property details
|
||||
expect(instance).to.have.property('details');
|
||||
// expect(instance.details).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('RpcStatus', function() {
|
||||
it('should create an instance of RpcStatus', function() {
|
||||
// uncomment below and update the code to test RpcStatus
|
||||
//var instance = new AgentAgentGrpcAgentProto.RpcStatus();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.RpcStatus);
|
||||
});
|
||||
|
||||
it('should have the property code (base name: "code")', function() {
|
||||
// uncomment below and update the code to test the property code
|
||||
//var instance = new AgentAgentGrpcAgentProto.RpcStatus();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property message (base name: "message")', function() {
|
||||
// uncomment below and update the code to test the property message
|
||||
//var instance = new AgentAgentGrpcAgentProto.RpcStatus();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property details (base name: "details")', function() {
|
||||
// uncomment below and update the code to test the property details
|
||||
//var instance = new AgentAgentGrpcAgentProto.RpcStatus();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,107 +1,93 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('ShareDetail', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.ShareDetail();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of ShareDetail', function() {
|
||||
// TODO: update the code to test ShareDetail
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.ShareDetail);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// TODO: update the code to test the property token
|
||||
expect(instance).to.have.property('token');
|
||||
// expect(instance.token).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property shareMode (base name: "shareMode")', function() {
|
||||
// TODO: update the code to test the property shareMode
|
||||
expect(instance).to.have.property('shareMode');
|
||||
// expect(instance.shareMode).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property backendMode (base name: "backendMode")', function() {
|
||||
// TODO: update the code to test the property backendMode
|
||||
expect(instance).to.have.property('backendMode');
|
||||
// expect(instance.backendMode).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property reserved (base name: "reserved")', function() {
|
||||
// TODO: update the code to test the property reserved
|
||||
expect(instance).to.have.property('reserved');
|
||||
// expect(instance.reserved).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property frontendEndpoint (base name: "frontendEndpoint")', function() {
|
||||
// TODO: update the code to test the property frontendEndpoint
|
||||
expect(instance).to.have.property('frontendEndpoint');
|
||||
// expect(instance.frontendEndpoint).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property backendEndpoint (base name: "backendEndpoint")', function() {
|
||||
// TODO: update the code to test the property backendEndpoint
|
||||
expect(instance).to.have.property('backendEndpoint');
|
||||
// expect(instance.backendEndpoint).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property closed (base name: "closed")', function() {
|
||||
// TODO: update the code to test the property closed
|
||||
expect(instance).to.have.property('closed');
|
||||
// expect(instance.closed).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property status (base name: "status")', function() {
|
||||
// TODO: update the code to test the property status
|
||||
expect(instance).to.have.property('status');
|
||||
// expect(instance.status).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('ShareDetail', function() {
|
||||
it('should create an instance of ShareDetail', function() {
|
||||
// uncomment below and update the code to test ShareDetail
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.ShareDetail);
|
||||
});
|
||||
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// uncomment below and update the code to test the property token
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property shareMode (base name: "shareMode")', function() {
|
||||
// uncomment below and update the code to test the property shareMode
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property backendMode (base name: "backendMode")', function() {
|
||||
// uncomment below and update the code to test the property backendMode
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property reserved (base name: "reserved")', function() {
|
||||
// uncomment below and update the code to test the property reserved
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property frontendEndpoint (base name: "frontendEndpoint")', function() {
|
||||
// uncomment below and update the code to test the property frontendEndpoint
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property backendEndpoint (base name: "backendEndpoint")', function() {
|
||||
// uncomment below and update the code to test the property backendEndpoint
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property closed (base name: "closed")', function() {
|
||||
// uncomment below and update the code to test the property closed
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property status (base name: "status")', function() {
|
||||
// uncomment below and update the code to test the property status
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareDetail();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,65 +1,51 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.SharePrivateResponse();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('SharePrivateResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.SharePrivateResponse();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of SharePrivateResponse', function() {
|
||||
// TODO: update the code to test SharePrivateResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.SharePrivateResponse);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// TODO: update the code to test the property token
|
||||
expect(instance).to.have.property('token');
|
||||
// expect(instance.token).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('SharePrivateResponse', function() {
|
||||
it('should create an instance of SharePrivateResponse', function() {
|
||||
// uncomment below and update the code to test SharePrivateResponse
|
||||
//var instance = new AgentAgentGrpcAgentProto.SharePrivateResponse();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.SharePrivateResponse);
|
||||
});
|
||||
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// uncomment below and update the code to test the property token
|
||||
//var instance = new AgentAgentGrpcAgentProto.SharePrivateResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,71 +1,57 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.SharePublicResponse();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('SharePublicResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.SharePublicResponse();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of SharePublicResponse', function() {
|
||||
// TODO: update the code to test SharePublicResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.SharePublicResponse);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// TODO: update the code to test the property token
|
||||
expect(instance).to.have.property('token');
|
||||
// expect(instance.token).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property frontendEndpoints (base name: "frontendEndpoints")', function() {
|
||||
// TODO: update the code to test the property frontendEndpoints
|
||||
expect(instance).to.have.property('frontendEndpoints');
|
||||
// expect(instance.frontendEndpoints).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('SharePublicResponse', function() {
|
||||
it('should create an instance of SharePublicResponse', function() {
|
||||
// uncomment below and update the code to test SharePublicResponse
|
||||
//var instance = new AgentAgentGrpcAgentProto.SharePublicResponse();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.SharePublicResponse);
|
||||
});
|
||||
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// uncomment below and update the code to test the property token
|
||||
//var instance = new AgentAgentGrpcAgentProto.SharePublicResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property frontendEndpoints (base name: "frontendEndpoints")', function() {
|
||||
// uncomment below and update the code to test the property frontendEndpoints
|
||||
//var instance = new AgentAgentGrpcAgentProto.SharePublicResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,89 +1,75 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.ShareReservedResponse();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('ShareReservedResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.ShareReservedResponse();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of ShareReservedResponse', function() {
|
||||
// TODO: update the code to test ShareReservedResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.ShareReservedResponse);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// TODO: update the code to test the property token
|
||||
expect(instance).to.have.property('token');
|
||||
// expect(instance.token).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property backendMode (base name: "backendMode")', function() {
|
||||
// TODO: update the code to test the property backendMode
|
||||
expect(instance).to.have.property('backendMode');
|
||||
// expect(instance.backendMode).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property shareMode (base name: "shareMode")', function() {
|
||||
// TODO: update the code to test the property shareMode
|
||||
expect(instance).to.have.property('shareMode');
|
||||
// expect(instance.shareMode).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property frontendEndpoints (base name: "frontendEndpoints")', function() {
|
||||
// TODO: update the code to test the property frontendEndpoints
|
||||
expect(instance).to.have.property('frontendEndpoints');
|
||||
// expect(instance.frontendEndpoints).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property target (base name: "target")', function() {
|
||||
// TODO: update the code to test the property target
|
||||
expect(instance).to.have.property('target');
|
||||
// expect(instance.target).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('ShareReservedResponse', function() {
|
||||
it('should create an instance of ShareReservedResponse', function() {
|
||||
// uncomment below and update the code to test ShareReservedResponse
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareReservedResponse();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.ShareReservedResponse);
|
||||
});
|
||||
|
||||
it('should have the property token (base name: "token")', function() {
|
||||
// uncomment below and update the code to test the property token
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareReservedResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property backendMode (base name: "backendMode")', function() {
|
||||
// uncomment below and update the code to test the property backendMode
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareReservedResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property shareMode (base name: "shareMode")', function() {
|
||||
// uncomment below and update the code to test the property shareMode
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareReservedResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property frontendEndpoints (base name: "frontendEndpoints")', function() {
|
||||
// uncomment below and update the code to test the property frontendEndpoints
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareReservedResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property target (base name: "target")', function() {
|
||||
// uncomment below and update the code to test the property target
|
||||
//var instance = new AgentAgentGrpcAgentProto.ShareReservedResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,71 +1,57 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.StatusResponse();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('StatusResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.StatusResponse();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of StatusResponse', function() {
|
||||
// TODO: update the code to test StatusResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.StatusResponse);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property accesses (base name: "accesses")', function() {
|
||||
// TODO: update the code to test the property accesses
|
||||
expect(instance).to.have.property('accesses');
|
||||
// expect(instance.accesses).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property shares (base name: "shares")', function() {
|
||||
// TODO: update the code to test the property shares
|
||||
expect(instance).to.have.property('shares');
|
||||
// expect(instance.shares).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('StatusResponse', function() {
|
||||
it('should create an instance of StatusResponse', function() {
|
||||
// uncomment below and update the code to test StatusResponse
|
||||
//var instance = new AgentAgentGrpcAgentProto.StatusResponse();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.StatusResponse);
|
||||
});
|
||||
|
||||
it('should have the property accesses (base name: "accesses")', function() {
|
||||
// uncomment below and update the code to test the property accesses
|
||||
//var instance = new AgentAgentGrpcAgentProto.StatusResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
it('should have the property shares (base name: "shares")', function() {
|
||||
// uncomment below and update the code to test the property shares
|
||||
//var instance = new AgentAgentGrpcAgentProto.StatusResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,65 +1,57 @@
|
||||
/**
|
||||
/*
|
||||
* agent/agentGrpc/agent.proto
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
||||
*
|
||||
* The version of the OpenAPI document: version not set
|
||||
*
|
||||
* OpenAPI spec version: version not set
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
*
|
||||
* Swagger Codegen version: 3.0.51
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD.
|
||||
define(['expect.js', process.cwd()+'/src/index'], factory);
|
||||
define(['expect.js', '../../src/index'], factory);
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// CommonJS-like environments that support module.exports, like Node.
|
||||
factory(require('expect.js'), require(process.cwd()+'/src/index'));
|
||||
factory(require('expect.js'), require('../../src/index'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
factory(root.expect, root.AgentAgentGrpcAgentProto);
|
||||
factory(root.expect, root.AgentagentGrpcagentproto);
|
||||
}
|
||||
}(this, function(expect, AgentAgentGrpcAgentProto) {
|
||||
}(this, function(expect, AgentagentGrpcagentproto) {
|
||||
'use strict';
|
||||
|
||||
var instance;
|
||||
|
||||
beforeEach(function() {
|
||||
instance = new AgentAgentGrpcAgentProto.VersionResponse();
|
||||
});
|
||||
describe('(package)', function() {
|
||||
describe('VersionResponse', function() {
|
||||
beforeEach(function() {
|
||||
instance = new AgentagentGrpcagentproto.VersionResponse();
|
||||
});
|
||||
|
||||
var getProperty = function(object, getter, property) {
|
||||
// Use getter method if present; otherwise, get the property directly.
|
||||
if (typeof object[getter] === 'function')
|
||||
return object[getter]();
|
||||
else
|
||||
return object[property];
|
||||
}
|
||||
it('should create an instance of VersionResponse', function() {
|
||||
// TODO: update the code to test VersionResponse
|
||||
expect(instance).to.be.a(AgentagentGrpcagentproto.VersionResponse);
|
||||
});
|
||||
|
||||
var setProperty = function(object, setter, property, value) {
|
||||
// Use setter method if present; otherwise, set the property directly.
|
||||
if (typeof object[setter] === 'function')
|
||||
object[setter](value);
|
||||
else
|
||||
object[property] = value;
|
||||
}
|
||||
it('should have the property v (base name: "v")', function() {
|
||||
// TODO: update the code to test the property v
|
||||
expect(instance).to.have.property('v');
|
||||
// expect(instance.v).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
it('should have the property consoleEndpoint (base name: "consoleEndpoint")', function() {
|
||||
// TODO: update the code to test the property consoleEndpoint
|
||||
expect(instance).to.have.property('consoleEndpoint');
|
||||
// expect(instance.consoleEndpoint).to.be(expectedValueLiteral);
|
||||
});
|
||||
|
||||
describe('VersionResponse', function() {
|
||||
it('should create an instance of VersionResponse', function() {
|
||||
// uncomment below and update the code to test VersionResponse
|
||||
//var instance = new AgentAgentGrpcAgentProto.VersionResponse();
|
||||
//expect(instance).to.be.a(AgentAgentGrpcAgentProto.VersionResponse);
|
||||
});
|
||||
|
||||
it('should have the property v (base name: "v")', function() {
|
||||
// uncomment below and update the code to test the property v
|
||||
//var instance = new AgentAgentGrpcAgentProto.VersionResponse();
|
||||
//expect(instance).to.be();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
@ -1,8 +1,11 @@
|
||||
import {AgentApi, ApiClient} from "../api/src/index.js";
|
||||
|
||||
let api = new AgentApi(new ApiClient(window.location.protocol+'//'+window.location.host));
|
||||
export const getAgentApi = () => {
|
||||
return new AgentApi(new ApiClient(window.location.protocol+'//'+window.location.host));
|
||||
}
|
||||
|
||||
export const shareHandler = (values) => {
|
||||
let api = getAgentApi();
|
||||
switch(values.shareMode) {
|
||||
case "public":
|
||||
api.agentSharePublic({
|
||||
@ -25,7 +28,7 @@ export const shareHandler = (values) => {
|
||||
}
|
||||
|
||||
export const accessHandler = (values) => {
|
||||
api.agentAccessPrivate({
|
||||
getAgentApi().agentAccessPrivate({
|
||||
token: values.token,
|
||||
bindAddress: values.bindAddress,
|
||||
}, (err, data) => {
|
||||
@ -34,13 +37,13 @@ export const accessHandler = (values) => {
|
||||
}
|
||||
|
||||
export const releaseShare = (opts) => {
|
||||
api.agentReleaseShare(opts, (err, data) => {
|
||||
getAgentApi().agentReleaseShare(opts, (err, data) => {
|
||||
console.log(data);
|
||||
});
|
||||
}
|
||||
|
||||
export const releaseAccess = (opts) => {
|
||||
api.agentReleaseAccess(opts, (err, data) => {
|
||||
getAgentApi().agentReleaseAccess(opts, (err, data) => {
|
||||
console.log(data);
|
||||
});
|
||||
}
|
@ -1,18 +1,22 @@
|
||||
const buildOverview = (status) => {
|
||||
let overview = new Map();
|
||||
let overview = [];
|
||||
if(status) {
|
||||
status.accesses.map(acc => {
|
||||
overview.set(acc.frontendToken, {
|
||||
type: "access",
|
||||
v: acc
|
||||
if(status.accesses) {
|
||||
status.accesses.forEach(acc => {
|
||||
overview.push({
|
||||
type: "access",
|
||||
v: structuredClone(acc)
|
||||
});
|
||||
});
|
||||
});
|
||||
status.shares.map(shr => {
|
||||
overview.set(shr.token, {
|
||||
type: "share",
|
||||
v: shr
|
||||
})
|
||||
});
|
||||
}
|
||||
if(status.shares) {
|
||||
status.shares.forEach(shr => {
|
||||
overview.push({
|
||||
type: "share",
|
||||
v: structuredClone(shr)
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
return overview;
|
||||
}
|
||||
|
@ -54,4 +54,4 @@ swagger-codegen generate -i specs/zrok.yml -o sdk/python/sdk/zrok -c $pythonConf
|
||||
git checkout rest_server_zrok/configure_zrok.go
|
||||
|
||||
echo "...generating agent console js client"
|
||||
openapi-generator-cli generate -i agent/agentGrpc/agent.swagger.json -o agent/agentUi/src/api -g javascript
|
||||
swagger-codegen generate -i agent/agentGrpc/agent.swagger.json -o agent/agentUi/src/api -l javascript
|
Loading…
Reference in New Issue
Block a user