@rentman/rm-core 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/changelog.md +713 -710
  2. package/dist/rm-core.js +9559 -9558
  3. package/dist/rm-core.min.js +2 -2
  4. package/dist/types/classes/ApiFormatter.d.ts +55 -55
  5. package/dist/types/classes/ApiRequestService.d.ts +20 -20
  6. package/dist/types/classes/ApiResponseProcessor.d.ts +31 -31
  7. package/dist/types/classes/ChangesCompilation.d.ts +34 -34
  8. package/dist/types/classes/ChangesDelta.d.ts +59 -59
  9. package/dist/types/classes/ChangesDeltaBase.d.ts +50 -50
  10. package/dist/types/classes/ChangesProcessor.d.ts +47 -47
  11. package/dist/types/classes/CollectionEntryService.d.ts +26 -26
  12. package/dist/types/classes/CollectionMatcherBase.d.ts +21 -21
  13. package/dist/types/classes/CollectionMatcherCachedCollectionProcessor.d.ts +31 -31
  14. package/dist/types/classes/CollectionResourceService.d.ts +7 -7
  15. package/dist/types/classes/ColumnCache.d.ts +21 -21
  16. package/dist/types/classes/ColumnExpansion.d.ts +22 -22
  17. package/dist/types/classes/ColumnHandler.d.ts +21 -21
  18. package/dist/types/classes/ColumnInfo.d.ts +14 -14
  19. package/dist/types/classes/ColumnSet.d.ts +38 -38
  20. package/dist/types/classes/ColumnSubsetCache.d.ts +10 -10
  21. package/dist/types/classes/ColumnUtil.d.ts +99 -99
  22. package/dist/types/classes/ConversionMapService.d.ts +27 -27
  23. package/dist/types/classes/CreateRequest.d.ts +19 -19
  24. package/dist/types/classes/CreatedChangesDelta.d.ts +15 -15
  25. package/dist/types/classes/InternalChangesDelta.d.ts +39 -39
  26. package/dist/types/classes/ItemCache.d.ts +29 -29
  27. package/dist/types/classes/ItemCreateService.d.ts +24 -24
  28. package/dist/types/classes/ItemEntryService.d.ts +34 -34
  29. package/dist/types/classes/KeyService.d.ts +17 -17
  30. package/dist/types/classes/LockService.d.ts +32 -32
  31. package/dist/types/classes/ModuleChangesCompilation.d.ts +18 -18
  32. package/dist/types/classes/QueryColumnExtractor.d.ts +20 -20
  33. package/dist/types/classes/QueryLinkedToParser.d.ts +16 -16
  34. package/dist/types/classes/QueryLocallyMatchableParser.d.ts +19 -19
  35. package/dist/types/classes/QueryMatcher.d.ts +18 -18
  36. package/dist/types/classes/QueryParser.d.ts +24 -24
  37. package/dist/types/classes/QueryParserBase.d.ts +29 -29
  38. package/dist/types/classes/QueryParserIdUpdater.d.ts +16 -16
  39. package/dist/types/classes/QueryService.d.ts +18 -18
  40. package/dist/types/classes/RequestBuffer.d.ts +28 -28
  41. package/dist/types/classes/RequestBufferManager.d.ts +25 -25
  42. package/dist/types/classes/RequestColumnExpansion.d.ts +15 -15
  43. package/dist/types/classes/SocketMessageHandler.d.ts +39 -39
  44. package/dist/types/classes/TemplateCache.d.ts +66 -66
  45. package/dist/types/classes/Util.d.ts +30 -30
  46. package/dist/types/classes/cache/AbstractCache.d.ts +102 -102
  47. package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +73 -73
  48. package/dist/types/classes/cache/CollectionMatcherCachedQueryProcessor.d.ts +35 -35
  49. package/dist/types/classes/cache/ItemHandlerBase.d.ts +93 -93
  50. package/dist/types/classes/cache/server/ServerCache.d.ts +82 -82
  51. package/dist/types/classes/cache/server/ServerCachedQueryHandler.d.ts +34 -34
  52. package/dist/types/classes/cache/server/ServerItemHandler.d.ts +52 -52
  53. package/dist/types/classes/cache/transaction/TransactionCache.d.ts +330 -330
  54. package/dist/types/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +23 -23
  55. package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +28 -28
  56. package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +24 -24
  57. package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +90 -90
  58. package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +28 -28
  59. package/dist/types/classes/index.d.ts +46 -46
  60. package/dist/types/constants.d.ts +7 -7
  61. package/dist/types/core.d.ts +51 -51
  62. package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
  63. package/dist/types/factories/ChangesCompilationFactory.d.ts +6 -6
  64. package/dist/types/factories/ChangesDeltaFactory.d.ts +11 -11
  65. package/dist/types/factories/ChangesProcessorFactory.d.ts +22 -22
  66. package/dist/types/factories/CollectionEntryFactory.d.ts +14 -14
  67. package/dist/types/factories/CollectionMatcherFactory.d.ts +19 -19
  68. package/dist/types/factories/CollectionResourceFactory.d.ts +22 -22
  69. package/dist/types/factories/ColumnExpansionFactory.d.ts +8 -8
  70. package/dist/types/factories/ColumnInfoFactory.d.ts +7 -7
  71. package/dist/types/factories/ColumnSetFactory.d.ts +19 -19
  72. package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +7 -7
  73. package/dist/types/factories/CreateRequestFactory.d.ts +11 -11
  74. package/dist/types/factories/ItemCacheFactory.d.ts +8 -8
  75. package/dist/types/factories/ItemEntryFactory.d.ts +15 -15
  76. package/dist/types/factories/ItemResourceFactory.d.ts +14 -14
  77. package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +5 -5
  78. package/dist/types/factories/QueryMatcherFactory.d.ts +7 -7
  79. package/dist/types/factories/QueryParserFactory.d.ts +6 -6
  80. package/dist/types/factories/RequestColumnExpansionFactory.d.ts +6 -6
  81. package/dist/types/factories/TemplateFactory.d.ts +10 -10
  82. package/dist/types/factories/TransactionCacheFactory.d.ts +15 -15
  83. package/dist/types/factories/index.d.ts +21 -21
  84. package/dist/types/index.d.ts +7 -7
  85. package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +43 -43
  86. package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +11 -11
  87. package/dist/types/interfaces/AuthInterface.d.ts +9 -9
  88. package/dist/types/interfaces/ErrorHandlerInterface.d.ts +5 -5
  89. package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
  90. package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
  91. package/dist/types/interfaces/PromiseLibraryInterface.d.ts +25 -25
  92. package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +7 -7
  93. package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
  94. package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +20 -20
  95. package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +26 -26
  96. package/dist/types/interfaces/index.d.ts +11 -11
  97. package/dist/types/models/CollectionEntry.d.ts +23 -23
  98. package/dist/types/models/CollectionOptions.d.ts +18 -18
  99. package/dist/types/models/CollectionResource.d.ts +72 -72
  100. package/dist/types/models/ItemEntry.d.ts +19 -19
  101. package/dist/types/models/ItemEntryOptions.d.ts +8 -8
  102. package/dist/types/models/ItemResource.d.ts +84 -84
  103. package/dist/types/models/Template.d.ts +11 -11
  104. package/dist/types/models/index.d.ts +7 -7
  105. package/dist/types/types/ItemTypesCollection.d.ts +263 -263
  106. package/dist/types/types/PromiseInterface.d.ts +2 -2
  107. package/dist/types/types/index.d.ts +2 -2
  108. package/package.json +36 -36
  109. package/readme.md +15 -15
