@rentman/rm-core 12.0.1 → 12.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.
@@ -1,5 +1,5 @@
1
1
  import { ApiEnumItemType } from '@rentman/backend-types';
2
- import { AuthInterface, EntryParent, EntryParentNull, FieldMap, ItemEntry, ItemEntryOptions, ItemError, ItemOptionsInterface, LinkTreeServiceInterface } from '../internal';
2
+ import { AbstractCache, AuthInterface, EntryParent, EntryParentNull, FieldMap, ItemEntry, ItemEntryOptions, ItemError, ItemOptionsInterface, LinkTreeServiceInterface } from '../internal';
3
3
  export declare class ItemEntryService {
4
4
  private authInterface;
5
5
  private linkTreeService;
@@ -21,7 +21,7 @@ export declare class ItemEntryService {
21
21
  * Opposite of {@link ItemEntryService.getLinkFieldsByParent ItemEntryService.getLinkFieldsByParent}
22
22
  */
23
23
  getParentByFields<ItemTypeType extends ApiEnumItemType>(parentType: ApiEnumItemType, itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): EntryParent;
24
- getDisplayName<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): string | undefined;
24
+ getDisplayName<ItemEntryType extends ItemEntry>(transaction: AbstractCache, itemEntry: ItemEntryType): string | undefined;
25
25
  processOptions(options: ItemOptionsInterface): ItemEntryOptions;
26
26
  createUnfoundRemoteItemError(): ItemError;
27
27
  createUnfoundLocalItemError(itemType: ApiEnumItemType): ItemError;
@@ -1,17 +1,16 @@
1
1
  import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ApiRequestItemMap, TransactionCache } from '../internal';
2
+ import { ApiRequestItemMap, LinkTreeServiceInterface, TransactionCache } from '../internal';
3
3
  export declare type ModuleChangesCompilationResult = {
4
4
  itemType: ApiEnumItemType;
5
5
  itemId: ItemId;
6
6
  items: ApiRequestItemMap;
7
7
  };
8
8
  export declare class ModuleChangesCompilation {
9
+ private linkTreeService;
9
10
  private transaction;
10
- parentMap: any;
11
11
  destination: ApiRequestItemMap;
12
- constructor(transaction: TransactionCache);
12
+ constructor(linkTreeService: LinkTreeServiceInterface, transaction: TransactionCache);
13
13
  process(): ModuleChangesCompilationResult;
14
- private createParentMap;
15
14
  private processItems;
16
15
  private processItem;
17
16
  private getItemsByParent;
@@ -64,6 +64,13 @@ export declare abstract class AbstractCache {
64
64
  abstract getParent<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fromInitial?: boolean, providedFields?: FieldMap<ItemTypeType>): EntryParentNull;
65
65
  abstract getLocalItemEntryChangesTuple<ItemTypeType extends ApiEnumItemType>(itemEntryId: ItemEntry<ItemTypeType>['id']): ItemEntryChangesTuple<ItemTypeType>;
66
66
  abstract applyChangesDelta(changesDelta: ChangesDelta): PromiseInterface<ChangesDeltaResult>;
67
+ /**
68
+ * Differs from {@link getParent getParent} that it only does minimal field lookups (but you cannot provide it with fields) instead of doing {@link ItemHandlerBase.collectFields collectFields}
69
+ * todo: clean this up some time (merge the 2 functions)
70
+ *
71
+ * @param itemEntry
72
+ */
73
+ getParentFast(itemEntry: ItemEntry): EntryParentNull;
67
74
  protected getParentFromFields<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, fields?: FieldMap<ItemTypeType>): EntryParentNull;
68
75
  /**
69
76
  * @description
@@ -1,4 +1,6 @@
1
- import { ModuleChangesCompilation, TransactionCache } from '../internal';
1
+ import { LinkTreeServiceInterface, ModuleChangesCompilation, TransactionCache } from '../internal';
2
2
  export declare class ModuleChangesCompilationFactory {
3
+ private linkTreeService;
4
+ constructor(linkTreeService: LinkTreeServiceInterface);
3
5
  construct(transaction: TransactionCache): ModuleChangesCompilation;
4
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentman/rm-core",
3
- "version": "12.0.1",
3
+ "version": "12.0.3",
4
4
  "description": "Rentman core functionalities",
5
5
  "main": "./dist/rm-core.js",
6
6
  "types": "./dist/types/src/index.d.ts",