@rentman/rm-core 6.0.2 → 6.1.2

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 +722 -713
  2. package/dist/rm-core.js +9636 -9616
  3. package/dist/rm-core.min.js +1 -1
  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 +61 -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/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 +15 -15
  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 +102 -102
  47. package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +73 -73
  48. package/dist/types/classes/cache/CollectionMatcherCachedQueryProcessor.d.ts +35 -35
  49. package/dist/types/classes/cache/ItemHandlerBase.d.ts +93 -93
  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 +330 -330
  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 +28 -28
  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 -11
  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 +263 -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,43 +1,43 @@
1
- import { ApiFormatter, ApiRequestService, CollectionEntryService, ColumnCache, ColumnHandler, ColumnUtil, ConversionMapService, ItemCreateService, ItemEntryService, KeyService, LockService, QueryService, RequestBufferManager } from '../classes';
2
- import { TemplateCache } from '../classes/TemplateCache';
3
- import { ChangesDeltaFactory, CollectionEntryFactory, CollectionMatcherFactory, CollectionResourceFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, ItemResourceFactory, ModuleChangesCompilationFactory, QueryMatcherFactory, QueryParserFactory, RequestColumnExpansionFactory } from '../factories';
4
- import { AuthInterface } from './AuthInterface';
5
- import { ErrorHandlerInterface } from './ErrorHandlerInterface';
6
- import { ExceptionHandlerInterface } from './ExceptionHandlerInterface';
7
- import { LinkTreeServiceInterface } from './LinkTreeServiceInterface';
8
- import { PromiseLibraryInterface } from './PromiseLibraryInterface';
9
- export interface AbstractCacheDependencyInterface {
10
- apiFormatter: ApiFormatter;
11
- apiRequestService: ApiRequestService;
12
- authInterface: AuthInterface;
13
- changesDeltaFactory: ChangesDeltaFactory;
14
- collectionEntryFactory: CollectionEntryFactory;
15
- collectionEntryService: CollectionEntryService;
16
- collectionMatcherFactory: CollectionMatcherFactory;
17
- collectionResourceFactory: CollectionResourceFactory;
18
- columnCache: ColumnCache;
19
- columnExpansionFactory: ColumnExpansionFactory;
20
- columnHandler: ColumnHandler;
21
- columnSetFactory: ColumnSetFactory;
22
- columnSubsetCacheFactory: ColumnSubsetCacheFactory;
23
- columnUtil: ColumnUtil;
24
- conversionMapService: ConversionMapService;
25
- errorHandler: ErrorHandlerInterface;
26
- exceptionHandler: ExceptionHandlerInterface;
27
- itemCacheFactory: ItemCacheFactory;
28
- itemCreateService: ItemCreateService;
29
- itemEntryFactory: ItemEntryFactory;
30
- itemEntryService: ItemEntryService;
31
- itemResourceFactory: ItemResourceFactory;
32
- keyService: KeyService;
33
- linkTreeService: LinkTreeServiceInterface;
34
- lockService: LockService;
35
- moduleChangesCompilationFactory: ModuleChangesCompilationFactory;
36
- promiseService: PromiseLibraryInterface;
37
- queryMatcherFactory: QueryMatcherFactory;
38
- queryParserFactory: QueryParserFactory;
39
- queryService: QueryService;
40
- requestBufferManager: RequestBufferManager;
41
- requestColumnExpansionFactory: RequestColumnExpansionFactory;
42
- templateCache: TemplateCache;
43
- }
1
+ import { ApiFormatter, ApiRequestService, CollectionEntryService, ColumnCache, ColumnHandler, ColumnUtil, ConversionMapService, ItemCreateService, ItemEntryService, KeyService, LockService, QueryService, RequestBufferManager } from '../classes';
2
+ import { TemplateCache } from '../classes/TemplateCache';
3
+ import { ChangesDeltaFactory, CollectionEntryFactory, CollectionMatcherFactory, CollectionResourceFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, ItemResourceFactory, ModuleChangesCompilationFactory, QueryMatcherFactory, QueryParserFactory, RequestColumnExpansionFactory } from '../factories';
4
+ import { AuthInterface } from './AuthInterface';
5
+ import { ErrorHandlerInterface } from './ErrorHandlerInterface';
6
+ import { ExceptionHandlerInterface } from './ExceptionHandlerInterface';
7
+ import { LinkTreeServiceInterface } from './LinkTreeServiceInterface';
8
+ import { PromiseLibraryInterface } from './PromiseLibraryInterface';
9
+ export interface AbstractCacheDependencyInterface {
10
+ apiFormatter: ApiFormatter;
11
+ apiRequestService: ApiRequestService;
12
+ authInterface: AuthInterface;
13
+ changesDeltaFactory: ChangesDeltaFactory;
14
+ collectionEntryFactory: CollectionEntryFactory;
15
+ collectionEntryService: CollectionEntryService;
16
+ collectionMatcherFactory: CollectionMatcherFactory;
17
+ collectionResourceFactory: CollectionResourceFactory;
18
+ columnCache: ColumnCache;
19
+ columnExpansionFactory: ColumnExpansionFactory;
20
+ columnHandler: ColumnHandler;
21
+ columnSetFactory: ColumnSetFactory;
22
+ columnSubsetCacheFactory: ColumnSubsetCacheFactory;
23
+ columnUtil: ColumnUtil;
24
+ conversionMapService: ConversionMapService;
25
+ errorHandler: ErrorHandlerInterface;
26
+ exceptionHandler: ExceptionHandlerInterface;
27
+ itemCacheFactory: ItemCacheFactory;
28
+ itemCreateService: ItemCreateService;
29
+ itemEntryFactory: ItemEntryFactory;
30
+ itemEntryService: ItemEntryService;
31
+ itemResourceFactory: ItemResourceFactory;
32
+ keyService: KeyService;
33
+ linkTreeService: LinkTreeServiceInterface;
34
+ lockService: LockService;
35
+ moduleChangesCompilationFactory: ModuleChangesCompilationFactory;
36
+ promiseService: PromiseLibraryInterface;
37
+ queryMatcherFactory: QueryMatcherFactory;
38
+ queryParserFactory: QueryParserFactory;
39
+ queryService: QueryService;
40
+ requestBufferManager: RequestBufferManager;
41
+ requestColumnExpansionFactory: RequestColumnExpansionFactory;
42
+ templateCache: TemplateCache;
43
+ }
@@ -1,11 +1,11 @@
1
- import { ApiRequestColumnMap, ApiRequestItemMap, ApiRequestLimit, ApiRequestMoveItems, ItemId, ItemType, PromiseInterface } from '../types';
2
- export interface ApiRequestServiceInterface {
3
- template(itemType: ItemType, params: any): PromiseInterface<any>;
4
- create(itemType: ItemType, itemId: ItemId, values: any, parentType?: ItemType, parentId?: ItemId): PromiseInterface<any>;
5
- delete(itemType: ItemType, itemIds: ItemId[]): PromiseInterface<any>;
6
- updateItems(itemType: ItemType, items: ApiRequestItemMap, columns: ApiRequestColumnMap): PromiseInterface<any>;
7
- requestSkeleton(params: any, requestCanceler?: PromiseInterface<any>): PromiseInterface<any>;
8
- moveItems(parentType: ItemType, parentId: ItemId, items: ApiRequestMoveItems): PromiseInterface<any>;
9
- columns(itemType: ItemType, columns: ApiRequestColumnMap, params?: any): PromiseInterface<any>;
10
- query(itemType: ItemType, query: any, columns: ApiRequestColumnMap, limit?: ApiRequestLimit): PromiseInterface<any>;
11
- }
1
+ import { ApiRequestColumnMap, ApiRequestItemMap, ApiRequestLimit, ApiRequestMoveItems, ItemId, ItemType, PromiseInterface } from '../types';
2
+ export interface ApiRequestServiceInterface {
3
+ template(itemType: ItemType, params: any): PromiseInterface<any>;
4
+ create(itemType: ItemType, itemId: ItemId, values: any, parentType?: ItemType, parentId?: ItemId): PromiseInterface<any>;
5
+ delete(itemType: ItemType, itemIds: ItemId[]): PromiseInterface<any>;
6
+ updateItems(itemType: ItemType, items: ApiRequestItemMap, columns: ApiRequestColumnMap): PromiseInterface<any>;
7
+ requestSkeleton(params: any, requestCanceler?: PromiseInterface<any>): PromiseInterface<any>;
8
+ moveItems(parentType: ItemType, parentId: ItemId, items: ApiRequestMoveItems): PromiseInterface<any>;
9
+ columns(itemType: ItemType, columns: ApiRequestColumnMap, params?: any): PromiseInterface<any>;
10
+ query(itemType: ItemType, query: any, columns: ApiRequestColumnMap, limit?: ApiRequestLimit): PromiseInterface<any>;
11
+ }
@@ -1,9 +1,9 @@
1
- export interface AuthInterface {
2
- /**
3
- * @returns {string} A uniquely identifying string for each user of the api
4
- */
5
- getUniqueUserId(): string;
6
- getUserId(): number;
7
- getUserAccountname(): string;
8
- getUserDisplayname(): string;
9
- }
1
+ export interface AuthInterface {
2
+ /**
3
+ * @returns {string} A uniquely identifying string for each user of the api
4
+ */
5
+ getUniqueUserId(): string;
6
+ getUserId(): number;
7
+ getUserAccountname(): string;
8
+ getUserDisplayname(): string;
9
+ }
@@ -1,5 +1,5 @@
1
- import { PromiseInterface } from '../types';
2
- export interface ErrorHandlerInterface {
3
- reject(error?: object): PromiseInterface<any>;
4
- notifyError(error?: any): PromiseInterface<any>;
5
- }
1
+ import { PromiseInterface } from '../types';
2
+ export interface ErrorHandlerInterface {
3
+ reject(error?: object): PromiseInterface<any>;
4
+ notifyError(error?: any): PromiseInterface<any>;
5
+ }
@@ -1,3 +1,3 @@
1
- export interface ExceptionHandlerInterface {
2
- (exception: any): void;
3
- }
1
+ export interface ExceptionHandlerInterface {
2
+ (exception: any): void;
3
+ }
@@ -1,4 +1,4 @@
1
- import { ApiLinkTree } from '../types';
2
- export interface LinkTreeServiceInterface {
3
- get: () => ApiLinkTree;
4
- }
1
+ import { ApiLinkTree } from '../types';
2
+ export interface LinkTreeServiceInterface {
3
+ get: () => ApiLinkTree;
4
+ }
@@ -1,25 +1,25 @@
1
- import { PromiseInterface } from '../types';
2
- export interface Deferred<T> {
3
- resolve(value?: T | PromiseInterface<T>): void;
4
- reject(reason?: any): void;
5
- promise: PromiseInterface<T>;
6
- }
7
- export interface PromiseLibraryInterface {
8
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>, T10 | PromiseInterface<T10>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
9
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
10
- all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8]>;
11
- all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7]>;
12
- all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>]): PromiseInterface<[T1, T2, T3, T4, T5, T6]>;
13
- all<T1, T2, T3, T4, T5>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>]): PromiseInterface<[T1, T2, T3, T4, T5]>;
14
- all<T1, T2, T3, T4>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>]): PromiseInterface<[T1, T2, T3, T4]>;
15
- all<T1, T2, T3>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>]): PromiseInterface<[T1, T2, T3]>;
16
- all<T1, T2>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>]): PromiseInterface<[T1, T2]>;
17
- all<TAll>(promises: Array<TAll | PromiseInterface<TAll>>): PromiseInterface<TAll[]>;
18
- all(iterable: Array<PromiseInterface<any> | any>): PromiseInterface<any[]>;
19
- all<T>(promises: {
20
- [K in keyof T]: (PromiseInterface<T[K]> | T[K] | null);
21
- }): PromiseInterface<T>;
22
- when<T>(value?: PromiseInterface<T> | T): PromiseInterface<T>;
23
- reject(value?: any): PromiseInterface<any>;
24
- defer<T>(): Deferred<T>;
25
- }
1
+ import { PromiseInterface } from '../types';
2
+ export interface Deferred<T> {
3
+ resolve(value?: T | PromiseInterface<T>): void;
4
+ reject(reason?: any): void;
5
+ promise: PromiseInterface<T>;
6
+ }
7
+ export interface PromiseLibraryInterface {
8
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>, T10 | PromiseInterface<T10>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
9
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>, T9 | PromiseInterface<T9>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
10
+ all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>, T8 | PromiseInterface<T8>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7, T8]>;
11
+ all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>, T7 | PromiseInterface<T7>]): PromiseInterface<[T1, T2, T3, T4, T5, T6, T7]>;
12
+ all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>, T6 | PromiseInterface<T6>]): PromiseInterface<[T1, T2, T3, T4, T5, T6]>;
13
+ all<T1, T2, T3, T4, T5>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>, T5 | PromiseInterface<T5>]): PromiseInterface<[T1, T2, T3, T4, T5]>;
14
+ all<T1, T2, T3, T4>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>, T4 | PromiseInterface<T4>]): PromiseInterface<[T1, T2, T3, T4]>;
15
+ all<T1, T2, T3>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>, T3 | PromiseInterface<T3>]): PromiseInterface<[T1, T2, T3]>;
16
+ all<T1, T2>(values: [T1 | PromiseInterface<T1>, T2 | PromiseInterface<T2>]): PromiseInterface<[T1, T2]>;
17
+ all<TAll>(promises: Array<TAll | PromiseInterface<TAll>>): PromiseInterface<TAll[]>;
18
+ all(iterable: Array<PromiseInterface<any> | any>): PromiseInterface<any[]>;
19
+ all<T>(promises: {
20
+ [K in keyof T]: (PromiseInterface<T[K]> | T[K] | null);
21
+ }): PromiseInterface<T>;
22
+ when<T>(value?: PromiseInterface<T> | T): PromiseInterface<T>;
23
+ reject(value?: any): PromiseInterface<any>;
24
+ defer<T>(): Deferred<T>;
25
+ }
@@ -1,7 +1,7 @@
1
- import { ItemCreateService } from '../classes';
2
- import { ChangesProcessorFactory } from '../factories';
3
- import { AbstractCacheDependencyInterface } from './AbstractCacheDependencyInterface';
4
- export interface ServerCacheDependencyInterface extends AbstractCacheDependencyInterface {
5
- changesProcessorFactory: ChangesProcessorFactory;
6
- itemCreateService: ItemCreateService;
7
- }
1
+ import { ItemCreateService } from '../classes';
2
+ import { ChangesProcessorFactory } from '../factories';
3
+ import { AbstractCacheDependencyInterface } from './AbstractCacheDependencyInterface';
4
+ export interface ServerCacheDependencyInterface extends AbstractCacheDependencyInterface {
5
+ changesProcessorFactory: ChangesProcessorFactory;
6
+ itemCreateService: ItemCreateService;
7
+ }
@@ -1,3 +1,3 @@
1
- export interface SocketMessageInterface {
2
- on(event: string, messageHandler: (message: any) => void): () => boolean;
3
- }
1
+ export interface SocketMessageInterface {
2
+ on(event: string, messageHandler: (message: any) => void): () => boolean;
3
+ }
@@ -1,20 +1,20 @@
1
- import { CollectionEntryService, ColumnHandler, ColumnUtil, KeyService, QueryService } from '../classes';
2
- import { ChangesDeltaFactory, CollectionMatcherFactory, ColumnExpansionFactory, ColumnSubsetCacheFactory, RequestColumnExpansionFactory } from '../factories';
3
- import { ErrorHandlerInterface } from './ErrorHandlerInterface';
4
- import { ExceptionHandlerInterface } from './ExceptionHandlerInterface';
5
- import { PromiseLibraryInterface } from './PromiseLibraryInterface';
6
- export interface TransactionCollectionHandlerDependencyInterface {
7
- requestColumnExpansionFactory: RequestColumnExpansionFactory;
8
- columnUtil: ColumnUtil;
9
- columnSubsetCacheFactory: ColumnSubsetCacheFactory;
10
- columnExpansionFactory: ColumnExpansionFactory;
11
- changesDeltaFactory: ChangesDeltaFactory;
12
- collectionEntryService: CollectionEntryService;
13
- collectionMatcherFactory: CollectionMatcherFactory;
14
- columnHandler: ColumnHandler;
15
- errorHandler: ErrorHandlerInterface;
16
- keyService: KeyService;
17
- promiseService: PromiseLibraryInterface;
18
- exceptionHandler: ExceptionHandlerInterface;
19
- queryService: QueryService;
20
- }
1
+ import { CollectionEntryService, ColumnHandler, ColumnUtil, KeyService, QueryService } from '../classes';
2
+ import { ChangesDeltaFactory, CollectionMatcherFactory, ColumnExpansionFactory, ColumnSubsetCacheFactory, RequestColumnExpansionFactory } from '../factories';
3
+ import { ErrorHandlerInterface } from './ErrorHandlerInterface';
4
+ import { ExceptionHandlerInterface } from './ExceptionHandlerInterface';
5
+ import { PromiseLibraryInterface } from './PromiseLibraryInterface';
6
+ export interface TransactionCollectionHandlerDependencyInterface {
7
+ requestColumnExpansionFactory: RequestColumnExpansionFactory;
8
+ columnUtil: ColumnUtil;
9
+ columnSubsetCacheFactory: ColumnSubsetCacheFactory;
10
+ columnExpansionFactory: ColumnExpansionFactory;
11
+ changesDeltaFactory: ChangesDeltaFactory;
12
+ collectionEntryService: CollectionEntryService;
13
+ collectionMatcherFactory: CollectionMatcherFactory;
14
+ columnHandler: ColumnHandler;
15
+ errorHandler: ErrorHandlerInterface;
16
+ keyService: KeyService;
17
+ promiseService: PromiseLibraryInterface;
18
+ exceptionHandler: ExceptionHandlerInterface;
19
+ queryService: QueryService;
20
+ }
@@ -1,26 +1,26 @@
1
- import { ApiFormatter, ColumnHandler, ColumnUtil, ConversionMapService, ItemCreateService, ItemEntryService, KeyService } from '../classes';
2
- import { TemplateCache } from '../classes/TemplateCache';
3
- import { ChangesDeltaFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, RequestColumnExpansionFactory } from '../factories';
4
- import { ErrorHandlerInterface } from './ErrorHandlerInterface';
5
- import { ExceptionHandlerInterface } from './ExceptionHandlerInterface';
6
- import { PromiseLibraryInterface } from './PromiseLibraryInterface';
7
- export interface TransactionItemHandlerDependencyInterface {
8
- apiFormatter: ApiFormatter;
9
- changesDeltaFactory: ChangesDeltaFactory;
10
- columnExpansionFactory: ColumnExpansionFactory;
11
- columnHandler: ColumnHandler;
12
- columnSetFactory: ColumnSetFactory;
13
- columnSubsetCacheFactory: ColumnSubsetCacheFactory;
14
- columnUtil: ColumnUtil;
15
- conversionMapService: ConversionMapService;
16
- errorHandler: ErrorHandlerInterface;
17
- exceptionHandler: ExceptionHandlerInterface;
18
- itemCacheFactory: ItemCacheFactory;
19
- itemCreateService: ItemCreateService;
20
- itemEntryFactory: ItemEntryFactory;
21
- itemEntryService: ItemEntryService;
22
- keyService: KeyService;
23
- promiseService: PromiseLibraryInterface;
24
- requestColumnExpansionFactory: RequestColumnExpansionFactory;
25
- templateCache: TemplateCache;
26
- }
1
+ import { ApiFormatter, ColumnHandler, ColumnUtil, ConversionMapService, ItemCreateService, ItemEntryService, KeyService } from '../classes';
2
+ import { TemplateCache } from '../classes/TemplateCache';
3
+ import { ChangesDeltaFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, RequestColumnExpansionFactory } from '../factories';
4
+ import { ErrorHandlerInterface } from './ErrorHandlerInterface';
5
+ import { ExceptionHandlerInterface } from './ExceptionHandlerInterface';
6
+ import { PromiseLibraryInterface } from './PromiseLibraryInterface';
7
+ export interface TransactionItemHandlerDependencyInterface {
8
+ apiFormatter: ApiFormatter;
9
+ changesDeltaFactory: ChangesDeltaFactory;
10
+ columnExpansionFactory: ColumnExpansionFactory;
11
+ columnHandler: ColumnHandler;
12
+ columnSetFactory: ColumnSetFactory;
13
+ columnSubsetCacheFactory: ColumnSubsetCacheFactory;
14
+ columnUtil: ColumnUtil;
15
+ conversionMapService: ConversionMapService;
16
+ errorHandler: ErrorHandlerInterface;
17
+ exceptionHandler: ExceptionHandlerInterface;
18
+ itemCacheFactory: ItemCacheFactory;
19
+ itemCreateService: ItemCreateService;
20
+ itemEntryFactory: ItemEntryFactory;
21
+ itemEntryService: ItemEntryService;
22
+ keyService: KeyService;
23
+ promiseService: PromiseLibraryInterface;
24
+ requestColumnExpansionFactory: RequestColumnExpansionFactory;
25
+ templateCache: TemplateCache;
26
+ }
@@ -1,11 +1,11 @@
1
- export * from './PromiseLibraryInterface';
2
- export * from './ErrorHandlerInterface';
3
- export * from './ExceptionHandlerInterface';
4
- export * from './AuthInterface';
5
- export * from './ApiRequestServiceInterface';
6
- export * from './SocketMessageInterface';
7
- export * from './LinkTreeServiceInterface';
8
- export * from './AbstractCacheDependencyInterface';
9
- export * from './TransactionItemHandlerDependencyInterface';
10
- export * from './TransactionCollectionHandlerDependencyInterface';
11
- export * from './ServerCacheDependencyInterface';
1
+ export * from './PromiseLibraryInterface';
2
+ export * from './ErrorHandlerInterface';
3
+ export * from './ExceptionHandlerInterface';
4
+ export * from './AuthInterface';
5
+ export * from './ApiRequestServiceInterface';
6
+ export * from './SocketMessageInterface';
7
+ export * from './LinkTreeServiceInterface';
8
+ export * from './AbstractCacheDependencyInterface';
9
+ export * from './TransactionItemHandlerDependencyInterface';
10
+ export * from './TransactionCollectionHandlerDependencyInterface';
11
+ export * from './ServerCacheDependencyInterface';
@@ -1,23 +1,23 @@
1
- import { CollectionEntryService, ColumnCache, ColumnExpansion, ColumnSet, KeyService, QueryService } from '../classes';
2
- import { ColumnSetFactory } from '../factories';
3
- import { CollectionQuery, EntryParentNull, ItemType, PromiseInterface } from '../types';
4
- import { CollectionOptions } from './CollectionOptions';
5
- export declare class CollectionEntry<ItemTypeType extends ItemType = any> {
6
- private collectionEntryService;
7
- private queryService;
8
- private columnSetFactory;
9
- private keyService;
10
- private columnCache;
11
- itemType: ItemTypeType;
12
- options: CollectionOptions;
13
- id: number;
14
- parent: EntryParentNull;
15
- query: CollectionQuery;
16
- columns: ColumnSet<ItemTypeType>;
17
- reloadQueued: boolean;
18
- promise: PromiseInterface<this>;
19
- constructor(collectionEntryService: CollectionEntryService, queryService: QueryService, columnSetFactory: ColumnSetFactory, keyService: KeyService, columnCache: ColumnCache, itemType: ItemTypeType, options: CollectionOptions);
20
- isLocal(): boolean;
21
- queueReload(): void;
22
- expandColumns(columnExpansion: ColumnExpansion<ItemTypeType>): void;
23
- }
1
+ import { CollectionEntryService, ColumnCache, ColumnExpansion, ColumnSet, KeyService, QueryService } from '../classes';
2
+ import { ColumnSetFactory } from '../factories';
3
+ import { CollectionQuery, EntryParentNull, ItemType, PromiseInterface } from '../types';
4
+ import { CollectionOptions } from './CollectionOptions';
5
+ export declare class CollectionEntry<ItemTypeType extends ItemType = any> {
6
+ private collectionEntryService;
7
+ private queryService;
8
+ private columnSetFactory;
9
+ private keyService;
10
+ private columnCache;
11
+ itemType: ItemTypeType;
12
+ options: CollectionOptions;
13
+ id: number;
14
+ parent: EntryParentNull;
15
+ query: CollectionQuery;
16
+ columns: ColumnSet<ItemTypeType>;
17
+ reloadQueued: boolean;
18
+ promise: PromiseInterface<this>;
19
+ constructor(collectionEntryService: CollectionEntryService, queryService: QueryService, columnSetFactory: ColumnSetFactory, keyService: KeyService, columnCache: ColumnCache, itemType: ItemTypeType, options: CollectionOptions);
20
+ isLocal(): boolean;
21
+ queueReload(): void;
22
+ expandColumns(columnExpansion: ColumnExpansion<ItemTypeType>): void;
23
+ }
@@ -1,18 +1,18 @@
1
- import { CollectionResource, ItemResource } from '../models';
2
- import { ApiQuery, ApiRequestColumns, ApiRequestLimit, EntryParentNull, FieldChangeCallback, ItemType } from '../types';
3
- export declare type CollectionResourceCallback<ItemTypeType extends ItemType> = (itemResources: Array<ItemResource<ItemTypeType>>, collectionResource: CollectionResource<ItemTypeType>, isCalledAfterSocketUpdate: boolean) => void;
4
- export declare type CollectionResourceOnAddCallback<ItemTypeType extends ItemType> = (itemResources: Array<ItemResource<ItemTypeType>>, collectionResource: CollectionResource<ItemTypeType>, isInitialCall: boolean, isCalledAfterSocketUpdate: boolean) => void;
5
- export declare type CollectionOptionsInterface<ItemTypeType extends ItemType> = Partial<CollectionOptions<ItemTypeType>>;
6
- export declare class CollectionOptions<ItemTypeType extends ItemType = any> {
7
- columns: ApiRequestColumns;
8
- query: ApiQuery | null;
9
- queryColumns: ApiRequestColumns;
10
- parent: EntryParentNull;
11
- limit: ApiRequestLimit | null;
12
- onAdd: CollectionResourceOnAddCallback<ItemTypeType>;
13
- onRemove: CollectionResourceCallback<ItemTypeType>;
14
- onChange: FieldChangeCallback;
15
- custom: any;
16
- callOnAddWithInitialItems: boolean;
17
- constructor(values: CollectionOptionsInterface<ItemTypeType>);
18
- }
1
+ import { CollectionResource, ItemResource } from '../models';
2
+ import { ApiQuery, ApiRequestColumns, ApiRequestLimit, EntryParentNull, FieldChangeCallback, ItemType } from '../types';
3
+ export declare type CollectionResourceCallback<ItemTypeType extends ItemType> = (itemResources: Array<ItemResource<ItemTypeType>>, collectionResource: CollectionResource<ItemTypeType>, isCalledAfterSocketUpdate: boolean) => void;
4
+ export declare type CollectionResourceOnAddCallback<ItemTypeType extends ItemType> = (itemResources: Array<ItemResource<ItemTypeType>>, collectionResource: CollectionResource<ItemTypeType>, isInitialCall: boolean, isCalledAfterSocketUpdate: boolean) => void;
5
+ export declare type CollectionOptionsInterface<ItemTypeType extends ItemType> = Partial<CollectionOptions<ItemTypeType>>;
6
+ export declare class CollectionOptions<ItemTypeType extends ItemType = any> {
7
+ columns: ApiRequestColumns;
8
+ query: ApiQuery | null;
9
+ queryColumns: ApiRequestColumns;
10
+ parent: EntryParentNull;
11
+ limit: ApiRequestLimit | null;
12
+ onAdd: CollectionResourceOnAddCallback<ItemTypeType>;
13
+ onRemove: CollectionResourceCallback<ItemTypeType>;
14
+ onChange: FieldChangeCallback;
15
+ custom: any;
16
+ callOnAddWithInitialItems: boolean;
17
+ constructor(values: CollectionOptionsInterface<ItemTypeType>);
18
+ }
@@ -1,72 +1,72 @@
1
- import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
2
- import { ChangesDeltaResult } from '../classes/ChangesDeltaBase';
3
- import { CollectionResourceFactory } from '../factories';
4
- import { CollectionEntry, CollectionOptions, ItemEntry, ItemResource } from '../models';
5
- import { ApiRequestLimit, CompareFieldCallback, DeregFunction, FieldMap, ItemId, ItemResourceItemIdMap, ItemType, OnAddCallback, OnChangeCallback, OnRemoveCallback, PromiseInterface, ResponseColumnItemTypeMap } from '../types';
6
- export declare class CollectionResource<ItemTypeType extends ItemType = any> {
7
- protected factory: CollectionResourceFactory;
8
- options: CollectionOptions<ItemTypeType>;
9
- transaction: TransactionCache;
10
- entry: CollectionEntry<ItemTypeType>;
11
- columns: ResponseColumnItemTypeMap;
12
- items: Array<ItemResource<ItemTypeType>>;
13
- protected itemIdMap: ItemResourceItemIdMap<ItemResource<ItemTypeType>>;
14
- private fieldChangeDeregFns;
15
- private readonly onChangeCallbacks;
16
- private readonly onAddCallbacks;
17
- private readonly onRemoveCallbacks;
18
- /**
19
- * @description
20
- * We store the ItemIds of the items that were taking out the collections so that we can include those when doing a not-in when having a limit
21
- */
22
- private removedItemIds;
23
- constructor(factory: CollectionResourceFactory, options: CollectionOptions<ItemTypeType>, transaction: TransactionCache, itemType: ItemTypeType, initialItemEntries: Array<ItemEntry<ItemTypeType>>);
24
- onConstruct(): void;
25
- setLimit(newLimit: number | ApiRequestLimit): void;
26
- onAdd(callback: OnAddCallback): DeregFunction;
27
- onChange(callback: OnChangeCallback): DeregFunction;
28
- onRemove(callback: OnRemoveCallback): DeregFunction;
29
- __clear(): void;
30
- /**
31
- * @deprecated
32
- * Use {@link ChangesDelta.setItemMoved ChangesDelta.setItemMoved}
33
- */
34
- moveItems(itemEntries: Array<ItemEntry<ItemTypeType>>, destinationResource: CollectionResource<ItemTypeType>): void;
35
- removeItems(idArray: ItemId[]): PromiseInterface<ChangesDeltaResult>;
36
- removeItem(itemId: ItemId): PromiseInterface<ChangesDeltaResult>;
37
- addItems(valuesArray: Array<FieldMap<ItemTypeType>>): PromiseInterface<ChangesDeltaResult>;
38
- addItem(values: FieldMap<ItemTypeType>): PromiseInterface<ChangesDeltaResult>;
39
- getIdArray(): ItemId[];
40
- getItemById(itemId: number): ItemResource<ItemTypeType>;
41
- addItemResources(itemEntriesToBeAdded: Array<ItemEntry<ItemTypeType>>, isInitialCall?: boolean, isCalledAfterSocketUpdate?: boolean): Array<ItemResource<ItemTypeType>>;
42
- /**
43
- * @description
44
- * Returns the {@link ItemResource ItemResources} that where removed from the {@link CollectionResource collection}.
45
- * Filters on {@link ItemResource ItemResource}.{@link ItemEntry entry} === {@link ItemEntry entry}
46
- */
47
- removeItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>, isCalledAfterSocketUpdate: boolean): Array<ItemResource<ItemTypeType>>;
48
- callOnAdd(itemResources: Array<ItemResource<ItemTypeType>>, isInitialCall?: boolean, isCalledAfterSocketUpdate?: boolean): void;
49
- callOnChange(itemEntry: ItemEntry<ItemTypeType>, compareField: CompareFieldCallback, fields: FieldMap<ItemTypeType>, isCalledAfterSocketUpdate: boolean, previous: FieldMap<ItemTypeType>): void;
50
- callOnRemove(itemResources: Array<ItemResource<ItemTypeType>>, isCalledAfterSocketUpdate: boolean): void;
51
- forEach(callback: (itemResource: ItemResource<ItemTypeType>) => void): void;
52
- filter(callback: (itemResource: ItemResource<ItemTypeType>) => boolean): Array<ItemResource<ItemTypeType>>;
53
- first(callback: (itemResource: ItemResource<ItemTypeType>) => boolean): ItemResource<ItemTypeType> | null;
54
- some(callback: (itemResource: ItemResource<ItemTypeType>) => boolean): boolean;
55
- groupBy(argument: string | ((itemResource: ItemResource<ItemTypeType>) => string | null)): {
56
- [key: string]: Array<ItemResource<ItemTypeType>>;
57
- };
58
- map<U>(argument: string | ((itemResource: ItemResource<ItemTypeType>) => U)): U[];
59
- reduce<U>(callback: (itemResource: ItemResource<ItemTypeType>, value: U) => U, value: U): U;
60
- /**
61
- * @description
62
- * Removes the reference to the {@link CollectionResource CollectionResource} from the {@link CollectionEntry CollectionEntry}
63
- *
64
- * @remarks
65
- * - Doesn't revert changes on the items themselves
66
- */
67
- clearResource(): void;
68
- private registerListeners;
69
- private __registerCallback;
70
- private limitAfterRemove;
71
- private limitAfterAdd;
72
- }
1
+ import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
2
+ import { ChangesDeltaResult } from '../classes/ChangesDeltaBase';
3
+ import { CollectionResourceFactory } from '../factories';
4
+ import { CollectionEntry, CollectionOptions, ItemEntry, ItemResource } from '../models';
5
+ import { ApiRequestLimit, CompareFieldCallback, DeregFunction, FieldMap, ItemId, ItemResourceItemIdMap, ItemType, OnAddCallback, OnChangeCallback, OnRemoveCallback, PromiseInterface, ResponseColumnItemTypeMap } from '../types';
6
+ export declare class CollectionResource<ItemTypeType extends ItemType = any> {
7
+ protected factory: CollectionResourceFactory;
8
+ options: CollectionOptions<ItemTypeType>;
9
+ transaction: TransactionCache;
10
+ entry: CollectionEntry<ItemTypeType>;
11
+ columns: ResponseColumnItemTypeMap;
12
+ items: Array<ItemResource<ItemTypeType>>;
13
+ protected itemIdMap: ItemResourceItemIdMap<ItemResource<ItemTypeType>>;
14
+ private fieldChangeDeregFns;
15
+ private readonly onChangeCallbacks;
16
+ private readonly onAddCallbacks;
17
+ private readonly onRemoveCallbacks;
18
+ /**
19
+ * @description
20
+ * We store the ItemIds of the items that were taking out the collections so that we can include those when doing a not-in when having a limit
21
+ */
22
+ private removedItemIds;
23
+ constructor(factory: CollectionResourceFactory, options: CollectionOptions<ItemTypeType>, transaction: TransactionCache, itemType: ItemTypeType, initialItemEntries: Array<ItemEntry<ItemTypeType>>);
24
+ onConstruct(): void;
25
+ setLimit(newLimit: number | ApiRequestLimit): void;
26
+ onAdd(callback: OnAddCallback): DeregFunction;
27
+ onChange(callback: OnChangeCallback): DeregFunction;
28
+ onRemove(callback: OnRemoveCallback): DeregFunction;
29
+ __clear(): void;
30
+ /**
31
+ * @deprecated
32
+ * Use {@link ChangesDelta.setItemMoved ChangesDelta.setItemMoved}
33
+ */
34
+ moveItems(itemEntries: Array<ItemEntry<ItemTypeType>>, destinationResource: CollectionResource<ItemTypeType>): void;
35
+ removeItems(idArray: ItemId[]): PromiseInterface<ChangesDeltaResult>;
36
+ removeItem(itemId: ItemId): PromiseInterface<ChangesDeltaResult>;
37
+ addItems(valuesArray: Array<FieldMap<ItemTypeType>>): PromiseInterface<ChangesDeltaResult>;
38
+ addItem(values: FieldMap<ItemTypeType>): PromiseInterface<ChangesDeltaResult>;
39
+ getIdArray(): ItemId[];
40
+ getItemById(itemId: number): ItemResource<ItemTypeType>;
41
+ addItemResources(itemEntriesToBeAdded: Array<ItemEntry<ItemTypeType>>, isInitialCall?: boolean, isCalledAfterSocketUpdate?: boolean): Array<ItemResource<ItemTypeType>>;
42
+ /**
43
+ * @description
44
+ * Returns the {@link ItemResource ItemResources} that where removed from the {@link CollectionResource collection}.
45
+ * Filters on {@link ItemResource ItemResource}.{@link ItemEntry entry} === {@link ItemEntry entry}
46
+ */
47
+ removeItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>, isCalledAfterSocketUpdate: boolean): Array<ItemResource<ItemTypeType>>;
48
+ callOnAdd(itemResources: Array<ItemResource<ItemTypeType>>, isInitialCall?: boolean, isCalledAfterSocketUpdate?: boolean): void;
49
+ callOnChange(itemEntry: ItemEntry<ItemTypeType>, compareField: CompareFieldCallback, fields: FieldMap<ItemTypeType>, isCalledAfterSocketUpdate: boolean, previous: FieldMap<ItemTypeType>): void;
50
+ callOnRemove(itemResources: Array<ItemResource<ItemTypeType>>, isCalledAfterSocketUpdate: boolean): void;
51
+ forEach(callback: (itemResource: ItemResource<ItemTypeType>) => void): void;
52
+ filter(callback: (itemResource: ItemResource<ItemTypeType>) => boolean): Array<ItemResource<ItemTypeType>>;
53
+ first(callback: (itemResource: ItemResource<ItemTypeType>) => boolean): ItemResource<ItemTypeType> | null;
54
+ some(callback: (itemResource: ItemResource<ItemTypeType>) => boolean): boolean;
55
+ groupBy(argument: string | ((itemResource: ItemResource<ItemTypeType>) => string | null)): {
56
+ [key: string]: Array<ItemResource<ItemTypeType>>;
57
+ };
58
+ map<U>(argument: string | ((itemResource: ItemResource<ItemTypeType>) => U)): U[];
59
+ reduce<U>(callback: (itemResource: ItemResource<ItemTypeType>, value: U) => U, value: U): U;
60
+ /**
61
+ * @description
62
+ * Removes the reference to the {@link CollectionResource CollectionResource} from the {@link CollectionEntry CollectionEntry}
63
+ *
64
+ * @remarks
65
+ * - Doesn't revert changes on the items themselves
66
+ */
67
+ clearResource(): void;
68
+ private registerListeners;
69
+ private __registerCallback;
70
+ private limitAfterRemove;
71
+ private limitAfterAdd;
72
+ }