taon 21.0.52 → 21.0.54
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/browser/package.json +1 -1
- package/browser-prod/package.json +1 -1
- package/icon-menu-taon.svg +15 -15
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/package.json +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/base-classes/base-abstract-entity.js +19 -0
- package/lib-prod/base-classes/base-angular-service.js +84 -0
- package/lib-prod/base-classes/base-class.js +35 -0
- package/lib-prod/base-classes/{base-context.ts → base-context.js} +13 -15
- package/lib-prod/base-classes/base-controller.js +154 -0
- package/lib-prod/base-classes/base-crud-controller.js +264 -0
- package/lib-prod/base-classes/base-custom-repository.js +9 -0
- package/lib-prod/base-classes/{base-electron-service.ts → base-electron-service.js} +1 -12
- package/lib-prod/base-classes/base-entity.js +22 -0
- package/lib-prod/base-classes/base-file-upload.middleware.js +75 -0
- package/lib-prod/base-classes/base-injector.js +184 -0
- package/lib-prod/base-classes/base-middleware.js +9 -0
- package/lib-prod/base-classes/base-migration.js +20 -0
- package/lib-prod/base-classes/{base-provider.ts → base-provider.js} +2 -2
- package/lib-prod/base-classes/base-repository.js +617 -0
- package/lib-prod/base-classes/base-subscriber-for-entity.js +145 -0
- package/lib-prod/base-classes/{base.ts → base.js} +2 -15
- package/lib-prod/{build-info._auto-generated_.ts → build-info._auto-generated_.js} +1 -2
- package/lib-prod/config/controller-config.js +28 -0
- package/lib-prod/config/controller-options.js +3 -0
- package/lib-prod/config/method-config.js +7 -0
- package/lib-prod/config/param-config.js +3 -0
- package/lib-prod/constants.js +33 -0
- package/lib-prod/context-db-migrations.js +342 -0
- package/lib-prod/create-context.js +217 -0
- package/lib-prod/decorators/classes/controller-decorator.js +17 -0
- package/lib-prod/decorators/classes/entity-decorator.js +28 -0
- package/lib-prod/decorators/classes/middleware-decorator.js +16 -0
- package/lib-prod/decorators/classes/migration-decorator.js +15 -0
- package/lib-prod/decorators/classes/provider-decorator.js +15 -0
- package/lib-prod/decorators/classes/repository-decorator.js +15 -0
- package/lib-prod/decorators/classes/subscriber-decorator.js +15 -0
- package/lib-prod/decorators/decorator-abstract-opt.js +2 -0
- package/lib-prod/decorators/http/http-decorators.js +20 -0
- package/lib-prod/decorators/http/http-methods-decorators.js +102 -0
- package/lib-prod/decorators/http/http-params-decorators.js +42 -0
- package/lib-prod/dependency-injection/di-container.js +30 -0
- package/lib-prod/endpoint-context-storage.js +31 -0
- package/lib-prod/endpoint-context.js +2397 -0
- package/lib-prod/entity-process.js +225 -0
- package/lib-prod/env/{env.angular-node-app.ts → env.angular-node-app.js} +1 -1
- package/lib-prod/env/{env.docs-webapp.ts → env.docs-webapp.js} +1 -1
- package/lib-prod/env/{env.electron-app.ts → env.electron-app.js} +1 -1
- package/lib-prod/env/{env.mobile-app.ts → env.mobile-app.js} +1 -1
- package/lib-prod/env/{env.npm-lib-and-cli-tool.ts → env.npm-lib-and-cli-tool.js} +1 -1
- package/lib-prod/env/{env.vscode-plugin.ts → env.vscode-plugin.js} +1 -1
- package/lib-prod/express-types.js +1 -0
- package/lib-prod/formly/formly.models.js +1 -0
- package/lib-prod/formly/fromly.js +205 -0
- package/lib-prod/formly/type-from-entity.js +51 -0
- package/lib-prod/get-response-value.js +22 -0
- package/lib-prod/global-state/taon-global-state/{index.ts → index.js} +2 -2
- package/lib-prod/global-state/taon-global-state/{taon-global-state.abstract.context.ts → taon-global-state.abstract.context.js} +9 -11
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +7 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +42 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +35 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +12 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +44 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +12 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +46 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +22 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +11 -0
- package/lib-prod/global-state/taon-transaction-registry/{index.ts → index.js} +2 -2
- package/lib-prod/global-state/taon-transaction-registry/{taon-transaction-registry.abstract.context.ts → taon-transaction-registry.abstract.context.js} +10 -12
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +5 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +36 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +36 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +12 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +7 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +12 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +31 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +5 -0
- package/lib-prod/helpers/class-helpers.js +228 -0
- package/lib-prod/helpers/clone-obj.js +17 -0
- package/lib-prod/helpers/taon-helpers.js +147 -0
- package/lib-prod/{index._auto-generated_.ts → index._auto-generated_.js} +1 -1
- package/lib-prod/index.js +252 -0
- package/lib-prod/{inject.ts → inject.js} +35 -57
- package/lib-prod/migrations/index.js +2 -0
- package/lib-prod/migrations/{migrations_index._auto-generated_.ts → migrations_index._auto-generated_.js} +0 -2
- package/lib-prod/models.js +78 -0
- package/lib-prod/orm/columns.js +64 -0
- package/lib-prod/orm/index.js +56 -0
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +198 -0
- package/lib-prod/realtime/realtime-core.js +81 -0
- package/lib-prod/realtime/realtime-server.js +237 -0
- package/lib-prod/realtime/realtime-strategy/{index.ts → index.js} +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +280 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +289 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +27 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +11 -0
- package/lib-prod/realtime/realtime-subs-manager.js +88 -0
- package/lib-prod/realtime/realtime.models.js +2 -0
- package/lib-prod/symbols.js +108 -0
- package/lib-prod/ui/index.js +1 -0
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +1 -0
- package/lib-prod/validators.js +80 -0
- package/lib-prod.split-namespaces.json +31 -91
- package/package.json +1 -1
- package/websql/package.json +1 -1
- package/websql-prod/package.json +1 -1
- package/lib-prod/base-classes/base-abstract-entity.ts +0 -34
- package/lib-prod/base-classes/base-angular-service.ts +0 -107
- package/lib-prod/base-classes/base-class.ts +0 -46
- package/lib-prod/base-classes/base-controller.ts +0 -240
- package/lib-prod/base-classes/base-crud-controller.ts +0 -298
- package/lib-prod/base-classes/base-custom-repository.ts +0 -10
- package/lib-prod/base-classes/base-entity.ts +0 -28
- package/lib-prod/base-classes/base-file-upload.middleware.ts +0 -92
- package/lib-prod/base-classes/base-injector.ts +0 -278
- package/lib-prod/base-classes/base-middleware.ts +0 -71
- package/lib-prod/base-classes/base-migration.ts +0 -26
- package/lib-prod/base-classes/base-repository.ts +0 -942
- package/lib-prod/base-classes/base-subscriber-for-entity.ts +0 -196
- package/lib-prod/config/controller-config.ts +0 -58
- package/lib-prod/config/controller-options.ts +0 -19
- package/lib-prod/config/method-config.ts +0 -55
- package/lib-prod/config/param-config.ts +0 -16
- package/lib-prod/constants.ts +0 -63
- package/lib-prod/context-db-migrations.ts +0 -488
- package/lib-prod/create-context.ts +0 -345
- package/lib-prod/decorators/classes/controller-decorator.ts +0 -25
- package/lib-prod/decorators/classes/entity-decorator.ts +0 -57
- package/lib-prod/decorators/classes/middleware-decorator.ts +0 -29
- package/lib-prod/decorators/classes/migration-decorator.ts +0 -27
- package/lib-prod/decorators/classes/provider-decorator.ts +0 -28
- package/lib-prod/decorators/classes/repository-decorator.ts +0 -26
- package/lib-prod/decorators/classes/subscriber-decorator.ts +0 -28
- package/lib-prod/decorators/decorator-abstract-opt.ts +0 -4
- package/lib-prod/decorators/http/http-decorators.ts +0 -26
- package/lib-prod/decorators/http/http-methods-decorators.ts +0 -275
- package/lib-prod/decorators/http/http-params-decorators.ts +0 -105
- package/lib-prod/dependency-injection/di-container.ts +0 -39
- package/lib-prod/endpoint-context-storage.ts +0 -47
- package/lib-prod/endpoint-context.ts +0 -3110
- package/lib-prod/entity-process.ts +0 -286
- package/lib-prod/express-types.ts +0 -4
- package/lib-prod/formly/formly.models.ts +0 -7
- package/lib-prod/formly/fromly.ts +0 -261
- package/lib-prod/formly/type-from-entity.ts +0 -80
- package/lib-prod/get-response-value.ts +0 -30
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.ts +0 -9
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.ts +0 -44
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.ts +0 -40
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.ts +0 -12
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.ts +0 -48
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.ts +0 -16
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.ts +0 -47
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.ts +0 -18
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.ts +0 -21
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.ts +0 -7
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.ts +0 -38
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.ts +0 -54
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.ts +0 -12
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.ts +0 -6
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.ts +0 -16
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.ts +0 -29
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.ts +0 -20
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.ts +0 -9
- package/lib-prod/helpers/class-helpers.ts +0 -315
- package/lib-prod/helpers/clone-obj.ts +0 -24
- package/lib-prod/helpers/taon-helpers.ts +0 -181
- package/lib-prod/index.ts +0 -323
- package/lib-prod/lib-info.md +0 -8
- package/lib-prod/migrations/index.ts +0 -2
- package/lib-prod/migrations/migrations-info.md +0 -6
- package/lib-prod/models.ts +0 -427
- package/lib-prod/orm/columns.ts +0 -121
- package/lib-prod/orm/index.ts +0 -62
- package/lib-prod/realtime/realtime-client.ts +0 -288
- package/lib-prod/realtime/realtime-core.ts +0 -134
- package/lib-prod/realtime/realtime-server.ts +0 -398
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.ts +0 -344
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.ts +0 -349
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.ts +0 -30
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.ts +0 -21
- package/lib-prod/realtime/realtime-subs-manager.ts +0 -127
- package/lib-prod/realtime/realtime.models.ts +0 -33
- package/lib-prod/symbols.ts +0 -136
- package/lib-prod/ui/index.ts +0 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.ts +0 -1
- package/lib-prod/validators.ts +0 -103
- /package/lib-prod/env/{index.ts → index.js} +0 -0
package/browser/package.json
CHANGED
package/icon-menu-taon.svg
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
<svg
|
|
3
|
-
viewBox="0 0 23.432 23.432004"
|
|
4
|
-
version="1.1"
|
|
5
|
-
id="svg1"
|
|
6
|
-
width="23.431999"
|
|
7
|
-
height="23.432003"
|
|
8
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
-
xmlns:svg="http://www.w3.org/2000/svg">
|
|
10
|
-
<defs
|
|
11
|
-
id="defs1" />
|
|
12
|
-
<path
|
|
13
|
-
id="path1"
|
|
14
|
-
d="m 11.521484,1.265625 c -0.953032,1.5597622 -1.9887223,3.0593334 -3.1074215,4.5 C 6.9495642,4.7476223 5.485983,3.7308932 4.0214844,2.7128906 3.8829075,2.6603831 3.738968,2.6414114 3.5917969,2.6582031 2.7651252,6.7213623 1.8733597,10.758159 0.9140625,14.767578 v 0.75 c 1.6097872,1.096932 3.2239518,2.188127 4.8417969,3.273438 v 0.08008 h 0.1171875 c 1.806633,1.211497 3.6188659,2.414261 5.4355471,3.611328 0.07144,0.07147 0.14145,0.143364 0.21289,0.214844 h 0.429688 c 3.432812,-2.431526 6.897745,-4.824781 10.394531,-7.179688 V 14.552734 C 21.353633,10.612741 20.406845,6.6479161 19.505859,2.6582031 19.42892,2.5563391 19.339974,2.5393307 19.238281,2.6054688 17.782054,3.6890192 16.286176,4.7048374 14.75,5.6523438 a 3.4715793,3.1345327 0 0 0 -0.01758,-0.00195 C 13.814421,4.161603 12.851221,2.7003542 11.84375,1.265625 Z M 4.1855469,8.9433594 H 10.810547 V 10.048828 H 8.34375 V 15.46875 H 6.6601562 V 10.048828 H 4.1855469 Z m 7.7285151,0 h 1.638672 l 3.41211,4.3574216 V 8.9433594 h 1.564453 V 15.46875 h -1.689453 l -3.361328,-4.253906 v 4.253906 h -1.564454 z" />
|
|
15
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
viewBox="0 0 23.432 23.432004"
|
|
4
|
+
version="1.1"
|
|
5
|
+
id="svg1"
|
|
6
|
+
width="23.431999"
|
|
7
|
+
height="23.432003"
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
10
|
+
<defs
|
|
11
|
+
id="defs1" />
|
|
12
|
+
<path
|
|
13
|
+
id="path1"
|
|
14
|
+
d="m 11.521484,1.265625 c -0.953032,1.5597622 -1.9887223,3.0593334 -3.1074215,4.5 C 6.9495642,4.7476223 5.485983,3.7308932 4.0214844,2.7128906 3.8829075,2.6603831 3.738968,2.6414114 3.5917969,2.6582031 2.7651252,6.7213623 1.8733597,10.758159 0.9140625,14.767578 v 0.75 c 1.6097872,1.096932 3.2239518,2.188127 4.8417969,3.273438 v 0.08008 h 0.1171875 c 1.806633,1.211497 3.6188659,2.414261 5.4355471,3.611328 0.07144,0.07147 0.14145,0.143364 0.21289,0.214844 h 0.429688 c 3.432812,-2.431526 6.897745,-4.824781 10.394531,-7.179688 V 14.552734 C 21.353633,10.612741 20.406845,6.6479161 19.505859,2.6582031 19.42892,2.5563391 19.339974,2.5393307 19.238281,2.6054688 17.782054,3.6890192 16.286176,4.7048374 14.75,5.6523438 a 3.4715793,3.1345327 0 0 0 -0.01758,-0.00195 C 13.814421,4.161603 12.851221,2.7003542 11.84375,1.265625 Z M 4.1855469,8.9433594 H 10.810547 V 10.048828 H 8.34375 V 15.46875 H 6.6601562 V 10.048828 H 4.1855469 Z m 7.7285151,0 h 1.638672 l 3.41211,4.3574216 V 8.9433594 h 1.564453 V 15.46875 h -1.689453 l -3.361328,-4.253906 v 4.253906 h -1.564454 z" />
|
|
15
|
+
</svg>
|
|
@@ -25,6 +25,6 @@ exports.CURRENT_PACKAGE_TAON_VERSION = 'v21';
|
|
|
25
25
|
/**
|
|
26
26
|
* Autogenerated by current cli tool. Use *tnp release* to bump version.
|
|
27
27
|
*/
|
|
28
|
-
exports.CURRENT_PACKAGE_VERSION = '21.0.
|
|
28
|
+
exports.CURRENT_PACKAGE_VERSION = '21.0.54';
|
|
29
29
|
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
30
30
|
//# sourceMappingURL=build-info._auto-generated_.js.map
|
package/lib/package.json
CHANGED
package/lib/ui/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.dummy1769878175346 = dummy1769878175346;
|
|
4
|
+
function dummy1769878175346() { }
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.dummy1769878176428 = dummy1769878176428;
|
|
4
|
+
function dummy1769878176428() { }
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Entity, VersionColumn } from 'taon-typeorm/lib-prod'; // @websql
|
|
2
|
+
import { PrimaryGeneratedColumn, } from '../orm';
|
|
3
|
+
import { TaonBaseEntity } from './base-entity';
|
|
4
|
+
//#region @websql
|
|
5
|
+
let TaonBaseAbstractEntity = class TaonBaseAbstractEntity extends TaonBaseEntity {
|
|
6
|
+
};
|
|
7
|
+
__decorate([
|
|
8
|
+
PrimaryGeneratedColumn()
|
|
9
|
+
//#endregion
|
|
10
|
+
], TaonBaseAbstractEntity.prototype, "id", void 0);
|
|
11
|
+
__decorate([
|
|
12
|
+
VersionColumn()
|
|
13
|
+
//#endregion
|
|
14
|
+
], TaonBaseAbstractEntity.prototype, "version", void 0);
|
|
15
|
+
TaonBaseAbstractEntity = __decorate([
|
|
16
|
+
Entity()
|
|
17
|
+
//#endregion
|
|
18
|
+
], TaonBaseAbstractEntity);
|
|
19
|
+
export { TaonBaseAbstractEntity };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
/* */
|
|
3
|
+
/* */
|
|
4
|
+
import { inject as taonInject } from '../inject';
|
|
5
|
+
/**
|
|
6
|
+
* TODO prevent calling methods when not initialized
|
|
7
|
+
* with init(ctx)
|
|
8
|
+
*/
|
|
9
|
+
/* */
|
|
10
|
+
/* */
|
|
11
|
+
export class TaonBaseAngularService {
|
|
12
|
+
/* */
|
|
13
|
+
/* */
|
|
14
|
+
/* */
|
|
15
|
+
/* */
|
|
16
|
+
/* */
|
|
17
|
+
/* */
|
|
18
|
+
/* */
|
|
19
|
+
/* */
|
|
20
|
+
/* */
|
|
21
|
+
/* */
|
|
22
|
+
/* */
|
|
23
|
+
/* */
|
|
24
|
+
/* */
|
|
25
|
+
/* */
|
|
26
|
+
/* */
|
|
27
|
+
/* */
|
|
28
|
+
/* */
|
|
29
|
+
constructor() {
|
|
30
|
+
/* */
|
|
31
|
+
/* */
|
|
32
|
+
/* */
|
|
33
|
+
/* */
|
|
34
|
+
/* */
|
|
35
|
+
/* */
|
|
36
|
+
/* */
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Returns true if the application is running in SSR (server-side rendering) mode only.
|
|
40
|
+
*/
|
|
41
|
+
get isSsrPlatform() {
|
|
42
|
+
/* */
|
|
43
|
+
/* */
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Returns true if the application is running in browser-only mode.
|
|
48
|
+
*/
|
|
49
|
+
get isBrowserPlatform() {
|
|
50
|
+
/* */
|
|
51
|
+
/* */
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated
|
|
56
|
+
* Returns the host URL for the backend service
|
|
57
|
+
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
58
|
+
*/
|
|
59
|
+
get host() {
|
|
60
|
+
/* */
|
|
61
|
+
/* */
|
|
62
|
+
/* */
|
|
63
|
+
/* */
|
|
64
|
+
/* */
|
|
65
|
+
return void 0;
|
|
66
|
+
}
|
|
67
|
+
injectController(ctor,
|
|
68
|
+
/**
|
|
69
|
+
* optional override context
|
|
70
|
+
*/
|
|
71
|
+
overrideCurrentContext) {
|
|
72
|
+
return taonInject(() => {
|
|
73
|
+
let currentContext;
|
|
74
|
+
/* */
|
|
75
|
+
/* */
|
|
76
|
+
/* */
|
|
77
|
+
/* */
|
|
78
|
+
if (!currentContext) {
|
|
79
|
+
throw new Error('No context available. Make sure to initialize the context before injecting controllers.');
|
|
80
|
+
}
|
|
81
|
+
return currentContext ? currentContext.getClass(ctor) : void 0;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ___NS__cloneDeep, ___NS__isFunction, ___NS__isString } from 'tnp-core/lib-prod';
|
|
2
|
+
import { ClassHelpers__NS__getClassFnFromObject } from '../helpers/class-helpers';
|
|
3
|
+
import { cloneObj } from '../helpers/clone-obj';
|
|
4
|
+
//#endregion
|
|
5
|
+
export class TaonBaseClass {
|
|
6
|
+
//#region class initialization hook
|
|
7
|
+
/**
|
|
8
|
+
* class initialization hook
|
|
9
|
+
* taon after class instance creation
|
|
10
|
+
*/
|
|
11
|
+
async _() { }
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region clone
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param overrideObjOrFn if object is provided it will override values in cloned object,
|
|
17
|
+
* if function is provided it will be called with old cloned values and should return
|
|
18
|
+
* object with values to override
|
|
19
|
+
* @returns cloned instance of the class
|
|
20
|
+
*/
|
|
21
|
+
clone(overrideObjOrFn) {
|
|
22
|
+
if (___NS__isString(overrideObjOrFn)) {
|
|
23
|
+
console.log(overrideObjOrFn);
|
|
24
|
+
throw new Error('String is not supported as .clone() method argument');
|
|
25
|
+
}
|
|
26
|
+
const classFn = ClassHelpers__NS__getClassFnFromObject(this);
|
|
27
|
+
if (___NS__isFunction(overrideObjOrFn)) {
|
|
28
|
+
// console.log('clone with fn');
|
|
29
|
+
const oldValues = (___NS__cloneDeep(this) || {});
|
|
30
|
+
return cloneObj(overrideObjOrFn(oldValues), classFn);
|
|
31
|
+
}
|
|
32
|
+
// console.log('clone normal');
|
|
33
|
+
return cloneObj(overrideObjOrFn, classFn);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -2,20 +2,18 @@ import { createContext } from '../create-context';
|
|
|
2
2
|
import { TaonGlobalStateContext } from '../global-state/taon-global-state/taon-global-state.abstract.context';
|
|
3
3
|
import { TaonBaseFileUploadMiddleware } from './base-file-upload.middleware';
|
|
4
4
|
import { TaonBaseRepository } from './base-repository';
|
|
5
|
-
|
|
6
5
|
const TaonBaseContext = createContext(() => ({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
contextName: 'TaonBaseContext',
|
|
7
|
+
abstract: true,
|
|
8
|
+
contexts: {
|
|
9
|
+
TaonGlobalStateContext,
|
|
10
|
+
},
|
|
11
|
+
middlewares: {
|
|
12
|
+
TaonBaseFileUploadMiddleware,
|
|
13
|
+
},
|
|
14
|
+
repositories: {
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
TaonBaseRepository,
|
|
17
|
+
},
|
|
19
18
|
}));
|
|
20
|
-
|
|
21
|
-
export { TaonBaseContext };
|
|
19
|
+
export { TaonBaseContext };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as FormData from 'form-data'; // @backend
|
|
2
|
+
import { HttpResponseError, } from 'ng2-rest/lib-prod';
|
|
3
|
+
import { crossPlatformPath, fse, path, CoreModels__NS__TaonHttpErrorCustomProp, UtilsTerminal__NS__waitMilliseconds } from 'tnp-core/lib-prod';
|
|
4
|
+
import { TaonController } from '../decorators/classes/controller-decorator';
|
|
5
|
+
import { POST } from '../decorators/http/http-methods-decorators';
|
|
6
|
+
import { Body, Query } from '../decorators/http/http-params-decorators';
|
|
7
|
+
import { TaonBaseFileUploadMiddleware } from './base-file-upload.middleware';
|
|
8
|
+
import { TaonBaseInjector } from './base-injector';
|
|
9
|
+
let TaonBaseController = class TaonBaseController extends TaonBaseInjector {
|
|
10
|
+
/**
|
|
11
|
+
* Hook that is called when taon app is inited
|
|
12
|
+
* (all contexts are created and inited)
|
|
13
|
+
*/
|
|
14
|
+
async afterAllCtxInited(options) { }
|
|
15
|
+
//#region upload form data to server
|
|
16
|
+
uploadFormDataToServer(formData, queryParams) {
|
|
17
|
+
//#region @backendFunc
|
|
18
|
+
return async (req, res) => {
|
|
19
|
+
const files = req.files;
|
|
20
|
+
if (!files) {
|
|
21
|
+
throw 'No file(s) received';
|
|
22
|
+
}
|
|
23
|
+
const responseArr = files.map(f => {
|
|
24
|
+
const savedAbs = crossPlatformPath(path.resolve(f.path));
|
|
25
|
+
// const savedRel = crossPlatformPath(
|
|
26
|
+
// path.relative(this.ctx.cwd, savedAbs),
|
|
27
|
+
// );
|
|
28
|
+
return {
|
|
29
|
+
ok: true,
|
|
30
|
+
originalName: f.originalname,
|
|
31
|
+
savedAs: path.basename(savedAbs),
|
|
32
|
+
// savedPath: void 0, // not needed
|
|
33
|
+
size: f.size,
|
|
34
|
+
mimetype: f.mimetype,
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
// console.log(responseArr);
|
|
38
|
+
for (const res of responseArr) {
|
|
39
|
+
await this.afterFileUploadAction(res, queryParams || {});
|
|
40
|
+
}
|
|
41
|
+
return responseArr;
|
|
42
|
+
};
|
|
43
|
+
//#endregion
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region after file upload hook
|
|
47
|
+
/**
|
|
48
|
+
* Hook after file is uploaded
|
|
49
|
+
* through `uploadFormDataToServer` or `uploadLocalFileToServer`
|
|
50
|
+
*/
|
|
51
|
+
afterFileUploadAction(file, queryParams) {
|
|
52
|
+
// empty
|
|
53
|
+
}
|
|
54
|
+
//#region upload local file to server
|
|
55
|
+
async uploadLocalFileToServer(absFilePath, options, queryParams) {
|
|
56
|
+
//#region @backendFunc
|
|
57
|
+
const stat = fse.statSync(absFilePath);
|
|
58
|
+
const stream = fse.createReadStream(absFilePath);
|
|
59
|
+
const form = new FormData();
|
|
60
|
+
form.append('file', stream, {
|
|
61
|
+
filename: path.basename(absFilePath),
|
|
62
|
+
knownLength: stat.size,
|
|
63
|
+
});
|
|
64
|
+
const data = await this.uploadFormDataToServer(form, queryParams).request(options || {});
|
|
65
|
+
return data.body.json;
|
|
66
|
+
//#endregion
|
|
67
|
+
}
|
|
68
|
+
//#endregion
|
|
69
|
+
// async check() {
|
|
70
|
+
// await this._waitForProperStatusChange({
|
|
71
|
+
// request: () => this.uploadFormDataToServer(void 0, void 0).request(),
|
|
72
|
+
// statusCheck: resp => resp.body.json[0].ok,
|
|
73
|
+
// });
|
|
74
|
+
// }
|
|
75
|
+
/**
|
|
76
|
+
* Easy way to wait for status change with http (1s default) pooling.
|
|
77
|
+
*
|
|
78
|
+
* example (in sub class):
|
|
79
|
+
* ```ts
|
|
80
|
+
async check() {
|
|
81
|
+
await this.waitForProperStatusChange({
|
|
82
|
+
request: () => this.uploadFormDataToServer(void 0, void 0).request(),
|
|
83
|
+
statusCheck: resp => resp.body.json[0].ok,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
async _waitForProperStatusChange(options) {
|
|
89
|
+
const poolingInterval = options.poolingInterval || 1000;
|
|
90
|
+
const taonRequest = options.request;
|
|
91
|
+
let maxTries = options.maxTries || Number.POSITIVE_INFINITY;
|
|
92
|
+
let i = 0;
|
|
93
|
+
let httpErrorsCount = 0;
|
|
94
|
+
while (true) {
|
|
95
|
+
await UtilsTerminal__NS__waitMilliseconds(poolingInterval);
|
|
96
|
+
try {
|
|
97
|
+
const resp = await taonRequest({
|
|
98
|
+
reqIndexNum: i,
|
|
99
|
+
httpErrorsCount,
|
|
100
|
+
});
|
|
101
|
+
if (options.statusCheck && options.statusCheck(resp)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
httpErrorsCount++;
|
|
107
|
+
if (options.loopRequestsOnBackendError) {
|
|
108
|
+
const isProperTaonError = error instanceof HttpResponseError &&
|
|
109
|
+
error.body.json[CoreModels__NS__TaonHttpErrorCustomProp];
|
|
110
|
+
const isHttpError = error instanceof HttpResponseError && !isProperTaonError;
|
|
111
|
+
const isUnknownError = !(error instanceof HttpResponseError);
|
|
112
|
+
const resBool = await options.loopRequestsOnBackendError({
|
|
113
|
+
taonError: isProperTaonError ? error : void 0,
|
|
114
|
+
unknownHttpError: isHttpError ? error : void 0,
|
|
115
|
+
unknownError: isUnknownError ? error : void 0,
|
|
116
|
+
reqIndexNum: i,
|
|
117
|
+
httpErrorsCount,
|
|
118
|
+
});
|
|
119
|
+
if (resBool) {
|
|
120
|
+
i++;
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (httpErrorsCount >
|
|
128
|
+
(options.allowedHttpErrors || Number.POSITIVE_INFINITY)) {
|
|
129
|
+
throw new Error(`Too many http errors (${httpErrorsCount}) for "${options.actionName}".`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (i++ > maxTries) {
|
|
133
|
+
throw new Error(`Timeout waiting for "${options.actionName}" to be finished. Waited for ${maxTries} seconds`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
__decorate([
|
|
139
|
+
POST({
|
|
140
|
+
overrideContentType: 'multipart/form-data',
|
|
141
|
+
middlewares: ({ parentMiddlewares }) => ({
|
|
142
|
+
...parentMiddlewares,
|
|
143
|
+
TaonBaseFileUploadMiddleware,
|
|
144
|
+
}),
|
|
145
|
+
}),
|
|
146
|
+
__param(0, Body()),
|
|
147
|
+
__param(1, Query())
|
|
148
|
+
], TaonBaseController.prototype, "uploadFormDataToServer", null);
|
|
149
|
+
TaonBaseController = __decorate([
|
|
150
|
+
TaonController({
|
|
151
|
+
className: 'TaonBaseController',
|
|
152
|
+
})
|
|
153
|
+
], TaonBaseController);
|
|
154
|
+
export { TaonBaseController };
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
//#region imports
|
|
2
|
+
import { ___NS__isArray, ___NS__isFunction, ___NS__isString, Helpers__NS__error, Helpers__NS__warn } from 'tnp-core/lib-prod';
|
|
3
|
+
import { TaonController } from '../decorators/classes/controller-decorator';
|
|
4
|
+
import { GET, PUT, DELETE, POST, PATCH, } from '../decorators/http/http-methods-decorators';
|
|
5
|
+
import { Query, Body } from '../decorators/http/http-params-decorators';
|
|
6
|
+
import { ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getName } from '../helpers/class-helpers';
|
|
7
|
+
import { Symbols__NS__metadata, Symbols__NS__old } from '../symbols';
|
|
8
|
+
import { Validators__NS__preventUndefinedModel } from '../validators';
|
|
9
|
+
import { TaonBaseController } from './base-controller';
|
|
10
|
+
//#endregion
|
|
11
|
+
/**
|
|
12
|
+
* Please override property entityClassFn with entity class.
|
|
13
|
+
*/
|
|
14
|
+
let TaonBaseCrudController = class TaonBaseCrudController extends TaonBaseController {
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region init
|
|
17
|
+
async _() {
|
|
18
|
+
if (!___NS__isFunction(this.entityClassResolveFn)) {
|
|
19
|
+
Helpers__NS__warn(`Skipping initing CRUD controller ${ClassHelpers__NS__getName(this)} because entityClassResolveFn is not provided.`);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
let entityClassFn = this.entityClassResolveFn();
|
|
23
|
+
this.db = this.injectRepo(entityClassFn);
|
|
24
|
+
if (entityClassFn) {
|
|
25
|
+
const configEntity = Reflect.getMetadata(Symbols__NS__metadata.options.entity, ClassHelpers__NS__getClassFnFromObject(this));
|
|
26
|
+
if (configEntity?.createTable === false) {
|
|
27
|
+
Helpers__NS__warn(`Table for entity ${ClassHelpers__NS__getName(entityClassFn)} will not be created. Crud will not work properly.`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
Helpers__NS__error(`Entity class not provided for controller ${ClassHelpers__NS__getName(this)}.
|
|
32
|
+
|
|
33
|
+
Please provide entity as class property entityClassFn:
|
|
34
|
+
|
|
35
|
+
class ${ClassHelpers__NS__getName(this)} extends TaonBaseCrudController<Entity> {
|
|
36
|
+
// ...
|
|
37
|
+
entityClassResolveFn = ()=> MyEntityClass;
|
|
38
|
+
// ...
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
`);
|
|
42
|
+
}
|
|
43
|
+
await super._();
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region bufferd changes
|
|
47
|
+
bufforedChanges(id, property, alreadyLength) {
|
|
48
|
+
//#region @websqlFunc
|
|
49
|
+
return async (request, response) => {
|
|
50
|
+
const model = await this.db.getBy(id);
|
|
51
|
+
if (model === void 0) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
Validators__NS__preventUndefinedModel(model, id);
|
|
55
|
+
let value = model[property];
|
|
56
|
+
let result;
|
|
57
|
+
if (___NS__isString(value) || ___NS__isArray(value)) {
|
|
58
|
+
result = value.slice(alreadyLength);
|
|
59
|
+
}
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region pagintation
|
|
66
|
+
pagination(pageNumber = 1, pageSize = 10, search = '') {
|
|
67
|
+
//#region @websqlFunc
|
|
68
|
+
return async (request, response) => {
|
|
69
|
+
if (this.db.repositoryExists) {
|
|
70
|
+
const query = {
|
|
71
|
+
page: pageNumber,
|
|
72
|
+
take: pageSize,
|
|
73
|
+
keyword: search,
|
|
74
|
+
};
|
|
75
|
+
// console.log({
|
|
76
|
+
// query
|
|
77
|
+
// })
|
|
78
|
+
const take = query.take || 10;
|
|
79
|
+
const page = query.page || 1;
|
|
80
|
+
const skip = (page - 1) * take;
|
|
81
|
+
const keyword = query.keyword || '';
|
|
82
|
+
const [result, total] = await this.db.findAndCount({
|
|
83
|
+
// where: { name: Like('%' + keyword + '%') },
|
|
84
|
+
// order: { name: "DESC" },
|
|
85
|
+
take: take,
|
|
86
|
+
skip: skip,
|
|
87
|
+
});
|
|
88
|
+
response?.setHeader(Symbols__NS__old.X_TOTAL_COUNT, total);
|
|
89
|
+
// const lastPage = Math.ceil(total / take);
|
|
90
|
+
// const nextPage = page + 1 > lastPage ? null : page + 1;
|
|
91
|
+
// const prevPage = page - 1 < 1 ? null : page - 1;
|
|
92
|
+
// console.log({
|
|
93
|
+
// result,
|
|
94
|
+
// total
|
|
95
|
+
// })
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
return [];
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region get all
|
|
104
|
+
getAll() {
|
|
105
|
+
//#region @websqlFunc
|
|
106
|
+
return async (request, response) => {
|
|
107
|
+
if (this.db.repositoryExists) {
|
|
108
|
+
const { models, totalCount } = await this.db.getAll();
|
|
109
|
+
response?.setHeader(Symbols__NS__old.X_TOTAL_COUNT, totalCount);
|
|
110
|
+
return models;
|
|
111
|
+
}
|
|
112
|
+
return [];
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region get by id
|
|
118
|
+
getBy(id) {
|
|
119
|
+
//#region @websqlFunc
|
|
120
|
+
return async () => {
|
|
121
|
+
const model = await this.db.getBy(id);
|
|
122
|
+
return model;
|
|
123
|
+
};
|
|
124
|
+
//#endregion
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region update by id
|
|
128
|
+
updateById(id, item) {
|
|
129
|
+
//#region @websqlFunc
|
|
130
|
+
return async () => {
|
|
131
|
+
const model = await this.db.updateById(id, item);
|
|
132
|
+
return model;
|
|
133
|
+
};
|
|
134
|
+
//#endregion
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region patch by id
|
|
138
|
+
patchById(id, item) {
|
|
139
|
+
//#region @websqlFunc
|
|
140
|
+
return async () => {
|
|
141
|
+
const model = await this.db.updateById(id, item);
|
|
142
|
+
return model;
|
|
143
|
+
};
|
|
144
|
+
//#endregion
|
|
145
|
+
}
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region bulk update
|
|
148
|
+
bulkUpdate(items) {
|
|
149
|
+
//#region @websqlFunc
|
|
150
|
+
return async () => {
|
|
151
|
+
if (!Array.isArray(items) || items?.length === 0) {
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
const { models } = await this.db.bulkUpdate(items);
|
|
155
|
+
return models;
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region delete by id
|
|
161
|
+
deleteById(id) {
|
|
162
|
+
//#region @websqlFunc
|
|
163
|
+
return async () => {
|
|
164
|
+
const model = await this.db.deleteById(id);
|
|
165
|
+
return model;
|
|
166
|
+
};
|
|
167
|
+
//#endregion
|
|
168
|
+
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region bulk delete
|
|
171
|
+
bulkDelete(ids) {
|
|
172
|
+
//#region @websqlFunc
|
|
173
|
+
return async () => {
|
|
174
|
+
const models = await this.db.bulkDelete(ids);
|
|
175
|
+
return models;
|
|
176
|
+
};
|
|
177
|
+
//#endregion
|
|
178
|
+
}
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region bulk delete
|
|
181
|
+
clearTable() {
|
|
182
|
+
//#region @websqlFunc
|
|
183
|
+
return async () => {
|
|
184
|
+
await this.db.clear();
|
|
185
|
+
};
|
|
186
|
+
//#endregion
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region create
|
|
190
|
+
save(item) {
|
|
191
|
+
//#region @websqlFunc
|
|
192
|
+
return async () => {
|
|
193
|
+
const model = await this.db.save(item);
|
|
194
|
+
return model;
|
|
195
|
+
};
|
|
196
|
+
//#endregion
|
|
197
|
+
}
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region bulk create
|
|
200
|
+
bulkCreate(items) {
|
|
201
|
+
//#region @websqlFunc
|
|
202
|
+
return async () => {
|
|
203
|
+
const models = await this.db.bulkCreate(items);
|
|
204
|
+
return models;
|
|
205
|
+
};
|
|
206
|
+
//#endregion
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
__decorate([
|
|
210
|
+
GET(),
|
|
211
|
+
__param(0, Query(`id`)),
|
|
212
|
+
__param(1, Query(`property`)),
|
|
213
|
+
__param(2, Query('alreadyLength'))
|
|
214
|
+
], TaonBaseCrudController.prototype, "bufforedChanges", null);
|
|
215
|
+
__decorate([
|
|
216
|
+
GET(),
|
|
217
|
+
__param(0, Query('pageNumber')),
|
|
218
|
+
__param(1, Query('pageSize')),
|
|
219
|
+
__param(2, Query('search'))
|
|
220
|
+
], TaonBaseCrudController.prototype, "pagination", null);
|
|
221
|
+
__decorate([
|
|
222
|
+
GET()
|
|
223
|
+
], TaonBaseCrudController.prototype, "getAll", null);
|
|
224
|
+
__decorate([
|
|
225
|
+
GET(),
|
|
226
|
+
__param(0, Query(`id`))
|
|
227
|
+
], TaonBaseCrudController.prototype, "getBy", null);
|
|
228
|
+
__decorate([
|
|
229
|
+
PUT(),
|
|
230
|
+
__param(0, Query(`id`)),
|
|
231
|
+
__param(1, Body())
|
|
232
|
+
], TaonBaseCrudController.prototype, "updateById", null);
|
|
233
|
+
__decorate([
|
|
234
|
+
PATCH(),
|
|
235
|
+
__param(0, Query(`id`)),
|
|
236
|
+
__param(1, Body())
|
|
237
|
+
], TaonBaseCrudController.prototype, "patchById", null);
|
|
238
|
+
__decorate([
|
|
239
|
+
PUT(),
|
|
240
|
+
__param(0, Body())
|
|
241
|
+
], TaonBaseCrudController.prototype, "bulkUpdate", null);
|
|
242
|
+
__decorate([
|
|
243
|
+
DELETE(),
|
|
244
|
+
__param(0, Query(`id`))
|
|
245
|
+
], TaonBaseCrudController.prototype, "deleteById", null);
|
|
246
|
+
__decorate([
|
|
247
|
+
DELETE(),
|
|
248
|
+
__param(0, Query(`ids`))
|
|
249
|
+
], TaonBaseCrudController.prototype, "bulkDelete", null);
|
|
250
|
+
__decorate([
|
|
251
|
+
DELETE()
|
|
252
|
+
], TaonBaseCrudController.prototype, "clearTable", null);
|
|
253
|
+
__decorate([
|
|
254
|
+
POST(),
|
|
255
|
+
__param(0, Body())
|
|
256
|
+
], TaonBaseCrudController.prototype, "save", null);
|
|
257
|
+
__decorate([
|
|
258
|
+
POST(),
|
|
259
|
+
__param(0, Body())
|
|
260
|
+
], TaonBaseCrudController.prototype, "bulkCreate", null);
|
|
261
|
+
TaonBaseCrudController = __decorate([
|
|
262
|
+
TaonController({ className: 'TaonBaseCrudController' })
|
|
263
|
+
], TaonBaseCrudController);
|
|
264
|
+
export { TaonBaseCrudController };
|