@rentman/rm-core 2.0.10 → 2.0.11
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 +595 -591
- package/dist/rm-core.js +9342 -9342
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +55 -55
- package/dist/src/classes/ApiRequestService.d.ts +20 -20
- package/dist/src/classes/ApiResponseProcessor.d.ts +29 -29
- package/dist/src/classes/ChangesCompilation.d.ts +34 -34
- package/dist/src/classes/ChangesDelta.d.ts +42 -42
- package/dist/src/classes/ChangesDeltaBase.d.ts +33 -33
- package/dist/src/classes/ChangesProcessor.d.ts +47 -47
- package/dist/src/classes/CollectionCache.d.ts +37 -37
- package/dist/src/classes/CollectionEntryService.d.ts +25 -25
- package/dist/src/classes/CollectionMatcher.d.ts +9 -9
- package/dist/src/classes/CollectionMatcherBase.d.ts +26 -26
- package/dist/src/classes/CollectionResourceService.d.ts +6 -6
- package/dist/src/classes/ColumnCache.d.ts +21 -21
- package/dist/src/classes/ColumnExpansion.d.ts +22 -22
- package/dist/src/classes/ColumnHandler.d.ts +21 -21
- package/dist/src/classes/ColumnInfo.d.ts +14 -14
- package/dist/src/classes/ColumnSet.d.ts +39 -39
- package/dist/src/classes/ColumnSubsetCache.d.ts +8 -8
- package/dist/src/classes/ColumnUtil.d.ts +99 -99
- package/dist/src/classes/CreateRequest.d.ts +19 -19
- package/dist/src/classes/InternalChangesDelta.d.ts +38 -38
- package/dist/src/classes/ItemCache.d.ts +29 -29
- package/dist/src/classes/ItemEntryService.d.ts +41 -41
- package/dist/src/classes/KeyService.d.ts +16 -16
- package/dist/src/classes/LockService.d.ts +32 -32
- package/dist/src/classes/ModuleChangesCompilation.d.ts +18 -18
- package/dist/src/classes/QueryColumnExtractor.d.ts +20 -20
- package/dist/src/classes/QueryMatcher.d.ts +14 -14
- package/dist/src/classes/QueryParser.d.ts +25 -25
- package/dist/src/classes/QueryParserBase.d.ts +29 -29
- package/dist/src/classes/QueryService.d.ts +14 -14
- package/dist/src/classes/RequestBuffer.d.ts +25 -25
- package/dist/src/classes/RequestBufferManager.d.ts +31 -31
- package/dist/src/classes/RequestColumnExpansion.d.ts +15 -15
- package/dist/src/classes/SocketMessageHandler.d.ts +31 -31
- package/dist/src/classes/TemplateCache.d.ts +63 -63
- package/dist/src/classes/Util.d.ts +28 -28
- package/dist/src/classes/cache/AbstractCache.d.ts +140 -140
- package/dist/src/classes/cache/CollectionHandlerBase.d.ts +64 -64
- package/dist/src/classes/cache/CollectionMatcherCacheProcessor.d.ts +26 -26
- package/dist/src/classes/cache/ItemHandlerBase.d.ts +95 -95
- package/dist/src/classes/cache/server/ServerCache.d.ts +98 -98
- package/dist/src/classes/cache/server/ServerCollectionHandler.d.ts +43 -43
- package/dist/src/classes/cache/server/ServerItemHandler.d.ts +50 -50
- package/dist/src/classes/cache/transaction/TransactionCache.d.ts +412 -412
- package/dist/src/classes/cache/transaction/TransactionCollectionHandler.d.ts +72 -72
- package/dist/src/classes/cache/transaction/TransactionEventHandler.d.ts +19 -19
- package/dist/src/classes/cache/transaction/TransactionItemHandler.d.ts +114 -114
- package/dist/src/classes/index.d.ts +41 -41
- package/dist/src/constants.d.ts +7 -7
- package/dist/src/core.d.ts +49 -49
- package/dist/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/src/factories/ChangesCompilationFactory.d.ts +6 -6
- package/dist/src/factories/ChangesDeltaFactory.d.ts +9 -9
- package/dist/src/factories/ChangesProcessorFactory.d.ts +22 -22
- package/dist/src/factories/CollectionCacheFactory.d.ts +8 -8
- package/dist/src/factories/CollectionEntryFactory.d.ts +11 -11
- package/dist/src/factories/CollectionMatcherFactory.d.ts +9 -9
- package/dist/src/factories/CollectionResourceFactory.d.ts +34 -34
- package/dist/src/factories/ColumnExpansionFactory.d.ts +8 -8
- package/dist/src/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/src/factories/ColumnSetFactory.d.ts +19 -19
- package/dist/src/factories/ColumnSubsetCacheFactory.d.ts +6 -6
- package/dist/src/factories/CreateRequestFactory.d.ts +11 -11
- package/dist/src/factories/ItemCacheFactory.d.ts +8 -8
- package/dist/src/factories/ItemEntryFactory.d.ts +17 -17
- package/dist/src/factories/ItemResourceFactory.d.ts +32 -32
- package/dist/src/factories/ModuleChangesCompilationFactory.d.ts +5 -5
- package/dist/src/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/src/factories/QueryParserFactory.d.ts +6 -6
- package/dist/src/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/src/factories/TemplateFactory.d.ts +10 -10
- package/dist/src/factories/TransactionCacheFactory.d.ts +55 -55
- package/dist/src/factories/index.d.ts +22 -22
- package/dist/src/index.d.ts +7 -7
- package/dist/src/interfaces/ApiRequestServiceInterface.d.ts +11 -11
- package/dist/src/interfaces/AuthInterface.d.ts +9 -9
- package/dist/src/interfaces/ErrorHandlerInterface.d.ts +5 -5
- package/dist/src/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/src/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/src/interfaces/PromiseLibraryInterface.d.ts +25 -25
- package/dist/src/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/src/interfaces/index.d.ts +7 -7
- package/dist/src/models/CollectionEditResource.d.ts +17 -17
- package/dist/src/models/CollectionEntry.d.ts +27 -27
- package/dist/src/models/CollectionEntryOptions.d.ts +13 -13
- package/dist/src/models/CollectionResource.d.ts +52 -52
- package/dist/src/models/CollectionResourceOptions.d.ts +27 -27
- package/dist/src/models/CollectionViewResource.d.ts +7 -7
- package/dist/src/models/EditResource.d.ts +16 -16
- package/dist/src/models/ItemEntry.d.ts +19 -19
- package/dist/src/models/ItemEntryOptions.d.ts +9 -9
- package/dist/src/models/ItemResource.d.ts +87 -87
- package/dist/src/models/ItemResourceOptions.d.ts +9 -9
- package/dist/src/models/LocalViewResource.d.ts +7 -7
- package/dist/src/models/RemoteViewResource.d.ts +7 -7
- package/dist/src/models/Template.d.ts +11 -11
- package/dist/src/models/ViewResource.d.ts +8 -8
- package/dist/src/models/index.d.ts +15 -15
- package/dist/src/types/ItemTypesCollection.d.ts +262 -262
- package/dist/src/types/PromiseInterface.d.ts +2 -2
- package/dist/src/types/index.d.ts +2 -2
- package/package.json +36 -36
- package/readme.md +15 -15
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { CollectionCacheFactory, CollectionMatcherFactory, ColumnExpansionFactory, ColumnSubsetCacheFactory, RequestColumnExpansionFactory } from '../../../factories';
|
|
2
|
-
import { ChangesDeltaFactory } from '../../../factories/ChangesDeltaFactory';
|
|
3
|
-
import { ApiRequestColumns, ChangesDelta, CollectionEntryOptions, CollectionResource, ColumnUtil, ConversionMap, EntryParent, ExceptionHandlerInterface, ItemIdConversionMap, PromiseInterface } from '../../../index';
|
|
4
|
-
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
5
|
-
import { CollectionEntry, ItemEntry } from '../../../models';
|
|
6
|
-
import { ApiRequestColumn, CollectionEntryParentIdMap, CollectionResourceParentIdMap, ItemId, ItemType, QueryCallback } from '../../../types';
|
|
7
|
-
import { CollectionEntryService, CollectionMatcher, ColumnHandler, KeyService, TransactionItemHandler } from '../../index';
|
|
8
|
-
import { CollectionHandlerBase } from '../CollectionHandlerBase';
|
|
9
|
-
import { TransactionCache } from './TransactionCache';
|
|
10
|
-
export declare class TransactionCollectionHandler extends CollectionHandlerBase {
|
|
11
|
-
private columnSubsetCacheFactory;
|
|
12
|
-
private columnExpansionFactory;
|
|
13
|
-
private changesDeltaFactory;
|
|
14
|
-
private collectionMatcherFactory;
|
|
15
|
-
private columnHandler;
|
|
16
|
-
private errorHandler;
|
|
17
|
-
private itemHandler;
|
|
18
|
-
private keyService;
|
|
19
|
-
private promiseService;
|
|
20
|
-
private exceptionHandler;
|
|
21
|
-
protected transaction: TransactionCache;
|
|
22
|
-
collectionResources: {
|
|
23
|
-
[collectionEntryId: number]: CollectionResource[];
|
|
24
|
-
};
|
|
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
|
-
getAllCollectionsByItemType<ItemTypeType extends ItemType>(itemType: ItemTypeType): Array<CollectionEntry<ItemTypeType>>;
|
|
27
|
-
createCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): CollectionEntry<ItemTypeType>;
|
|
28
|
-
/**
|
|
29
|
-
* @description
|
|
30
|
-
* Calls the {@link CollectionResourceOptions.onItemsCreated onItemsCreated} callback whenever a create request is done on {@link ItemEntry ItemEntries} that fit in the collection
|
|
31
|
-
* Can be used to update maps that use {@link ItemEntry.itemId ItemEntry.itemId}
|
|
32
|
-
*
|
|
33
|
-
* @deprecated
|
|
34
|
-
* You should use itemResource.onChange and compare previous.id with fields.id
|
|
35
|
-
*/
|
|
36
|
-
onItemEntriesCreated(collectionEntry: CollectionEntry, conversionMap: ConversionMap): void;
|
|
37
|
-
clearEntry(entry: CollectionEntry): void;
|
|
38
|
-
addResource(resource: CollectionResource): void;
|
|
39
|
-
clearResource(resource: CollectionResource): void;
|
|
40
|
-
/**
|
|
41
|
-
* @description
|
|
42
|
-
* Updates the parents of the passed {@link ItemEntry ItemEntries}, returns `void` because you should use the {@link CollectionResourceOptions.onAdd onAdd} and {@link CollectionResourceOptions.onRemove onRemove} callbacks
|
|
43
|
-
*/
|
|
44
|
-
moveItems<CollectionEntryType extends CollectionEntry>(sourceCollectionEntry: CollectionEntryType, destinationCollectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
45
|
-
extendCollectionEntry<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, queryCallback: QueryCallback): PromiseInterface<CollectionEntryType>;
|
|
46
|
-
cloneCollectionEntry<CollectionEntryType extends CollectionEntry>(sourceEntry: CollectionEntryType, parent: EntryParent, conversionMap?: ItemIdConversionMap): CollectionEntry<CollectionEntryType['itemType']>;
|
|
47
|
-
getCollectionMatcher(): CollectionMatcher;
|
|
48
|
-
fetchCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntry<ItemTypeType>>;
|
|
49
|
-
fetchLinkedCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, parentIdArray: ItemId[] | (() => ItemId[]), itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntryParentIdMap<ItemTypeType>>;
|
|
50
|
-
expandCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, itemType: ItemTypeType, collections: CollectionResourceParentIdMap, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
|
|
51
|
-
extendCollectionEntries<T extends CollectionResourceParentIdMap>(parentType: ItemType, itemType: ItemType, options: CollectionEntryOptions, queryCallback: QueryCallback, collections: T): PromiseInterface<void>;
|
|
52
|
-
addItemEntriesToCollectionChanges<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>, isCalledAfterSocketUpdate?: boolean): void;
|
|
53
|
-
isLocal(options: CollectionEntryOptions): boolean;
|
|
54
|
-
expandCollectionEntry<CollectionEntryType extends CollectionEntry>(changesDelta: ChangesDelta, collectionEntry: CollectionEntryType, newColumns: ApiRequestColumns): PromiseInterface<CollectionEntryType>;
|
|
55
|
-
/**
|
|
56
|
-
* @description
|
|
57
|
-
* When {@link ItemEntry ItemEntries} are added to the changes of a {@link CollectionEntry CollectionEntry} all {@link CollectionResource CollectionResources}
|
|
58
|
-
* should get new {@link ItemResource ItemResources} for the newly added entries
|
|
59
|
-
*/
|
|
60
|
-
protected handleAddedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, addedEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
61
|
-
/**
|
|
62
|
-
* @description
|
|
63
|
-
* When {@link ItemEntry ItemEntries} are removed from the changes of a {@link CollectionEntry CollectionEntry} the {@link ItemResource ItemResources} of the ItemEntries should be removed from all {@link CollectionResource CollectionResources}
|
|
64
|
-
*/
|
|
65
|
-
protected handleRemovedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, removedItemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
66
|
-
private fetchCollectionData;
|
|
67
|
-
/**
|
|
68
|
-
* @description
|
|
69
|
-
* Fetches {@link CollectionEntry CollectionEntries} of which the parents are local
|
|
70
|
-
*/
|
|
71
|
-
private fetchLinkedLocalCollectionEntries;
|
|
72
|
-
}
|
|
1
|
+
import { CollectionCacheFactory, CollectionMatcherFactory, ColumnExpansionFactory, ColumnSubsetCacheFactory, RequestColumnExpansionFactory } from '../../../factories';
|
|
2
|
+
import { ChangesDeltaFactory } from '../../../factories/ChangesDeltaFactory';
|
|
3
|
+
import { ApiRequestColumns, ChangesDelta, CollectionEntryOptions, CollectionResource, ColumnUtil, ConversionMap, EntryParent, ExceptionHandlerInterface, ItemIdConversionMap, PromiseInterface } from '../../../index';
|
|
4
|
+
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
5
|
+
import { CollectionEntry, ItemEntry } from '../../../models';
|
|
6
|
+
import { ApiRequestColumn, CollectionEntryParentIdMap, CollectionResourceParentIdMap, ItemId, ItemType, QueryCallback } from '../../../types';
|
|
7
|
+
import { CollectionEntryService, CollectionMatcher, ColumnHandler, KeyService, TransactionItemHandler } from '../../index';
|
|
8
|
+
import { CollectionHandlerBase } from '../CollectionHandlerBase';
|
|
9
|
+
import { TransactionCache } from './TransactionCache';
|
|
10
|
+
export declare class TransactionCollectionHandler extends CollectionHandlerBase {
|
|
11
|
+
private columnSubsetCacheFactory;
|
|
12
|
+
private columnExpansionFactory;
|
|
13
|
+
private changesDeltaFactory;
|
|
14
|
+
private collectionMatcherFactory;
|
|
15
|
+
private columnHandler;
|
|
16
|
+
private errorHandler;
|
|
17
|
+
private itemHandler;
|
|
18
|
+
private keyService;
|
|
19
|
+
private promiseService;
|
|
20
|
+
private exceptionHandler;
|
|
21
|
+
protected transaction: TransactionCache;
|
|
22
|
+
collectionResources: {
|
|
23
|
+
[collectionEntryId: number]: CollectionResource[];
|
|
24
|
+
};
|
|
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
|
+
getAllCollectionsByItemType<ItemTypeType extends ItemType>(itemType: ItemTypeType): Array<CollectionEntry<ItemTypeType>>;
|
|
27
|
+
createCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): CollectionEntry<ItemTypeType>;
|
|
28
|
+
/**
|
|
29
|
+
* @description
|
|
30
|
+
* Calls the {@link CollectionResourceOptions.onItemsCreated onItemsCreated} callback whenever a create request is done on {@link ItemEntry ItemEntries} that fit in the collection
|
|
31
|
+
* Can be used to update maps that use {@link ItemEntry.itemId ItemEntry.itemId}
|
|
32
|
+
*
|
|
33
|
+
* @deprecated
|
|
34
|
+
* You should use itemResource.onChange and compare previous.id with fields.id
|
|
35
|
+
*/
|
|
36
|
+
onItemEntriesCreated(collectionEntry: CollectionEntry, conversionMap: ConversionMap): void;
|
|
37
|
+
clearEntry(entry: CollectionEntry): void;
|
|
38
|
+
addResource(resource: CollectionResource): void;
|
|
39
|
+
clearResource(resource: CollectionResource): void;
|
|
40
|
+
/**
|
|
41
|
+
* @description
|
|
42
|
+
* Updates the parents of the passed {@link ItemEntry ItemEntries}, returns `void` because you should use the {@link CollectionResourceOptions.onAdd onAdd} and {@link CollectionResourceOptions.onRemove onRemove} callbacks
|
|
43
|
+
*/
|
|
44
|
+
moveItems<CollectionEntryType extends CollectionEntry>(sourceCollectionEntry: CollectionEntryType, destinationCollectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
45
|
+
extendCollectionEntry<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, queryCallback: QueryCallback): PromiseInterface<CollectionEntryType>;
|
|
46
|
+
cloneCollectionEntry<CollectionEntryType extends CollectionEntry>(sourceEntry: CollectionEntryType, parent: EntryParent, conversionMap?: ItemIdConversionMap): CollectionEntry<CollectionEntryType['itemType']>;
|
|
47
|
+
getCollectionMatcher(): CollectionMatcher;
|
|
48
|
+
fetchCollectionEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntry<ItemTypeType>>;
|
|
49
|
+
fetchLinkedCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, parentIdArray: ItemId[] | (() => ItemId[]), itemType: ItemTypeType, options: CollectionEntryOptions): PromiseInterface<CollectionEntryParentIdMap<ItemTypeType>>;
|
|
50
|
+
expandCollectionEntries<ItemTypeType extends ItemType>(parentType: ItemType, itemType: ItemTypeType, collections: CollectionResourceParentIdMap, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
|
|
51
|
+
extendCollectionEntries<T extends CollectionResourceParentIdMap>(parentType: ItemType, itemType: ItemType, options: CollectionEntryOptions, queryCallback: QueryCallback, collections: T): PromiseInterface<void>;
|
|
52
|
+
addItemEntriesToCollectionChanges<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, itemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>, isCalledAfterSocketUpdate?: boolean): void;
|
|
53
|
+
isLocal(options: CollectionEntryOptions): boolean;
|
|
54
|
+
expandCollectionEntry<CollectionEntryType extends CollectionEntry>(changesDelta: ChangesDelta, collectionEntry: CollectionEntryType, newColumns: ApiRequestColumns): PromiseInterface<CollectionEntryType>;
|
|
55
|
+
/**
|
|
56
|
+
* @description
|
|
57
|
+
* When {@link ItemEntry ItemEntries} are added to the changes of a {@link CollectionEntry CollectionEntry} all {@link CollectionResource CollectionResources}
|
|
58
|
+
* should get new {@link ItemResource ItemResources} for the newly added entries
|
|
59
|
+
*/
|
|
60
|
+
protected handleAddedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, addedEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
61
|
+
/**
|
|
62
|
+
* @description
|
|
63
|
+
* When {@link ItemEntry ItemEntries} are removed from the changes of a {@link CollectionEntry CollectionEntry} the {@link ItemResource ItemResources} of the ItemEntries should be removed from all {@link CollectionResource CollectionResources}
|
|
64
|
+
*/
|
|
65
|
+
protected handleRemovedItemEntriesCallback<CollectionEntryType extends CollectionEntry>(collectionEntry: CollectionEntryType, removedItemEntries: Array<ItemEntry<CollectionEntryType['itemType']>>): void;
|
|
66
|
+
private fetchCollectionData;
|
|
67
|
+
/**
|
|
68
|
+
* @description
|
|
69
|
+
* Fetches {@link CollectionEntry CollectionEntries} of which the parents are local
|
|
70
|
+
*/
|
|
71
|
+
private fetchLinkedLocalCollectionEntries;
|
|
72
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
2
|
-
import { ItemIdConversionMap, PromiseInterface } from '../../../types';
|
|
3
|
-
import { TransactionCache } from './TransactionCache';
|
|
4
|
-
export declare type TransactionCacheCallbackCondition = 'always' | 'onClose' | 'skipOnClose';
|
|
5
|
-
export declare type TransactionCacheCallbackType = {
|
|
6
|
-
onBeforeSave: (transaction: TransactionCache) => any;
|
|
7
|
-
onSaveSuccess: (transaction: TransactionCache, conversionMap: ItemIdConversionMap) => any;
|
|
8
|
-
};
|
|
9
|
-
export declare class TransactionEventHandler {
|
|
10
|
-
private errorHandler;
|
|
11
|
-
private exceptionHandler;
|
|
12
|
-
private promiseService;
|
|
13
|
-
private callbacks;
|
|
14
|
-
constructor(errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface);
|
|
15
|
-
registerCallback<T extends keyof TransactionCacheCallbackType>(type: T, key: string, callback: TransactionCacheCallbackType[T], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
|
|
16
|
-
executeCallbacks<T extends keyof TransactionCacheCallbackType>(type: T, execute: (callback: TransactionCacheCallbackType[T]) => any, closeTab: boolean): PromiseInterface<any>;
|
|
17
|
-
private getPriorityLevel;
|
|
18
|
-
private executeCallbacksPriorityLevel;
|
|
19
|
-
}
|
|
1
|
+
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
2
|
+
import { ItemIdConversionMap, PromiseInterface } from '../../../types';
|
|
3
|
+
import { TransactionCache } from './TransactionCache';
|
|
4
|
+
export declare type TransactionCacheCallbackCondition = 'always' | 'onClose' | 'skipOnClose';
|
|
5
|
+
export declare type TransactionCacheCallbackType = {
|
|
6
|
+
onBeforeSave: (transaction: TransactionCache) => any;
|
|
7
|
+
onSaveSuccess: (transaction: TransactionCache, conversionMap: ItemIdConversionMap) => any;
|
|
8
|
+
};
|
|
9
|
+
export declare class TransactionEventHandler {
|
|
10
|
+
private errorHandler;
|
|
11
|
+
private exceptionHandler;
|
|
12
|
+
private promiseService;
|
|
13
|
+
private callbacks;
|
|
14
|
+
constructor(errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface);
|
|
15
|
+
registerCallback<T extends keyof TransactionCacheCallbackType>(type: T, key: string, callback: TransactionCacheCallbackType[T], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
|
|
16
|
+
executeCallbacks<T extends keyof TransactionCacheCallbackType>(type: T, execute: (callback: TransactionCacheCallbackType[T]) => any, closeTab: boolean): PromiseInterface<any>;
|
|
17
|
+
private getPriorityLevel;
|
|
18
|
+
private executeCallbacksPriorityLevel;
|
|
19
|
+
}
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
import { ChangesDeltaFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, RequestColumnExpansionFactory } from '../../../factories';
|
|
2
|
-
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
3
|
-
import { ItemEntry, ItemEntryOptions, ItemResource, Template } from '../../../models';
|
|
4
|
-
import { ApiQuery, ApiRequestColumns, EntryParentNull, FieldMap, FilterItemEntryCallback, ItemId, ItemIdConversionMap, ItemType, ItemTypeMap, ModifyFieldsCallback, PromiseInterface, ResponseColumnItemTypeMap } from '../../../types';
|
|
5
|
-
import { ChangesDelta, ChangesDeltaItemCreateDelta } from '../../ChangesDelta';
|
|
6
|
-
import { ChangesDeltaBase, ChangesDeltaItemUpdateDelta, ChangesDeltaResult } from '../../ChangesDeltaBase';
|
|
7
|
-
import { ApiFormatter, ColumnHandler, ColumnInfo, ColumnSubsetCache, ColumnUtil, ItemEntryService, KeyService } from '../../index';
|
|
8
|
-
import { TemplateCache } from '../../TemplateCache';
|
|
9
|
-
import { ItemHandlerBase } from '../ItemHandlerBase';
|
|
10
|
-
import { TransactionCache } from './TransactionCache';
|
|
11
|
-
export declare type TransactionItemEntryChanges<ItemTypeType extends ItemType = any> = {
|
|
12
|
-
initial: FieldMap<ItemTypeType>;
|
|
13
|
-
changes: FieldMap<ItemTypeType>;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* @description
|
|
17
|
-
* In a {@link TransactionCache Transaction} only local items can be stored, so all entries in {@link TransactionItemHandler.entries this.entries} are local
|
|
18
|
-
* If a non-local entry is requested it should be passed on to the {@link ServerItemHandler ServerItemHandler} which will fetchCollectionEntry the entry from the server
|
|
19
|
-
*/
|
|
20
|
-
export declare class TransactionItemHandler extends ItemHandlerBase {
|
|
21
|
-
private changesDeltaFactory;
|
|
22
|
-
private exceptionHandler;
|
|
23
|
-
private templateCache;
|
|
24
|
-
private columnExpansionFactory;
|
|
25
|
-
private columnHandler;
|
|
26
|
-
private columnSetFactory;
|
|
27
|
-
private columnSubsetCacheFactory;
|
|
28
|
-
private itemEntryService;
|
|
29
|
-
private keyService;
|
|
30
|
-
protected transaction: TransactionCache;
|
|
31
|
-
deletedItems: ItemTypeMap<ItemEntry[]>;
|
|
32
|
-
itemChanges: {
|
|
33
|
-
[itemEntryId: number]: TransactionItemEntryChanges;
|
|
34
|
-
};
|
|
35
|
-
itemResources: {
|
|
36
|
-
[itemEntryId: number]: ItemResource[];
|
|
37
|
-
};
|
|
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);
|
|
39
|
-
copyTransactionItemEntryChanges(itemEntryChanges: TransactionItemEntryChanges, entry: ItemEntry): TransactionItemEntryChanges;
|
|
40
|
-
createItemEntry(createTuple: ChangesDeltaItemCreateDelta): ItemEntry;
|
|
41
|
-
/**
|
|
42
|
-
* @description
|
|
43
|
-
* Gets the local {@link FieldMap changes} of the {@link ItemEntry entry} on the {@link TransactionCache transaction} in a formatted way the API accepts
|
|
44
|
-
*/
|
|
45
|
-
formatRequest<ItemEntryType extends ItemEntry>(entry: ItemEntryType): FieldMap<ItemEntryType['itemType']>;
|
|
46
|
-
/**
|
|
47
|
-
* @description
|
|
48
|
-
* Fetches a new {@link Template template} and creates new {@link ItemEntry itemEntries} with the passed values
|
|
49
|
-
*/
|
|
50
|
-
createItems<ItemTypeType extends ItemType>(itemType: ItemTypeType, valuesArray: Array<FieldMap<ItemTypeType>>, parent: EntryParentNull): PromiseInterface<ChangesDeltaResult>;
|
|
51
|
-
clearItemEntry(entry: ItemEntry): void;
|
|
52
|
-
/**
|
|
53
|
-
* @description
|
|
54
|
-
* Stores am {@link ItemResource ItemResource} on the transaction, used to call {@link ItemResource.options.onChange the onChange callback}
|
|
55
|
-
*/
|
|
56
|
-
addResource(resource: ItemResource): void;
|
|
57
|
-
/**
|
|
58
|
-
* @description
|
|
59
|
-
* Removes a resource from the transaction, preventing the {@link ItemResource.options.onChange the onChange callback} from being called.
|
|
60
|
-
* You should call this function when the resource is no longer needed
|
|
61
|
-
*/
|
|
62
|
-
clearResource(resource: ItemResource): void;
|
|
63
|
-
detectChanges(): boolean;
|
|
64
|
-
/**
|
|
65
|
-
* @description
|
|
66
|
-
* Checks if the transaction has changes for the passed {@link ItemEntry.id ItemEntryId}
|
|
67
|
-
*
|
|
68
|
-
* -----
|
|
69
|
-
* @remarks
|
|
70
|
-
* Compares every field (of the entry) in {@link TransactionItemHandler.itemChanges itemChanges} with the initial fields, because fields are copied over when creating a resource having something in itemChanges doesn't actually mean that there are changes (just that a resource has been made)
|
|
71
|
-
*/
|
|
72
|
-
detectEntryChanges(itemEntryId: ItemEntry['id']): boolean;
|
|
73
|
-
/**
|
|
74
|
-
* @description
|
|
75
|
-
* Processes on a cached entry, if there are no {@link TransactionItemHandler.itemChanges itemChanges} the new values will not be processed, unless forceOverwrite is set
|
|
76
|
-
*
|
|
77
|
-
* @param itemEntryChangesTuple The changes tuple
|
|
78
|
-
* @param forceOverwrite Instead of calling {@link ApiFormatter.mergeCopyFields mergeCopyFields}, {@link ApiFormatter.copyFields copyFields} will be used (because API values are always right)
|
|
79
|
-
* @param updateInitial Should be `true` if called by applyChangesFromParent
|
|
80
|
-
* @param isCalledAfterSocketUpdate Indicates that the change is done by a different user
|
|
81
|
-
*
|
|
82
|
-
* @returns
|
|
83
|
-
* The previous changes {@link FieldMap FieldMap}
|
|
84
|
-
*/
|
|
85
|
-
processItemEntryChanges<ItemTypeType extends ItemType = any>(itemEntryChangesTuple: ChangesDeltaItemUpdateDelta<ItemTypeType>, forceOverwrite?: boolean, updateInitial?: boolean, isCalledAfterSocketUpdate?: boolean): FieldMap<ItemTypeType> | null;
|
|
86
|
-
cloneItemEntries<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): PromiseInterface<ChangesDeltaResult>;
|
|
87
|
-
cloneItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, sourceEntry: ItemEntry<ItemTypeType>, newFields?: FieldMap<ItemTypeType>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): ItemId;
|
|
88
|
-
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, entryOptions: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
89
|
-
fetchItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
90
|
-
/**
|
|
91
|
-
* @description
|
|
92
|
-
* Fetches a template and creates a new {@link ItemEntry ItemEntry}, will error if the ItemEntry with the given ItemId already exists
|
|
93
|
-
*/
|
|
94
|
-
fetchNewItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ChangesDeltaResult>;
|
|
95
|
-
fetchItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
96
|
-
fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
|
|
97
|
-
resolveLocalItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemEntry: ItemEntry<ItemTypeType>, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
98
|
-
createLocalEntries(changesDelta: ChangesDelta, parentType: ItemType, localParentId: ItemId, template: Template<ItemType>, itemIdConversion: ItemIdConversionMap, filterItemEntryCallback?: FilterItemEntryCallback, modifyFieldsCallback?: ModifyFieldsCallback): void;
|
|
99
|
-
expandLocalItemEntries<ItemTypeType extends ItemType>(changesDelta: ChangesDeltaBase, itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
100
|
-
updateItemValues<ItemTypeType extends ItemType>(changes: FieldMap<ItemTypeType>, parent: EntryParentNull, itemColumns: Array<ColumnInfo<ItemTypeType>>, conversionMap: ItemIdConversionMap): FieldMap<ItemTypeType>;
|
|
101
|
-
/**
|
|
102
|
-
* @description
|
|
103
|
-
* Fetches the data for the passed ItemType/ItemId/columns, is able to fetchCollectionEntry non-local derived values.
|
|
104
|
-
*
|
|
105
|
-
* @remark
|
|
106
|
-
* Assumes the the ItemEntry with the given ItemType-ItemId is already cached
|
|
107
|
-
*/
|
|
108
|
-
fetchLocalItemEntryData<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemType: ItemTypeType, itemId: ItemId, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<any>;
|
|
109
|
-
fetchLocalItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
110
|
-
private getColumnDifference;
|
|
111
|
-
private resolveLocal;
|
|
112
|
-
private expandLocalItemEntry;
|
|
113
|
-
private getLocalValues;
|
|
114
|
-
}
|
|
1
|
+
import { ChangesDeltaFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, RequestColumnExpansionFactory } from '../../../factories';
|
|
2
|
+
import { ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../../../interfaces';
|
|
3
|
+
import { ItemEntry, ItemEntryOptions, ItemResource, Template } from '../../../models';
|
|
4
|
+
import { ApiQuery, ApiRequestColumns, EntryParentNull, FieldMap, FilterItemEntryCallback, ItemId, ItemIdConversionMap, ItemType, ItemTypeMap, ModifyFieldsCallback, PromiseInterface, ResponseColumnItemTypeMap } from '../../../types';
|
|
5
|
+
import { ChangesDelta, ChangesDeltaItemCreateDelta } from '../../ChangesDelta';
|
|
6
|
+
import { ChangesDeltaBase, ChangesDeltaItemUpdateDelta, ChangesDeltaResult } from '../../ChangesDeltaBase';
|
|
7
|
+
import { ApiFormatter, ColumnHandler, ColumnInfo, ColumnSubsetCache, ColumnUtil, ItemEntryService, KeyService } from '../../index';
|
|
8
|
+
import { TemplateCache } from '../../TemplateCache';
|
|
9
|
+
import { ItemHandlerBase } from '../ItemHandlerBase';
|
|
10
|
+
import { TransactionCache } from './TransactionCache';
|
|
11
|
+
export declare type TransactionItemEntryChanges<ItemTypeType extends ItemType = any> = {
|
|
12
|
+
initial: FieldMap<ItemTypeType>;
|
|
13
|
+
changes: FieldMap<ItemTypeType>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @description
|
|
17
|
+
* In a {@link TransactionCache Transaction} only local items can be stored, so all entries in {@link TransactionItemHandler.entries this.entries} are local
|
|
18
|
+
* If a non-local entry is requested it should be passed on to the {@link ServerItemHandler ServerItemHandler} which will fetchCollectionEntry the entry from the server
|
|
19
|
+
*/
|
|
20
|
+
export declare class TransactionItemHandler extends ItemHandlerBase {
|
|
21
|
+
private changesDeltaFactory;
|
|
22
|
+
private exceptionHandler;
|
|
23
|
+
private templateCache;
|
|
24
|
+
private columnExpansionFactory;
|
|
25
|
+
private columnHandler;
|
|
26
|
+
private columnSetFactory;
|
|
27
|
+
private columnSubsetCacheFactory;
|
|
28
|
+
private itemEntryService;
|
|
29
|
+
private keyService;
|
|
30
|
+
protected transaction: TransactionCache;
|
|
31
|
+
deletedItems: ItemTypeMap<ItemEntry[]>;
|
|
32
|
+
itemChanges: {
|
|
33
|
+
[itemEntryId: number]: TransactionItemEntryChanges;
|
|
34
|
+
};
|
|
35
|
+
itemResources: {
|
|
36
|
+
[itemEntryId: number]: ItemResource[];
|
|
37
|
+
};
|
|
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);
|
|
39
|
+
copyTransactionItemEntryChanges(itemEntryChanges: TransactionItemEntryChanges, entry: ItemEntry): TransactionItemEntryChanges;
|
|
40
|
+
createItemEntry(createTuple: ChangesDeltaItemCreateDelta): ItemEntry;
|
|
41
|
+
/**
|
|
42
|
+
* @description
|
|
43
|
+
* Gets the local {@link FieldMap changes} of the {@link ItemEntry entry} on the {@link TransactionCache transaction} in a formatted way the API accepts
|
|
44
|
+
*/
|
|
45
|
+
formatRequest<ItemEntryType extends ItemEntry>(entry: ItemEntryType): FieldMap<ItemEntryType['itemType']>;
|
|
46
|
+
/**
|
|
47
|
+
* @description
|
|
48
|
+
* Fetches a new {@link Template template} and creates new {@link ItemEntry itemEntries} with the passed values
|
|
49
|
+
*/
|
|
50
|
+
createItems<ItemTypeType extends ItemType>(itemType: ItemTypeType, valuesArray: Array<FieldMap<ItemTypeType>>, parent: EntryParentNull): PromiseInterface<ChangesDeltaResult>;
|
|
51
|
+
clearItemEntry(entry: ItemEntry): void;
|
|
52
|
+
/**
|
|
53
|
+
* @description
|
|
54
|
+
* Stores am {@link ItemResource ItemResource} on the transaction, used to call {@link ItemResource.options.onChange the onChange callback}
|
|
55
|
+
*/
|
|
56
|
+
addResource(resource: ItemResource): void;
|
|
57
|
+
/**
|
|
58
|
+
* @description
|
|
59
|
+
* Removes a resource from the transaction, preventing the {@link ItemResource.options.onChange the onChange callback} from being called.
|
|
60
|
+
* You should call this function when the resource is no longer needed
|
|
61
|
+
*/
|
|
62
|
+
clearResource(resource: ItemResource): void;
|
|
63
|
+
detectChanges(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* @description
|
|
66
|
+
* Checks if the transaction has changes for the passed {@link ItemEntry.id ItemEntryId}
|
|
67
|
+
*
|
|
68
|
+
* -----
|
|
69
|
+
* @remarks
|
|
70
|
+
* Compares every field (of the entry) in {@link TransactionItemHandler.itemChanges itemChanges} with the initial fields, because fields are copied over when creating a resource having something in itemChanges doesn't actually mean that there are changes (just that a resource has been made)
|
|
71
|
+
*/
|
|
72
|
+
detectEntryChanges(itemEntryId: ItemEntry['id']): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* @description
|
|
75
|
+
* Processes on a cached entry, if there are no {@link TransactionItemHandler.itemChanges itemChanges} the new values will not be processed, unless forceOverwrite is set
|
|
76
|
+
*
|
|
77
|
+
* @param itemEntryChangesTuple The changes tuple
|
|
78
|
+
* @param forceOverwrite Instead of calling {@link ApiFormatter.mergeCopyFields mergeCopyFields}, {@link ApiFormatter.copyFields copyFields} will be used (because API values are always right)
|
|
79
|
+
* @param updateInitial Should be `true` if called by applyChangesFromParent
|
|
80
|
+
* @param isCalledAfterSocketUpdate Indicates that the change is done by a different user
|
|
81
|
+
*
|
|
82
|
+
* @returns
|
|
83
|
+
* The previous changes {@link FieldMap FieldMap}
|
|
84
|
+
*/
|
|
85
|
+
processItemEntryChanges<ItemTypeType extends ItemType = any>(itemEntryChangesTuple: ChangesDeltaItemUpdateDelta<ItemTypeType>, forceOverwrite?: boolean, updateInitial?: boolean, isCalledAfterSocketUpdate?: boolean): FieldMap<ItemTypeType> | null;
|
|
86
|
+
cloneItemEntries<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): PromiseInterface<ChangesDeltaResult>;
|
|
87
|
+
cloneItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, sourceEntry: ItemEntry<ItemTypeType>, newFields?: FieldMap<ItemTypeType>, conversionMap?: ItemIdConversionMap, modifyFieldsCallback?: ModifyFieldsCallback): ItemId;
|
|
88
|
+
fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, entryOptions: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
89
|
+
fetchItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
90
|
+
/**
|
|
91
|
+
* @description
|
|
92
|
+
* Fetches a template and creates a new {@link ItemEntry ItemEntry}, will error if the ItemEntry with the given ItemId already exists
|
|
93
|
+
*/
|
|
94
|
+
fetchNewItemEntry<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: ItemEntryOptions): PromiseInterface<ChangesDeltaResult>;
|
|
95
|
+
fetchItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
96
|
+
fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
|
|
97
|
+
resolveLocalItemEntry<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemEntry: ItemEntry<ItemTypeType>, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<ItemEntry<ItemTypeType>>;
|
|
98
|
+
createLocalEntries(changesDelta: ChangesDelta, parentType: ItemType, localParentId: ItemId, template: Template<ItemType>, itemIdConversion: ItemIdConversionMap, filterItemEntryCallback?: FilterItemEntryCallback, modifyFieldsCallback?: ModifyFieldsCallback): void;
|
|
99
|
+
expandLocalItemEntries<ItemTypeType extends ItemType>(changesDelta: ChangesDeltaBase, itemType: ItemTypeType, itemEntries: Array<ItemEntry<ItemTypeType>>, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
100
|
+
updateItemValues<ItemTypeType extends ItemType>(changes: FieldMap<ItemTypeType>, parent: EntryParentNull, itemColumns: Array<ColumnInfo<ItemTypeType>>, conversionMap: ItemIdConversionMap): FieldMap<ItemTypeType>;
|
|
101
|
+
/**
|
|
102
|
+
* @description
|
|
103
|
+
* Fetches the data for the passed ItemType/ItemId/columns, is able to fetchCollectionEntry non-local derived values.
|
|
104
|
+
*
|
|
105
|
+
* @remark
|
|
106
|
+
* Assumes the the ItemEntry with the given ItemType-ItemId is already cached
|
|
107
|
+
*/
|
|
108
|
+
fetchLocalItemEntryData<ItemTypeType extends ItemType>(changesDelta: ChangesDelta, itemType: ItemTypeType, itemId: ItemId, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, options: ItemEntryOptions): PromiseInterface<any>;
|
|
109
|
+
fetchLocalItemEntries<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
110
|
+
private getColumnDifference;
|
|
111
|
+
private resolveLocal;
|
|
112
|
+
private expandLocalItemEntry;
|
|
113
|
+
private getLocalValues;
|
|
114
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
export * from './ApiFormatter';
|
|
2
|
-
export * from './ApiRequestService';
|
|
3
|
-
export * from './ApiResponseProcessor';
|
|
4
|
-
export * from './ChangesCompilation';
|
|
5
|
-
export * from './ChangesProcessor';
|
|
6
|
-
export * from './CollectionCache';
|
|
7
|
-
export * from './CollectionEntryService';
|
|
8
|
-
export * from './CollectionMatcher';
|
|
9
|
-
export * from './CollectionResourceService';
|
|
10
|
-
export * from './ColumnCache';
|
|
11
|
-
export * from './ColumnExpansion';
|
|
12
|
-
export * from './ColumnHandler';
|
|
13
|
-
export * from './ColumnInfo';
|
|
14
|
-
export * from './ColumnSet';
|
|
15
|
-
export * from './ColumnSubsetCache';
|
|
16
|
-
export * from './ColumnUtil';
|
|
17
|
-
export * from './CreateRequest';
|
|
18
|
-
export * from './ItemCache';
|
|
19
|
-
export * from './ItemEntryService';
|
|
20
|
-
export * from './KeyService';
|
|
21
|
-
export * from './cache/transaction/TransactionEventHandler';
|
|
22
|
-
export * from './LockService';
|
|
23
|
-
export * from './ModuleChangesCompilation';
|
|
24
|
-
export * from './QueryMatcher';
|
|
25
|
-
export * from './QueryParser';
|
|
26
|
-
export * from './QueryService';
|
|
27
|
-
export * from './RequestColumnExpansion';
|
|
28
|
-
export * from './SocketMessageHandler';
|
|
29
|
-
export * from './Util';
|
|
30
|
-
export * from './cache/AbstractCache';
|
|
31
|
-
export * from './cache/server/ServerCache';
|
|
32
|
-
export * from './cache/server/ServerItemHandler';
|
|
33
|
-
export * from './cache/server/ServerCollectionHandler';
|
|
34
|
-
export * from './cache/transaction/TransactionCache';
|
|
35
|
-
export * from './cache/transaction/TransactionItemHandler';
|
|
36
|
-
export * from './cache/transaction/TransactionCollectionHandler';
|
|
37
|
-
export * from './cache/transaction/TransactionEventHandler';
|
|
38
|
-
export * from './ChangesDelta';
|
|
39
|
-
export * from './InternalChangesDelta';
|
|
40
|
-
export * from './RequestBufferManager';
|
|
41
|
-
export * from './RequestBuffer';
|
|
1
|
+
export * from './ApiFormatter';
|
|
2
|
+
export * from './ApiRequestService';
|
|
3
|
+
export * from './ApiResponseProcessor';
|
|
4
|
+
export * from './ChangesCompilation';
|
|
5
|
+
export * from './ChangesProcessor';
|
|
6
|
+
export * from './CollectionCache';
|
|
7
|
+
export * from './CollectionEntryService';
|
|
8
|
+
export * from './CollectionMatcher';
|
|
9
|
+
export * from './CollectionResourceService';
|
|
10
|
+
export * from './ColumnCache';
|
|
11
|
+
export * from './ColumnExpansion';
|
|
12
|
+
export * from './ColumnHandler';
|
|
13
|
+
export * from './ColumnInfo';
|
|
14
|
+
export * from './ColumnSet';
|
|
15
|
+
export * from './ColumnSubsetCache';
|
|
16
|
+
export * from './ColumnUtil';
|
|
17
|
+
export * from './CreateRequest';
|
|
18
|
+
export * from './ItemCache';
|
|
19
|
+
export * from './ItemEntryService';
|
|
20
|
+
export * from './KeyService';
|
|
21
|
+
export * from './cache/transaction/TransactionEventHandler';
|
|
22
|
+
export * from './LockService';
|
|
23
|
+
export * from './ModuleChangesCompilation';
|
|
24
|
+
export * from './QueryMatcher';
|
|
25
|
+
export * from './QueryParser';
|
|
26
|
+
export * from './QueryService';
|
|
27
|
+
export * from './RequestColumnExpansion';
|
|
28
|
+
export * from './SocketMessageHandler';
|
|
29
|
+
export * from './Util';
|
|
30
|
+
export * from './cache/AbstractCache';
|
|
31
|
+
export * from './cache/server/ServerCache';
|
|
32
|
+
export * from './cache/server/ServerItemHandler';
|
|
33
|
+
export * from './cache/server/ServerCollectionHandler';
|
|
34
|
+
export * from './cache/transaction/TransactionCache';
|
|
35
|
+
export * from './cache/transaction/TransactionItemHandler';
|
|
36
|
+
export * from './cache/transaction/TransactionCollectionHandler';
|
|
37
|
+
export * from './cache/transaction/TransactionEventHandler';
|
|
38
|
+
export * from './ChangesDelta';
|
|
39
|
+
export * from './InternalChangesDelta';
|
|
40
|
+
export * from './RequestBufferManager';
|
|
41
|
+
export * from './RequestBuffer';
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const ALL_PERMISSIONS = "7";
|
|
2
|
-
export declare const COLUMN_SEPERATOR = ">";
|
|
3
|
-
export declare const RENDER_AS_SEPERATOR = ":";
|
|
4
|
-
export declare const NEW_PREFIX: string;
|
|
5
|
-
export declare const DUPLICATE_PREFIX: string;
|
|
6
|
-
export declare const NEW_KEYWORD: string;
|
|
7
|
-
export declare const DUPLICATE_KEYWORD: string;
|
|
1
|
+
export declare const ALL_PERMISSIONS = "7";
|
|
2
|
+
export declare const COLUMN_SEPERATOR = ">";
|
|
3
|
+
export declare const RENDER_AS_SEPERATOR = ":";
|
|
4
|
+
export declare const NEW_PREFIX: string;
|
|
5
|
+
export declare const DUPLICATE_PREFIX: string;
|
|
6
|
+
export declare const NEW_KEYWORD: string;
|
|
7
|
+
export declare const DUPLICATE_KEYWORD: string;
|