taon 19.0.86 → 21.0.6
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/fesm2022/taon.mjs +1953 -1238
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/taon.d.ts +2152 -0
- package/lib/base-classes/base-abstract-entity.d.ts +1 -1
- package/lib/base-classes/base-abstract-entity.js +12 -12
- package/lib/base-classes/base-abstract-entity.js.map +1 -1
- package/lib/base-classes/base-angular-service.d.ts +1 -1
- package/lib/base-classes/base-angular-service.js +6 -3
- package/lib/base-classes/base-angular-service.js.map +1 -1
- package/lib/base-classes/base-context.d.ts +2 -2
- package/lib/base-classes/base-controller.js +7 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/base-classes/base-crud-controller.js +52 -12
- package/lib/base-classes/base-crud-controller.js.map +1 -1
- package/lib/base-classes/base-entity.js +2 -6
- package/lib/base-classes/base-entity.js.map +1 -1
- package/lib/base-classes/base-repository.d.ts +1 -1
- package/lib/base-classes/base-repository.js +15 -10
- package/lib/base-classes/base-repository.js.map +1 -1
- package/lib/base-classes/base.d.ts +1 -46
- package/lib/base-classes/base.js +17 -30
- package/lib/base-classes/base.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/create-context.d.ts +4 -4
- package/lib/decorators/classes/entity-decorator.js +1 -1
- package/lib/decorators/classes/entity-decorator.js.map +1 -1
- package/lib/decorators/http/http-decorators.d.ts +1 -19
- package/lib/decorators/http/http-decorators.js +20 -22
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/endpoint-context.d.ts +2 -2
- package/lib/formly/{formly-group-wrapper-component.d.ts → formly-group-wrapper.component.d.ts} +1 -1
- package/lib/formly/{formly-repeat-component.d.ts → formly-repeat.component.d.ts} +1 -1
- package/lib/formly/fromly.js +24 -24
- package/lib/formly/fromly.js.map +1 -1
- package/lib/index.d.ts +146 -45
- package/lib/index.js +166 -55
- package/lib/index.js.map +1 -1
- package/lib/orm/columns.d.ts +28 -0
- package/lib/orm/columns.js +102 -0
- package/lib/orm/columns.js.map +1 -0
- package/lib/orm/index.d.ts +1 -0
- package/lib/orm/index.js +73 -0
- package/lib/orm/index.js.map +1 -0
- package/lib/realtime/realtime-core.d.ts +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +1 -2
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy.d.ts +1 -1
- package/lib/realtime/realtime-subs-manager.d.ts +1 -1
- package/lib/symbols.d.ts +31 -31
- package/lib/symbols.js +59 -59
- package/lib/symbols.js.map +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/package.json +6 -6
- package/websql/fesm2022/taon.mjs +1316 -648
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/taon.d.ts +2161 -0
- package/browser/index.d.ts +0 -6
- package/browser/lib/base-classes/base-abstract-entity.d.ts +0 -8
- package/browser/lib/base-classes/base-angular-service.d.ts +0 -34
- package/browser/lib/base-classes/base-class.d.ts +0 -16
- package/browser/lib/base-classes/base-context.d.ts +0 -21
- package/browser/lib/base-classes/base-controller.d.ts +0 -83
- package/browser/lib/base-classes/base-crud-controller.d.ts +0 -29
- package/browser/lib/base-classes/base-custom-repository.d.ts +0 -4
- package/browser/lib/base-classes/base-entity.d.ts +0 -17
- package/browser/lib/base-classes/base-file-upload.middleware.d.ts +0 -15
- package/browser/lib/base-classes/base-injector.d.ts +0 -68
- package/browser/lib/base-classes/base-middleware.d.ts +0 -39
- package/browser/lib/base-classes/base-migration.d.ts +0 -12
- package/browser/lib/base-classes/base-provider.d.ts +0 -9
- package/browser/lib/base-classes/base-repository.d.ts +0 -267
- package/browser/lib/base-classes/base-subscriber-for-entity.d.ts +0 -82
- package/browser/lib/base-classes/base.d.ts +0 -47
- package/browser/lib/config/controller-config.d.ts +0 -22
- package/browser/lib/config/controller-options.d.ts +0 -17
- package/browser/lib/config/method-config.d.ts +0 -40
- package/browser/lib/config/param-config.d.ts +0 -9
- package/browser/lib/constants.d.ts +0 -10
- package/browser/lib/context-db-migrations.d.ts +0 -18
- package/browser/lib/create-context.d.ts +0 -79
- package/browser/lib/decorators/classes/controller-decorator.d.ts +0 -6
- package/browser/lib/decorators/classes/entity-decorator.d.ts +0 -20
- package/browser/lib/decorators/classes/middleware-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/migration-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/provider-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/repository-decorator.d.ts +0 -8
- package/browser/lib/decorators/classes/subscriber-decorator.d.ts +0 -9
- package/browser/lib/decorators/decorator-abstract-opt.d.ts +0 -4
- package/browser/lib/decorators/http/http-decorators.d.ts +0 -21
- package/browser/lib/decorators/http/http-methods-decorators.d.ts +0 -71
- package/browser/lib/decorators/http/http-params-decorators.d.ts +0 -9
- package/browser/lib/dependency-injection/di-container.d.ts +0 -6
- package/browser/lib/endpoint-context-storage.d.ts +0 -12
- package/browser/lib/endpoint-context.d.ts +0 -198
- package/browser/lib/entity-process.d.ts +0 -40
- package/browser/lib/get-response-value.d.ts +0 -7
- package/browser/lib/helpers/class-helpers.d.ts +0 -25
- package/browser/lib/helpers/clone-obj.d.ts +0 -2
- package/browser/lib/helpers/taon-helpers.d.ts +0 -19
- package/browser/lib/index.d.ts +0 -129
- package/browser/lib/inject.d.ts +0 -5
- package/browser/lib/models.d.ts +0 -257
- package/browser/lib/orm.d.ts +0 -3
- package/browser/lib/realtime/realtime-client.d.ts +0 -42
- package/browser/lib/realtime/realtime-core.d.ts +0 -41
- package/browser/lib/realtime/realtime-server.d.ts +0 -44
- package/browser/lib/realtime/realtime-strategy/index.d.ts +0 -5
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +0 -82
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +0 -15
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +0 -16
- package/browser/lib/realtime/realtime-strategy/realtime-strategy.d.ts +0 -12
- package/browser/lib/realtime/realtime-subs-manager.d.ts +0 -15
- package/browser/lib/realtime/realtime.models.d.ts +0 -28
- package/browser/lib/symbols.d.ts +0 -66
- package/browser/lib/ui/index.d.ts +0 -2
- package/browser/lib/ui/taon-admin-mode-configuration/index.d.ts +0 -2
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +0 -22
- package/browser/lib/validators.d.ts +0 -8
- package/browser/public-api.d.ts +0 -2
- package/lib/formly/formly-group-wrapper-component.js +0 -51
- package/lib/formly/formly-group-wrapper-component.js.map +0 -1
- package/lib/formly/formly-repeat-component.js +0 -95
- package/lib/formly/formly-repeat-component.js.map +0 -1
- package/lib/orm.d.ts +0 -68
- package/lib/orm.js +0 -112
- package/lib/orm.js.map +0 -1
- package/websql/index.d.ts +0 -6
- package/websql/lib/base-classes/base-abstract-entity.d.ts +0 -8
- package/websql/lib/base-classes/base-angular-service.d.ts +0 -34
- package/websql/lib/base-classes/base-class.d.ts +0 -16
- package/websql/lib/base-classes/base-context.d.ts +0 -21
- package/websql/lib/base-classes/base-controller.d.ts +0 -83
- package/websql/lib/base-classes/base-crud-controller.d.ts +0 -29
- package/websql/lib/base-classes/base-custom-repository.d.ts +0 -4
- package/websql/lib/base-classes/base-entity.d.ts +0 -17
- package/websql/lib/base-classes/base-file-upload.middleware.d.ts +0 -15
- package/websql/lib/base-classes/base-injector.d.ts +0 -68
- package/websql/lib/base-classes/base-middleware.d.ts +0 -39
- package/websql/lib/base-classes/base-migration.d.ts +0 -12
- package/websql/lib/base-classes/base-provider.d.ts +0 -9
- package/websql/lib/base-classes/base-repository.d.ts +0 -272
- package/websql/lib/base-classes/base-subscriber-for-entity.d.ts +0 -82
- package/websql/lib/base-classes/base.d.ts +0 -47
- package/websql/lib/config/controller-config.d.ts +0 -22
- package/websql/lib/config/controller-options.d.ts +0 -17
- package/websql/lib/config/method-config.d.ts +0 -40
- package/websql/lib/config/param-config.d.ts +0 -9
- package/websql/lib/constants.d.ts +0 -10
- package/websql/lib/context-db-migrations.d.ts +0 -18
- package/websql/lib/create-context.d.ts +0 -79
- package/websql/lib/decorators/classes/controller-decorator.d.ts +0 -6
- package/websql/lib/decorators/classes/entity-decorator.d.ts +0 -20
- package/websql/lib/decorators/classes/middleware-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/migration-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/provider-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/repository-decorator.d.ts +0 -8
- package/websql/lib/decorators/classes/subscriber-decorator.d.ts +0 -9
- package/websql/lib/decorators/decorator-abstract-opt.d.ts +0 -4
- package/websql/lib/decorators/http/http-decorators.d.ts +0 -21
- package/websql/lib/decorators/http/http-methods-decorators.d.ts +0 -71
- package/websql/lib/decorators/http/http-params-decorators.d.ts +0 -9
- package/websql/lib/dependency-injection/di-container.d.ts +0 -6
- package/websql/lib/endpoint-context-storage.d.ts +0 -12
- package/websql/lib/endpoint-context.d.ts +0 -200
- package/websql/lib/entity-process.d.ts +0 -40
- package/websql/lib/get-response-value.d.ts +0 -7
- package/websql/lib/helpers/class-helpers.d.ts +0 -25
- package/websql/lib/helpers/clone-obj.d.ts +0 -2
- package/websql/lib/helpers/taon-helpers.d.ts +0 -19
- package/websql/lib/index.d.ts +0 -129
- package/websql/lib/inject.d.ts +0 -5
- package/websql/lib/models.d.ts +0 -261
- package/websql/lib/orm.d.ts +0 -69
- package/websql/lib/realtime/realtime-client.d.ts +0 -42
- package/websql/lib/realtime/realtime-core.d.ts +0 -41
- package/websql/lib/realtime/realtime-server.d.ts +0 -44
- package/websql/lib/realtime/realtime-strategy/index.d.ts +0 -5
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +0 -82
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +0 -15
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +0 -16
- package/websql/lib/realtime/realtime-strategy/realtime-strategy.d.ts +0 -12
- package/websql/lib/realtime/realtime-subs-manager.d.ts +0 -15
- package/websql/lib/realtime/realtime.models.d.ts +0 -28
- package/websql/lib/symbols.d.ts +0 -66
- package/websql/lib/ui/index.d.ts +0 -2
- package/websql/lib/ui/taon-admin-mode-configuration/index.d.ts +0 -2
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +0 -22
- package/websql/lib/validators.d.ts +0 -8
- package/websql/public-api.d.ts +0 -2
package/browser/public-api.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.FormlyHorizontalWrapper = void 0;
|
|
10
|
-
const core_1 = require("@angular/core");
|
|
11
|
-
const core_2 = require("@ngx-formly/core");
|
|
12
|
-
let FormlyHorizontalWrapper = class FormlyHorizontalWrapper extends core_2.FieldWrapper {
|
|
13
|
-
fieldComponent;
|
|
14
|
-
};
|
|
15
|
-
exports.FormlyHorizontalWrapper = FormlyHorizontalWrapper;
|
|
16
|
-
__decorate([
|
|
17
|
-
(0, core_1.ViewChild)('fieldComponent', { read: core_1.ViewContainerRef }) // @ts-ignore
|
|
18
|
-
], FormlyHorizontalWrapper.prototype, "fieldComponent", void 0);
|
|
19
|
-
exports.FormlyHorizontalWrapper = FormlyHorizontalWrapper = __decorate([
|
|
20
|
-
(0, core_1.Component)({
|
|
21
|
-
selector: 'formly-horizontal-wrapper',
|
|
22
|
-
standalone: false,
|
|
23
|
-
template: `
|
|
24
|
-
<div class="form-group row">
|
|
25
|
-
<label
|
|
26
|
-
[attr.for]="id"
|
|
27
|
-
class="col-sm-2 col-form-label"
|
|
28
|
-
*ngIf="to.label">
|
|
29
|
-
{{ to.label }}
|
|
30
|
-
<ng-container *ngIf="to.required && to.hideRequiredMarker !== true"
|
|
31
|
-
>*</ng-container
|
|
32
|
-
>
|
|
33
|
-
</label>
|
|
34
|
-
<div class="col-sm-10">
|
|
35
|
-
<ng-template #fieldComponent></ng-template>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
`,
|
|
39
|
-
styles: [
|
|
40
|
-
`
|
|
41
|
-
:host {
|
|
42
|
-
display: block;
|
|
43
|
-
padding: 5px;
|
|
44
|
-
margin-bottom: 5px;
|
|
45
|
-
border: 1px dotted gray;
|
|
46
|
-
}
|
|
47
|
-
`,
|
|
48
|
-
],
|
|
49
|
-
})
|
|
50
|
-
], FormlyHorizontalWrapper);
|
|
51
|
-
//# sourceMappingURL=formly-group-wrapper-component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formly-group-wrapper-component.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;;;;;;;AAAA,wCAAuE;AACvE,2CAAgD;AAgCzC,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,mBAAY;IAEvD,cAAc,CAAmB;CAClC,CAAA;AAHY,0DAAuB;AAElC;IADC,IAAA,gBAAS,EAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC,CAAC,aAAa;+DACrC;kCAFtB,uBAAuB;IA9BnC,IAAA,gBAAS,EAAC;QACT,QAAQ,EAAE,2BAA2B;QACrC,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE;;;;;;;;;;;;;;;GAeT;QACD,MAAM,EAAE;YACN;;;;;;;KAOC;SACF;KACF,CAAC;GACW,uBAAuB,CAGnC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.RepeatTypeComponent = void 0;
|
|
10
|
-
const core_1 = require("@angular/core");
|
|
11
|
-
const core_2 = require("@ngx-formly/core");
|
|
12
|
-
/*
|
|
13
|
-
|
|
14
|
-
DON'T FORGET
|
|
15
|
-
...
|
|
16
|
-
FormlyModule.forRoot({
|
|
17
|
-
types: [
|
|
18
|
-
{ name: 'repeat', component: RepeatTypeComponent },
|
|
19
|
-
],
|
|
20
|
-
}),
|
|
21
|
-
...
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
let RepeatTypeComponent = class RepeatTypeComponent extends core_2.FieldArrayType {
|
|
25
|
-
get labelTemplate() {
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
return this.field.fieldArray.templateOptions.label; // TODO QUICK_FIX
|
|
28
|
-
}
|
|
29
|
-
constructor(builder) {
|
|
30
|
-
// TODO QUICK_FIX
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
super(builder);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
exports.RepeatTypeComponent = RepeatTypeComponent;
|
|
36
|
-
exports.RepeatTypeComponent = RepeatTypeComponent = __decorate([
|
|
37
|
-
(0, core_1.Component)({
|
|
38
|
-
selector: 'formly-repeat-section',
|
|
39
|
-
standalone: false,
|
|
40
|
-
template: `
|
|
41
|
-
<div *ngIf="field.fieldGroup && field.fieldGroup.length === 0">
|
|
42
|
-
Press button to add new element...
|
|
43
|
-
</div>
|
|
44
|
-
<div
|
|
45
|
-
*ngFor="let field of field.fieldGroup; let i = index"
|
|
46
|
-
class="taon-formly-array">
|
|
47
|
-
<formly-group
|
|
48
|
-
[model]="model[i]"
|
|
49
|
-
[field]="field"
|
|
50
|
-
[options]="options"
|
|
51
|
-
[form]="formControl">
|
|
52
|
-
<div>
|
|
53
|
-
<button
|
|
54
|
-
class="btn btn-danger"
|
|
55
|
-
type="button"
|
|
56
|
-
(click)="remove(i)">
|
|
57
|
-
Remove
|
|
58
|
-
</button>
|
|
59
|
-
</div>
|
|
60
|
-
</formly-group>
|
|
61
|
-
</div>
|
|
62
|
-
<div>
|
|
63
|
-
<button
|
|
64
|
-
class="btn btn-primary"
|
|
65
|
-
type="button"
|
|
66
|
-
(click)="add()">
|
|
67
|
-
{{ labelTemplate }}
|
|
68
|
-
</button>
|
|
69
|
-
</div>
|
|
70
|
-
`,
|
|
71
|
-
styles: [
|
|
72
|
-
`
|
|
73
|
-
:host {
|
|
74
|
-
display: block;
|
|
75
|
-
padding: 5px;
|
|
76
|
-
margin-bottom: 5px;
|
|
77
|
-
border: 1px solid gray;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
formly-group {
|
|
81
|
-
display: block;
|
|
82
|
-
border: 1px dashed gray;
|
|
83
|
-
margin-bottom: 5px;
|
|
84
|
-
padding: 5px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.taon-formly-array {
|
|
88
|
-
padding: 5px;
|
|
89
|
-
background: white;
|
|
90
|
-
}
|
|
91
|
-
`,
|
|
92
|
-
],
|
|
93
|
-
})
|
|
94
|
-
], RepeatTypeComponent);
|
|
95
|
-
//# sourceMappingURL=formly-repeat-component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formly-repeat-component.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;;;;;;;AAAA,wCAA0C;AAC1C,2CAAqE;AAErE;;;;;;;;;;;EAWE;AA2DK,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,qBAAc;IACrD,IAAI,aAAa;QACf,aAAa;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,iBAAiB;IACvE,CAAC;IACD,YAAY,OAA0B;QACpC,iBAAiB;QACjB,aAAa;QACb,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF,CAAA;AAVY,kDAAmB;8BAAnB,mBAAmB;IAzD/B,IAAA,gBAAS,EAAC;QACT,QAAQ,EAAE,uBAAuB;QACjC,UAAU,EAAE,KAAK;QACjB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BT;QACD,MAAM,EAAE;YACN;;;;;;;;;;;;;;;;;;;KAmBC;SACF;KACF,CAAC;GACW,mBAAmB,CAU/B"}
|
package/lib/orm.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as tsorm from 'taon-typeorm';
|
|
2
|
-
export declare namespace Orm {
|
|
3
|
-
const Repository: typeof tsorm.Repository;
|
|
4
|
-
export import Connection = tsorm.Connection;
|
|
5
|
-
namespace ListenEvent {
|
|
6
|
-
export import AfterInsert = tsorm.AfterInsert;
|
|
7
|
-
export import AfterLoad = tsorm.AfterLoad;
|
|
8
|
-
export import AfterRecover = tsorm.AfterRecover;
|
|
9
|
-
export import AfterRemove = tsorm.AfterRemove;
|
|
10
|
-
export import AfterSoftRemove = tsorm.AfterSoftRemove;
|
|
11
|
-
export import AfterUpdate = tsorm.AfterUpdate;
|
|
12
|
-
export import BeforeInsert = tsorm.BeforeInsert;
|
|
13
|
-
export import BeforeRecover = tsorm.BeforeRecover;
|
|
14
|
-
export import BeforeRemove = tsorm.BeforeRemove;
|
|
15
|
-
export import BeforeSoftRemove = tsorm.BeforeSoftRemove;
|
|
16
|
-
export import BeforeUpdate = tsorm.BeforeUpdate;
|
|
17
|
-
}
|
|
18
|
-
namespace Tree {
|
|
19
|
-
export import Children = tsorm.TreeChildren;
|
|
20
|
-
export import Parent = tsorm.TreeParent;
|
|
21
|
-
}
|
|
22
|
-
namespace Column {
|
|
23
|
-
export import Generated = tsorm.PrimaryGeneratedColumn;
|
|
24
|
-
export import Primary = tsorm.PrimaryColumn;
|
|
25
|
-
export import Index = tsorm.Index;
|
|
26
|
-
export import CreateDate = tsorm.CreateDateColumn;
|
|
27
|
-
export import UpdateDate = tsorm.UpdateDateColumn;
|
|
28
|
-
export import DeleteDate = tsorm.DeleteDateColumn;
|
|
29
|
-
export import Custom = tsorm.Column;
|
|
30
|
-
/**
|
|
31
|
-
* 100 default characters varchar
|
|
32
|
-
*/
|
|
33
|
-
const String: <T = string>(defaultValue?: T, length?: number) => PropertyDecorator;
|
|
34
|
-
/**
|
|
35
|
-
* 100 characters varchar
|
|
36
|
-
*/
|
|
37
|
-
const String100: <T = string>(defaultValue?: T) => PropertyDecorator;
|
|
38
|
-
/**
|
|
39
|
-
* 100 characters varchar
|
|
40
|
-
*/
|
|
41
|
-
const String45: <T = string>(defaultValue?: T) => PropertyDecorator;
|
|
42
|
-
/**
|
|
43
|
-
* 500 characters varchar
|
|
44
|
-
*/
|
|
45
|
-
const String500: <T = string>(defaultValue?: T) => PropertyDecorator;
|
|
46
|
-
/**
|
|
47
|
-
* 200 characters varchar
|
|
48
|
-
*/
|
|
49
|
-
const String200: <T = string>(defaultValue?: T) => PropertyDecorator;
|
|
50
|
-
const Number: () => PropertyDecorator;
|
|
51
|
-
const DecimalNumber: () => PropertyDecorator;
|
|
52
|
-
const SimpleJson: () => PropertyDecorator;
|
|
53
|
-
const Boolean: (defaultValue: boolean | null) => PropertyDecorator;
|
|
54
|
-
const DateTIme: (defaultValue?: boolean | null) => PropertyDecorator;
|
|
55
|
-
export import Version = tsorm.VersionColumn;
|
|
56
|
-
export import Virtual = tsorm.VirtualColumn;
|
|
57
|
-
}
|
|
58
|
-
namespace Join {
|
|
59
|
-
export import Table = tsorm.JoinTable;
|
|
60
|
-
export import Column = tsorm.JoinColumn;
|
|
61
|
-
}
|
|
62
|
-
namespace Relation {
|
|
63
|
-
export import OneToMany = tsorm.OneToMany;
|
|
64
|
-
export import OneToOne = tsorm.OneToOne;
|
|
65
|
-
export import ManyToMany = tsorm.ManyToMany;
|
|
66
|
-
export import ManyToOne = tsorm.ManyToOne;
|
|
67
|
-
}
|
|
68
|
-
}
|
package/lib/orm.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Orm = void 0;
|
|
4
|
-
//#region @websql
|
|
5
|
-
const tsorm = require("taon-typeorm/lib");
|
|
6
|
-
//#endregion
|
|
7
|
-
const lib_1 = require("tnp-core/lib");
|
|
8
|
-
//#region orm
|
|
9
|
-
var Orm;
|
|
10
|
-
(function (Orm) {
|
|
11
|
-
//#region @websql
|
|
12
|
-
Orm.Repository = tsorm.Repository;
|
|
13
|
-
Orm.Connection = tsorm.Connection;
|
|
14
|
-
let ListenEvent;
|
|
15
|
-
(function (ListenEvent) {
|
|
16
|
-
ListenEvent.AfterInsert = tsorm.AfterInsert;
|
|
17
|
-
ListenEvent.AfterLoad = tsorm.AfterLoad;
|
|
18
|
-
ListenEvent.AfterRecover = tsorm.AfterRecover;
|
|
19
|
-
ListenEvent.AfterRemove = tsorm.AfterRemove;
|
|
20
|
-
ListenEvent.AfterSoftRemove = tsorm.AfterSoftRemove;
|
|
21
|
-
ListenEvent.AfterUpdate = tsorm.AfterUpdate;
|
|
22
|
-
ListenEvent.BeforeInsert = tsorm.BeforeInsert;
|
|
23
|
-
ListenEvent.BeforeRecover = tsorm.BeforeRecover;
|
|
24
|
-
ListenEvent.BeforeRemove = tsorm.BeforeRemove;
|
|
25
|
-
ListenEvent.BeforeSoftRemove = tsorm.BeforeSoftRemove;
|
|
26
|
-
ListenEvent.BeforeUpdate = tsorm.BeforeUpdate;
|
|
27
|
-
})(ListenEvent = Orm.ListenEvent || (Orm.ListenEvent = {}));
|
|
28
|
-
let Tree;
|
|
29
|
-
(function (Tree) {
|
|
30
|
-
Tree.Children = tsorm.TreeChildren;
|
|
31
|
-
Tree.Parent = tsorm.TreeParent;
|
|
32
|
-
})(Tree = Orm.Tree || (Orm.Tree = {}));
|
|
33
|
-
let Column;
|
|
34
|
-
(function (Column) {
|
|
35
|
-
Column.Generated = tsorm.PrimaryGeneratedColumn;
|
|
36
|
-
Column.Primary = tsorm.PrimaryColumn;
|
|
37
|
-
Column.Index = tsorm.Index;
|
|
38
|
-
Column.CreateDate = tsorm.CreateDateColumn;
|
|
39
|
-
Column.UpdateDate = tsorm.UpdateDateColumn;
|
|
40
|
-
Column.DeleteDate = tsorm.DeleteDateColumn;
|
|
41
|
-
Column.Custom = tsorm.Column;
|
|
42
|
-
/**
|
|
43
|
-
* 100 default characters varchar
|
|
44
|
-
*/
|
|
45
|
-
Column.String = (defaultValue = null, length = 100) => tsorm.Column({
|
|
46
|
-
type: 'varchar',
|
|
47
|
-
length,
|
|
48
|
-
nullable: lib_1._.isNil(defaultValue),
|
|
49
|
-
default: defaultValue,
|
|
50
|
-
});
|
|
51
|
-
/**
|
|
52
|
-
* 100 characters varchar
|
|
53
|
-
*/
|
|
54
|
-
Column.String100 = (defaultValue = null) => tsorm.Column({
|
|
55
|
-
type: 'varchar',
|
|
56
|
-
length: 100,
|
|
57
|
-
nullable: lib_1._.isNil(defaultValue),
|
|
58
|
-
default: defaultValue,
|
|
59
|
-
});
|
|
60
|
-
/**
|
|
61
|
-
* 100 characters varchar
|
|
62
|
-
*/
|
|
63
|
-
Column.String45 = (defaultValue = null) => tsorm.Column({
|
|
64
|
-
type: 'varchar',
|
|
65
|
-
length: 45,
|
|
66
|
-
nullable: lib_1._.isNil(defaultValue),
|
|
67
|
-
default: defaultValue,
|
|
68
|
-
});
|
|
69
|
-
/**
|
|
70
|
-
* 500 characters varchar
|
|
71
|
-
*/
|
|
72
|
-
Column.String500 = (defaultValue = null) => tsorm.Column({
|
|
73
|
-
type: 'varchar',
|
|
74
|
-
length: 500,
|
|
75
|
-
nullable: lib_1._.isNil(defaultValue),
|
|
76
|
-
default: defaultValue,
|
|
77
|
-
});
|
|
78
|
-
/**
|
|
79
|
-
* 200 characters varchar
|
|
80
|
-
*/
|
|
81
|
-
Column.String200 = (defaultValue = null) => tsorm.Column({
|
|
82
|
-
type: 'varchar',
|
|
83
|
-
length: 200,
|
|
84
|
-
nullable: lib_1._.isNil(defaultValue),
|
|
85
|
-
default: defaultValue,
|
|
86
|
-
});
|
|
87
|
-
Column.Number = () => tsorm.Column({ type: 'int', nullable: true });
|
|
88
|
-
Column.DecimalNumber = () => tsorm.Column({ type: 'float', nullable: true });
|
|
89
|
-
Column.SimpleJson = () => tsorm.Column({ type: 'simple-json', nullable: true });
|
|
90
|
-
Column.Boolean = (defaultValue) => tsorm.Column({ type: 'boolean', nullable: true, default: defaultValue });
|
|
91
|
-
Column.DateTIme = (defaultValue = null) => tsorm.Column({ type: 'datetime', nullable: true, default: defaultValue });
|
|
92
|
-
// TODO has limitation => comma in name
|
|
93
|
-
// export const SimpleArray = () => tsorm.Column({ type: 'simple-array', nullable: true });
|
|
94
|
-
Column.Version = tsorm.VersionColumn;
|
|
95
|
-
Column.Virtual = tsorm.VirtualColumn;
|
|
96
|
-
})(Column = Orm.Column || (Orm.Column = {}));
|
|
97
|
-
let Join;
|
|
98
|
-
(function (Join) {
|
|
99
|
-
Join.Table = tsorm.JoinTable;
|
|
100
|
-
Join.Column = tsorm.JoinColumn;
|
|
101
|
-
})(Join = Orm.Join || (Orm.Join = {}));
|
|
102
|
-
let Relation;
|
|
103
|
-
(function (Relation) {
|
|
104
|
-
Relation.OneToMany = tsorm.OneToMany;
|
|
105
|
-
Relation.OneToOne = tsorm.OneToOne;
|
|
106
|
-
Relation.ManyToMany = tsorm.ManyToMany;
|
|
107
|
-
Relation.ManyToOne = tsorm.ManyToOne;
|
|
108
|
-
})(Relation = Orm.Relation || (Orm.Relation = {}));
|
|
109
|
-
//#endregion
|
|
110
|
-
})(Orm || (exports.Orm = Orm = {}));
|
|
111
|
-
//#endregion
|
|
112
|
-
//# sourceMappingURL=orm.js.map
|
package/lib/orm.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"orm.js","sourceRoot":"","sources":[""],"names":[],"mappings":"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"}
|
package/websql/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { TaonBaseEntity } from './base-entity';
|
|
3
|
-
import type { TaonBaseClass } from './base-class';
|
|
4
|
-
export declare abstract class TaonBaseAbstractEntity<CloneT extends TaonBaseClass = any> extends TaonBaseEntity<CloneT> {
|
|
5
|
-
id: string;
|
|
6
|
-
version: number;
|
|
7
|
-
}
|
|
8
|
-
export type AbstractEntityOmitKeys<ENTITY> = Omit<ENTITY, 'id' | 'version' | '_' | 'clone'>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { TaonContext } from '../create-context';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* TODO prevent calling methods when not initialized
|
|
6
|
-
* with init(ctx)
|
|
7
|
-
*/
|
|
8
|
-
export declare abstract class BaseAngularsService {
|
|
9
|
-
protected readonly currentContext: TaonContext;
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated
|
|
12
|
-
* current context host backend port (for localhost backend)
|
|
13
|
-
*/
|
|
14
|
-
protected readonly CURRENT_HOST_BACKEND_PORT: number | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated
|
|
17
|
-
* current context host URL (for localhost backend)
|
|
18
|
-
*/
|
|
19
|
-
protected readonly CURRENT_HOST_URL: string | undefined;
|
|
20
|
-
constructor();
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated
|
|
23
|
-
* Returns the host URL for the backend service
|
|
24
|
-
* that is running on localhost (normal NodeJS/ExpressJS mode).
|
|
25
|
-
*/
|
|
26
|
-
get host(): string;
|
|
27
|
-
injectController<T>(ctor: new (...args: any[]) => T,
|
|
28
|
-
/**
|
|
29
|
-
* optional override context
|
|
30
|
-
*/
|
|
31
|
-
overrideCurrentContext?: TaonContext): T;
|
|
32
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseAngularsService, never>;
|
|
33
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BaseAngularsService>;
|
|
34
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
export declare class TaonBaseClass<CloneT extends TaonBaseClass = any> {
|
|
3
|
-
/**
|
|
4
|
-
* class initialization hook
|
|
5
|
-
* taon after class instance creation
|
|
6
|
-
*/
|
|
7
|
-
_(): Promise<void>;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @param overrideObjOrFn if object is provided it will override values in cloned object,
|
|
11
|
-
* if function is provided it will be called with old cloned values and should return
|
|
12
|
-
* object with values to override
|
|
13
|
-
* @returns cloned instance of the class
|
|
14
|
-
*/
|
|
15
|
-
clone(overrideObjOrFn?: Partial<CloneT> | ((oldValues: Partial<CloneT>) => Partial<CloneT>)): CloneT;
|
|
16
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
declare const TaonBaseContext: {
|
|
3
|
-
readonly contextName: string;
|
|
4
|
-
readonly appId: string;
|
|
5
|
-
cloneAsRemote: (cloneOpt?: {
|
|
6
|
-
overrideRemoteHost?: string;
|
|
7
|
-
}) => /*elided*/ any;
|
|
8
|
-
cloneAsNormal: (cloneOpt?: {
|
|
9
|
-
overrideHost?: string;
|
|
10
|
-
}) => /*elided*/ any;
|
|
11
|
-
__ref(): Promise<import("taon/websql").EndpointContext>;
|
|
12
|
-
readonly __refSync: import("taon/websql").EndpointContext;
|
|
13
|
-
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
14
|
-
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
15
|
-
initialize: (overrideOptions?: import("taon/websql").Models.TaonInitializeParams) => Promise<import("taon/websql").EndpointContext>;
|
|
16
|
-
readonly realtime: {
|
|
17
|
-
readonly client: import("../realtime/realtime-client").RealtimeClient;
|
|
18
|
-
readonly server: import("../realtime/realtime-server").RealtimeServer;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export { TaonBaseContext };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { RestErrorResponseWrapper, HttpResponseError } from 'ng2-rest/websql';
|
|
3
|
-
import type { ContextsEndpointStorage } from '../endpoint-context-storage';
|
|
4
|
-
import type { Models } from '../models';
|
|
5
|
-
import { TaonBaseInjector } from './base-injector';
|
|
6
|
-
export interface MulterFileUploadResponse {
|
|
7
|
-
ok: boolean;
|
|
8
|
-
originalName: string;
|
|
9
|
-
/**
|
|
10
|
-
* name change to this to avoid confusion with originalname
|
|
11
|
-
* (similar to originalname with added uniq part)
|
|
12
|
-
*/
|
|
13
|
-
savedAs: string;
|
|
14
|
-
size: number;
|
|
15
|
-
mimetype: string;
|
|
16
|
-
}
|
|
17
|
-
export declare class TaonBaseController<UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBaseInjector {
|
|
18
|
-
/**
|
|
19
|
-
* Hook that is called when taon app is inited
|
|
20
|
-
* (all contexts are created and inited)
|
|
21
|
-
*/
|
|
22
|
-
afterAllCtxInited(options: {
|
|
23
|
-
ctxStorage: ContextsEndpointStorage;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
uploadFormDataToServer(formData: FormData, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Models.Http.Response<MulterFileUploadResponse[]>;
|
|
26
|
-
/**
|
|
27
|
-
* Hook after file is uploaded
|
|
28
|
-
* through `uploadFormDataToServer` or `uploadLocalFileToServer`
|
|
29
|
-
*/
|
|
30
|
-
protected afterFileUploadAction(file?: MulterFileUploadResponse, queryParams?: UPLOAD_FILE_QUERY_PARAMS): void | Promise<void>;
|
|
31
|
-
uploadLocalFileToServer(absFilePath: string, options?: Pick<Models.Http.Rest.Ng2RestAxiosRequestConfig, 'onUploadProgress'>, queryParams?: UPLOAD_FILE_QUERY_PARAMS): Promise<MulterFileUploadResponse[]>;
|
|
32
|
-
/**
|
|
33
|
-
* Easy way to wait for status change with http (1s default) pooling.
|
|
34
|
-
*
|
|
35
|
-
* example (in sub class):
|
|
36
|
-
* ```ts
|
|
37
|
-
async check() {
|
|
38
|
-
await this.waitForProperStatusChange({
|
|
39
|
-
request: () => this.uploadFormDataToServer(void 0, void 0).request(),
|
|
40
|
-
statusCheck: resp => resp.body.json[0].ok,
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
_waitForProperStatusChange<T>(options: {
|
|
46
|
-
actionName: string;
|
|
47
|
-
/**
|
|
48
|
-
* Request for pooling
|
|
49
|
-
*/
|
|
50
|
-
request: (opt?: {
|
|
51
|
-
/**
|
|
52
|
-
* optional index number to identify request in logs
|
|
53
|
-
* (starts from 0 and increments by 1 on each try)
|
|
54
|
-
*/
|
|
55
|
-
reqIndexNum?: number;
|
|
56
|
-
httpErrorsCount?: number;
|
|
57
|
-
}) => ReturnType<Models.Http.Response<T>['request']>;
|
|
58
|
-
poolingInterval?: number;
|
|
59
|
-
/**
|
|
60
|
-
* default infinite tries
|
|
61
|
-
*/
|
|
62
|
-
maxTries?: number;
|
|
63
|
-
/**
|
|
64
|
-
* default infiniti allowed http errors
|
|
65
|
-
*/
|
|
66
|
-
allowedHttpErrors?: number;
|
|
67
|
-
/**
|
|
68
|
-
* condition to be met
|
|
69
|
-
*/
|
|
70
|
-
statusCheck?: (response: Awaited<ReturnType<typeof options.request>>) => boolean;
|
|
71
|
-
/**
|
|
72
|
-
* if return true.. loop will continue
|
|
73
|
-
* if false .. will exit the loop
|
|
74
|
-
*/
|
|
75
|
-
loopRequestsOnBackendError?: (opt: {
|
|
76
|
-
unknownError: Error;
|
|
77
|
-
unknownHttpError: HttpResponseError<any>;
|
|
78
|
-
taonError: HttpResponseError<RestErrorResponseWrapper>;
|
|
79
|
-
reqIndexNum?: number;
|
|
80
|
-
httpErrorsCount?: number;
|
|
81
|
-
}) => boolean | Promise<boolean>;
|
|
82
|
-
}): Promise<void>;
|
|
83
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { Models } from '../models';
|
|
3
|
-
import { TaonBaseController } from './base-controller';
|
|
4
|
-
import { TaonBaseRepository } from './base-repository';
|
|
5
|
-
/**
|
|
6
|
-
* Please override property entityClassFn with entity class.
|
|
7
|
-
*/
|
|
8
|
-
export declare abstract class TaonBaseCrudController<Entity, UPLOAD_FILE_QUERY_PARAMS = {}> extends TaonBaseController<UPLOAD_FILE_QUERY_PARAMS> {
|
|
9
|
-
protected db: TaonBaseRepository<Entity>;
|
|
10
|
-
/**
|
|
11
|
-
* Please provide entity as class property entityClassFn:
|
|
12
|
-
* @returns class function
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
abstract entityClassResolveFn: () => any;
|
|
16
|
-
_(): Promise<void>;
|
|
17
|
-
bufforedChanges(id: number | string, property: string, alreadyLength?: number): Models.Http.Response<string | any[]>;
|
|
18
|
-
pagination(pageNumber?: number, pageSize?: number, search?: string): Models.Http.Response<Entity[]>;
|
|
19
|
-
getAll(): Models.Http.Response<Entity[]>;
|
|
20
|
-
getBy(id: number | string): Models.Http.Response<Entity>;
|
|
21
|
-
updateById(id: number | string, item: Entity): Models.Http.Response<Entity>;
|
|
22
|
-
patchById(id: number | string, item: Entity): Models.Http.Response<Entity>;
|
|
23
|
-
bulkUpdate(items: Entity[]): Models.Http.Response<Entity[]>;
|
|
24
|
-
deleteById(id: number | string): Models.Http.Response<Entity>;
|
|
25
|
-
bulkDelete(ids: (number | string)[]): Models.Http.Response<(number | string | Entity)[]>;
|
|
26
|
-
clearTable(): Models.Http.Response<void>;
|
|
27
|
-
save(item: Entity): Models.Http.Response<Entity>;
|
|
28
|
-
bulkCreate(items: Entity): Models.Http.Response<Entity[]>;
|
|
29
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { RelationPath } from 'taon-typeorm/websql';
|
|
3
|
-
import { TaonBaseClass } from './base-class';
|
|
4
|
-
export declare abstract class TaonBaseEntity<
|
|
5
|
-
/**
|
|
6
|
-
* type for cloning
|
|
7
|
-
*/
|
|
8
|
-
CloneT extends TaonBaseClass = any> extends TaonBaseClass<CloneT> {
|
|
9
|
-
/**
|
|
10
|
-
* simple check if relation is ok
|
|
11
|
-
*/
|
|
12
|
-
relation(relationName: RelationPath<CloneT>): string;
|
|
13
|
-
/**
|
|
14
|
-
* simple check if relation is ok
|
|
15
|
-
*/
|
|
16
|
-
relations(relationNames: RelationPath<CloneT>[]): string[];
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import express from 'express';
|
|
3
|
-
import * as multer from 'multer';
|
|
4
|
-
import { TaonServerMiddlewareInterceptOptions } from 'ng2-rest/websql';
|
|
5
|
-
import { TaonBaseMiddleware, TaonAdditionalMiddlewareMethodInfo } from './base-middleware';
|
|
6
|
-
/**
|
|
7
|
-
* Configurable file upload middleware (multer based)
|
|
8
|
-
*/
|
|
9
|
-
export declare class TaonBaseFileUploadMiddleware extends TaonBaseMiddleware {
|
|
10
|
-
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath }: TaonAdditionalMiddlewareMethodInfo): Promise<void>;
|
|
11
|
-
uploadDir(): string;
|
|
12
|
-
storage(): multer.StorageEngine;
|
|
13
|
-
upload(): multer.Multer;
|
|
14
|
-
middleware(): express.RequestHandler;
|
|
15
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { EndpointContext } from '../endpoint-context';
|
|
3
|
-
import { TaonBaseCustomRepository } from './base-custom-repository';
|
|
4
|
-
import type { TaonBaseRepository } from './base-repository';
|
|
5
|
-
export declare class TaonBaseInjector {
|
|
6
|
-
/**
|
|
7
|
-
* for proxy purposes
|
|
8
|
-
*/
|
|
9
|
-
getOriginalPrototype: () => any;
|
|
10
|
-
/**
|
|
11
|
-
* for proxy purposes
|
|
12
|
-
*/
|
|
13
|
-
getOriginalConstructor: () => any;
|
|
14
|
-
/**
|
|
15
|
-
* class initialization hook
|
|
16
|
-
* taon after class instace creation
|
|
17
|
-
*/
|
|
18
|
-
_(): Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* @deprecated use ctx instead
|
|
21
|
-
* Current endpoint context
|
|
22
|
-
*/
|
|
23
|
-
get __endpoint_context__(): EndpointContext;
|
|
24
|
-
/**
|
|
25
|
-
* get current endpoint context
|
|
26
|
-
*/
|
|
27
|
-
get ctx(): EndpointContext;
|
|
28
|
-
/**
|
|
29
|
-
* inject crud repo for entity
|
|
30
|
-
*/
|
|
31
|
-
injectRepo<T>(entityForCrud: new (...args: any[]) => T): TaonBaseRepository<T>;
|
|
32
|
-
injectCustomRepository<T extends TaonBaseCustomRepository>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
33
|
-
/**
|
|
34
|
-
* aliast to this.injectRepository()
|
|
35
|
-
*/
|
|
36
|
-
injectCustomRepo<T extends TaonBaseCustomRepository>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
37
|
-
/**
|
|
38
|
-
* example usage:
|
|
39
|
-
* ...
|
|
40
|
-
* exampleController = this.injectController(ExampleController);
|
|
41
|
-
* ...
|
|
42
|
-
*/
|
|
43
|
-
injectController<T>(ctor: new (...args: any[]) => T): T;
|
|
44
|
-
/**
|
|
45
|
-
* example usage:
|
|
46
|
-
* ...
|
|
47
|
-
* exampleSubscriber = this.injectSubscriber(ExampleSubscriber)
|
|
48
|
-
* ...
|
|
49
|
-
*/
|
|
50
|
-
injectSubscriber<T>(ctor: new (...args: any[]) => T): T;
|
|
51
|
-
/**
|
|
52
|
-
* aliast to .injectController()
|
|
53
|
-
*/
|
|
54
|
-
injectCtrl<T>(ctor: new (...args: any[]) => T): T;
|
|
55
|
-
/**
|
|
56
|
-
* inject middleware for context
|
|
57
|
-
*/
|
|
58
|
-
injectMiddleware<T>(ctor: new (...args: any[]) => T): T;
|
|
59
|
-
/**
|
|
60
|
-
* inject provider for context
|
|
61
|
-
*/
|
|
62
|
-
injectProvider<T>(ctor: new (...args: any[]) => T): T;
|
|
63
|
-
/**
|
|
64
|
-
* Inject: Controllers, Providers, Repositories, Services, etc.
|
|
65
|
-
* TODO addd nest js injecting
|
|
66
|
-
*/
|
|
67
|
-
private __inject;
|
|
68
|
-
}
|