replaced the old javascript 'agentUi' with the new typescript 'agentUi' (#221)

This commit is contained in:
Michael Quigley 2024-11-19 15:30:24 -05:00
parent 5298326159
commit fe6b8615dd
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
111 changed files with 959 additions and 10914 deletions

View File

@ -1,4 +1,4 @@
# React + Vite
# React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
@ -6,3 +6,45 @@ Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level `parserOptions` property like this:
```js
export default tseslint.config({
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
```
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
- Optionally add `...tseslint.configs.stylisticTypeChecked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
```js
// eslint.config.js
import react from 'eslint-plugin-react'
export default tseslint.config({
// Set the react version
settings: { react: { version: '18.3' } },
plugins: {
// Add the react plugin
react,
},
rules: {
// other rules...
// Enable its recommended rules
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
},
})
```

View File

@ -1,38 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
export default [
export default tseslint.config(
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
)

View File

@ -8,7 +8,7 @@
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>zrok Agent</title>
<title>Vite + React + TS</title>
</head>
<body>
<div id="root"></div>
@ -97,6 +97,7 @@
</svg>
</a>
</div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -12,28 +12,23 @@
"dependencies": {
"@emotion/react": "^11.13.3",
"@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",
"@mui/icons-material": "^6.1.7",
"@mui/material": "^6.1.7",
"formik": "^2.4.6",
"react": "^18.3.1",
"react-bootstrap": "^2.10.5",
"react-data-table-component": "^7.6.2",
"react-dom": "^18.3.1",
"react-router-dom": "^6.26.2",
"superagent": "^10.1.0"
"react-dom": "^18.3.1"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"eslint": "^9.11.1",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.12",
"globals": "^15.9.0",
"vite": "^5.4.8"
"@eslint/js": "^9.13.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"eslint": "^9.13.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^15.11.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.15.0",
"vite": "^5.4.10"
}
}

View File

@ -1,42 +0,0 @@
import LanIcon from "@mui/icons-material/Lan";
import {AppBar, Box, Button, Card, Chip, Grid2, Toolbar, Typography} from "@mui/material";
import DeleteIcon from "@mui/icons-material/Delete";
import {releaseAccess} from "./model/handler.js";
const AccessCard = (props) => {
const deleteHandler = () => {
releaseAccess({ frontendToken: props.access.frontendToken });
}
return (
<Card>
<AppBar position="sticky">
<Toolbar variant="dense">
<LanIcon />
<Grid2 container sx={{ flexGrow: 1 }}>
<Grid2 display="flex" justifyContent="center" size="grow">
<Typography variant="h6" component="div">{props.access.frontendToken}</Typography>
</Grid2>
</Grid2>
<Grid2 container>
<Grid2 display="flex" justifyContent="right">
<Chip label="private" size="small" color="warning" />
</Grid2>
</Grid2>
</Toolbar>
</AppBar>
<Box sx={{ p: 2, textAlign: "center" }}>
<Typography variant="h6" component="div">
{props.access.token} &rarr; {props.access.bindAddress}
</Typography>
</Box>
<Grid2 container sx={{ flexGrow: 1 }}>
<Grid2 display="flex" justifyContent="right" size="grow">
<Button variant="contained" onClick={deleteHandler}><DeleteIcon /></Button>
</Grid2>
</Grid2>
</Card>
);
}
export default AccessCard;

View File

@ -1,58 +0,0 @@
import {useEffect, useState} from "react";
import NavBar from "./NavBar.jsx";
import {getAgentApi, getOverview} from "./model/handler.js";
import Overview from "./Overview.jsx";
import NewAccessModal from "./NewAccessModal.jsx";
import NewShareModal from "./NewShareModal.jsx";
const AgentUi = () => {
const [version, setVersion] = useState("");
const [overview, setOverview] = useState([]);
const [newAccessOpen, setNewAccessOpen] = useState(false);
const [newShareOpen, setNewShareOpen] = useState(false);
const openNewAccess = () => {
setNewAccessOpen(true);
}
const closeNewAccess = () => {
setNewAccessOpen(false);
}
const openNewShare = () => {
setNewShareOpen(true);
}
const closeNewShare = () => {
setNewShareOpen(false);
}
useEffect(() => {
getAgentApi().agentVersion((e, d) => {
setVersion(d.v);
});
return () => {
setVersion("");
}
}, []);
useEffect(() => {
let interval = setInterval(() => {
setOverview(getOverview());
}, 1000);
return () => {
clearInterval(interval);
setOverview([]);
}
}, []);
return (
<>
<NavBar version={version} shareClick={openNewShare} accessClick={openNewAccess} />
<Overview overview={overview} shareClick={openNewShare} accessClick={openNewAccess} />
<NewAccessModal isOpen={newAccessOpen} close={closeNewAccess} />
<NewShareModal isOpen={newShareOpen} close={closeNewShare} />
</>
);
}
export default AgentUi;

View File

@ -1,35 +0,0 @@
import {AppBar, Box, Button, Grid2, IconButton, Toolbar, Typography} from "@mui/material";
import MenuIcon from "@mui/icons-material/Menu";
import LanIcon from "@mui/icons-material/Lan";
import ShareIcon from "@mui/icons-material/Share";
const NavBar = (props) => {
return (
<AppBar position={"static"}>
<Toolbar>
<IconButton
size="large"
edge={"start"}
color="inherit"
aria-label={"menu"}
sx={{mr: 2}}
>
<MenuIcon/>
</IconButton>
<Typography variant="h5" sx={{ flexGrow: 1 }} display={{ xs: "none", sm: "none", md: "block" }}>
zrok Agent { props.version !== "" ? " | " + props.version : ""}
</Typography>
<Grid2 container sx={{ flexGrow: 1 }}>
<Grid2 display="flex" justifyContent="right" size="grow">
<Button color="inherit" onClick={props.shareClick}><ShareIcon /></Button>
</Grid2>
<Grid2 display="flex" justifyContent="right">
<Button color="inherit" onClick={props.accessClick}><LanIcon /></Button>
</Grid2>
</Grid2>
</Toolbar>
</AppBar>
)
}
export default NavBar;

View File

@ -1,53 +0,0 @@
import {Box, Button, Modal, TextField} from "@mui/material";
import {useFormik} from "formik";
import {modalStyle} from "./model/theme.js";
import {createAccess} from "./model/handler.js";
const NewAccessModal = (props) => {
const newAccessForm = useFormik({
initialValues: {
token: "",
bindAddress: "",
},
onSubmit: (v) => {
createAccess(v);
props.close();
},
});
return (
<Modal
open={props.isOpen}
onClose={props.close}
>
<Box sx={{ ...modalStyle }}>
<h2>Access...</h2>
<form onSubmit={newAccessForm.handleSubmit}>
<TextField
fullWidth
id="token"
name="token"
label="Share Token"
value={newAccessForm.values.token}
onChange={newAccessForm.handleChange}
onBlur={newAccessForm.handleBlur}
sx={{ mt: 2 }}
/>
<TextField
fullWidth
id="bindAddress"
name="bindAddress"
label="Bind Address"
value={newAccessForm.values.bindAddress}
onChange={newAccessForm.handleChange}
onBlur={newAccessForm.handleBlur}
sx={{ mt: 2 }}
/>
<Button color="primary" variant="contained" type="submit" sx={{ mt: 2 }}>Create Access</Button>
</form>
</Box>
</Modal>
);
}
export default NewAccessModal;

View File

@ -1,113 +0,0 @@
import {Box, Button, Checkbox, FormControlLabel, MenuItem, Modal, TextField} from "@mui/material";
import {useFormik} from "formik";
import {modalStyle} from "./model/theme.js";
import {createShare} from "./model/handler.js";
const NewShareModal = (props) => {
const form = useFormik({
initialValues: {
shareMode: "public",
backendMode: "proxy",
target: "",
insecure: false,
},
onSubmit: (v) => {
createShare(v);
props.close();
},
});
return (
<Modal
open={props.isOpen}
onClose={props.close}
>
<Box sx={{ ...modalStyle }}>
<h2>Share...</h2>
<form onSubmit={form.handleSubmit}>
<TextField
fullWidth
select
id="shareMode"
name="shareMode"
label="Share Mode"
value={form.values.shareMode}
onChange={form.handleChange}
onBlur={form.handleBlur}
sx={{ mt: 2 }}
>
<MenuItem value="public">public</MenuItem>
<MenuItem value="private">private</MenuItem>
</TextField>
{form.values.shareMode === "public" && (
<TextField
fullWidth select
id="backendMode"
name="backendMode"
label="Backend Mode"
value={form.values.backendMode}
onChange={form.handleChange}
onBlur={form.handleBlur}
sx={{ mt: 2 }}
>
<MenuItem value="proxy">proxy</MenuItem>
<MenuItem value="web">web</MenuItem>
<MenuItem value="caddy">caddy</MenuItem>
<MenuItem value="drive">drive</MenuItem>
</TextField>
)}
{form.values.shareMode === "private" && (
<TextField
fullWidth select
id="backendMode"
name="backendMode"
label="Backend Mode"
value={form.values.backendMode}
onChange={form.handleChange}
onBlur={form.handleBlur}
sx={{ mt: 2 }}
>
<MenuItem value="proxy">proxy</MenuItem>
<MenuItem value="web">web</MenuItem>
<MenuItem value="tcpTunnel">tcpTunnel</MenuItem>
<MenuItem value="udpTunnel">udpTunnel</MenuItem>
<MenuItem value="caddy">caddy</MenuItem>
<MenuItem value="drive">drive</MenuItem>
<MenuItem value="socks">socks</MenuItem>
<MenuItem value="vpn">vpn</MenuItem>
</TextField>
)}
<TextField
fullWidth
id="target"
name="target"
label="Target"
value={form.values.target}
onChange={form.handleChange}
onBlur={form.handleBlur}
sx={{ mt: 2 }}
/>
{form.values.backendMode === "proxy" && (
<Box>
<FormControlLabel
control={<Checkbox
id="insecure"
name="insecure"
label="Insecure"
checked={form.values.insecure}
onChange={form.handleChange}
onBlur={form.handleBlur}
/>}
label="Insecure"
sx={{ mt: 2 }}
/>
</Box>
)}
<Button color="primary" variant="contained" type="submit" sx={{ mt: 2 }}>Create Share</Button>
</form>
</Box>
</Modal>
)
}
export default NewShareModal;

View File

@ -1,38 +0,0 @@
import "bootstrap/dist/css/bootstrap.min.css";
import LanIcon from "@mui/icons-material/Lan";
import ShareIcon from "@mui/icons-material/Share";
import {Card} from "@mui/material";
import AccessCard from "./AccessCard.jsx";
import ShareCard from "./ShareCard.jsx";
import React from "react";
import Grid from '@mui/material/Grid2';
const Overview = (props) => {
let cards = [];
if(props.overview.length > 0) {
props.overview.forEach((row) => {
switch(row.type) {
case "access":
cards.push(<Grid size={{ xs: 12, md: 6 }}><AccessCard key={row.frontendToken} access={row} /></Grid>);
break;
case "share":
cards.push(<Grid size={{ xs: 12, md: 6 }}><ShareCard key={row.token} share={row} /></Grid>);
break;
}
});
} else {
cards.push(<Grid size={{ xs: 12 }}>
<Card key="empty">
<h5>zrok Agent is empty! Add a <a href="#" onClick={props.shareClick}>share <ShareIcon /></a> or <a href={"#"} onClick={props.accessClick}>access <LanIcon /></a> share to get started.</h5>
</Card>
</Grid>);
}
return (
<Grid container spacing={2}>
{cards}
</Grid>
);
}
export default Overview;

View File

@ -1,53 +0,0 @@
import ShareIcon from "@mui/icons-material/Share";
import {AppBar, Box, Button, Card, Chip, Grid2, Toolbar, Typography} from "@mui/material";
import DeleteIcon from "@mui/icons-material/Delete";
import {releaseShare} from "./model/handler.js";
const ShareCard = (props) => {
let frontends = [];
props.share.frontendEndpoint.map((fe) => {
frontends.push(<a key={props.share.token} href={fe.toString()} target={"_"}>{fe}</a>);
})
const deleteHandler = () => {
releaseShare({ token: props.share.token });
}
return (
<Card>
<AppBar position="sticky">
<Toolbar variant="dense">
<ShareIcon />
<Grid2 container sx={{ flexGrow: 1 }}>
<Grid2 display="flex" justifyContent="center" size="grow">
<Typography variant="h6" component="div">{props.share.token}</Typography>
</Grid2>
</Grid2>
<Grid2 container>
<Grid2 display="flex" justifyContent="right">
{props.share.shareMode === "public" && (
<Chip label={props.share.shareMode} size="small" color="success" />
)}
{props.share.shareMode === "private" && (
<Chip label={props.share.shareMode} size="small" color="warning" />
)}
<Chip label={props.share.backendMode} size="small" color="info" />
</Grid2>
</Grid2>
</Toolbar>
</AppBar>
<Box sx={{ p: 2, textAlign: "center" }}>
<Typography variant="h6" component="div">
{props.share.backendEndpoint} &rarr; {frontends} <br/>
</Typography>
</Box>
<Grid2 container sx={{ flexGrow: 1 }}>
<Grid2 display="flex" justifyContent="right" size="grow">
<Button variant="contained" onClick={deleteHandler} ><DeleteIcon /></Button>
</Grid2>
</Grid2>
</Card>
);
}
export default ShareCard;

View File

@ -1,13 +0,0 @@
import {useParams} from "react-router-dom";
const ShareDetail = (props) => {
let params = useParams();
return (
<>
<h1>Share {params.token}</h1>
</>
)
}
export default ShareDetail;

View File

@ -1,33 +0,0 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}

View File

@ -1,23 +0,0 @@
# 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 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 (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@ -1 +0,0 @@
3.0.51

View File

@ -1,7 +0,0 @@
language: node_js
node_js:
- "6"
- "6.1"
- "5"
- "5.11"

View File

@ -1,125 +0,0 @@
# agentagent_grpcagentproto
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
- Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen
## Installation
### For [Node.js](https://nodejs.org/)
#### npm
To publish the library as a [npm](https://www.npmjs.com/),
please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).
Then install it via:
```shell
npm install agentagent_grpcagentproto --save
```
#### git
#
If the library is hosted at a git repository, e.g.
https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:
```shell
npm install GIT_USER_ID/GIT_REPO_ID --save
```
### For browser
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):
```shell
browserify main.js > bundle.js
```
Then include *bundle.js* in the HTML pages.
### Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:
```javascript
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
```
## Getting Started
Please follow the [installation](#installation) instruction and execute the following JS code:
```javascript
var AgentagentGrpcagentproto = require('agentagent_grpcagentproto');
var api = new AgentagentGrpcagentproto.AgentApi()
var opts = {
'token': "token_example", // {String}
'bindAddress': "bindAddress_example", // {String}
'autoMode': true, // {Boolean}
'autoAddress': "autoAddress_example", // {String}
'autoStartPort': 789, // {Number}
'autoEndPort': 789, // {Number}
'responseHeaders': ["responseHeaders_example"] // {[String]}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.agentAccessPrivate(opts, callback);
```
## Documentation for API Endpoints
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 |
## Documentation for Models
- [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
All endpoints do not require authorization.

View File

@ -1,9 +0,0 @@
# AgentagentGrpcagentproto.AccessDetail
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontendToken** | **String** | | [optional]
**token** | **String** | | [optional]
**bindAddress** | **String** | | [optional]
**responseHeaders** | **[String]** | | [optional]

View File

@ -1,6 +0,0 @@
# AgentagentGrpcagentproto.AccessPrivateResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**frontendToken** | **String** | | [optional]

View File

@ -1,334 +0,0 @@
# AgentagentGrpcagentproto.AgentApi
All URIs are relative to */*
Method | HTTP request | Description
------------- | ------------- | -------------
[**agentAccessPrivate**](AgentApi.md#agentAccessPrivate) | **POST** /v1/agent/accessPrivate |
[**agentReleaseAccess**](AgentApi.md#agentReleaseAccess) | **POST** /v1/agent/releaseAccess |
[**agentReleaseShare**](AgentApi.md#agentReleaseShare) | **POST** /v1/agent/releaseShare |
[**agentSharePrivate**](AgentApi.md#agentSharePrivate) | **POST** /v1/agent/sharePrivate |
[**agentSharePublic**](AgentApi.md#agentSharePublic) | **POST** /v1/agent/sharePublic |
[**agentStatus**](AgentApi.md#agentStatus) | **GET** /v1/agent/status |
[**agentVersion**](AgentApi.md#agentVersion) | **GET** /v1/agent/version |
<a name="agentAccessPrivate"></a>
# **agentAccessPrivate**
> AccessPrivateResponse agentAccessPrivate(opts)
### Example
```javascript
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
let opts = {
'token': "token_example", // String |
'bindAddress': "bindAddress_example", // String |
'autoMode': true, // Boolean |
'autoAddress': "autoAddress_example", // String |
'autoStartPort': 789, // Number |
'autoEndPort': 789, // Number |
'responseHeaders': ["responseHeaders_example"] // [String] |
};
apiInstance.agentAccessPrivate(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**token** | **String**| | [optional]
**bindAddress** | **String**| | [optional]
**autoMode** | **Boolean**| | [optional]
**autoAddress** | **String**| | [optional]
**autoStartPort** | **Number**| | [optional]
**autoEndPort** | **Number**| | [optional]
**responseHeaders** | [**[String]**](String.md)| | [optional]
### Return type
[**AccessPrivateResponse**](AccessPrivateResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="agentReleaseAccess"></a>
# **agentReleaseAccess**
> ReleaseAccessResponse agentReleaseAccess(opts)
### Example
```javascript
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
let opts = {
'frontendToken': "frontendToken_example" // String |
};
apiInstance.agentReleaseAccess(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**frontendToken** | **String**| | [optional]
### Return type
[**ReleaseAccessResponse**](ReleaseAccessResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="agentReleaseShare"></a>
# **agentReleaseShare**
> ReleaseShareResponse agentReleaseShare(opts)
### Example
```javascript
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
let opts = {
'token': "token_example" // String |
};
apiInstance.agentReleaseShare(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**token** | **String**| | [optional]
### Return type
[**ReleaseShareResponse**](ReleaseShareResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="agentSharePrivate"></a>
# **agentSharePrivate**
> SharePrivateResponse agentSharePrivate(opts)
### Example
```javascript
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
let opts = {
'target': "target_example", // String |
'backendMode': "backendMode_example", // String |
'insecure': true, // Boolean |
'closed': true, // Boolean |
'accessGrants': ["accessGrants_example"] // [String] |
};
apiInstance.agentSharePrivate(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**target** | **String**| | [optional]
**backendMode** | **String**| | [optional]
**insecure** | **Boolean**| | [optional]
**closed** | **Boolean**| | [optional]
**accessGrants** | [**[String]**](String.md)| | [optional]
### Return type
[**SharePrivateResponse**](SharePrivateResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="agentSharePublic"></a>
# **agentSharePublic**
> SharePublicResponse agentSharePublic(opts)
### Example
```javascript
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
let opts = {
'target': "target_example", // String |
'basicAuth': ["basicAuth_example"], // [String] |
'frontendSelection': ["frontendSelection_example"], // [String] |
'backendMode': "backendMode_example", // String |
'insecure': true, // Boolean |
'oauthProvider': "oauthProvider_example", // String |
'oauthEmailAddressPatterns': ["oauthEmailAddressPatterns_example"], // [String] |
'oauthCheckInterval': "oauthCheckInterval_example", // String |
'closed': true, // Boolean |
'accessGrants': ["accessGrants_example"] // [String] |
};
apiInstance.agentSharePublic(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**target** | **String**| | [optional]
**basicAuth** | [**[String]**](String.md)| | [optional]
**frontendSelection** | [**[String]**](String.md)| | [optional]
**backendMode** | **String**| | [optional]
**insecure** | **Boolean**| | [optional]
**oauthProvider** | **String**| | [optional]
**oauthEmailAddressPatterns** | [**[String]**](String.md)| | [optional]
**oauthCheckInterval** | **String**| | [optional]
**closed** | **Boolean**| | [optional]
**accessGrants** | [**[String]**](String.md)| | [optional]
### Return type
[**SharePublicResponse**](SharePublicResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="agentStatus"></a>
# **agentStatus**
> StatusResponse agentStatus()
### Example
```javascript
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
apiInstance.agentStatus((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**StatusResponse**](StatusResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="agentVersion"></a>
# **agentVersion**
> VersionResponse agentVersion()
### Example
```javascript
import {AgentagentGrpcagentproto} from 'agentagent_grpcagentproto';
let apiInstance = new AgentagentGrpcagentproto.AgentApi();
apiInstance.agentVersion((error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**VersionResponse**](VersionResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json

View File

@ -1,5 +0,0 @@
# AgentagentGrpcagentproto.ProtobufAny
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@ -1,5 +0,0 @@
# AgentagentGrpcagentproto.ReleaseAccessResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@ -1,5 +0,0 @@
# AgentagentGrpcagentproto.ReleaseShareResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

View File

@ -1,8 +0,0 @@
# AgentagentGrpcagentproto.RpcStatus
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Number** | | [optional]
**message** | **String** | | [optional]
**details** | [**[ProtobufAny]**](ProtobufAny.md) | | [optional]

View File

@ -1,13 +0,0 @@
# AgentagentGrpcagentproto.ShareDetail
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]
**shareMode** | **String** | | [optional]
**backendMode** | **String** | | [optional]
**reserved** | **Boolean** | | [optional]
**frontendEndpoint** | **[String]** | | [optional]
**backendEndpoint** | **String** | | [optional]
**closed** | **Boolean** | | [optional]
**status** | **String** | | [optional]

View File

@ -1,6 +0,0 @@
# AgentagentGrpcagentproto.SharePrivateResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]

View File

@ -1,7 +0,0 @@
# AgentagentGrpcagentproto.SharePublicResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]
**frontendEndpoints** | **[String]** | | [optional]

View File

@ -1,10 +0,0 @@
# AgentagentGrpcagentproto.ShareReservedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **String** | | [optional]
**backendMode** | **String** | | [optional]
**shareMode** | **String** | | [optional]
**frontendEndpoints** | **[String]** | | [optional]
**target** | **String** | | [optional]

View File

@ -1,7 +0,0 @@
# AgentagentGrpcagentproto.StatusResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accesses** | [**[AccessDetail]**](AccessDetail.md) | | [optional]
**shares** | [**[ShareDetail]**](ShareDetail.md) | | [optional]

View File

@ -1,7 +0,0 @@
# AgentagentGrpcagentproto.VersionResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**v** | **String** | | [optional]
**consoleEndpoint** | **String** | | [optional]

View File

@ -1,52 +0,0 @@
#!/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 swagger-petstore-perl "minor update"
git_user_id=$1
git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
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.
git commit -m "$release_note"
# Sets the new 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://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

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

View File

@ -1,41 +0,0 @@
{
"name": "agentagent_grpcagentproto",
"version": "version not set",
"description": "Object",
"license": "Unlicense",
"main": "src/index.js",
"scripts": {
"test": "mocha --require @babel/register --recursive"
},
"browser": {
"fs": false
},
"dependencies": {
"@babel/cli": "^7.0.0",
"superagent": "^5.3.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/plugin-proposal-function-bind": "^7.0.0",
"@babel/plugin-proposal-function-sent": "^7.0.0",
"@babel/plugin-proposal-json-strings": "^7.0.0",
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-syntax-import-meta": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.0.0",
"expect.js": "^0.3.1",
"mocha": "^8.0.1",
"sinon": "^7.2.0"
}
}

View File

@ -1,584 +0,0 @@
/*
* 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 superagent from "superagent";
import querystring from "querystring";
/**
* @module ApiClient
* @version version not set
*/
/**
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
* application to use this class directly - the *Api and model classes provide the public API for the service. The
* contents of this file should be regarded as internal but are documented for completeness.
* @alias module:ApiClient
* @class
*/
export class ApiClient {
constructor() {
/**
* The base URL against which to resolve every API call's (relative) path.
* @type {String}
* @default /
*/
this.basePath = '/'.replace(/\/+$/, '');
/**
* The authentication methods to be included for all API calls.
* @type {Array.<String>}
*/
this.authentications = {
}
/**
* The default HTTP headers to be included for all API calls.
* @type {Array.<String>}
* @default {}
*/
this.defaultHeaders = {};
/**
* The default HTTP timeout for all API calls.
* @type {Number}
* @default 60000
*/
this.timeout = 60000;
/**
* If set to false an additional timestamp parameter is added to all API GET calls to
* prevent browser caching
* @type {Boolean}
* @default true
*/
this.cache = true;
/**
* If set to true, the client will save the cookies from each server
* response, and return them in the next request.
* @default false
*/
this.enableCookies = false;
/*
* Used to save and return cookies in a node.js (non-browser) setting,
* if this.enableCookies is set to true.
*/
if (typeof window === 'undefined') {
this.agent = new superagent.agent();
}
/*
* Allow user to override superagent agent
*/
this.requestAgent = null;
}
/**
* Returns a string representation for an actual parameter.
* @param param The actual parameter.
* @returns {String} The string representation of <code>param</code>.
*/
paramToString(param) {
if (param == undefined || param == null) {
return '';
}
if (param instanceof Date) {
return param.toJSON();
}
return param.toString();
}
/**
* 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.
* @returns {String} The encoded path with parameter values substituted.
*/
buildUrl(path, pathParams) {
if (!path.match(/^\//)) {
path = '/' + path;
}
var url = this.basePath + path;
url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => {
var value;
if (pathParams.hasOwnProperty(key)) {
value = this.paramToString(pathParams[key]);
} else {
value = fullMatch;
}
return encodeURIComponent(value);
});
return url;
}
/**
* Checks whether the given content type represents JSON.<br>
* JSON content type examples:<br>
* <ul>
* <li>application/json</li>
* <li>application/json; charset=UTF8</li>
* <li>APPLICATION/JSON</li>
* </ul>
* @param {String} contentType The MIME content type to check.
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
*/
isJsonMime(contentType) {
return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
}
/**
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
* @param {Array.<String>} contentTypes
* @returns {String} The chosen content type, preferring JSON.
*/
jsonPreferredMime(contentTypes) {
for (var i = 0; i < contentTypes.length; i++) {
if (this.isJsonMime(contentTypes[i])) {
return contentTypes[i];
}
}
return contentTypes[0];
}
/**
* Checks whether the given parameter value represents file-like content.
* @param param The parameter to check.
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
*/
isFileParam(param) {
// fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
if (typeof require === 'function') {
let fs;
try {
fs = require('fs');
} catch (err) {}
if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
return true;
}
}
// Buffer in Node.js
if (typeof Buffer === 'function' && param instanceof Buffer) {
return true;
}
// Blob in browser
if (typeof Blob === 'function' && param instanceof Blob) {
return true;
}
// File in browser (it seems File object is also instance of Blob, but keep this for safe)
if (typeof File === 'function' && param instanceof File) {
return true;
}
return false;
}
/**
* Normalizes parameter values:
* <ul>
* <li>remove nils</li>
* <li>keep files and arrays</li>
* <li>format to string with `paramToString` for other cases</li>
* </ul>
* @param {Object.<String, Object>} params The parameters as object properties.
* @returns {Object.<String, Object>} normalized parameters.
*/
normalizeParams(params) {
var newParams = {};
for (var key in params) {
if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
var value = params[key];
if (this.isFileParam(value) || Array.isArray(value)) {
newParams[key] = value;
} else {
newParams[key] = this.paramToString(value);
}
}
}
return newParams;
}
/**
* 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.
* @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy.
* @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
*/
buildCollectionParam(param, collectionFormat) {
if (param == null) {
return null;
}
switch (collectionFormat) {
case 'csv':
return param.map(this.paramToString).join(',');
case 'ssv':
return param.map(this.paramToString).join(' ');
case 'tsv':
return param.map(this.paramToString).join('\t');
case 'pipes':
return param.map(this.paramToString).join('|');
case 'multi':
//return the array directly as SuperAgent will handle it as expected
return param.map(this.paramToString);
default:
throw new Error('Unknown collection format: ' + collectionFormat);
}
}
/**
* Applies authentication headers to the request.
* @param {Object} request The request object created by a <code>superagent()</code> call.
* @param {Array.<String>} authNames An array of authentication method names.
*/
applyAuthToRequest(request, authNames) {
authNames.forEach((authName) => {
var auth = this.authentications[authName];
switch (auth.type) {
case 'basic':
if (auth.username || auth.password) {
request.auth(auth.username || '', auth.password || '');
}
break;
case 'apiKey':
if (auth.apiKey) {
var data = {};
if (auth.apiKeyPrefix) {
data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;
} else {
data[auth.name] = auth.apiKey;
}
if (auth['in'] === 'header') {
request.set(data);
} else {
request.query(data);
}
}
break;
case 'oauth2':
if (auth.accessToken) {
request.set({'Authorization': 'Bearer ' + auth.accessToken});
}
break;
default:
throw new Error('Unknown authentication type: ' + auth.type);
}
});
}
/**
* Deserializes an HTTP response body into a value of the specified type.
* @param {Object} response A SuperAgent response object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns A value of the specified type.
*/
deserialize(response, returnType) {
if (response == null || returnType == null || response.status == 204) {
return null;
}
// Rely on SuperAgent for parsing response body.
// See http://visionmedia.github.io/superagent/#parsing-response-bodies
var data = response.body;
if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) {
// SuperAgent does not always produce a body; use the unparsed response as a fallback
data = response.text;
}
return ApiClient.convertToType(data, returnType);
}
/**
* Callback function to receive the result of the operation.
* @callback module:ApiClient~callApiCallback
* @param {String} error Error message, if any.
* @param data The data returned by the service call.
* @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.
* @param {Object.<String, String>} pathParams A map of path parameters and their values.
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
* @param {Object} bodyParam The value to pass as the request body.
* @param {Array.<String>} authNames An array of authentication type names.
* @param {Array.<String>} contentTypes An array of request MIME types.
* @param {Array.<String>} accepts An array of acceptable response MIME types.
* @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
* constructor for a complex type.
* @param {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, callback) {
var url = this.buildUrl(path, pathParams);
var request = superagent(httpMethod, url);
// apply authentications
this.applyAuthToRequest(request, authNames);
// set query parameters
if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
queryParams['_'] = new Date().getTime();
}
request.query(this.normalizeParams(queryParams));
// set header parameters
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
// set requestAgent if it is set by user
if (this.requestAgent) {
request.agent(this.requestAgent);
}
// set request timeout
request.timeout(this.timeout);
var contentType = this.jsonPreferredMime(contentTypes);
if (contentType) {
// Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
if(contentType != 'multipart/form-data') {
request.type(contentType);
}
} else if (!request.header['Content-Type']) {
request.type('application/json');
}
if (contentType === 'application/x-www-form-urlencoded') {
request.send(querystring.stringify(this.normalizeParams(formParams)));
} else if (contentType == 'multipart/form-data') {
var _formParams = this.normalizeParams(formParams);
for (var key in _formParams) {
if (_formParams.hasOwnProperty(key)) {
if (this.isFileParam(_formParams[key])) {
// file field
request.attach(key, _formParams[key]);
} else {
request.field(key, _formParams[key]);
}
}
}
} else if (bodyParam) {
request.send(bodyParam);
}
var accept = this.jsonPreferredMime(accepts);
if (accept) {
request.accept(accept);
}
if (returnType === 'Blob') {
request.responseType('blob');
} else if (returnType === 'String') {
request.responseType('string');
}
// Attach previously saved cookies, if enabled
if (this.enableCookies){
if (typeof window === 'undefined') {
this.agent.attachCookies(request);
}
else {
request.withCredentials();
}
}
request.end((error, response) => {
if (callback) {
var data = null;
if (!error) {
try {
data = this.deserialize(response, returnType);
if (this.enableCookies && typeof window === 'undefined'){
this.agent.saveCookies(response);
}
} catch (err) {
error = err;
}
}
callback(error, data, response);
}
});
return request;
}
/**
* 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) {
return new Date(str);
}
/**
* Converts a value to the specified type.
* @param {(String|Object)} data The data to convert, as a string or object.
* @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types
* or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To
* return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:
* all properties on <code>data<code> will be converted to this type.
* @returns An instance of the specified type or null or undefined if data is null or undefined.
*/
static convertToType(data, type) {
if (data === null || data === undefined)
return data
switch (type) {
case 'Boolean':
return Boolean(data);
case 'Integer':
return parseInt(data, 10);
case 'Number':
return parseFloat(data);
case 'String':
return String(data);
case 'Date':
return ApiClient.parseDate(String(data));
case 'Blob':
return data;
default:
if (type === Object) {
// generic object, return directly
return data;
} else if (typeof type === 'function') {
// for model type like: User
return type.constructFromObject(data);
} else if (Array.isArray(type)) {
// for array type like: ['String']
var itemType = type[0];
return data.map((item) => {
return ApiClient.convertToType(item, itemType);
});
} else if (typeof type === 'object') {
// for plain object type like: {'String': 'Integer'}
var keyType, valueType;
for (var k in type) {
if (type.hasOwnProperty(k)) {
keyType = k;
valueType = type[k];
break;
}
}
var result = {};
for (var k in data) {
if (data.hasOwnProperty(k)) {
var key = ApiClient.convertToType(k, keyType);
var value = ApiClient.convertToType(data[k], valueType);
result[key] = value;
}
}
return result;
} else {
// for unknown type, return the data directly
return data;
}
}
}
/**
* Constructs a new map or array model from REST data.
* @param data {Object|Array} The REST data.
* @param obj {Object|Array} The target object or array.
*/
static constructFromObject(data, obj, itemType) {
if (Array.isArray(data)) {
for (var i = 0; i < data.length; i++) {
if (data.hasOwnProperty(i))
obj[i] = ApiClient.convertToType(data[i], itemType);
}
} else {
for (var k in data) {
if (data.hasOwnProperty(k))
obj[k] = ApiClient.convertToType(data[k], itemType);
}
}
};
}
/**
* The default API client implementation.
* @type {module:ApiClient}
*/
ApiClient.instance = new ApiClient();

View File

@ -1,354 +0,0 @@
/*
* 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";
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 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#instanc
e} if unspecified.
*/
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
}
/**
* Callback function to receive the result of the agentAccessPrivate operation.
* @callback moduleapi/AgentApi~agentAccessPrivateCallback
* @param {String} error Error message, if any.
* @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} opts.token
* @param {String} opts.bindAddress
* @param {Boolean} opts.autoMode
* @param {String} opts.autoAddress
* @param {Number} opts.autoStartPort
* @param {Number} opts.autoEndPort
* @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 <&vendorExtensions.x-jsdoc-type>}
*/
agentAccessPrivate(opts, callback) {
opts = opts || {};
let postBody = null;
let pathParams = {
};
let queryParams = {
'token': opts['token'],'bindAddress': opts['bindAddress'],'autoMode': opts['autoMode'],'autoAddress': opts['autoAddress'],'autoStartPort': opts['autoStartPort'],'autoEndPort': opts['autoEndPort'],'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, callback
);
}
/**
* Callback function to receive the result of the agentReleaseAccess operation.
* @callback moduleapi/AgentApi~agentReleaseAccessCallback
* @param {String} error Error message, if any.
* @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} opts.frontendToken
* @param {module:api/AgentApi~agentReleaseAccessCallback} callback The callback function, accepting three arguments: error, data, response
* 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 = ReleaseAccessResponse;
return this.apiClient.callApi(
'/v1/agent/releaseAccess', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the agentReleaseShare operation.
* @callback moduleapi/AgentApi~agentReleaseShareCallback
* @param {String} error Error message, if any.
* @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} opts.token
* @param {module:api/AgentApi~agentReleaseShareCallback} callback The callback function, accepting three arguments: error, data, response
* 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 = ReleaseShareResponse;
return this.apiClient.callApi(
'/v1/agent/releaseShare', 'POST',
pathParams, queryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the agentSharePrivate operation.
* @callback moduleapi/AgentApi~agentSharePrivateCallback
* @param {String} error Error message, if any.
* @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} 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 <&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')
};
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, callback
);
}
/**
* Callback function to receive the result of the agentSharePublic operation.
* @callback moduleapi/AgentApi~agentSharePublicCallback
* @param {String} error Error message, if any.
* @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} 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 <&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')
};
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, callback
);
}
/**
* Callback function to receive the result of the agentStatus operation.
* @callback moduleapi/AgentApi~agentStatusCallback
* @param {String} error Error message, if any.
* @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 <&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, callback
);
}
/**
* Callback function to receive the result of the agentVersion operation.
* @callback moduleapi/AgentApi~agentVersionCallback
* @param {String} error Error message, if any.
* @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 <&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, callback
);
}
}

View File

@ -1,145 +0,0 @@
/*
* 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';
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';
/**
* 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.
* yyyModel.someProperty = 'someValue';
* ...
* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
* ...
* </pre>
* <em>*NOTE: For a top-level AMD script, use require(['index'], function(){...})
* and put the application logic within the callback function.</em>
* </p>
* <p>
* A non-AMD browser application (discouraged) might do something like this:
* <pre>
* var xxxSvc = new 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.
* ...
* </pre>
* </p>
* @module index
* @version version not set
*/
export {
/**
* The ApiClient constructor.
* @property {module:ApiClient}
*/
ApiClient,
/**
* The AccessDetail model constructor.
* @property {module:model/AccessDetail}
*/
AccessDetail,
/**
* The AccessPrivateResponse model constructor.
* @property {module:model/AccessPrivateResponse}
*/
AccessPrivateResponse,
/**
* The ProtobufAny model constructor.
* @property {module:model/ProtobufAny}
*/
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}
*/
RpcStatus,
/**
* The ShareDetail model constructor.
* @property {module:model/ShareDetail}
*/
ShareDetail,
/**
* The SharePrivateResponse model constructor.
* @property {module:model/SharePrivateResponse}
*/
SharePrivateResponse,
/**
* The SharePublicResponse model constructor.
* @property {module:model/SharePublicResponse}
*/
SharePublicResponse,
/**
* The ShareReservedResponse model constructor.
* @property {module:model/ShareReservedResponse}
*/
ShareReservedResponse,
/**
* The StatusResponse model constructor.
* @property {module:model/StatusResponse}
*/
StatusResponse,
/**
* The VersionResponse model constructor.
* @property {module:model/VersionResponse}
*/
VersionResponse,
/**
* The AgentApi service constructor.
* @property {module:api/AgentApi}
*/
AgentApi
};

View File

@ -1,73 +0,0 @@
/*
* 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 AccessDetail model module.
* @module model/AccessDetail
* @version version not set
*/
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']);
}
return obj;
}
}
/**
* @member {String} frontendToken
*/
AccessDetail.prototype.frontendToken = undefined;
/**
* @member {String} token
*/
AccessDetail.prototype.token = undefined;
/**
* @member {String} bindAddress
*/
AccessDetail.prototype.bindAddress = undefined;
/**
* @member {Array.<String>} responseHeaders
*/
AccessDetail.prototype.responseHeaders = undefined;

View File

@ -1,52 +0,0 @@
/*
* 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 AccessPrivateResponse model module.
* @module model/AccessPrivateResponse
* @version version not set
*/
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');
}
return obj;
}
}
/**
* @member {String} frontendToken
*/
AccessPrivateResponse.prototype.frontendToken = undefined;

