@rentman/rm-core 1.1.13 → 1.1.15-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.
package/changelog.md CHANGED
@@ -1,204 +1,212 @@
1
- #Changelog
2
- Contains new features, breaking changes and their reasoning
3
-
4
- ##v1.13
5
- - Add option to exclude itemTypes during createLocalEntries.
6
-
7
- ##v1.12
8
- - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
9
- `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
10
- from the local cache inadvertently.
11
- - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
12
- - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
13
- are now respected. This fixes an issue where items where *not* removed from the local cache.
14
- - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
15
- issue where changes were being detected continuously.
16
- - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
17
- except when updating documents. This fixes several issues.
18
- - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
19
- collection was added multiple times.
20
- - Updated all models to use dependency objects. This increases ease of debugging.
21
-
22
- ##v.1.11
23
- - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
24
- - **Breaking:** Removed `ItemResourceService.isNewResource`.
25
- - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
26
- - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
27
- completed transactions.
28
-
29
- ##v.1.10
30
- - Fixed issue where changes on different subtabs were not detected.
31
-
32
- ##v1.1.9
33
- - Exposed `noop` function on `RmCore` class.
34
- > This is used in order to check whether a callback has a default value.
35
- - Added `copyRequestColumns` function to `ColumnUtil` class.
36
- - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
37
- - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
38
- `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
39
- `breakUpByParent` - `onAfterCreateCallback`.
40
-
41
- ##v1.1.8
42
- - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
43
-
44
- ##v1.1.7
45
- - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
46
-
47
- ##v1.1.6
48
- - Fixed issue with deferred item entries.
49
- - Re-enable changes watcher after save.
50
- - Added optional `id` parameter to `LocalCache` constructor.
51
-
52
- ##v1.1.5
53
- - Added `clearItem` function to `LocalCache` class.
54
-
55
- ##v.1.1.4
56
- - Fix issue where items where not added to the local cache automatically when they where added to a collection.
57
- > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
58
- the items to the local cache.
59
- > In other instances this might be debatable because it doesn't do any real harm. *Not*
60
- doing it however can definitely be harmful.
61
-
62
- ##v.1.1.3
63
- - Fixed an issue where all collections in a local cache would be cleared.
64
- - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
65
- `LocalCacheManagerInterface`.
66
-
67
- ##v1.1.2
68
- - Fixed an issue concerning derived values.
69
-
70
- ## v1.1.1
71
- - Fixed an issue where changes wouldn't be detected.
72
- - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
73
- call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
74
- - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
75
- `disableChangesWatcher` instead.
76
-
77
- ## v1.1.0
78
- ### Development
79
-
80
- #### Strict TypeScript compilation
81
- Added the following TypeScript compiler options:
82
- - noImplicitThis
83
- - noImplicitReturns
84
- - strictNullChecks
85
- - noUnusedLocals
86
- - noUnusedParameters
87
-
88
- I would advise enabling these for all TypeScript projects from now on.
89
-
90
- #### Ordered imports and dependencies
91
- Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
92
- Please note that this also applies for imports from the folder the file is currently in.
93
- For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
94
- `import { ItemEntry } from '../models';`
95
-
96
- Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
97
- remove dependencies in the future.
98
-
99
- ### Breaking changes
100
-
101
- - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
102
- `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
103
- `moduleChangesCompilationFactory`.
104
- - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
105
- no longer supported in the back-end.
106
-
107
- #### Item and collection entries
108
- - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
109
- - Added the following functions to `ItemEntryService`:
110
- - `createLocalConversionMap`;
111
- - `expandLocalConversionMap`;
112
- - `expandConversionMap`;
113
- - `batchExpandConversionMap`;
114
- - `batchClone`.
115
- - Cloning of item entries now works slightly differently. The function will attempt to generate a new
116
- item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
117
-
118
- #### Rework item caching
119
- Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
120
- All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
121
- using the item administrator or when resources are created when adding the items to a collection.
122
-
123
- > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
124
- > allow for the creation item and collection entries without caching them directly. This is required for the copying and
125
- > pasting of items.
126
-
127
- Other changes:
128
-
129
- - Moved `saveLocal` to `ItemAdministrator`;
130
- - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
131
- - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
132
- called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
133
- already on the backend. (Use `getCollectionMatcher`.)
134
-
135
-
136
- ##v1.0.33
137
- - Really fix types path
138
-
139
- ##v1.0.33
140
- - Fix types path
141
-
142
- ##v1.0.32
143
- - Update `tsconfig.json` to put definitions in the root folder
144
- > The app had an issue with AOT compilation because of this
145
-
146
- ##v1.0.31
147
- - Fix `columnHandler.fetchItemTypeTranslations`
148
- > It incorrectly looped over the response map, it should now work again
149
-
150
- ##v1.0.30
151
- - Remove `updateTabParams` from LocalCacheManagerInterface
152
- > The function wasn't used
153
-
154
- - Reworked class export
155
- > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
156
-
157
- ##v1.0.29
158
- - Fix inverted inArray check in CollectionEntry.removeItems
159
- > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
160
-
161
- ##v1.0.28
162
- Bug fixes only
163
-
164
- ##v1.0.27
165
- - `ItemEntry.initial` is now undefined by default
166
- > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
167
-
168
- ##v1.0.26
169
- Bundle both minified and unminified code, include sourcemaps from dev build
170
-
171
- ##v1.0.24, v1.0.25
172
- ! Use version `v1.0.26` !
173
-
174
- - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
175
- > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
176
-
177
- - Rename `ItemEntry.entryId` to `ItemEntry.id
178
- > It used to be called `id`, but it was changed in the seperation of the core.
179
- > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
180
-
181
- - Rename ItemResource `startTransaction` to `start`
182
- > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
183
-
184
- - `SocketMessageHandler.onMessageReceived` now returns a promise
185
- > You can now use the updated items or hook into the result to update the ui for example
186
-
187
-
188
- ##v1.0.23
189
- - Rename ResourceCache to LocalCache
190
- > LocalCache only caches local items (name better reflects functionality)
191
-
192
- - Remove getter/setter for hasChanges
193
- > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
194
-
195
- - Remove `_getCollection` from ItemAdministrator
196
- > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
197
- > options and should not be given as a separate argument. This was included to support the frontend
198
-
199
- - Remove `saveCurrentTab` from ItemAdministrator
200
- > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
201
-
202
- - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
203
- > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
204
-
1
+ #Changelog
2
+ Contains new features, breaking changes and their reasoning
3
+
4
+ ##v1.15
5
+ - Fix `fetchItemTypesTranslations` function in `ColumnHandler` class.
6
+ - Fix type definition of `PromiseInterface.all`.
7
+
8
+ ##v1.14
9
+ - The `ChangesCompiler` now always processes local collections. (Even if they don't have edit resources.) This fixes an
10
+ issue with recurring appointments in the front-end.
11
+
12
+ ##v1.13
13
+ - Add option to exclude itemTypes during createLocalEntries.
14
+
15
+ ##v1.12
16
+ - **Breaking:** `ItemResource.isNew` returns true *only* if the resource was created using
17
+ `ItemAdministrator.getNewResource` or `ItemAdministrator.getItemByDef`. This fixes an issue where items where removed
18
+ from the local cache inadvertently.
19
+ - The `start`, `commit` and `rollback` functions of `EditResource` now return the resource itself to facilitate chaining.
20
+ - When calling `CollectionEntry.revertChanges`, callbacks like `onAdd` / `onRemove` and `onActivate` / `onDeactivate`
21
+ are now respected. This fixes an issue where items where *not* removed from the local cache.
22
+ - When removing *local* items from collections, they are removed from `initial` as well as `modified`. This fixes an
23
+ issue where changes were being detected continuously.
24
+ - Updated the order of requests in `changesProcessor`. The `update` request is now executed before the `delete` request,
25
+ except when updating documents. This fixes several issues.
26
+ - `CollectionCache` now uses a map instead of an array to store collections. This fixes an issue where the same
27
+ collection was added multiple times.
28
+ - Updated all models to use dependency objects. This increases ease of debugging.
29
+
30
+ ##v.1.11
31
+ - Fixed issue that occurs when saving when having an existing item refer to a newly created item.
32
+ - **Breaking:** Removed `ItemResourceService.isNewResource`.
33
+ - **Breaking:** Renamed `ItemResource.isNewResource` to `ItemResource.isNew`. Removed parameter.
34
+ - `ItemResource.isNew` is equivalent to `ItemResource.isLocal`, while `EditResource.isNew` checks also checks for
35
+ completed transactions.
36
+
37
+ ##v.1.10
38
+ - Fixed issue where changes on different subtabs were not detected.
39
+
40
+ ##v1.1.9
41
+ - Exposed `noop` function on `RmCore` class.
42
+ > This is used in order to check whether a callback has a default value.
43
+ - Added `copyRequestColumns` function to `ColumnUtil` class.
44
+ - Made parameters of `ItemAdministrator.saveCurrentLocalCache` and `LocalCache.save` optional.
45
+ - **Breaking:** Reordered parameters of `ChangesProcessor.execute` to be consistent with
46
+ `ItemAdministrator.saveCurrentLocalCache`. The new order is `singleItems` - `collections` - `parameters` -
47
+ `breakUpByParent` - `onAfterCreateCallback`.
48
+
49
+ ##v1.1.8
50
+ - Set default value for `params` to `{filter: false}` in `request` function in `ColumnHandler` class.
51
+
52
+ ##v1.1.7
53
+ - Fixed issue where cached item entries or collection entries wouldn't be added to the local cache.
54
+
55
+ ##v1.1.6
56
+ - Fixed issue with deferred item entries.
57
+ - Re-enable changes watcher after save.
58
+ - Added optional `id` parameter to `LocalCache` constructor.
59
+
60
+ ##v1.1.5
61
+ - Added `clearItem` function to `LocalCache` class.
62
+
63
+ ##v.1.1.4
64
+ - Fix issue where items where not added to the local cache automatically when they where added to a collection.
65
+ > This depends on the `callOnActivate` parameter. I've added this mainly because extending collections should *not* add
66
+ the items to the local cache.
67
+ > In other instances this might be debatable because it doesn't do any real harm. *Not*
68
+ doing it however can definitely be harmful.
69
+
70
+ ##v.1.1.3
71
+ - Fixed an issue where all collections in a local cache would be cleared.
72
+ - **Breaking:** Renamed `getCacheManager` to `getCurrentLocalCache` and `setCacheManager` to `setCurrentLocalCache` in
73
+ `LocalCacheManagerInterface`.
74
+
75
+ ##v1.1.2
76
+ - Fixed an issue concerning derived values.
77
+
78
+ ## v1.1.1
79
+ - Fixed an issue where changes wouldn't be detected.
80
+ - **Breaking:** Removed the `_hasChanges` function in the `localCache` class. If you want to force changes detection,
81
+ call `detectChanges` instead. Otherwise, rely on the `hasChanges` variable.
82
+ - **Breaking:** Removed the `enableWatcher` and `disableWatcher` functions. Use `enableChangesWatcher` and
83
+ `disableChangesWatcher` instead.
84
+
85
+ ## v1.1.0
86
+ ### Development
87
+
88
+ #### Strict TypeScript compilation
89
+ Added the following TypeScript compiler options:
90
+ - noImplicitThis
91
+ - noImplicitReturns
92
+ - strictNullChecks
93
+ - noUnusedLocals
94
+ - noUnusedParameters
95
+
96
+ I would advise enabling these for all TypeScript projects from now on.
97
+
98
+ #### Ordered imports and dependencies
99
+ Imports are now ordered alphabetically and grouped by folder. Added a TSLint option to enforce this.
100
+ Please note that this also applies for imports from the folder the file is currently in.
101
+ For example, in `models/ItemResource.ts`, `itemEntry` should be imported like so:
102
+ `import { ItemEntry } from '../models';`
103
+
104
+ Also, factory and class dependencies should be ordered alphabetically as well. This will make it easier to add and
105
+ remove dependencies in the future.
106
+
107
+ ### Breaking changes
108
+
109
+ - Renamed `changesCompiler` to `changesCompilation`, `changesCompilerFactory` to `changesCompilationFactory`,
110
+ `moduleChangesCompiler` to `moduleChangesCompilation` and `moduleChangesCompilerFactory` to
111
+ `moduleChangesCompilationFactory`.
112
+ - Removed the `allLinks` parameter from the `query` function definition in the `ApiRequestServiceInterface`. This is
113
+ no longer supported in the back-end.
114
+
115
+ #### Item and collection entries
116
+ - Moved *all* functions that handle item entries from the `ItemEntryService` to the `ItemEntry` class.
117
+ - Added the following functions to `ItemEntryService`:
118
+ - `createLocalConversionMap`;
119
+ - `expandLocalConversionMap`;
120
+ - `expandConversionMap`;
121
+ - `batchExpandConversionMap`;
122
+ - `batchClone`.
123
+ - Cloning of item entries now works slightly differently. The function will attempt to generate a new
124
+ item ID, and update the conversion map accordingly, but will respect the item ID that is already there.
125
+
126
+ #### Rework item caching
127
+ Newly created item entries and collection entries are no longer added to the global *or* local cache by default.
128
+ All entries are added to the global cache on save. Item entries are added to the local cache when resources are created
129
+ using the item administrator or when resources are created when adding the items to a collection.
130
+
131
+ > This will increase reliability by ensuring the global cache is no longer 'polluted' with local items. Also, this will
132
+ > allow for the creation item and collection entries without caching them directly. This is required for the copying and
133
+ > pasting of items.
134
+
135
+ Other changes:
136
+
137
+ - Moved `saveLocal` to `ItemAdministrator`;
138
+ - `ItemAdministrator.fetchTitle` should now be called instead of `ItemHandler.fetchTitle`;
139
+ - The `ItemAdministrator` collection matching functions (`addToCollections`, `removeFromCollections`) should now be
140
+ called instead of those in the `CollectionHandler`. The `CollectionHandler` should only be used to reflect changes
141
+ already on the backend. (Use `getCollectionMatcher`.)
142
+
143
+
144
+ ##v1.0.33
145
+ - Really fix types path
146
+
147
+ ##v1.0.33
148
+ - Fix types path
149
+
150
+ ##v1.0.32
151
+ - Update `tsconfig.json` to put definitions in the root folder
152
+ > The app had an issue with AOT compilation because of this
153
+
154
+ ##v1.0.31
155
+ - Fix `columnHandler.fetchItemTypeTranslations`
156
+ > It incorrectly looped over the response map, it should now work again
157
+
158
+ ##v1.0.30
159
+ - Remove `updateTabParams` from LocalCacheManagerInterface
160
+ > The function wasn't used
161
+
162
+ - Reworked class export
163
+ > Imports are now done from @rentman/rm-core, old imports are broken. This is because the old export structure didn't always work
164
+
165
+ ##v1.0.29
166
+ - Fix inverted inArray check in CollectionEntry.removeItems
167
+ > A delete message from the socket deleted all BUT the deleted items, this should now be fixed
168
+
169
+ ##v1.0.28
170
+ Bug fixes only
171
+
172
+ ##v1.0.27
173
+ - `ItemEntry.initial` is now undefined by default
174
+ > In the SocketMessageHandler we use this check to see if an ItemEntry is a stub
175
+
176
+ ##v1.0.26
177
+ Bundle both minified and unminified code, include sourcemaps from dev build
178
+
179
+ ##v1.0.24, v1.0.25
180
+ ! Use version `v1.0.26` !
181
+
182
+ - The core now expects a `promiseInterface` that should implement the provided `promiseInterface`
183
+ > We need to be able to hook into the promises in order to call a digest cycle to update the ui in the frontend
184
+
185
+ - Rename `ItemEntry.entryId` to `ItemEntry.id
186
+ > It used to be called `id`, but it was changed in the seperation of the core.
187
+ > You can use the `id` to uniquely identify an entry, since itemId can be updated (local to saved id)
188
+
189
+ - Rename ItemResource `startTransaction` to `start`
190
+ > Other functions are called `commit` and `rollback` so having 'transaction' only for start doesn't make much sense
191
+
192
+ - `SocketMessageHandler.onMessageReceived` now returns a promise
193
+ > You can now use the updated items or hook into the result to update the ui for example
194
+
195
+
196
+ ##v1.0.23
197
+ - Rename ResourceCache to LocalCache
198
+ > LocalCache only caches local items (name better reflects functionality)
199
+
200
+ - Remove getter/setter for hasChanges
201
+ > hasChanges is called in a digest loop in the frontend, so for performance reasons we don't want to recompute the value every time
202
+
203
+ - Remove `_getCollection` from ItemAdministrator
204
+ > `_getCollection` is now named `getCollection` and the old `getCollection` is removed. The query is part of the
205
+ > options and should not be given as a separate argument. This was included to support the frontend
206
+
207
+ - Remove `saveCurrentTab` from ItemAdministrator
208
+ > `saveCurrentTab` makes no sense because the core has no concept of tabs, you should use `saveCurrentLocalCache` instead
209
+
210
+ - Remove `getTabEntry` and `resetTabEntry` from ItemAdministrator
211
+ > `getTabEntry` and `resetTabEntry` make no sense because the core has no concept of tabs, you should use `getLocalCache` and `resetLocalCache` instead
212
+
@@ -27,7 +27,7 @@ export declare class ApiFormatter {
27
27
  formatRequestDate(value: any): any;
28
28
  formatRequestDuration(value: any): any;
29
29
  formatRequestColor(value: any): any;
30
- getDefaultValue(columnType: any): false | "" | 0 | moment.Moment | moment.Duration | "0" | "#000000" | null;
30
+ getDefaultValue(columnType: any): false | 0 | "" | moment.Moment | moment.Duration | "0" | "#000000" | null;
31
31
  isDefaultValue(columnType: any, value: any): any;
32
32
  clone(columnType: any, value: any): any;
33
33
  getCloneFunction(columnType: any): (date: any) => any;
@@ -1,17 +1,20 @@
1
- import { ColumnUtil } from './ColumnUtil';
1
+ import { ColumnUtil } from '../classes';
2
+ import { ItemType, RequestColumns, ResponseColumn, ResponseColumnMap } from '../types';
2
3
  export declare class ColumnCache {
3
4
  private columnUtil;
4
- cache: {};
5
- allColumns: {};
5
+ cache: ResponseColumnMap;
6
+ allColumns: {
7
+ [itemType: string]: boolean;
8
+ };
6
9
  constructor(columnUtil: ColumnUtil);
7
- setColumn(itemType: any, responseColumn: any): any;
8
- setColumns(itemType: any, requestColumns: any, responseColumns: any): {};
9
- retrieve(itemType: any, requestColumns: any): {
10
- missing: any[] | true;
11
- cached: object;
10
+ setColumn(itemType: ItemType, responseColumn: ResponseColumn): any;
11
+ setColumns(itemType: ItemType, requestColumns: RequestColumns, responseColumns: ResponseColumnMap): ResponseColumnMap;
12
+ retrieve(itemType: ItemType, requestColumns: RequestColumns): {
13
+ cached: ResponseColumnMap;
14
+ missing: RequestColumns;
12
15
  };
13
- containsAll(itemType: any): boolean;
14
- getColumns(itemType: any): {};
16
+ containsAll(itemType: ItemType): boolean;
17
+ getColumns(itemType: ItemType): ResponseColumnMap;
15
18
  private retrieveColumns(itemType, requestColumns, requestAccumulator, responseAccumulator);
16
19
  private retrieveColumn(itemType, requestColumn, requestAccumulator, responseAccumulator);
17
20
  private getColumn(itemType, columnId);
@@ -1,5 +1,6 @@
1
1
  import { ColumnCache, ColumnUtil } from '../classes';
2
2
  import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
3
+ import { ItemType, RequestColumns, ResponseColumn, ResponseColumnMap } from '../types';
3
4
  export declare class ColumnHandler {
4
5
  private apiRequestService;
5
6
  private errorHandler;
@@ -7,12 +8,14 @@ export declare class ColumnHandler {
7
8
  private cache;
8
9
  private columnUtil;
9
10
  constructor(apiRequestService: ApiRequestServiceInterface, errorHandler: ErrorHandlerInterface, promiseService: PromiseInterface, cache: ColumnCache, columnUtil: ColumnUtil);
10
- setColumn(itemType: any, responseColumn: any): any;
11
- setColumns(itemType: any, requestColumns: any, responseColumns: any): {};
12
- fetchItemTypeTranslations(itemTypes: any): Promise<any>;
13
- request(itemType: any, columns: any, params?: {
11
+ setColumn(itemType: ItemType, responseColumn: ResponseColumn): ResponseColumn;
12
+ setColumns(itemType: ItemType, requestColumns: RequestColumns, responseColumns: ResponseColumnMap): ResponseColumnMap;
13
+ fetchItemTypeTranslations(itemTypes: ItemType[]): Promise<{
14
+ [itemType: string]: string;
15
+ }>;
16
+ request(itemType: ItemType, columns: RequestColumns, params?: {
14
17
  filter: boolean;
15
- }): Promise<any>;
16
- fetch(itemType: any, requestColumns: any, params?: any): Promise<any>;
17
- fetchAll(itemType: any): Promise<any>;
18
+ }): Promise<ResponseColumnMap>;
19
+ fetch(itemType: ItemType, requestColumns: RequestColumns, params?: any): Promise<ResponseColumnMap>;
20
+ fetchAll(itemType: ItemType): Promise<ResponseColumnMap>;
18
21
  }
@@ -89,7 +89,7 @@ export declare class ItemAdministrator {
89
89
  updateItemIdMap(collectionMap: any, conversionMap: any): void;
90
90
  createCollectionResource(collectionEntry: CollectionEntry, resourceOptions: any, processOptions?: boolean): CollectionResource;
91
91
  createItemResource(itemEntry: ItemEntry, options: any, isRoot: boolean): ItemResource;
92
- onBeforeSave(key: string, callback: any): () => boolean;
93
- onSaveSuccess(key: string, callback: any): () => boolean;
94
- onSaveWithoutClosing(key: string, callback: any): () => boolean;
92
+ onBeforeSave(key: string, callback: any): () => void;
93
+ onSaveSuccess(key: string, callback: any): () => void;
94
+ onSaveWithoutClosing(key: string, callback: any): () => void;
95
95
  }
@@ -3,11 +3,12 @@ export declare class KeyService {
3
3
  separator: string;
4
4
  constructor();
5
5
  getSingleKey(itemType: string, itemId: number | string): string;
6
- getCollectionCacheKey(parentType: string, parentId: number, childType: string): string;
7
6
  getCssKey(): any;
8
7
  parseStateKey(stateKey: string): StateKey | null;
9
8
  getDuplicateStateKey(itemId: string | number): string;
10
9
  getNewStateKey(templateType: string): string;
10
+ isDuplicateStateKey(stateKey: string | number): boolean;
11
+ isNewStateKey(stateKey: string | number): boolean;
11
12
  getLocalId(): ItemId;
12
13
  getLocalDuplicateId(): ItemId;
13
14
  getRandomString(): string;
@@ -45,7 +45,7 @@ export declare class LocalCache {
45
45
  private executeCallbacks(event, ...args);
46
46
  enableChangesWatcher(): void;
47
47
  disableChangesWatcher(): void;
48
- registerCallback(event: string, key: string, callback: any): () => boolean;
48
+ registerCallback(event: string, key: string, callback: any): () => void;
49
49
  onDeactivateItem(itemEntry: any): void;
50
50
  onActivateItem(itemEntry: any): void;
51
51
  }
@@ -1,7 +1,10 @@
1
1
  export interface PromiseInterface {
2
- all(iterable: Array<Promise<any> | any> | {
3
- key: Promise<any> | any;
4
- }): Promise<any>;
2
+ all(iterable: Array<Promise<any> | any>): Promise<any[]>;
3
+ all(iterable: {
4
+ [key: string]: Promise<any> | any;
5
+ }): Promise<{
6
+ [key: string]: any;
7
+ }>;
5
8
  when(value?: any): Promise<any>;
6
9
  reject(value?: any): Promise<any>;
7
10
  defer(): {