@rentman/rm-core 3.1.0 → 4.0.1

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