@pxp-nd/core 1.2.72 → 1.2.75
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/README.md +1 -1
- package/dist/PxpApp.d.ts +54 -54
- package/dist/PxpApp.js +283 -305
- package/dist/ScriptManager.d.ts +1 -1
- package/dist/ScriptManager.js +130 -130
- package/dist/database/script.d.ts +16 -16
- package/dist/database/script.js +143 -143
- package/dist/db.datasource.d.ts +2 -2
- package/dist/db.datasource.js +86 -86
- package/dist/entities/Log.d.ts +32 -32
- package/dist/entities/Log.js +95 -95
- package/dist/entities/ScriptVersion.d.ts +19 -19
- package/dist/entities/ScriptVersion.js +43 -43
- package/dist/index.d.ts +11 -11
- package/dist/index.js +28 -28
- package/dist/interfaces.d.ts +49 -49
- package/dist/interfaces.js +3 -3
- package/dist/lib/pxp/Controller.d.ts +51 -51
- package/dist/lib/pxp/Controller.js +377 -377
- package/dist/lib/pxp/ControllerInterface.d.ts +18 -18
- package/dist/lib/pxp/ControllerInterface.js +2 -2
- package/dist/lib/pxp/Decorators.d.ts +23 -23
- package/dist/lib/pxp/Decorators.js +123 -123
- package/dist/lib/pxp/ListParamInterface.d.ts +23 -23
- package/dist/lib/pxp/ListParamInterface.js +2 -2
- package/dist/lib/pxp/PxpError.d.ts +24 -24
- package/dist/lib/pxp/PxpError.js +57 -57
- package/dist/lib/pxp/RouteDefinition.d.ts +26 -26
- package/dist/lib/pxp/RouteDefinition.js +26 -26
- package/dist/lib/pxp/index.d.ts +20 -20
- package/dist/lib/pxp/index.js +33 -33
- package/dist/lib/pxp/loadControllers.d.ts +4 -4
- package/dist/lib/pxp/loadControllers.js +89 -89
- package/dist/lib/pxp/middlewares/ParseParams.d.ts +4 -4
- package/dist/lib/pxp/middlewares/ParseParams.js +71 -71
- package/dist/lib/pxp/middlewares/isReportMiddleware.d.ts +2 -2
- package/dist/lib/pxp/middlewares/isReportMiddleware.js +13 -13
- package/dist/lib/pxp/utils/Security.d.ts +23 -23
- package/dist/lib/pxp/utils/Security.js +79 -77
- package/dist/lib/pxp/utils/crypto.d.ts +3 -3
- package/dist/lib/pxp/utils/crypto.js +15 -15
- package/dist/lib/reports/fonts/Roboto-Regular-normal.d.ts +2 -2
- package/dist/lib/reports/fonts/Roboto-Regular-normal.js +4 -4
- package/dist/lib/reports/generated.d.ts +4 -4
- package/dist/lib/reports/generated.js +200 -200
- package/dist/lib/reports/helper.d.ts +8 -8
- package/dist/lib/reports/helper.js +49 -49
- package/dist/lib/reports/pdf.d.ts +3 -3
- package/dist/lib/reports/pdf.js +119 -119
- package/dist/lib/reports/report-routes.d.ts +3 -3
- package/dist/lib/reports/report-routes.js +24 -24
- package/dist/lib/reports/xlsx.d.ts +1 -1
- package/dist/lib/reports/xlsx.js +65 -65
- package/dist/sockets/basic-sockets.d.ts +5 -5
- package/dist/sockets/basic-sockets.js +38 -38
- package/dist/sockets/entities/UserIo.d.ts +6 -6
- package/dist/sockets/entities/UserIo.js +30 -30
- package/dist/sockets/entities/index.d.ts +5 -5
- package/dist/sockets/entities/index.js +9 -9
- package/dist/sockets/index.d.ts +2 -2
- package/dist/sockets/index.js +19 -19
- package/dist/sockets/pxp-io-server.d.ts +6 -6
- package/dist/sockets/pxp-io-server.js +50 -50
- package/dist/swaggerOptions.d.ts +16 -16
- package/dist/swaggerOptions.js +20 -20
- package/package.json +65 -65
- package/yalc.lock +9 -9
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
declare interface IAuthields {
|
|
3
|
-
usernameField: string;
|
|
4
|
-
passwordField: string;
|
|
5
|
-
}
|
|
6
|
-
declare interface IAuthLocal {
|
|
7
|
-
verifyUser: any;
|
|
8
|
-
fields: IAuthields;
|
|
9
|
-
}
|
|
10
|
-
declare interface ISerialize {
|
|
11
|
-
(userPayload: any, done: any): any;
|
|
12
|
-
}
|
|
13
|
-
declare interface IDeserialize {
|
|
14
|
-
(userPayload: any, done: any): any;
|
|
15
|
-
}
|
|
16
|
-
declare interface IAuthPxp {
|
|
17
|
-
serialize: ISerialize;
|
|
18
|
-
deserialize: IDeserialize;
|
|
19
|
-
local?: boolean | IAuthLocal;
|
|
20
|
-
jwt?: boolean | any;
|
|
21
|
-
}
|
|
22
|
-
declare interface IModule {
|
|
23
|
-
entities?: any;
|
|
24
|
-
controllers?: any[];
|
|
25
|
-
}
|
|
26
|
-
declare interface IModules {
|
|
27
|
-
[name: string]: IModule;
|
|
28
|
-
}
|
|
29
|
-
declare interface IConfigExpress {
|
|
30
|
-
[name: string]: any;
|
|
31
|
-
}
|
|
32
|
-
export interface IConfigPxpApp {
|
|
33
|
-
defaultDbSettings?: string;
|
|
34
|
-
apiPrefix?: string;
|
|
35
|
-
logDuration?: boolean;
|
|
36
|
-
showRoutes?: boolean;
|
|
37
|
-
controllers?: any[];
|
|
38
|
-
entities?: any;
|
|
39
|
-
auth?: boolean | IAuthPxp;
|
|
40
|
-
reports?: boolean;
|
|
41
|
-
session?: any | BaseEntity;
|
|
42
|
-
middlewares?: any[];
|
|
43
|
-
scripts?: any[];
|
|
44
|
-
modules?: IModules;
|
|
45
|
-
enableSocket?: boolean;
|
|
46
|
-
expressJsonConfig?: IConfigExpress;
|
|
47
|
-
expressUrlEncodedConfig?: IConfigExpress;
|
|
48
|
-
}
|
|
49
|
-
export {};
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
declare interface IAuthields {
|
|
3
|
+
usernameField: string;
|
|
4
|
+
passwordField: string;
|
|
5
|
+
}
|
|
6
|
+
declare interface IAuthLocal {
|
|
7
|
+
verifyUser: any;
|
|
8
|
+
fields: IAuthields;
|
|
9
|
+
}
|
|
10
|
+
declare interface ISerialize {
|
|
11
|
+
(userPayload: any, done: any): any;
|
|
12
|
+
}
|
|
13
|
+
declare interface IDeserialize {
|
|
14
|
+
(userPayload: any, done: any): any;
|
|
15
|
+
}
|
|
16
|
+
declare interface IAuthPxp {
|
|
17
|
+
serialize: ISerialize;
|
|
18
|
+
deserialize: IDeserialize;
|
|
19
|
+
local?: boolean | IAuthLocal;
|
|
20
|
+
jwt?: boolean | any;
|
|
21
|
+
}
|
|
22
|
+
declare interface IModule {
|
|
23
|
+
entities?: any;
|
|
24
|
+
controllers?: any[];
|
|
25
|
+
}
|
|
26
|
+
declare interface IModules {
|
|
27
|
+
[name: string]: IModule;
|
|
28
|
+
}
|
|
29
|
+
declare interface IConfigExpress {
|
|
30
|
+
[name: string]: any;
|
|
31
|
+
}
|
|
32
|
+
export interface IConfigPxpApp {
|
|
33
|
+
defaultDbSettings?: string;
|
|
34
|
+
apiPrefix?: string;
|
|
35
|
+
logDuration?: boolean;
|
|
36
|
+
showRoutes?: boolean;
|
|
37
|
+
controllers?: any[];
|
|
38
|
+
entities?: any;
|
|
39
|
+
auth?: boolean | IAuthPxp;
|
|
40
|
+
reports?: boolean;
|
|
41
|
+
session?: any | BaseEntity;
|
|
42
|
+
middlewares?: any[];
|
|
43
|
+
scripts?: any[];
|
|
44
|
+
modules?: IModules;
|
|
45
|
+
enableSocket?: boolean;
|
|
46
|
+
expressJsonConfig?: IConfigExpress;
|
|
47
|
+
expressUrlEncodedConfig?: IConfigExpress;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
package/dist/interfaces.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
;
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Kplian Ltda 2020
|
|
3
|
-
*
|
|
4
|
-
* MIT
|
|
5
|
-
*
|
|
6
|
-
* Controller Class.
|
|
7
|
-
*
|
|
8
|
-
* @summary All common controllers functionality go here (all controllers should inherit this class).
|
|
9
|
-
* @author Jaime Rivera
|
|
10
|
-
*
|
|
11
|
-
* Created at : 2020-06-13 18:09:48
|
|
12
|
-
* Last modified : 2020-10-13 15:36:31
|
|
13
|
-
* Last modified : 2021-03-10 15:36:31 - Favio Figueroa
|
|
14
|
-
* Last modified : 2021-05-01 18:35:31 - Favio Figueroa
|
|
15
|
-
*/
|
|
16
|
-
import { EntityManager } from 'typeorm';
|
|
17
|
-
import { Request, Response, NextFunction } from 'express';
|
|
18
|
-
import { Schema } from 'joi';
|
|
19
|
-
import socketIO from 'socket.io';
|
|
20
|
-
import { ControllerInterface, ListParam } from './index';
|
|
21
|
-
import { IConfigPxpApp } from '../../interfaces';
|
|
22
|
-
export declare class Controller implements ControllerInterface {
|
|
23
|
-
validated: boolean;
|
|
24
|
-
params: Record<string, unknown>[];
|
|
25
|
-
pxpParams: any;
|
|
26
|
-
router: import("express-serve-static-core").Router;
|
|
27
|
-
path: string;
|
|
28
|
-
module: string;
|
|
29
|
-
modelString: string;
|
|
30
|
-
transactionCode: string;
|
|
31
|
-
user: any;
|
|
32
|
-
model: any;
|
|
33
|
-
protected io: socketIO.Server;
|
|
34
|
-
config: IConfigPxpApp;
|
|
35
|
-
private basicRoutes;
|
|
36
|
-
private basicReadOnly;
|
|
37
|
-
constructor(module: string, Entity?: any, config?: IConfigPxpApp, io?: any);
|
|
38
|
-
private initializeRoutes;
|
|
39
|
-
genericMethodWrapper(params: Record<string, unknown>, req: Request, next: NextFunction, res: Response, methodName: string, dbsettings: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
40
|
-
ormMethodWrapper(params: Record<string, unknown>, req: Request | any, next: NextFunction, res: Response, methodName: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
41
|
-
list(params: Record<string, unknown>): Promise<unknown>;
|
|
42
|
-
add(params: Record<string, unknown>, manager: EntityManager): Promise<unknown>;
|
|
43
|
-
edit(params: Record<string, unknown>, manager: EntityManager): Promise<unknown>;
|
|
44
|
-
delete(params: Record<string, unknown>, manager: EntityManager): Promise<unknown>;
|
|
45
|
-
getListParams(params: Record<string, unknown>, where: Record<string, unknown>): ListParam;
|
|
46
|
-
procedureMethodWrapper(params: Record<string, unknown>, next: NextFunction, res: Response, methodName: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
47
|
-
sqlMethodWrapper(params: Record<string, unknown>, next: NextFunction, res: Response, methodName: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
48
|
-
classValidate(model: any): Promise<void>;
|
|
49
|
-
schemaValidate(schema: Schema, params: Record<string, unknown>): Promise<unknown>;
|
|
50
|
-
getListSchema(ownColumns: Record<string, unknown>): Schema;
|
|
51
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Kplian Ltda 2020
|
|
3
|
+
*
|
|
4
|
+
* MIT
|
|
5
|
+
*
|
|
6
|
+
* Controller Class.
|
|
7
|
+
*
|
|
8
|
+
* @summary All common controllers functionality go here (all controllers should inherit this class).
|
|
9
|
+
* @author Jaime Rivera
|
|
10
|
+
*
|
|
11
|
+
* Created at : 2020-06-13 18:09:48
|
|
12
|
+
* Last modified : 2020-10-13 15:36:31
|
|
13
|
+
* Last modified : 2021-03-10 15:36:31 - Favio Figueroa
|
|
14
|
+
* Last modified : 2021-05-01 18:35:31 - Favio Figueroa
|
|
15
|
+
*/
|
|
16
|
+
import { EntityManager } from 'typeorm';
|
|
17
|
+
import { Request, Response, NextFunction } from 'express';
|
|
18
|
+
import { Schema } from 'joi';
|
|
19
|
+
import socketIO from 'socket.io';
|
|
20
|
+
import { ControllerInterface, ListParam } from './index';
|
|
21
|
+
import { IConfigPxpApp } from '../../interfaces';
|
|
22
|
+
export declare class Controller implements ControllerInterface {
|
|
23
|
+
validated: boolean;
|
|
24
|
+
params: Record<string, unknown>[];
|
|
25
|
+
pxpParams: any;
|
|
26
|
+
router: import("express-serve-static-core").Router;
|
|
27
|
+
path: string;
|
|
28
|
+
module: string;
|
|
29
|
+
modelString: string;
|
|
30
|
+
transactionCode: string;
|
|
31
|
+
user: any;
|
|
32
|
+
model: any;
|
|
33
|
+
protected io: socketIO.Server;
|
|
34
|
+
config: IConfigPxpApp;
|
|
35
|
+
private basicRoutes;
|
|
36
|
+
private basicReadOnly;
|
|
37
|
+
constructor(module: string, Entity?: any, config?: IConfigPxpApp, io?: any);
|
|
38
|
+
private initializeRoutes;
|
|
39
|
+
genericMethodWrapper(params: Record<string, unknown>, req: Request, next: NextFunction, res: Response, methodName: string, dbsettings: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
40
|
+
ormMethodWrapper(params: Record<string, unknown>, req: Request | any, next: NextFunction, res: Response, methodName: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
41
|
+
list(params: Record<string, unknown>): Promise<unknown>;
|
|
42
|
+
add(params: Record<string, unknown>, manager: EntityManager): Promise<unknown>;
|
|
43
|
+
edit(params: Record<string, unknown>, manager: EntityManager): Promise<unknown>;
|
|
44
|
+
delete(params: Record<string, unknown>, manager: EntityManager): Promise<unknown>;
|
|
45
|
+
getListParams(params: Record<string, unknown>, where: Record<string, unknown>): ListParam;
|
|
46
|
+
procedureMethodWrapper(params: Record<string, unknown>, next: NextFunction, res: Response, methodName: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
47
|
+
sqlMethodWrapper(params: Record<string, unknown>, next: NextFunction, res: Response, methodName: string, readonly: boolean, permission?: boolean, log?: boolean, logConfig?: {}): Promise<void>;
|
|
48
|
+
classValidate(model: any): Promise<void>;
|
|
49
|
+
schemaValidate(schema: Schema, params: Record<string, unknown>): Promise<unknown>;
|
|
50
|
+
getListSchema(ownColumns: Record<string, unknown>): Schema;
|
|
51
|
+
}
|