@squiz/render-runtime-lib 1.80.0 → 1.80.2
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/lib/ioc.d.ts +2 -3
- package/lib/ioc.js.map +1 -1
- package/lib/webserver/DxpSessionMiddlewareTsoa.js +2 -1
- package/lib/webserver/DxpSessionMiddlewareTsoa.js.map +1 -1
- package/lib/webserver/app.d.ts +2 -2
- package/lib/webserver/controllers/DevelopmentController.d.ts +3 -3
- package/lib/webserver/routes/routes.js +255 -275
- package/lib/webserver/routes/routes.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,38 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RegisterRoutes = RegisterRoutes;
|
|
4
|
-
/* tslint:disable */
|
|
5
|
-
/* eslint-disable */
|
|
6
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
7
4
|
const runtime_1 = require("@tsoa/runtime");
|
|
8
5
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
9
|
-
const
|
|
6
|
+
const StaticController_1 = require("./../controllers/StaticController");
|
|
10
7
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
11
|
-
const
|
|
8
|
+
const RenderController_1 = require("./../controllers/RenderController");
|
|
12
9
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
13
10
|
const DevelopmentController_1 = require("./../controllers/DevelopmentController");
|
|
14
11
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
15
|
-
const
|
|
12
|
+
const DefinitionController_1 = require("./../controllers/DefinitionController");
|
|
16
13
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
17
|
-
const
|
|
14
|
+
const CoreController_1 = require("./../controllers/CoreController");
|
|
18
15
|
const ioc_1 = require("./../../ioc");
|
|
19
16
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
20
17
|
const models = {
|
|
21
|
-
"HealthyResponse": {
|
|
22
|
-
"dataType": "refAlias",
|
|
23
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "number-of-cpus": { "dataType": "double", "required": true }, "name": { "dataType": "string", "required": true }, "buildBranch": { "dataType": "string" }, "buildVersion": { "dataType": "string" }, "version": { "dataType": "string", "required": true }, "status": { "dataType": "enum", "enums": ["healthy"], "required": true } }, "additionalProperties": { "dataType": "any" }, "validators": {} },
|
|
24
|
-
},
|
|
25
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
26
|
-
"UnhealthyResponse": {
|
|
27
|
-
"dataType": "refAlias",
|
|
28
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "status": { "dataType": "enum", "enums": ["unhealthy"], "required": true } }, "validators": {} },
|
|
29
|
-
},
|
|
30
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
31
|
-
"HealthCheck": {
|
|
32
|
-
"dataType": "refAlias",
|
|
33
|
-
"type": { "dataType": "union", "subSchemas": [{ "ref": "HealthyResponse" }, { "ref": "UnhealthyResponse" }], "validators": {} },
|
|
34
|
-
},
|
|
35
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
36
18
|
"ColorHex": {
|
|
37
19
|
"dataType": "refObject",
|
|
38
20
|
"properties": {
|
|
@@ -431,7 +413,7 @@ const models = {
|
|
|
431
413
|
"additionalProperties": { "dataType": "any" },
|
|
432
414
|
},
|
|
433
415
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
434
|
-
"
|
|
416
|
+
"ComponentManifest": {
|
|
435
417
|
"dataType": "refObject",
|
|
436
418
|
"properties": {
|
|
437
419
|
"$schema": { "dataType": "string", "required": true },
|
|
@@ -453,9 +435,19 @@ const models = {
|
|
|
453
435
|
"additionalProperties": false,
|
|
454
436
|
},
|
|
455
437
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
438
|
+
"ComponentManifestType": {
|
|
439
|
+
"dataType": "refAlias",
|
|
440
|
+
"type": { "ref": "ComponentManifest", "validators": {} },
|
|
441
|
+
},
|
|
442
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
443
|
+
"ComponentSchema": {
|
|
444
|
+
"dataType": "refAlias",
|
|
445
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "schema": { "dataType": "object", "required": true }, "name": { "dataType": "string", "required": true } }, "validators": {} },
|
|
446
|
+
},
|
|
447
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
456
448
|
"ManifestV1Model": {
|
|
457
449
|
"dataType": "refAlias",
|
|
458
|
-
"type": { "ref": "
|
|
450
|
+
"type": { "ref": "ComponentManifest", "validators": {} },
|
|
459
451
|
},
|
|
460
452
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
461
453
|
"ManifestModel": {
|
|
@@ -463,359 +455,430 @@ const models = {
|
|
|
463
455
|
"type": { "ref": "ManifestV1Model", "validators": {} },
|
|
464
456
|
},
|
|
465
457
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
466
|
-
"
|
|
467
|
-
"dataType": "refObject",
|
|
468
|
-
"properties": {
|
|
469
|
-
"name": { "dataType": "string", "required": true },
|
|
470
|
-
"entry": { "dataType": "string", "required": true },
|
|
471
|
-
"input": { "ref": "DxComponentInputSchema", "required": true },
|
|
472
|
-
"output": { "dataType": "union", "subSchemas": [{ "ref": "HtmlResponse" }, { "ref": "JsonResponse" }], "required": true },
|
|
473
|
-
"queryParameters": { "dataType": "nestedObjectLiteral", "nestedProperties": {}, "additionalProperties": { "ref": "QueryParameterValueType" } },
|
|
474
|
-
},
|
|
475
|
-
"additionalProperties": { "dataType": "any" },
|
|
476
|
-
},
|
|
477
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
478
|
-
"Pick_MANIFEST_MODELS.v1.ComponentManifest.type_": {
|
|
458
|
+
"Pick_ComponentManifest.type_": {
|
|
479
459
|
"dataType": "refAlias",
|
|
480
460
|
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "type": { "dataType": "union", "subSchemas": [{ "dataType": "enum", "enums": ["edge"] }, { "dataType": "enum", "enums": ["server"] }] } }, "validators": {} },
|
|
481
461
|
},
|
|
482
462
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
483
463
|
"ComponentFunctionDefinitionResponse": {
|
|
484
464
|
"dataType": "refAlias",
|
|
485
|
-
"type": { "dataType": "intersection", "subSchemas": [{ "ref": "
|
|
465
|
+
"type": { "dataType": "intersection", "subSchemas": [{ "ref": "ComponentFunction" }, { "ref": "Pick_ComponentManifest.type_" }], "validators": {} },
|
|
486
466
|
},
|
|
487
467
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
488
|
-
"
|
|
468
|
+
"HealthyResponse": {
|
|
489
469
|
"dataType": "refAlias",
|
|
490
|
-
"type": { "
|
|
470
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "number-of-cpus": { "dataType": "double", "required": true }, "name": { "dataType": "string", "required": true }, "buildBranch": { "dataType": "string" }, "buildVersion": { "dataType": "string" }, "version": { "dataType": "string", "required": true }, "status": { "dataType": "enum", "enums": ["healthy"], "required": true } }, "additionalProperties": { "dataType": "any" }, "validators": {} },
|
|
491
471
|
},
|
|
492
472
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
493
|
-
"
|
|
473
|
+
"UnhealthyResponse": {
|
|
494
474
|
"dataType": "refAlias",
|
|
495
|
-
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "
|
|
475
|
+
"type": { "dataType": "nestedObjectLiteral", "nestedProperties": { "status": { "dataType": "enum", "enums": ["unhealthy"], "required": true } }, "validators": {} },
|
|
476
|
+
},
|
|
477
|
+
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
478
|
+
"HealthCheck": {
|
|
479
|
+
"dataType": "refAlias",
|
|
480
|
+
"type": { "dataType": "union", "subSchemas": [{ "ref": "HealthyResponse" }, { "ref": "UnhealthyResponse" }], "validators": {} },
|
|
496
481
|
},
|
|
497
482
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
498
483
|
};
|
|
499
|
-
const
|
|
484
|
+
const templateService = new runtime_1.ExpressTemplateService(models, { "noImplicitAdditionalProperties": "throw-on-extras", "bodyCoercion": true });
|
|
500
485
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
501
486
|
function RegisterRoutes(app) {
|
|
502
487
|
// ###########################################################################################################
|
|
503
488
|
// NOTE: If you do not see routes for all of your controllers in this file, then you might not have informed tsoa of where to look
|
|
504
489
|
// Please look into the "controllerPathGlobs" config option described in the readme: https://github.com/lukeautry/tsoa
|
|
505
490
|
// ###########################################################################################################
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
491
|
+
const argsStaticController_getPreview = {
|
|
492
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
493
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
494
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
495
|
+
staticFile: { "in": "path", "name": "staticFile", "required": true, "dataType": "string" },
|
|
496
|
+
req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
|
|
497
|
+
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
498
|
+
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
499
|
+
};
|
|
500
|
+
app.get('/s/:namespace/:componentName/:version/:staticFile*', ...((0, runtime_1.fetchMiddlewares)(StaticController_1.StaticController)), ...((0, runtime_1.fetchMiddlewares)(StaticController_1.StaticController.prototype.getPreview)), async function StaticController_getPreview(request, response, next) {
|
|
510
501
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
511
502
|
let validatedArgs = [];
|
|
512
503
|
try {
|
|
513
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
504
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsStaticController_getPreview, request, response });
|
|
514
505
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
515
|
-
const controller = await container.get(
|
|
506
|
+
const controller = await container.get(StaticController_1.StaticController);
|
|
516
507
|
if (typeof controller['setStatus'] === 'function') {
|
|
517
508
|
controller.setStatus(undefined);
|
|
518
509
|
}
|
|
519
|
-
|
|
520
|
-
|
|
510
|
+
await templateService.apiHandler({
|
|
511
|
+
methodName: 'getPreview',
|
|
512
|
+
controller,
|
|
513
|
+
response,
|
|
514
|
+
next,
|
|
515
|
+
validatedArgs,
|
|
516
|
+
successStatus: undefined,
|
|
517
|
+
});
|
|
521
518
|
}
|
|
522
519
|
catch (err) {
|
|
523
520
|
return next(err);
|
|
524
521
|
}
|
|
525
522
|
});
|
|
526
523
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
527
|
-
|
|
528
|
-
|
|
524
|
+
const argsRenderController_getDefaultFunctionRendering = {
|
|
525
|
+
expressRequest: { "in": "request", "name": "expressRequest", "required": true, "dataType": "object" },
|
|
526
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
527
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
528
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
529
|
+
componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
530
|
+
previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
531
|
+
contentItemId: { "in": "query", "name": "_contentItemId", "dataType": "string" },
|
|
532
|
+
previewBlockIndex: { "in": "query", "name": "_previewBlockIndex", "dataType": "string" },
|
|
533
|
+
input: { "in": "query", "name": "input", "dataType": "string" },
|
|
534
|
+
};
|
|
535
|
+
app.get('/r/:namespace/:componentName/:version', ...((0, runtime_1.fetchMiddlewares)(RenderController_1.RenderController)), ...((0, runtime_1.fetchMiddlewares)(RenderController_1.RenderController.prototype.getDefaultFunctionRendering)), async function RenderController_getDefaultFunctionRendering(request, response, next) {
|
|
529
536
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
530
537
|
let validatedArgs = [];
|
|
531
538
|
try {
|
|
532
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
539
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsRenderController_getDefaultFunctionRendering, request, response });
|
|
533
540
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
534
|
-
const controller = await container.get(
|
|
541
|
+
const controller = await container.get(RenderController_1.RenderController);
|
|
535
542
|
if (typeof controller['setStatus'] === 'function') {
|
|
536
543
|
controller.setStatus(undefined);
|
|
537
544
|
}
|
|
538
|
-
|
|
539
|
-
|
|
545
|
+
await templateService.apiHandler({
|
|
546
|
+
methodName: 'getDefaultFunctionRendering',
|
|
547
|
+
controller,
|
|
548
|
+
response,
|
|
549
|
+
next,
|
|
550
|
+
validatedArgs,
|
|
551
|
+
successStatus: undefined,
|
|
552
|
+
});
|
|
540
553
|
}
|
|
541
554
|
catch (err) {
|
|
542
555
|
return next(err);
|
|
543
556
|
}
|
|
544
557
|
});
|
|
545
558
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
}
|
|
559
|
+
const argsRenderController_getGivenFunctionRendering = {
|
|
560
|
+
expressRequest: { "in": "request", "name": "expressRequest", "required": true, "dataType": "object" },
|
|
561
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
562
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
563
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
564
|
+
functionName: { "in": "path", "name": "functionName", "required": true, "dataType": "string" },
|
|
565
|
+
componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
566
|
+
previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
567
|
+
contentItemId: { "in": "query", "name": "_contentItemId", "dataType": "string" },
|
|
568
|
+
previewBlockIndex: { "in": "query", "name": "_previewBlockIndex", "dataType": "string" },
|
|
569
|
+
input: { "in": "query", "name": "input", "dataType": "string" },
|
|
570
|
+
};
|
|
571
|
+
app.get('/r/:namespace/:componentName/:version/:functionName', ...((0, runtime_1.fetchMiddlewares)(RenderController_1.RenderController)), ...((0, runtime_1.fetchMiddlewares)(RenderController_1.RenderController.prototype.getGivenFunctionRendering)), async function RenderController_getGivenFunctionRendering(request, response, next) {
|
|
550
572
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
551
573
|
let validatedArgs = [];
|
|
552
574
|
try {
|
|
553
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
575
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsRenderController_getGivenFunctionRendering, request, response });
|
|
554
576
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
555
|
-
const controller = await container.get(
|
|
577
|
+
const controller = await container.get(RenderController_1.RenderController);
|
|
556
578
|
if (typeof controller['setStatus'] === 'function') {
|
|
557
579
|
controller.setStatus(undefined);
|
|
558
580
|
}
|
|
559
|
-
|
|
560
|
-
|
|
581
|
+
await templateService.apiHandler({
|
|
582
|
+
methodName: 'getGivenFunctionRendering',
|
|
583
|
+
controller,
|
|
584
|
+
response,
|
|
585
|
+
next,
|
|
586
|
+
validatedArgs,
|
|
587
|
+
successStatus: undefined,
|
|
588
|
+
});
|
|
561
589
|
}
|
|
562
590
|
catch (err) {
|
|
563
591
|
return next(err);
|
|
564
592
|
}
|
|
565
593
|
});
|
|
566
594
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
570
|
-
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
571
|
-
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
572
|
-
request: { "in": "request", "name": "request", "required": true, "dataType": "object" },
|
|
573
|
-
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
574
|
-
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
575
|
-
};
|
|
595
|
+
const argsDevelopmentController_getComponents = {};
|
|
596
|
+
app.get('/dev/all', ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController)), ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController.prototype.getComponents)), async function DevelopmentController_getComponents(request, response, next) {
|
|
576
597
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
577
598
|
let validatedArgs = [];
|
|
578
599
|
try {
|
|
579
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
600
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsDevelopmentController_getComponents, request, response });
|
|
580
601
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
581
|
-
const controller = await container.get(
|
|
602
|
+
const controller = await container.get(DevelopmentController_1.DevelopmentController);
|
|
582
603
|
if (typeof controller['setStatus'] === 'function') {
|
|
583
604
|
controller.setStatus(undefined);
|
|
584
605
|
}
|
|
585
|
-
|
|
586
|
-
|
|
606
|
+
await templateService.apiHandler({
|
|
607
|
+
methodName: 'getComponents',
|
|
608
|
+
controller,
|
|
609
|
+
response,
|
|
610
|
+
next,
|
|
611
|
+
validatedArgs,
|
|
612
|
+
successStatus: undefined,
|
|
613
|
+
});
|
|
587
614
|
}
|
|
588
615
|
catch (err) {
|
|
589
616
|
return next(err);
|
|
590
617
|
}
|
|
591
618
|
});
|
|
592
619
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
600
|
-
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
601
|
-
};
|
|
620
|
+
const argsDevelopmentController_Manifest = {
|
|
621
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
622
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
623
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
624
|
+
};
|
|
625
|
+
app.get('/dev/manifest/:namespace/:componentName/:version', ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController)), ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController.prototype.Manifest)), async function DevelopmentController_Manifest(request, response, next) {
|
|
602
626
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
603
627
|
let validatedArgs = [];
|
|
604
628
|
try {
|
|
605
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
629
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsDevelopmentController_Manifest, request, response });
|
|
606
630
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
607
|
-
const controller = await container.get(
|
|
631
|
+
const controller = await container.get(DevelopmentController_1.DevelopmentController);
|
|
608
632
|
if (typeof controller['setStatus'] === 'function') {
|
|
609
633
|
controller.setStatus(undefined);
|
|
610
634
|
}
|
|
611
|
-
|
|
612
|
-
|
|
635
|
+
await templateService.apiHandler({
|
|
636
|
+
methodName: 'Manifest',
|
|
637
|
+
controller,
|
|
638
|
+
response,
|
|
639
|
+
next,
|
|
640
|
+
validatedArgs,
|
|
641
|
+
successStatus: undefined,
|
|
642
|
+
});
|
|
613
643
|
}
|
|
614
644
|
catch (err) {
|
|
615
645
|
return next(err);
|
|
616
646
|
}
|
|
617
647
|
});
|
|
618
648
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
request: { "in": "request", "name": "request", "required": true, "dataType": "object" },
|
|
626
|
-
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
627
|
-
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
628
|
-
};
|
|
649
|
+
const argsDevelopmentController_getContentSchema = {
|
|
650
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
651
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
652
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
653
|
+
};
|
|
654
|
+
app.get('/dev/schemas/:namespace/:componentName/:version', ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController)), ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController.prototype.getContentSchema)), async function DevelopmentController_getContentSchema(request, response, next) {
|
|
629
655
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
630
656
|
let validatedArgs = [];
|
|
631
657
|
try {
|
|
632
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
658
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsDevelopmentController_getContentSchema, request, response });
|
|
633
659
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
634
|
-
const controller = await container.get(
|
|
660
|
+
const controller = await container.get(DevelopmentController_1.DevelopmentController);
|
|
635
661
|
if (typeof controller['setStatus'] === 'function') {
|
|
636
662
|
controller.setStatus(undefined);
|
|
637
663
|
}
|
|
638
|
-
|
|
639
|
-
|
|
664
|
+
await templateService.apiHandler({
|
|
665
|
+
methodName: 'getContentSchema',
|
|
666
|
+
controller,
|
|
667
|
+
response,
|
|
668
|
+
next,
|
|
669
|
+
validatedArgs,
|
|
670
|
+
successStatus: undefined,
|
|
671
|
+
});
|
|
640
672
|
}
|
|
641
673
|
catch (err) {
|
|
642
674
|
return next(err);
|
|
643
675
|
}
|
|
644
676
|
});
|
|
645
677
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
646
|
-
|
|
647
|
-
|
|
678
|
+
const argsDevelopmentController_TemporaryPreview = {
|
|
679
|
+
req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
|
|
680
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
681
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
682
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
683
|
+
functionName: { "in": "path", "name": "functionName", "required": true, "dataType": "string" },
|
|
684
|
+
headers: { "in": "query", "name": "headers", "dataType": "any" },
|
|
685
|
+
envVars: { "in": "query", "name": "envVars", "dataType": "any" },
|
|
686
|
+
data: { "in": "query", "name": "data", "dataType": "any" },
|
|
687
|
+
};
|
|
688
|
+
app.get('/dev/temp-preview/:namespace/:componentName/:version/:functionName', ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController)), ...((0, runtime_1.fetchMiddlewares)(DevelopmentController_1.DevelopmentController.prototype.TemporaryPreview)), async function DevelopmentController_TemporaryPreview(request, response, next) {
|
|
648
689
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
649
690
|
let validatedArgs = [];
|
|
650
691
|
try {
|
|
651
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
692
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsDevelopmentController_TemporaryPreview, request, response });
|
|
652
693
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
653
694
|
const controller = await container.get(DevelopmentController_1.DevelopmentController);
|
|
654
695
|
if (typeof controller['setStatus'] === 'function') {
|
|
655
696
|
controller.setStatus(undefined);
|
|
656
697
|
}
|
|
657
|
-
|
|
658
|
-
|
|
698
|
+
await templateService.apiHandler({
|
|
699
|
+
methodName: 'TemporaryPreview',
|
|
700
|
+
controller,
|
|
701
|
+
response,
|
|
702
|
+
next,
|
|
703
|
+
validatedArgs,
|
|
704
|
+
successStatus: undefined,
|
|
705
|
+
});
|
|
659
706
|
}
|
|
660
707
|
catch (err) {
|
|
661
708
|
return next(err);
|
|
662
709
|
}
|
|
663
710
|
});
|
|
664
711
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
}
|
|
712
|
+
const argsDefinitionController_getComponentVersionManifest = {
|
|
713
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
714
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
715
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
716
|
+
request: { "in": "request", "name": "request", "required": true, "dataType": "object" },
|
|
717
|
+
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
718
|
+
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
719
|
+
};
|
|
720
|
+
app.get('/d/:namespace/:componentName/:version/manifest.json', ...((0, runtime_1.fetchMiddlewares)(DefinitionController_1.DefinitionController)), ...((0, runtime_1.fetchMiddlewares)(DefinitionController_1.DefinitionController.prototype.getComponentVersionManifest)), async function DefinitionController_getComponentVersionManifest(request, response, next) {
|
|
671
721
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
672
722
|
let validatedArgs = [];
|
|
673
723
|
try {
|
|
674
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
724
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsDefinitionController_getComponentVersionManifest, request, response });
|
|
675
725
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
676
|
-
const controller = await container.get(
|
|
726
|
+
const controller = await container.get(DefinitionController_1.DefinitionController);
|
|
677
727
|
if (typeof controller['setStatus'] === 'function') {
|
|
678
728
|
controller.setStatus(undefined);
|
|
679
729
|
}
|
|
680
|
-
|
|
681
|
-
|
|
730
|
+
await templateService.apiHandler({
|
|
731
|
+
methodName: 'getComponentVersionManifest',
|
|
732
|
+
controller,
|
|
733
|
+
response,
|
|
734
|
+
next,
|
|
735
|
+
validatedArgs,
|
|
736
|
+
successStatus: undefined,
|
|
737
|
+
});
|
|
682
738
|
}
|
|
683
739
|
catch (err) {
|
|
684
740
|
return next(err);
|
|
685
741
|
}
|
|
686
742
|
});
|
|
687
743
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
}
|
|
744
|
+
const argsDefinitionController_getDefaultFunctionDefinition = {
|
|
745
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
746
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
747
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
748
|
+
request: { "in": "request", "name": "request", "required": true, "dataType": "object" },
|
|
749
|
+
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
750
|
+
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
751
|
+
};
|
|
752
|
+
app.get('/d/:namespace/:componentName/:version', ...((0, runtime_1.fetchMiddlewares)(DefinitionController_1.DefinitionController)), ...((0, runtime_1.fetchMiddlewares)(DefinitionController_1.DefinitionController.prototype.getDefaultFunctionDefinition)), async function DefinitionController_getDefaultFunctionDefinition(request, response, next) {
|
|
694
753
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
695
754
|
let validatedArgs = [];
|
|
696
755
|
try {
|
|
697
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
756
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsDefinitionController_getDefaultFunctionDefinition, request, response });
|
|
698
757
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
699
|
-
const controller = await container.get(
|
|
758
|
+
const controller = await container.get(DefinitionController_1.DefinitionController);
|
|
700
759
|
if (typeof controller['setStatus'] === 'function') {
|
|
701
760
|
controller.setStatus(undefined);
|
|
702
761
|
}
|
|
703
|
-
|
|
704
|
-
|
|
762
|
+
await templateService.apiHandler({
|
|
763
|
+
methodName: 'getDefaultFunctionDefinition',
|
|
764
|
+
controller,
|
|
765
|
+
response,
|
|
766
|
+
next,
|
|
767
|
+
validatedArgs,
|
|
768
|
+
successStatus: undefined,
|
|
769
|
+
});
|
|
705
770
|
}
|
|
706
771
|
catch (err) {
|
|
707
772
|
return next(err);
|
|
708
773
|
}
|
|
709
774
|
});
|
|
710
775
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
};
|
|
776
|
+
const argsDefinitionController_getGivenFunctionDefinition = {
|
|
777
|
+
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
778
|
+
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
779
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
780
|
+
functionName: { "in": "path", "name": "functionName", "required": true, "dataType": "string" },
|
|
781
|
+
request: { "in": "request", "name": "request", "required": true, "dataType": "object" },
|
|
782
|
+
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
783
|
+
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
784
|
+
};
|
|
785
|
+
app.get('/d/:namespace/:componentName/:version/:functionName', ...((0, runtime_1.fetchMiddlewares)(DefinitionController_1.DefinitionController)), ...((0, runtime_1.fetchMiddlewares)(DefinitionController_1.DefinitionController.prototype.getGivenFunctionDefinition)), async function DefinitionController_getGivenFunctionDefinition(request, response, next) {
|
|
722
786
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
723
787
|
let validatedArgs = [];
|
|
724
788
|
try {
|
|
725
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
789
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsDefinitionController_getGivenFunctionDefinition, request, response });
|
|
726
790
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
727
|
-
const controller = await container.get(
|
|
791
|
+
const controller = await container.get(DefinitionController_1.DefinitionController);
|
|
728
792
|
if (typeof controller['setStatus'] === 'function') {
|
|
729
793
|
controller.setStatus(undefined);
|
|
730
794
|
}
|
|
731
|
-
|
|
732
|
-
|
|
795
|
+
await templateService.apiHandler({
|
|
796
|
+
methodName: 'getGivenFunctionDefinition',
|
|
797
|
+
controller,
|
|
798
|
+
response,
|
|
799
|
+
next,
|
|
800
|
+
validatedArgs,
|
|
801
|
+
successStatus: undefined,
|
|
802
|
+
});
|
|
733
803
|
}
|
|
734
804
|
catch (err) {
|
|
735
805
|
return next(err);
|
|
736
806
|
}
|
|
737
807
|
});
|
|
738
808
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
744
|
-
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
745
|
-
componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
746
|
-
previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
747
|
-
contentItemId: { "in": "query", "name": "_contentItemId", "dataType": "string" },
|
|
748
|
-
previewBlockIndex: { "in": "query", "name": "_previewBlockIndex", "dataType": "string" },
|
|
749
|
-
input: { "in": "query", "name": "input", "dataType": "string" },
|
|
750
|
-
};
|
|
809
|
+
const argsCoreController_getSchemaVersion = {
|
|
810
|
+
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
811
|
+
};
|
|
812
|
+
app.get('/schemas/:version.json', ...((0, runtime_1.fetchMiddlewares)(CoreController_1.CoreController)), ...((0, runtime_1.fetchMiddlewares)(CoreController_1.CoreController.prototype.getSchemaVersion)), async function CoreController_getSchemaVersion(request, response, next) {
|
|
751
813
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
752
814
|
let validatedArgs = [];
|
|
753
815
|
try {
|
|
754
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
816
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsCoreController_getSchemaVersion, request, response });
|
|
755
817
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
756
|
-
const controller = await container.get(
|
|
818
|
+
const controller = await container.get(CoreController_1.CoreController);
|
|
757
819
|
if (typeof controller['setStatus'] === 'function') {
|
|
758
820
|
controller.setStatus(undefined);
|
|
759
821
|
}
|
|
760
|
-
|
|
761
|
-
|
|
822
|
+
await templateService.apiHandler({
|
|
823
|
+
methodName: 'getSchemaVersion',
|
|
824
|
+
controller,
|
|
825
|
+
response,
|
|
826
|
+
next,
|
|
827
|
+
validatedArgs,
|
|
828
|
+
successStatus: undefined,
|
|
829
|
+
});
|
|
762
830
|
}
|
|
763
831
|
catch (err) {
|
|
764
832
|
return next(err);
|
|
765
833
|
}
|
|
766
834
|
});
|
|
767
835
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
expressRequest: { "in": "request", "name": "expressRequest", "required": true, "dataType": "object" },
|
|
771
|
-
namespace: { "in": "path", "name": "namespace", "required": true, "dataType": "string" },
|
|
772
|
-
componentName: { "in": "path", "name": "componentName", "required": true, "dataType": "string" },
|
|
773
|
-
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
774
|
-
functionName: { "in": "path", "name": "functionName", "required": true, "dataType": "string" },
|
|
775
|
-
componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
776
|
-
previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
777
|
-
contentItemId: { "in": "query", "name": "_contentItemId", "dataType": "string" },
|
|
778
|
-
previewBlockIndex: { "in": "query", "name": "_previewBlockIndex", "dataType": "string" },
|
|
779
|
-
input: { "in": "query", "name": "input", "dataType": "string" },
|
|
780
|
-
};
|
|
836
|
+
const argsCoreController_getHealthInfo = {};
|
|
837
|
+
app.get('/health', ...((0, runtime_1.fetchMiddlewares)(CoreController_1.CoreController)), ...((0, runtime_1.fetchMiddlewares)(CoreController_1.CoreController.prototype.getHealthInfo)), async function CoreController_getHealthInfo(request, response, next) {
|
|
781
838
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
782
839
|
let validatedArgs = [];
|
|
783
840
|
try {
|
|
784
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
841
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsCoreController_getHealthInfo, request, response });
|
|
785
842
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
786
|
-
const controller = await container.get(
|
|
843
|
+
const controller = await container.get(CoreController_1.CoreController);
|
|
787
844
|
if (typeof controller['setStatus'] === 'function') {
|
|
788
845
|
controller.setStatus(undefined);
|
|
789
846
|
}
|
|
790
|
-
|
|
791
|
-
|
|
847
|
+
await templateService.apiHandler({
|
|
848
|
+
methodName: 'getHealthInfo',
|
|
849
|
+
controller,
|
|
850
|
+
response,
|
|
851
|
+
next,
|
|
852
|
+
validatedArgs,
|
|
853
|
+
successStatus: undefined,
|
|
854
|
+
});
|
|
792
855
|
}
|
|
793
856
|
catch (err) {
|
|
794
857
|
return next(err);
|
|
795
858
|
}
|
|
796
859
|
});
|
|
797
860
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
version: { "in": "path", "name": "version", "required": true, "dataType": "string" },
|
|
803
|
-
staticFile: { "in": "path", "name": "staticFile", "required": true, "dataType": "string" },
|
|
804
|
-
req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
|
|
805
|
-
_componentSet: { "in": "query", "name": "_componentSet", "dataType": "string" },
|
|
806
|
-
_previewKey: { "in": "query", "name": "_previewKey", "dataType": "string" },
|
|
807
|
-
};
|
|
861
|
+
const argsCoreController_getComponents = {
|
|
862
|
+
req: { "in": "request", "name": "req", "required": true, "dataType": "object" },
|
|
863
|
+
};
|
|
864
|
+
app.get('/', ...((0, runtime_1.fetchMiddlewares)(CoreController_1.CoreController)), ...((0, runtime_1.fetchMiddlewares)(CoreController_1.CoreController.prototype.getComponents)), async function CoreController_getComponents(request, response, next) {
|
|
808
865
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
809
866
|
let validatedArgs = [];
|
|
810
867
|
try {
|
|
811
|
-
validatedArgs = getValidatedArgs(args, request, response);
|
|
868
|
+
validatedArgs = templateService.getValidatedArgs({ args: argsCoreController_getComponents, request, response });
|
|
812
869
|
const container = typeof ioc_1.iocContainer === 'function' ? ioc_1.iocContainer(request) : ioc_1.iocContainer;
|
|
813
|
-
const controller = await container.get(
|
|
870
|
+
const controller = await container.get(CoreController_1.CoreController);
|
|
814
871
|
if (typeof controller['setStatus'] === 'function') {
|
|
815
872
|
controller.setStatus(undefined);
|
|
816
873
|
}
|
|
817
|
-
|
|
818
|
-
|
|
874
|
+
await templateService.apiHandler({
|
|
875
|
+
methodName: 'getComponents',
|
|
876
|
+
controller,
|
|
877
|
+
response,
|
|
878
|
+
next,
|
|
879
|
+
validatedArgs,
|
|
880
|
+
successStatus: undefined,
|
|
881
|
+
});
|
|
819
882
|
}
|
|
820
883
|
catch (err) {
|
|
821
884
|
return next(err);
|
|
@@ -824,89 +887,6 @@ function RegisterRoutes(app) {
|
|
|
824
887
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
825
888
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
826
889
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
827
|
-
function isController(object) {
|
|
828
|
-
return 'getHeaders' in object && 'getStatus' in object && 'setStatus' in object;
|
|
829
|
-
}
|
|
830
|
-
function promiseHandler(controllerObj, promise, response, successStatus, next) {
|
|
831
|
-
return Promise.resolve(promise)
|
|
832
|
-
.then((data) => {
|
|
833
|
-
let statusCode = successStatus;
|
|
834
|
-
let headers;
|
|
835
|
-
if (isController(controllerObj)) {
|
|
836
|
-
headers = controllerObj.getHeaders();
|
|
837
|
-
statusCode = controllerObj.getStatus() || statusCode;
|
|
838
|
-
}
|
|
839
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
840
|
-
returnHandler(response, statusCode, data, headers);
|
|
841
|
-
})
|
|
842
|
-
.catch((error) => next(error));
|
|
843
|
-
}
|
|
844
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
845
|
-
function returnHandler(response, statusCode, data, headers = {}) {
|
|
846
|
-
if (response.headersSent) {
|
|
847
|
-
return;
|
|
848
|
-
}
|
|
849
|
-
Object.keys(headers).forEach((name) => {
|
|
850
|
-
response.set(name, headers[name]);
|
|
851
|
-
});
|
|
852
|
-
if (data && typeof data.pipe === 'function' && data.readable && typeof data._read === 'function') {
|
|
853
|
-
response.status(statusCode || 200);
|
|
854
|
-
data.pipe(response);
|
|
855
|
-
}
|
|
856
|
-
else if (data !== null && data !== undefined) {
|
|
857
|
-
response.status(statusCode || 200).json(data);
|
|
858
|
-
}
|
|
859
|
-
else {
|
|
860
|
-
response.status(statusCode || 204).end();
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
864
|
-
function responder(response) {
|
|
865
|
-
return function (status, data, headers) {
|
|
866
|
-
returnHandler(response, status, data, headers);
|
|
867
|
-
};
|
|
868
|
-
}
|
|
869
|
-
;
|
|
870
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
871
|
-
function getValidatedArgs(args, request, response) {
|
|
872
|
-
const fieldErrors = {};
|
|
873
|
-
const values = Object.keys(args).map((key) => {
|
|
874
|
-
const name = args[key].name;
|
|
875
|
-
switch (args[key].in) {
|
|
876
|
-
case 'request':
|
|
877
|
-
return request;
|
|
878
|
-
case 'query':
|
|
879
|
-
return validationService.ValidateParam(args[key], request.query[name], name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
880
|
-
case 'queries':
|
|
881
|
-
return validationService.ValidateParam(args[key], request.query, name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
882
|
-
case 'path':
|
|
883
|
-
return validationService.ValidateParam(args[key], request.params[name], name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
884
|
-
case 'header':
|
|
885
|
-
return validationService.ValidateParam(args[key], request.header(name), name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
886
|
-
case 'body':
|
|
887
|
-
return validationService.ValidateParam(args[key], request.body, name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
888
|
-
case 'body-prop':
|
|
889
|
-
return validationService.ValidateParam(args[key], request.body[name], name, fieldErrors, 'body.', { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
890
|
-
case 'formData':
|
|
891
|
-
if (args[key].dataType === 'file') {
|
|
892
|
-
return validationService.ValidateParam(args[key], request.file, name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
893
|
-
}
|
|
894
|
-
else if (args[key].dataType === 'array' && args[key].array.dataType === 'file') {
|
|
895
|
-
return validationService.ValidateParam(args[key], request.files, name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
896
|
-
}
|
|
897
|
-
else {
|
|
898
|
-
return validationService.ValidateParam(args[key], request.body[name], name, fieldErrors, undefined, { "noImplicitAdditionalProperties": "throw-on-extras" });
|
|
899
|
-
}
|
|
900
|
-
case 'res':
|
|
901
|
-
return responder(response);
|
|
902
|
-
}
|
|
903
|
-
});
|
|
904
|
-
if (Object.keys(fieldErrors).length > 0) {
|
|
905
|
-
throw new runtime_1.ValidateError(fieldErrors, '');
|
|
906
|
-
}
|
|
907
|
-
return values;
|
|
908
|
-
}
|
|
909
|
-
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
910
890
|
}
|
|
911
891
|
// WARNING: This file was auto-generated with tsoa. Please do not modify it. Re-run tsoa to re-generate this file: https://github.com/lukeautry/tsoa
|
|
912
892
|
//# sourceMappingURL=routes.js.map
|