mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-29 23:42:56 +01:00
deploy: cd79fa2f05
This commit is contained in:
commit
797a29d8ef
BIN
dist/favicon-16x16.png
vendored
Normal file
BIN
dist/favicon-16x16.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 665 B |
BIN
dist/favicon-32x32.png
vendored
Normal file
BIN
dist/favicon-32x32.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 628 B |
74
dist/oauth2-redirect.html
vendored
Normal file
74
dist/oauth2-redirect.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>Swagger UI: OAuth2 Redirect</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
<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.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();
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
run();
|
||||
});
|
||||
</script>
|
3
dist/swagger-ui-bundle.js
vendored
Normal file
3
dist/swagger-ui-bundle.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/swagger-ui-bundle.js.map
vendored
Normal file
1
dist/swagger-ui-bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/swagger-ui-es-bundle-core.js
vendored
Normal file
3
dist/swagger-ui-es-bundle-core.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/swagger-ui-es-bundle-core.js.map
vendored
Normal file
1
dist/swagger-ui-es-bundle-core.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/swagger-ui-es-bundle.js
vendored
Normal file
3
dist/swagger-ui-es-bundle.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/swagger-ui-es-bundle.js.map
vendored
Normal file
1
dist/swagger-ui-es-bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/swagger-ui-standalone-preset.js
vendored
Normal file
3
dist/swagger-ui-standalone-preset.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/swagger-ui-standalone-preset.js.map
vendored
Normal file
1
dist/swagger-ui-standalone-preset.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
dist/swagger-ui.css
vendored
Normal file
4
dist/swagger-ui.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/swagger-ui.css.map
vendored
Normal file
1
dist/swagger-ui.css.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
dist/swagger-ui.js
vendored
Normal file
3
dist/swagger-ui.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/swagger-ui.js.map
vendored
Normal file
1
dist/swagger-ui.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
icons/favicon-16x16.png
Normal file
BIN
icons/favicon-16x16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 657 B |
BIN
icons/favicon-196x196.png
Normal file
BIN
icons/favicon-196x196.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
BIN
icons/favicon-32x32.png
Normal file
BIN
icons/favicon-32x32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
60
index.html
Normal file
60
index.html
Normal file
@ -0,0 +1,60 @@
|
||||
<!-- HTML for static distribution bundle build -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>tdlight Telegram bot API docs</title>
|
||||
<link rel="stylesheet" type="text/css" href="dist/swagger-ui.css" >
|
||||
<link rel="icon" type="image/png" href="icons/favicon-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="icons/favicon-16x16.png" sizes="16x16" />
|
||||
<style>
|
||||
html
|
||||
{
|
||||
box-sizing: border-box;
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after
|
||||
{
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
margin:0;
|
||||
background: #fafafa;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
|
||||
<script src="dist/swagger-ui-bundle.js" charset="UTF-8"> </script>
|
||||
<script src="dist/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
// Begin Swagger UI call region
|
||||
const ui = SwaggerUIBundle({
|
||||
url: "tdlight-api-openapi.yaml",
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
plugins: [
|
||||
SwaggerUIBundle.plugins.DownloadUrl
|
||||
],
|
||||
layout: "StandaloneLayout"
|
||||
})
|
||||
// End Swagger UI call region
|
||||
|
||||
window.ui = ui
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
12107
tdlight-api-openapi.yaml
Normal file
12107
tdlight-api-openapi.yaml
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user