View File

@ -1,46 +0,0 @@
/*
* 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 ProtobufAny model module.
* @module model/ProtobufAny
* @version version not set
*/
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');
}
return obj;
}
}

View File

@ -1,44 +0,0 @@
/*
* 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;
}
}

View File

@ -1,44 +0,0 @@
/*
* 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;
}
}

View File

@ -1,67 +0,0 @@
/*
* 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';
import {ProtobufAny} from './ProtobufAny';
/**
* The RpcStatus model module.
* @module model/RpcStatus
* @version version not set
*/
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]);
}
return obj;
}
}
/**
* @member {Number} code
*/
RpcStatus.prototype.code = undefined;
/**
* @member {String} message
*/
RpcStatus.prototype.message = undefined;
/**
* @member {Array.<module:model/ProtobufAny>} details
*/
RpcStatus.prototype.details = undefined;

View File

@ -1,101 +0,0 @@
/*
* 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 ShareDetail model module.
* @module model/ShareDetail
* @version version not set
*/
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');
}
return obj;
}
}
/**
* @member {String} token
*/
ShareDetail.prototype.token = undefined;
/**
* @member {String} shareMode
*/
ShareDetail.prototype.shareMode = undefined;
/**
* @member {String} backendMode
*/
ShareDetail.prototype.backendMode = undefined;
/**
* @member {Boolean} reserved
*/
ShareDetail.prototype.reserved = undefined;
/**
* @member {Array.<String>} frontendEndpoint
*/
ShareDetail.prototype.frontendEndpoint = undefined;
/**
* @member {String} backendEndpoint
*/
ShareDetail.prototype.backendEndpoint = undefined;
/**
* @member {Boolean} closed
*/
ShareDetail.prototype.closed = undefined;
/**
* @member {String} status
*/
ShareDetail.prototype.status = undefined;