@@ -1,330 +1,330 @@
1
- import { ChangesDelta, InternalChangesDelta, ServerCache, TransactionCollectionHandler, TransactionItemEntryChanges, TransactionItemHandler, TransactionValidatorFactory } from '../..';
2
- import { RmCore } from '../../../core';
3
- import { AbstractCacheDependencyInterface } from '../../../interfaces/AbstractCacheDependencyInterface';
4
- import { CollectionResource, ItemEntry, ItemEntryOptions, ItemResource } from '../../../models';
5
- import { CollectionOptionsInterface } from '../../../models/CollectionOptions';
6
- import { ApiQuery, ApiRequestColumn, ApiRequestColumns, CollectionDefinition, CollectionQuery, CollectionResourceParentIdMap, ConversionMap, CreateRequestParameterMap, DeregFunction, EntryParentNull, FieldChangeCallback, FieldMap, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemResourcesItemTypeMap, ItemType, ItemTypeMap, LinkCollectionDefinition, PromiseInterface } from '../../../types';
7
- import { ChangesDeltaResult } from '../../ChangesDeltaBase';
8
- import { OnAfterCreateCallback } from '../../ChangesProcessor';
9
- import { ModuleChangesCompilationResult } from '../../ModuleChangesCompilation';
10
- import { AbstractCache } from '../AbstractCache';
11
- import { CachedQueryItem } from '../CachedQueryHandlerBase';
12
- import { TransactionCachedQueryHandler } from './TransactionCachedQueryHandler';
13
- import { TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionEventHandler } from './TransactionEventHandler';
14
- declare type ItemResourceLinks<ItemTypeType extends ItemType> = {
15
- main: ItemResource<ItemTypeType>;
16
- linked: ItemResourcesItemTypeMap;
17
- };
18
- export declare enum TransactionErrorLevel {
19
- warning = "warning",
20
- error = "error"
21
- }
22
- /**
23
- * @description
24
- * The {@link TransactionCache TransactionCache} is responsible for keeping track of newly created {@link ItemEntry ItemEntries}
25
- * and {@link CollectionEntry CollectionEntries}, and the changes of existing ItemEntries and CollectionEntries.
26
- *
27
- * The TransactionCache is also responsible for creating {@link ItemResource ItemResources}, which is a combination of an {@link ItemEntry ItemEntry} and the current transaction's changes on this ItemEntry
28
- */
29
- export declare class TransactionCache extends AbstractCache {
30
- /**
31
- * @description
32
- * For debugging purposes
33
- */
34
- id?: string | undefined;
35
- /**
36
- * @description
37
- * A map of all item errors, can be populated using {@link TransactionValidator.setGlobalError TransactionValidator.setGlobalError} and {@link TransactionValidator.setItemError TransactionValidator.setItemError}.
38
- * Contains a translation and level for every error
39
- */
40
- errors: {
41
- item: {
42
- [itemEntryId: string]: {
43
- [columnId: string]: {
44
- [errorKey: string]: {
45
- fieldString: string;
46
- string: string;
47
- level: TransactionErrorLevel;
48
- };
49
- };
50
- };
51
- };
52
- global: {
53
- [key: string]: {
54
- string: string;
55
- level: TransactionErrorLevel;
56
- };
57
- };
58
- };
59
- isValid: boolean;
60
- /**
61
- * @description
62
- * Stores the 'root' {@link ItemEntry ItemEntry}, this {@link ItemEntry ItemEntry} can be used as request parent to store the whole transaction at once
63
- */
64
- rootItem: ItemEntry | undefined;
65
- /**
66
- * @description
67
- * Stores additional request parameters for when the transaction is stored to the server
68
- */
69
- tabRequestParameters: {};
70
- /**
71
- * @description
72
- * Is true while the {@link TransactionCache TransactionCache} is applying changes to the parent (can either be through a merge or an Api save)
73
- */
74
- isSaving: boolean;
75
- /**
76
- * @description
77
- * Is true when the current transaction has:
78
- * - Newly created items
79
- * - Removed items (from collections)
80
- * - Changes on existing items
81
- */
82
- hasChanges: boolean;
83
- /**
84
- * @description
85
- * The transaction's parent
86
- */
87
- readonly parent: AbstractCache;
88
- readonly itemHandler: TransactionItemHandler;
89
- readonly cachedQueryHandler: TransactionCachedQueryHandler;
90
- readonly collectionHandler: TransactionCollectionHandler;
91
- readonly eventHandler: TransactionEventHandler;
92
- private readonly validator?;
93
- private changesInterval;
94
- constructor(dependencies: AbstractCacheDependencyInterface, core: RmCore, parent: AbstractCache,
95
- /**
96
- * @description
97
- * For debugging purposes
98
- */
99
- id?: string | undefined, validatorFactory?: TransactionValidatorFactory);
100
- createChild(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
101
- destroy(): void;
102
- expandCollectionResource(collectionResource: CollectionResource, newColumns: ApiRequestColumns): PromiseInterface<void>;
103
- /**
104
- * @description
105
- * Expands the collection with the new request columns, assumes that all collections have the same itemType
106
- */
107
- expandCollectionResources<ItemTypeType extends ItemType>(itemType: ItemTypeType, collections: CollectionResourceParentIdMap<ItemTypeType>, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
108
- registerFieldChangeCallback<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, callback: FieldChangeCallback<ItemTypeType>): DeregFunction;
109
- createChangesDelta(): ChangesDelta;
110
- getFirstErrorString(): undefined | string;
111
- /**
112
- * @description
113
- * Should only be called by {@link TransactionValidator TransactionValidator}
114
- * @internal
115
- */
116
- _setGlobalError(key: string, isInvalid: boolean, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
117
- /**
118
- * @description
119
- * Should only be called by {@link TransactionValidator TransactionValidator}
120
- * @internal
121
- */
122
- _setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean, fieldErrorTranslationFn: () => string, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
123
- /**
124
- * @internal
125
- */
126
- _setIsValid(): void;
127
- /**
128
- * @description
129
- * Merges the passed changes from the parent Transaction into this Transaction's own changes and then propagates
130
- * them to all child Transactions, this assumes that an action is already handled in a parent, so it does't handle created entries
131
- * and removes entries that were in {@link TransactionItemHandler.deletedItems deletedItems} since they are already deleted
132
- *
133
- * ------------------
134
- *
135
- * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
136
- * the change has already been processed, and applyChangesDelta will process the changes once you save the transaction
137
- *
138
- * ------------------
139
- * Use {@link TransactionCache.applyChangesDelta applyChangesDelta} if you want to apply changes from outside the core
140
- *
141
- * @param internalChangesDelta Changes to be applied
142
- * @param isCalledAfterApiSave If 'isCalledAfterApiSave' is true local changes will always be overwritten (instead of only when there are no changes)
143
- */
144
- applyChangesFromParent(internalChangesDelta: InternalChangesDelta, isCalledAfterApiSave?: boolean, isCalledAfterSocketUpdate?: boolean): PromiseInterface<void>;
145
- /**
146
- * @description
147
- * Applies changes to this transaction and its children
148
- *
149
- * ------------------
150
- *
151
- * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
152
- * the change has already been processed, and applyChangesDelta will process the changes itself (result vs cause)
153
- *
154
- * ------------------
155
- *
156
- * Differs from {@link ServerCache.applyChangesDelta ServerCache.applyChangesDelta} in the handling of deleted entries and the applyChangesFromParent call
157
- */
158
- applyChangesDelta(changesDelta: ChangesDelta): PromiseInterface<ChangesDeltaResult>;
159
- getServerCache(): ServerCache;
160
- /**
161
- * @description
162
- * Gets the entry's parent from the closest transaction
163
- *
164
- * @param itemEntry The entry to get the parent from
165
- * @param fromInitial If `true` the parent values will be read from {@link TransactionItemEntryChanges.initial initial} (Useful for when you've moved an entry)
166
- * @param providedFields Use the provided fields instead of the cached fields, used by {@link CollectionResource.getParent CollectionResource.getParent}
167
- *
168
- * @remark
169
- * Use {@link CollectionResource.getParent CollectionResource.getParent} instead of {@link TransactionCache.getParent TransactionCache.getParent} if you're getting the parent in the onRemove callback
170
- */
171
- getParent<ItemTypeType extends ItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fromInitial?: boolean, providedFields?: FieldMap<ItemTypeType>): EntryParentNull;
172
- getCollectionChangesRecursively<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery): CachedQueryItem<ItemTypeType> | undefined;
173
- /**
174
- * @description
175
- * Traverses the transaction chain and returns the changes of the item on the first transaction
176
- *
177
- * @param copyFields If set, will call {@link ApiFormatter.copyFields ApiFormatter.copyFields}, otherwise just returns the object
178
- */
179
- getItemChangesRecursively(itemEntryId: ItemEntry['id'], copyFields?: boolean): FieldMap;
180
- /**
181
- * @description
182
- * Removes the {@link CollectionResource CollectionResource} from the transaction, preventing the {@link CollectionResource.options.onAdd onAdd} and {@link CollectionResource.options.onRemove onRemove} callbacks from being called.
183
- * You should call this function when the resource is no longer needed
184
- *
185
- * @remark
186
- * Does not remove cached queries
187
- */
188
- clearCollectionResource(resource: CollectionResource): void;
189
- /**
190
- * @description
191
- * Returns whether or not the {@link TransactionCache.rootItem rootItem} is uses locks
192
- */
193
- isLockable(): boolean;
194
- /**
195
- * @description
196
- * Disables the transaction's changes watcher, the transaction will no longer automatically detect changes on items
197
- */
198
- disableChangesWatcher(): void;
199
- /**
200
- * @description
201
- * Enables the transaction's changes watcher, the transaction will now automatically detect changes on items
202
- */
203
- enableChangesWatcher(): void;
204
- /**
205
- * @description
206
- * Saves the transaction, this has a different effect depending on the transaction's parent.
207
- *
208
- * - If the parent is another {@link TransactionCache TransactionCache} it will merge the changes of the child transaction in the the parent transaction
209
- * - If the parent is the {@link ServerCache ServerCache} it will save the changes to the APi
210
- */
211
- save(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakUpByParent?: boolean, onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<void>;
212
- detectChanges(): boolean;
213
- /**
214
- * @description
215
- * Removes an {@link ItemEntry ItemEntry} through an {@link ItemResource ItemResource} from the {@link TransactionCache TransactionCache} which means that changes on this entry will no longer be tracked.
216
- */
217
- clearItem(itemResource: ItemResource<any>): void;
218
- /**
219
- * @description
220
- * Removes an {@link ItemEntry ItemEntry} from the {@link TransactionCache TransactionCache} which means that changes on this entry will no longer be tracked.
221
- */
222
- clearItemEntry(itemEntry: ItemEntry<any>): void;
223
- /**
224
- * @description
225
- * Adds a callback that will fire before the transaction is saved, rejecting this callback will prevent the transaction from saving
226
- */
227
- onBeforeSave(key: string, callback: TransactionCacheCallbackType['onBeforeSave'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
228
- /**
229
- * @description
230
- * Adds a callback that will fire when the transaction is saved successfully
231
- */
232
- onSaveSuccess(key: string, callback: TransactionCacheCallbackType['onSaveSuccess'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
233
- /**
234
- * @description
235
- * Returns a {@link ModuleChangesCompilationResult ModuleChangesCompilationResult} for the transaction
236
- */
237
- getModuleChanges(): ModuleChangesCompilationResult;
238
- /**
239
- * @description
240
- * Updates the passed map with the new {@link ConversionMap CconversionMap} values
241
- */
242
- updateItemIdMap(collectionMap: {
243
- [itemId: number]: any;
244
- }, conversionMap: ConversionMap): void;
245
- getAllLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
246
- getLinkCollectionsFromDef<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], definition: LinkCollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
247
- getLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
248
- getCollectionFromDef<ItemTypeType extends ItemType>(definition: CollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType>>;
249
- getCollection<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType>>;
250
- getCollectionDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): CollectionDefinition<ItemTypeType>;
251
- getLinkCollectionsDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, linkField: string, options: CollectionOptionsInterface<ItemTypeType>): LinkCollectionDefinition<ItemTypeType>;
252
- /**
253
- * @deprecated
254
- * Use getItemById/getNewResourceWithId
255
- *
256
- * @remarks
257
- * stateKey can be a keyword or a local id (in case of a refresh)
258
- */
259
- getItemByState<ItemTypeType extends ItemType>(itemType: ItemTypeType, stateKey: ItemId | string, options?: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
260
- getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
261
- getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
262
- getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
263
- getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
264
- getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
265
- getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
266
- /**
267
- * @description
268
- * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
269
- */
270
- getItemsByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
271
- /**
272
- * @description
273
- * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
274
- */
275
- getItemsById<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
276
- /**
277
- * @description
278
- * Fetches the item with the changes of the current {@link TransactionCache transaction}
279
- *
280
- * @param isRoot Sets the item as the root item of the transaction, new items will be linked to this item (if there's a connection in the LinkTree)
281
- */
282
- getItemById<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options?: Partial<ItemEntryOptions>, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
283
- /**
284
- * @description
285
- * Fetches the title of an item, does not create an {@link ItemResource ItemResource}
286
- */
287
- fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
288
- /**
289
- * @description
290
- * Merges the passed child Transaction into this transaction and then propagates them to the other child transactions
291
- */
292
- applyChangesFromChild(childTransaction: TransactionCache, _breakUpByParent?: boolean, _onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<ItemIdConversionMap>;
293
- /**
294
- * @description
295
- * Gets an already cached {@link ItemEntry ItemEntry} and the changes of this specific transaction for that entry
296
- */
297
- getLocalItemEntryChangesTuple(itemEntryId: ItemEntry['id']): {
298
- entry: ItemEntry;
299
- changes: TransactionItemEntryChanges;
300
- };
301
- /**
302
- * @description
303
- * Gets an ItemEntry from the cache, doesn't do a API request, used for saving
304
- */
305
- getLocalItemEntry(itemEntryId: ItemEntry['id']): ItemEntry | undefined;
306
- /**
307
- * @description
308
- * Gets an ItemEntry from the cache by ItemId
309
- */
310
- getLocalItemEntryByItemId(itemType: ItemType, itemId: ItemEntry['itemId']): ItemEntry | undefined;
311
- /**
312
- * @description
313
- * Returns the complete {@link InternalChangesDelta InternalChangesDelta} of the TransactionCache, this only takes into account the end result (initial is compared to changes), so changing something and reverting it
314
- * won't be included
315
- */
316
- getDelta(): InternalChangesDelta;
317
- createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, isRoot?: boolean, isNew?: boolean): ItemResource<ItemTypeType>;
318
- createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>): Array<ItemResource<ItemTypeType>>;
319
- processLinkedItems<ItemTypeType extends ItemType>(linkedEntries: ItemTypeMap<ItemEntry[]>): ItemResourcesItemTypeMap<ItemResource<ItemTypeType>>;
320
- createCollectionResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>, initialEntries: Array<ItemEntry<ItemTypeType>>): CollectionResource<ItemTypeType>;
321
- getChangesFromItemChanges<ItemTypeType extends ItemType = any>(changesObject: TransactionItemEntryChanges<ItemTypeType>): FieldMap<ItemTypeType>;
322
- /**
323
- * @description
324
- * Fetches all required columns to match/fit in collections
325
- */
326
- private expandItemsFromDelta;
327
- private clearGlobalError;
328
- private clearItemError;
329
- }
330
- export {};
1
+ import { ChangesDelta, InternalChangesDelta, ServerCache, TransactionCollectionHandler, TransactionItemEntryChanges, TransactionItemHandler, TransactionValidatorFactory } from '../..';
2
+ import { RmCore } from '../../../core';
3
+ import { AbstractCacheDependencyInterface } from '../../../interfaces/AbstractCacheDependencyInterface';
4
+ import { CollectionResource, ItemEntry, ItemEntryOptions, ItemResource } from '../../../models';
5
+ import { CollectionOptionsInterface } from '../../../models/CollectionOptions';
6
+ import { ApiQuery, ApiRequestColumn, ApiRequestColumns, CollectionDefinition, CollectionQuery, CollectionResourceParentIdMap, ConversionMap, CreateRequestParameterMap, DeregFunction, EntryParentNull, FieldChangeCallback, FieldMap, ItemId, ItemIdConversionMap, ItemOptionsInterface, ItemResourcesItemTypeMap, ItemType, ItemTypeMap, LinkCollectionDefinition, PromiseInterface } from '../../../types';
7
+ import { ChangesDeltaResult } from '../../ChangesDeltaBase';
8
+ import { OnAfterCreateCallback } from '../../ChangesProcessor';
9
+ import { ModuleChangesCompilationResult } from '../../ModuleChangesCompilation';
10
+ import { AbstractCache } from '../AbstractCache';
11
+ import { CachedQueryItem } from '../CachedQueryHandlerBase';
12
+ import { TransactionCachedQueryHandler } from './TransactionCachedQueryHandler';
13
+ import { TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionEventHandler } from './TransactionEventHandler';
14
+ declare type ItemResourceLinks<ItemTypeType extends ItemType> = {
15
+ main: ItemResource<ItemTypeType>;
16
+ linked: ItemResourcesItemTypeMap;
17
+ };
18
+ export declare enum TransactionErrorLevel {
19
+ warning = "warning",
20
+ error = "error"
21
+ }
22
+ /**
23
+ * @description
24
+ * The {@link TransactionCache TransactionCache} is responsible for keeping track of newly created {@link ItemEntry ItemEntries}
25
+ * and {@link CollectionEntry CollectionEntries}, and the changes of existing ItemEntries and CollectionEntries.
26
+ *
27
+ * The TransactionCache is also responsible for creating {@link ItemResource ItemResources}, which is a combination of an {@link ItemEntry ItemEntry} and the current transaction's changes on this ItemEntry
28
+ */
29
+ export declare class TransactionCache extends AbstractCache {
30
+ /**
31
+ * @description
32
+ * For debugging purposes
33
+ */
34
+ id?: string | undefined;
35
+ /**
36
+ * @description
37
+ * A map of all item errors, can be populated using {@link TransactionValidator.setGlobalError TransactionValidator.setGlobalError} and {@link TransactionValidator.setItemError TransactionValidator.setItemError}.
38
+ * Contains a translation and level for every error
39
+ */
40
+ errors: {
41
+ item: {
42
+ [itemEntryId: string]: {
43
+ [columnId: string]: {
44
+ [errorKey: string]: {
45
+ fieldString: string;
46
+ string: string;
47
+ level: TransactionErrorLevel;
48
+ };
49
+ };
50
+ };
51
+ };
52
+ global: {
53
+ [key: string]: {
54
+ string: string;
55
+ level: TransactionErrorLevel;
56
+ };
57
+ };
58
+ };
59
+ isValid: boolean;
60
+ /**
61
+ * @description
62
+ * Stores the 'root' {@link ItemEntry ItemEntry}, this {@link ItemEntry ItemEntry} can be used as request parent to store the whole transaction at once
63
+ */
64
+ rootItem: ItemEntry | undefined;
65
+ /**
66
+ * @description
67
+ * Stores additional request parameters for when the transaction is stored to the server
68
+ */
69
+ tabRequestParameters: {};
70
+ /**
71
+ * @description
72
+ * Is true while the {@link TransactionCache TransactionCache} is applying changes to the parent (can either be through a merge or an Api save)
73
+ */
74
+ isSaving: boolean;
75
+ /**
76
+ * @description
77
+ * Is true when the current transaction has:
78
+ * - Newly created items
79
+ * - Removed items (from collections)
80
+ * - Changes on existing items
81
+ */
82
+ hasChanges: boolean;
83
+ /**
84
+ * @description
85
+ * The transaction's parent
86
+ */
87
+ readonly parent: AbstractCache;
88
+ readonly itemHandler: TransactionItemHandler;
89
+ readonly cachedQueryHandler: TransactionCachedQueryHandler;
90
+ readonly collectionHandler: TransactionCollectionHandler;
91
+ readonly eventHandler: TransactionEventHandler;
92
+ private readonly validator?;
93
+ private changesInterval;
94
+ constructor(dependencies: AbstractCacheDependencyInterface, core: RmCore, parent: AbstractCache,
95
+ /**
96
+ * @description
97
+ * For debugging purposes
98
+ */
99
+ id?: string | undefined, validatorFactory?: TransactionValidatorFactory);
100
+ createChild(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
101
+ destroy(): void;
102
+ expandCollectionResource(collectionResource: CollectionResource, newColumns: ApiRequestColumns): PromiseInterface<void>;
103
+ /**
104
+ * @description
105
+ * Expands the collection with the new request columns, assumes that all collections have the same itemType
106
+ */
107
+ expandCollectionResources<ItemTypeType extends ItemType>(itemType: ItemTypeType, collections: CollectionResourceParentIdMap<ItemTypeType>, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
108
+ registerFieldChangeCallback<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, callback: FieldChangeCallback<ItemTypeType>): DeregFunction;
109
+ createChangesDelta(): ChangesDelta;
110
+ getFirstErrorString(): undefined | string;
111
+ /**
112
+ * @description
113
+ * Should only be called by {@link TransactionValidator TransactionValidator}
114
+ * @internal
115
+ */
116
+ _setGlobalError(key: string, isInvalid: boolean, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
117
+ /**
118
+ * @description
119
+ * Should only be called by {@link TransactionValidator TransactionValidator}
120
+ * @internal
121
+ */
122
+ _setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean, fieldErrorTranslationFn: () => string, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
123
+ /**
124
+ * @internal
125
+ */
126
+ _setIsValid(): void;
127
+ /**
128
+ * @description
129
+ * Merges the passed changes from the parent Transaction into this Transaction's own changes and then propagates
130
+ * them to all child Transactions, this assumes that an action is already handled in a parent, so it does't handle created entries
131
+ * and removes entries that were in {@link TransactionItemHandler.deletedItems deletedItems} since they are already deleted
132
+ *
133
+ * ------------------
134
+ *
135
+ * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
136
+ * the change has already been processed, and applyChangesDelta will process the changes once you save the transaction
137
+ *
138
+ * ------------------
139
+ * Use {@link TransactionCache.applyChangesDelta applyChangesDelta} if you want to apply changes from outside the core
140
+ *
141
+ * @param internalChangesDelta Changes to be applied
142
+ * @param isCalledAfterApiSave If 'isCalledAfterApiSave' is true local changes will always be overwritten (instead of only when there are no changes)
143
+ */
144
+ applyChangesFromParent(internalChangesDelta: InternalChangesDelta, isCalledAfterApiSave?: boolean, isCalledAfterSocketUpdate?: boolean): PromiseInterface<void>;
145
+ /**
146
+ * @description
147
+ * Applies changes to this transaction and its children
148
+ *
149
+ * ------------------
150
+ *
151
+ * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
152
+ * the change has already been processed, and applyChangesDelta will process the changes itself (result vs cause)
153
+ *
154
+ * ------------------
155
+ *
156
+ * Differs from {@link ServerCache.applyChangesDelta ServerCache.applyChangesDelta} in the handling of deleted entries and the applyChangesFromParent call
157
+ */
158
+ applyChangesDelta(changesDelta: ChangesDelta): PromiseInterface<ChangesDeltaResult>;
159
+ getServerCache(): ServerCache;
160
+ /**
161
+ * @description
162
+ * Gets the entry's parent from the closest transaction
163
+ *
164
+ * @param itemEntry The entry to get the parent from
165
+ * @param fromInitial If `true` the parent values will be read from {@link TransactionItemEntryChanges.initial initial} (Useful for when you've moved an entry)
166
+ * @param providedFields Use the provided fields instead of the cached fields, used by {@link CollectionResource.getParent CollectionResource.getParent}
167
+ *
168
+ * @remark
169
+ * Use {@link CollectionResource.getParent CollectionResource.getParent} instead of {@link TransactionCache.getParent TransactionCache.getParent} if you're getting the parent in the onRemove callback
170
+ */
171
+ getParent<ItemTypeType extends ItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fromInitial?: boolean, providedFields?: FieldMap<ItemTypeType>): EntryParentNull;
172
+ getCollectionChangesRecursively<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery): CachedQueryItem<ItemTypeType> | undefined;
173
+ /**
174
+ * @description
175
+ * Traverses the transaction chain and returns the changes of the item on the first transaction
176
+ *
177
+ * @param copyFields If set, will call {@link ApiFormatter.copyFields ApiFormatter.copyFields}, otherwise just returns the object
178
+ */
179
+ getItemChangesRecursively(itemEntryId: ItemEntry['id'], copyFields?: boolean): FieldMap;
180
+ /**
181
+ * @description
182
+ * Removes the {@link CollectionResource CollectionResource} from the transaction, preventing the {@link CollectionResource.options.onAdd onAdd} and {@link CollectionResource.options.onRemove onRemove} callbacks from being called.
183
+ * You should call this function when the resource is no longer needed
184
+ *
185
+ * @remark
186
+ * Does not remove cached queries
187
+ */
188
+ clearCollectionResource(resource: CollectionResource): void;
189
+ /**
190
+ * @description
191
+ * Returns whether or not the {@link TransactionCache.rootItem rootItem} is uses locks
192
+ */
193
+ isLockable(): boolean;
194
+ /**
195
+ * @description
196
+ * Disables the transaction's changes watcher, the transaction will no longer automatically detect changes on items
197
+ */
198
+ disableChangesWatcher(): void;
199
+ /**
200
+ * @description
201
+ * Enables the transaction's changes watcher, the transaction will now automatically detect changes on items
202
+ */
203
+ enableChangesWatcher(): void;
204
+ /**
205
+ * @description
206
+ * Saves the transaction, this has a different effect depending on the transaction's parent.
207
+ *
208
+ * - If the parent is another {@link TransactionCache TransactionCache} it will merge the changes of the child transaction in the the parent transaction
209
+ * - If the parent is the {@link ServerCache ServerCache} it will save the changes to the APi
210
+ */
211
+ save(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakUpByParent?: boolean, onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<void>;
212
+ detectChanges(): boolean;
213
+ /**
214
+ * @description
215
+ * Removes an {@link ItemEntry ItemEntry} through an {@link ItemResource ItemResource} from the {@link TransactionCache TransactionCache} which means that changes on this entry will no longer be tracked.
216
+ */
217
+ clearItem(itemResource: ItemResource<any>): void;
218
+ /**
219
+ * @description
220
+ * Removes an {@link ItemEntry ItemEntry} from the {@link TransactionCache TransactionCache} which means that changes on this entry will no longer be tracked.
221
+ */
222
+ clearItemEntry(itemEntry: ItemEntry<any>): void;
223
+ /**
224
+ * @description
225
+ * Adds a callback that will fire before the transaction is saved, rejecting this callback will prevent the transaction from saving
226
+ */
227
+ onBeforeSave(key: string, callback: TransactionCacheCallbackType['onBeforeSave'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
228
+ /**
229
+ * @description
230
+ * Adds a callback that will fire when the transaction is saved successfully
231
+ */
232
+ onSaveSuccess(key: string, callback: TransactionCacheCallbackType['onSaveSuccess'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
233
+ /**
234
+ * @description
235
+ * Returns a {@link ModuleChangesCompilationResult ModuleChangesCompilationResult} for the transaction
236
+ */
237
+ getModuleChanges(): ModuleChangesCompilationResult;
238
+ /**
239
+ * @description
240
+ * Updates the passed map with the new {@link ConversionMap CconversionMap} values
241
+ */
242
+ updateItemIdMap(collectionMap: {
243
+ [itemId: number]: any;
244
+ }, conversionMap: ConversionMap): void;
245
+ getAllLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
246
+ getLinkCollectionsFromDef<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], definition: LinkCollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
247
+ getLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
248
+ getCollectionFromDef<ItemTypeType extends ItemType>(definition: CollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType>>;
249
+ getCollection<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType>>;
250
+ getCollectionDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): CollectionDefinition<ItemTypeType>;
251
+ getLinkCollectionsDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, linkField: string, options: CollectionOptionsInterface<ItemTypeType>): LinkCollectionDefinition<ItemTypeType>;
252
+ /**
253
+ * @deprecated
254
+ * Use getItemById/getNewResourceWithId
255
+ *
256
+ * @remarks
257
+ * stateKey can be a keyword or a local id (in case of a refresh)
258
+ */
259
+ getItemByState<ItemTypeType extends ItemType>(itemType: ItemTypeType, stateKey: ItemId | string, options?: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
260
+ getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
261
+ getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
262
+ getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
263
+ getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
264
+ getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
265
+ getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
266
+ /**
267
+ * @description
268
+ * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
269
+ */
270
+ getItemsByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
271
+ /**
272
+ * @description
273
+ * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
274
+ */
275
+ getItemsById<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
276
+ /**
277
+ * @description
278
+ * Fetches the item with the changes of the current {@link TransactionCache transaction}
279
+ *
280
+ * @param isRoot Sets the item as the root item of the transaction, new items will be linked to this item (if there's a connection in the LinkTree)
281
+ */
282
+ getItemById<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options?: Partial<ItemEntryOptions>, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
283
+ /**
284
+ * @description
285
+ * Fetches the title of an item, does not create an {@link ItemResource ItemResource}
286
+ */
287
+ fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
288
+ /**
289
+ * @description
290
+ * Merges the passed child Transaction into this transaction and then propagates them to the other child transactions
291
+ */
292
+ applyChangesFromChild(childTransaction: TransactionCache, _breakUpByParent?: boolean, _onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<ItemIdConversionMap>;
293
+ /**
294
+ * @description
295
+ * Gets an already cached {@link ItemEntry ItemEntry} and the changes of this specific transaction for that entry
296
+ */
297
+ getLocalItemEntryChangesTuple(itemEntryId: ItemEntry['id']): {
298
+ entry: ItemEntry;
299
+ changes: TransactionItemEntryChanges;
300
+ };
301
+ /**
302
+ * @description
303
+ * Gets an ItemEntry from the cache, doesn't do a API request, used for saving
304
+ */
305
+ getLocalItemEntry(itemEntryId: ItemEntry['id']): ItemEntry | undefined;
306
+ /**
307
+ * @description
308
+ * Gets an ItemEntry from the cache by ItemId
309
+ */
310
+ getLocalItemEntryByItemId(itemType: ItemType, itemId: ItemEntry['itemId']): ItemEntry | undefined;
311
+ /**
312
+ * @description
313
+ * Returns the complete {@link InternalChangesDelta InternalChangesDelta} of the TransactionCache, this only takes into account the end result (initial is compared to changes), so changing something and reverting it
314
+ * won't be included
315
+ */
316
+ getDelta(): InternalChangesDelta;
317
+ createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, isRoot?: boolean, isNew?: boolean): ItemResource<ItemTypeType>;
318
+ createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>): Array<ItemResource<ItemTypeType>>;
319
+ processLinkedItems<ItemTypeType extends ItemType>(linkedEntries: ItemTypeMap<ItemEntry[]>): ItemResourcesItemTypeMap<ItemResource<ItemTypeType>>;
320
+ createCollectionResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>, initialEntries: Array<ItemEntry<ItemTypeType>>): CollectionResource<ItemTypeType>;
321
+ getChangesFromItemChanges<ItemTypeType extends ItemType = any>(changesObject: TransactionItemEntryChanges<ItemTypeType>): FieldMap<ItemTypeType>;
322
+ /**
323
+ * @description
324
+ * Fetches all required columns to match/fit in collections
325
+ */
326
+ private expandItemsFromDelta;
327
+ private clearGlobalError;
328
+ private clearItemError;
329
+ }
330
+ export {};