taon 21.0.52 → 21.0.53
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/bin/taon +5 -5
- package/bin/taon-debug +5 -5
- package/bin/taon-debug-brk +4 -4
- 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 +33 -0
- package/lib-prod/base-classes/base-angular-service.js +56 -0
- package/lib-prod/base-classes/base-class.js +37 -0
- package/lib-prod/base-classes/base-context.js +21 -0
- package/lib-prod/base-classes/base-controller.js +162 -0
- package/lib-prod/base-classes/base-crud-controller.js +235 -0
- package/lib-prod/base-classes/base-custom-repository.js +20 -0
- package/lib-prod/base-classes/base-electron-service.js +0 -0
- package/lib-prod/base-classes/base-entity.js +32 -0
- package/lib-prod/base-classes/base-file-upload.middleware.js +78 -0
- package/lib-prod/base-classes/base-injector.js +202 -0
- package/lib-prod/base-classes/base-middleware.js +6 -0
- package/lib-prod/base-classes/base-migration.js +23 -0
- package/lib-prod/base-classes/base-provider.js +6 -0
- package/lib-prod/base-classes/base-repository.js +589 -0
- package/lib-prod/base-classes/base-subscriber-for-entity.js +154 -0
- package/lib-prod/base-classes/base.js +0 -0
- package/lib-prod/build-info._auto-generated_.js +14 -0
- package/lib-prod/config/controller-config.js +28 -0
- package/lib-prod/config/controller-options.js +6 -0
- package/lib-prod/config/method-config.js +9 -0
- package/lib-prod/config/param-config.js +9 -0
- package/lib-prod/constants.js +29 -0
- package/lib-prod/context-db-migrations.js +339 -0
- package/lib-prod/create-context.js +152 -0
- package/lib-prod/decorators/classes/controller-decorator.js +21 -0
- package/lib-prod/decorators/classes/entity-decorator.js +49 -0
- package/lib-prod/decorators/classes/middleware-decorator.js +26 -0
- package/lib-prod/decorators/classes/migration-decorator.js +24 -0
- package/lib-prod/decorators/classes/provider-decorator.js +25 -0
- package/lib-prod/decorators/classes/repository-decorator.js +24 -0
- package/lib-prod/decorators/classes/subscriber-decorator.js +25 -0
- package/lib-prod/decorators/decorator-abstract-opt.js +5 -0
- package/lib-prod/decorators/http/http-decorators.js +5 -0
- package/lib-prod/decorators/http/http-methods-decorators.js +144 -0
- package/lib-prod/decorators/http/http-params-decorators.js +68 -0
- package/lib-prod/dependency-injection/di-container.js +31 -0
- package/lib-prod/endpoint-context-storage.js +36 -0
- package/lib-prod/endpoint-context.js +2033 -0
- package/lib-prod/entity-process.js +214 -0
- package/lib-prod/env/env.angular-node-app.js +130 -0
- package/lib-prod/env/env.docs-webapp.js +130 -0
- package/lib-prod/env/env.electron-app.js +130 -0
- package/lib-prod/env/env.mobile-app.js +130 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +130 -0
- package/lib-prod/env/env.vscode-plugin.js +130 -0
- package/lib-prod/env/index.js +6 -0
- package/lib-prod/express-types.js +0 -0
- package/lib-prod/formly/formly.models.js +0 -0
- package/lib-prod/formly/fromly.js +184 -0
- package/lib-prod/formly/type-from-entity.js +58 -0
- package/lib-prod/get-response-value.js +19 -0
- package/lib-prod/global-state/taon-global-state/index.js +5 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js +20 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +10 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +48 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +48 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +22 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +34 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +22 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +47 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +29 -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.js +10 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +8 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +41 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +56 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +10 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +36 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +29 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +6 -0
- package/lib-prod/helpers/class-helpers.js +195 -0
- package/lib-prod/helpers/clone-obj.js +21 -0
- package/lib-prod/helpers/taon-helpers.js +129 -0
- package/lib-prod/index._auto-generated_.js +0 -0
- package/lib-prod/index.js +231 -0
- package/lib-prod/inject.js +34 -0
- package/lib-prod/migrations/index.js +1 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.js +0 -0
- package/lib-prod/models.js +109 -0
- package/lib-prod/orm/columns.js +124 -0
- package/lib-prod/orm/index.js +1 -0
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +196 -0
- package/lib-prod/realtime/realtime-core.js +82 -0
- package/lib-prod/realtime/realtime-server.js +252 -0
- package/lib-prod/realtime/realtime-strategy/index.js +4 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +226 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +262 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +21 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +14 -0
- package/lib-prod/realtime/realtime-subs-manager.js +96 -0
- package/lib-prod/realtime/realtime.models.js +0 -0
- package/lib-prod/symbols.js +109 -0
- package/lib-prod/ui/index.js +5 -0
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +5 -0
- package/lib-prod/validators.js +74 -0
- 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-context.ts +0 -21
- 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-electron-service.ts +0 -60
- 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-provider.ts +0 -8
- 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/base-classes/base.ts +0 -31
- package/lib-prod/build-info._auto-generated_.ts +0 -27
- 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/env/env.angular-node-app.ts +0 -66
- package/lib-prod/env/env.docs-webapp.ts +0 -66
- package/lib-prod/env/env.electron-app.ts +0 -66
- package/lib-prod/env/env.mobile-app.ts +0 -66
- package/lib-prod/env/env.npm-lib-and-cli-tool.ts +0 -66
- package/lib-prod/env/env.vscode-plugin.ts +0 -66
- package/lib-prod/env/index.ts +0 -6
- 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/index.ts +0 -6
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.ts +0 -21
- 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/index.ts +0 -11
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.ts +0 -23
- 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._auto-generated_.ts +0 -5
- package/lib-prod/index.ts +0 -323
- package/lib-prod/inject.ts +0 -111
- 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/migrations/migrations_index._auto-generated_.ts +0 -5
- 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/index.ts +0 -4
- 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/bin/taon
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --no-deprecation
|
|
2
|
-
//#region @backend
|
|
3
|
-
// --stack-trace-limit=10000
|
|
4
|
-
require('./start');
|
|
5
|
-
//#endregion
|
|
1
|
+
#!/usr/bin/env -S node --no-deprecation
|
|
2
|
+
//#region @backend
|
|
3
|
+
// --stack-trace-limit=10000
|
|
4
|
+
require('./start');
|
|
5
|
+
//#endregion
|
package/bin/taon-debug
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --inspect --stack-trace-limit=10000 --no-deprecation
|
|
2
|
-
//#region @backend
|
|
3
|
-
// --stack-trace-limit=10000
|
|
4
|
-
require('./start');
|
|
5
|
-
//#endregion
|
|
1
|
+
#!/usr/bin/env -S node --inspect --stack-trace-limit=10000 --no-deprecation
|
|
2
|
+
//#region @backend
|
|
3
|
+
// --stack-trace-limit=10000
|
|
4
|
+
require('./start');
|
|
5
|
+
//#endregion
|
package/bin/taon-debug-brk
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --inspect-brk --stack-trace-limit=10000 --no-deprecation
|
|
2
|
-
//#region @backend
|
|
3
|
-
require('./start');
|
|
4
|
-
//#endregion
|
|
1
|
+
#!/usr/bin/env -S node --inspect-brk --stack-trace-limit=10000 --no-deprecation
|
|
2
|
+
//#region @backend
|
|
3
|
+
require('./start');
|
|
4
|
+
//#endregion
|
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.53';
|
|
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.dummy1769816121898 = dummy1769816121898;
|
|
4
|
+
function dummy1769816121898() { }
|
|
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.dummy1769816122455 = dummy1769816122455;
|
|
4
|
+
function dummy1769816122455() { }
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
import { Entity, VersionColumn } from "taon-typeorm/lib-prod";
|
|
12
|
+
import {
|
|
13
|
+
PrimaryGeneratedColumn
|
|
14
|
+
} from "../orm";
|
|
15
|
+
import { TaonBaseEntity } from "./base-entity";
|
|
16
|
+
let TaonBaseAbstractEntity = class extends TaonBaseEntity {
|
|
17
|
+
//#endregion
|
|
18
|
+
id;
|
|
19
|
+
//#endregion
|
|
20
|
+
version;
|
|
21
|
+
};
|
|
22
|
+
__decorateClass([
|
|
23
|
+
PrimaryGeneratedColumn()
|
|
24
|
+
], TaonBaseAbstractEntity.prototype, "id", 2);
|
|
25
|
+
__decorateClass([
|
|
26
|
+
VersionColumn()
|
|
27
|
+
], TaonBaseAbstractEntity.prototype, "version", 2);
|
|
28
|
+
TaonBaseAbstractEntity = __decorateClass([
|
|
29
|
+
Entity()
|
|
30
|
+
], TaonBaseAbstractEntity);
|
|
31
|
+
export {
|
|
32
|
+
TaonBaseAbstractEntity
|
|
33
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { inject as taonInject } from "../inject";
|
|
2
|
+
class TaonBaseAngularService {
|
|
3
|
+
/* */
|
|
4
|
+
/* */
|
|
5
|
+
/* */
|
|
6
|
+
/* */
|
|
7
|
+
/* */
|
|
8
|
+
/* */
|
|
9
|
+
/* */
|
|
10
|
+
/* */
|
|
11
|
+
/* */
|
|
12
|
+
/* */
|
|
13
|
+
/* */
|
|
14
|
+
/* */
|
|
15
|
+
/* */
|
|
16
|
+
/* */
|
|
17
|
+
/* */
|
|
18
|
+
/* */
|
|
19
|
+
/* */
|
|
20
|
+
constructor() {
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns true if the application is running in SSR (server-side rendering) mode only.
|
|
24
|
+
*/
|
|
25
|
+
get isSsrPlatform() {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Returns true if the application is running in browser-only mode.
|
|
30
|
+
*/
|
|
31
|
+
get isBrowserPlatform() {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated
|
|
36
|
+
* Returns the host URL for the backend service
|
|
37
|
+
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
38
|
+
*/
|
|
39
|
+
get host() {
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
injectController(ctor, overrideCurrentContext) {
|
|
43
|
+
return taonInject(() => {
|
|
44
|
+
let currentContext;
|
|
45
|
+
if (!currentContext) {
|
|
46
|
+
throw new Error(
|
|
47
|
+
"No context available. Make sure to initialize the context before injecting controllers."
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
return currentContext ? currentContext.getClass(ctor) : void 0;
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
TaonBaseAngularService
|
|
56
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
class TaonBaseClass {
|
|
5
|
+
//#region class initialization hook
|
|
6
|
+
/**
|
|
7
|
+
* class initialization hook
|
|
8
|
+
* taon after class instance creation
|
|
9
|
+
*/
|
|
10
|
+
async _() {
|
|
11
|
+
}
|
|
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
|
+
const oldValues = ___NS__cloneDeep(this) || {};
|
|
29
|
+
return cloneObj(overrideObjOrFn(oldValues), classFn);
|
|
30
|
+
}
|
|
31
|
+
return cloneObj(overrideObjOrFn, classFn);
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
TaonBaseClass
|
|
37
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createContext } from "../create-context";
|
|
2
|
+
import { TaonGlobalStateContext } from "../global-state/taon-global-state/taon-global-state.abstract.context";
|
|
3
|
+
import { TaonBaseFileUploadMiddleware } from "./base-file-upload.middleware";
|
|
4
|
+
import { TaonBaseRepository } from "./base-repository";
|
|
5
|
+
const TaonBaseContext = createContext(() => ({
|
|
6
|
+
contextName: "TaonBaseContext",
|
|
7
|
+
abstract: true,
|
|
8
|
+
contexts: {
|
|
9
|
+
TaonGlobalStateContext
|
|
10
|
+
},
|
|
11
|
+
middlewares: {
|
|
12
|
+
TaonBaseFileUploadMiddleware
|
|
13
|
+
},
|
|
14
|
+
repositories: {
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
TaonBaseRepository
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
export {
|
|
20
|
+
TaonBaseContext
|
|
21
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
12
|
+
import * as FormData from "form-data";
|
|
13
|
+
import {
|
|
14
|
+
HttpResponseError
|
|
15
|
+
} from "ng2-rest/lib-prod";
|
|
16
|
+
import { crossPlatformPath, fse, path, CoreModels__NS__TaonHttpErrorCustomProp, UtilsTerminal__NS__waitMilliseconds } from "tnp-core/lib-prod";
|
|
17
|
+
import { TaonController } from "../decorators/classes/controller-decorator";
|
|
18
|
+
import { POST } from "../decorators/http/http-methods-decorators";
|
|
19
|
+
import { Body, Query } from "../decorators/http/http-params-decorators";
|
|
20
|
+
import { TaonBaseFileUploadMiddleware } from "./base-file-upload.middleware";
|
|
21
|
+
import { TaonBaseInjector } from "./base-injector";
|
|
22
|
+
let TaonBaseController = class extends TaonBaseInjector {
|
|
23
|
+
/**
|
|
24
|
+
* Hook that is called when taon app is inited
|
|
25
|
+
* (all contexts are created and inited)
|
|
26
|
+
*/
|
|
27
|
+
async afterAllCtxInited(options) {
|
|
28
|
+
}
|
|
29
|
+
uploadFormDataToServer(formData, queryParams) {
|
|
30
|
+
return async (req, res) => {
|
|
31
|
+
const files = req.files;
|
|
32
|
+
if (!files) {
|
|
33
|
+
throw "No file(s) received";
|
|
34
|
+
}
|
|
35
|
+
const responseArr = files.map((f) => {
|
|
36
|
+
const savedAbs = crossPlatformPath(path.resolve(f.path));
|
|
37
|
+
return {
|
|
38
|
+
ok: true,
|
|
39
|
+
originalName: f.originalname,
|
|
40
|
+
savedAs: path.basename(savedAbs),
|
|
41
|
+
// savedPath: void 0, // not needed
|
|
42
|
+
size: f.size,
|
|
43
|
+
mimetype: f.mimetype
|
|
44
|
+
};
|
|
45
|
+
});
|
|
46
|
+
for (const res2 of responseArr) {
|
|
47
|
+
await this.afterFileUploadAction(res2, queryParams || {});
|
|
48
|
+
}
|
|
49
|
+
return responseArr;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region after file upload hook
|
|
54
|
+
/**
|
|
55
|
+
* Hook after file is uploaded
|
|
56
|
+
* through `uploadFormDataToServer` or `uploadLocalFileToServer`
|
|
57
|
+
*/
|
|
58
|
+
afterFileUploadAction(file, queryParams) {
|
|
59
|
+
}
|
|
60
|
+
//#region upload local file to server
|
|
61
|
+
async uploadLocalFileToServer(absFilePath, options, queryParams) {
|
|
62
|
+
const stat = fse.statSync(absFilePath);
|
|
63
|
+
const stream = fse.createReadStream(absFilePath);
|
|
64
|
+
const form = new FormData();
|
|
65
|
+
form.append("file", stream, {
|
|
66
|
+
filename: path.basename(absFilePath),
|
|
67
|
+
knownLength: stat.size
|
|
68
|
+
});
|
|
69
|
+
const data = await this.uploadFormDataToServer(form, queryParams).request(
|
|
70
|
+
options || {}
|
|
71
|
+
);
|
|
72
|
+
return data.body.json;
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
// async check() {
|
|
76
|
+
// await this._waitForProperStatusChange({
|
|
77
|
+
// request: () => this.uploadFormDataToServer(void 0, void 0).request(),
|
|
78
|
+
// statusCheck: resp => resp.body.json[0].ok,
|
|
79
|
+
// });
|
|
80
|
+
// }
|
|
81
|
+
/**
|
|
82
|
+
* Easy way to wait for status change with http (1s default) pooling.
|
|
83
|
+
*
|
|
84
|
+
* example (in sub class):
|
|
85
|
+
* ```ts
|
|
86
|
+
async check() {
|
|
87
|
+
await this.waitForProperStatusChange({
|
|
88
|
+
request: () => this.uploadFormDataToServer(void 0, void 0).request(),
|
|
89
|
+
statusCheck: resp => resp.body.json[0].ok,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
async _waitForProperStatusChange(options) {
|
|
95
|
+
const poolingInterval = options.poolingInterval || 1e3;
|
|
96
|
+
const taonRequest = options.request;
|
|
97
|
+
let maxTries = options.maxTries || Number.POSITIVE_INFINITY;
|
|
98
|
+
let i = 0;
|
|
99
|
+
let httpErrorsCount = 0;
|
|
100
|
+
while (true) {
|
|
101
|
+
await UtilsTerminal__NS__waitMilliseconds(poolingInterval);
|
|
102
|
+
try {
|
|
103
|
+
const resp = await taonRequest({
|
|
104
|
+
reqIndexNum: i,
|
|
105
|
+
httpErrorsCount
|
|
106
|
+
});
|
|
107
|
+
if (options.statusCheck && options.statusCheck(resp)) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
} catch (error) {
|
|
111
|
+
httpErrorsCount++;
|
|
112
|
+
if (options.loopRequestsOnBackendError) {
|
|
113
|
+
const isProperTaonError = error instanceof HttpResponseError && error.body.json[CoreModels__NS__TaonHttpErrorCustomProp];
|
|
114
|
+
const isHttpError = error instanceof HttpResponseError && !isProperTaonError;
|
|
115
|
+
const isUnknownError = !(error instanceof HttpResponseError);
|
|
116
|
+
const resBool = await options.loopRequestsOnBackendError({
|
|
117
|
+
taonError: isProperTaonError ? error : void 0,
|
|
118
|
+
unknownHttpError: isHttpError ? error : void 0,
|
|
119
|
+
unknownError: isUnknownError ? error : void 0,
|
|
120
|
+
reqIndexNum: i,
|
|
121
|
+
httpErrorsCount
|
|
122
|
+
});
|
|
123
|
+
if (resBool) {
|
|
124
|
+
i++;
|
|
125
|
+
continue;
|
|
126
|
+
} else {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (httpErrorsCount > (options.allowedHttpErrors || Number.POSITIVE_INFINITY)) {
|
|
131
|
+
throw new Error(
|
|
132
|
+
`Too many http errors (${httpErrorsCount}) for "${options.actionName}".`
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (i++ > maxTries) {
|
|
137
|
+
throw new Error(
|
|
138
|
+
`Timeout waiting for "${options.actionName}" to be finished. Waited for ${maxTries} seconds`
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
__decorateClass([
|
|
145
|
+
POST({
|
|
146
|
+
overrideContentType: "multipart/form-data",
|
|
147
|
+
middlewares: ({ parentMiddlewares }) => ({
|
|
148
|
+
...parentMiddlewares,
|
|
149
|
+
TaonBaseFileUploadMiddleware
|
|
150
|
+
})
|
|
151
|
+
}),
|
|
152
|
+
__decorateParam(0, Body()),
|
|
153
|
+
__decorateParam(1, Query())
|
|
154
|
+
], TaonBaseController.prototype, "uploadFormDataToServer", 1);
|
|
155
|
+
TaonBaseController = __decorateClass([
|
|
156
|
+
TaonController({
|
|
157
|
+
className: "TaonBaseController"
|
|
158
|
+
})
|
|
159
|
+
], TaonBaseController);
|
|
160
|
+
export {
|
|
161
|
+
TaonBaseController
|
|
162
|
+
};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);
|
|
12
|
+
import { ___NS__isArray, ___NS__isFunction, ___NS__isString, Helpers__NS__error, Helpers__NS__warn } from "tnp-core/lib-prod";
|
|
13
|
+
import { TaonController } from "../decorators/classes/controller-decorator";
|
|
14
|
+
import {
|
|
15
|
+
GET,
|
|
16
|
+
PUT,
|
|
17
|
+
DELETE,
|
|
18
|
+
POST,
|
|
19
|
+
PATCH
|
|
20
|
+
} from "../decorators/http/http-methods-decorators";
|
|
21
|
+
import { Query, Body } from "../decorators/http/http-params-decorators";
|
|
22
|
+
import { ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getName } from "../helpers/class-helpers";
|
|
23
|
+
import { Symbols__NS__metadata, Symbols__NS__old } from "../symbols";
|
|
24
|
+
import { Validators__NS__preventUndefinedModel } from "../validators";
|
|
25
|
+
import { TaonBaseController } from "./base-controller";
|
|
26
|
+
let TaonBaseCrudController = class extends TaonBaseController {
|
|
27
|
+
//#region fields
|
|
28
|
+
db;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region init
|
|
31
|
+
async _() {
|
|
32
|
+
if (!___NS__isFunction(this.entityClassResolveFn)) {
|
|
33
|
+
Helpers__NS__warn(
|
|
34
|
+
`Skipping initing CRUD controller ${ClassHelpers__NS__getName(
|
|
35
|
+
this
|
|
36
|
+
)} because entityClassResolveFn is not provided.`
|
|
37
|
+
);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
let entityClassFn = this.entityClassResolveFn();
|
|
41
|
+
this.db = this.injectRepo(entityClassFn);
|
|
42
|
+
if (entityClassFn) {
|
|
43
|
+
const configEntity = Reflect.getMetadata(
|
|
44
|
+
Symbols__NS__metadata.options.entity,
|
|
45
|
+
ClassHelpers__NS__getClassFnFromObject(this)
|
|
46
|
+
);
|
|
47
|
+
if (configEntity?.createTable === false) {
|
|
48
|
+
Helpers__NS__warn(
|
|
49
|
+
`Table for entity ${ClassHelpers__NS__getName(
|
|
50
|
+
entityClassFn
|
|
51
|
+
)} will not be created. Crud will not work properly.`
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
Helpers__NS__error(`Entity class not provided for controller ${ClassHelpers__NS__getName(
|
|
56
|
+
this
|
|
57
|
+
)}.
|
|
58
|
+
|
|
59
|
+
Please provide entity as class property entityClassFn:
|
|
60
|
+
|
|
61
|
+
class ${ClassHelpers__NS__getName(this)} extends TaonBaseCrudController<Entity> {
|
|
62
|
+
// ...
|
|
63
|
+
entityClassResolveFn = ()=> MyEntityClass;
|
|
64
|
+
// ...
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
`);
|
|
68
|
+
}
|
|
69
|
+
await super._();
|
|
70
|
+
}
|
|
71
|
+
bufforedChanges(id, property, alreadyLength) {
|
|
72
|
+
return async (request, response) => {
|
|
73
|
+
const model = await this.db.getBy(id);
|
|
74
|
+
if (model === void 0) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
Validators__NS__preventUndefinedModel(model, id);
|
|
78
|
+
let value = model[property];
|
|
79
|
+
let result;
|
|
80
|
+
if (___NS__isString(value) || ___NS__isArray(value)) {
|
|
81
|
+
result = value.slice(alreadyLength);
|
|
82
|
+
}
|
|
83
|
+
return result;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
pagination(pageNumber = 1, pageSize = 10, search = "") {
|
|
87
|
+
return async (request, response) => {
|
|
88
|
+
if (this.db.repositoryExists) {
|
|
89
|
+
const query = {
|
|
90
|
+
page: pageNumber,
|
|
91
|
+
take: pageSize,
|
|
92
|
+
keyword: search
|
|
93
|
+
};
|
|
94
|
+
const take = query.take || 10;
|
|
95
|
+
const page = query.page || 1;
|
|
96
|
+
const skip = (page - 1) * take;
|
|
97
|
+
const keyword = query.keyword || "";
|
|
98
|
+
const [result, total] = await this.db.findAndCount({
|
|
99
|
+
// where: { name: Like('%' + keyword + '%') },
|
|
100
|
+
// order: { name: "DESC" },
|
|
101
|
+
take,
|
|
102
|
+
skip
|
|
103
|
+
});
|
|
104
|
+
response?.setHeader(Symbols__NS__old.X_TOTAL_COUNT, total);
|
|
105
|
+
return result;
|
|
106
|
+
}
|
|
107
|
+
return [];
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
getAll() {
|
|
111
|
+
return async (request, response) => {
|
|
112
|
+
if (this.db.repositoryExists) {
|
|
113
|
+
const { models, totalCount } = await this.db.getAll();
|
|
114
|
+
response?.setHeader(Symbols__NS__old.X_TOTAL_COUNT, totalCount);
|
|
115
|
+
return models;
|
|
116
|
+
}
|
|
117
|
+
return [];
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
getBy(id) {
|
|
121
|
+
return async () => {
|
|
122
|
+
const model = await this.db.getBy(id);
|
|
123
|
+
return model;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
updateById(id, item) {
|
|
127
|
+
return async () => {
|
|
128
|
+
const model = await this.db.updateById(id, item);
|
|
129
|
+
return model;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
patchById(id, item) {
|
|
133
|
+
return async () => {
|
|
134
|
+
const model = await this.db.updateById(id, item);
|
|
135
|
+
return model;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
bulkUpdate(items) {
|
|
139
|
+
return async () => {
|
|
140
|
+
if (!Array.isArray(items) || items?.length === 0) {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
const { models } = await this.db.bulkUpdate(items);
|
|
144
|
+
return models;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
deleteById(id) {
|
|
148
|
+
return async () => {
|
|
149
|
+
const model = await this.db.deleteById(id);
|
|
150
|
+
return model;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
bulkDelete(ids) {
|
|
154
|
+
return async () => {
|
|
155
|
+
const models = await this.db.bulkDelete(ids);
|
|
156
|
+
return models;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
clearTable() {
|
|
160
|
+
return async () => {
|
|
161
|
+
await this.db.clear();
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
save(item) {
|
|
165
|
+
return async () => {
|
|
166
|
+
const model = await this.db.save(item);
|
|
167
|
+
return model;
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
bulkCreate(items) {
|
|
171
|
+
return async () => {
|
|
172
|
+
const models = await this.db.bulkCreate(items);
|
|
173
|
+
return models;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
177
|
+
};
|
|
178
|
+
__decorateClass([
|
|
179
|
+
GET(),
|
|
180
|
+
__decorateParam(0, Query(`id`)),
|
|
181
|
+
__decorateParam(1, Query(`property`)),
|
|
182
|
+
__decorateParam(2, Query("alreadyLength"))
|
|
183
|
+
], TaonBaseCrudController.prototype, "bufforedChanges", 1);
|
|
184
|
+
__decorateClass([
|
|
185
|
+
GET(),
|
|
186
|
+
__decorateParam(0, Query("pageNumber")),
|
|
187
|
+
__decorateParam(1, Query("pageSize")),
|
|
188
|
+
__decorateParam(2, Query("search"))
|
|
189
|
+
], TaonBaseCrudController.prototype, "pagination", 1);
|
|
190
|
+
__decorateClass([
|
|
191
|
+
GET()
|
|
192
|
+
], TaonBaseCrudController.prototype, "getAll", 1);
|
|
193
|
+
__decorateClass([
|
|
194
|
+
GET(),
|
|
195
|
+
__decorateParam(0, Query(`id`))
|
|
196
|
+
], TaonBaseCrudController.prototype, "getBy", 1);
|
|
197
|
+
__decorateClass([
|
|
198
|
+
PUT(),
|
|
199
|
+
__decorateParam(0, Query(`id`)),
|
|
200
|
+
__decorateParam(1, Body())
|
|
201
|
+
], TaonBaseCrudController.prototype, "updateById", 1);
|
|
202
|
+
__decorateClass([
|
|
203
|
+
PATCH(),
|
|
204
|
+
__decorateParam(0, Query(`id`)),
|
|
205
|
+
__decorateParam(1, Body())
|
|
206
|
+
], TaonBaseCrudController.prototype, "patchById", 1);
|
|
207
|
+
__decorateClass([
|
|
208
|
+
PUT(),
|
|
209
|
+
__decorateParam(0, Body())
|
|
210
|
+
], TaonBaseCrudController.prototype, "bulkUpdate", 1);
|
|
211
|
+
__decorateClass([
|
|
212
|
+
DELETE(),
|
|
213
|
+
__decorateParam(0, Query(`id`))
|
|
214
|
+
], TaonBaseCrudController.prototype, "deleteById", 1);
|
|
215
|
+
__decorateClass([
|
|
216
|
+
DELETE(),
|
|
217
|
+
__decorateParam(0, Query(`ids`))
|
|
218
|
+
], TaonBaseCrudController.prototype, "bulkDelete", 1);
|
|
219
|
+
__decorateClass([
|
|
220
|
+
DELETE()
|
|
221
|
+
], TaonBaseCrudController.prototype, "clearTable", 1);
|
|
222
|
+
__decorateClass([
|
|
223
|
+
POST(),
|
|
224
|
+
__decorateParam(0, Body())
|
|
225
|
+
], TaonBaseCrudController.prototype, "save", 1);
|
|
226
|
+
__decorateClass([
|
|
227
|
+
POST(),
|
|
228
|
+
__decorateParam(0, Body())
|
|
229
|
+
], TaonBaseCrudController.prototype, "bulkCreate", 1);
|
|
230
|
+
TaonBaseCrudController = __decorateClass([
|
|
231
|
+
TaonController({ className: "TaonBaseCrudController" })
|
|
232
|
+
], TaonBaseCrudController);
|
|
233
|
+
export {
|
|
234
|
+
TaonBaseCrudController
|
|
235
|
+
};
|