View File

@ -1,52 +0,0 @@
/*
* 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 SharePrivateResponse model module.
* @module model/SharePrivateResponse
* @version version not set
*/
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');
}
return obj;
}
}
/**
* @member {String} token
*/
SharePrivateResponse.prototype.token = undefined;

View File

@ -1,59 +0,0 @@
/*
* 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 SharePublicResponse model module.
* @module model/SharePublicResponse
* @version version not set
*/
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']);
}
return obj;
}
}
/**
* @member {String} token
*/
SharePublicResponse.prototype.token = undefined;
/**
* @member {Array.<String>} frontendEndpoints
*/
SharePublicResponse.prototype.frontendEndpoints = undefined;

View File

@ -1,80 +0,0 @@
/*
* 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 ShareReservedResponse model module.
* @module model/ShareReservedResponse
* @version version not set
*/
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');
}
return obj;
}
}
/**
* @member {String} token
*/
ShareReservedResponse.prototype.token = undefined;
/**
* @member {String} backendMode
*/
ShareReservedResponse.prototype.backendMode = undefined;
/**
* @member {String} shareMode
*/
ShareReservedResponse.prototype.shareMode = undefined;
/**
* @member {Array.<String>} frontendEndpoints
*/
ShareReservedResponse.prototype.frontendEndpoints = undefined;
/**
* @member {String} target
*/
ShareReservedResponse.prototype.target = undefined;

