@rentman/rm-core 12.1.1 → 12.1.2
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 +1495 -1492
- package/dist/rm-core.js +815 -815
- package/dist/rm-core.min.js +1 -1
- package/dist/types/src/FieldLookupProxy.d.ts +4 -4
- package/dist/types/src/classes/ApiFormatter.d.ts +76 -76
- package/dist/types/src/classes/ApiRequestService.d.ts +18 -18
- package/dist/types/src/classes/ApiResponseProcessor.d.ts +29 -29
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicManager.d.ts +100 -100
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRule.d.ts +93 -93
- package/dist/types/src/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +24 -24
- package/dist/types/src/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +13 -13
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +19 -19
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +13 -13
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +13 -13
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalTelexemplarenBusinessLogicRule.d.ts +15 -15
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalTypeBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +25 -25
- package/dist/types/src/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +28 -28
- package/dist/types/src/classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule.d.ts +22 -22
- package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarAantalBusinessLogicRule.d.ts +13 -13
- package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarLocationBusinessLogicRule.d.ts +23 -23
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +17 -17
- package/dist/types/src/classes/CacheSyncer.d.ts +71 -71
- package/dist/types/src/classes/ChangesCompilation.d.ts +33 -33
- package/dist/types/src/classes/ChangesDelta.d.ts +65 -65
- package/dist/types/src/classes/ChangesDeltaBase.d.ts +88 -88
- package/dist/types/src/classes/ChangesProcessor.d.ts +40 -40
- package/dist/types/src/classes/CollectionEntryService.d.ts +24 -24
- package/dist/types/src/classes/CollectionResourceService.d.ts +6 -6
- package/dist/types/src/classes/ColumnCache.d.ts +19 -19
- package/dist/types/src/classes/ColumnExpansion.d.ts +19 -19
- package/dist/types/src/classes/ColumnHandler.d.ts +20 -20
- package/dist/types/src/classes/ColumnInfo.d.ts +15 -15
- package/dist/types/src/classes/ColumnSet.d.ts +37 -37
- package/dist/types/src/classes/ColumnUtil.d.ts +108 -108
- package/dist/types/src/classes/ConversionMapService.d.ts +25 -25
- package/dist/types/src/classes/CreateRequest.d.ts +17 -17
- package/dist/types/src/classes/CreatedChangesDelta.d.ts +17 -17
- package/dist/types/src/classes/InternalChangesDelta.d.ts +44 -44
- package/dist/types/src/classes/ItemCache.d.ts +27 -27
- package/dist/types/src/classes/ItemCreateService.d.ts +18 -18
- package/dist/types/src/classes/ItemEntryService.d.ts +32 -32
- package/dist/types/src/classes/KeyService.d.ts +18 -18
- package/dist/types/src/classes/LockService.d.ts +28 -28
- package/dist/types/src/classes/ModuleChangesCompilation.d.ts +17 -17
- package/dist/types/src/classes/ParentChangesDelta.d.ts +41 -41
- package/dist/types/src/classes/QueryColumnExtractor.d.ts +18 -18
- package/dist/types/src/classes/QueryContainsLocalIdParser.d.ts +17 -17
- package/dist/types/src/classes/QueryLinkedToParser.d.ts +17 -17
- package/dist/types/src/classes/QueryLocallyMatchableParser.d.ts +20 -20
- package/dist/types/src/classes/QueryMatcher.d.ts +25 -25
- package/dist/types/src/classes/QueryParser.d.ts +25 -25
- package/dist/types/src/classes/QueryParserBase.d.ts +20 -20
- package/dist/types/src/classes/QueryParserIdUpdater.d.ts +17 -17
- package/dist/types/src/classes/QueryService.d.ts +12 -12
- package/dist/types/src/classes/RequestBuffer.d.ts +26 -26
- package/dist/types/src/classes/RequestBufferManager.d.ts +21 -21
- package/dist/types/src/classes/RequestColumnExpansion.d.ts +13 -13
- package/dist/types/src/classes/RequestColumnsOperationsCache.d.ts +46 -46
- package/dist/types/src/classes/SocketMessageHandler.d.ts +34 -34
- package/dist/types/src/classes/TemplateCache.d.ts +64 -64
- package/dist/types/src/classes/Util.d.ts +28 -28
- package/dist/types/src/classes/cache/AbstractCache.d.ts +85 -85
- package/dist/types/src/classes/cache/CachedQueryHandlerBase.d.ts +70 -70
- package/dist/types/src/classes/cache/ItemHandlerBase.d.ts +107 -107
- package/dist/types/src/classes/cache/server/ServerCache.d.ts +65 -65
- package/dist/types/src/classes/cache/server/ServerCachedQueryHandler.d.ts +27 -27
- package/dist/types/src/classes/cache/server/ServerItemHandler.d.ts +39 -39
- package/dist/types/src/classes/cache/transaction/TransactionCache.d.ts +298 -298
- package/dist/types/src/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +50 -50
- package/dist/types/src/classes/cache/transaction/TransactionCollectionHandler.d.ts +24 -24
- package/dist/types/src/classes/cache/transaction/TransactionEventHandler.d.ts +21 -21
- package/dist/types/src/classes/cache/transaction/TransactionItemHandler.d.ts +80 -80
- package/dist/types/src/classes/cache/transaction/TransactionValidator.d.ts +33 -33
- package/dist/types/src/constants.d.ts +7 -7
- package/dist/types/src/core.d.ts +48 -48
- package/dist/types/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/types/src/factories/CacheSyncerFactory.d.ts +14 -14
- package/dist/types/src/factories/ChangesCompilationFactory.d.ts +5 -5
- package/dist/types/src/factories/ChangesDeltaFactory.d.ts +13 -13
- package/dist/types/src/factories/ChangesProcessorFactory.d.ts +13 -13
- package/dist/types/src/factories/CollectionEntryFactory.d.ts +11 -11
- package/dist/types/src/factories/CollectionResourceFactory.d.ts +18 -18
- package/dist/types/src/factories/ColumnExpansionFactory.d.ts +7 -7
- package/dist/types/src/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/types/src/factories/ColumnSetFactory.d.ts +18 -18
- package/dist/types/src/factories/CreateRequestFactory.d.ts +9 -9
- package/dist/types/src/factories/ItemCacheFactory.d.ts +6 -6
- package/dist/types/src/factories/ItemEntryFactory.d.ts +12 -12
- package/dist/types/src/factories/ItemResourceFactory.d.ts +11 -11
- package/dist/types/src/factories/ModuleChangesCompilationFactory.d.ts +6 -6
- package/dist/types/src/factories/QueryMatcherFactory.d.ts +8 -8
- package/dist/types/src/factories/QueryParserFactory.d.ts +5 -5
- package/dist/types/src/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/types/src/factories/RequestColumnsOperationsCacheFactory.d.ts +8 -8
- package/dist/types/src/factories/TemplateFactory.d.ts +8 -8
- package/dist/types/src/factories/TransactionCacheFactory.d.ts +13 -13
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/interfaces/AbstractCacheDependencyInterface.d.ts +38 -38
- package/dist/types/src/interfaces/ApiRequestServiceInterface.d.ts +12 -12
- package/dist/types/src/interfaces/AuthInterface.d.ts +10 -10
- package/dist/types/src/interfaces/ErrorHandlerInterface.d.ts +6 -6
- package/dist/types/src/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/types/src/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/types/src/interfaces/PromiseLibraryInterface.d.ts +33 -33
- package/dist/types/src/interfaces/ServerCacheDependencyInterface.d.ts +5 -5
- package/dist/types/src/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/types/src/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +17 -17
- package/dist/types/src/interfaces/TransactionItemHandlerDependencyInterface.d.ts +22 -22
- package/dist/types/src/internal.d.ts +128 -128
- package/dist/types/src/models/CachedQueryItem.d.ts +40 -40
- package/dist/types/src/models/CollectionEntry.d.ts +22 -22
- package/dist/types/src/models/CollectionOptions.d.ts +44 -44
- package/dist/types/src/models/CollectionResource.d.ts +87 -87
- package/dist/types/src/models/ItemEntry.d.ts +19 -19
- package/dist/types/src/models/ItemEntryOptions.d.ts +8 -8
- package/dist/types/src/models/ItemResource.d.ts +95 -95
- package/dist/types/src/models/Template.d.ts +11 -11
- package/dist/types/src/types/ItemTypesCollection.d.ts +361 -361
- package/dist/types/src/types/PromiseInterface.d.ts +2 -2
- package/dist/types/tests/integration/core.test.d.ts +1 -1
- package/dist/types/tests/integration/helpers/helpers.d.ts +32 -32
- package/dist/types/tests/integration/transactions/field_lookup.test.d.ts +1 -1
- package/dist/types/tests/integration/transactions/get_by.test.d.ts +1 -1
- package/dist/types/tests/integration/transactions/updates.test.d.ts +1 -1
- package/dist/types/tests/mocks/ApiMocked.d.ts +19 -19
- package/dist/types/tests/mocks/PromiseLibrary.mocked.d.ts +2 -2
- package/dist/types/tests/regression/RM4_17754.test.d.ts +1 -1
- package/dist/types/tests/regression/RM4_18216.test.d.ts +1 -1
- package/dist/types/tests/unit/query_contains_local_id_parser.test.d.ts +1 -1
- package/dist/types/tests/unit/query_linked_to_parser.test.d.ts +1 -1
- package/dist/types/tests/unit/query_matcher.test.d.ts +1 -1
- package/dist/types/tests/unit/query_parser_id_updater.test.d.ts +1 -1
- package/dist/types/tests/unit/query_service.test.d.ts +1 -1
- package/package.json +57 -57
- package/readme.md +16 -16
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
-
import { AbstractCache, ApiRequestService, CachedQueryItem, ChangesDeltaBase, CollectionQuery, CollectionResource, FieldMap, ItemEntry, ItemTypeMap, ParentChangesDelta, PromiseInterface, PromiseLibraryInterface, QueryMatcherFactory, QueryService } from '../internal';
|
|
3
|
-
export declare type CacheSyncerQueryMap = ItemTypeMap<CacheSyncerQueryMapEntry>;
|
|
4
|
-
export declare type CacheSyncerQueryMapEntry = {
|
|
5
|
-
[cachedQueryString: string]: {
|
|
6
|
-
cachedQueryItems: CachedQueryItem[];
|
|
7
|
-
collectionResources: CollectionResource[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
declare type CacheSyncerMatchesMapEntry = {
|
|
11
|
-
query: CollectionQuery;
|
|
12
|
-
items: ItemEntry[];
|
|
13
|
-
};
|
|
14
|
-
declare type CacheSyncerMatchesMap = ItemTypeMap<{
|
|
15
|
-
[cachedQueryString: string]: CacheSyncerMatchesMapEntry;
|
|
16
|
-
}>;
|
|
17
|
-
export declare class CacheSyncer {
|
|
18
|
-
private queryService;
|
|
19
|
-
private queryMatcherFactory;
|
|
20
|
-
private apiRequestService;
|
|
21
|
-
private promiseService;
|
|
22
|
-
private transaction;
|
|
23
|
-
private cachedQueryMap;
|
|
24
|
-
matches: {
|
|
25
|
-
true: CacheSyncerMatchesMap;
|
|
26
|
-
false: CacheSyncerMatchesMap;
|
|
27
|
-
maybe: CacheSyncerMatchesMap;
|
|
28
|
-
};
|
|
29
|
-
constructor(queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, apiRequestService: ApiRequestService, promiseService: PromiseLibraryInterface, transaction: AbstractCache, cachedQueryMap: CacheSyncerQueryMap);
|
|
30
|
-
getMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, queryString: string, type: 'true' | 'false' | 'maybe'): ItemEntry<ItemTypeType>[];
|
|
31
|
-
/**
|
|
32
|
-
* Syncing of collections always runs in 3 phases:
|
|
33
|
-
* - Remove items from collections
|
|
34
|
-
* - Add items to collections
|
|
35
|
-
* - Process MAYBE matches
|
|
36
|
-
* -- Remove MAYBE items from collections
|
|
37
|
-
* -- Add MAYBE items to collections
|
|
38
|
-
*
|
|
39
|
-
* @param isCalledAfterSocketUpdate
|
|
40
|
-
* @param changesDelta
|
|
41
|
-
*/
|
|
42
|
-
syncCollections(isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Syncing of cached queries runs in 3 phases:
|
|
45
|
-
* - Remove items from collections
|
|
46
|
-
* - Add items to collections
|
|
47
|
-
* - Process MAYBE matches
|
|
48
|
-
* -- Remove MAYBE items from collections
|
|
49
|
-
* -- Add MAYBE items to collections
|
|
50
|
-
*
|
|
51
|
-
* @param _isCalledAfterSocketUpdate
|
|
52
|
-
* @param changesDelta
|
|
53
|
-
*/
|
|
54
|
-
syncCachedQueries(_isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void[]>;
|
|
55
|
-
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
56
|
-
processDelta(parentChangesDelta: ParentChangesDelta): this;
|
|
57
|
-
_expand<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
58
|
-
/**
|
|
59
|
-
* Unlike the functions that use a promise accumulator, this function *can* result in a rejection. It should be handled
|
|
60
|
-
* by the caller.
|
|
61
|
-
*/
|
|
62
|
-
protected processMaybeMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, query: CollectionQuery, maybeItemEntries: ItemEntry<ItemTypeType>[], changesDelta: ChangesDeltaBase | undefined): PromiseInterface<ItemEntry<ItemTypeType>[]>;
|
|
63
|
-
/**
|
|
64
|
-
* Returns null if none of the promises resulted in an exception, or the exception otherwise.
|
|
65
|
-
*/
|
|
66
|
-
private resolveAll;
|
|
67
|
-
private addMatchedEntriesToCollections;
|
|
68
|
-
private processCollectionMaybe;
|
|
69
|
-
private processCachedQueryMaybe;
|
|
70
|
-
}
|
|
71
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
+
import { AbstractCache, ApiRequestService, CachedQueryItem, ChangesDeltaBase, CollectionQuery, CollectionResource, FieldMap, ItemEntry, ItemTypeMap, ParentChangesDelta, PromiseInterface, PromiseLibraryInterface, QueryMatcherFactory, QueryService } from '../internal';
|
|
3
|
+
export declare type CacheSyncerQueryMap = ItemTypeMap<CacheSyncerQueryMapEntry>;
|
|
4
|
+
export declare type CacheSyncerQueryMapEntry = {
|
|
5
|
+
[cachedQueryString: string]: {
|
|
6
|
+
cachedQueryItems: CachedQueryItem[];
|
|
7
|
+
collectionResources: CollectionResource[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare type CacheSyncerMatchesMapEntry = {
|
|
11
|
+
query: CollectionQuery;
|
|
12
|
+
items: ItemEntry[];
|
|
13
|
+
};
|
|
14
|
+
declare type CacheSyncerMatchesMap = ItemTypeMap<{
|
|
15
|
+
[cachedQueryString: string]: CacheSyncerMatchesMapEntry;
|
|
16
|
+
}>;
|
|
17
|
+
export declare class CacheSyncer {
|
|
18
|
+
private queryService;
|
|
19
|
+
private queryMatcherFactory;
|
|
20
|
+
private apiRequestService;
|
|
21
|
+
private promiseService;
|
|
22
|
+
private transaction;
|
|
23
|
+
private cachedQueryMap;
|
|
24
|
+
matches: {
|
|
25
|
+
true: CacheSyncerMatchesMap;
|
|
26
|
+
false: CacheSyncerMatchesMap;
|
|
27
|
+
maybe: CacheSyncerMatchesMap;
|
|
28
|
+
};
|
|
29
|
+
constructor(queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, apiRequestService: ApiRequestService, promiseService: PromiseLibraryInterface, transaction: AbstractCache, cachedQueryMap: CacheSyncerQueryMap);
|
|
30
|
+
getMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, queryString: string, type: 'true' | 'false' | 'maybe'): ItemEntry<ItemTypeType>[];
|
|
31
|
+
/**
|
|
32
|
+
* Syncing of collections always runs in 3 phases:
|
|
33
|
+
* - Remove items from collections
|
|
34
|
+
* - Add items to collections
|
|
35
|
+
* - Process MAYBE matches
|
|
36
|
+
* -- Remove MAYBE items from collections
|
|
37
|
+
* -- Add MAYBE items to collections
|
|
38
|
+
*
|
|
39
|
+
* @param isCalledAfterSocketUpdate
|
|
40
|
+
* @param changesDelta
|
|
41
|
+
*/
|
|
42
|
+
syncCollections(isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Syncing of cached queries runs in 3 phases:
|
|
45
|
+
* - Remove items from collections
|
|
46
|
+
* - Add items to collections
|
|
47
|
+
* - Process MAYBE matches
|
|
48
|
+
* -- Remove MAYBE items from collections
|
|
49
|
+
* -- Add MAYBE items to collections
|
|
50
|
+
*
|
|
51
|
+
* @param _isCalledAfterSocketUpdate
|
|
52
|
+
* @param changesDelta
|
|
53
|
+
*/
|
|
54
|
+
syncCachedQueries(_isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void[]>;
|
|
55
|
+
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
56
|
+
processDelta(parentChangesDelta: ParentChangesDelta): this;
|
|
57
|
+
_expand<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
58
|
+
/**
|
|
59
|
+
* Unlike the functions that use a promise accumulator, this function *can* result in a rejection. It should be handled
|
|
60
|
+
* by the caller.
|
|
61
|
+
*/
|
|
62
|
+
protected processMaybeMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, query: CollectionQuery, maybeItemEntries: ItemEntry<ItemTypeType>[], changesDelta: ChangesDeltaBase | undefined): PromiseInterface<ItemEntry<ItemTypeType>[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Returns null if none of the promises resulted in an exception, or the exception otherwise.
|
|
65
|
+
*/
|
|
66
|
+
private resolveAll;
|
|
67
|
+
private addMatchedEntriesToCollections;
|
|
68
|
+
private processCollectionMaybe;
|
|
69
|
+
private processCachedQueryMaybe;
|
|
70
|
+
}
|
|
71
|
+
export {};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
-
import { InternalCreateDelta, ItemEntry, ItemEntryMap, ItemMap, TransactionCache } from '../internal';
|
|
3
|
-
export declare type CreateRequestCompilationParent = ApiEnumItemType | 'Void';
|
|
4
|
-
export declare type CreateCompilation = {
|
|
5
|
-
[parentType: string]: {
|
|
6
|
-
[parentId: number]: ItemMap<InternalCreateDelta>;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export declare type DeleteCompilation = {
|
|
10
|
-
[itemType: string]: ItemEntry[];
|
|
11
|
-
};
|
|
12
|
-
export declare type UpdateCompilation = ItemEntryMap;
|
|
13
|
-
export declare type MoveCompilation = {
|
|
14
|
-
[parentType: string]: {
|
|
15
|
-
[parentId: number]: ItemEntry[];
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare class ChangesCompilation {
|
|
19
|
-
private transaction;
|
|
20
|
-
compilation: {
|
|
21
|
-
create: CreateCompilation;
|
|
22
|
-
delete: DeleteCompilation;
|
|
23
|
-
update: UpdateCompilation;
|
|
24
|
-
move: MoveCompilation;
|
|
25
|
-
};
|
|
26
|
-
constructor(transaction: TransactionCache);
|
|
27
|
-
private processDelta;
|
|
28
|
-
private getDefaultParent;
|
|
29
|
-
private addMoveEntry;
|
|
30
|
-
private addDeleteEntry;
|
|
31
|
-
private addUpdateEntry;
|
|
32
|
-
private addCreateEntry;
|
|
33
|
-
}
|
|
1
|
+
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
+
import { InternalCreateDelta, ItemEntry, ItemEntryMap, ItemMap, TransactionCache } from '../internal';
|
|
3
|
+
export declare type CreateRequestCompilationParent = ApiEnumItemType | 'Void';
|
|
4
|
+
export declare type CreateCompilation = {
|
|
5
|
+
[parentType: string]: {
|
|
6
|
+
[parentId: number]: ItemMap<InternalCreateDelta>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare type DeleteCompilation = {
|
|
10
|
+
[itemType: string]: ItemEntry[];
|
|
11
|
+
};
|
|
12
|
+
export declare type UpdateCompilation = ItemEntryMap;
|
|
13
|
+
export declare type MoveCompilation = {
|
|
14
|
+
[parentType: string]: {
|
|
15
|
+
[parentId: number]: ItemEntry[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare class ChangesCompilation {
|
|
19
|
+
private transaction;
|
|
20
|
+
compilation: {
|
|
21
|
+
create: CreateCompilation;
|
|
22
|
+
delete: DeleteCompilation;
|
|
23
|
+
update: UpdateCompilation;
|
|
24
|
+
move: MoveCompilation;
|
|
25
|
+
};
|
|
26
|
+
constructor(transaction: TransactionCache);
|
|
27
|
+
private processDelta;
|
|
28
|
+
private getDefaultParent;
|
|
29
|
+
private addMoveEntry;
|
|
30
|
+
private addDeleteEntry;
|
|
31
|
+
private addUpdateEntry;
|
|
32
|
+
private addCreateEntry;
|
|
33
|
+
}
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { ApiEnumItemType, ApiFields, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ChangesDeltaBase, ChangesDeltaItemUpdateMode, ColumnExpansionResult, ColumnSet, CreatedChangesDelta, EntryParent, EntryParentNull, ErrorHandlerInterface, FieldMap, ItemCreateService, ItemEntry, ItemEntryService, PromiseInterface } from '../internal';
|
|
3
|
-
export declare type ChangesDeltaItemDeleteDelta = ItemEntry;
|
|
4
|
-
/**
|
|
5
|
-
* @description
|
|
6
|
-
* ChangesDelta used to apply changes from outside of the core to a transaction
|
|
7
|
-
*
|
|
8
|
-
* ----------
|
|
9
|
-
*
|
|
10
|
-
* The difference between {@link InternalChangesDelta InternalChangesDelta} and {@link ChangesDelta ChangesDelta} is that the ChangesDelta
|
|
11
|
-
* assumes 'created' values have no itemEntries yet.
|
|
12
|
-
*
|
|
13
|
-
* Use this when calling {@link TransactionCache.applyChangesDelta applyChangesDelta}
|
|
14
|
-
*/
|
|
15
|
-
export declare class ChangesDelta extends ChangesDeltaBase {
|
|
16
|
-
private errorHandler;
|
|
17
|
-
private itemCreateService;
|
|
18
|
-
created: CreatedChangesDelta;
|
|
19
|
-
deleted: {
|
|
20
|
-
[itemType: string]: {
|
|
21
|
-
[entryId: string]: ChangesDeltaItemDeleteDelta;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
constructor(errorHandler: ErrorHandlerInterface, itemCreateService: ItemCreateService, itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
25
|
-
merge(otherChangesDelta: ChangesDelta): ChangesDelta;
|
|
26
|
-
/**
|
|
27
|
-
* @description
|
|
28
|
-
* Fetches a template for the passed itemType and processes the passed values and sets the item to be created when the delta is applied
|
|
29
|
-
*
|
|
30
|
-
* @remark
|
|
31
|
-
* - If the values don't contain an `id` a new one will be generated
|
|
32
|
-
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
33
|
-
*/
|
|
34
|
-
setItemCreated<ItemTypeType extends ApiEnumItemType, Fields extends Partial<FieldMap<ItemTypeType>>>(itemType: ItemTypeType, values: Fields): PromiseInterface<this>;
|
|
35
|
-
setItemUpdated<ItemTypeType extends ApiEnumItemType>(entry: ItemEntry<ItemTypeType>, fields: Partial<FieldMap<ItemTypeType>>, columnExpansionResult?: ColumnExpansionResult<ItemTypeType> | null, parent?: EntryParentNull, mode?: ChangesDeltaItemUpdateMode, didChangeAnyFieldOnParentTransaction?: boolean, previous?: FieldMap<ItemTypeType> | null): this;
|
|
36
|
-
setItemDeleted(deleted: ChangesDeltaItemDeleteDelta): this;
|
|
37
|
-
setItemsDeleted(deleted: ChangesDeltaItemDeleteDelta[]): this;
|
|
38
|
-
/**
|
|
39
|
-
* @description
|
|
40
|
-
* Fetches a template for the passed itemType and processes the passed values and sets the items to be created when the delta is applied
|
|
41
|
-
*
|
|
42
|
-
* @remark
|
|
43
|
-
* - If the values don't contain an `id` a new one will be generated
|
|
44
|
-
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
45
|
-
*/
|
|
46
|
-
setItemsCreated<ItemTypeType extends ApiEnumItemType, ColumnIds extends (keyof ApiFields[ItemTypeType])[] = (keyof ApiFields[ItemTypeType])[]>(itemType: ItemTypeType, valuesArray: Partial<FieldMap<ItemTypeType, ColumnIds>>[]): PromiseInterface<this>;
|
|
47
|
-
/**
|
|
48
|
-
* @description
|
|
49
|
-
* Will create an {@link ItemEntry ItemEntry} when the delta is applied
|
|
50
|
-
* Does not always mean the item is local, just that it isn't cached yet
|
|
51
|
-
*
|
|
52
|
-
* @remark
|
|
53
|
-
* If you're calling this from the frontend you probably want to call `setItemCreated`, which will fetch a template and process the values for you
|
|
54
|
-
* If you don't, you have to make sure the values are all correct and all template items are processed
|
|
55
|
-
*
|
|
56
|
-
* @internal
|
|
57
|
-
*/
|
|
58
|
-
_setItemCreated<ItemTypeType extends ApiEnumItemType, Fields extends FieldMap<ItemTypeType>>(itemId: ItemId, fields: Fields, columns: ColumnSet<ItemTypeType>, parent?: EntryParentNull, isRoot?: boolean, isApiResponse?: boolean): this;
|
|
59
|
-
/**
|
|
60
|
-
* @description
|
|
61
|
-
* Convenience function to assign the proper parent fields, will call {@link ChangesDeltaBase.setItemUpdated setItemUpdated} internally
|
|
62
|
-
*/
|
|
63
|
-
setItemMoved(entry: ItemEntry, to: EntryParent, mode?: ChangesDeltaItemUpdateMode): this;
|
|
64
|
-
isEmpty(): boolean;
|
|
65
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ApiFields, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ApiFormatter, ChangesDeltaBase, ChangesDeltaItemUpdateMode, ColumnExpansionResult, ColumnSet, CreatedChangesDelta, EntryParent, EntryParentNull, ErrorHandlerInterface, FieldMap, ItemCreateService, ItemEntry, ItemEntryService, PromiseInterface } from '../internal';
|
|
3
|
+
export declare type ChangesDeltaItemDeleteDelta = ItemEntry;
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* ChangesDelta used to apply changes from outside of the core to a transaction
|
|
7
|
+
*
|
|
8
|
+
* ----------
|
|
9
|
+
*
|
|
10
|
+
* The difference between {@link InternalChangesDelta InternalChangesDelta} and {@link ChangesDelta ChangesDelta} is that the ChangesDelta
|
|
11
|
+
* assumes 'created' values have no itemEntries yet.
|
|
12
|
+
*
|
|
13
|
+
* Use this when calling {@link TransactionCache.applyChangesDelta applyChangesDelta}
|
|
14
|
+
*/
|
|
15
|
+
export declare class ChangesDelta extends ChangesDeltaBase {
|
|
16
|
+
private errorHandler;
|
|
17
|
+
private itemCreateService;
|
|
18
|
+
created: CreatedChangesDelta;
|
|
19
|
+
deleted: {
|
|
20
|
+
[itemType: string]: {
|
|
21
|
+
[entryId: string]: ChangesDeltaItemDeleteDelta;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
constructor(errorHandler: ErrorHandlerInterface, itemCreateService: ItemCreateService, itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
25
|
+
merge(otherChangesDelta: ChangesDelta): ChangesDelta;
|
|
26
|
+
/**
|
|
27
|
+
* @description
|
|
28
|
+
* Fetches a template for the passed itemType and processes the passed values and sets the item to be created when the delta is applied
|
|
29
|
+
*
|
|
30
|
+
* @remark
|
|
31
|
+
* - If the values don't contain an `id` a new one will be generated
|
|
32
|
+
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
33
|
+
*/
|
|
34
|
+
setItemCreated<ItemTypeType extends ApiEnumItemType, Fields extends Partial<FieldMap<ItemTypeType>>>(itemType: ItemTypeType, values: Fields): PromiseInterface<this>;
|
|
35
|
+
setItemUpdated<ItemTypeType extends ApiEnumItemType>(entry: ItemEntry<ItemTypeType>, fields: Partial<FieldMap<ItemTypeType>>, columnExpansionResult?: ColumnExpansionResult<ItemTypeType> | null, parent?: EntryParentNull, mode?: ChangesDeltaItemUpdateMode, didChangeAnyFieldOnParentTransaction?: boolean, previous?: FieldMap<ItemTypeType> | null): this;
|
|
36
|
+
setItemDeleted(deleted: ChangesDeltaItemDeleteDelta): this;
|
|
37
|
+
setItemsDeleted(deleted: ChangesDeltaItemDeleteDelta[]): this;
|
|
38
|
+
/**
|
|
39
|
+
* @description
|
|
40
|
+
* Fetches a template for the passed itemType and processes the passed values and sets the items to be created when the delta is applied
|
|
41
|
+
*
|
|
42
|
+
* @remark
|
|
43
|
+
* - If the values don't contain an `id` a new one will be generated
|
|
44
|
+
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
45
|
+
*/
|
|
46
|
+
setItemsCreated<ItemTypeType extends ApiEnumItemType, ColumnIds extends (keyof ApiFields[ItemTypeType])[] = (keyof ApiFields[ItemTypeType])[]>(itemType: ItemTypeType, valuesArray: Partial<FieldMap<ItemTypeType, ColumnIds>>[]): PromiseInterface<this>;
|
|
47
|
+
/**
|
|
48
|
+
* @description
|
|
49
|
+
* Will create an {@link ItemEntry ItemEntry} when the delta is applied
|
|
50
|
+
* Does not always mean the item is local, just that it isn't cached yet
|
|
51
|
+
*
|
|
52
|
+
* @remark
|
|
53
|
+
* If you're calling this from the frontend you probably want to call `setItemCreated`, which will fetch a template and process the values for you
|
|
54
|
+
* If you don't, you have to make sure the values are all correct and all template items are processed
|
|
55
|
+
*
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
_setItemCreated<ItemTypeType extends ApiEnumItemType, Fields extends FieldMap<ItemTypeType>>(itemId: ItemId, fields: Fields, columns: ColumnSet<ItemTypeType>, parent?: EntryParentNull, isRoot?: boolean, isApiResponse?: boolean): this;
|
|
59
|
+
/**
|
|
60
|
+
* @description
|
|
61
|
+
* Convenience function to assign the proper parent fields, will call {@link ChangesDeltaBase.setItemUpdated setItemUpdated} internally
|
|
62
|
+
*/
|
|
63
|
+
setItemMoved(entry: ItemEntry, to: EntryParent, mode?: ChangesDeltaItemUpdateMode): this;
|
|
64
|
+
isEmpty(): boolean;
|
|
65
|
+
}
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ColumnExpansionResult, EntryParentNull, FieldMap, ItemEntry, ItemEntryChangesTuple, ItemEntryService, ItemIdConversionMap, ItemTypeColumnId } from '../internal';
|
|
3
|
-
export declare type ChangesDeltaResult = {
|
|
4
|
-
itemIdConversionMap: ItemIdConversionMap;
|
|
5
|
-
created: ItemEntry[];
|
|
6
|
-
};
|
|
7
|
-
export declare enum ChangesDeltaItemUpdateMode {
|
|
8
|
-
CLEAR_ALWAYS = "overwrite",
|
|
9
|
-
CLEAR_WHEN_SAME = "same",
|
|
10
|
-
KEEP_WHEN_DIFFERENT = "different",
|
|
11
|
-
APPEND = "append",
|
|
12
|
-
QUERY = "query"
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @remark
|
|
16
|
-
* We explicitly keep track of the new parent, so we can set an item to moved if it isn't null (Needed for linkTo request)
|
|
17
|
-
*/
|
|
18
|
-
export declare type ChangesDeltaItemUpdateDelta<ItemTypeType extends ApiEnumItemType = any> = {
|
|
19
|
-
entry: ItemEntry<ItemTypeType>;
|
|
20
|
-
changes: {
|
|
21
|
-
expandedColumns: ColumnExpansionResult<ItemTypeType> | null;
|
|
22
|
-
fields: FieldMap<ItemTypeType>;
|
|
23
|
-
parent: EntryParentNull;
|
|
24
|
-
};
|
|
25
|
-
previous: FieldMap<ItemTypeType> | null;
|
|
26
|
-
mode: ChangesDeltaItemUpdateMode;
|
|
27
|
-
didChangeAnyField: boolean;
|
|
28
|
-
};
|
|
29
|
-
export declare abstract class ChangesDeltaBase {
|
|
30
|
-
protected itemEntryService: ItemEntryService;
|
|
31
|
-
protected apiFormatter: ApiFormatter;
|
|
32
|
-
updated: {
|
|
33
|
-
[itemEntryId: number]: ChangesDeltaItemUpdateDelta;
|
|
34
|
-
};
|
|
35
|
-
itemIdConversionMap: ItemIdConversionMap;
|
|
36
|
-
/**
|
|
37
|
-
* Only contains remote items, when rolling back local items the whole entries are deleted.
|
|
38
|
-
*/
|
|
39
|
-
restored: {
|
|
40
|
-
[itemEntryId: number]: ItemEntryChangesTuple<any>;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* @private
|
|
44
|
-
* @warning
|
|
45
|
-
* Do not set in frontend
|
|
46
|
-
*/
|
|
47
|
-
__isUndo: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* @private
|
|
50
|
-
* @warning
|
|
51
|
-
* Do not set in frontend
|
|
52
|
-
*/
|
|
53
|
-
__isRedo: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
_queryResults: {
|
|
58
|
-
[itemType: string]: {
|
|
59
|
-
[queryString: string]: {
|
|
60
|
-
[itemId: string]: true;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* @private
|
|
66
|
-
* When set, only collections of this item type will be matched.
|
|
67
|
-
*/
|
|
68
|
-
_queryItemType?: ApiEnumItemType;
|
|
69
|
-
protected constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
70
|
-
getUpdatedValue<ItemTypeType extends ApiEnumItemType, ColumnId extends ItemTypeColumnId<ItemTypeType> = any>(itemEntry: ItemEntry<ItemTypeType>, columnId: ColumnId): FieldMap<ItemTypeType>[ColumnId] | undefined;
|
|
71
|
-
/**
|
|
72
|
-
* @private
|
|
73
|
-
*/
|
|
74
|
-
_setQueryItemType(itemType?: ApiEnumItemType): this;
|
|
75
|
-
/**
|
|
76
|
-
* @description
|
|
77
|
-
* Adds a hint for the {@link CollectionMatcherBase CacheSyncer] to the ChangesDelta, when the CollectionMatcher encounters a collection
|
|
78
|
-
* with the exact query, it will use the hint instead of running the matcher
|
|
79
|
-
*
|
|
80
|
-
* @private
|
|
81
|
-
*/
|
|
82
|
-
_setQueryResult(itemType: ApiEnumItemType, queryString: string, itemIds: ItemId[] | {
|
|
83
|
-
[itemId: string]: true;
|
|
84
|
-
}): this;
|
|
85
|
-
setItemUpdated<ItemTypeType extends ApiEnumItemType>(entry: ItemEntry<ItemTypeType>, fields: Partial<FieldMap<ItemTypeType>>, columnExpansionResult?: ColumnExpansionResult<ItemTypeType> | null, parent?: EntryParentNull, mode?: ChangesDeltaItemUpdateMode, didChangeAnyFieldOnParentTransaction?: boolean, previous?: FieldMap<ItemTypeType> | null): this;
|
|
86
|
-
setItemRestored<ItemTypeType extends ApiEnumItemType>(itemEntry: ItemEntry<ItemTypeType>, transactionItemEntryChanges: FieldMap<ItemTypeType>): void;
|
|
87
|
-
isEmpty(): boolean;
|
|
88
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ApiFormatter, ColumnExpansionResult, EntryParentNull, FieldMap, ItemEntry, ItemEntryChangesTuple, ItemEntryService, ItemIdConversionMap, ItemTypeColumnId } from '../internal';
|
|
3
|
+
export declare type ChangesDeltaResult = {
|
|
4
|
+
itemIdConversionMap: ItemIdConversionMap;
|
|
5
|
+
created: ItemEntry[];
|
|
6
|
+
};
|
|
7
|
+
export declare enum ChangesDeltaItemUpdateMode {
|
|
8
|
+
CLEAR_ALWAYS = "overwrite",
|
|
9
|
+
CLEAR_WHEN_SAME = "same",
|
|
10
|
+
KEEP_WHEN_DIFFERENT = "different",
|
|
11
|
+
APPEND = "append",
|
|
12
|
+
QUERY = "query"
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @remark
|
|
16
|
+
* We explicitly keep track of the new parent, so we can set an item to moved if it isn't null (Needed for linkTo request)
|
|
17
|
+
*/
|
|
18
|
+
export declare type ChangesDeltaItemUpdateDelta<ItemTypeType extends ApiEnumItemType = any> = {
|
|
19
|
+
entry: ItemEntry<ItemTypeType>;
|
|
20
|
+
changes: {
|
|
21
|
+
expandedColumns: ColumnExpansionResult<ItemTypeType> | null;
|
|
22
|
+
fields: FieldMap<ItemTypeType>;
|
|
23
|
+
parent: EntryParentNull;
|
|
24
|
+
};
|
|
25
|
+
previous: FieldMap<ItemTypeType> | null;
|
|
26
|
+
mode: ChangesDeltaItemUpdateMode;
|
|
27
|
+
didChangeAnyField: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare abstract class ChangesDeltaBase {
|
|
30
|
+
protected itemEntryService: ItemEntryService;
|
|
31
|
+
protected apiFormatter: ApiFormatter;
|
|
32
|
+
updated: {
|
|
33
|
+
[itemEntryId: number]: ChangesDeltaItemUpdateDelta;
|
|
34
|
+
};
|
|
35
|
+
itemIdConversionMap: ItemIdConversionMap;
|
|
36
|
+
/**
|
|
37
|
+
* Only contains remote items, when rolling back local items the whole entries are deleted.
|
|
38
|
+
*/
|
|
39
|
+
restored: {
|
|
40
|
+
[itemEntryId: number]: ItemEntryChangesTuple<any>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @private
|
|
44
|
+
* @warning
|
|
45
|
+
* Do not set in frontend
|
|
46
|
+
*/
|
|
47
|
+
__isUndo: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @private
|
|
50
|
+
* @warning
|
|
51
|
+
* Do not set in frontend
|
|
52
|
+
*/
|
|
53
|
+
__isRedo: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
_queryResults: {
|
|
58
|
+
[itemType: string]: {
|
|
59
|
+
[queryString: string]: {
|
|
60
|
+
[itemId: string]: true;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @private
|
|
66
|
+
* When set, only collections of this item type will be matched.
|
|
67
|
+
*/
|
|
68
|
+
_queryItemType?: ApiEnumItemType;
|
|
69
|
+
protected constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
70
|
+
getUpdatedValue<ItemTypeType extends ApiEnumItemType, ColumnId extends ItemTypeColumnId<ItemTypeType> = any>(itemEntry: ItemEntry<ItemTypeType>, columnId: ColumnId): FieldMap<ItemTypeType>[ColumnId] | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* @private
|
|
73
|
+
*/
|
|
74
|
+
_setQueryItemType(itemType?: ApiEnumItemType): this;
|
|
75
|
+
/**
|
|
76
|
+
* @description
|
|
77
|
+
* Adds a hint for the {@link CollectionMatcherBase CacheSyncer] to the ChangesDelta, when the CollectionMatcher encounters a collection
|
|
78
|
+
* with the exact query, it will use the hint instead of running the matcher
|
|
79
|
+
*
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
_setQueryResult(itemType: ApiEnumItemType, queryString: string, itemIds: ItemId[] | {
|
|
83
|
+
[itemId: string]: true;
|
|
84
|
+
}): this;
|
|
85
|
+
setItemUpdated<ItemTypeType extends ApiEnumItemType>(entry: ItemEntry<ItemTypeType>, fields: Partial<FieldMap<ItemTypeType>>, columnExpansionResult?: ColumnExpansionResult<ItemTypeType> | null, parent?: EntryParentNull, mode?: ChangesDeltaItemUpdateMode, didChangeAnyFieldOnParentTransaction?: boolean, previous?: FieldMap<ItemTypeType> | null): this;
|
|
86
|
+
setItemRestored<ItemTypeType extends ApiEnumItemType>(itemEntry: ItemEntry<ItemTypeType>, transactionItemEntryChanges: FieldMap<ItemTypeType>): void;
|
|
87
|
+
isEmpty(): boolean;
|
|
88
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { ApiRequestService, ChangesCompilationFactory, ChangesDeltaFactory, CreateRequestFactory, ErrorHandlerInterface, ItemEntryService, ItemIdConversionMap, PromiseInterface, PromiseLibraryInterface, RequestColumnExpansionFactory, TransactionCache } from '../internal';
|
|
2
|
-
export declare type OnAfterCreateCallback = (conversionMap: ItemIdConversionMap) => void;
|
|
3
|
-
/**
|
|
4
|
-
* @description
|
|
5
|
-
* Executes the changes from a specific {@link TransactionCache transaction} and returns a {@link ChangesDelta ChangesDelta}
|
|
6
|
-
*/
|
|
7
|
-
export declare class ChangesProcessor {
|
|
8
|
-
private changesDeltaFactory;
|
|
9
|
-
private apiRequestService;
|
|
10
|
-
private changesCompilationFactory;
|
|
11
|
-
private createRequestFactory;
|
|
12
|
-
private errorHandler;
|
|
13
|
-
private promiseService;
|
|
14
|
-
private requestColumnExpansionFactory;
|
|
15
|
-
private itemEntryService;
|
|
16
|
-
private transaction;
|
|
17
|
-
private breakUpByParent?;
|
|
18
|
-
private onAfterCreateCallback?;
|
|
19
|
-
private itemIdConversionMap;
|
|
20
|
-
private serverCache;
|
|
21
|
-
constructor(changesDeltaFactory: ChangesDeltaFactory, apiRequestService: ApiRequestService, changesCompilationFactory: ChangesCompilationFactory, createRequestFactory: CreateRequestFactory, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory, itemEntryService: ItemEntryService, transaction: TransactionCache, breakUpByParent?: boolean | undefined, onAfterCreateCallback?: OnAfterCreateCallback | undefined);
|
|
22
|
-
/**
|
|
23
|
-
* @description
|
|
24
|
-
* Executes the requests in the order of:
|
|
25
|
-
* 1. create
|
|
26
|
-
* 2. move
|
|
27
|
-
* 3. delete
|
|
28
|
-
* 4. update
|
|
29
|
-
*/
|
|
30
|
-
execute(): PromiseInterface<ItemIdConversionMap>;
|
|
31
|
-
private buildMoveRequest;
|
|
32
|
-
private getMapValue;
|
|
33
|
-
private executeCreateRequests;
|
|
34
|
-
private executeCreateRequest;
|
|
35
|
-
private executeUpdateRequests;
|
|
36
|
-
private executeUpdateRequest;
|
|
37
|
-
private executeDeleteRequests;
|
|
38
|
-
private executeDeleteRequest;
|
|
39
|
-
private executeMoveRequests;
|
|
40
|
-
}
|
|
1
|
+
import { ApiRequestService, ChangesCompilationFactory, ChangesDeltaFactory, CreateRequestFactory, ErrorHandlerInterface, ItemEntryService, ItemIdConversionMap, PromiseInterface, PromiseLibraryInterface, RequestColumnExpansionFactory, TransactionCache } from '../internal';
|
|
2
|
+
export declare type OnAfterCreateCallback = (conversionMap: ItemIdConversionMap) => void;
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* Executes the changes from a specific {@link TransactionCache transaction} and returns a {@link ChangesDelta ChangesDelta}
|
|
6
|
+
*/
|
|
7
|
+
export declare class ChangesProcessor {
|
|
8
|
+
private changesDeltaFactory;
|
|
9
|
+
private apiRequestService;
|
|
10
|
+
private changesCompilationFactory;
|
|
11
|
+
private createRequestFactory;
|
|
12
|
+
private errorHandler;
|
|
13
|
+
private promiseService;
|
|
14
|
+
private requestColumnExpansionFactory;
|
|
15
|
+
private itemEntryService;
|
|
16
|
+
private transaction;
|
|
17
|
+
private breakUpByParent?;
|
|
18
|
+
private onAfterCreateCallback?;
|
|
19
|
+
private itemIdConversionMap;
|
|
20
|
+
private serverCache;
|
|
21
|
+
constructor(changesDeltaFactory: ChangesDeltaFactory, apiRequestService: ApiRequestService, changesCompilationFactory: ChangesCompilationFactory, createRequestFactory: CreateRequestFactory, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory, itemEntryService: ItemEntryService, transaction: TransactionCache, breakUpByParent?: boolean | undefined, onAfterCreateCallback?: OnAfterCreateCallback | undefined);
|
|
22
|
+
/**
|
|
23
|
+
* @description
|
|
24
|
+
* Executes the requests in the order of:
|
|
25
|
+
* 1. create
|
|
26
|
+
* 2. move
|
|
27
|
+
* 3. delete
|
|
28
|
+
* 4. update
|
|
29
|
+
*/
|
|
30
|
+
execute(): PromiseInterface<ItemIdConversionMap>;
|
|
31
|
+
private buildMoveRequest;
|
|
32
|
+
private getMapValue;
|
|
33
|
+
private executeCreateRequests;
|
|
34
|
+
private executeCreateRequest;
|
|
35
|
+
private executeUpdateRequests;
|
|
36
|
+
private executeUpdateRequest;
|
|
37
|
+
private executeDeleteRequests;
|
|
38
|
+
private executeDeleteRequest;
|
|
39
|
+
private executeMoveRequests;
|
|
40
|
+
}
|