@rentman/rm-core 6.2.5 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/changelog.md +752 -749
  2. package/dist/rm-core.js +9787 -9794
  3. package/dist/rm-core.min.js +2 -2
  4. package/dist/types/classes/ApiFormatter.d.ts +65 -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 +61 -61
  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 +16 -16
  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 +103 -103
  47. package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +74 -74
  48. package/dist/types/classes/cache/CollectionMatcherCachedQueryProcessor.d.ts +35 -35
  49. package/dist/types/classes/cache/ItemHandlerBase.d.ts +105 -105
  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 +331 -331
  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 +34 -34
  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 +13 -13
  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 +262 -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,331 +1,331 @@
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
- get 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
- private _isValid;
95
- constructor(dependencies: AbstractCacheDependencyInterface, core: RmCore, parent: AbstractCache,
96
- /**
97
- * @description
98
- * For debugging purposes
99
- */
100
- id?: string | undefined, validatorFactory?: TransactionValidatorFactory);
101
- createChild(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
102
- destroy(): void;
103
- expandCollectionResource(collectionResource: CollectionResource, newColumns: ApiRequestColumns): PromiseInterface<void>;
104
- /**
105
- * @description
106
- * Expands the collection with the new request columns, assumes that all collections have the same itemType
107
- */
108
- expandCollectionResources<ItemTypeType extends ItemType>(itemType: ItemTypeType, collections: CollectionResourceParentIdMap<ItemTypeType>, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
109
- registerFieldChangeCallback<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, callback: FieldChangeCallback<ItemTypeType>): DeregFunction;
110
- createChangesDelta(): ChangesDelta;
111
- getFirstErrorString(): undefined | string;
112
- /**
113
- * @description
114
- * Should only be called by {@link TransactionValidator TransactionValidator}
115
- * @internal
116
- */
117
- _setGlobalError(key: string, isInvalid: boolean, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
118
- /**
119
- * @description
120
- * Should only be called by {@link TransactionValidator TransactionValidator}
121
- * @internal
122
- */
123
- _setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean, fieldErrorTranslationFn: () => string, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
124
- /**
125
- * @internal
126
- */
127
- _setIsValid(): void;
128
- /**
129
- * @description
130
- * Merges the passed changes from the parent Transaction into this Transaction's own changes and then propagates
131
- * them to all child Transactions, this assumes that an action is already handled in a parent, so it does't handle created entries
132
- * and removes entries that were in {@link TransactionItemHandler.deletedItems deletedItems} since they are already deleted
133
- *
134
- * ------------------
135
- *
136
- * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
137
- * the change has already been processed, and applyChangesDelta will process the changes once you save the transaction
138
- *
139
- * ------------------
140
- * Use {@link TransactionCache.applyChangesDelta applyChangesDelta} if you want to apply changes from outside the core
141
- *
142
- * @param internalChangesDelta Changes to be applied
143
- * @param isCalledAfterApiSave If 'isCalledAfterApiSave' is true local changes will always be overwritten (instead of only when there are no changes)
144
- */
145
- applyChangesFromParent(internalChangesDelta: InternalChangesDelta, isCalledAfterApiSave?: boolean, isCalledAfterSocketUpdate?: boolean): PromiseInterface<void>;
146
- /**
147
- * @description
148
- * Applies changes to this transaction and its children
149
- *
150
- * ------------------
151
- *
152
- * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
153
- * the change has already been processed, and applyChangesDelta will process the changes itself (result vs cause)
154
- *
155
- * ------------------
156
- *
157
- * Differs from {@link ServerCache.applyChangesDelta ServerCache.applyChangesDelta} in the handling of deleted entries and the applyChangesFromParent call
158
- */
159
- applyChangesDelta(changesDelta: ChangesDelta): PromiseInterface<ChangesDeltaResult>;
160
- getServerCache(): ServerCache;
161
- /**
162
- * @description
163
- * Gets the entry's parent from the closest transaction
164
- *
165
- * @param itemEntry The entry to get the parent from
166
- * @param fromInitial If `true` the parent values will be read from {@link TransactionItemEntryChanges.initial initial} (Useful for when you've moved an entry)
167
- * @param providedFields Use the provided fields instead of the cached fields, used by {@link CollectionResource.getParent CollectionResource.getParent}
168
- *
169
- * @remark
170
- * Use {@link CollectionResource.getParent CollectionResource.getParent} instead of {@link TransactionCache.getParent TransactionCache.getParent} if you're getting the parent in the onRemove callback
171
- */
172
- getParent<ItemTypeType extends ItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fromInitial?: boolean, providedFields?: FieldMap<ItemTypeType>): EntryParentNull;
173
- getCollectionChangesRecursively<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery): CachedQueryItem<ItemTypeType> | undefined;
174
- /**
175
- * @description
176
- * Traverses the transaction chain and returns the changes of the item on the first transaction
177
- *
178
- * @param copyFields If set, will call {@link ApiFormatter.copyFields ApiFormatter.copyFields}, otherwise just returns the object
179
- */
180
- getItemChangesRecursively(itemEntryId: ItemEntry['id'], copyFields?: boolean): FieldMap;
181
- /**
182
- * @description
183
- * 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.
184
- * You should call this function when the resource is no longer needed
185
- *
186
- * @remark
187
- * Does not remove cached queries
188
- */
189
- clearCollectionResource(resource: CollectionResource): void;
190
- /**
191
- * @description
192
- * Returns whether or not the {@link TransactionCache.rootItem rootItem} is uses locks
193
- */
194
- isLockable(): boolean;
195
- /**
196
- * @description
197
- * Disables the transaction's changes watcher, the transaction will no longer automatically detect changes on items
198
- */
199
- disableChangesWatcher(): void;
200
- /**
201
- * @description
202
- * Enables the transaction's changes watcher, the transaction will now automatically detect changes on items
203
- */
204
- enableChangesWatcher(): void;
205
- /**
206
- * @description
207
- * Saves the transaction, this has a different effect depending on the transaction's parent.
208
- *
209
- * - If the parent is another {@link TransactionCache TransactionCache} it will merge the changes of the child transaction in the the parent transaction
210
- * - If the parent is the {@link ServerCache ServerCache} it will save the changes to the APi
211
- */
212
- save(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakUpByParent?: boolean, onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<void>;
213
- detectChanges(): boolean;
214
- /**
215
- * @description
216
- * 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.
217
- */
218
- clearItem(itemResource: ItemResource<any>): void;
219
- /**
220
- * @description
221
- * Removes an {@link ItemEntry ItemEntry} from the {@link TransactionCache TransactionCache} which means that changes on this entry will no longer be tracked.
222
- */
223
- clearItemEntry(itemEntry: ItemEntry<any>): void;
224
- /**
225
- * @description
226
- * Adds a callback that will fire before the transaction is saved, rejecting this callback will prevent the transaction from saving
227
- */
228
- onBeforeSave(key: string, callback: TransactionCacheCallbackType['onBeforeSave'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
229
- /**
230
- * @description
231
- * Adds a callback that will fire when the transaction is saved successfully
232
- */
233
- onSaveSuccess(key: string, callback: TransactionCacheCallbackType['onSaveSuccess'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
234
- /**
235
- * @description
236
- * Returns a {@link ModuleChangesCompilationResult ModuleChangesCompilationResult} for the transaction
237
- */
238
- getModuleChanges(): ModuleChangesCompilationResult;
239
- /**
240
- * @description
241
- * Updates the passed map with the new {@link ConversionMap CconversionMap} values
242
- */
243
- updateItemIdMap(collectionMap: {
244
- [itemId: number]: any;
245
- }, conversionMap: ConversionMap): void;
246
- getAllLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
247
- getLinkCollectionsFromDef<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], definition: LinkCollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
248
- getLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
249
- getCollectionFromDef<ItemTypeType extends ItemType>(definition: CollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType>>;
250
- getCollection<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType>>;
251
- getCollectionDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): CollectionDefinition<ItemTypeType>;
252
- getLinkCollectionsDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, linkField: string, options: CollectionOptionsInterface<ItemTypeType>): LinkCollectionDefinition<ItemTypeType>;
253
- /**
254
- * @deprecated
255
- * Use getItemById/getNewResourceWithId
256
- *
257
- * @remarks
258
- * stateKey can be a keyword or a local id (in case of a refresh)
259
- */
260
- getItemByState<ItemTypeType extends ItemType>(itemType: ItemTypeType, stateKey: ItemId | string, options?: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
261
- getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
262
- getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
263
- getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
264
- getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
265
- getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
266
- getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
267
- /**
268
- * @description
269
- * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
270
- */
271
- getItemsByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
272
- /**
273
- * @description
274
- * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
275
- */
276
- getItemsById<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
277
- /**
278
- * @description
279
- * Fetches the item with the changes of the current {@link TransactionCache transaction}
280
- *
281
- * @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)
282
- */
283
- getItemById<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options?: Partial<ItemEntryOptions>, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
284
- /**
285
- * @description
286
- * Fetches the title of an item, does not create an {@link ItemResource ItemResource}
287
- */
288
- fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
289
- /**
290
- * @description
291
- * Merges the passed child Transaction into this transaction and then propagates them to the other child transactions
292
- */
293
- applyChangesFromChild(childTransaction: TransactionCache, _breakUpByParent?: boolean, _onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<ItemIdConversionMap>;
294
- /**
295
- * @description
296
- * Gets an already cached {@link ItemEntry ItemEntry} and the changes of this specific transaction for that entry
297
- */
298
- getLocalItemEntryChangesTuple(itemEntryId: ItemEntry['id']): {
299
- entry: ItemEntry;
300
- changes: TransactionItemEntryChanges;
301
- };
302
- /**
303
- * @description
304
- * Gets an ItemEntry from the cache, doesn't do a API request, used for saving
305
- */
306
- getLocalItemEntry(itemEntryId: ItemEntry['id']): ItemEntry | undefined;
307
- /**
308
- * @description
309
- * Gets an ItemEntry from the cache by ItemId
310
- */
311
- getLocalItemEntryByItemId(itemType: ItemType, itemId: ItemEntry['itemId']): ItemEntry | undefined;
312
- /**
313
- * @description
314
- * 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
315
- * won't be included
316
- */
317
- getDelta(): InternalChangesDelta;
318
- createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, isRoot?: boolean, isNew?: boolean): ItemResource<ItemTypeType>;
319
- createItemResources<ItemTypeType extends ItemType>(itemEntries: Array<ItemEntry<ItemTypeType>>): Array<ItemResource<ItemTypeType>>;
320
- processLinkedItems<ItemTypeType extends ItemType>(linkedEntries: ItemTypeMap<ItemEntry[]>): ItemResourcesItemTypeMap<ItemResource<ItemTypeType>>;
321
- createCollectionResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>, initialEntries: Array<ItemEntry<ItemTypeType>>): CollectionResource<ItemTypeType>;
322
- getChangesFromItemChanges<ItemTypeType extends ItemType = any>(changesObject: TransactionItemEntryChanges<ItemTypeType>): FieldMap<ItemTypeType>;
323
- /**
324
- * @description
325
- * Fetches all required columns to match/fit in collections
326
- */
327
- private expandItemsFromDelta;
328
- private clearGlobalError;
329
- clearItemError(itemEntryId?: ItemEntry['id'], columnId?: string, errorKey?: string): void;
330
- }
331
- 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, ColumnIdTypeMap, 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
+ get 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
+ private _isValid;
95
+ constructor(dependencies: AbstractCacheDependencyInterface, core: RmCore, parent: AbstractCache,
96
+ /**
97
+ * @description
98
+ * For debugging purposes
99
+ */
100
+ id?: string | undefined, validatorFactory?: TransactionValidatorFactory);
101
+ createChild(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
102
+ destroy(): void;
103
+ expandCollectionResource(collectionResource: CollectionResource, newColumns: ApiRequestColumns): PromiseInterface<void>;
104
+ /**
105
+ * @description
106
+ * Expands the collection with the new request columns, assumes that all collections have the same itemType
107
+ */
108
+ expandCollectionResources<ItemTypeType extends ItemType>(itemType: ItemTypeType, collections: CollectionResourceParentIdMap<ItemTypeType>, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
109
+ registerFieldChangeCallback<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, callback: FieldChangeCallback<ItemTypeType>): DeregFunction;
110
+ createChangesDelta(): ChangesDelta;
111
+ getFirstErrorString(): undefined | string;
112
+ /**
113
+ * @description
114
+ * Should only be called by {@link TransactionValidator TransactionValidator}
115
+ * @internal
116
+ */
117
+ _setGlobalError(key: string, isInvalid: boolean, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
118
+ /**
119
+ * @description
120
+ * Should only be called by {@link TransactionValidator TransactionValidator}
121
+ * @internal
122
+ */
123
+ _setItemError(itemEntryId: ItemEntry['id'], columnId: string, errorKey: string, isInvalid: boolean, fieldErrorTranslationFn: () => string, saveButtonErrorTranslationFn: () => string, level: TransactionErrorLevel): void;
124
+ /**
125
+ * @internal
126
+ */
127
+ _setIsValid(): void;
128
+ /**
129
+ * @description
130
+ * Merges the passed changes from the parent Transaction into this Transaction's own changes and then propagates
131
+ * them to all child Transactions, this assumes that an action is already handled in a parent, so it does't handle created entries
132
+ * and removes entries that were in {@link TransactionItemHandler.deletedItems deletedItems} since they are already deleted
133
+ *
134
+ * ------------------
135
+ *
136
+ * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
137
+ * the change has already been processed, and applyChangesDelta will process the changes once you save the transaction
138
+ *
139
+ * ------------------
140
+ * Use {@link TransactionCache.applyChangesDelta applyChangesDelta} if you want to apply changes from outside the core
141
+ *
142
+ * @param internalChangesDelta Changes to be applied
143
+ * @param isCalledAfterApiSave If 'isCalledAfterApiSave' is true local changes will always be overwritten (instead of only when there are no changes)
144
+ */
145
+ applyChangesFromParent(internalChangesDelta: InternalChangesDelta, isCalledAfterApiSave?: boolean, isCalledAfterSocketUpdate?: boolean): PromiseInterface<void>;
146
+ /**
147
+ * @description
148
+ * Applies changes to this transaction and its children
149
+ *
150
+ * ------------------
151
+ *
152
+ * The difference between {@link TransactionCache.applyChangesFromParent} and {@link TransactionCache.applyChangesDelta} is that applyChangesFromParent assumes
153
+ * the change has already been processed, and applyChangesDelta will process the changes itself (result vs cause)
154
+ *
155
+ * ------------------
156
+ *
157
+ * Differs from {@link ServerCache.applyChangesDelta ServerCache.applyChangesDelta} in the handling of deleted entries and the applyChangesFromParent call
158
+ */
159
+ applyChangesDelta(changesDelta: ChangesDelta): PromiseInterface<ChangesDeltaResult>;
160
+ getServerCache(): ServerCache;
161
+ /**
162
+ * @description
163
+ * Gets the entry's parent from the closest transaction
164
+ *
165
+ * @param itemEntry The entry to get the parent from
166
+ * @param fromInitial If `true` the parent values will be read from {@link TransactionItemEntryChanges.initial initial} (Useful for when you've moved an entry)
167
+ * @param providedFields Use the provided fields instead of the cached fields, used by {@link CollectionResource.getParent CollectionResource.getParent}
168
+ *
169
+ * @remark
170
+ * Use {@link CollectionResource.getParent CollectionResource.getParent} instead of {@link TransactionCache.getParent TransactionCache.getParent} if you're getting the parent in the onRemove callback
171
+ */
172
+ getParent<ItemTypeType extends ItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fromInitial?: boolean, providedFields?: FieldMap<ItemTypeType>): EntryParentNull;
173
+ getCollectionChangesRecursively<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery): CachedQueryItem<ItemTypeType> | undefined;
174
+ /**
175
+ * @description
176
+ * Traverses the transaction chain and returns the changes of the item on the first transaction
177
+ *
178
+ * @param copyFields If set, will call {@link ApiFormatter.copyFields ApiFormatter.copyFields}, otherwise just returns the object
179
+ */
180
+ getItemChangesRecursively(itemEntryId: ItemEntry['id'], copyFields?: boolean): FieldMap;
181
+ /**
182
+ * @description
183
+ * 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.
184
+ * You should call this function when the resource is no longer needed
185
+ *
186
+ * @remark
187
+ * Does not remove cached queries
188
+ */
189
+ clearCollectionResource(resource: CollectionResource): void;
190
+ /**
191
+ * @description
192
+ * Returns whether or not the {@link TransactionCache.rootItem rootItem} is uses locks
193
+ */
194
+ isLockable(): boolean;
195
+ /**
196
+ * @description
197
+ * Disables the transaction's changes watcher, the transaction will no longer automatically detect changes on items
198
+ */
199
+ disableChangesWatcher(): void;
200
+ /**
201
+ * @description
202
+ * Enables the transaction's changes watcher, the transaction will now automatically detect changes on items
203
+ */
204
+ enableChangesWatcher(): void;
205
+ /**
206
+ * @description
207
+ * Saves the transaction, this has a different effect depending on the transaction's parent.
208
+ *
209
+ * - If the parent is another {@link TransactionCache TransactionCache} it will merge the changes of the child transaction in the the parent transaction
210
+ * - If the parent is the {@link ServerCache ServerCache} it will save the changes to the APi
211
+ */
212
+ save(closeTab?: boolean, parameters?: CreateRequestParameterMap, breakUpByParent?: boolean, onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<void>;
213
+ detectChanges(): boolean;
214
+ /**
215
+ * @description
216
+ * 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.
217
+ */
218
+ clearItem(itemResource: ItemResource<any>): void;
219
+ /**
220
+ * @description
221
+ * Removes an {@link ItemEntry ItemEntry} from the {@link TransactionCache TransactionCache} which means that changes on this entry will no longer be tracked.
222
+ */
223
+ clearItemEntry(itemEntry: ItemEntry<any>): void;
224
+ /**
225
+ * @description
226
+ * Adds a callback that will fire before the transaction is saved, rejecting this callback will prevent the transaction from saving
227
+ */
228
+ onBeforeSave(key: string, callback: TransactionCacheCallbackType['onBeforeSave'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
229
+ /**
230
+ * @description
231
+ * Adds a callback that will fire when the transaction is saved successfully
232
+ */
233
+ onSaveSuccess(key: string, callback: TransactionCacheCallbackType['onSaveSuccess'], condition?: TransactionCacheCallbackCondition, priority?: number): () => void;
234
+ /**
235
+ * @description
236
+ * Returns a {@link ModuleChangesCompilationResult ModuleChangesCompilationResult} for the transaction
237
+ */
238
+ getModuleChanges(): ModuleChangesCompilationResult;
239
+ /**
240
+ * @description
241
+ * Updates the passed map with the new {@link ConversionMap CconversionMap} values
242
+ */
243
+ updateItemIdMap(collectionMap: {
244
+ [itemId: number]: any;
245
+ }, conversionMap: ConversionMap): void;
246
+ getAllLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
247
+ getLinkCollectionsFromDef<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], definition: LinkCollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
248
+ getLinkCollections<ItemTypeType extends ItemType>(linkType: ItemType, linkIdArray: ItemId[], itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResourceParentIdMap<ItemTypeType>>;
249
+ getCollectionFromDef<ItemTypeType extends ItemType>(definition: CollectionDefinition<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType>>;
250
+ getCollection<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType> = FieldMap<ItemTypeType>>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): PromiseInterface<CollectionResource<ItemTypeType, Fields>>;
251
+ getCollectionDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>): CollectionDefinition<ItemTypeType>;
252
+ getLinkCollectionsDef<ItemTypeType extends ItemType>(itemType: ItemTypeType, linkField: string, options: CollectionOptionsInterface<ItemTypeType>): LinkCollectionDefinition<ItemTypeType>;
253
+ /**
254
+ * @deprecated
255
+ * Use getItemById/getNewResourceWithId
256
+ *
257
+ * @remarks
258
+ * stateKey can be a keyword or a local id (in case of a refresh)
259
+ */
260
+ getItemByState<ItemTypeType extends ItemType>(itemType: ItemTypeType, stateKey: ItemId | string, options?: ItemOptionsInterface, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
261
+ getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
262
+ getDuplicateById<ItemTypeType extends ItemType>(itemType: ItemTypeType, duplicateId: ItemId, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
263
+ getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
264
+ getNewResourceWithId<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: ItemId, options: Partial<ItemEntryOptions>, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
265
+ getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks: true, isRoot?: boolean): PromiseInterface<ItemResourceLinks<ItemTypeType>>;
266
+ getNewResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: ItemOptionsInterface, returnLinks?: boolean, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType>>;
267
+ /**
268
+ * @description
269
+ * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
270
+ */
271
+ getItemsByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
272
+ /**
273
+ * @description
274
+ * Fetches multiple items with their respective changes of the current {@link TransactionCache transaction}
275
+ */
276
+ getItemsById<ItemTypeType extends ItemType>(itemType: ItemTypeType, itemIds: ItemId[], options?: Partial<ItemEntryOptions>): PromiseInterface<Array<ItemResource<ItemTypeType>>>;
277
+ /**
278
+ * @description
279
+ * Fetches the item with the changes of the current {@link TransactionCache transaction}
280
+ *
281
+ * @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)
282
+ */
283
+ getItemById<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType> = FieldMap<ItemTypeType>>(itemType: ItemTypeType, itemId: ItemId, options?: Partial<ItemEntryOptions>, isRoot?: boolean): PromiseInterface<ItemResource<ItemTypeType, Fields>>;
284
+ /**
285
+ * @description
286
+ * Fetches the title of an item, does not create an {@link ItemResource ItemResource}
287
+ */
288
+ fetchTitle(itemType: ItemType, itemId: ItemId): PromiseInterface<string>;
289
+ /**
290
+ * @description
291
+ * Merges the passed child Transaction into this transaction and then propagates them to the other child transactions
292
+ */
293
+ applyChangesFromChild(childTransaction: TransactionCache, _breakUpByParent?: boolean, _onAfterCreateCallback?: OnAfterCreateCallback): PromiseInterface<ItemIdConversionMap>;
294
+ /**
295
+ * @description
296
+ * Gets an already cached {@link ItemEntry ItemEntry} and the changes of this specific transaction for that entry
297
+ */
298
+ getLocalItemEntryChangesTuple(itemEntryId: ItemEntry['id']): {
299
+ entry: ItemEntry;
300
+ changes: TransactionItemEntryChanges;
301
+ };
302
+ /**
303
+ * @description
304
+ * Gets an ItemEntry from the cache, doesn't do a API request, used for saving
305
+ */
306
+ getLocalItemEntry(itemEntryId: ItemEntry['id']): ItemEntry | undefined;
307
+ /**
308
+ * @description
309
+ * Gets an ItemEntry from the cache by ItemId
310
+ */
311
+ getLocalItemEntryByItemId(itemType: ItemType, itemId: ItemEntry['itemId']): ItemEntry | undefined;
312
+ /**
313
+ * @description
314
+ * 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
315
+ * won't be included
316
+ */
317
+ getDelta(): InternalChangesDelta;
318
+ createItemResource<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, isRoot?: boolean, isNew?: boolean): ItemResource<ItemTypeType>;
319
+ createItemResources<ItemTypeType extends ItemType, Fields extends ColumnIdTypeMap = any>(itemEntries: Array<ItemEntry<ItemTypeType>>): Array<ItemResource<ItemTypeType, Fields>>;
320
+ processLinkedItems<ItemTypeType extends ItemType>(linkedEntries: ItemTypeMap<ItemEntry[]>): ItemResourcesItemTypeMap<ItemResource<ItemTypeType>>;
321
+ createCollectionResource<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptionsInterface<ItemTypeType>, initialEntries: Array<ItemEntry<ItemTypeType>>): CollectionResource<ItemTypeType>;
322
+ getChangesFromItemChanges<ItemTypeType extends ItemType = any>(changesObject: TransactionItemEntryChanges<ItemTypeType>): FieldMap<ItemTypeType>;
323
+ /**
324
+ * @description
325
+ * Fetches all required columns to match/fit in collections
326
+ */
327
+ private expandItemsFromDelta;
328
+ private clearGlobalError;
329
+ clearItemError(itemEntryId?: ItemEntry['id'], columnId?: string, errorKey?: string): void;
330
+ }
331
+ export {};