@rentman/rm-core 2.0.19 → 2.1.1
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/changelog.md +10 -0
- package/dist/rm-core.js +270 -16
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/Util.d.ts +2 -0
- package/dist/src/classes/cache/AbstractCache.d.ts +2 -1
- package/dist/src/classes/cache/server/ServerCollectionHandler.d.ts +2 -1
- package/dist/src/classes/cache/transaction/TransactionCache.d.ts +50 -2
- package/dist/src/classes/cache/transaction/TransactionCollectionHandler.d.ts +3 -2
- package/dist/src/classes/cache/transaction/TransactionItemHandler.d.ts +3 -1
- package/dist/src/classes/cache/transaction/TransactionValidator.d.ts +28 -0
- package/dist/src/classes/index.d.ts +1 -0
- package/dist/src/factories/TransactionCacheFactory.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PromiseInterface } from '../types';
|
|
1
2
|
export declare function instantiateOptions(options: {
|
|
2
3
|
[key: string]: any;
|
|
3
4
|
}, values: object): void;
|
|
@@ -19,6 +20,7 @@ export declare function isNumber(value: any): boolean;
|
|
|
19
20
|
export declare function isDate(value: any): boolean;
|
|
20
21
|
export declare const isArray: (arg: any) => arg is any[];
|
|
21
22
|
export declare function isFunction<T>(value: any): value is T;
|
|
23
|
+
export declare function isPromiseLike<T = any>(obj: any): obj is PromiseInterface<T>;
|
|
22
24
|
export declare function isRegExp(value: any): boolean;
|
|
23
25
|
export declare function isBoolean(value: any): boolean;
|
|
24
26
|
export declare function isElement(node: any): boolean;
|
|
@@ -29,6 +29,7 @@ import { ServerItemEntryChanges, ServerItemHandler } from './server/ServerItemHa
|
|
|
29
29
|
import { TransactionCache } from './transaction/TransactionCache';
|
|
30
30
|
import { TransactionCollectionHandler } from './transaction/TransactionCollectionHandler';
|
|
31
31
|
import { TransactionItemEntryChanges, TransactionItemHandler } from './transaction/TransactionItemHandler';
|
|
32
|
+
import { TransactionValidatorFactory } from './transaction/TransactionValidator';
|
|
32
33
|
export declare abstract class AbstractCache {
|
|
33
34
|
core: RmCore;
|
|
34
35
|
protected columnCache: ColumnCache;
|
|
@@ -68,7 +69,7 @@ export declare abstract class AbstractCache {
|
|
|
68
69
|
readonly collectionHandler: TransactionCollectionHandler | ServerCollectionHandler;
|
|
69
70
|
parent: AbstractCache | null;
|
|
70
71
|
protected constructor(core: RmCore, columnCache: ColumnCache, requestBufferManager: RequestBufferManager, requestColumnExpansionFactory: RequestColumnExpansionFactory, queryMatcherFactory: QueryMatcherFactory, authInterface: AuthInterface, changesDeltaFactory: ChangesDeltaFactory, lockService: LockService, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceFactory: ItemResourceFactory, templateCache: TemplateCache, itemCacheFactory: ItemCacheFactory, collectionCacheFactory: CollectionCacheFactory, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface, apiRequestService: ApiRequestService, columnExpansionFactory: ColumnExpansionFactory, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, columnSubsetCacheFactory: ColumnSubsetCacheFactory, columnUtil: ColumnUtil, itemEntryFactory: ItemEntryFactory, itemEntryService: ItemEntryService, keyService: KeyService, collectionEntryFactory: CollectionEntryFactory, collectionEntryService: CollectionEntryService, collectionMatcherFactory: CollectionMatcherFactory, queryParserFactory: QueryParserFactory, queryService: QueryService, apiFormatter: ApiFormatter, linkTreeService: LinkTreeServiceInterface);
|
|
71
|
-
createChild(id?: string): TransactionCache;
|
|
72
|
+
createChild(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
|
|
72
73
|
onChildDestroy(cache: TransactionCache): void;
|
|
73
74
|
abstract getLocalCollectionEntryByQueryString(itemType: ItemType, queryString: string): CollectionEntry | undefined;
|
|
74
75
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectionCacheFactory, CollectionMatcherFactory, ColumnExpansionFactory, ColumnSubsetCacheFactory, RequestColumnExpansionFactory } from '../../../factories';
|
|
2
|
-
import { ApiRequestColumns, ApiRequestService, CollectionEntryOptions, CollectionMatcher, ColumnUtil, PromiseInterface } from '../../../index';
|
|
2
|
+
import { ApiQuery, ApiRequestColumns, ApiRequestService, CollectionEntryOptions, CollectionMatcher, ColumnUtil, ItemEntryOptions, PromiseInterface } from '../../../index';
|
|
3
3
|
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
4
4
|
import { CollectionEntry, ItemEntry } from '../../../models';
|
|
5
5
|
import { ApiRequestColumn, CollectionEntryParentIdMap, CollectionResourceParentIdMap, ItemId, ItemType, QueryCallback } from '../../../types';
|
|
@@ -20,6 +20,7 @@ export declare class ServerCollectionHandler extends CollectionHandlerBase {
|
|
|
20
20
|
private queryService;
|
|
21
21
|
protected transaction: ServerCache;
|
|
22
22
|
constructor(columnSubsetCacheFactory: ColumnSubsetCacheFactory, requestBufferManager: RequestBufferManager, requestColumnExpansionFactory: RequestColumnExpansionFactory, columnExpansionFactory: ColumnExpansionFactory, apiRequestService: ApiRequestService, collectionCacheFactory: CollectionCacheFactory, collectionEntryService: CollectionEntryService, collectionMatcherFactory: CollectionMatcherFactory, errorHandler: ErrorHandlerInterface, itemHandler: ServerItemHandler, promiseService: PromiseLibraryInterface, queryService: QueryService, columnUtil: ColumnUtil, transaction: ServerCache);
|
|
23
|
+
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
23
24
|
getCollectionMatcher(): CollectionMatcher;
|
|
24
25
|
fetchCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntry<ItemTypeType>>;
|
|
25
26
|
fetchLinkedCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, parentIdArray: ItemId[] | (() => ItemId[]), itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntryParentIdMap<ItemTypeType>>;
|
|
@@ -10,7 +10,7 @@ import { ChangesDeltaResult } from '../../ChangesDeltaBase';
|
|
|
10
10
|
import { CollectionEntryService } from '../../CollectionEntryService';
|
|
11
11
|
import { ColumnHandler } from '../../ColumnHandler';
|
|
12
12
|
import { ColumnUtil } from '../../ColumnUtil';
|
|
13
|
-
import { ApiFormatter, ApiRequestService, ColumnCache, LockService, ModuleChangesCompilationResult, OnAfterCreateCallback, RequestBufferManager, TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionCollectionHandler, TransactionItemEntryChanges, TransactionItemHandler } from '../../index';
|
|
13
|
+
import { ApiFormatter, ApiRequestService, ColumnCache, LockService, ModuleChangesCompilationResult, OnAfterCreateCallback, RequestBufferManager, TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionCollectionHandler, TransactionItemEntryChanges, TransactionItemHandler, TransactionValidatorFactory } from '../../index';
|
|
14
14
|
import { InternalChangesDelta } from '../../InternalChangesDelta';
|
|
15
15
|
import { ItemEntryService } from '../../ItemEntryService';
|
|
16
16
|
import { KeyService } from '../../KeyService';
|
|
@@ -22,6 +22,10 @@ declare type EditResourceLinks<ItemTypeType extends ItemType> = {
|
|
|
22
22
|
main: EditResource<ItemTypeType>;
|
|
23
23
|
linked: ItemResourcesItemTypeMap;
|
|
24
24
|
};
|
|
25
|
+
export declare enum TransactionErrorLevel {
|
|
26
|
+
warning = "warning",
|
|
27
|
+
error = "error"
|
|
28
|
+
}
|
|
25
29
|
/**
|
|
26
30
|
* @description
|
|
27
31
|
* The {@link TransactionCache TransactionCache} is responsible for keeping track of newly created {@link ItemEntry ItemEntries}
|
|
@@ -35,6 +39,30 @@ export declare class TransactionCache extends AbstractCache {
|
|
|
35
39
|
* For debugging purposes
|
|
36
40
|
*/
|
|
37
41
|
id?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* @description
|
|
44
|
+
* A map of all item errors, can be populated using {@link TransactionValidator.setGlobalError TransactionValidator.setGlobalError} and {@link TransactionValidator.setItemError TransactionValidator.setItemError}.
|
|
45
|
+
* Contains a translation and level for every error
|
|
46
|
+
*/
|
|
47
|
+
errors: {
|
|
48
|
+
item: {
|
|
49
|
+
[itemEntryId: string]: {
|
|
50
|
+
[columnId: string]: {
|
|
51
|
+
[errorKey: string]: {
|
|
52
|
+
string: string;
|
|
53
|
+
level: TransactionErrorLevel;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
global: {
|
|
59
|
+
[key: string]: {
|
|
60
|
+
string: string;
|
|
61
|
+
level: TransactionErrorLevel;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
isValid: boolean;
|
|
38
66
|
/**
|
|
39
67
|
* @description
|
|
40
68
|
* Stores the 'root' {@link ItemEntry ItemEntry}, this {@link ItemEntry ItemEntry} can be used as request parent to store the whole transaction at once
|
|
@@ -67,14 +95,32 @@ export declare class TransactionCache extends AbstractCache {
|
|
|
67
95
|
readonly collectionHandler: TransactionCollectionHandler;
|
|
68
96
|
private readonly eventHandler;
|
|
69
97
|
private changesInterval;
|
|
98
|
+
private validator?;
|
|
70
99
|
constructor(core: RmCore, columnCache: ColumnCache, requestBufferManager: RequestBufferManager, requestColumnExpansionFactory: RequestColumnExpansionFactory, queryMatcherFactory: QueryMatcherFactory, authInterface: AuthInterface, changesDeltaFactory: ChangesDeltaFactory, lockService: LockService, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceFactory: ItemResourceFactory, templateCache: TemplateCache, itemCacheFactory: ItemCacheFactory, collectionCacheFactory: CollectionCacheFactory, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface, apiRequestService: ApiRequestService, columnExpansionFactory: ColumnExpansionFactory, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, columnSubsetCacheFactory: ColumnSubsetCacheFactory, columnUtil: ColumnUtil, itemEntryFactory: ItemEntryFactory, itemEntryService: ItemEntryService, keyService: KeyService, collectionEntryFactory: CollectionEntryFactory, collectionEntryService: CollectionEntryService, collectionMatcherFactory: CollectionMatcherFactory, queryParserFactory: QueryParserFactory, queryService: QueryService, apiFormatter: ApiFormatter, linkTreeService: LinkTreeServiceInterface, parent: AbstractCache,
|
|
71
100
|
/**
|
|
72
101
|
* @description
|
|
73
102
|
* For debugging purposes
|
|
74
103
|
*/
|
|
75
|
-
id?: string | undefined);
|
|
104
|
+
id?: string | undefined, validatorFactory?: TransactionValidatorFactory);
|
|
76
105
|
destroy(): void;
|
|
77
106
|
createChangesDelta(): ChangesDelta;
|
|
107
|
+
getFirstErrorString(): undefined | string;
|
|
108
|
+
/**
|
|
109
|
+
* @description
|
|
110
|
+
* Should only be called by {@link TransactionValidator TransactionValidator}
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
_setGlobalError(key: string, isInvalid: boolean, errorTranslation: string, level: TransactionErrorLevel): void;
|
|
114
|
+
/**
|
|
115
|
+
* @description
|
|
116
|
+
* Should only be called by {@link TransactionValidator TransactionValidator}
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
_setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean, errorTranslation: string, level: TransactionErrorLevel): void;
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
_setIsValid(): void;
|
|
78
124
|
/**
|
|
79
125
|
* @description
|
|
80
126
|
* Merges the passed changes from the parent Transaction into this Transaction's own changes and then propagates
|
|
@@ -414,5 +460,7 @@ export declare class TransactionCache extends AbstractCache {
|
|
|
414
460
|
* Fetches all required columns to match/fit in collections
|
|
415
461
|
*/
|
|
416
462
|
private expandItemsFromDelta;
|
|
463
|
+
private clearGlobalError;
|
|
464
|
+
private clearItemError;
|
|
417
465
|
}
|
|
418
466
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CollectionCacheFactory, CollectionMatcherFactory, ColumnExpansionFactory, ColumnSubsetCacheFactory, RequestColumnExpansionFactory } from '../../../factories';
|
|
2
2
|
import { ChangesDeltaFactory } from '../../../factories/ChangesDeltaFactory';
|
|
3
|
-
import { ApiRequestColumns, ChangesDelta, CollectionEntryOptions, CollectionResource, ColumnUtil, ConversionMap, EntryParent, ExceptionHandlerInterface, ItemIdConversionMap, PromiseInterface } from '../../../index';
|
|
3
|
+
import { ApiQuery, ApiRequestColumns, ChangesDelta, CollectionEntryOptions, CollectionResource, ColumnUtil, ConversionMap, EntryParent, ExceptionHandlerInterface, ItemEntryOptions, ItemIdConversionMap, PromiseInterface } from '../../../index';
|
|
4
4
|
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
5
5
|
import { CollectionEntry, ItemEntry } from '../../../models';
|
|
6
6
|
import { ApiRequestColumn, CollectionEntryParentIdMap, CollectionResourceParentIdMap, ItemId, ItemType, QueryCallback } from '../../../types';
|
|
@@ -23,6 +23,7 @@ export declare class TransactionCollectionHandler extends CollectionHandlerBase
|
|
|
23
23
|
[collectionEntryId: number]: CollectionResource[];
|
|
24
24
|
};
|
|
25
25
|
constructor(requestColumnExpansionFactory: RequestColumnExpansionFactory, columnUtil: ColumnUtil, columnSubsetCacheFactory: ColumnSubsetCacheFactory, columnExpansionFactory: ColumnExpansionFactory, changesDeltaFactory: ChangesDeltaFactory, collectionCacheFactory: CollectionCacheFactory, collectionEntryService: CollectionEntryService, collectionMatcherFactory: CollectionMatcherFactory, columnHandler: ColumnHandler, errorHandler: ErrorHandlerInterface, itemHandler: TransactionItemHandler, keyService: KeyService, promiseService: PromiseLibraryInterface, exceptionHandler: ExceptionHandlerInterface, transaction: TransactionCache);
|
|
26
|
+
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
26
27
|
getAllCollectionsByItemType<ItemTypeType extends ItemType>(itemType: ItemTypeType): Array<CollectionEntry<ItemTypeType>>;
|
|
27
28
|
createCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): CollectionEntry<ItemTypeType>;
|
|
28
29
|
/**
|
|
@@ -50,7 +51,7 @@ export declare class TransactionCollectionHandler extends CollectionHandlerBase
|
|
|
50
51
|
expandCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, itemType: ItemTypeType, collections: CollectionResourceParentIdMap, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
|
|
51
52
|
extendCollectionEntries<T extends CollectionResourceParentIdMap>(parentType: ItemType, itemType: ItemType, options: CollectionEntryOptions, queryCallback: QueryCallback, collections: T): PromiseInterface<void>;
|
|
52
53
|
addItemEntriesToCollectionChanges<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>, isCalledAfterSocketUpdate?: boolean): void;
|
|
53
|
-
isLocal(options: CollectionEntryOptions): boolean;
|
|
54
|
+
isLocal(options: CollectionEntryOptions | ItemEntryOptions): boolean;
|
|
54
55
|
expandCollectionEntry<CollectionEntryType extends CollectionEntry>(changesDelta: ChangesDelta, collectionEntry: CollectionEntryType, newColumns: ApiRequestColumns): PromiseInterface<CollectionEntryType>;
|
|
55
56
|
/**
|
|
56
57
|
* @description
|
|
@@ -8,6 +8,7 @@ import { ApiFormatter, ColumnHandler, ColumnInfo, ColumnSubsetCache, ColumnUtil,
|
|
|
8
8
|
import { TemplateCache } from '../../TemplateCache';
|
|
9
9
|
import { ItemHandlerBase } from '../ItemHandlerBase';
|
|
10
10
|
import { TransactionCache } from './TransactionCache';
|
|
11
|
+
import { TransactionValidator } from './TransactionValidator';
|
|
11
12
|
export declare type TransactionItemEntryChanges<ItemTypeType extends ItemType = any> = {
|
|
12
13
|
initial: FieldMap<ItemTypeType>;
|
|
13
14
|
changes: FieldMap<ItemTypeType>;
|
|
@@ -28,6 +29,7 @@ export declare class TransactionItemHandler extends ItemHandlerBase {
|
|
|
28
29
|
private itemEntryService;
|
|
29
30
|
private keyService;
|
|
30
31
|
protected transaction: TransactionCache;
|
|
32
|
+
private validator?;
|
|
31
33
|
deletedItems: ItemTypeMap<ItemEntry[]>;
|
|
32
34
|
itemChanges: {
|
|
33
35
|
[itemEntryId: number]: TransactionItemEntryChanges;
|
|
@@ -35,7 +37,7 @@ export declare class TransactionItemHandler extends ItemHandlerBase {
|
|
|
35
37
|
itemResources: {
|
|
36
38
|
[itemEntryId: number]: ItemResource[];
|
|
37
39
|
};
|
|
38
|
-
constructor(changesDeltaFactory: ChangesDeltaFactory, exceptionHandler: ExceptionHandlerInterface, templateCache: TemplateCache, columnExpansionFactory: ColumnExpansionFactory, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, columnSubsetCacheFactory: ColumnSubsetCacheFactory, errorHandler: ErrorHandlerInterface, itemEntryService: ItemEntryService, keyService: KeyService, promiseService: PromiseLibraryInterface, columnUtil: ColumnUtil, apiFormatter: ApiFormatter, itemEntryFactory: ItemEntryFactory, itemCacheFactory: ItemCacheFactory, requestColumnExpansionFactory: RequestColumnExpansionFactory, transaction: TransactionCache);
|
|
40
|
+
constructor(changesDeltaFactory: ChangesDeltaFactory, exceptionHandler: ExceptionHandlerInterface, templateCache: TemplateCache, columnExpansionFactory: ColumnExpansionFactory, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, columnSubsetCacheFactory: ColumnSubsetCacheFactory, errorHandler: ErrorHandlerInterface, itemEntryService: ItemEntryService, keyService: KeyService, promiseService: PromiseLibraryInterface, columnUtil: ColumnUtil, apiFormatter: ApiFormatter, itemEntryFactory: ItemEntryFactory, itemCacheFactory: ItemCacheFactory, requestColumnExpansionFactory: RequestColumnExpansionFactory, transaction: TransactionCache, validator?: TransactionValidator | undefined);
|
|
39
41
|
copyTransactionItemEntryChanges(itemEntryChanges: TransactionItemEntryChanges, entry: ItemEntry): TransactionItemEntryChanges;
|
|
40
42
|
createItemEntry(createTuple: ChangesDeltaItemCreateDelta): ItemEntry;
|
|
41
43
|
/**
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ItemEntry } from '../../../models/index';
|
|
2
|
+
import { FieldMap, ItemType, PromiseInterface } from '../../../types/index';
|
|
3
|
+
import { TransactionCache, TransactionErrorLevel } from './TransactionCache';
|
|
4
|
+
export interface TransactionValidatorFactory {
|
|
5
|
+
construct(transaction: TransactionCache): TransactionValidator;
|
|
6
|
+
}
|
|
7
|
+
export declare abstract class TransactionValidator {
|
|
8
|
+
protected transaction: TransactionCache;
|
|
9
|
+
private lastCallId;
|
|
10
|
+
protected constructor(transaction: TransactionCache);
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* Will be called after {@link TransactionCache.applyChangesFromParent applyChangesFromParent}, {@link TransactionCache.applyChangesFromChild applyChangesFromChild} or {@link TransactionCache.applyChangesDelta applyChangesDelta} is called
|
|
14
|
+
* Allows you to set {@link TransactionCache.errors global errors}
|
|
15
|
+
*/
|
|
16
|
+
abstract validateTransaction(): void;
|
|
17
|
+
/**
|
|
18
|
+
* @description
|
|
19
|
+
* Will be called whenever an item is changed, allows you to set errors on the transaction
|
|
20
|
+
* @param itemEntry
|
|
21
|
+
* @param fields
|
|
22
|
+
* @param previous
|
|
23
|
+
*/
|
|
24
|
+
abstract validateItem<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>, previous: FieldMap<ItemTypeType>): void;
|
|
25
|
+
protected setGlobalError(key: string, isInvalid: boolean | PromiseInterface<boolean>, errorTranslation: string, level: TransactionErrorLevel): void;
|
|
26
|
+
protected setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean | PromiseInterface<boolean>, errorTranslation: string, level: TransactionErrorLevel): void;
|
|
27
|
+
private getRandomId;
|
|
28
|
+
}
|
|
@@ -35,6 +35,7 @@ export * from './cache/transaction/TransactionCache';
|
|
|
35
35
|
export * from './cache/transaction/TransactionItemHandler';
|
|
36
36
|
export * from './cache/transaction/TransactionCollectionHandler';
|
|
37
37
|
export * from './cache/transaction/TransactionEventHandler';
|
|
38
|
+
export * from './cache/transaction/TransactionValidator';
|
|
38
39
|
export * from './ChangesDelta';
|
|
39
40
|
export * from './InternalChangesDelta';
|
|
40
41
|
export * from './RequestBufferManager';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiFormatter, ApiRequestService, CollectionEntryService, ColumnCache, ColumnHandler, ColumnUtil, ItemEntryService, KeyService, LockService, QueryService } from '../classes';
|
|
2
2
|
import { ServerCache } from '../classes/cache/server/ServerCache';
|
|
3
3
|
import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionValidatorFactory } from '../classes/cache/transaction/TransactionValidator';
|
|
4
5
|
import { RequestBufferManager } from '../classes/RequestBufferManager';
|
|
5
6
|
import { TemplateCache } from '../classes/TemplateCache';
|
|
6
7
|
import { RmCore } from '../core';
|
|
@@ -50,6 +51,6 @@ export declare class TransactionCacheFactory {
|
|
|
50
51
|
* Todo[cache] Store a map of all transactions by transaction id ?
|
|
51
52
|
*/
|
|
52
53
|
getById(id: string): TransactionCache | undefined;
|
|
53
|
-
construct(id?: string): TransactionCache;
|
|
54
|
+
construct(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
|
|
54
55
|
getServerCache(): ServerCache;
|
|
55
56
|
}
|