@rentman/rm-core 1.0.34 → 1.1.0
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 +131 -72
- package/dist/dist/classes/ApiFormatter.d.ts +37 -37
- package/dist/dist/classes/ApiRequestService.d.ts +18 -17
- package/dist/dist/classes/ApiResponseProcessor.d.ts +33 -31
- package/dist/dist/classes/BatchStatus.d.ts +18 -18
- package/dist/dist/classes/ChangesCompilation.d.ts +26 -0
- package/dist/dist/classes/ChangesProcessor.d.ts +34 -41
- package/dist/dist/classes/CollectionCache.d.ts +33 -40
- package/dist/dist/classes/CollectionEntryService.d.ts +26 -23
- package/dist/dist/classes/CollectionHandler.d.ts +49 -64
- package/dist/dist/classes/CollectionMatcher.d.ts +28 -0
- package/dist/dist/classes/CollectionResourceService.d.ts +5 -5
- package/dist/dist/classes/ColumnCache.d.ts +18 -18
- package/dist/dist/classes/ColumnExpansion.d.ts +14 -16
- package/dist/dist/classes/ColumnHandler.d.ts +16 -17
- package/dist/dist/classes/ColumnInfo.d.ts +12 -0
- package/dist/dist/classes/ColumnSet.d.ts +34 -54
- package/dist/dist/classes/ColumnUtil.d.ts +79 -81
- package/dist/dist/classes/CreateRequest.d.ts +20 -20
- package/dist/dist/classes/ItemAdministrator.d.ts +99 -114
- package/dist/dist/classes/ItemCache.d.ts +25 -22
- package/dist/dist/classes/ItemEntryService.d.ts +18 -51
- package/dist/dist/classes/ItemHandler.d.ts +57 -82
- package/dist/dist/classes/ItemRequestService.d.ts +22 -28
- package/dist/dist/classes/ItemResourceService.d.ts +7 -7
- package/dist/dist/classes/KeyService.d.ts +25 -28
- package/dist/dist/classes/LocalCache.d.ts +57 -66
- package/dist/dist/classes/LockService.d.ts +23 -23
- package/dist/dist/classes/{ModuleChangesCompiler.d.ts → ModuleChangesCompilation.d.ts} +19 -22
- package/dist/dist/classes/QueryMatcher.d.ts +14 -14
- package/dist/dist/classes/QueryParser.d.ts +16 -16
- package/dist/dist/classes/QueryService.d.ts +19 -19
- package/dist/dist/classes/RequestColumnExpansion.d.ts +9 -9
- package/dist/dist/classes/SocketMessageHandler.d.ts +32 -32
- package/dist/dist/classes/Util.d.ts +25 -25
- package/dist/dist/classes/index.d.ts +34 -32
- package/dist/dist/constants.d.ts +15 -10
- package/dist/dist/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/dist/factories/BatchStatusFactory.d.ts +9 -8
- package/dist/dist/factories/ChangesCompilationFactory.d.ts +8 -0
- package/dist/dist/factories/ChangesProcessorFactory.d.ts +18 -23
- package/dist/dist/factories/CollectionCacheFactory.d.ts +7 -7
- package/dist/dist/factories/CollectionEntryFactory.d.ts +14 -14
- package/dist/dist/factories/CollectionMatcherFactory.d.ts +7 -0
- package/dist/dist/factories/CollectionResourceFactory.d.ts +16 -16
- package/dist/dist/factories/ColumnExpansionFactory.d.ts +8 -9
- package/dist/dist/factories/ColumnInfoFactory.d.ts +6 -0
- package/dist/dist/factories/ColumnSetFactory.d.ts +11 -7
- package/dist/dist/factories/CreateRequestFactory.d.ts +10 -10
- package/dist/dist/factories/ItemCacheFactory.d.ts +7 -8
- package/dist/dist/factories/ItemEntryFactory.d.ts +19 -5
- package/dist/dist/factories/ItemResourceFactory.d.ts +14 -16
- package/dist/dist/factories/LocalCacheFactory.d.ts +16 -25
- package/dist/dist/factories/ModuleChangesCompilationFactory.d.ts +5 -0
- package/dist/dist/factories/QueryMatcherFactory.d.ts +7 -6
- package/dist/dist/factories/QueryParserFactory.d.ts +5 -5
- package/dist/dist/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/dist/factories/index.d.ts +20 -18
- package/dist/dist/index.d.ts +7 -7
- package/dist/dist/interfaces/ApiRequestServiceInterface.d.ts +11 -10
- package/dist/dist/interfaces/AuthInterface.d.ts +9 -9
- package/dist/dist/interfaces/ErrorHandlerInterface.d.ts +4 -4
- package/dist/dist/interfaces/LocalCacheManagerInterface.d.ts +5 -5
- package/dist/dist/interfaces/PromiseInterface.d.ts +11 -11
- package/dist/dist/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/dist/interfaces/index.d.ts +6 -6
- package/dist/dist/main.d.ts +46 -44
- package/dist/dist/models/CollectionEditResource.d.ts +21 -20
- package/dist/dist/models/CollectionEntry.d.ts +60 -57
- package/dist/dist/models/CollectionResource.d.ts +36 -37
- package/dist/dist/models/CollectionViewResource.d.ts +5 -13
- package/dist/dist/models/EditResource.d.ts +22 -25
- package/dist/dist/models/ItemEntry.d.ts +62 -18
- package/dist/dist/models/ItemResource.d.ts +16 -15
- package/dist/dist/models/ViewResource.d.ts +4 -6
- package/dist/dist/models/index.d.ts +8 -8
- package/dist/dist/types/ItemTypesCollection.d.ts +87 -49
- package/dist/dist/types/index.d.ts +1 -0
- package/dist/rm-core.js +6697 -6531
- package/dist/rm-core.min.js +1 -1
- package/package.json +35 -35
- package/readme.md +15 -15
- package/dist/dist/classes/ChangesCompiler.d.ts +0 -33
- package/dist/dist/factories/ChangesCompilerFactory.d.ts +0 -7
- package/dist/dist/factories/ModuleChangesCompilerFactory.d.ts +0 -7
|
@@ -1,114 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*
|
|
41
|
-
* @param
|
|
42
|
-
* @param {
|
|
43
|
-
* @param
|
|
44
|
-
* @returns {Promise<ItemResource>}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
addCollection(collectionEntry: any, resourceOptions: any, processOptions?: any): CollectionResource;
|
|
101
|
-
addCollections(collectionEntries: CollectionEntryParentIdMap, resourceOptions: any): CollectionResourceParentIdMap;
|
|
102
|
-
processLinkedItems(linkedEntries: any[], options: any, addToCollections: boolean): ItemResourceItemTypeMap;
|
|
103
|
-
getLocalCache(): LocalCache;
|
|
104
|
-
resetLocalCache(): void;
|
|
105
|
-
addToCollections(itemEntries: any[], resultCollectionResource: any): ItemResource[];
|
|
106
|
-
removeFromCollections(itemEntries: any[], resultCollectionResource: any): any;
|
|
107
|
-
updateItemIdMap(collectionMap: any, conversionMap: any): void;
|
|
108
|
-
createCollectionResource(collectionEntry: any, resourceOptions: any, processOptions?: any): CollectionResource;
|
|
109
|
-
createItemResource(itemEntry: any, options: any, isRoot: boolean): ItemResource;
|
|
110
|
-
createItemResources(itemEntries: any[], options: any): ItemResource[];
|
|
111
|
-
onBeforeSave(key: string, callback: any): () => void;
|
|
112
|
-
onSaveSuccess(key: string, callback: any): () => void;
|
|
113
|
-
onSaveWithoutClosing(key: string, callback: any): () => void;
|
|
114
|
-
}
|
|
1
|
+
import { CollectionCache, CollectionEntryService, CollectionHandler, CollectionMatcher, CollectionResourceService, ItemCache, ItemEntryService, ItemHandler, ItemRequestService, KeyService, LocalCache, QueryService } from '../classes';
|
|
2
|
+
import { CollectionMatcherFactory, ColumnSetFactory, LocalCacheFactory, ModuleChangesCompilationFactory } from '../factories';
|
|
3
|
+
import { ApiRequestServiceInterface, AuthInterface, ErrorHandlerInterface, LocalCacheManagerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEntry, CollectionResource, ItemEntry, ItemResource } from '../models';
|
|
5
|
+
import { CollectionEntryParentIdMap, CollectionResourceParentIdMap, ItemId, ItemResourceItemTypeMap, ItemType, TemplateResponseItemEntryMap, TemplateResponseLinkedItemEntryMap } from '../types';
|
|
6
|
+
export declare class ItemAdministrator {
|
|
7
|
+
private apiRequestService;
|
|
8
|
+
private authInterface;
|
|
9
|
+
private collectionEntryService;
|
|
10
|
+
private collectionHandler;
|
|
11
|
+
private collectionMatcherFactory;
|
|
12
|
+
private collectionResourceService;
|
|
13
|
+
private columnSetFactory;
|
|
14
|
+
private errorHandler;
|
|
15
|
+
private itemEntryService;
|
|
16
|
+
private itemHandler;
|
|
17
|
+
private itemRequestService;
|
|
18
|
+
private keyService;
|
|
19
|
+
private localCacheFactory;
|
|
20
|
+
private localCacheManager;
|
|
21
|
+
private moduleChangesCompilationFactory;
|
|
22
|
+
private promiseInterface;
|
|
23
|
+
private queryService;
|
|
24
|
+
constructor(apiRequestService: ApiRequestServiceInterface, authInterface: AuthInterface, collectionEntryService: CollectionEntryService, collectionHandler: CollectionHandler, collectionMatcherFactory: CollectionMatcherFactory, collectionResourceService: CollectionResourceService, columnSetFactory: ColumnSetFactory, errorHandler: ErrorHandlerInterface, itemEntryService: ItemEntryService, itemHandler: ItemHandler, itemRequestService: ItemRequestService, keyService: KeyService, localCacheFactory: LocalCacheFactory, localCacheManager: LocalCacheManagerInterface, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, promiseInterface: PromiseInterface, queryService: QueryService);
|
|
25
|
+
getItemDefinition(itemType: ItemType, itemId: any, options: any): {
|
|
26
|
+
itemType: string;
|
|
27
|
+
options: any;
|
|
28
|
+
itemId: any;
|
|
29
|
+
};
|
|
30
|
+
getCollectionMatcher(itemEntries: ItemEntry[], addToTab: boolean): CollectionMatcher;
|
|
31
|
+
fetchTitle(itemType: any, itemId: any, deferRequest: any): Promise<any>;
|
|
32
|
+
getItemById(itemType: ItemType, itemId: ItemId, options: any): Promise<ItemResource>;
|
|
33
|
+
getItemsById(itemType: string, itemIds: number[], options: any): Promise<ItemResource[]>;
|
|
34
|
+
getItemsByQuery(itemType: string, query: any, options: any): Promise<ItemResource[]>;
|
|
35
|
+
getDuplicateById(itemType: string, duplicateId: number, options: any): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* The return value is depended on the return links boolean. true returns the TemplateResponseItemEntryMap.
|
|
38
|
+
* The type has to be asserted at use since you only know the type of the return value when the function is called
|
|
39
|
+
*
|
|
40
|
+
* @param {string} itemType
|
|
41
|
+
* @param options
|
|
42
|
+
* @param {boolean} returnLinks
|
|
43
|
+
* @param {boolean} isRoot
|
|
44
|
+
* @returns {Promise<ItemResource> | Promise<TemplateResponseItemEntryMap>}
|
|
45
|
+
*/
|
|
46
|
+
getNewResource(itemType: string, options?: any, returnLinks?: boolean, isRoot?: boolean): Promise<ItemResource> | Promise<TemplateResponseItemEntryMap>;
|
|
47
|
+
getCollectionDef(itemType: string, options: any): {
|
|
48
|
+
itemType: string;
|
|
49
|
+
options: {
|
|
50
|
+
entry: any;
|
|
51
|
+
resource: any;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
getLinkCollectionsDef(linkType: string, linkIdArray: number[], itemType: string, linkField: string, options: any): {
|
|
55
|
+
itemType: string;
|
|
56
|
+
linkType: string;
|
|
57
|
+
linkIdArray: number[];
|
|
58
|
+
linkField: string;
|
|
59
|
+
options: {
|
|
60
|
+
entry: any;
|
|
61
|
+
resource: any;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
getCollection(itemType: string, options: any): Promise<CollectionResource>;
|
|
65
|
+
getCollectionFromDef(definition: any): Promise<CollectionResource>;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated, use `parent` in options
|
|
68
|
+
*/
|
|
69
|
+
getLinkCollection(linkType: string, linkId: number, itemType: string, options: any): Promise<CollectionResource>;
|
|
70
|
+
getLinkCollections(linkType: string, linkIdArray: number[], itemType: string, options: any): Promise<CollectionResourceParentIdMap>;
|
|
71
|
+
getLinkCollectionsFromDef(definition: any): Promise<CollectionResourceParentIdMap>;
|
|
72
|
+
getAllLinkCollections(linkType: string, itemType: string, options: any): Promise<CollectionEntryParentIdMap>;
|
|
73
|
+
getItemByDef(definition: any, isRoot: boolean): Promise<any>;
|
|
74
|
+
cloneItem(itemResource: ItemResource, options: any): ItemResource;
|
|
75
|
+
cloneCollection(collectionResource: CollectionResource, options: any, conversionMap: any): CollectionResource;
|
|
76
|
+
saveCurrentLocalCache(closeTab: boolean, parameters: any, breakupByParent: boolean | undefined, onAfterCreateCallback: any): any;
|
|
77
|
+
getCurrentCollections(): CollectionCache;
|
|
78
|
+
getCurrentItems(): ItemCache;
|
|
79
|
+
getCurrentChanges(): {
|
|
80
|
+
itemType: string;
|
|
81
|
+
itemId: number;
|
|
82
|
+
items: any;
|
|
83
|
+
};
|
|
84
|
+
addSingleItem(itemEntry: ItemEntry, options: any, isRoot?: boolean, localCache?: LocalCache): ItemResource;
|
|
85
|
+
addSingleItems(itemEntries: ItemEntry[], options: any): ItemResource[];
|
|
86
|
+
addCollection(collectionEntry: CollectionEntry, options: any): CollectionResource;
|
|
87
|
+
processLinkedItems(linkedEntries: TemplateResponseLinkedItemEntryMap[], options: any, addToCollections: boolean): ItemResourceItemTypeMap;
|
|
88
|
+
getLocalCache(): LocalCache;
|
|
89
|
+
resetLocalCache(): void;
|
|
90
|
+
addToCollections(itemEntries: ItemEntry[], resultCollectionResource?: CollectionResource): ItemResource[] | null;
|
|
91
|
+
removeFromCollections(itemEntries: ItemEntry[], resultCollectionResource?: CollectionResource): ItemResource[] | null;
|
|
92
|
+
saveLocal(itemResource: ItemResource): Promise<any>;
|
|
93
|
+
updateItemIdMap(collectionMap: any, conversionMap: any): void;
|
|
94
|
+
createCollectionResource(collectionEntry: any, resourceOptions: any, processOptions?: boolean): CollectionResource;
|
|
95
|
+
createItemResource(itemEntry: any, options: any, isRoot: boolean): ItemResource;
|
|
96
|
+
onBeforeSave(key: string, callback: any): () => void;
|
|
97
|
+
onSaveSuccess(key: string, callback: any): () => void;
|
|
98
|
+
onSaveWithoutClosing(key: string, callback: any): () => void;
|
|
99
|
+
}
|
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import { QueryMatcherFactory } from
|
|
2
|
-
import { ItemEntry } from
|
|
3
|
-
import {
|
|
4
|
-
export declare class ItemCache {
|
|
5
|
-
private queryMatcherFactory;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { QueryMatcherFactory } from '../factories';
|
|
2
|
+
import { ItemEntry } from '../models';
|
|
3
|
+
import { ItemId, ItemType } from '../types';
|
|
4
|
+
export declare class ItemCache {
|
|
5
|
+
private queryMatcherFactory;
|
|
6
|
+
entries: {
|
|
7
|
+
[itemType: string]: {
|
|
8
|
+
[itemId: number]: ItemEntry;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
12
|
+
some(callback: (itemEntry: ItemEntry) => boolean): boolean;
|
|
13
|
+
getByItemType(itemType: ItemType): ItemEntry[];
|
|
14
|
+
getByQuery(itemType: ItemType, query: any): ItemEntry[];
|
|
15
|
+
getLocalByQuery(itemType: ItemType, query: any): ItemEntry[];
|
|
16
|
+
forEach(callback: (itemEntry: ItemEntry) => void): void;
|
|
17
|
+
toArray(): ItemEntry[];
|
|
18
|
+
add(itemEntry: ItemEntry): ItemEntry;
|
|
19
|
+
get(itemType: ItemType, itemId: ItemId | string): any;
|
|
20
|
+
contains(itemType: ItemType, itemId: ItemId | string): boolean;
|
|
21
|
+
getByParent(parentType: ItemType, parentId: ItemId, itemType: ItemType): ItemEntry[];
|
|
22
|
+
updateItemId(itemEntry: ItemEntry, oldItemId: any): ItemEntry;
|
|
23
|
+
clear(itemEntry: ItemEntry): boolean;
|
|
24
|
+
matchQuery(itemEntry: ItemEntry, query: any): boolean;
|
|
25
|
+
}
|
|
@@ -1,51 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ItemEntry } from '../models
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
expand(entry: any, main: any, derived: any, expandResource: any): any;
|
|
20
|
-
processOptions(options: any): any;
|
|
21
|
-
getConversionValue(itemType: any, itemId: any, map: any): any;
|
|
22
|
-
updateFields(entry: any, source: any, overwrite?: boolean): any;
|
|
23
|
-
updateItemValue(entry: any, fields: any, apiColumn: any, conversionMap: any): void;
|
|
24
|
-
updateItemFields(entry: any, conversionMap: any): void;
|
|
25
|
-
process(entry: any): any;
|
|
26
|
-
formatRequest(entry: any): {};
|
|
27
|
-
setDisplayName(entry: any): void;
|
|
28
|
-
getDisplayName(entry: any): any;
|
|
29
|
-
getFullName(firstName: any, infix: any, lastName: any): any;
|
|
30
|
-
getTitleField(itemType: any): "serienummer" | "nummer" | "friendlyname" | "naamintern" | "omschrijving" | "code" | "naam" | "displayname";
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @param {Object} entry
|
|
34
|
-
* @param {Boolean} returnAll Returns all initial values if true
|
|
35
|
-
* @returns {Object}
|
|
36
|
-
*/
|
|
37
|
-
getChanges(entry: any, returnAll: any): any[];
|
|
38
|
-
isLocal(entry: any): boolean;
|
|
39
|
-
isLockable(entry: any): boolean;
|
|
40
|
-
hasChanges(entry: any): boolean;
|
|
41
|
-
resetModified(entry: any): void;
|
|
42
|
-
setInitial(entry: any, values: any, enableCallbacks?: any): any;
|
|
43
|
-
/**
|
|
44
|
-
* Does a shallow copy of values!
|
|
45
|
-
*/
|
|
46
|
-
setModified(entry: any, values?: any): any;
|
|
47
|
-
setDerived(entry: any, values: any): any;
|
|
48
|
-
processLocal(entry: any, initial: any, modified: any, derived: any, conversionMap: any): any;
|
|
49
|
-
setParent(entry: any, parentType: any, parentId: any): any;
|
|
50
|
-
callOnChange(entry: any, previous: any): void;
|
|
51
|
-
}
|
|
1
|
+
import { KeyService } from '../classes';
|
|
2
|
+
import { ItemEntry } from '../models';
|
|
3
|
+
import { ApiResponse, ItemId, ItemIdConversionMap, ItemType } from '../types';
|
|
4
|
+
export declare class ItemEntryService {
|
|
5
|
+
private keyService;
|
|
6
|
+
undefinedItemError: string;
|
|
7
|
+
ALL_PERMISSIONS: number;
|
|
8
|
+
constructor(keyService: KeyService);
|
|
9
|
+
processOptions(options: any): any;
|
|
10
|
+
createLocalConversionMap(itemType: ItemType, itemId: ItemId, doExtend: boolean | undefined, apiResponse: ApiResponse): ItemIdConversionMap;
|
|
11
|
+
expandLocalConversionMap(parentType: ItemType, parentId: ItemId, apiResponse: ApiResponse, conversionMap: ItemIdConversionMap): void;
|
|
12
|
+
expandConversionMap(itemEntry: ItemEntry, conversionMap: ItemIdConversionMap, newItemId?: ItemId): any;
|
|
13
|
+
batchExpandConversionMap(itemEntries: ItemEntry[], conversionMap: ItemIdConversionMap): ItemIdConversionMap;
|
|
14
|
+
getConversionValue(itemType: any, itemId: any, map: any): any;
|
|
15
|
+
batchClone(itemEntries: ItemEntry[], conversionMap?: ItemIdConversionMap): ItemEntry[];
|
|
16
|
+
getFullName(firstName: any, infix: any, lastName: any): any;
|
|
17
|
+
getTitleField(itemType: any): "serienummer" | "nummer" | "friendlyname" | "naamintern" | "omschrijving" | "code" | "naam" | "displayname";
|
|
18
|
+
}
|
|
@@ -1,82 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
|
|
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
|
-
* @param itemType
|
|
60
|
-
* @param {BatchStatus} batchStatus
|
|
61
|
-
* @param requestColumns
|
|
62
|
-
* @param resolved
|
|
63
|
-
* @returns {ItemEntry[]}
|
|
64
|
-
*
|
|
65
|
-
* for every type of entry status there is in this batch request make sure the entries get resolved.
|
|
66
|
-
* then return a array of the resulting ItemEntryArray
|
|
67
|
-
*/
|
|
68
|
-
batchResolve(itemType: any, batchStatus: BatchStatus, requestColumns: any, resolved: any): ItemEntry[] | Promise<any>;
|
|
69
|
-
cloneItem(newItemId: any, itemEntry: any, conversionMap?: any): any;
|
|
70
|
-
createConversionMap(itemType: string, itemId: number, extend: boolean, response: any): {
|
|
71
|
-
[x: string]: {
|
|
72
|
-
[x: number]: number;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
createLocalEntries(parentType: string, localParentId: number, template: any, conversionMap: any): TemplateResponseLinkedItemEntryMap[];
|
|
76
|
-
createLocalEntry(itemId: number, template: any, modified: any, derived: any, parent?: any): ItemEntry;
|
|
77
|
-
extendConversionMap(conversionMap: any, links: any, apiResponse: any): void;
|
|
78
|
-
fetchTitle(itemType: string, itemId: number, deferRequest?: boolean): Promise<any>;
|
|
79
|
-
requestItem(itemType: string, itemId: number | number[], columns: any): Promise<ApiResponseProcessor>;
|
|
80
|
-
updateItemId(itemEntry: any, itemId: any): ItemEntry;
|
|
81
|
-
private setCreator(itemEntry);
|
|
82
|
-
}
|
|
1
|
+
import { ApiResponseProcessor, BatchStatus, ColumnHandler, ColumnUtil, ItemCache, ItemEntryService, KeyService } from '../classes';
|
|
2
|
+
import { ENTRY_STATUS } from '../constants';
|
|
3
|
+
import { BatchStatusFactory, ColumnExpansionFactory, ColumnSetFactory, ItemCacheFactory, ItemEntryFactory } from '../factories';
|
|
4
|
+
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
5
|
+
import { ItemEntry } from '../models';
|
|
6
|
+
import { ApiTemplateItemTypeMap, EntryStatus, ItemId, ItemIdConversionMap, ItemType, TemplateResponseItemEntryMap, TemplateResponseLinkedItemEntryMap } from '../types';
|
|
7
|
+
export declare class ItemHandler {
|
|
8
|
+
private apiRequestService;
|
|
9
|
+
private errorHandler;
|
|
10
|
+
private itemEntryFactory;
|
|
11
|
+
private columnHandler;
|
|
12
|
+
private itemCacheFactory;
|
|
13
|
+
private batchStatusFactory;
|
|
14
|
+
private columnExpansionFactory;
|
|
15
|
+
private columnSetFactory;
|
|
16
|
+
private itemEntryService;
|
|
17
|
+
private keyService;
|
|
18
|
+
private promiseService;
|
|
19
|
+
private columnUtil;
|
|
20
|
+
entries: ItemCache;
|
|
21
|
+
templates: ApiTemplateItemTypeMap;
|
|
22
|
+
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, itemEntryFactory: ItemEntryFactory, columnHandler: ColumnHandler, itemCacheFactory: ItemCacheFactory, batchStatusFactory: BatchStatusFactory, columnExpansionFactory: ColumnExpansionFactory, columnSetFactory: ColumnSetFactory, itemEntryService: ItemEntryService, keyService: KeyService, promiseService: PromiseInterface, columnUtil: ColumnUtil);
|
|
23
|
+
fetchItem(itemType: ItemType, itemId: ItemId, options: any, localItemCache: ItemCache): Promise<ItemEntry | TemplateResponseItemEntryMap>;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param itemType
|
|
27
|
+
* @param itemIds
|
|
28
|
+
* @param options
|
|
29
|
+
* @returns {Promise<ItemEntry[]>}
|
|
30
|
+
*
|
|
31
|
+
* For every itemid find the status of the ItemEntry and resolve the promises so the result is
|
|
32
|
+
* a usable ItemEntry
|
|
33
|
+
*/
|
|
34
|
+
fetchItems(itemType: any, itemIds: any, options: any, localItemCache: ItemCache): Promise<ItemEntry[]>;
|
|
35
|
+
resolveCached(itemEntry: ItemEntry, status: ENTRY_STATUS, options: any): Promise<ItemEntry>;
|
|
36
|
+
resolveLocal(itemEntry: ItemEntry, parent: any, template: any, localItemCache: ItemCache): TemplateResponseItemEntryMap;
|
|
37
|
+
resolveExpansion(itemEntry: any, columnExpansion: any, response: any): ItemEntry;
|
|
38
|
+
resolveRemote(itemEntry: any, columnInfo: any, response: any): any;
|
|
39
|
+
fetchTemplate(itemType: string, templateOptions?: any, templateColumns?: any): Promise<any>;
|
|
40
|
+
getEntryStatus(itemType: ItemType, itemId: ItemId, options: any, localItemCache: ItemCache): EntryStatus<ItemEntry>;
|
|
41
|
+
getCachedEntryStatus(itemEntry: ItemEntry, options: any): ENTRY_STATUS;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @param itemType
|
|
45
|
+
* @param {BatchStatus} batchStatus
|
|
46
|
+
* @param requestColumns
|
|
47
|
+
* @param resolved
|
|
48
|
+
* @returns {ItemEntry[]}
|
|
49
|
+
*
|
|
50
|
+
* for every type of entry status there is in this batch request make sure the entries get resolved.
|
|
51
|
+
* then return a array of the resulting ItemEntryArray
|
|
52
|
+
*/
|
|
53
|
+
batchResolve(itemType: any, batchStatus: BatchStatus, requestColumns: any, resolved: any, localItemCache: ItemCache): ItemEntry[] | Promise<any>;
|
|
54
|
+
createLocalEntries(parentType: ItemType, localParentId: ItemId, template: any, itemIdConversion: ItemIdConversionMap, localItemCache: ItemCache): TemplateResponseLinkedItemEntryMap[];
|
|
55
|
+
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest: boolean | undefined, localItemCache: ItemCache): Promise<any>;
|
|
56
|
+
requestItems(itemType: string, itemIds: ItemId[], columns: any): Promise<ApiResponseProcessor>;
|
|
57
|
+
}
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
requestLinkItems(parentType: any, parentIdArray: any, itemType: any, query: any, columns: any): Promise<ApiResponseProcessor>;
|
|
24
|
-
processExpansion(requestColumns: any, response: any, itemType: string, itemEntries: ItemEntry[]): ColumnExpansion;
|
|
25
|
-
processResponse(response: any, idArray: any, parent: any, columnInfo: any, columnExpansion?: any): Promise<ItemEntry[]>;
|
|
26
|
-
handleCachedItem(itemEntry: any, response: any, columnExpansion: ColumnExpansion): any;
|
|
27
|
-
processLinkResponse(response: any, parentType: any, parentIdArray: any, itemType: any, options: any): Promise<any>;
|
|
28
|
-
}
|
|
1
|
+
import { ApiResponseProcessor, ColumnExpansion, ItemHandler, QueryService } from '../classes';
|
|
2
|
+
import { ColumnExpansionFactory, ColumnSetFactory, ItemEntryFactory } from '../factories';
|
|
3
|
+
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEntry, ItemEntry } from '../models';
|
|
5
|
+
export declare class ItemRequestService {
|
|
6
|
+
private apiRequestService;
|
|
7
|
+
private errorHandler;
|
|
8
|
+
private itemHandler;
|
|
9
|
+
private columnExpansionFactory;
|
|
10
|
+
private columnSetFactory;
|
|
11
|
+
private itemEntryFactory;
|
|
12
|
+
private queryService;
|
|
13
|
+
private promiseService;
|
|
14
|
+
constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, columnExpansionFactory: ColumnExpansionFactory, columnSetFactory: ColumnSetFactory, itemEntryFactory: ItemEntryFactory, queryService: QueryService, promiseService: PromiseInterface);
|
|
15
|
+
requestItem(itemType: any, itemId: any, columns: any): Promise<ApiResponseProcessor>;
|
|
16
|
+
requestItems(collectionEntry: CollectionEntry, query?: any, columns?: any): Promise<ApiResponseProcessor>;
|
|
17
|
+
requestLinkItems(parentType: any, parentIdArray: any, itemType: any, query: any, columns: any): Promise<ApiResponseProcessor>;
|
|
18
|
+
processExpansion(requestColumns: any, response: any, itemType: string, itemEntries: ItemEntry[]): ColumnExpansion;
|
|
19
|
+
processResponse(response: any, idArray: any, parent: any, columnInfo: any, columnExpansion?: any): Promise<ItemEntry[]>;
|
|
20
|
+
handleCachedItem(itemEntry: any, response: any, columnExpansion: ColumnExpansion): any;
|
|
21
|
+
processLinkResponse(response: any, parentType: any, parentIdArray: any, itemType: any, options: any): Promise<any>;
|
|
22
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EditResource } from '../models';
|
|
2
|
-
export declare class ItemResourceService {
|
|
3
|
-
constructor();
|
|
4
|
-
processOptions(options: any): any;
|
|
5
|
-
compareOptions(first: any, second: any): boolean;
|
|
6
|
-
isNewResource(resource: EditResource): boolean;
|
|
7
|
-
}
|
|
1
|
+
import { EditResource } from '../models';
|
|
2
|
+
export declare class ItemResourceService {
|
|
3
|
+
constructor();
|
|
4
|
+
processOptions(options: any): any;
|
|
5
|
+
compareOptions(first: any, second: any): boolean;
|
|
6
|
+
isNewResource(resource: EditResource): boolean;
|
|
7
|
+
}
|
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
itemId
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
isNewId(itemId: number | string): boolean;
|
|
27
|
-
isDuplicateId(itemId: number | string): boolean;
|
|
28
|
-
}
|
|
1
|
+
import { ItemId } from '../types';
|
|
2
|
+
export declare class KeyService {
|
|
3
|
+
separator: string;
|
|
4
|
+
constructor();
|
|
5
|
+
getSingleKey(itemType: string, itemId: number | string): string;
|
|
6
|
+
getCollectionCacheKey(parentType: string, parentId: number, childType: string): string;
|
|
7
|
+
getCssKey(): any;
|
|
8
|
+
parseStateKey(stateKey: string): {
|
|
9
|
+
type: string;
|
|
10
|
+
template: string;
|
|
11
|
+
itemId?: undefined;
|
|
12
|
+
} | {
|
|
13
|
+
type: string;
|
|
14
|
+
itemId: string;
|
|
15
|
+
template?: undefined;
|
|
16
|
+
} | null;
|
|
17
|
+
getDuplicateStateKey(itemId: string | number): string;
|
|
18
|
+
getNewStateKey(templateType: string): string;
|
|
19
|
+
getLocalId(): ItemId;
|
|
20
|
+
getLocalDuplicateId(): ItemId;
|
|
21
|
+
getRandomString(): string;
|
|
22
|
+
isLocalId(itemId: ItemId | string): boolean;
|
|
23
|
+
isNewId(itemId: ItemId | string): boolean;
|
|
24
|
+
isDuplicateId(itemId: ItemId | string): boolean;
|
|
25
|
+
}
|