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/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/browser").EndpointContext>;
|
|
12
|
-
readonly __refSync: import("taon/browser").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/browser").Models.TaonInitializeParams) => Promise<import("taon/browser").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/browser';
|
|
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/browser';
|
|
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/browser';
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import type { AxiosResponse } from 'axios';
|
|
3
|
-
import { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions } from 'ng2-rest/browser';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { CoreModels } from 'tnp-core/browser';
|
|
6
|
-
import { TaonBaseInjector } from './base-injector';
|
|
7
|
-
/**
|
|
8
|
-
* TODO
|
|
9
|
-
* - global provider available in all contexts
|
|
10
|
-
* - provider available in own context
|
|
11
|
-
*/
|
|
12
|
-
export declare abstract class TaonBaseMiddleware extends TaonBaseInjector {
|
|
13
|
-
}
|
|
14
|
-
export interface TaonAdditionalMiddlewareMethodInfo {
|
|
15
|
-
methodName: string;
|
|
16
|
-
expressPath: string;
|
|
17
|
-
httpRequestType: CoreModels.HttpMethod;
|
|
18
|
-
}
|
|
19
|
-
export interface TaonBaseMiddleware {
|
|
20
|
-
/**
|
|
21
|
-
* Global interceptor for whole context
|
|
22
|
-
* backend request
|
|
23
|
-
*/
|
|
24
|
-
interceptServer({ req, res, next, }: TaonServerMiddlewareInterceptOptions): Promise<void> | void;
|
|
25
|
-
/**
|
|
26
|
-
* Global interceptor for whole context
|
|
27
|
-
* client requests
|
|
28
|
-
*/
|
|
29
|
-
interceptClient({ req, next, }: TaonClientMiddlewareInterceptOptions): Observable<AxiosResponse<any>>;
|
|
30
|
-
/**
|
|
31
|
-
* Specyfic controller method interceptor
|
|
32
|
-
*/
|
|
33
|
-
interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType, }: TaonAdditionalMiddlewareMethodInfo): Promise<void> | void;
|
|
34
|
-
/**
|
|
35
|
-
* Controller method frontned interceptor
|
|
36
|
-
* TODO not needed ?
|
|
37
|
-
*/
|
|
38
|
-
interceptClientMethod({ req, next }: TaonClientMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType, }: TaonAdditionalMiddlewareMethodInfo): Observable<AxiosResponse<any>>;
|
|
39
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { MigrationInterface, QueryRunner } from 'taon-typeorm/browser';
|
|
3
|
-
import { TaonBaseInjector } from './base-injector';
|
|
4
|
-
export declare class TaonBaseMigration extends TaonBaseInjector implements MigrationInterface {
|
|
5
|
-
/**
|
|
6
|
-
* by default is READY to run
|
|
7
|
-
*/
|
|
8
|
-
isReadyToRun(): boolean;
|
|
9
|
-
getDescription(): string;
|
|
10
|
-
up(queryRunner: QueryRunner): Promise<any>;
|
|
11
|
-
down(queryRunner: QueryRunner): Promise<any>;
|
|
12
|
-
}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { type DeepPartial, type FindManyOptions, type FindOneOptions, type FindOptionsWhere, type InsertResult, type Repository, type SaveOptions, type UpdateResult } from 'taon-typeorm/browser';
|
|
3
|
-
import type { QueryDeepPartialEntity } from 'taon-typeorm/browser';
|
|
4
|
-
import type { UpsertOptions } from 'taon-typeorm/browser';
|
|
5
|
-
import type { DataSource as DataSourceType, QueryRunner, SelectQueryBuilder } from 'taon-typeorm/browser';
|
|
6
|
-
import { MySqlQuerySource } from 'taon-type-sql/browser';
|
|
7
|
-
import { TaonBaseCustomRepository } from './base-custom-repository';
|
|
8
|
-
export declare abstract class TaonBaseRepository<Entity extends {
|
|
9
|
-
id?: any;
|
|
10
|
-
}> extends TaonBaseCustomRepository {
|
|
11
|
-
abstract entityClassResolveFn: () => any;
|
|
12
|
-
constructor(__entityClassResolveFn: () => any);
|
|
13
|
-
private __dbQuery;
|
|
14
|
-
get dbQuery(): MySqlQuerySource;
|
|
15
|
-
get connection(): DataSourceType;
|
|
16
|
-
protected get repository(): Repository<Entity>;
|
|
17
|
-
/**
|
|
18
|
-
* target for repository
|
|
19
|
-
*/
|
|
20
|
-
get target(): Function;
|
|
21
|
-
/**
|
|
22
|
-
* alias to repository
|
|
23
|
-
*/
|
|
24
|
-
protected get repo(): Repository<Entity>;
|
|
25
|
-
get repositoryExists(): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Checks if entity has an id.
|
|
28
|
-
* If entity composite compose ids, it will check them all.
|
|
29
|
-
*/
|
|
30
|
-
hasId(entity: Entity): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Gets entity mixed id.
|
|
33
|
-
*/
|
|
34
|
-
getId(entity: Entity): any;
|
|
35
|
-
/**
|
|
36
|
-
Saves a given entity in the database.
|
|
37
|
-
* If entity does not exist in the database then inserts, otherwise updates.
|
|
38
|
-
*/
|
|
39
|
-
save(item: Entity, options?: SaveOptions & {
|
|
40
|
-
reload: false;
|
|
41
|
-
}): Promise<Entity>;
|
|
42
|
-
/**
|
|
43
|
-
* alias to save
|
|
44
|
-
* -> it will actuall create new entity in db
|
|
45
|
-
* in oposite to typeorm create method
|
|
46
|
-
*/
|
|
47
|
-
/**
|
|
48
|
-
* Creates a new entity instance.
|
|
49
|
-
*/
|
|
50
|
-
create(): Entity;
|
|
51
|
-
/**
|
|
52
|
-
* Creates new entities and copies all entity properties from given objects into their new entities.
|
|
53
|
-
* Note that it copies only properties that are present in entity schema.
|
|
54
|
-
*/
|
|
55
|
-
create(entityLikeArray: DeepPartial<Entity>[]): Entity[];
|
|
56
|
-
/**
|
|
57
|
-
* Creates a new entity instance and copies all entity properties from this object into a new entity.
|
|
58
|
-
* Note that it copies only properties that are present in entity schema.
|
|
59
|
-
*/
|
|
60
|
-
create(entityLike: DeepPartial<Entity>): Entity;
|
|
61
|
-
bulkSave(items: Entity[], options?: SaveOptions & {
|
|
62
|
-
reload: false;
|
|
63
|
-
}): Promise<Entity[]>;
|
|
64
|
-
/**
|
|
65
|
-
* @deprecated use bulkSave instead
|
|
66
|
-
*/
|
|
67
|
-
bulkCreate(items: Entity[], options?: SaveOptions & {
|
|
68
|
-
reload: false;
|
|
69
|
-
}): Promise<Entity[]>;
|
|
70
|
-
/**
|
|
71
|
-
* Saves all given entities in the database.
|
|
72
|
-
* If entities do not exist in the database then inserts, otherwise updates.
|
|
73
|
-
*/
|
|
74
|
-
/**
|
|
75
|
-
* Merges multiple entities (or entity-like objects) into a given entity.
|
|
76
|
-
*/
|
|
77
|
-
merge(mergeIntoEntity: Entity, ...entityLikes: Entity[]): Entity;
|
|
78
|
-
/**
|
|
79
|
-
* Creates a new entity from the given plain javascript object. If entity already exist in the database, then
|
|
80
|
-
* it loads it (and everything related to it), replaces all values with the new ones from the given object
|
|
81
|
-
* and returns this new entity. This new entity is actually a loaded from the db entity with all properties
|
|
82
|
-
* replaced from the new object.
|
|
83
|
-
*
|
|
84
|
-
* Note that given entity-like object must have an entity id / primary key to find entity by.
|
|
85
|
-
* Returns undefined if entity with given id was not found.
|
|
86
|
-
*/
|
|
87
|
-
preload(entityLike: Entity): Promise<Entity | undefined>;
|
|
88
|
-
/**
|
|
89
|
-
* Removes a given entities from the database.
|
|
90
|
-
*/
|
|
91
|
-
remove(idOrEntity: number | string | Entity): Promise<Entity>;
|
|
92
|
-
/**
|
|
93
|
-
* alias to remove
|
|
94
|
-
*/
|
|
95
|
-
delete(idOrEntity: number | string | Partial<Entity>): Promise<Entity>;
|
|
96
|
-
/**
|
|
97
|
-
* alias to removeById
|
|
98
|
-
*/
|
|
99
|
-
deleteById(id: number | string): Promise<Entity>;
|
|
100
|
-
bulkRemove(idsOrEntities: (number | string | Entity)[]): Promise<Entity[]>;
|
|
101
|
-
bulkDelete(ids: (number | string | Entity)[]): Promise<Entity[]>;
|
|
102
|
-
/**
|
|
103
|
-
* Records the delete date of all given entities.
|
|
104
|
-
*/
|
|
105
|
-
softRemove<T extends Entity>(entities: T[], options: SaveOptions & {
|
|
106
|
-
reload: false;
|
|
107
|
-
}): Promise<T[]>;
|
|
108
|
-
/**
|
|
109
|
-
* Records the delete date of all given entities.
|
|
110
|
-
*/
|
|
111
|
-
softRemove<T extends Entity>(entities: T[], options?: SaveOptions): Promise<(T & Entity)[]>;
|
|
112
|
-
/**
|
|
113
|
-
* Records the delete date of a given entity.
|
|
114
|
-
*/
|
|
115
|
-
softRemove<T extends Entity>(entity: T, options: SaveOptions & {
|
|
116
|
-
reload: false;
|
|
117
|
-
}): Promise<T>;
|
|
118
|
-
/**
|
|
119
|
-
* Recovers all given entities in the database.
|
|
120
|
-
*/
|
|
121
|
-
recover<T extends Entity>(entities: T[], options: SaveOptions & {
|
|
122
|
-
reload: false;
|
|
123
|
-
}): Promise<T[]>;
|
|
124
|
-
/**
|
|
125
|
-
* Recovers all given entities in the database.
|
|
126
|
-
*/
|
|
127
|
-
recover<T extends Entity>(entities: T[], options?: SaveOptions): Promise<(T & Entity)[]>;
|
|
128
|
-
/**
|
|
129
|
-
* Recovers a given entity in the database.
|
|
130
|
-
*/
|
|
131
|
-
recover<T extends Entity>(entity: T, options: SaveOptions & {
|
|
132
|
-
reload: false;
|
|
133
|
-
}): Promise<T>;
|
|
134
|
-
/**
|
|
135
|
-
* Inserts a given entity into the database.
|
|
136
|
-
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
137
|
-
* Executes fast and efficient INSERT query.
|
|
138
|
-
* Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
|
|
139
|
-
*/
|
|
140
|
-
insert(entity: QueryDeepPartialEntity<Entity> | QueryDeepPartialEntity<Entity>[]): Promise<InsertResult>;
|
|
141
|
-
update(item: Entity): Promise<any>;
|
|
142
|
-
private allowedTypesToUpdate;
|
|
143
|
-
updateById<ENTITY = Entity>(id: number | string, item: Entity): Promise<ENTITY>;
|
|
144
|
-
bulkUpdate(items: Entity[]): Promise<any>;
|
|
145
|
-
/**
|
|
146
|
-
* Inserts a given entity into the database, unless a unique constraint conflicts then updates the entity
|
|
147
|
-
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
148
|
-
* Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
|
|
149
|
-
*/
|
|
150
|
-
upsert(entityOrEntities: QueryDeepPartialEntity<Entity> | QueryDeepPartialEntity<Entity>[], conflictPathsOrOptions: string[] | UpsertOptions<Entity>): Promise<InsertResult>;
|
|
151
|
-
/**
|
|
152
|
-
* Records the delete date of entities by a given criteria.
|
|
153
|
-
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
154
|
-
* Executes fast and efficient SOFT-DELETE query.
|
|
155
|
-
* Does not check if entity exist in the database.
|
|
156
|
-
*/
|
|
157
|
-
softDelete(criteria: string | string[] | number | number[] | Date | Date[] | FindOptionsWhere<Entity>): Promise<UpdateResult>;
|
|
158
|
-
/**
|
|
159
|
-
* Restores entities by a given criteria.
|
|
160
|
-
* Unlike save method executes a primitive operation without cascades, relations and other operations included.
|
|
161
|
-
* Executes fast and efficient SOFT-DELETE query.
|
|
162
|
-
* Does not check if entity exist in the database.
|
|
163
|
-
*/
|
|
164
|
-
restore(criteria: string | string[] | number | number[] | Date | Date[] | FindOptionsWhere<Entity>): Promise<UpdateResult>;
|
|
165
|
-
/**
|
|
166
|
-
* Counts entities that match given options.
|
|
167
|
-
* Useful for pagination.
|
|
168
|
-
*/
|
|
169
|
-
count(options?: FindManyOptions<Entity>): Promise<number>;
|
|
170
|
-
/**
|
|
171
|
-
* Counts entities that match given conditions.
|
|
172
|
-
* Useful for pagination.
|
|
173
|
-
*/
|
|
174
|
-
countBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<number>;
|
|
175
|
-
/**
|
|
176
|
-
* Finds entities that match given find options.
|
|
177
|
-
*/
|
|
178
|
-
find(options?: FindManyOptions<Entity>): Promise<Entity[]>;
|
|
179
|
-
/**
|
|
180
|
-
* Finds entities that match given find options.
|
|
181
|
-
*/
|
|
182
|
-
findBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity[]>;
|
|
183
|
-
/**
|
|
184
|
-
* Finds entities that match given find options.
|
|
185
|
-
* Also counts all entities that match given conditions,
|
|
186
|
-
* but ignores pagination settings (from and take options).
|
|
187
|
-
*/
|
|
188
|
-
findAndCount(options?: FindManyOptions<Entity>): Promise<[Entity[], number]>;
|
|
189
|
-
/**
|
|
190
|
-
* Finds entities that match given WHERE conditions.
|
|
191
|
-
* Also counts all entities that match given conditions,
|
|
192
|
-
* but ignores pagination settings (from and take options).
|
|
193
|
-
*/
|
|
194
|
-
findAndCountBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<[Entity[], number]>;
|
|
195
|
-
/**
|
|
196
|
-
* Finds entities with ids.
|
|
197
|
-
* Optionally find options or conditions can be applied.
|
|
198
|
-
*
|
|
199
|
-
* @deprecated use `findBy` method instead in conjunction with `In` operator, for example:
|
|
200
|
-
*
|
|
201
|
-
* .findBy({
|
|
202
|
-
* id: In([1, 2, 3])
|
|
203
|
-
* })
|
|
204
|
-
*/
|
|
205
|
-
findByIds(ids: any[]): Promise<Entity[]>;
|
|
206
|
-
/**
|
|
207
|
-
* Finds first entity by a given find options.
|
|
208
|
-
* If entity was not found in the database - returns null.
|
|
209
|
-
*/
|
|
210
|
-
findOne(options: FindOneOptions<Entity>): Promise<Entity | null>;
|
|
211
|
-
/**
|
|
212
|
-
* Finds first entity that matches given where condition.
|
|
213
|
-
* If entity was not found in the database - returns null.
|
|
214
|
-
*/
|
|
215
|
-
findOneBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity | null>;
|
|
216
|
-
/**
|
|
217
|
-
* Finds first entity that matches given id.
|
|
218
|
-
* If entity was not found in the database - returns null.
|
|
219
|
-
*
|
|
220
|
-
* @deprecated use `findOneBy` method instead in conjunction with `In` operator, for example:
|
|
221
|
-
*
|
|
222
|
-
* .findOneBy({
|
|
223
|
-
* id: 1 // where "id" is your primary column name
|
|
224
|
-
* })
|
|
225
|
-
*/
|
|
226
|
-
findOneById(id: number | string | Date): Promise<Entity | null>;
|
|
227
|
-
/**
|
|
228
|
-
* Finds first entity by a given find options.
|
|
229
|
-
* If entity was not found in the database - rejects with error.
|
|
230
|
-
*/
|
|
231
|
-
findOneOrFail(options: FindOneOptions<Entity>): Promise<Entity>;
|
|
232
|
-
/**
|
|
233
|
-
* Finds first entity that matches given where condition.
|
|
234
|
-
* If entity was not found in the database - rejects with error.
|
|
235
|
-
*/
|
|
236
|
-
findOneByOrFail(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity>;
|
|
237
|
-
/**
|
|
238
|
-
* Executes a raw SQL query and returns a raw database results.
|
|
239
|
-
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
240
|
-
*/
|
|
241
|
-
query(query: string, parameters?: any[]): Promise<any>;
|
|
242
|
-
/**
|
|
243
|
-
* Executes a raw SQL query and returns a raw database results.
|
|
244
|
-
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
245
|
-
*/
|
|
246
|
-
createQueryBuilder(alias?: string, queryRunner?: QueryRunner): SelectQueryBuilder<Entity>;
|
|
247
|
-
/**
|
|
248
|
-
* Clears all the data from the given table/collection (truncates/drops it).
|
|
249
|
-
*
|
|
250
|
-
* Note: this method uses TRUNCATE and may not work as you expect in transactions on some platforms.
|
|
251
|
-
* @see https://stackoverflow.com/a/5972738/925151
|
|
252
|
-
*/
|
|
253
|
-
clear(): Promise<void>;
|
|
254
|
-
/**
|
|
255
|
-
* Increments some column by provided value of the entities matched given conditions.
|
|
256
|
-
*/
|
|
257
|
-
increment(conditions: FindOptionsWhere<Entity>, propertyPath: string, value: number | string): Promise<UpdateResult>;
|
|
258
|
-
/**
|
|
259
|
-
* Decrements some column by provided value of the entities matched given conditions.
|
|
260
|
-
*/
|
|
261
|
-
decrement(conditions: FindOptionsWhere<Entity>, propertyPath: string, value: number | string): Promise<UpdateResult>;
|
|
262
|
-
/**
|
|
263
|
-
* @deprecated use findAndCount instead
|
|
264
|
-
*/
|
|
265
|
-
getAll(): Promise<any>;
|
|
266
|
-
getBy(id: number | string): Promise<Entity>;
|
|
267
|
-
}
|