taon 19.0.7 → 19.0.9
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 +88 -76
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-custom-repository.d.ts +4 -0
- package/browser/lib/base-classes/base-entity.d.ts +9 -0
- package/browser/lib/base-classes/base-injector.d.ts +3 -2
- package/browser/lib/base-classes/base-repository.d.ts +25 -9
- package/browser/lib/base-classes/base.d.ts +2 -0
- package/browser/lib/index.d.ts +1 -0
- package/browser/package.json +1 -1
- package/client/fesm2022/taon.mjs +88 -76
- package/client/fesm2022/taon.mjs.map +1 -1
- package/client/lib/base-classes/base-custom-repository.d.ts +4 -0
- package/client/lib/base-classes/base-entity.d.ts +9 -0
- package/client/lib/base-classes/base-injector.d.ts +3 -2
- package/client/lib/base-classes/base-repository.d.ts +25 -9
- package/client/lib/base-classes/base.d.ts +2 -0
- package/client/lib/index.d.ts +1 -0
- package/client/package.json +1 -1
- package/lib/base-classes/base-custom-repository.d.ts +3 -0
- package/lib/base-classes/base-custom-repository.js +19 -0
- package/lib/base-classes/base-custom-repository.js.map +1 -0
- package/lib/base-classes/base-entity.d.ts +10 -1
- package/lib/base-classes/base-entity.js +13 -2
- package/lib/base-classes/base-entity.js.map +1 -1
- package/lib/base-classes/base-injector.d.ts +3 -2
- package/lib/base-classes/base-injector.js.map +1 -1
- package/lib/base-classes/base-repository.d.ts +25 -9
- package/lib/base-classes/base-repository.js +15 -21
- package/lib/base-classes/base-repository.js.map +1 -1
- package/lib/base-classes/base.d.ts +2 -0
- package/lib/base-classes/base.js +2 -0
- 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/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/ui/directives/index.js +2 -2
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
- package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
- package/lib/ui/taon-notifications/taon-notifications.models.js +2 -2
- package/lib/ui/taon-progress-bar/index.js +2 -2
- package/lib/ui/taon-session-passcode/index.js +2 -2
- package/lib/ui/taon-table/index.js +2 -2
- package/package.json +1 -1
- package/tmp-environment.json +3 -3
- package/websql/fesm2022/taon.mjs +88 -74
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-custom-repository.d.ts +4 -0
- package/websql/lib/base-classes/base-entity.d.ts +9 -0
- package/websql/lib/base-classes/base-injector.d.ts +3 -2
- package/websql/lib/base-classes/base-repository.d.ts +25 -9
- package/websql/lib/base-classes/base.d.ts +2 -0
- package/websql/lib/index.d.ts +1 -0
- package/websql/package.json +1 -1
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
import { RelationPath } from 'taon-typeorm/browser';
|
|
2
3
|
import { BaseClass } from './base-class';
|
|
3
4
|
export declare abstract class BaseEntity<
|
|
4
5
|
/**
|
|
5
6
|
* type for cloning
|
|
6
7
|
*/
|
|
7
8
|
CloneT extends BaseClass = any> extends BaseClass<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[];
|
|
8
17
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { EndpointContext } from '../endpoint-context';
|
|
3
3
|
import { BaseClass } from './base-class';
|
|
4
|
+
import { BaseCustomRepository } from './base-custom-repository';
|
|
4
5
|
import type { BaseRepository } from './base-repository';
|
|
5
6
|
export declare class BaseInjector<CloneT extends BaseClass = any> {
|
|
6
7
|
/**
|
|
@@ -29,11 +30,11 @@ export declare class BaseInjector<CloneT extends BaseClass = any> {
|
|
|
29
30
|
* inject crud repo for entity
|
|
30
31
|
*/
|
|
31
32
|
injectRepo<T>(entityForCrud: new (...args: any[]) => T): BaseRepository<T>;
|
|
32
|
-
injectCustomRepository<T>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
33
|
+
injectCustomRepository<T extends BaseCustomRepository>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
33
34
|
/**
|
|
34
35
|
* aliast to this.injectRepository()
|
|
35
36
|
*/
|
|
36
|
-
injectCustomRepo<T>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
37
|
+
injectCustomRepo<T extends BaseCustomRepository>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
37
38
|
/**
|
|
38
39
|
* example usage:
|
|
39
40
|
* ...
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import type
|
|
3
|
-
import type { QueryDeepPartialEntity } from 'taon-typeorm/
|
|
4
|
-
import type { UpsertOptions } from 'taon-typeorm/
|
|
5
|
-
import type { DataSource as DataSourceType } from 'taon-typeorm/browser';
|
|
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
6
|
import { MySqlQuerySource } from 'taon-type-sql/browser';
|
|
7
|
-
import {
|
|
7
|
+
import { BaseCustomRepository } from './base-custom-repository';
|
|
8
8
|
export declare abstract class BaseRepository<Entity extends {
|
|
9
9
|
id?: any;
|
|
10
|
-
}> extends
|
|
10
|
+
}> extends BaseCustomRepository {
|
|
11
11
|
abstract entityClassResolveFn: () => any;
|
|
12
12
|
constructor(__entityClassResolveFn: () => any);
|
|
13
13
|
private __dbQuery;
|
|
@@ -44,9 +44,20 @@ export declare abstract class BaseRepository<Entity extends {
|
|
|
44
44
|
* -> it will actuall create new entity in db
|
|
45
45
|
* in oposite to typeorm create method
|
|
46
46
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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;
|
|
50
61
|
bulkSave(items: Entity[], options?: SaveOptions & {
|
|
51
62
|
reload: false;
|
|
52
63
|
}): Promise<Entity[]>;
|
|
@@ -225,6 +236,11 @@ export declare abstract class BaseRepository<Entity extends {
|
|
|
225
236
|
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
226
237
|
*/
|
|
227
238
|
query(query: string, parameters?: any[]): Promise<any>;
|
|
239
|
+
/**
|
|
240
|
+
* Executes a raw SQL query and returns a raw database results.
|
|
241
|
+
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
242
|
+
*/
|
|
243
|
+
createQueryBuilder(alias?: string, queryRunner?: QueryRunner): SelectQueryBuilder<Entity>;
|
|
228
244
|
/**
|
|
229
245
|
* Clears all the data from the given table/collection (truncates/drops it).
|
|
230
246
|
*
|
|
@@ -4,6 +4,7 @@ import * as baseService from './base-angular-service';
|
|
|
4
4
|
import * as baseClass from './base-class';
|
|
5
5
|
import * as controller from './base-controller';
|
|
6
6
|
import * as crudController from './base-crud-controller';
|
|
7
|
+
import * as customRepository from './base-custom-repository';
|
|
7
8
|
import * as entity from './base-entity';
|
|
8
9
|
import * as baseMigration from './base-migration';
|
|
9
10
|
import * as provider from './base-provider';
|
|
@@ -18,6 +19,7 @@ export declare namespace Base {
|
|
|
18
19
|
export import Provider = provider.BaseProvider;
|
|
19
20
|
export import Class = baseClass.BaseClass;
|
|
20
21
|
export import Repository = repository.BaseRepository;
|
|
22
|
+
export import CustomRepository = customRepository.BaseCustomRepository;
|
|
21
23
|
export import SubscriberForEntity = baseSubscriberEntity.BaseSubscriberForEntity;
|
|
22
24
|
export import Migration = baseMigration.BaseMigration;
|
|
23
25
|
export import AngularService = baseService.BaseAngularsService;
|
package/browser/lib/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import * as allSymbols from './symbols';
|
|
|
16
16
|
export * from './ui';
|
|
17
17
|
export { EndpointContext } from './endpoint-context';
|
|
18
18
|
export { BaseRepository } from './base-classes/base-repository';
|
|
19
|
+
export { BaseCustomRepository } from './base-classes/base-custom-repository';
|
|
19
20
|
export { BaseController } from './base-classes/base-controller';
|
|
20
21
|
export { BaseProvider } from './base-classes/base-provider';
|
|
21
22
|
export { BaseEntity } from './base-classes/base-entity';
|