@rentman/rm-core 1.6.6 → 1.6.9
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 +9 -0
- package/dist/rm-core.js +7403 -7349
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +39 -39
- package/dist/src/classes/ApiRequestService.d.ts +20 -20
- package/dist/src/classes/ApiResponseProcessor.d.ts +41 -41
- package/dist/src/classes/BatchStatus.d.ts +27 -27
- package/dist/src/classes/ChangesCompilation.d.ts +51 -51
- package/dist/src/classes/ChangesProcessor.d.ts +33 -33
- package/dist/src/classes/CollectionCache.d.ts +37 -37
- package/dist/src/classes/CollectionEntryService.d.ts +23 -23
- package/dist/src/classes/CollectionHandler.d.ts +57 -57
- package/dist/src/classes/CollectionMatcher.d.ts +42 -42
- package/dist/src/classes/CollectionResourceService.d.ts +6 -6
- package/dist/src/classes/ColumnCache.d.ts +21 -21
- package/dist/src/classes/ColumnExpansion.d.ts +18 -18
- package/dist/src/classes/ColumnHandler.d.ts +21 -21
- package/dist/src/classes/ColumnInfo.d.ts +14 -14
- package/dist/src/classes/ColumnSet.d.ts +46 -46
- package/dist/src/classes/ColumnSubsetCache.d.ts +8 -8
- package/dist/src/classes/ColumnUtil.d.ts +89 -89
- package/dist/src/classes/CreateRequest.d.ts +20 -20
- package/dist/src/classes/ItemAdministrator.d.ts +241 -241
- package/dist/src/classes/ItemCache.d.ts +23 -23
- package/dist/src/classes/ItemEntryService.d.ts +24 -24
- package/dist/src/classes/ItemHandler.d.ts +60 -60
- package/dist/src/classes/ItemRequestService.d.ts +23 -23
- package/dist/src/classes/KeyService.d.ts +16 -16
- package/dist/src/classes/LocalCache.d.ts +96 -96
- package/dist/src/classes/LockService.d.ts +32 -32
- package/dist/src/classes/ModuleChangesCompilation.d.ts +21 -21
- package/dist/src/classes/QueryMatcher.d.ts +14 -14
- package/dist/src/classes/QueryParser.d.ts +34 -19
- package/dist/src/classes/QueryService.d.ts +14 -8
- package/dist/src/classes/RequestColumnExpansion.d.ts +14 -14
- package/dist/src/classes/SocketMessageHandler.d.ts +41 -41
- package/dist/src/classes/Util.d.ts +28 -28
- package/dist/src/classes/index.d.ts +34 -34
- package/dist/src/constants.d.ts +18 -18
- package/dist/src/core.d.ts +48 -48
- package/dist/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/src/factories/BatchStatusFactory.d.ts +8 -8
- package/dist/src/factories/ChangesCompilationFactory.d.ts +9 -9
- package/dist/src/factories/ChangesProcessorFactory.d.ts +18 -18
- package/dist/src/factories/CollectionCacheFactory.d.ts +7 -7
- package/dist/src/factories/CollectionEntryFactory.d.ts +22 -22
- package/dist/src/factories/CollectionMatcherFactory.d.ts +7 -7
- package/dist/src/factories/CollectionResourceFactory.d.ts +31 -31
- package/dist/src/factories/ColumnExpansionFactory.d.ts +8 -8
- package/dist/src/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/src/factories/ColumnSetFactory.d.ts +11 -11
- package/dist/src/factories/ColumnSubsetCacheFactory.d.ts +6 -6
- package/dist/src/factories/CreateRequestFactory.d.ts +11 -11
- package/dist/src/factories/ItemCacheFactory.d.ts +7 -7
- package/dist/src/factories/ItemEntryFactory.d.ts +20 -20
- package/dist/src/factories/ItemResourceFactory.d.ts +26 -26
- package/dist/src/factories/LocalCacheFactory.d.ts +17 -17
- package/dist/src/factories/ModuleChangesCompilationFactory.d.ts +5 -5
- package/dist/src/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/src/factories/QueryParserFactory.d.ts +6 -6
- package/dist/src/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/src/factories/TemplateFactory.d.ts +10 -10
- package/dist/src/factories/index.d.ts +22 -22
- package/dist/src/index.d.ts +7 -7
- package/dist/src/interfaces/ApiRequestServiceInterface.d.ts +11 -11
- package/dist/src/interfaces/AuthInterface.d.ts +9 -9
- package/dist/src/interfaces/ErrorHandlerInterface.d.ts +5 -5
- package/dist/src/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/src/interfaces/LocalCacheManagerInterface.d.ts +6 -6
- package/dist/src/interfaces/PromiseLibraryInterface.d.ts +25 -25
- package/dist/src/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/src/interfaces/index.d.ts +7 -7
- package/dist/src/models/CollectionEditResource.d.ts +14 -14
- package/dist/src/models/CollectionEntry.d.ts +83 -83
- package/dist/src/models/CollectionEntryOptions.d.ts +12 -12
- package/dist/src/models/CollectionResource.d.ts +40 -40
- package/dist/src/models/CollectionResourceOptions.d.ts +24 -24
- package/dist/src/models/CollectionViewResource.d.ts +6 -6
- package/dist/src/models/EditResource.d.ts +18 -18
- package/dist/src/models/ItemEntry.d.ts +73 -73
- package/dist/src/models/ItemEntryOptions.d.ts +11 -11
- package/dist/src/models/ItemResource.d.ts +23 -23
- package/dist/src/models/ItemResourceOptions.d.ts +10 -10
- package/dist/src/models/LocalViewResource.d.ts +4 -4
- package/dist/src/models/RemoteViewResource.d.ts +4 -4
- package/dist/src/models/Template.d.ts +11 -11
- package/dist/src/models/ViewResource.d.ts +6 -6
- package/dist/src/models/index.d.ts +15 -15
- package/dist/src/types/ItemTypesCollection.d.ts +220 -220
- package/dist/src/types/PromiseInterface.d.ts +2 -2
- package/dist/src/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/readme.md +15 -15
|
@@ -1,241 +1,241 @@
|
|
|
1
|
-
import { CollectionCache, CollectionHandler, CollectionMatcher, ItemCache, ItemHandler, ItemRequestService, KeyService, LocalCache, ModuleChangesCompilationResult, QueryService } from '../classes';
|
|
2
|
-
import { CollectionMatcherFactory, ColumnSetFactory, LocalCacheFactory, ModuleChangesCompilationFactory } from '../factories';
|
|
3
|
-
import { ApiRequestServiceInterface, AuthInterface, ErrorHandlerInterface, LocalCacheManagerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
-
import { CollectionEditResource, CollectionEntry, CollectionResource, CollectionResourceOptionsInterface, CollectionViewResource, EditResource, ItemEntry, ItemResource, ItemResourceOptionsInterface, LocalViewResource, RemoteViewResource } from '../models';
|
|
5
|
-
import { ApiQuery, CollectionDefinition, CollectionOptionsInterface, CollectionResourceParentIdMap, ConversionMap, CreateRequestParameterMap, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemResourcesItemTypeMap, ItemType, LinkCollectionDefinition, LinkedItemEntryMap, LocalCacheCallbackCondition, OnSaveCallback, PromiseInterface } from '../types';
|
|
6
|
-
export declare class ItemAdministrator {
|
|
7
|
-
private apiRequestService;
|
|
8
|
-
private authInterface;
|
|
9
|
-
private collectionHandler;
|
|
10
|
-
private collectionMatcherFactory;
|
|
11
|
-
private columnSetFactory;
|
|
12
|
-
private errorHandler;
|
|
13
|
-
private itemHandler;
|
|
14
|
-
private itemRequestService;
|
|
15
|
-
private keyService;
|
|
16
|
-
private localCacheFactory;
|
|
17
|
-
private localCacheManager;
|
|
18
|
-
private moduleChangesCompilationFactory;
|
|
19
|
-
private promiseInterface;
|
|
20
|
-
private queryService;
|
|
21
|
-
constructor(apiRequestService: ApiRequestServiceInterface, authInterface: AuthInterface, collectionHandler: CollectionHandler, collectionMatcherFactory: CollectionMatcherFactory, columnSetFactory: ColumnSetFactory, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, itemRequestService: ItemRequestService, keyService: KeyService, localCacheFactory: LocalCacheFactory, localCacheManager: LocalCacheManagerInterface, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, promiseInterface: PromiseLibraryInterface, queryService: QueryService);
|
|
22
|
-
invalidateCache(): void;
|
|
23
|
-
getCollectionMatcher(itemEntries: ItemEntry[], addToTab?: boolean, callOnAdd?: boolean): CollectionMatcher;
|
|
24
|
-
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest?: boolean): PromiseInterface<string>;
|
|
25
|
-
getItemById(itemType: ItemType, itemId: ItemId, options: ItemOptionsInterface & {
|
|
26
|
-
edit: true;
|
|
27
|
-
}, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
28
|
-
getItemById(itemType: ItemType, itemId: ItemId, options: ItemOptionsInterface & {
|
|
29
|
-
remote: true;
|
|
30
|
-
}, isRoot?: boolean): PromiseInterface<RemoteViewResource>;
|
|
31
|
-
getItemById(itemType: ItemType, itemId: ItemId, options: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<LocalViewResource>;
|
|
32
|
-
getItemsById(itemType: ItemType, itemIds: ItemId[], options: ItemOptionsInterface & {
|
|
33
|
-
edit: true;
|
|
34
|
-
}): PromiseInterface<EditResource[]>;
|
|
35
|
-
getItemsById(itemType: ItemType, itemIds: ItemId[], options: ItemOptionsInterface & {
|
|
36
|
-
remote: true;
|
|
37
|
-
}): PromiseInterface<RemoteViewResource[]>;
|
|
38
|
-
getItemsById(itemType: ItemType, itemIds: ItemId[], options: ItemOptionsInterface): PromiseInterface<LocalViewResource[]>;
|
|
39
|
-
getItemsByQuery(itemType: ItemType, query: ApiQuery, options: ItemOptionsInterface & {
|
|
40
|
-
edit: true;
|
|
41
|
-
}): PromiseInterface<EditResource[]>;
|
|
42
|
-
getItemsByQuery(itemType: ItemType, query: ApiQuery, options: ItemOptionsInterface & {
|
|
43
|
-
remote: true;
|
|
44
|
-
}): PromiseInterface<RemoteViewResource[]>;
|
|
45
|
-
getItemsByQuery(itemType: ItemType, query: ApiQuery, options: ItemOptionsInterface): PromiseInterface<LocalViewResource[]>;
|
|
46
|
-
getNewResource(itemType: ItemType, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<{
|
|
47
|
-
main: EditResource;
|
|
48
|
-
linked: ItemResourcesItemTypeMap;
|
|
49
|
-
}>;
|
|
50
|
-
getNewResource(itemType: ItemType, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
51
|
-
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options: ItemOptionsInterface & {
|
|
52
|
-
edit: true;
|
|
53
|
-
}, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
54
|
-
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options: ItemOptionsInterface & {
|
|
55
|
-
remote: true;
|
|
56
|
-
}, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<RemoteViewResource>;
|
|
57
|
-
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<LocalViewResource>;
|
|
58
|
-
getItemByState(itemType: ItemType, stateKey: ItemId | string, options: ItemOptionsInterface & {
|
|
59
|
-
edit: true;
|
|
60
|
-
}, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
61
|
-
getItemByState(itemType: ItemType, stateKey: ItemId | string, options: ItemOptionsInterface & {
|
|
62
|
-
remote: true;
|
|
63
|
-
}, isRoot?: boolean): PromiseInterface<RemoteViewResource>;
|
|
64
|
-
getItemByState(itemType: ItemType, stateKey: ItemId | string, options: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<LocalViewResource>;
|
|
65
|
-
getCollectionDef(itemType: ItemType, options: CollectionOptionsInterface): CollectionDefinition;
|
|
66
|
-
getLinkCollectionsDef(linkType: ItemType, linkIdArray: ItemId[] | (() => ItemId[]), itemType: ItemType, linkField: string, options: CollectionOptionsInterface): LinkCollectionDefinition;
|
|
67
|
-
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
68
|
-
editCollection: true;
|
|
69
|
-
editItems: true;
|
|
70
|
-
}): PromiseInterface<CollectionEditResource<EditResource>>;
|
|
71
|
-
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
72
|
-
editItems: true;
|
|
73
|
-
}): PromiseInterface<CollectionViewResource<EditResource>>;
|
|
74
|
-
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
75
|
-
editCollection: true;
|
|
76
|
-
remoteItems: true;
|
|
77
|
-
}): PromiseInterface<CollectionEditResource<RemoteViewResource>>;
|
|
78
|
-
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
79
|
-
remoteItems: true;
|
|
80
|
-
}): PromiseInterface<CollectionViewResource<RemoteViewResource>>;
|
|
81
|
-
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
82
|
-
editCollection: true;
|
|
83
|
-
}): PromiseInterface<CollectionEditResource<LocalViewResource>>;
|
|
84
|
-
getCollection(itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionViewResource<LocalViewResource>>;
|
|
85
|
-
getCollectionFromDef(definition: CollectionDefinition): PromiseInterface<CollectionResource>;
|
|
86
|
-
/**
|
|
87
|
-
* @deprecated, use `parent` in options
|
|
88
|
-
*/
|
|
89
|
-
getLinkCollection(linkType: ItemType, linkId: ItemId, itemType: ItemType, options?: CollectionOptionsInterface): PromiseInterface<CollectionResource>;
|
|
90
|
-
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
91
|
-
editItems: true;
|
|
92
|
-
editCollection: true;
|
|
93
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<EditResource>>>;
|
|
94
|
-
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
95
|
-
remoteItems: true;
|
|
96
|
-
editCollection: true;
|
|
97
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<RemoteViewResource>>>;
|
|
98
|
-
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
99
|
-
editCollection: true;
|
|
100
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<LocalViewResource>>>;
|
|
101
|
-
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
102
|
-
editItems: true;
|
|
103
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<EditResource>>>;
|
|
104
|
-
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
105
|
-
remoteItems: true;
|
|
106
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<RemoteViewResource>>>;
|
|
107
|
-
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<LocalViewResource>>>;
|
|
108
|
-
getLinkCollectionsFromDef(definition: LinkCollectionDefinition): PromiseInterface<CollectionResourceParentIdMap>;
|
|
109
|
-
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
110
|
-
editItems: true;
|
|
111
|
-
editCollection: true;
|
|
112
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<EditResource>>>;
|
|
113
|
-
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
114
|
-
remoteItems: true;
|
|
115
|
-
editCollection: true;
|
|
116
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<RemoteViewResource>>>;
|
|
117
|
-
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
118
|
-
editCollection: true;
|
|
119
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<LocalViewResource>>>;
|
|
120
|
-
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
121
|
-
editItems: true;
|
|
122
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<EditResource>>>;
|
|
123
|
-
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
124
|
-
remoteItems: true;
|
|
125
|
-
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<RemoteViewResource>>>;
|
|
126
|
-
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<LocalViewResource>>>;
|
|
127
|
-
cloneItem(itemResource: ItemResource, options: ItemOptionsInterface & {
|
|
128
|
-
edit: true;
|
|
129
|
-
}): EditResource;
|
|
130
|
-
cloneItem(itemResource: ItemResource, options: ItemOptionsInterface & {
|
|
131
|
-
remote: true;
|
|
132
|
-
}): RemoteViewResource;
|
|
133
|
-
cloneItem(itemResource: ItemResource, options: ItemOptionsInterface): LocalViewResource;
|
|
134
|
-
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
135
|
-
editItems: true;
|
|
136
|
-
editCollection: true;
|
|
137
|
-
}, conversionMap: ItemIdConversionMap): CollectionEditResource<EditResource>;
|
|
138
|
-
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
139
|
-
remoteItems: true;
|
|
140
|
-
editCollection: true;
|
|
141
|
-
}, conversionMap: ItemIdConversionMap): CollectionEditResource<RemoteViewResource>;
|
|
142
|
-
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
143
|
-
editItems: true;
|
|
144
|
-
}, conversionMap: ItemIdConversionMap): CollectionViewResource<EditResource>;
|
|
145
|
-
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
146
|
-
remoteItems: true;
|
|
147
|
-
}, conversionMap: ItemIdConversionMap): CollectionViewResource<RemoteViewResource>;
|
|
148
|
-
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
149
|
-
editCollection: true;
|
|
150
|
-
}, conversionMap: ItemIdConversionMap): CollectionEditResource<LocalViewResource>;
|
|
151
|
-
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface, conversionMap: ItemIdConversionMap): CollectionViewResource<LocalViewResource>;
|
|
152
|
-
saveCurrentLocalCache(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakupByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): PromiseInterface<ItemIdConversionMap>;
|
|
153
|
-
getCurrentCollections(): CollectionCache;
|
|
154
|
-
getCurrentItems(): ItemCache;
|
|
155
|
-
getModuleChanges(localCache?: LocalCache): ModuleChangesCompilationResult;
|
|
156
|
-
addSingleItem(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
157
|
-
edit: true;
|
|
158
|
-
}, isRoot?: boolean, localCache?: LocalCache): EditResource;
|
|
159
|
-
addSingleItem(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
160
|
-
remote: true;
|
|
161
|
-
}, isRoot?: boolean, localCache?: LocalCache): RemoteViewResource;
|
|
162
|
-
addSingleItem(itemEntry: ItemEntry, options: ItemResourceOptionsInterface, isRoot?: boolean, localCache?: LocalCache): LocalViewResource;
|
|
163
|
-
addSingleItems(itemEntries: ItemEntry[], options: ItemResourceOptionsInterface & {
|
|
164
|
-
edit: true;
|
|
165
|
-
}): EditResource[];
|
|
166
|
-
addSingleItems(itemEntries: ItemEntry[], options: ItemResourceOptionsInterface & {
|
|
167
|
-
remote: true;
|
|
168
|
-
}): RemoteViewResource[];
|
|
169
|
-
addSingleItems(itemEntries: ItemEntry[], options: ItemResourceOptionsInterface): LocalViewResource[];
|
|
170
|
-
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
171
|
-
editCollection: true;
|
|
172
|
-
editItems: true;
|
|
173
|
-
}): CollectionEditResource<EditResource>;
|
|
174
|
-
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
175
|
-
editItems: true;
|
|
176
|
-
}): CollectionViewResource<EditResource>;
|
|
177
|
-
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
178
|
-
editCollection: true;
|
|
179
|
-
remoteItems: true;
|
|
180
|
-
}): CollectionEditResource<RemoteViewResource>;
|
|
181
|
-
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
182
|
-
remoteItems: true;
|
|
183
|
-
}): CollectionViewResource<RemoteViewResource>;
|
|
184
|
-
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
185
|
-
editCollection: true;
|
|
186
|
-
}): CollectionEditResource<LocalViewResource>;
|
|
187
|
-
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface): CollectionViewResource<LocalViewResource>;
|
|
188
|
-
private createItemResources;
|
|
189
|
-
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
190
|
-
edit: true;
|
|
191
|
-
}, addToCollections: boolean): ItemResourcesItemTypeMap<EditResource>;
|
|
192
|
-
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
193
|
-
remote: true;
|
|
194
|
-
}, addToCollections: boolean): ItemResourcesItemTypeMap<RemoteViewResource>;
|
|
195
|
-
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface, addToCollections: boolean): ItemResourcesItemTypeMap<LocalViewResource>;
|
|
196
|
-
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
197
|
-
edit: true;
|
|
198
|
-
}): PromiseInterface<ItemResourcesItemTypeMap<EditResource>>;
|
|
199
|
-
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
200
|
-
remote: true;
|
|
201
|
-
}): PromiseInterface<ItemResourcesItemTypeMap<RemoteViewResource>>;
|
|
202
|
-
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface): PromiseInterface<ItemResourcesItemTypeMap<LocalViewResource>>;
|
|
203
|
-
private constructOnItemsExpanded;
|
|
204
|
-
private expandAddToCollections;
|
|
205
|
-
private getColumnSuperset;
|
|
206
|
-
getLocalCache(): LocalCache;
|
|
207
|
-
resetLocalCache(): void;
|
|
208
|
-
addToCollections<T extends CollectionResource = CollectionViewResource>(itemEntries: ItemEntry[], resultCollectionResource: T, callOnAdd?: boolean): T['items'];
|
|
209
|
-
addToCollections(itemEntries: ItemEntry[], resultCollectionResource?: null, callOnAdd?: boolean): null;
|
|
210
|
-
removeFromCollections<T extends CollectionResource = CollectionViewResource>(itemEntries: ItemEntry[], resultCollectionResource: T): T['items'];
|
|
211
|
-
removeFromCollections(itemEntries: ItemEntry[], resultCollectionResource?: null): null;
|
|
212
|
-
saveLocal(itemResource: ItemResource): PromiseInterface<ItemResource>;
|
|
213
|
-
updateItemIdMap(collectionMap: any, conversionMap: ConversionMap): void;
|
|
214
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
215
|
-
editItems: true;
|
|
216
|
-
editCollection: true;
|
|
217
|
-
}): CollectionEditResource<EditResource>;
|
|
218
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
219
|
-
editItems: true;
|
|
220
|
-
}): CollectionViewResource<EditResource>;
|
|
221
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
222
|
-
remoteItems: true;
|
|
223
|
-
editCollection: true;
|
|
224
|
-
}): CollectionEditResource<RemoteViewResource>;
|
|
225
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
226
|
-
remoteItems: true;
|
|
227
|
-
}): CollectionViewResource<RemoteViewResource>;
|
|
228
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
229
|
-
editCollection: true;
|
|
230
|
-
}): CollectionEditResource<LocalViewResource>;
|
|
231
|
-
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface): CollectionViewResource<LocalViewResource>;
|
|
232
|
-
createItemResource(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
233
|
-
edit: true;
|
|
234
|
-
}, isRoot: boolean): EditResource;
|
|
235
|
-
createItemResource(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
236
|
-
remote: true;
|
|
237
|
-
}, isRoot: boolean): RemoteViewResource;
|
|
238
|
-
createItemResource(itemEntry: ItemEntry, options: ItemResourceOptionsInterface, isRoot: boolean): LocalViewResource;
|
|
239
|
-
onBeforeSave(key: string, callback: (localCache: LocalCache) => any, condition?: LocalCacheCallbackCondition): () => void;
|
|
240
|
-
onSaveSuccess(key: string, callback: OnSaveCallback, condition?: LocalCacheCallbackCondition): () => void;
|
|
241
|
-
}
|
|
1
|
+
import { CollectionCache, CollectionHandler, CollectionMatcher, ItemCache, ItemHandler, ItemRequestService, KeyService, LocalCache, ModuleChangesCompilationResult, QueryService } from '../classes';
|
|
2
|
+
import { CollectionMatcherFactory, ColumnSetFactory, LocalCacheFactory, ModuleChangesCompilationFactory } from '../factories';
|
|
3
|
+
import { ApiRequestServiceInterface, AuthInterface, ErrorHandlerInterface, LocalCacheManagerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEditResource, CollectionEntry, CollectionResource, CollectionResourceOptionsInterface, CollectionViewResource, EditResource, ItemEntry, ItemResource, ItemResourceOptionsInterface, LocalViewResource, RemoteViewResource } from '../models';
|
|
5
|
+
import { ApiQuery, CollectionDefinition, CollectionOptionsInterface, CollectionResourceParentIdMap, ConversionMap, CreateRequestParameterMap, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemResourcesItemTypeMap, ItemType, LinkCollectionDefinition, LinkedItemEntryMap, LocalCacheCallbackCondition, OnSaveCallback, PromiseInterface } from '../types';
|
|
6
|
+
export declare class ItemAdministrator {
|
|
7
|
+
private apiRequestService;
|
|
8
|
+
private authInterface;
|
|
9
|
+
private collectionHandler;
|
|
10
|
+
private collectionMatcherFactory;
|
|
11
|
+
private columnSetFactory;
|
|
12
|
+
private errorHandler;
|
|
13
|
+
private itemHandler;
|
|
14
|
+
private itemRequestService;
|
|
15
|
+
private keyService;
|
|
16
|
+
private localCacheFactory;
|
|
17
|
+
private localCacheManager;
|
|
18
|
+
private moduleChangesCompilationFactory;
|
|
19
|
+
private promiseInterface;
|
|
20
|
+
private queryService;
|
|
21
|
+
constructor(apiRequestService: ApiRequestServiceInterface, authInterface: AuthInterface, collectionHandler: CollectionHandler, collectionMatcherFactory: CollectionMatcherFactory, columnSetFactory: ColumnSetFactory, errorHandler: ErrorHandlerInterface, itemHandler: ItemHandler, itemRequestService: ItemRequestService, keyService: KeyService, localCacheFactory: LocalCacheFactory, localCacheManager: LocalCacheManagerInterface, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, promiseInterface: PromiseLibraryInterface, queryService: QueryService);
|
|
22
|
+
invalidateCache(): void;
|
|
23
|
+
getCollectionMatcher(itemEntries: ItemEntry[], addToTab?: boolean, callOnAdd?: boolean): CollectionMatcher;
|
|
24
|
+
fetchTitle(itemType: ItemType, itemId: ItemId, deferRequest?: boolean): PromiseInterface<string>;
|
|
25
|
+
getItemById(itemType: ItemType, itemId: ItemId, options: ItemOptionsInterface & {
|
|
26
|
+
edit: true;
|
|
27
|
+
}, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
28
|
+
getItemById(itemType: ItemType, itemId: ItemId, options: ItemOptionsInterface & {
|
|
29
|
+
remote: true;
|
|
30
|
+
}, isRoot?: boolean): PromiseInterface<RemoteViewResource>;
|
|
31
|
+
getItemById(itemType: ItemType, itemId: ItemId, options: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<LocalViewResource>;
|
|
32
|
+
getItemsById(itemType: ItemType, itemIds: ItemId[], options: ItemOptionsInterface & {
|
|
33
|
+
edit: true;
|
|
34
|
+
}): PromiseInterface<EditResource[]>;
|
|
35
|
+
getItemsById(itemType: ItemType, itemIds: ItemId[], options: ItemOptionsInterface & {
|
|
36
|
+
remote: true;
|
|
37
|
+
}): PromiseInterface<RemoteViewResource[]>;
|
|
38
|
+
getItemsById(itemType: ItemType, itemIds: ItemId[], options: ItemOptionsInterface): PromiseInterface<LocalViewResource[]>;
|
|
39
|
+
getItemsByQuery(itemType: ItemType, query: ApiQuery, options: ItemOptionsInterface & {
|
|
40
|
+
edit: true;
|
|
41
|
+
}): PromiseInterface<EditResource[]>;
|
|
42
|
+
getItemsByQuery(itemType: ItemType, query: ApiQuery, options: ItemOptionsInterface & {
|
|
43
|
+
remote: true;
|
|
44
|
+
}): PromiseInterface<RemoteViewResource[]>;
|
|
45
|
+
getItemsByQuery(itemType: ItemType, query: ApiQuery, options: ItemOptionsInterface): PromiseInterface<LocalViewResource[]>;
|
|
46
|
+
getNewResource(itemType: ItemType, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<{
|
|
47
|
+
main: EditResource;
|
|
48
|
+
linked: ItemResourcesItemTypeMap;
|
|
49
|
+
}>;
|
|
50
|
+
getNewResource(itemType: ItemType, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
51
|
+
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options: ItemOptionsInterface & {
|
|
52
|
+
edit: true;
|
|
53
|
+
}, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
54
|
+
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options: ItemOptionsInterface & {
|
|
55
|
+
remote: true;
|
|
56
|
+
}, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<RemoteViewResource>;
|
|
57
|
+
getDuplicateById(itemType: ItemType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<LocalViewResource>;
|
|
58
|
+
getItemByState(itemType: ItemType, stateKey: ItemId | string, options: ItemOptionsInterface & {
|
|
59
|
+
edit: true;
|
|
60
|
+
}, isRoot?: boolean): PromiseInterface<EditResource>;
|
|
61
|
+
getItemByState(itemType: ItemType, stateKey: ItemId | string, options: ItemOptionsInterface & {
|
|
62
|
+
remote: true;
|
|
63
|
+
}, isRoot?: boolean): PromiseInterface<RemoteViewResource>;
|
|
64
|
+
getItemByState(itemType: ItemType, stateKey: ItemId | string, options: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<LocalViewResource>;
|
|
65
|
+
getCollectionDef(itemType: ItemType, options: CollectionOptionsInterface): CollectionDefinition;
|
|
66
|
+
getLinkCollectionsDef(linkType: ItemType, linkIdArray: ItemId[] | (() => ItemId[]), itemType: ItemType, linkField: string, options: CollectionOptionsInterface): LinkCollectionDefinition;
|
|
67
|
+
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
68
|
+
editCollection: true;
|
|
69
|
+
editItems: true;
|
|
70
|
+
}): PromiseInterface<CollectionEditResource<EditResource>>;
|
|
71
|
+
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
72
|
+
editItems: true;
|
|
73
|
+
}): PromiseInterface<CollectionViewResource<EditResource>>;
|
|
74
|
+
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
75
|
+
editCollection: true;
|
|
76
|
+
remoteItems: true;
|
|
77
|
+
}): PromiseInterface<CollectionEditResource<RemoteViewResource>>;
|
|
78
|
+
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
79
|
+
remoteItems: true;
|
|
80
|
+
}): PromiseInterface<CollectionViewResource<RemoteViewResource>>;
|
|
81
|
+
getCollection(itemType: ItemType, options: CollectionOptionsInterface & {
|
|
82
|
+
editCollection: true;
|
|
83
|
+
}): PromiseInterface<CollectionEditResource<LocalViewResource>>;
|
|
84
|
+
getCollection(itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionViewResource<LocalViewResource>>;
|
|
85
|
+
getCollectionFromDef(definition: CollectionDefinition): PromiseInterface<CollectionResource>;
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated, use `parent` in options
|
|
88
|
+
*/
|
|
89
|
+
getLinkCollection(linkType: ItemType, linkId: ItemId, itemType: ItemType, options?: CollectionOptionsInterface): PromiseInterface<CollectionResource>;
|
|
90
|
+
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
91
|
+
editItems: true;
|
|
92
|
+
editCollection: true;
|
|
93
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<EditResource>>>;
|
|
94
|
+
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
95
|
+
remoteItems: true;
|
|
96
|
+
editCollection: true;
|
|
97
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<RemoteViewResource>>>;
|
|
98
|
+
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
99
|
+
editCollection: true;
|
|
100
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<LocalViewResource>>>;
|
|
101
|
+
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
102
|
+
editItems: true;
|
|
103
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<EditResource>>>;
|
|
104
|
+
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface & {
|
|
105
|
+
remoteItems: true;
|
|
106
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<RemoteViewResource>>>;
|
|
107
|
+
getLinkCollections(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<LocalViewResource>>>;
|
|
108
|
+
getLinkCollectionsFromDef(definition: LinkCollectionDefinition): PromiseInterface<CollectionResourceParentIdMap>;
|
|
109
|
+
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
110
|
+
editItems: true;
|
|
111
|
+
editCollection: true;
|
|
112
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<EditResource>>>;
|
|
113
|
+
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
114
|
+
remoteItems: true;
|
|
115
|
+
editCollection: true;
|
|
116
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<RemoteViewResource>>>;
|
|
117
|
+
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
118
|
+
editCollection: true;
|
|
119
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionEditResource<LocalViewResource>>>;
|
|
120
|
+
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
121
|
+
editItems: true;
|
|
122
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<EditResource>>>;
|
|
123
|
+
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface & {
|
|
124
|
+
remoteItems: true;
|
|
125
|
+
}): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<RemoteViewResource>>>;
|
|
126
|
+
getAllLinkCollections(linkType: ItemType, itemType: ItemType, options: CollectionOptionsInterface): PromiseInterface<CollectionResourceParentIdMap<CollectionViewResource<LocalViewResource>>>;
|
|
127
|
+
cloneItem(itemResource: ItemResource, options: ItemOptionsInterface & {
|
|
128
|
+
edit: true;
|
|
129
|
+
}): EditResource;
|
|
130
|
+
cloneItem(itemResource: ItemResource, options: ItemOptionsInterface & {
|
|
131
|
+
remote: true;
|
|
132
|
+
}): RemoteViewResource;
|
|
133
|
+
cloneItem(itemResource: ItemResource, options: ItemOptionsInterface): LocalViewResource;
|
|
134
|
+
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
135
|
+
editItems: true;
|
|
136
|
+
editCollection: true;
|
|
137
|
+
}, conversionMap: ItemIdConversionMap): CollectionEditResource<EditResource>;
|
|
138
|
+
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
139
|
+
remoteItems: true;
|
|
140
|
+
editCollection: true;
|
|
141
|
+
}, conversionMap: ItemIdConversionMap): CollectionEditResource<RemoteViewResource>;
|
|
142
|
+
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
143
|
+
editItems: true;
|
|
144
|
+
}, conversionMap: ItemIdConversionMap): CollectionViewResource<EditResource>;
|
|
145
|
+
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
146
|
+
remoteItems: true;
|
|
147
|
+
}, conversionMap: ItemIdConversionMap): CollectionViewResource<RemoteViewResource>;
|
|
148
|
+
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface & {
|
|
149
|
+
editCollection: true;
|
|
150
|
+
}, conversionMap: ItemIdConversionMap): CollectionEditResource<LocalViewResource>;
|
|
151
|
+
cloneCollection(collectionResource: CollectionResource, options: CollectionOptionsInterface, conversionMap: ItemIdConversionMap): CollectionViewResource<LocalViewResource>;
|
|
152
|
+
saveCurrentLocalCache(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakupByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): PromiseInterface<ItemIdConversionMap>;
|
|
153
|
+
getCurrentCollections(): CollectionCache;
|
|
154
|
+
getCurrentItems(): ItemCache;
|
|
155
|
+
getModuleChanges(localCache?: LocalCache): ModuleChangesCompilationResult;
|
|
156
|
+
addSingleItem(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
157
|
+
edit: true;
|
|
158
|
+
}, isRoot?: boolean, localCache?: LocalCache): EditResource;
|
|
159
|
+
addSingleItem(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
160
|
+
remote: true;
|
|
161
|
+
}, isRoot?: boolean, localCache?: LocalCache): RemoteViewResource;
|
|
162
|
+
addSingleItem(itemEntry: ItemEntry, options: ItemResourceOptionsInterface, isRoot?: boolean, localCache?: LocalCache): LocalViewResource;
|
|
163
|
+
addSingleItems(itemEntries: ItemEntry[], options: ItemResourceOptionsInterface & {
|
|
164
|
+
edit: true;
|
|
165
|
+
}): EditResource[];
|
|
166
|
+
addSingleItems(itemEntries: ItemEntry[], options: ItemResourceOptionsInterface & {
|
|
167
|
+
remote: true;
|
|
168
|
+
}): RemoteViewResource[];
|
|
169
|
+
addSingleItems(itemEntries: ItemEntry[], options: ItemResourceOptionsInterface): LocalViewResource[];
|
|
170
|
+
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
171
|
+
editCollection: true;
|
|
172
|
+
editItems: true;
|
|
173
|
+
}): CollectionEditResource<EditResource>;
|
|
174
|
+
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
175
|
+
editItems: true;
|
|
176
|
+
}): CollectionViewResource<EditResource>;
|
|
177
|
+
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
178
|
+
editCollection: true;
|
|
179
|
+
remoteItems: true;
|
|
180
|
+
}): CollectionEditResource<RemoteViewResource>;
|
|
181
|
+
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
182
|
+
remoteItems: true;
|
|
183
|
+
}): CollectionViewResource<RemoteViewResource>;
|
|
184
|
+
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface & {
|
|
185
|
+
editCollection: true;
|
|
186
|
+
}): CollectionEditResource<LocalViewResource>;
|
|
187
|
+
addCollection(collectionEntry: CollectionEntry, options: CollectionResourceOptionsInterface): CollectionViewResource<LocalViewResource>;
|
|
188
|
+
private createItemResources;
|
|
189
|
+
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
190
|
+
edit: true;
|
|
191
|
+
}, addToCollections: boolean): ItemResourcesItemTypeMap<EditResource>;
|
|
192
|
+
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
193
|
+
remote: true;
|
|
194
|
+
}, addToCollections: boolean): ItemResourcesItemTypeMap<RemoteViewResource>;
|
|
195
|
+
processLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface, addToCollections: boolean): ItemResourcesItemTypeMap<LocalViewResource>;
|
|
196
|
+
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
197
|
+
edit: true;
|
|
198
|
+
}): PromiseInterface<ItemResourcesItemTypeMap<EditResource>>;
|
|
199
|
+
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface & {
|
|
200
|
+
remote: true;
|
|
201
|
+
}): PromiseInterface<ItemResourcesItemTypeMap<RemoteViewResource>>;
|
|
202
|
+
expandProcessLinkedItems(linkedEntries: LinkedItemEntryMap[], options: ItemOptionsInterface): PromiseInterface<ItemResourcesItemTypeMap<LocalViewResource>>;
|
|
203
|
+
private constructOnItemsExpanded;
|
|
204
|
+
private expandAddToCollections;
|
|
205
|
+
private getColumnSuperset;
|
|
206
|
+
getLocalCache(): LocalCache;
|
|
207
|
+
resetLocalCache(): void;
|
|
208
|
+
addToCollections<T extends CollectionResource = CollectionViewResource>(itemEntries: ItemEntry[], resultCollectionResource: T, callOnAdd?: boolean): T['items'];
|
|
209
|
+
addToCollections(itemEntries: ItemEntry[], resultCollectionResource?: null, callOnAdd?: boolean): null;
|
|
210
|
+
removeFromCollections<T extends CollectionResource = CollectionViewResource>(itemEntries: ItemEntry[], resultCollectionResource: T): T['items'];
|
|
211
|
+
removeFromCollections(itemEntries: ItemEntry[], resultCollectionResource?: null): null;
|
|
212
|
+
saveLocal(itemResource: ItemResource): PromiseInterface<ItemResource>;
|
|
213
|
+
updateItemIdMap(collectionMap: any, conversionMap: ConversionMap): void;
|
|
214
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
215
|
+
editItems: true;
|
|
216
|
+
editCollection: true;
|
|
217
|
+
}): CollectionEditResource<EditResource>;
|
|
218
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
219
|
+
editItems: true;
|
|
220
|
+
}): CollectionViewResource<EditResource>;
|
|
221
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
222
|
+
remoteItems: true;
|
|
223
|
+
editCollection: true;
|
|
224
|
+
}): CollectionEditResource<RemoteViewResource>;
|
|
225
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
226
|
+
remoteItems: true;
|
|
227
|
+
}): CollectionViewResource<RemoteViewResource>;
|
|
228
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface & {
|
|
229
|
+
editCollection: true;
|
|
230
|
+
}): CollectionEditResource<LocalViewResource>;
|
|
231
|
+
createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: CollectionResourceOptionsInterface): CollectionViewResource<LocalViewResource>;
|
|
232
|
+
createItemResource(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
233
|
+
edit: true;
|
|
234
|
+
}, isRoot: boolean): EditResource;
|
|
235
|
+
createItemResource(itemEntry: ItemEntry, options: ItemResourceOptionsInterface & {
|
|
236
|
+
remote: true;
|
|
237
|
+
}, isRoot: boolean): RemoteViewResource;
|
|
238
|
+
createItemResource(itemEntry: ItemEntry, options: ItemResourceOptionsInterface, isRoot: boolean): LocalViewResource;
|
|
239
|
+
onBeforeSave(key: string, callback: (localCache: LocalCache) => any, condition?: LocalCacheCallbackCondition): () => void;
|
|
240
|
+
onSaveSuccess(key: string, callback: OnSaveCallback, condition?: LocalCacheCallbackCondition): () => void;
|
|
241
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { QueryMatcherFactory } from '../factories';
|
|
2
|
-
import { ItemEntry } from '../models';
|
|
3
|
-
import { CollectionQuery, ItemEntryParentIdMap, ItemId, ItemType } from '../types';
|
|
4
|
-
export declare class ItemCache {
|
|
5
|
-
private queryMatcherFactory;
|
|
6
|
-
private entries;
|
|
7
|
-
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
8
|
-
some(callback: (itemEntry: ItemEntry) => boolean): boolean;
|
|
9
|
-
getByItemType(itemType: ItemType): ItemEntry[];
|
|
10
|
-
getByQuery(itemType: ItemType, query: CollectionQuery): ItemEntry[];
|
|
11
|
-
getLocalByQuery(itemType: ItemType, query: CollectionQuery): ItemEntry[];
|
|
12
|
-
getByParent(parentType: ItemType, parentId: ItemId, itemType: ItemType): ItemEntry[];
|
|
13
|
-
batchGetLocalByParent(parentType: ItemType, parentIds: ItemId[], itemType: ItemType, additionalQuery: any): ItemEntryParentIdMap;
|
|
14
|
-
forEach(callback: (itemEntry: ItemEntry) => void): void;
|
|
15
|
-
toArray(): ItemEntry[];
|
|
16
|
-
add(itemEntry: ItemEntry): ItemEntry;
|
|
17
|
-
get(itemType: ItemType, itemId: string | ItemId): undefined | ItemEntry;
|
|
18
|
-
contains(itemType: ItemType, itemId: string | ItemId): boolean;
|
|
19
|
-
updateItemId(itemEntry: ItemEntry, oldItemId: string | ItemId): ItemEntry;
|
|
20
|
-
clear(itemEntry: ItemEntry): boolean;
|
|
21
|
-
clearByItemId(itemType: ItemType, itemId: ItemId): boolean;
|
|
22
|
-
matchQuery(itemEntry: ItemEntry, query: CollectionQuery): boolean;
|
|
23
|
-
}
|
|
1
|
+
import { QueryMatcherFactory } from '../factories';
|
|
2
|
+
import { ItemEntry } from '../models';
|
|
3
|
+
import { CollectionQuery, ItemEntryParentIdMap, ItemId, ItemType } from '../types';
|
|
4
|
+
export declare class ItemCache {
|
|
5
|
+
private queryMatcherFactory;
|
|
6
|
+
private entries;
|
|
7
|
+
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
8
|
+
some(callback: (itemEntry: ItemEntry) => boolean): boolean;
|
|
9
|
+
getByItemType(itemType: ItemType): ItemEntry[];
|
|
10
|
+
getByQuery(itemType: ItemType, query: CollectionQuery): ItemEntry[];
|
|
11
|
+
getLocalByQuery(itemType: ItemType, query: CollectionQuery): ItemEntry[];
|
|
12
|
+
getByParent(parentType: ItemType, parentId: ItemId, itemType: ItemType): ItemEntry[];
|
|
13
|
+
batchGetLocalByParent(parentType: ItemType, parentIds: ItemId[], itemType: ItemType, additionalQuery: any): ItemEntryParentIdMap;
|
|
14
|
+
forEach(callback: (itemEntry: ItemEntry) => void): void;
|
|
15
|
+
toArray(): ItemEntry[];
|
|
16
|
+
add(itemEntry: ItemEntry): ItemEntry;
|
|
17
|
+
get(itemType: ItemType, itemId: string | ItemId): undefined | ItemEntry;
|
|
18
|
+
contains(itemType: ItemType, itemId: string | ItemId): boolean;
|
|
19
|
+
updateItemId(itemEntry: ItemEntry, oldItemId: string | ItemId): ItemEntry;
|
|
20
|
+
clear(itemEntry: ItemEntry): boolean;
|
|
21
|
+
clearByItemId(itemType: ItemType, itemId: ItemId): boolean;
|
|
22
|
+
matchQuery(itemEntry: ItemEntry, query: CollectionQuery): boolean;
|
|
23
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { KeyService } from '../classes';
|
|
2
|
-
import { AuthInterface } from '../interfaces';
|
|
3
|
-
import { ItemEntry, ItemEntryOptions } from '../models';
|
|
4
|
-
import { ApiResponse, FieldMap, ItemError, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemType } from '../types';
|
|
5
|
-
export declare class ItemEntryService {
|
|
6
|
-
private authInterface;
|
|
7
|
-
private keyService;
|
|
8
|
-
constructor(authInterface: AuthInterface, keyService: KeyService);
|
|
9
|
-
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
10
|
-
createUnfoundRemoteItemError(): ItemError;
|
|
11
|
-
createUnfoundLocalItemError(itemType: ItemType): {
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
createLocalConversionMap(itemType: ItemType, itemId: ItemId, doExtend: boolean | undefined, apiResponse: ApiResponse): ItemIdConversionMap;
|
|
15
|
-
expandLocalConversionMap(parentType: ItemType, parentId: ItemId, apiResponse: ApiResponse, conversionMap: ItemIdConversionMap): void;
|
|
16
|
-
expandConversionMap(itemEntry: ItemEntry, conversionMap: ItemIdConversionMap, newItemId?: ItemId): ItemId;
|
|
17
|
-
batchExpandConversionMap(itemEntries: ItemEntry[], conversionMap: ItemIdConversionMap): ItemIdConversionMap;
|
|
18
|
-
getConversionValue(itemType: ItemType, itemId: ItemId, map: ItemIdConversionMap): ItemId | undefined;
|
|
19
|
-
batchClone(itemEntries: ItemEntry[], conversionMap?: ItemIdConversionMap): ItemEntry[];
|
|
20
|
-
getFullName(firstName: string, infix: string, lastName: string): string;
|
|
21
|
-
getTitleField(itemType: ItemType): string;
|
|
22
|
-
getLocalDefaultValues(): FieldMap;
|
|
23
|
-
hasLocalDefaultValue(columnId: string): boolean;
|
|
24
|
-
}
|
|
1
|
+
import { KeyService } from '../classes';
|
|
2
|
+
import { AuthInterface } from '../interfaces';
|
|
3
|
+
import { ItemEntry, ItemEntryOptions } from '../models';
|
|
4
|
+
import { ApiResponse, FieldMap, ItemError, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemType } from '../types';
|
|
5
|
+
export declare class ItemEntryService {
|
|
6
|
+
private authInterface;
|
|
7
|
+
private keyService;
|
|
8
|
+
constructor(authInterface: AuthInterface, keyService: KeyService);
|
|
9
|
+
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
10
|
+
createUnfoundRemoteItemError(): ItemError;
|
|
11
|
+
createUnfoundLocalItemError(itemType: ItemType): {
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
createLocalConversionMap(itemType: ItemType, itemId: ItemId, doExtend: boolean | undefined, apiResponse: ApiResponse): ItemIdConversionMap;
|
|
15
|
+
expandLocalConversionMap(parentType: ItemType, parentId: ItemId, apiResponse: ApiResponse, conversionMap: ItemIdConversionMap): void;
|
|
16
|
+
expandConversionMap(itemEntry: ItemEntry, conversionMap: ItemIdConversionMap, newItemId?: ItemId): ItemId;
|
|
17
|
+
batchExpandConversionMap(itemEntries: ItemEntry[], conversionMap: ItemIdConversionMap): ItemIdConversionMap;
|
|
18
|
+
getConversionValue(itemType: ItemType, itemId: ItemId, map: ItemIdConversionMap): ItemId | undefined;
|
|
19
|
+
batchClone(itemEntries: ItemEntry[], conversionMap?: ItemIdConversionMap): ItemEntry[];
|
|
20
|
+
getFullName(firstName: string, infix: string, lastName: string): string;
|
|
21
|
+
getTitleField(itemType: ItemType): string;
|
|
22
|
+
getLocalDefaultValues(): FieldMap;
|
|
23
|
+
hasLocalDefaultValue(columnId: string): boolean;
|
|
24
|
+
}
|