itrm-tools 1.0.44 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/APIRequest.d.ts +67 -67
- package/dist/api/APIRequest.js +145 -145
- package/dist/api/APIRequest.js.map +1 -1
- package/dist/api/APIRequestBuilder.d.ts +20 -20
- package/dist/api/APIRequestBuilder.js +14 -14
- package/dist/api/APIRouter.d.ts +11 -11
- package/dist/api/APIRouter.js +21 -21
- package/dist/api/APIService.d.ts +42 -42
- package/dist/api/APIService.js +108 -108
- package/dist/api/APIService.js.map +1 -1
- package/dist/api/ExpressConfiguration.d.ts +4 -4
- package/dist/api/ExpressConfiguration.js +2 -2
- package/dist/api/HttpsAPIService.d.ts +10 -10
- package/dist/api/HttpsAPIService.js +47 -47
- package/dist/api/channel/ServerSentEventsManager.d.ts +8 -8
- package/dist/api/channel/ServerSentEventsManager.js +25 -25
- package/dist/api/check/APIChecker.d.ts +26 -26
- package/dist/api/check/APIChecker.js +40 -40
- package/dist/api/check/CheckableAPIRequest.d.ts +9 -9
- package/dist/api/check/CheckableAPIRequest.js +44 -44
- package/dist/api/check/CheckableAPIRouter.d.ts +11 -11
- package/dist/api/check/CheckableAPIRouter.js +48 -48
- package/dist/api/check/request/CheckableDeleteRequest.d.ts +8 -8
- package/dist/api/check/request/CheckableDeleteRequest.js +17 -17
- package/dist/api/check/request/CheckableFileUploadingPostRequest.d.ts +11 -11
- package/dist/api/check/request/CheckableFileUploadingPostRequest.js +22 -22
- package/dist/api/check/request/CheckableGetRequest.d.ts +8 -8
- package/dist/api/check/request/CheckableGetRequest.js +17 -17
- package/dist/api/check/request/CheckablePostRequest.d.ts +8 -8
- package/dist/api/check/request/CheckablePostRequest.js +17 -17
- package/dist/api/check/request/CheckablePutRequest.d.ts +8 -8
- package/dist/api/check/request/CheckablePutRequest.js +17 -17
- package/dist/api/check/route/SimpleCheckableAPIRouter.d.ts +7 -7
- package/dist/api/check/route/SimpleCheckableAPIRouter.js +25 -25
- package/dist/api/express/ExpressFileUploadingConfiguration.d.ts +6 -6
- package/dist/api/express/ExpressFileUploadingConfiguration.js +27 -27
- package/dist/api/express/ExpressStandardConfiguration.d.ts +11 -11
- package/dist/api/express/ExpressStandardConfiguration.js +29 -29
- package/dist/api/request/DeleteRequest.d.ts +7 -7
- package/dist/api/request/DeleteRequest.js +16 -16
- package/dist/api/request/GetRequest.d.ts +7 -7
- package/dist/api/request/GetRequest.js +16 -16
- package/dist/api/request/PostRequest.d.ts +7 -7
- package/dist/api/request/PostRequest.js +16 -16
- package/dist/api/request/PutRequest.d.ts +7 -7
- package/dist/api/request/PutRequest.js +16 -16
- package/dist/api/request/RequestAxiosCall.d.ts +7 -7
- package/dist/api/request/RequestAxiosCall.js +57 -57
- package/dist/api/request/docs/DocumentationModels.d.ts +47 -47
- package/dist/api/request/docs/DocumentationModels.js +114 -114
- package/dist/api/request/docs/DocumentationRequest.d.ts +12 -12
- package/dist/api/request/docs/DocumentationRequest.js +126 -126
- package/dist/api/route/SimpleAPIRouter.d.ts +6 -6
- package/dist/api/route/SimpleAPIRouter.js +24 -24
- package/dist/database/mongoose/MongooseModelManager.d.ts +47 -43
- package/dist/database/mongoose/MongooseModelManager.js +65 -65
- package/dist/database/mongoose/MongooseModelManager.js.map +1 -1
- package/dist/database/redis/RedisConnection.d.ts +7 -7
- package/dist/database/redis/RedisConnection.js +17 -17
- package/dist/database/redis/RedisModelManager.d.ts +10 -10
- package/dist/database/redis/RedisModelManager.js +17 -17
- package/dist/database/sequelize/SequelizeConnection.d.ts +16 -16
- package/dist/database/sequelize/SequelizeConnection.js +22 -22
- package/dist/database/sequelize/SequelizeModelManager.d.ts +26 -26
- package/dist/database/sequelize/SequelizeModelManager.js +58 -58
- package/dist/index.d.ts +31 -31
- package/dist/index.js +67 -67
- package/dist/log/Logger.d.ts +7 -7
- package/dist/log/Logger.js +28 -28
- package/dist/log/LoggerManager.d.ts +7 -7
- package/dist/log/LoggerManager.js +63 -63
- package/dist/log/LoggerWebSocket.d.ts +10 -10
- package/dist/log/LoggerWebSocket.js +15 -15
- package/dist/web3/Coin.d.ts +18 -18
- package/dist/web3/Coin.js +22 -22
- package/dist/web3/Coin.js.map +1 -1
- package/dist/web3/coingecko/CoingeckoPriceFinder.d.ts +10 -10
- package/dist/web3/coingecko/CoingeckoPriceFinder.js +88 -88
- package/package.json +25 -25
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.SimpleCheckableAPIRouter = void 0;
|
|
13
|
-
const CheckableAPIRouter_1 = require("../CheckableAPIRouter");
|
|
14
|
-
class SimpleCheckableAPIRouter extends CheckableAPIRouter_1.CheckableAPIRouter {
|
|
15
|
-
constructor(path, options) {
|
|
16
|
-
super(path, options);
|
|
17
|
-
}
|
|
18
|
-
setHeaders(res) { }
|
|
19
|
-
runMiddleware(req, res, next) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
return next();
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.SimpleCheckableAPIRouter = SimpleCheckableAPIRouter;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SimpleCheckableAPIRouter = void 0;
|
|
13
|
+
const CheckableAPIRouter_1 = require("../CheckableAPIRouter");
|
|
14
|
+
class SimpleCheckableAPIRouter extends CheckableAPIRouter_1.CheckableAPIRouter {
|
|
15
|
+
constructor(path, options) {
|
|
16
|
+
super(path, options);
|
|
17
|
+
}
|
|
18
|
+
setHeaders(res) { }
|
|
19
|
+
runMiddleware(req, res, next) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return next();
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.SimpleCheckableAPIRouter = SimpleCheckableAPIRouter;
|
|
26
26
|
//# sourceMappingURL=SimpleCheckableAPIRouter.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ExpressStandardConfiguration } from "./ExpressStandardConfiguration";
|
|
2
|
-
import { Express } from "express";
|
|
3
|
-
export declare function initializeFileUploadingGlobalVars(): void;
|
|
4
|
-
export declare class ExpressFileUploadingConfiguration extends ExpressStandardConfiguration {
|
|
5
|
-
apply(app: Express): void;
|
|
6
|
-
}
|
|
1
|
+
import { ExpressStandardConfiguration } from "./ExpressStandardConfiguration";
|
|
2
|
+
import { Express } from "express";
|
|
3
|
+
export declare function initializeFileUploadingGlobalVars(): void;
|
|
4
|
+
export declare class ExpressFileUploadingConfiguration extends ExpressStandardConfiguration {
|
|
5
|
+
apply(app: Express): void;
|
|
6
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ExpressFileUploadingConfiguration = exports.initializeFileUploadingGlobalVars = void 0;
|
|
7
|
-
const ExpressStandardConfiguration_1 = require("./ExpressStandardConfiguration");
|
|
8
|
-
const multer_1 = __importDefault(require("multer"));
|
|
9
|
-
const APIService_1 = require("../APIService");
|
|
10
|
-
function initializeFileUploadingGlobalVars() {
|
|
11
|
-
if (!APIService_1.ITRMAPIServiceGlobal.tools.file) {
|
|
12
|
-
const storage = multer_1.default.memoryStorage();
|
|
13
|
-
APIService_1.ITRMAPIServiceGlobal.tools.file = {
|
|
14
|
-
storage: storage,
|
|
15
|
-
upload: (0, multer_1.default)({ storage })
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.initializeFileUploadingGlobalVars = initializeFileUploadingGlobalVars;
|
|
20
|
-
class ExpressFileUploadingConfiguration extends ExpressStandardConfiguration_1.ExpressStandardConfiguration {
|
|
21
|
-
apply(app) {
|
|
22
|
-
super.apply(app);
|
|
23
|
-
initializeFileUploadingGlobalVars();
|
|
24
|
-
app.use(APIService_1.ITRMAPIServiceGlobal.tools.file.upload.array('file'));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.ExpressFileUploadingConfiguration = ExpressFileUploadingConfiguration;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExpressFileUploadingConfiguration = exports.initializeFileUploadingGlobalVars = void 0;
|
|
7
|
+
const ExpressStandardConfiguration_1 = require("./ExpressStandardConfiguration");
|
|
8
|
+
const multer_1 = __importDefault(require("multer"));
|
|
9
|
+
const APIService_1 = require("../APIService");
|
|
10
|
+
function initializeFileUploadingGlobalVars() {
|
|
11
|
+
if (!APIService_1.ITRMAPIServiceGlobal.tools.file) {
|
|
12
|
+
const storage = multer_1.default.memoryStorage();
|
|
13
|
+
APIService_1.ITRMAPIServiceGlobal.tools.file = {
|
|
14
|
+
storage: storage,
|
|
15
|
+
upload: (0, multer_1.default)({ storage })
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.initializeFileUploadingGlobalVars = initializeFileUploadingGlobalVars;
|
|
20
|
+
class ExpressFileUploadingConfiguration extends ExpressStandardConfiguration_1.ExpressStandardConfiguration {
|
|
21
|
+
apply(app) {
|
|
22
|
+
super.apply(app);
|
|
23
|
+
initializeFileUploadingGlobalVars();
|
|
24
|
+
app.use(APIService_1.ITRMAPIServiceGlobal.tools.file.upload.array('file'));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ExpressFileUploadingConfiguration = ExpressFileUploadingConfiguration;
|
|
28
28
|
//# sourceMappingURL=ExpressFileUploadingConfiguration.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Express } from "express";
|
|
2
|
-
import cors from "cors";
|
|
3
|
-
import { ExpressConfiguration } from "../ExpressConfiguration";
|
|
4
|
-
export declare class ExpressStandardConfiguration implements ExpressConfiguration {
|
|
5
|
-
apply(app: Express): void;
|
|
6
|
-
static getCorsConfiguration(): (req: cors.CorsRequest, res: {
|
|
7
|
-
statusCode?: number | undefined;
|
|
8
|
-
setHeader(key: string, value: string): any;
|
|
9
|
-
end(): any;
|
|
10
|
-
}, next: (err?: any) => any) => void;
|
|
11
|
-
}
|
|
1
|
+
import { Express } from "express";
|
|
2
|
+
import cors from "cors";
|
|
3
|
+
import { ExpressConfiguration } from "../ExpressConfiguration";
|
|
4
|
+
export declare class ExpressStandardConfiguration implements ExpressConfiguration {
|
|
5
|
+
apply(app: Express): void;
|
|
6
|
+
static getCorsConfiguration(): (req: cors.CorsRequest, res: {
|
|
7
|
+
statusCode?: number | undefined;
|
|
8
|
+
setHeader(key: string, value: string): any;
|
|
9
|
+
end(): any;
|
|
10
|
+
}, next: (err?: any) => any) => void;
|
|
11
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ExpressStandardConfiguration = void 0;
|
|
7
|
-
const express_1 = __importDefault(require("express"));
|
|
8
|
-
const cors_1 = __importDefault(require("cors"));
|
|
9
|
-
const APIService_1 = require("../APIService");
|
|
10
|
-
class ExpressStandardConfiguration {
|
|
11
|
-
apply(app) {
|
|
12
|
-
app.use(ExpressStandardConfiguration.getCorsConfiguration());
|
|
13
|
-
app.use(express_1.default.json({ limit: '50mb' }));
|
|
14
|
-
app.use(express_1.default.urlencoded({ limit: '50mb', extended: true }));
|
|
15
|
-
//app.use(urlencoded({ extended: true }));
|
|
16
|
-
}
|
|
17
|
-
static getCorsConfiguration() {
|
|
18
|
-
return (0, cors_1.default)({
|
|
19
|
-
origin: function (origin, callback) {
|
|
20
|
-
let whitelist = APIService_1.ITRMAPIServiceGlobal.whitelist;
|
|
21
|
-
if (whitelist.length == 0 || (origin && whitelist.indexOf(origin) !== -1))
|
|
22
|
-
callback(null, true);
|
|
23
|
-
else
|
|
24
|
-
callback(new Error('Not allowed by CORS'), false);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.ExpressStandardConfiguration = ExpressStandardConfiguration;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ExpressStandardConfiguration = void 0;
|
|
7
|
+
const express_1 = __importDefault(require("express"));
|
|
8
|
+
const cors_1 = __importDefault(require("cors"));
|
|
9
|
+
const APIService_1 = require("../APIService");
|
|
10
|
+
class ExpressStandardConfiguration {
|
|
11
|
+
apply(app) {
|
|
12
|
+
app.use(ExpressStandardConfiguration.getCorsConfiguration());
|
|
13
|
+
app.use(express_1.default.json({ limit: '50mb' }));
|
|
14
|
+
app.use(express_1.default.urlencoded({ limit: '50mb', extended: true }));
|
|
15
|
+
//app.use(urlencoded({ extended: true }));
|
|
16
|
+
}
|
|
17
|
+
static getCorsConfiguration() {
|
|
18
|
+
return (0, cors_1.default)({
|
|
19
|
+
origin: function (origin, callback) {
|
|
20
|
+
let whitelist = APIService_1.ITRMAPIServiceGlobal.whitelist;
|
|
21
|
+
if (whitelist.length == 0 || (origin && whitelist.indexOf(origin) !== -1))
|
|
22
|
+
callback(null, true);
|
|
23
|
+
else
|
|
24
|
+
callback(new Error('Not allowed by CORS'), false);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ExpressStandardConfiguration = ExpressStandardConfiguration;
|
|
30
30
|
//# sourceMappingURL=ExpressStandardConfiguration.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Express, Router } from "express";
|
|
2
|
-
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
-
export declare abstract class DeleteRequest extends APIRequest {
|
|
4
|
-
constructor(config: APIRequestConfig);
|
|
5
|
-
addToApp(app: Express): void;
|
|
6
|
-
addToRouter(router: Router): void;
|
|
7
|
-
}
|
|
1
|
+
import { Express, Router } from "express";
|
|
2
|
+
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
+
export declare abstract class DeleteRequest extends APIRequest {
|
|
4
|
+
constructor(config: APIRequestConfig);
|
|
5
|
+
addToApp(app: Express): void;
|
|
6
|
+
addToRouter(router: Router): void;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DeleteRequest = void 0;
|
|
4
|
-
const APIRequest_1 = require("../APIRequest");
|
|
5
|
-
class DeleteRequest extends APIRequest_1.APIRequest {
|
|
6
|
-
constructor(config) {
|
|
7
|
-
super(APIRequest_1.RequestMethod.DELETE, config);
|
|
8
|
-
}
|
|
9
|
-
addToApp(app) {
|
|
10
|
-
app.delete(this.path, this.process);
|
|
11
|
-
}
|
|
12
|
-
addToRouter(router) {
|
|
13
|
-
router.delete(this.path, this.process);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.DeleteRequest = DeleteRequest;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteRequest = void 0;
|
|
4
|
+
const APIRequest_1 = require("../APIRequest");
|
|
5
|
+
class DeleteRequest extends APIRequest_1.APIRequest {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super(APIRequest_1.RequestMethod.DELETE, config);
|
|
8
|
+
}
|
|
9
|
+
addToApp(app) {
|
|
10
|
+
app.delete(this.path, this.process);
|
|
11
|
+
}
|
|
12
|
+
addToRouter(router) {
|
|
13
|
+
router.delete(this.path, this.process);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.DeleteRequest = DeleteRequest;
|
|
17
17
|
//# sourceMappingURL=DeleteRequest.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Express, Router } from "express";
|
|
2
|
-
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
-
export declare abstract class GetRequest extends APIRequest {
|
|
4
|
-
constructor(config: APIRequestConfig);
|
|
5
|
-
addToApp(app: Express): void;
|
|
6
|
-
addToRouter(router: Router): void;
|
|
7
|
-
}
|
|
1
|
+
import { Express, Router } from "express";
|
|
2
|
+
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
+
export declare abstract class GetRequest extends APIRequest {
|
|
4
|
+
constructor(config: APIRequestConfig);
|
|
5
|
+
addToApp(app: Express): void;
|
|
6
|
+
addToRouter(router: Router): void;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetRequest = void 0;
|
|
4
|
-
const APIRequest_1 = require("../APIRequest");
|
|
5
|
-
class GetRequest extends APIRequest_1.APIRequest {
|
|
6
|
-
constructor(config) {
|
|
7
|
-
super(APIRequest_1.RequestMethod.GET, config);
|
|
8
|
-
}
|
|
9
|
-
addToApp(app) {
|
|
10
|
-
app.get(this.path, this.process);
|
|
11
|
-
}
|
|
12
|
-
addToRouter(router) {
|
|
13
|
-
router.get(this.path, this.process);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.GetRequest = GetRequest;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetRequest = void 0;
|
|
4
|
+
const APIRequest_1 = require("../APIRequest");
|
|
5
|
+
class GetRequest extends APIRequest_1.APIRequest {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super(APIRequest_1.RequestMethod.GET, config);
|
|
8
|
+
}
|
|
9
|
+
addToApp(app) {
|
|
10
|
+
app.get(this.path, this.process);
|
|
11
|
+
}
|
|
12
|
+
addToRouter(router) {
|
|
13
|
+
router.get(this.path, this.process);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.GetRequest = GetRequest;
|
|
17
17
|
//# sourceMappingURL=GetRequest.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Express, Router } from "express";
|
|
2
|
-
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
-
export declare abstract class PostRequest extends APIRequest {
|
|
4
|
-
constructor(config: APIRequestConfig);
|
|
5
|
-
addToApp(app: Express): void;
|
|
6
|
-
addToRouter(router: Router): void;
|
|
7
|
-
}
|
|
1
|
+
import { Express, Router } from "express";
|
|
2
|
+
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
+
export declare abstract class PostRequest extends APIRequest {
|
|
4
|
+
constructor(config: APIRequestConfig);
|
|
5
|
+
addToApp(app: Express): void;
|
|
6
|
+
addToRouter(router: Router): void;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostRequest = void 0;
|
|
4
|
-
const APIRequest_1 = require("../APIRequest");
|
|
5
|
-
class PostRequest extends APIRequest_1.APIRequest {
|
|
6
|
-
constructor(config) {
|
|
7
|
-
super(APIRequest_1.RequestMethod.POST, config);
|
|
8
|
-
}
|
|
9
|
-
addToApp(app) {
|
|
10
|
-
app.post(this.path, this.process);
|
|
11
|
-
}
|
|
12
|
-
addToRouter(router) {
|
|
13
|
-
router.post(this.path, this.process);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.PostRequest = PostRequest;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostRequest = void 0;
|
|
4
|
+
const APIRequest_1 = require("../APIRequest");
|
|
5
|
+
class PostRequest extends APIRequest_1.APIRequest {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super(APIRequest_1.RequestMethod.POST, config);
|
|
8
|
+
}
|
|
9
|
+
addToApp(app) {
|
|
10
|
+
app.post(this.path, this.process);
|
|
11
|
+
}
|
|
12
|
+
addToRouter(router) {
|
|
13
|
+
router.post(this.path, this.process);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.PostRequest = PostRequest;
|
|
17
17
|
//# sourceMappingURL=PostRequest.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Express, Router } from "express";
|
|
2
|
-
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
-
export declare abstract class PutRequest extends APIRequest {
|
|
4
|
-
constructor(config: APIRequestConfig);
|
|
5
|
-
addToApp(app: Express): void;
|
|
6
|
-
addToRouter(router: Router): void;
|
|
7
|
-
}
|
|
1
|
+
import { Express, Router } from "express";
|
|
2
|
+
import { APIRequest, APIRequestConfig } from "../APIRequest";
|
|
3
|
+
export declare abstract class PutRequest extends APIRequest {
|
|
4
|
+
constructor(config: APIRequestConfig);
|
|
5
|
+
addToApp(app: Express): void;
|
|
6
|
+
addToRouter(router: Router): void;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PutRequest = void 0;
|
|
4
|
-
const APIRequest_1 = require("../APIRequest");
|
|
5
|
-
class PutRequest extends APIRequest_1.APIRequest {
|
|
6
|
-
constructor(config) {
|
|
7
|
-
super(APIRequest_1.RequestMethod.PUT, config);
|
|
8
|
-
}
|
|
9
|
-
addToApp(app) {
|
|
10
|
-
app.put(this.path, this.process);
|
|
11
|
-
}
|
|
12
|
-
addToRouter(router) {
|
|
13
|
-
router.put(this.path, this.process);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.PutRequest = PutRequest;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PutRequest = void 0;
|
|
4
|
+
const APIRequest_1 = require("../APIRequest");
|
|
5
|
+
class PutRequest extends APIRequest_1.APIRequest {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super(APIRequest_1.RequestMethod.PUT, config);
|
|
8
|
+
}
|
|
9
|
+
addToApp(app) {
|
|
10
|
+
app.put(this.path, this.process);
|
|
11
|
+
}
|
|
12
|
+
addToRouter(router) {
|
|
13
|
+
router.put(this.path, this.process);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.PutRequest = PutRequest;
|
|
17
17
|
//# sourceMappingURL=PutRequest.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from "axios";
|
|
2
|
-
export declare class RequestAxiosCall {
|
|
3
|
-
static get(url: string, config?: AxiosRequestConfig<any>): Promise<unknown>;
|
|
4
|
-
static post(url: string, body: any, config?: AxiosRequestConfig): Promise<unknown>;
|
|
5
|
-
static put(url: string, body: any, config?: AxiosRequestConfig): Promise<unknown>;
|
|
6
|
-
static delete(url: string, config?: AxiosRequestConfig): Promise<unknown>;
|
|
7
|
-
}
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
export declare class RequestAxiosCall {
|
|
3
|
+
static get(url: string, config?: AxiosRequestConfig<any>): Promise<unknown>;
|
|
4
|
+
static post(url: string, body: any, config?: AxiosRequestConfig): Promise<unknown>;
|
|
5
|
+
static put(url: string, body: any, config?: AxiosRequestConfig): Promise<unknown>;
|
|
6
|
+
static delete(url: string, config?: AxiosRequestConfig): Promise<unknown>;
|
|
7
|
+
}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RequestAxiosCall = void 0;
|
|
16
|
-
const axios_1 = __importDefault(require("axios"));
|
|
17
|
-
const axios_retry_1 = __importDefault(require("axios-retry"));
|
|
18
|
-
(0, axios_retry_1.default)(axios_1.default, { retries: 3, retryDelay: (retryCount) => { return 2000; } });
|
|
19
|
-
class RequestAxiosCall {
|
|
20
|
-
static get(url, config) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
return new Promise((resolve, reject) => {
|
|
23
|
-
axios_1.default.get(url, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
24
|
-
.then(response => { resolve(response.data); })
|
|
25
|
-
.catch(err => { reject(err); });
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
static post(url, body, config) {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
return new Promise((resolve, reject) => {
|
|
32
|
-
axios_1.default.post(url, body, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
33
|
-
.then(response => { resolve(response.data); })
|
|
34
|
-
.catch(err => { reject(err); });
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
static put(url, body, config) {
|
|
39
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
return new Promise((resolve, reject) => {
|
|
41
|
-
axios_1.default.put(url, body, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
42
|
-
.then(response => { resolve(response.data); })
|
|
43
|
-
.catch(err => { reject(err); });
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
static delete(url, config) {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
return new Promise((resolve, reject) => {
|
|
50
|
-
axios_1.default.delete(url, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
51
|
-
.then(response => { resolve(response.data); })
|
|
52
|
-
.catch(err => { reject(err); });
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.RequestAxiosCall = RequestAxiosCall;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.RequestAxiosCall = void 0;
|
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
|
17
|
+
const axios_retry_1 = __importDefault(require("axios-retry"));
|
|
18
|
+
(0, axios_retry_1.default)(axios_1.default, { retries: 3, retryDelay: (retryCount) => { return 2000; } });
|
|
19
|
+
class RequestAxiosCall {
|
|
20
|
+
static get(url, config) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
axios_1.default.get(url, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
24
|
+
.then(response => { resolve(response.data); })
|
|
25
|
+
.catch(err => { reject(err); });
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
static post(url, body, config) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
axios_1.default.post(url, body, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
33
|
+
.then(response => { resolve(response.data); })
|
|
34
|
+
.catch(err => { reject(err); });
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
static put(url, body, config) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
return new Promise((resolve, reject) => {
|
|
41
|
+
axios_1.default.put(url, body, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
42
|
+
.then(response => { resolve(response.data); })
|
|
43
|
+
.catch(err => { reject(err); });
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
static delete(url, config) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
return new Promise((resolve, reject) => {
|
|
50
|
+
axios_1.default.delete(url, config !== null && config !== void 0 ? config : { headers: { 'Content-Type': 'application/json' } })
|
|
51
|
+
.then(response => { resolve(response.data); })
|
|
52
|
+
.catch(err => { reject(err); });
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.RequestAxiosCall = RequestAxiosCall;
|
|
58
58
|
//# sourceMappingURL=RequestAxiosCall.js.map
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
export declare let defaultDocumentationSchema: {
|
|
2
|
-
openapi: string;
|
|
3
|
-
info: {
|
|
4
|
-
title: string;
|
|
5
|
-
version: string;
|
|
6
|
-
description: string;
|
|
7
|
-
contact: {};
|
|
8
|
-
};
|
|
9
|
-
servers: {
|
|
10
|
-
url: string;
|
|
11
|
-
}[];
|
|
12
|
-
paths: {};
|
|
13
|
-
tags: {
|
|
14
|
-
name: string;
|
|
15
|
-
}[];
|
|
16
|
-
components: {};
|
|
17
|
-
security: any;
|
|
18
|
-
};
|
|
19
|
-
export declare let defaultBodySchema: {
|
|
20
|
-
content: {
|
|
21
|
-
"application/json": {
|
|
22
|
-
schema: {
|
|
23
|
-
type: string;
|
|
24
|
-
properties: any;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare let securitySchema: {
|
|
30
|
-
components: {
|
|
31
|
-
securitySchemes: {
|
|
32
|
-
bearerAuth: {
|
|
33
|
-
type: string;
|
|
34
|
-
scheme: string;
|
|
35
|
-
bearerFormat: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export declare let securityDeclaration: {
|
|
41
|
-
security: {
|
|
42
|
-
bearerAuth: never[];
|
|
43
|
-
}[];
|
|
44
|
-
};
|
|
45
|
-
export declare const httpStatusCodes: {
|
|
46
|
-
[key: number]: string;
|
|
47
|
-
};
|
|
1
|
+
export declare let defaultDocumentationSchema: {
|
|
2
|
+
openapi: string;
|
|
3
|
+
info: {
|
|
4
|
+
title: string;
|
|
5
|
+
version: string;
|
|
6
|
+
description: string;
|
|
7
|
+
contact: {};
|
|
8
|
+
};
|
|
9
|
+
servers: {
|
|
10
|
+
url: string;
|
|
11
|
+
}[];
|
|
12
|
+
paths: {};
|
|
13
|
+
tags: {
|
|
14
|
+
name: string;
|
|
15
|
+
}[];
|
|
16
|
+
components: {};
|
|
17
|
+
security: any;
|
|
18
|
+
};
|
|
19
|
+
export declare let defaultBodySchema: {
|
|
20
|
+
content: {
|
|
21
|
+
"application/json": {
|
|
22
|
+
schema: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties: any;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare let securitySchema: {
|
|
30
|
+
components: {
|
|
31
|
+
securitySchemes: {
|
|
32
|
+
bearerAuth: {
|
|
33
|
+
type: string;
|
|
34
|
+
scheme: string;
|
|
35
|
+
bearerFormat: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export declare let securityDeclaration: {
|
|
41
|
+
security: {
|
|
42
|
+
bearerAuth: never[];
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
export declare const httpStatusCodes: {
|
|
46
|
+
[key: number]: string;
|
|
47
|
+
};
|