This commit is contained in:
dborovcanin
2025-12-01 23:13:52 +00:00
parent 2380af8a85
commit 2ae21cb38a
44 changed files with 169 additions and 1062 deletions
-19
View File
@@ -1,19 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
<p>If you are the system administrator of this resource then you should check
the error log for details.</p>
<p><em>Faithfully yours, nginx.</em></p>
</body>
</html>
BIN
View File
Binary file not shown.
-431
View File
@@ -1,431 +0,0 @@
# Copyright (c) Abstract Machines
# SPDX-License-Identifier: Apache-2.0
openapi: 3.0.1
info:
title: SuperMQ twins service
description: |
HTTP API for managing digital twins and their states.
Some useful links:
- [The SuperMQ repository](https://github.com/absmach/supermq)
contact:
email: info@absmach.eu
license:
name: Apache 2.0
url: https://github.com/absmach/supermq/blob/main/LICENSE
version: 0.18.0
servers:
- url: http://localhost:9018
- url: https://localhost:9018
tags:
- name: twins
description: Everything about your Twins
externalDocs:
description: Find out more about twins
url: https://docs.supermq.absmach.eu/
paths:
/twins:
post:
operationId: createTwin
summary: Adds new twin
description: |
Adds new twin to the list of twins owned by user identified using
the provided access token.
tags:
- twins
requestBody:
$ref: "#/components/requestBodies/TwinReq"
responses:
"201":
$ref: "#/components/responses/TwinCreateRes"
"400":
description: Failed due to malformed JSON.
"401":
description: Missing or invalid access token provided.
"415":
description: Missing or invalid content type.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
get:
operationId: getTwins
summary: Retrieves twins
description: |
Retrieves a list of twins. Due to performance concerns, data
is retrieved in subsets.
tags:
- twins
parameters:
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
- $ref: "#/components/parameters/Name"
- $ref: "#/components/parameters/Metadata"
responses:
"200":
$ref: "#/components/responses/TwinsPageRes"
"400":
description: Failed due to malformed query parameters.
"401":
description: Missing or invalid access token provided.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/twins/{twinID}:
get:
operationId: getTwin
summary: Retrieves twin info
tags:
- twins
parameters:
- $ref: "#/components/parameters/TwinID"
responses:
"200":
$ref: "#/components/responses/TwinRes"
"400":
description: Failed due to malformed twin's ID.
"401":
description: Missing or invalid access token provided.
"404":
description: Twin does not exist.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
put:
operationId: updateTwin
summary: Updates twin info
description: |
Update is performed by replacing the current resource data with values
provided in a request payload. Note that the twin's ID cannot be changed.
tags:
- twins
parameters:
- $ref: "#/components/parameters/TwinID"
requestBody:
$ref: "#/components/requestBodies/TwinReq"
responses:
"200":
description: Twin updated.
"400":
description: Failed due to malformed twin's ID or malformed JSON.
"401":
description: Missing or invalid access token provided.
"404":
description: Twin does not exist.
"415":
description: Missing or invalid content type.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
delete:
operationId: removeTwin
summary: Removes a twin
description: Removes a twin.
tags:
- twins
parameters:
- $ref: "#/components/parameters/TwinID"
responses:
"204":
description: Twin removed.
"400":
description: Failed due to malformed twin's ID.
"401":
description: Missing or invalid access token provided
"404":
description: Twin does not exist.
"415":
description: Missing or invalid content type.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/states/{twinID}:
get:
operationId: getStates
summary: Retrieves states of twin with id twinID
description: |
Retrieves a list of states. Due to performance concerns, data
is retrieved in subsets.
tags:
- states
parameters:
- $ref: "#/components/parameters/TwinID"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Offset"
responses:
"200":
$ref: "#/components/responses/StatesPageRes"
"400":
description: Failed due to malformed query parameters.
"401":
description: Missing or invalid access token provided.
"404":
description: Twin does not exist.
"422":
description: Database can't process request.
"500":
$ref: "#/components/responses/ServiceError"
/health:
get:
summary: Retrieves service health check info.
tags:
- health
security: []
responses:
"200":
$ref: "#/components/responses/HealthRes"
"500":
$ref: "#/components/responses/ServiceError"
components:
parameters:
Limit:
name: limit
description: Size of the subset to retrieve.
in: query
schema:
type: integer
default: 10
maximum: 100
minimum: 1
required: false
Offset:
name: offset
description: Number of items to skip during retrieval.
in: query
schema:
type: integer
default: 0
minimum: 0
required: false
Name:
name: name
description: Twin name
in: query
schema:
type: string
required: false
Metadata:
name: metadata
description: |
Metadata filter. Filtering is performed matching the parameter with
metadata on top level. Parameter is json.
in: query
schema:
type: string
minimum: 0
required: false
TwinID:
name: twinID
description: Unique twin identifier.
in: path
schema:
type: string
format: uuid
minimum: 1
required: true
schemas:
Attribute:
type: object
properties:
name:
type: string
description: Name of the attribute.
channel:
type: string
description: SuperMQ channel used by attribute.
subtopic:
type: string
description: Subtopic used by attribute.
persist_state:
type: boolean
description: Trigger state creation based on the attribute.
Definition:
type: object
properties:
delta:
type: number
description: Minimal time delay before new state creation.
attributes:
type: array
minItems: 0
items:
$ref: "#/components/schemas/Attribute"
TwinReqObj:
type: object
properties:
name:
type: string
description: Free-form twin name.
metadata:
type: object
description: Arbitrary, object-encoded twin's data.
definition:
$ref: "#/components/schemas/Definition"
TwinResObj:
type: object
properties:
owner:
type: string
description: Email address of SuperMQ user that owns twin.
id:
type: string
format: uuid
description: Unique twin identifier generated by the service.
name:
type: string
description: Free-form twin name.
revision:
type: number
description: Oridnal revision number of twin.
created:
type: string
format: date
description: Twin creation date and time.
updated:
type: string
format: date
description: Twin update date and time.
definitions:
type: array
minItems: 0
items:
$ref: "#/components/schemas/Definition"
metadata:
type: object
description: Arbitrary, object-encoded twin's data.
TwinsPage:
type: object
properties:
twins:
type: array
minItems: 0
items:
$ref: "#/components/schemas/TwinResObj"
total:
type: integer
description: Total number of items.
offset:
type: integer
description: Number of items to skip during retrieval.
limit:
type: integer
description: Maximum number of items to return in one page.
required:
- twins
State:
type: object
properties:
twin_id:
type: string
format: uuid
description: ID of twin state belongs to.
id:
type: number
description: State position in a time row of states.
created:
type: string
format: date
description: State creation date.
payload:
type: object
description: Object-encoded states's payload.
StatesPage:
type: object
properties:
states:
type: array
minItems: 0
items:
$ref: "#/components/schemas/State"
total:
type: integer
description: Total number of items.
offset:
type: integer
description: Number of items to skip during retrieval.
limit:
type: integer
description: Maximum number of items to return in one page.
required:
- states
requestBodies:
TwinReq:
description: JSON-formatted document describing the twin to create or update.
content:
application/json:
schema:
$ref: "#/components/schemas/TwinReqObj"
required: true
responses:
TwinCreateRes:
description: Created twin's relative URL (i.e. /twins/{twinID}).
headers:
Location:
content:
text/plain:
schema:
type: string
TwinRes:
description: Data retrieved.
content:
application/json:
schema:
$ref: "#/components/schemas/TwinResObj"
links:
update:
operationId: updateTwin
parameters:
twinID: $response.body#/id
delete:
operationId: removeTwin
parameters:
twinID: $response.body#/id
states:
operationId: getStates
parameters:
twinID: $response.body#/id
TwinsPageRes:
description: Data retrieved.
content:
application/json:
schema:
$ref: "#/components/schemas/TwinsPage"
StatesPageRes:
description: Data retrieved.
content:
application/json:
schema:
$ref: "#/components/schemas/StatesPage"
ServiceError:
description: Unexpected server-side error occurred.
HealthRes:
description: Service Health Check.
content:
application/health+json:
schema:
$ref: "./schemas/health_info.yaml"
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: |
* Users access: "Authorization: Bearer <user_token>"
security:
- bearerAuth: []
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 665 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

@@ -1398,7 +1398,7 @@ components:
example: "groupName"
GroupDescription:
name: name
name: description
description: Group's description.
in: query
schema:
+168 -53
View File
@@ -1,66 +1,181 @@
<!-- HTML for static distribution bundle build -->
<!--
Copyright (c) Abstract Machines
SPDX-License-Identifier: Apache-2.0
-->
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SuperMQ API Documentation</title>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.30.3/swagger-ui.css">
<style>
html
{
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
body {
margin: 0;
padding: 0;
}
.topbar {
display: none;
}
.service-selector {
background: #1b1b1b;
padding: 20px;
text-align: center;
}
.service-selector h1 {
color: #fff;
margin: 0 0 15px 0;
font-family: sans-serif;
}
.service-dropdown-container {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}
.service-dropdown-container label {
color: #fff;
font-family: sans-serif;
font-size: 14px;
font-weight: 500;
}
.service-dropdown {
background: #2d2d2d;
color: white;
border: 1px solid #4990e2;
padding: 10px 40px 10px 15px;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
min-width: 200px;
appearance: none;
background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23ffffff" d="M6 9L1 4h10z"/></svg>');
background-repeat: no-repeat;
background-position: right 12px center;
}
.service-dropdown:hover {
background-color: #3a3a3a;
border-color: #357abd;
}
.service-dropdown:focus {
outline: none;
border-color: #4990e2;
box-shadow: 0 0 0 2px rgba(73, 144, 226, 0.3);
}
*,
*:before,
*:after
{
box-sizing: inherit;
}
/* Responsive styles for mobile */
@media (max-width: 768px) {
.service-selector {
padding: 15px 10px;
}
.service-selector h1 {
font-size: 1.5rem;
margin: 0 0 12px 0;
}
.service-dropdown-container {
flex-direction: column;
gap: 8px;
}
.service-dropdown-container label {
font-size: 13px;
}
.service-dropdown {
width: 100%;
max-width: 300px;
min-width: auto;
font-size: 13px;
padding: 8px 35px 8px 12px;
}
}
body
{
margin:0;
background: #fafafa;
}
@media (max-width: 480px) {
.service-selector h1 {
font-size: 1.25rem;
}
.service-dropdown {
max-width: 250px;
}
}
</style>
</head>
<body>
</head>
<body>
<div class="service-selector">
<h1>SuperMQ API Documentation</h1>
<div class="service-dropdown-container">
<label for="serviceDropdown">Select Service:</label>
<select id="serviceDropdown" class="service-dropdown"></select>
</div>
</div>
<div id="swagger-ui"></div>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.30.3/swagger-ui-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.30.3/swagger-ui-standalone-preset.js"></script>
<script>
window.onload = function() {
// Begin Swagger UI call region
const ui = SwaggerUIBundle({
url: "https://petstore.swagger.io/v2/swagger.json",
"dom_id": "#swagger-ui",
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
queryConfigEnabled: false,
configUrl: "swagger-config.json",
})
// End Swagger UI call region
// Available API specifications
const APIs = ["auth.yaml","channels.yaml","clients.yaml","domains.yaml","groups.yaml","http.yaml","journal.yaml","users.yaml"];
// Get the service from URL query parameter, default to first service
function getServiceFromURL() {
const params = new URLSearchParams(window.location.search);
const service = params.get('service');
return service && APIs.includes(service) ? service : APIs[0];
}
window.ui = ui;
};
</script>
</body>
// Update URL with selected service
function updateURL(service) {
const url = new URL(window.location);
url.searchParams.set('service', service);
window.history.pushState({}, '', url);
}
// Create service selector dropdown
function createServiceDropdown() {
const dropdown = document.getElementById('serviceDropdown');
const currentService = getServiceFromURL();
APIs.forEach(api => {
const option = document.createElement('option');
option.value = api;
let serviceName = api.replace('.yaml', '').replace(/^\w/, c => c.toUpperCase());
if (serviceName.toLowerCase() === 'http') {
serviceName = 'HTTP';
}
option.textContent = serviceName;
if (api === currentService) {
option.selected = true;
}
dropdown.appendChild(option);
});
// Handle dropdown change
dropdown.addEventListener('change', (e) => {
const selectedApi = e.target.value;
loadSwaggerUI(selectedApi);
updateURL(selectedApi);
});
}
// Load Swagger UI with specified API spec
function loadSwaggerUI(apiSpec) {
SwaggerUIBundle({
url: apiSpec,
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});
}
// Initialize
createServiceDropdown();
loadSwaggerUI(getServiceFromURL());
</script>
</body>
</html>
BIN
View File
Binary file not shown.
-90
View File
@@ -1,90 +0,0 @@
core-js-pure: 296.32 KB (8.11%)
autolinker: 208.88 KB (5.72%)
tslib: 10.03 KB (4.80%)
<self>: 198.85 KB (95.2%)
lodash: 174.38 KB (4.78%)
swagger-client: 166.72 KB (4.57%)
qs: 26.08 KB (15.6%)
cookie: 3.98 KB (2.39%)
is-plain-object: 758 B (0.444%)
<self>: 135.92 KB (81.5%)
immutable: 139.01 KB (3.81%)
remarkable: 125.56 KB (3.44%)
react-dom: 119.19 KB (3.26%)
highlight.js: 111.85 KB (3.06%)
js-yaml: 105.01 KB (2.88%)
readable-stream: 95.54 KB (2.62%)
buffer: 56.99 KB (1.56%)
dompurify: 54.55 KB (1.49%)
react-redux: 53.9 KB (1.48%)
react-is: 2.69 KB (4.98%)
<self>: 51.22 KB (95.0%)
url: 37.38 KB (1.02%)
punycode: 14.31 KB (38.3%)
<self>: 23.08 KB (61.7%)
react-syntax-highlighter: 36.02 KB (0.987%)
fast-json-patch: 31.48 KB (0.862%)
redux: 27.17 KB (0.744%)
@babel/runtime-corejs3: 26.6 KB (0.728%)
regenerator-runtime: 24.26 KB (0.664%)
sha.js: 18.57 KB (0.508%)
url-parse: 16.23 KB (0.445%)
object-inspect: 16.04 KB (0.439%)
events: 14.54 KB (0.398%)
cross-fetch: 14.31 KB (0.392%)
reselect: 12.47 KB (0.341%)
zenscroll: 12.31 KB (0.337%)
get-intrinsic: 12.21 KB (0.334%)
react-immutable-proptypes: 11.82 KB (0.324%)
react-debounce-input: 11.74 KB (0.322%)
string_decoder: 10.87 KB (0.298%)
safe-buffer: 1.63 KB (15.0%)
<self>: 9.24 KB (85.0%)
ret: 10.82 KB (0.296%)
lodash.debounce: 10.53 KB (0.288%)
traverse: 8.72 KB (0.239%)
xml: 7.39 KB (0.202%)
react: 6.48 KB (0.178%)
react-copy-to-clipboard: 6.39 KB (0.175%)
randexp: 6.15 KB (0.168%)
react-immutable-pure-component: 6.01 KB (0.165%)
redux-immutable: 5.43 KB (0.149%)
process: 5.29 KB (0.145%)
scheduler: 4.91 KB (0.134%)
@babel/runtime: 4.87 KB (0.133%)
drange: 4.8 KB (0.132%)
querystring: 4.51 KB (0.123%)
lowlight: 4.42 KB (0.121%)
deep-extend: 4.19 KB (0.115%)
deepmerge: 3.94 KB (0.108%)
base64-js: 3.84 KB (0.105%)
stream-browserify: 3.76 KB (0.103%)
side-channel: 3.31 KB (0.0907%)
format: 3.26 KB (0.0892%)
copy-to-clipboard: 3.2 KB (0.0876%)
css.escape: 3.08 KB (0.0843%)
serialize-error: 2.93 KB (0.0802%)
hoist-non-react-statics: 2.68 KB (0.0734%)
prop-types: 2.6 KB (0.0712%)
querystringify: 2.5 KB (0.0686%)
xml-but-prettier: 2.17 KB (0.0593%)
has-symbols: 2.13 KB (0.0583%)
ieee754: 2.1 KB (0.0576%)
object-assign: 2.06 KB (0.0564%)
call-bind: 1.68 KB (0.0460%)
util-deprecate: 1.58 KB (0.0432%)
function-bind: 1.55 KB (0.0425%)
randombytes: 1.54 KB (0.0422%)
js-file-download: 1.52 KB (0.0416%)
classnames: 1.3 KB (0.0355%)
@braintree/sanitize-url: 1.29 KB (0.0352%)
repeat-string: 1.18 KB (0.0324%)
toggle-selection: 780 B (0.0209%)
inherits: 753 B (0.0201%)
requires-port: 753 B (0.0201%)
fault: 691 B (0.0185%)
btoa: 273 B (0.00730%)
formdata-node: 259 B (0.00693%)
has: 129 B (0.00345%)
object-inspect|.: 15 B (0.000401%)
<self>: 1.42 MB (39.7%)
-12
View File
@@ -1,12 +0,0 @@
core-js-pure: 296.32 KB (15.1%)
lodash: 174.38 KB (8.87%)
swagger-client: 135.92 KB (6.91%)
highlight.js: 111.85 KB (5.69%)
react-syntax-highlighter: 36.02 KB (1.83%)
@babel/runtime-corejs3: 26.6 KB (1.35%)
cross-fetch: 14.31 KB (0.728%)
lowlight: 4.42 KB (0.225%)
@babel/runtime: 3.83 KB (0.195%)
remarkable: 3.79 KB (0.193%)
@braintree/sanitize-url: 1.29 KB (0.0654%)
<self>: 1.13 MB (58.9%)
-90
View File
@@ -1,90 +0,0 @@
core-js-pure: 296.32 KB (8.11%)
autolinker: 208.88 KB (5.72%)
tslib: 10.03 KB (4.80%)
<self>: 198.85 KB (95.2%)
lodash: 174.38 KB (4.78%)
swagger-client: 166.72 KB (4.57%)
qs: 26.08 KB (15.6%)
cookie: 3.98 KB (2.39%)
is-plain-object: 758 B (0.444%)
<self>: 135.92 KB (81.5%)
immutable: 139.01 KB (3.81%)
remarkable: 125.56 KB (3.44%)
react-dom: 119.19 KB (3.26%)
highlight.js: 111.85 KB (3.06%)
js-yaml: 105.01 KB (2.88%)
readable-stream: 95.54 KB (2.62%)
buffer: 56.99 KB (1.56%)
dompurify: 54.55 KB (1.49%)
react-redux: 53.9 KB (1.48%)
react-is: 2.69 KB (4.98%)
<self>: 51.22 KB (95.0%)
url: 37.38 KB (1.02%)
punycode: 14.31 KB (38.3%)
<self>: 23.08 KB (61.7%)
react-syntax-highlighter: 36.02 KB (0.987%)
fast-json-patch: 31.48 KB (0.862%)
redux: 27.17 KB (0.744%)
@babel/runtime-corejs3: 26.6 KB (0.728%)
regenerator-runtime: 24.26 KB (0.664%)
sha.js: 18.57 KB (0.508%)
url-parse: 16.23 KB (0.445%)
object-inspect: 16.04 KB (0.439%)
events: 14.54 KB (0.398%)
cross-fetch: 14.31 KB (0.392%)
reselect: 12.47 KB (0.341%)
zenscroll: 12.31 KB (0.337%)
get-intrinsic: 12.21 KB (0.334%)
react-immutable-proptypes: 11.82 KB (0.324%)
react-debounce-input: 11.74 KB (0.322%)
string_decoder: 10.87 KB (0.298%)
safe-buffer: 1.63 KB (15.0%)
<self>: 9.24 KB (85.0%)
ret: 10.82 KB (0.296%)
lodash.debounce: 10.53 KB (0.288%)
traverse: 8.72 KB (0.239%)
xml: 7.39 KB (0.202%)
react: 6.48 KB (0.178%)
react-copy-to-clipboard: 6.39 KB (0.175%)
randexp: 6.15 KB (0.168%)
react-immutable-pure-component: 6.01 KB (0.165%)
redux-immutable: 5.43 KB (0.149%)
process: 5.29 KB (0.145%)
scheduler: 4.91 KB (0.134%)
@babel/runtime: 4.87 KB (0.133%)
drange: 4.8 KB (0.132%)
querystring: 4.51 KB (0.123%)
lowlight: 4.42 KB (0.121%)
deep-extend: 4.19 KB (0.115%)
deepmerge: 3.94 KB (0.108%)
base64-js: 3.84 KB (0.105%)
stream-browserify: 3.76 KB (0.103%)
side-channel: 3.31 KB (0.0907%)
format: 3.26 KB (0.0892%)
copy-to-clipboard: 3.2 KB (0.0876%)
css.escape: 3.08 KB (0.0843%)
serialize-error: 2.93 KB (0.0802%)
hoist-non-react-statics: 2.68 KB (0.0734%)
prop-types: 2.6 KB (0.0712%)
querystringify: 2.5 KB (0.0686%)
xml-but-prettier: 2.17 KB (0.0593%)
has-symbols: 2.13 KB (0.0583%)
ieee754: 2.1 KB (0.0576%)
object-assign: 2.06 KB (0.0564%)
call-bind: 1.68 KB (0.0460%)
util-deprecate: 1.58 KB (0.0432%)
function-bind: 1.55 KB (0.0425%)
randombytes: 1.54 KB (0.0422%)
js-file-download: 1.52 KB (0.0416%)
classnames: 1.3 KB (0.0355%)
@braintree/sanitize-url: 1.29 KB (0.0352%)
repeat-string: 1.18 KB (0.0324%)
toggle-selection: 780 B (0.0209%)
inherits: 753 B (0.0201%)
requires-port: 753 B (0.0201%)
fault: 691 B (0.0185%)
btoa: 273 B (0.00730%)
formdata-node: 259 B (0.00693%)
has: 129 B (0.00345%)
object-inspect|.: 15 B (0.000401%)
<self>: 1.42 MB (39.7%)
-79
View File
@@ -1,79 +0,0 @@
<!doctype html>
<html lang="en-US">
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;
if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
} else {
qp = location.search.substring(1);
}
arr = qp.split("&");
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value);
}
) : {};
isValid = qp.state === sentState;
if ((
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
oauth2.auth.schema.get("flow") === "authorization_code"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
});
}
if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg;
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}
if (document.readyState !== 'loading') {
run();
} else {
document.addEventListener('DOMContentLoaded', function () {
run();
});
}
</script>
</body>
</html>
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
{"urls":[{"name":"api/auth.yaml","url":"apis/apidocs/openapi/auth.yaml"},{"name":"api/channels.yaml","url":"apis/apidocs/openapi/channels.yaml"},{"name":"api/clients.yaml","url":"apis/apidocs/openapi/clients.yaml"},{"name":"api/domains.yaml","url":"apis/apidocs/openapi/domains.yaml"},{"name":"api/groups.yaml","url":"apis/apidocs/openapi/groups.yaml"},{"name":"api/http.yaml","url":"apis/apidocs/openapi/http.yaml"},{"name":"api/journal.yaml","url":"apis/apidocs/openapi/journal.yaml"},{"name":"api/twins.yaml","url":"apis/apidocs/openapi/twins.yaml"},{"name":"api/users.yaml","url":"apis/apidocs/openapi/users.yaml"}]}
File diff suppressed because one or more lines are too long
-118
View File
@@ -1,118 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
* @description Recursive object extending
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
* @license MIT
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
*/
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */
/*! https://mths.be/punycode v1.3.2 by @mathias */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-118
View File
@@ -1,118 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
* @description Recursive object extending
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
* @license MIT
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2018 Viacheslav Lotsmanov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
*/
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */
/*! https://mths.be/punycode v1.3.2 by @mathias */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,27 +0,0 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Binary file not shown.
File diff suppressed because one or more lines are too long
-4
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.
File diff suppressed because one or more lines are too long