@rentman/rm-core 10.0.4 → 10.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +1397 -1386
- package/dist/rm-core.js +996 -959
- package/dist/rm-core.min.js +1 -1
- package/dist/types/classes/ApiFormatter.d.ts +79 -79
- package/dist/types/classes/ApiRequestService.d.ts +18 -18
- package/dist/types/classes/ApiResponseProcessor.d.ts +29 -29
- package/dist/types/classes/BusinessLogicManager/BusinessLogicManager.d.ts +98 -98
- package/dist/types/classes/BusinessLogicManager/BusinessLogicRule.d.ts +94 -94
- package/dist/types/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +25 -25
- package/dist/types/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +14 -14
- package/dist/types/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +20 -20
- package/dist/types/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +19 -19
- package/dist/types/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +14 -14
- package/dist/types/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +14 -14
- package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalTelexemplarenBusinessLogicRule.d.ts +15 -15
- package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalTypeBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +19 -19
- package/dist/types/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +26 -26
- package/dist/types/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +29 -29
- package/dist/types/classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule.d.ts +23 -23
- package/dist/types/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarBusinessLogicRule.d.ts +14 -14
- package/dist/types/classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +18 -18
- package/dist/types/classes/CacheSyncer.d.ts +70 -70
- package/dist/types/classes/ChangesCompilation.d.ts +33 -33
- package/dist/types/classes/ChangesDelta.d.ts +65 -62
- package/dist/types/classes/ChangesDeltaBase.d.ts +79 -79
- package/dist/types/classes/ChangesProcessor.d.ts +40 -40
- package/dist/types/classes/CollectionEntryService.d.ts +24 -24
- package/dist/types/classes/CollectionResourceService.d.ts +6 -6
- package/dist/types/classes/ColumnCache.d.ts +19 -19
- package/dist/types/classes/ColumnExpansion.d.ts +19 -19
- package/dist/types/classes/ColumnHandler.d.ts +20 -20
- package/dist/types/classes/ColumnInfo.d.ts +15 -15
- package/dist/types/classes/ColumnSet.d.ts +37 -37
- package/dist/types/classes/ColumnSubsetCache.d.ts +14 -14
- package/dist/types/classes/ColumnUtil.d.ts +108 -108
- package/dist/types/classes/ConversionMapService.d.ts +25 -25
- package/dist/types/classes/CreateRequest.d.ts +17 -17
- package/dist/types/classes/CreatedChangesDelta.d.ts +17 -17
- package/dist/types/classes/InternalChangesDelta.d.ts +44 -44
- package/dist/types/classes/ItemCache.d.ts +27 -27
- package/dist/types/classes/ItemCreateService.d.ts +18 -18
- package/dist/types/classes/ItemEntryService.d.ts +32 -32
- package/dist/types/classes/KeyService.d.ts +18 -18
- package/dist/types/classes/LockService.d.ts +28 -29
- package/dist/types/classes/ModuleChangesCompilation.d.ts +18 -18
- package/dist/types/classes/ParentChangesDelta.d.ts +41 -39
- package/dist/types/classes/QueryColumnExtractor.d.ts +18 -18
- package/dist/types/classes/QueryContainsLocalIdParser.d.ts +17 -17
- package/dist/types/classes/QueryLinkedToParser.d.ts +17 -17
- package/dist/types/classes/QueryLocallyMatchableParser.d.ts +20 -20
- package/dist/types/classes/QueryMatcher.d.ts +24 -24
- package/dist/types/classes/QueryParser.d.ts +25 -25
- package/dist/types/classes/QueryParserBase.d.ts +20 -20
- package/dist/types/classes/QueryParserIdUpdater.d.ts +17 -17
- package/dist/types/classes/QueryService.d.ts +12 -12
- package/dist/types/classes/RequestBuffer.d.ts +24 -24
- package/dist/types/classes/RequestBufferManager.d.ts +32 -32
- package/dist/types/classes/RequestColumnExpansion.d.ts +15 -15
- package/dist/types/classes/SocketMessageHandler.d.ts +34 -34
- package/dist/types/classes/TemplateCache.d.ts +62 -62
- package/dist/types/classes/Util.d.ts +28 -28
- package/dist/types/classes/cache/AbstractCache.d.ts +86 -86
- package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +68 -68
- package/dist/types/classes/cache/ItemHandlerBase.d.ts +102 -102
- package/dist/types/classes/cache/server/ServerCache.d.ts +78 -78
- package/dist/types/classes/cache/server/ServerCachedQueryHandler.d.ts +25 -25
- package/dist/types/classes/cache/server/ServerItemHandler.d.ts +43 -43
- package/dist/types/classes/cache/transaction/TransactionCache.d.ts +318 -318
- package/dist/types/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +37 -37
- package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +24 -24
- package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +21 -21
- package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +90 -90
- package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +33 -33
- package/dist/types/constants.d.ts +7 -7
- package/dist/types/core.d.ts +48 -48
- package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/types/factories/CacheSyncerFactory.d.ts +10 -10
- package/dist/types/factories/ChangesCompilationFactory.d.ts +5 -5
- package/dist/types/factories/ChangesDeltaFactory.d.ts +13 -13
- package/dist/types/factories/ChangesProcessorFactory.d.ts +13 -13
- package/dist/types/factories/CollectionEntryFactory.d.ts +11 -11
- package/dist/types/factories/CollectionResourceFactory.d.ts +18 -18
- package/dist/types/factories/ColumnExpansionFactory.d.ts +7 -7
- package/dist/types/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/types/factories/ColumnSetFactory.d.ts +18 -18
- package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +8 -8
- package/dist/types/factories/CreateRequestFactory.d.ts +9 -9
- package/dist/types/factories/ItemCacheFactory.d.ts +6 -6
- package/dist/types/factories/ItemEntryFactory.d.ts +12 -12
- package/dist/types/factories/ItemResourceFactory.d.ts +11 -11
- package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +4 -4
- package/dist/types/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/types/factories/QueryParserFactory.d.ts +5 -5
- package/dist/types/factories/RequestColumnExpansionFactory.d.ts +8 -8
- package/dist/types/factories/TemplateFactory.d.ts +8 -8
- package/dist/types/factories/TransactionCacheFactory.d.ts +13 -13
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +38 -38
- package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +12 -12
- package/dist/types/interfaces/AuthInterface.d.ts +10 -10
- package/dist/types/interfaces/ErrorHandlerInterface.d.ts +6 -6
- package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/types/interfaces/PromiseLibraryInterface.d.ts +33 -33
- package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +5 -5
- package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +17 -17
- package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +22 -22
- package/dist/types/internal.d.ts +128 -128
- package/dist/types/models/CachedQueryItem.d.ts +19 -19
- package/dist/types/models/CollectionEntry.d.ts +21 -21
- package/dist/types/models/CollectionOptions.d.ts +44 -44
- package/dist/types/models/CollectionResource.d.ts +87 -87
- package/dist/types/models/ItemEntry.d.ts +18 -18
- package/dist/types/models/ItemEntryOptions.d.ts +8 -8
- package/dist/types/models/ItemResource.d.ts +90 -90
- package/dist/types/models/Template.d.ts +11 -11
- package/dist/types/types/ItemTypesCollection.d.ts +345 -345
- package/dist/types/types/PromiseInterface.d.ts +2 -2
- package/package.json +50 -50
- package/readme.md +16 -16
|
@@ -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,62 +1,65 @@
|
|
|
1
|
-
import { ApiEnumItemType, ApiFields, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ChangesDeltaBase, 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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* @
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
* @
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
import { ApiEnumItemType, ApiFields, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ApiFormatter, ChangesDeltaBase, 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, updateModified?: boolean, updateInitial?: boolean): 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, updateModified?: boolean, updateInitial?: boolean): this;
|
|
64
|
+
isEmpty(): boolean;
|
|
65
|
+
}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ColumnExpansionResult, EntryParentNull, FieldMap, ItemEntry, ItemEntryService, ItemIdConversionMap, ItemTypeColumnId, TransactionItemEntryChanges, TransactionItemEntryChangesTuple } from '../internal';
|
|
3
|
-
export declare type ChangesDeltaResult = {
|
|
4
|
-
itemIdConversionMap: ItemIdConversionMap;
|
|
5
|
-
created: ItemEntry[];
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* @remark
|
|
9
|
-
* 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)
|
|
10
|
-
*/
|
|
11
|
-
export declare type ChangesDeltaItemUpdateDelta<ItemTypeType extends ApiEnumItemType = any> = {
|
|
12
|
-
entry: ItemEntry<ItemTypeType>;
|
|
13
|
-
changes: {
|
|
14
|
-
expandedColumns: ColumnExpansionResult<ItemTypeType> | null;
|
|
15
|
-
fields: FieldMap<ItemTypeType>;
|
|
16
|
-
parent: EntryParentNull;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* @description
|
|
20
|
-
* Should be set to `true` when either the changes are made by the user, or when it's the direct result (not derived value) of a create/update API call
|
|
21
|
-
*/
|
|
22
|
-
updateModified: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* @description
|
|
25
|
-
* Should be set to `true` when the changes are a result of an API call
|
|
26
|
-
*/
|
|
27
|
-
updateInitial: 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]: TransactionItemEntryChangesTuple<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
|
-
protected constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
65
|
-
getUpdatedValue<ItemTypeType extends ApiEnumItemType, ColumnId extends ItemTypeColumnId<ItemTypeType> = any>(itemEntry: ItemEntry<ItemTypeType>, columnId: ColumnId): FieldMap<ItemTypeType>[ColumnId] | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* @description
|
|
68
|
-
* Adds a hint for the {@link CollectionMatcherBase CacheSyncer] to the ChangesDelta, when the CollectionMatcher encounters a collection
|
|
69
|
-
* with the exact query, it will use the hint instead of running the matcher
|
|
70
|
-
*
|
|
71
|
-
* @private
|
|
72
|
-
*/
|
|
73
|
-
_setQueryResult(itemType: ApiEnumItemType, queryString: string, itemIds: ItemId[] | {
|
|
74
|
-
[itemId: string]: true;
|
|
75
|
-
}): void;
|
|
76
|
-
setItemUpdated<ItemTypeType extends ApiEnumItemType>(entry: ItemEntry<ItemTypeType>, fields: Partial<FieldMap<ItemTypeType>>, columnExpansionResult?: ColumnExpansionResult<ItemTypeType> | null, parent?: EntryParentNull, updateModified?: boolean, updateInitial?: boolean): this;
|
|
77
|
-
setItemRestored<ItemTypeType extends ApiEnumItemType>(itemEntry: ItemEntry<ItemTypeType>, transactionItemEntryChanges: TransactionItemEntryChanges<ItemTypeType>): void;
|
|
78
|
-
isEmpty(): boolean;
|
|
79
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ApiFormatter, ColumnExpansionResult, EntryParentNull, FieldMap, ItemEntry, ItemEntryService, ItemIdConversionMap, ItemTypeColumnId, TransactionItemEntryChanges, TransactionItemEntryChangesTuple } from '../internal';
|
|
3
|
+
export declare type ChangesDeltaResult = {
|
|
4
|
+
itemIdConversionMap: ItemIdConversionMap;
|
|
5
|
+
created: ItemEntry[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @remark
|
|
9
|
+
* 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)
|
|
10
|
+
*/
|
|
11
|
+
export declare type ChangesDeltaItemUpdateDelta<ItemTypeType extends ApiEnumItemType = any> = {
|
|
12
|
+
entry: ItemEntry<ItemTypeType>;
|
|
13
|
+
changes: {
|
|
14
|
+
expandedColumns: ColumnExpansionResult<ItemTypeType> | null;
|
|
15
|
+
fields: FieldMap<ItemTypeType>;
|
|
16
|
+
parent: EntryParentNull;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @description
|
|
20
|
+
* Should be set to `true` when either the changes are made by the user, or when it's the direct result (not derived value) of a create/update API call
|
|
21
|
+
*/
|
|
22
|
+
updateModified: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @description
|
|
25
|
+
* Should be set to `true` when the changes are a result of an API call
|
|
26
|
+
*/
|
|
27
|
+
updateInitial: 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]: TransactionItemEntryChangesTuple<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
|
+
protected constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
65
|
+
getUpdatedValue<ItemTypeType extends ApiEnumItemType, ColumnId extends ItemTypeColumnId<ItemTypeType> = any>(itemEntry: ItemEntry<ItemTypeType>, columnId: ColumnId): FieldMap<ItemTypeType>[ColumnId] | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* @description
|
|
68
|
+
* Adds a hint for the {@link CollectionMatcherBase CacheSyncer] to the ChangesDelta, when the CollectionMatcher encounters a collection
|
|
69
|
+
* with the exact query, it will use the hint instead of running the matcher
|
|
70
|
+
*
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
_setQueryResult(itemType: ApiEnumItemType, queryString: string, itemIds: ItemId[] | {
|
|
74
|
+
[itemId: string]: true;
|
|
75
|
+
}): void;
|
|
76
|
+
setItemUpdated<ItemTypeType extends ApiEnumItemType>(entry: ItemEntry<ItemTypeType>, fields: Partial<FieldMap<ItemTypeType>>, columnExpansionResult?: ColumnExpansionResult<ItemTypeType> | null, parent?: EntryParentNull, updateModified?: boolean, updateInitial?: boolean): this;
|
|
77
|
+
setItemRestored<ItemTypeType extends ApiEnumItemType>(itemEntry: ItemEntry<ItemTypeType>, transactionItemEntryChanges: TransactionItemEntryChanges<ItemTypeType>): void;
|
|
78
|
+
isEmpty(): boolean;
|
|
79
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiQuery, CollectionOptions, CollectionOptionsInterface, CollectionQuery, EntryParentNull, ItemEntry, QueryParserFactory, QueryService } from '../internal';
|
|
3
|
-
export declare class CollectionEntryService {
|
|
4
|
-
private queryParserFactory;
|
|
5
|
-
private queryService;
|
|
6
|
-
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
7
|
-
createUnfoundLocalCollectionError(itemType: ApiEnumItemType): {
|
|
8
|
-
message: string;
|
|
9
|
-
};
|
|
10
|
-
cloneOptions(options: CollectionOptions, parent: EntryParentNull): CollectionOptions<any, import("../internal").ItemTypeColumnIds<any>>;
|
|
11
|
-
processOptions<ItemTypeType extends ApiEnumItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions;
|
|
12
|
-
createQuery(query: ApiQuery): CollectionQuery;
|
|
13
|
-
createQueryFromOptions(options: CollectionOptions): CollectionQuery;
|
|
14
|
-
createBatchedLinkToQuery(parentType: ApiEnumItemType, parentIdArray: ItemId[], options: CollectionOptions): CollectionQuery;
|
|
15
|
-
getIdArray(itemEntries: ItemEntry[], accumulator?: ItemId[]): ItemId[];
|
|
16
|
-
/**
|
|
17
|
-
* @description
|
|
18
|
-
* Filters an array of {@link ItemEntry ItemEntries} according to the callback function.
|
|
19
|
-
* Does an in-place replacement of the items in the array that do match the condition (keeping the array reference)
|
|
20
|
-
*
|
|
21
|
-
* @returns {@link ItemEntry ItemEntries} that failed the condition
|
|
22
|
-
*/
|
|
23
|
-
filterArray<T extends ItemEntry = ItemEntry>(itemEntries: T[], callback: (itemEntry: T) => boolean): T[];
|
|
24
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ApiQuery, CollectionOptions, CollectionOptionsInterface, CollectionQuery, EntryParentNull, ItemEntry, QueryParserFactory, QueryService } from '../internal';
|
|
3
|
+
export declare class CollectionEntryService {
|
|
4
|
+
private queryParserFactory;
|
|
5
|
+
private queryService;
|
|
6
|
+
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
7
|
+
createUnfoundLocalCollectionError(itemType: ApiEnumItemType): {
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
cloneOptions(options: CollectionOptions, parent: EntryParentNull): CollectionOptions<any, import("../internal").ItemTypeColumnIds<any>>;
|
|
11
|
+
processOptions<ItemTypeType extends ApiEnumItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions;
|
|
12
|
+
createQuery(query: ApiQuery): CollectionQuery;
|
|
13
|
+
createQueryFromOptions(options: CollectionOptions): CollectionQuery;
|
|
14
|
+
createBatchedLinkToQuery(parentType: ApiEnumItemType, parentIdArray: ItemId[], options: CollectionOptions): CollectionQuery;
|
|
15
|
+
getIdArray(itemEntries: ItemEntry[], accumulator?: ItemId[]): ItemId[];
|
|
16
|
+
/**
|
|
17
|
+
* @description
|
|
18
|
+
* Filters an array of {@link ItemEntry ItemEntries} according to the callback function.
|
|
19
|
+
* Does an in-place replacement of the items in the array that do match the condition (keeping the array reference)
|
|
20
|
+
*
|
|
21
|
+
* @returns {@link ItemEntry ItemEntries} that failed the condition
|
|
22
|
+
*/
|
|
23
|
+
filterArray<T extends ItemEntry = ItemEntry>(itemEntries: T[], callback: (itemEntry: T) => boolean): T[];
|
|
24
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { CollectionOptions, CollectionOptionsInterface, ItemResource } from '../internal';
|
|
3
|
-
export declare class CollectionResourceService {
|
|
4
|
-
processOptions<ItemTypeType extends ApiEnumItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions<ItemTypeType>;
|
|
5
|
-
getIdArray(itemResources: ItemResource[]): ItemId[];
|
|
6
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { CollectionOptions, CollectionOptionsInterface, ItemResource } from '../internal';
|
|
3
|
+
export declare class CollectionResourceService {
|
|
4
|
+
processOptions<ItemTypeType extends ApiEnumItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions<ItemTypeType>;
|
|
5
|
+
getIdArray(itemResources: ItemResource[]): ItemId[];
|
|
6
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ApiEnumItemType, ResponseColumn } from '@rentman/backend-types';
|
|
2
|
-
import { ApiRequestColumns, ColumnUtil, ResponseColumnItemTypeMap } from '../internal';
|
|
3
|
-
export declare class ColumnCache {
|
|
4
|
-
private columnUtil;
|
|
5
|
-
private cache;
|
|
6
|
-
private allColumns;
|
|
7
|
-
constructor(columnUtil: ColumnUtil);
|
|
8
|
-
setColumn(itemType: ApiEnumItemType, responseColumn: ResponseColumn): ResponseColumn;
|
|
9
|
-
setColumns(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap, columnFilter: string | false): ResponseColumnItemTypeMap;
|
|
10
|
-
retrieve(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns): {
|
|
11
|
-
cached: ResponseColumnItemTypeMap;
|
|
12
|
-
missing: ApiRequestColumns;
|
|
13
|
-
};
|
|
14
|
-
containsAll(itemType: ApiEnumItemType): boolean;
|
|
15
|
-
getColumns(itemType: ApiEnumItemType): ResponseColumnItemTypeMap;
|
|
16
|
-
getColumn(itemType: ApiEnumItemType, columnId: string): ResponseColumn | undefined;
|
|
17
|
-
private retrieveColumns;
|
|
18
|
-
private retrieveColumn;
|
|
19
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ResponseColumn } from '@rentman/backend-types';
|
|
2
|
+
import { ApiRequestColumns, ColumnUtil, ResponseColumnItemTypeMap } from '../internal';
|
|
3
|
+
export declare class ColumnCache {
|
|
4
|
+
private columnUtil;
|
|
5
|
+
private cache;
|
|
6
|
+
private allColumns;
|
|
7
|
+
constructor(columnUtil: ColumnUtil);
|
|
8
|
+
setColumn(itemType: ApiEnumItemType, responseColumn: ResponseColumn): ResponseColumn;
|
|
9
|
+
setColumns(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap, columnFilter: string | false): ResponseColumnItemTypeMap;
|
|
10
|
+
retrieve(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns): {
|
|
11
|
+
cached: ResponseColumnItemTypeMap;
|
|
12
|
+
missing: ApiRequestColumns;
|
|
13
|
+
};
|
|
14
|
+
containsAll(itemType: ApiEnumItemType): boolean;
|
|
15
|
+
getColumns(itemType: ApiEnumItemType): ResponseColumnItemTypeMap;
|
|
16
|
+
getColumn(itemType: ApiEnumItemType, columnId: string): ResponseColumn | undefined;
|
|
17
|
+
private retrieveColumns;
|
|
18
|
+
private retrieveColumn;
|
|
19
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
-
import { ApiRequestColumns, ColumnExpansionResult, ColumnInfo, ColumnInfoFactory, ColumnSet, ResponseColumnItemTypeMap } from '../internal';
|
|
3
|
-
/**
|
|
4
|
-
* @description
|
|
5
|
-
* A ColumnExpansion is used to make sure {@link ItemEntry ItemEntries} that have the same {@link ColumnSet ColumnSet} (matched on {@link ColumnSet.id ColumnSet.id}) will all get the same new expanded ColumnSet
|
|
6
|
-
*/
|
|
7
|
-
export declare class ColumnExpansion<ItemTypeType extends ApiEnumItemType> {
|
|
8
|
-
private columnInfoFactory;
|
|
9
|
-
itemType: ItemTypeType;
|
|
10
|
-
responseColumns: ResponseColumnItemTypeMap;
|
|
11
|
-
private expansionMap;
|
|
12
|
-
private expansionMapSize;
|
|
13
|
-
private requestColumnsTrue;
|
|
14
|
-
private requestColumns;
|
|
15
|
-
constructor(columnInfoFactory: ColumnInfoFactory, itemType: ItemTypeType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap);
|
|
16
|
-
run(columnSet: ColumnSet<ItemTypeType>): ColumnExpansionResult<ItemTypeType> | null;
|
|
17
|
-
aggregateRootColumns(): ColumnInfo<ItemTypeType>[];
|
|
18
|
-
private expandRootColumnMap;
|
|
19
|
-
}
|
|
1
|
+
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
+
import { ApiRequestColumns, ColumnExpansionResult, ColumnInfo, ColumnInfoFactory, ColumnSet, ResponseColumnItemTypeMap } from '../internal';
|
|
3
|
+
/**
|
|
4
|
+
* @description
|
|
5
|
+
* A ColumnExpansion is used to make sure {@link ItemEntry ItemEntries} that have the same {@link ColumnSet ColumnSet} (matched on {@link ColumnSet.id ColumnSet.id}) will all get the same new expanded ColumnSet
|
|
6
|
+
*/
|
|
7
|
+
export declare class ColumnExpansion<ItemTypeType extends ApiEnumItemType> {
|
|
8
|
+
private columnInfoFactory;
|
|
9
|
+
itemType: ItemTypeType;
|
|
10
|
+
responseColumns: ResponseColumnItemTypeMap;
|
|
11
|
+
private expansionMap;
|
|
12
|
+
private expansionMapSize;
|
|
13
|
+
private requestColumnsTrue;
|
|
14
|
+
private requestColumns;
|
|
15
|
+
constructor(columnInfoFactory: ColumnInfoFactory, itemType: ItemTypeType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap);
|
|
16
|
+
run(columnSet: ColumnSet<ItemTypeType>): ColumnExpansionResult<ItemTypeType> | null;
|
|
17
|
+
aggregateRootColumns(): ColumnInfo<ItemTypeType>[];
|
|
18
|
+
private expandRootColumnMap;
|
|
19
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ApiEnumItemType, ResponseColumn } from '@rentman/backend-types';
|
|
2
|
-
import { ApiRequestColumns, ApiRequestService, ColumnCache, ColumnUtil, ErrorHandlerInterface, PromiseInterface, PromiseLibraryInterface, ResponseColumnItemTypeMap } from '../internal';
|
|
3
|
-
export declare class ColumnHandler {
|
|
4
|
-
private apiRequestService;
|
|
5
|
-
private errorHandler;
|
|
6
|
-
private promiseService;
|
|
7
|
-
private cache;
|
|
8
|
-
private columnUtil;
|
|
9
|
-
constructor(apiRequestService: ApiRequestService, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, cache: ColumnCache, columnUtil: ColumnUtil);
|
|
10
|
-
setColumn(itemType: ApiEnumItemType, responseColumn: ResponseColumn): ResponseColumn;
|
|
11
|
-
setColumns(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap, filter?: string | false): ResponseColumnItemTypeMap;
|
|
12
|
-
fetchItemTypeTranslations(itemTypes: ApiEnumItemType[]): PromiseInterface<{
|
|
13
|
-
[itemType: string]: string;
|
|
14
|
-
}>;
|
|
15
|
-
request(itemType: ApiEnumItemType, columns: ApiRequestColumns, params?: {
|
|
16
|
-
filter: string | false;
|
|
17
|
-
}): PromiseInterface<ResponseColumnItemTypeMap>;
|
|
18
|
-
fetch(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns, params?: any): PromiseInterface<ResponseColumnItemTypeMap>;
|
|
19
|
-
fetchAll(itemType: ApiEnumItemType): PromiseInterface<ResponseColumnItemTypeMap>;
|
|
20
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ResponseColumn } from '@rentman/backend-types';
|
|
2
|
+
import { ApiRequestColumns, ApiRequestService, ColumnCache, ColumnUtil, ErrorHandlerInterface, PromiseInterface, PromiseLibraryInterface, ResponseColumnItemTypeMap } from '../internal';
|
|
3
|
+
export declare class ColumnHandler {
|
|
4
|
+
private apiRequestService;
|
|
5
|
+
private errorHandler;
|
|
6
|
+
private promiseService;
|
|
7
|
+
private cache;
|
|
8
|
+
private columnUtil;
|
|
9
|
+
constructor(apiRequestService: ApiRequestService, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, cache: ColumnCache, columnUtil: ColumnUtil);
|
|
10
|
+
setColumn(itemType: ApiEnumItemType, responseColumn: ResponseColumn): ResponseColumn;
|
|
11
|
+
setColumns(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns, responseColumns: ResponseColumnItemTypeMap, filter?: string | false): ResponseColumnItemTypeMap;
|
|
12
|
+
fetchItemTypeTranslations(itemTypes: ApiEnumItemType[]): PromiseInterface<{
|
|
13
|
+
[itemType: string]: string;
|
|
14
|
+
}>;
|
|
15
|
+
request(itemType: ApiEnumItemType, columns: ApiRequestColumns, params?: {
|
|
16
|
+
filter: string | false;
|
|
17
|
+
}): PromiseInterface<ResponseColumnItemTypeMap>;
|
|
18
|
+
fetch(itemType: ApiEnumItemType, requestColumns: ApiRequestColumns, params?: any): PromiseInterface<ResponseColumnItemTypeMap>;
|
|
19
|
+
fetchAll(itemType: ApiEnumItemType): PromiseInterface<ResponseColumnItemTypeMap>;
|
|
20
|
+
}
|