View File

@ -1,61 +0,0 @@
/*
* 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';
import {AccessDetail} from './AccessDetail';
import {ShareDetail} from './ShareDetail';
/**
* The StatusResponse model module.
* @module model/StatusResponse
* @version version not set
*/
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]);
}
return obj;
}
}
/**
* @member {Array.<module:model/AccessDetail>} accesses
*/
StatusResponse.prototype.accesses = undefined;
/**
* @member {Array.<module:model/ShareDetail>} shares
*/
StatusResponse.prototype.shares = undefined;

View File

@ -1,59 +0,0 @@
/*
* 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 VersionResponse model module.
* @module model/VersionResponse
* @version version not set
*/
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');
}
return obj;
}
}
/**
* @member {String} v
*/
VersionResponse.prototype.v = undefined;
/**
* @member {String} consoleEndpoint
*/
VersionResponse.prototype.consoleEndpoint = undefined;

View File

@ -1,185 +0,0 @@
/*
* 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;
beforeEach(function() {
instance = new AgentagentGrpcagentproto.AgentApi();
});
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 = {};
instance.agentAccessPrivate(opts, function(error, data, response) {
if (error) {
done(error);
return;
}
// TODO: update response assertions
expect(data).to.be.a(AgentagentGrpcagentproto.AccessPrivateResponse);
done();
});
*/
// TODO: uncomment and complete method invocation above, then delete this line and the next:
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();
});
});
});
});
}));

