@rentman/rm-core 2.0.1 → 2.0.3

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.
@@ -19,7 +19,7 @@ export declare class TemplateCache {
19
19
  constructor(columnUtil: ColumnUtil, promiseService: PromiseLibraryInterface, requestBufferFactory: RequestBufferManager, columnHandler: ColumnHandler, templateFactory: TemplateFactory, errorHandler: ErrorHandlerInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory);
20
20
  /**
21
21
  * @description
22
- * Fetches a {@link Template template}
22
+ * Fetches a {@link Template template}, {@link TransactionItemHandler.createItems TransactionItemHandler.createItems} is a convenience function for this
23
23
  *
24
24
  * @param itemType The {@link ItemType ItemType} of the template item
25
25
  * @param itemId Used for caching, multiple concurrent template calls for the same itemId will return the same template
@@ -10,11 +10,13 @@ import { ApiRequestService } from '../ApiRequestService';
10
10
  import { ChangesDelta } from '../ChangesDelta';
11
11
  import { ChangesDeltaResult } from '../ChangesDeltaBase';
12
12
  import { OnAfterCreateCallback } from '../ChangesProcessor';
13
+ import { CollectionCache } from '../CollectionCache';
13
14
  import { CollectionEntryService } from '../CollectionEntryService';
14
15
  import { ColumnCache } from '../ColumnCache';
15
16
  import { ColumnHandler } from '../ColumnHandler';
16
17
  import { ColumnUtil } from '../ColumnUtil';
17
18
  import { InternalChangesDelta } from '../InternalChangesDelta';
19
+ import { ItemCache } from '../ItemCache';
18
20
  import { ItemEntryService } from '../ItemEntryService';
19
21
  import { KeyService } from '../KeyService';
20
22
  import { LockService } from '../LockService';
@@ -68,6 +70,16 @@ export declare abstract class AbstractCache {
68
70
  protected constructor(core: RmCore, columnCache: ColumnCache, requestBufferManager: RequestBufferManager, requestColumnExpansionFactory: RequestColumnExpansionFactory, queryMatcherFactory: QueryMatcherFactory, authInterface: AuthInterface, changesDeltaFactory: ChangesDeltaFactory, lockService: LockService, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceFactory: ItemResourceFactory, templateCache: TemplateCache, itemCacheFactory: ItemCacheFactory, collectionCacheFactory: CollectionCacheFactory, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface, apiRequestService: ApiRequestService, columnExpansionFactory: ColumnExpansionFactory, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, columnSubsetCacheFactory: ColumnSubsetCacheFactory, columnUtil: ColumnUtil, itemEntryFactory: ItemEntryFactory, itemEntryService: ItemEntryService, keyService: KeyService, collectionEntryFactory: CollectionEntryFactory, collectionEntryService: CollectionEntryService, collectionMatcherFactory: CollectionMatcherFactory, queryParserFactory: QueryParserFactory, queryService: QueryService, apiFormatter: ApiFormatter, linkTreeService: LinkTreeServiceInterface);
69
71
  createChild(id?: string): TransactionCache;
70
72
  onChildDestroy(cache: TransactionCache): void;
73
+ /**
74
+ * @description
75
+ * Returns the {@link TransactionCollectionHandler.entries CollectionCache} of the transaction
76
+ */
77
+ getCurrentCollectionEntryCache(): CollectionCache;
78
+ /**
79
+ * @description
80
+ * Returns the {@link TransactionItemHandler.entries ItemCache} of the transaction
81
+ */
82
+ getCurrentItemEntryCache(): ItemCache;
71
83
  abstract getServerCache(): ServerCache;
72
84
  abstract getLocalItemEntry(itemEntryId: ItemEntry['id']): ItemEntry | undefined;
73
85
  abstract getLocalItemEntryByItemId(itemType: ItemType, itemId: ItemEntry['itemId']): ItemEntry | undefined;
@@ -10,7 +10,7 @@ import { ChangesDeltaResult } from '../../ChangesDeltaBase';
10
10
  import { CollectionEntryService } from '../../CollectionEntryService';
11
11
  import { ColumnHandler } from '../../ColumnHandler';
12
12
  import { ColumnUtil } from '../../ColumnUtil';
13
- import { ApiFormatter, ApiRequestService, CollectionCache, ColumnCache, ItemCache, LockService, ModuleChangesCompilationResult, OnAfterCreateCallback, RequestBufferManager, TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionCollectionHandler, TransactionItemEntryChanges, TransactionItemHandler } from '../../index';
13
+ import { ApiFormatter, ApiRequestService, ColumnCache, LockService, ModuleChangesCompilationResult, OnAfterCreateCallback, RequestBufferManager, TransactionCacheCallbackCondition, TransactionCacheCallbackType, TransactionCollectionHandler, TransactionItemEntryChanges, TransactionItemHandler } from '../../index';
14
14
  import { InternalChangesDelta } from '../../InternalChangesDelta';
15
15
  import { ItemEntryService } from '../../ItemEntryService';
16
16
  import { KeyService } from '../../KeyService';
@@ -202,16 +202,6 @@ export declare class TransactionCache extends AbstractCache {
202
202
  updateItemIdMap(collectionMap: {
203
203
  [itemId: number]: any;
204
204
  }, conversionMap: ConversionMap): void;
205
- /**
206
- * @description
207
- * Returns the {@link TransactionCollectionHandler.entries CollectionCache} of the transaction
208
- */
209
- getCurrentCollectionEntryCache(): CollectionCache;
210
- /**
211
- * @description
212
- * Returns the {@link TransactionItemHandler.entries ItemCache} of the transaction
213
- */
214
- getCurrentItemEntryCache(): ItemCache;
215
205
  cloneCollection<ItemTypeType extends ItemType>(collectionResource: CollectionResource<ItemTypeType>, options: CollectionOptionsInterface<ItemTypeType> & {
216
206
  editItems: true;
217
207
  editCollection: true;
@@ -10,28 +10,8 @@ export declare class CollectionEditResource<ItemTypeType extends ItemType = any,
10
10
  * Use {@link ChangesDelta.setItemMoved ChangesDelta.setItemMoved}
11
11
  */
12
12
  moveItems(itemEntries: Array<ItemEntry<ItemTypeType>>, destinationResource: CollectionResource<ItemTypeType>): void;
13
- /**
14
- * @deprecated
15
- * Use {@link ChangesDelta.setItemDeleted ChangesDelta.setItemDeleted}
16
- */
17
13
  removeItems(idArray: ItemId[]): void;
18
- /**
19
- * @deprecated
20
- * Use {@link ChangesDelta.setItemDeleted ChangesDelta.setItemDeleted}
21
- */
22
14
  removeItem(itemId: ItemId): void;
23
- /**
24
- * @deprecated
25
- * Use {@link ChangesDelta.setItemCreated ChangesDelta.setItemCreated}
26
- *
27
- * todo[cache] this will fetchCollectionEntry a template for you, make a convenience function ?
28
- */
29
15
  addItems(valuesArray: Array<FieldMap<ItemTypeType>>): PromiseInterface<ChangesDeltaResult>;
30
- /**
31
- * @deprecated
32
- * Use {@link ChangesDelta.setItemCreated ChangesDelta.setItemCreated}
33
- *
34
- * todo[cache] this will fetchCollectionEntry a template for you, make a convenience function ?
35
- */
36
16
  addItem(values: FieldMap<ItemTypeType>): PromiseInterface<ChangesDeltaResult>;
37
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentman/rm-core",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Rentman core functionalities",
5
5
  "main": "./dist/rm-core.js",
6
6
  "types": "./dist/src/index.d.ts",