View File

@ -1,81 +0,0 @@
(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;
}));

View File

@ -1,69 +0,0 @@
/*
* 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('AccessDetail', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.AccessDetail();
});
it('should create an instance of AccessDetail', function() {
// TODO: update the code to test AccessDetail
expect(instance).to.be.a(AgentagentGrpcagentproto.AccessDetail);
});
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);
});
});
});
}));

View File

@ -1,51 +0,0 @@
/*
* 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('AccessPrivateResponse', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.AccessPrivateResponse();
});
it('should create an instance of AccessPrivateResponse', function() {
// TODO: update the code to test AccessPrivateResponse
expect(instance).to.be.a(AgentagentGrpcagentproto.AccessPrivateResponse);
});
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);
});
});
});
}));

View File

@ -1,45 +0,0 @@
/*
* 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('ProtobufAny', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.ProtobufAny();
});
it('should create an instance of ProtobufAny', function() {
// TODO: update the code to test ProtobufAny
expect(instance).to.be.a(AgentagentGrpcagentproto.ProtobufAny);
});
});
});
}));

View File

@ -1,45 +0,0 @@
/*
* 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);
});
});
});
}));

View File

@ -1,45 +0,0 @@
/*
* 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);
});
});
});
}));

View File

@ -1,63 +0,0 @@
/*
* 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('RpcStatus', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.RpcStatus();
});
it('should create an instance of RpcStatus', function() {
// TODO: update the code to test RpcStatus
expect(instance).to.be.a(AgentagentGrpcagentproto.RpcStatus);
});
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);
});
});
});
}));

View File

@ -1,93 +0,0 @@
/*
* 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('ShareDetail', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.ShareDetail();
});
it('should create an instance of ShareDetail', function() {
// TODO: update the code to test ShareDetail
expect(instance).to.be.a(AgentagentGrpcagentproto.ShareDetail);
});
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);
});
});
});
}));

View File

@ -1,51 +0,0 @@
/*
* 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('SharePrivateResponse', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.SharePrivateResponse();
});
it('should create an instance of SharePrivateResponse', function() {
// TODO: update the code to test SharePrivateResponse
expect(instance).to.be.a(AgentagentGrpcagentproto.SharePrivateResponse);
});
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);
});
});
});
}));

View File

@ -1,57 +0,0 @@
/*
* 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('SharePublicResponse', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.SharePublicResponse();
});
it('should create an instance of SharePublicResponse', function() {
// TODO: update the code to test SharePublicResponse
expect(instance).to.be.a(AgentagentGrpcagentproto.SharePublicResponse);
});
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);
});
});
});
}));

View File

@ -1,75 +0,0 @@
/*
* 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('ShareReservedResponse', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.ShareReservedResponse();
});
it('should create an instance of ShareReservedResponse', function() {
// TODO: update the code to test ShareReservedResponse
expect(instance).to.be.a(AgentagentGrpcagentproto.ShareReservedResponse);
});
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);
});
});
});
}));

View File

@ -1,57 +0,0 @@
/*
* 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('StatusResponse', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.StatusResponse();
});
it('should create an instance of StatusResponse', function() {
// TODO: update the code to test StatusResponse
expect(instance).to.be.a(AgentagentGrpcagentproto.StatusResponse);
});
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);
});
});
});
}));

View File

@ -1,57 +0,0 @@
/*
* 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('VersionResponse', function() {
beforeEach(function() {
instance = new AgentagentGrpcagentproto.VersionResponse();
});
it('should create an instance of VersionResponse', function() {
// TODO: update the code to test VersionResponse
expect(instance).to.be.a(AgentagentGrpcagentproto.VersionResponse);
});
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);
});
});
});
}));

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -1,14 +0,0 @@
import "./index.css";
import {StrictMode} from "react";
import {createRoot} from "react-dom/client";
import AgentUi from "./AgentUi.jsx";
import {createTheme, ThemeProvider} from "@mui/material";
import {themeOptions} from "./model/theme.js";
createRoot(document.getElementById('root')).render(
<StrictMode>
<ThemeProvider theme={createTheme(themeOptions)}>
<AgentUi />
</ThemeProvider>
</StrictMode>
);

View File

@ -1,62 +0,0 @@
import {AgentApi, ApiClient} from "../api/src/index.js";
import {buildOverview} from "./overview.js";
export const getAgentApi = () => {
return new AgentApi(new ApiClient(window.location.origin));
}
let ovw = [];
export const getOverview = (o) => {
getAgentApi().agentStatus((e, d) => {
if(e) {
console.log("getOverview", e, d);
} else {
ovw = structuredClone(buildOverview(d));
}
});
return ovw;
}
export const createShare = (opts) => {
switch(opts.shareMode) {
case "public":
getAgentApi().agentSharePublic(opts, (e, d) => {
if(e) {
console.log("createShare", e, d);
}
});
break;
case "private":
getAgentApi().agentSharePrivate(opts, (e, d) => {
if(e) {
console.log("createShare", e, d);
}
});
break;
}
}
export const releaseShare = (opts) => {
getAgentApi().agentReleaseShare(opts, (e, d) => {
if(e) {
console.log("releaseShare", e, d);
}
});
}
export const createAccess = (opts) => {
getAgentApi().agentAccessPrivate(opts, (e, d) => {
if(e) {
console.log("createAccess", e, d);
}
});
}
export const releaseAccess = (opts) => {
getAgentApi().agentReleaseAccess(opts, (e, d) => {
if(e) {
console.log("releaseAccess", e, d);
}
});
}

View File

@ -1,26 +0,0 @@
export const buildOverview = (status) => {
let overview = [];
if(status) {
if(status.accesses) {
status.accesses.forEach(acc => {
let o = structuredClone(acc);
o["type"] = "access";
o["id"] = acc.frontendToken;
overview.push(o);
});
}
if(status.shares) {
status.shares.forEach(shr => {
let o = structuredClone(shr);
o["type"] = "share";
o["id"] = shr.token;
overview.push(o);
});
}
}
overview.sort((a, b) => {
if(a.id < b.id) return -1;
if(a.id > b.id) return 1;
});
return overview;
}

View File

@ -1,45 +0,0 @@
const componentOptions = {
MuiCard: {
styleOverrides: {
root: ({theme}) => theme.unstable_sx({
mt: 5,
p: 1,
borderRadius: 2,
}),
}
},
MuiAppBar: {
styleOverrides: {
root : ({theme}) => theme.unstable_sx({
borderRadius: 2,
}),
}
}
}
export const themeOptions = {
components: componentOptions,
palette: {
mode: 'light',
primary: {
main: '#241775',
},
secondary: {
main: '#9bf316',
},
},
typography: {
fontFamily: 'Poppins',
}
};
export const modalStyle = {
position: 'absolute',
top: '25%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: 600,
bgcolor: 'background.paper',
boxShadow: 24,
p: 4,
};

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