@rentman/rm-core 2.0.11 → 2.0.13
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 +605 -595
- package/dist/rm-core.js +9360 -9342
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +55 -55
- package/dist/src/classes/ApiRequestService.d.ts +20 -20
- package/dist/src/classes/ApiResponseProcessor.d.ts +30 -29
- package/dist/src/classes/ChangesCompilation.d.ts +34 -34
- package/dist/src/classes/ChangesDelta.d.ts +42 -42
- package/dist/src/classes/ChangesDeltaBase.d.ts +33 -33
- package/dist/src/classes/ChangesProcessor.d.ts +47 -47
- package/dist/src/classes/CollectionCache.d.ts +37 -37
- package/dist/src/classes/CollectionEntryService.d.ts +25 -25
- package/dist/src/classes/CollectionMatcher.d.ts +9 -9
- package/dist/src/classes/CollectionMatcherBase.d.ts +26 -26
- package/dist/src/classes/CollectionResourceService.d.ts +6 -6
- package/dist/src/classes/ColumnCache.d.ts +21 -21
- package/dist/src/classes/ColumnExpansion.d.ts +22 -22
- package/dist/src/classes/ColumnHandler.d.ts +21 -21
- package/dist/src/classes/ColumnInfo.d.ts +14 -14
- package/dist/src/classes/ColumnSet.d.ts +39 -39
- package/dist/src/classes/ColumnSubsetCache.d.ts +8 -8
- package/dist/src/classes/ColumnUtil.d.ts +99 -99
- package/dist/src/classes/CreateRequest.d.ts +19 -19
- package/dist/src/classes/InternalChangesDelta.d.ts +38 -38
- package/dist/src/classes/ItemCache.d.ts +29 -29
- package/dist/src/classes/ItemEntryService.d.ts +41 -41
- package/dist/src/classes/KeyService.d.ts +16 -16
- package/dist/src/classes/LockService.d.ts +32 -32
- package/dist/src/classes/ModuleChangesCompilation.d.ts +18 -18
- package/dist/src/classes/QueryColumnExtractor.d.ts +20 -20
- package/dist/src/classes/QueryMatcher.d.ts +14 -14
- package/dist/src/classes/QueryParser.d.ts +25 -25
- package/dist/src/classes/QueryParserBase.d.ts +29 -29
- package/dist/src/classes/QueryService.d.ts +14 -14
- package/dist/src/classes/RequestBuffer.d.ts +25 -25
- package/dist/src/classes/RequestBufferManager.d.ts +31 -31
- package/dist/src/classes/RequestColumnExpansion.d.ts +15 -15
- package/dist/src/classes/SocketMessageHandler.d.ts +31 -31
- package/dist/src/classes/TemplateCache.d.ts +63 -63
- package/dist/src/classes/Util.d.ts +28 -28
- package/dist/src/classes/cache/AbstractCache.d.ts +140 -140
- package/dist/src/classes/cache/CollectionHandlerBase.d.ts +64 -64
- package/dist/src/classes/cache/CollectionMatcherCacheProcessor.d.ts +26 -26
- package/dist/src/classes/cache/ItemHandlerBase.d.ts +95 -95
- package/dist/src/classes/cache/server/ServerCache.d.ts +98 -98
- package/dist/src/classes/cache/server/ServerCollectionHandler.d.ts +43 -43
- package/dist/src/classes/cache/server/ServerItemHandler.d.ts +50 -50
- package/dist/src/classes/cache/transaction/TransactionCache.d.ts +412 -412
- package/dist/src/classes/cache/transaction/TransactionCollectionHandler.d.ts +72 -72
- package/dist/src/classes/cache/transaction/TransactionEventHandler.d.ts +19 -19
- package/dist/src/classes/cache/transaction/TransactionItemHandler.d.ts +114 -114
- package/dist/src/classes/index.d.ts +41 -41
- package/dist/src/constants.d.ts +7 -7
- package/dist/src/core.d.ts +49 -49
- package/dist/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/src/factories/ChangesCompilationFactory.d.ts +6 -6
- package/dist/src/factories/ChangesDeltaFactory.d.ts +9 -9
- package/dist/src/factories/ChangesProcessorFactory.d.ts +22 -22
- package/dist/src/factories/CollectionCacheFactory.d.ts +8 -8
- package/dist/src/factories/CollectionEntryFactory.d.ts +11 -11
- package/dist/src/factories/CollectionMatcherFactory.d.ts +9 -9
- package/dist/src/factories/CollectionResourceFactory.d.ts +34 -34
- package/dist/src/factories/ColumnExpansionFactory.d.ts +8 -8
- package/dist/src/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/src/factories/ColumnSetFactory.d.ts +19 -19
- package/dist/src/factories/ColumnSubsetCacheFactory.d.ts +6 -6
- package/dist/src/factories/CreateRequestFactory.d.ts +11 -11
- package/dist/src/factories/ItemCacheFactory.d.ts +8 -8
- package/dist/src/factories/ItemEntryFactory.d.ts +17 -17
- package/dist/src/factories/ItemResourceFactory.d.ts +32 -32
- package/dist/src/factories/ModuleChangesCompilationFactory.d.ts +5 -5
- package/dist/src/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/src/factories/QueryParserFactory.d.ts +6 -6
- package/dist/src/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/src/factories/TemplateFactory.d.ts +10 -10
- package/dist/src/factories/TransactionCacheFactory.d.ts +55 -55
- package/dist/src/factories/index.d.ts +22 -22
- package/dist/src/index.d.ts +7 -7
- package/dist/src/interfaces/ApiRequestServiceInterface.d.ts +11 -11
- package/dist/src/interfaces/AuthInterface.d.ts +9 -9
- package/dist/src/interfaces/ErrorHandlerInterface.d.ts +5 -5
- package/dist/src/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/src/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/src/interfaces/PromiseLibraryInterface.d.ts +25 -25
- package/dist/src/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/src/interfaces/index.d.ts +7 -7
- package/dist/src/models/CollectionEditResource.d.ts +17 -17
- package/dist/src/models/CollectionEntry.d.ts +27 -27
- package/dist/src/models/CollectionEntryOptions.d.ts +13 -13
- package/dist/src/models/CollectionResource.d.ts +52 -52
- package/dist/src/models/CollectionResourceOptions.d.ts +27 -27
- package/dist/src/models/CollectionViewResource.d.ts +7 -7
- package/dist/src/models/EditResource.d.ts +16 -16
- package/dist/src/models/ItemEntry.d.ts +19 -19
- package/dist/src/models/ItemEntryOptions.d.ts +9 -9
- package/dist/src/models/ItemResource.d.ts +87 -87
- package/dist/src/models/ItemResourceOptions.d.ts +9 -9
- package/dist/src/models/LocalViewResource.d.ts +7 -7
- package/dist/src/models/RemoteViewResource.d.ts +7 -7
- package/dist/src/models/Template.d.ts +11 -11
- package/dist/src/models/ViewResource.d.ts +8 -8
- package/dist/src/models/index.d.ts +15 -15
- package/dist/src/types/ItemTypesCollection.d.ts +262 -262
- package/dist/src/types/PromiseInterface.d.ts +2 -2
- package/dist/src/types/index.d.ts +2 -2
- package/package.json +36 -36
- package/readme.md +15 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ColumnUtil, RequestColumnExpansion } from '../classes';
|
|
2
|
-
export declare class RequestColumnExpansionFactory {
|
|
3
|
-
private columnUtil;
|
|
4
|
-
constructor(columnUtil: ColumnUtil);
|
|
5
|
-
construct(): RequestColumnExpansion;
|
|
6
|
-
}
|
|
1
|
+
import { ColumnUtil, RequestColumnExpansion } from '../classes';
|
|
2
|
+
export declare class RequestColumnExpansionFactory {
|
|
3
|
+
private columnUtil;
|
|
4
|
+
constructor(columnUtil: ColumnUtil);
|
|
5
|
+
construct(): RequestColumnExpansion;
|
|
6
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ColumnUtil } from '../classes';
|
|
2
|
-
import { ColumnSetFactory } from '../factories';
|
|
3
|
-
import { Template } from '../models';
|
|
4
|
-
import { ApiRequestColumnMap, ApiResponse, ItemType, ResponseColumnItemTypeMap } from '../types';
|
|
5
|
-
export declare class TemplateFactory {
|
|
6
|
-
columnSetFactory: ColumnSetFactory;
|
|
7
|
-
columnUtil: ColumnUtil;
|
|
8
|
-
constructor(columnSetFactory: ColumnSetFactory, columnUtil: ColumnUtil);
|
|
9
|
-
construct<ItemTypeType extends ItemType>(itemType: ItemTypeType, response: ApiResponse, additionalRequestColumns: ApiRequestColumnMap, additionalResponseColumns: ResponseColumnItemTypeMap): Template<ItemTypeType>;
|
|
10
|
-
}
|
|
1
|
+
import { ColumnUtil } from '../classes';
|
|
2
|
+
import { ColumnSetFactory } from '../factories';
|
|
3
|
+
import { Template } from '../models';
|
|
4
|
+
import { ApiRequestColumnMap, ApiResponse, ItemType, ResponseColumnItemTypeMap } from '../types';
|
|
5
|
+
export declare class TemplateFactory {
|
|
6
|
+
columnSetFactory: ColumnSetFactory;
|
|
7
|
+
columnUtil: ColumnUtil;
|
|
8
|
+
constructor(columnSetFactory: ColumnSetFactory, columnUtil: ColumnUtil);
|
|
9
|
+
construct<ItemTypeType extends ItemType>(itemType: ItemTypeType, response: ApiResponse, additionalRequestColumns: ApiRequestColumnMap, additionalResponseColumns: ResponseColumnItemTypeMap): Template<ItemTypeType>;
|
|
10
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { ApiFormatter, ApiRequestService, CollectionEntryService, ColumnCache, ColumnHandler, ColumnUtil, ItemEntryService, KeyService, LockService, QueryService } from '../classes';
|
|
2
|
-
import { ServerCache } from '../classes/cache/server/ServerCache';
|
|
3
|
-
import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
|
|
4
|
-
import { RequestBufferManager } from '../classes/RequestBufferManager';
|
|
5
|
-
import { TemplateCache } from '../classes/TemplateCache';
|
|
6
|
-
import { RmCore } from '../core';
|
|
7
|
-
import { CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, CollectionResourceFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, ItemResourceFactory, ModuleChangesCompilationFactory, QueryMatcherFactory, QueryParserFactory, RequestColumnExpansionFactory } from '../factories';
|
|
8
|
-
import { AuthInterface, ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
9
|
-
import { LinkTreeServiceInterface } from '../interfaces/LinkTreeServiceInterface';
|
|
10
|
-
import { ChangesDeltaFactory } from './ChangesDeltaFactory';
|
|
11
|
-
import { ChangesProcessorFactory } from './ChangesProcessorFactory';
|
|
12
|
-
export declare class TransactionCacheFactory {
|
|
13
|
-
private core;
|
|
14
|
-
private columnCache;
|
|
15
|
-
private requestBufferManager;
|
|
16
|
-
private requestColumnExpansionFactory;
|
|
17
|
-
private queryMatcherFactory;
|
|
18
|
-
private authInterface;
|
|
19
|
-
private changesDeltaFactory;
|
|
20
|
-
private changesProcessorFactory;
|
|
21
|
-
private lockService;
|
|
22
|
-
private moduleChangesCompilationFactory;
|
|
23
|
-
private collectionResourceFactory;
|
|
24
|
-
private itemResourceFactory;
|
|
25
|
-
private templateCache;
|
|
26
|
-
private itemCacheFactory;
|
|
27
|
-
private collectionCacheFactory;
|
|
28
|
-
private errorHandler;
|
|
29
|
-
private exceptionHandler;
|
|
30
|
-
private promiseService;
|
|
31
|
-
private apiFormatter;
|
|
32
|
-
private apiRequestService;
|
|
33
|
-
private columnExpansionFactory;
|
|
34
|
-
private columnHandler;
|
|
35
|
-
private columnSetFactory;
|
|
36
|
-
private columnSubsetCacheFactory;
|
|
37
|
-
private columnUtil;
|
|
38
|
-
private itemEntryFactory;
|
|
39
|
-
private itemEntryService;
|
|
40
|
-
private keyService;
|
|
41
|
-
private collectionEntryFactory;
|
|
42
|
-
private collectionEntryService;
|
|
43
|
-
private collectionMatcherFactory;
|
|
44
|
-
private queryParserFactory;
|
|
45
|
-
private queryService;
|
|
46
|
-
private linkTreeService;
|
|
47
|
-
private readonly serverCache;
|
|
48
|
-
constructor(core: RmCore, columnCache: ColumnCache, requestBufferManager: RequestBufferManager, requestColumnExpansionFactory: RequestColumnExpansionFactory, queryMatcherFactory: QueryMatcherFactory, authInterface: AuthInterface, changesDeltaFactory: ChangesDeltaFactory, changesProcessorFactory: ChangesProcessorFactory, lockService: LockService, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceFactory: ItemResourceFactory, templateCache: TemplateCache, itemCacheFactory: ItemCacheFactory, collectionCacheFactory: CollectionCacheFactory, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface, apiFormatter: ApiFormatter, 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, linkTreeService: LinkTreeServiceInterface);
|
|
49
|
-
/**
|
|
50
|
-
* Todo[cache] Store a map of all transactions by transaction id ?
|
|
51
|
-
*/
|
|
52
|
-
getById(id: string): TransactionCache | undefined;
|
|
53
|
-
construct(id?: string): TransactionCache;
|
|
54
|
-
getServerCache(): ServerCache;
|
|
55
|
-
}
|
|
1
|
+
import { ApiFormatter, ApiRequestService, CollectionEntryService, ColumnCache, ColumnHandler, ColumnUtil, ItemEntryService, KeyService, LockService, QueryService } from '../classes';
|
|
2
|
+
import { ServerCache } from '../classes/cache/server/ServerCache';
|
|
3
|
+
import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
|
|
4
|
+
import { RequestBufferManager } from '../classes/RequestBufferManager';
|
|
5
|
+
import { TemplateCache } from '../classes/TemplateCache';
|
|
6
|
+
import { RmCore } from '../core';
|
|
7
|
+
import { CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, CollectionResourceFactory, ColumnExpansionFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ItemCacheFactory, ItemEntryFactory, ItemResourceFactory, ModuleChangesCompilationFactory, QueryMatcherFactory, QueryParserFactory, RequestColumnExpansionFactory } from '../factories';
|
|
8
|
+
import { AuthInterface, ErrorHandlerInterface, ExceptionHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
9
|
+
import { LinkTreeServiceInterface } from '../interfaces/LinkTreeServiceInterface';
|
|
10
|
+
import { ChangesDeltaFactory } from './ChangesDeltaFactory';
|
|
11
|
+
import { ChangesProcessorFactory } from './ChangesProcessorFactory';
|
|
12
|
+
export declare class TransactionCacheFactory {
|
|
13
|
+
private core;
|
|
14
|
+
private columnCache;
|
|
15
|
+
private requestBufferManager;
|
|
16
|
+
private requestColumnExpansionFactory;
|
|
17
|
+
private queryMatcherFactory;
|
|
18
|
+
private authInterface;
|
|
19
|
+
private changesDeltaFactory;
|
|
20
|
+
private changesProcessorFactory;
|
|
21
|
+
private lockService;
|
|
22
|
+
private moduleChangesCompilationFactory;
|
|
23
|
+
private collectionResourceFactory;
|
|
24
|
+
private itemResourceFactory;
|
|
25
|
+
private templateCache;
|
|
26
|
+
private itemCacheFactory;
|
|
27
|
+
private collectionCacheFactory;
|
|
28
|
+
private errorHandler;
|
|
29
|
+
private exceptionHandler;
|
|
30
|
+
private promiseService;
|
|
31
|
+
private apiFormatter;
|
|
32
|
+
private apiRequestService;
|
|
33
|
+
private columnExpansionFactory;
|
|
34
|
+
private columnHandler;
|
|
35
|
+
private columnSetFactory;
|
|
36
|
+
private columnSubsetCacheFactory;
|
|
37
|
+
private columnUtil;
|
|
38
|
+
private itemEntryFactory;
|
|
39
|
+
private itemEntryService;
|
|
40
|
+
private keyService;
|
|
41
|
+
private collectionEntryFactory;
|
|
42
|
+
private collectionEntryService;
|
|
43
|
+
private collectionMatcherFactory;
|
|
44
|
+
private queryParserFactory;
|
|
45
|
+
private queryService;
|
|
46
|
+
private linkTreeService;
|
|
47
|
+
private readonly serverCache;
|
|
48
|
+
constructor(core: RmCore, columnCache: ColumnCache, requestBufferManager: RequestBufferManager, requestColumnExpansionFactory: RequestColumnExpansionFactory, queryMatcherFactory: QueryMatcherFactory, authInterface: AuthInterface, changesDeltaFactory: ChangesDeltaFactory, changesProcessorFactory: ChangesProcessorFactory, lockService: LockService, moduleChangesCompilationFactory: ModuleChangesCompilationFactory, collectionResourceFactory: CollectionResourceFactory, itemResourceFactory: ItemResourceFactory, templateCache: TemplateCache, itemCacheFactory: ItemCacheFactory, collectionCacheFactory: CollectionCacheFactory, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseService: PromiseLibraryInterface, apiFormatter: ApiFormatter, 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, linkTreeService: LinkTreeServiceInterface);
|
|
49
|
+
/**
|
|
50
|
+
* Todo[cache] Store a map of all transactions by transaction id ?
|
|
51
|
+
*/
|
|
52
|
+
getById(id: string): TransactionCache | undefined;
|
|
53
|
+
construct(id?: string): TransactionCache;
|
|
54
|
+
getServerCache(): ServerCache;
|
|
55
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export * from './ApiResponseProcessorFactory';
|
|
2
|
-
export * from './ChangesCompilationFactory';
|
|
3
|
-
export * from './CollectionCacheFactory';
|
|
4
|
-
export * from './CollectionEntryFactory';
|
|
5
|
-
export * from './CollectionMatcherFactory';
|
|
6
|
-
export * from './CollectionResourceFactory';
|
|
7
|
-
export * from './ColumnExpansionFactory';
|
|
8
|
-
export * from './ColumnInfoFactory';
|
|
9
|
-
export * from './ColumnSetFactory';
|
|
10
|
-
export * from './ColumnSubsetCacheFactory';
|
|
11
|
-
export * from './CreateRequestFactory';
|
|
12
|
-
export * from './ItemCacheFactory';
|
|
13
|
-
export * from './ItemEntryFactory';
|
|
14
|
-
export * from './ItemResourceFactory';
|
|
15
|
-
export * from './TransactionCacheFactory';
|
|
16
|
-
export * from './ModuleChangesCompilationFactory';
|
|
17
|
-
export * from './QueryMatcherFactory';
|
|
18
|
-
export * from './QueryParserFactory';
|
|
19
|
-
export * from './RequestColumnExpansionFactory';
|
|
20
|
-
export * from './TemplateFactory';
|
|
21
|
-
export * from './ChangesDeltaFactory';
|
|
22
|
-
export * from './ChangesProcessorFactory';
|
|
1
|
+
export * from './ApiResponseProcessorFactory';
|
|
2
|
+
export * from './ChangesCompilationFactory';
|
|
3
|
+
export * from './CollectionCacheFactory';
|
|
4
|
+
export * from './CollectionEntryFactory';
|
|
5
|
+
export * from './CollectionMatcherFactory';
|
|
6
|
+
export * from './CollectionResourceFactory';
|
|
7
|
+
export * from './ColumnExpansionFactory';
|
|
8
|
+
export * from './ColumnInfoFactory';
|
|
9
|
+
export * from './ColumnSetFactory';
|
|
10
|
+
export * from './ColumnSubsetCacheFactory';
|
|
11
|
+
export * from './CreateRequestFactory';
|
|
12
|
+
export * from './ItemCacheFactory';
|
|
13
|
+
export * from './ItemEntryFactory';
|
|
14
|
+
export * from './ItemResourceFactory';
|
|
15
|
+
export * from './TransactionCacheFactory';
|
|
16
|
+
export * from './ModuleChangesCompilationFactory';
|
|
17
|
+
export * from './QueryMatcherFactory';
|
|
18
|
+
export * from './QueryParserFactory';
|
|
19
|
+
export * from './RequestColumnExpansionFactory';
|
|
20
|
+
export * from './TemplateFactory';
|
|
21
|
+
export * from './ChangesDeltaFactory';
|
|
22
|
+
export * from './ChangesProcessorFactory';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './core';
|
|
2
|
-
export * from './constants';
|
|
3
|
-
export * from './models';
|
|
4
|
-
export * from './interfaces';
|
|
5
|
-
export * from './classes';
|
|
6
|
-
export * from './factories';
|
|
7
|
-
export * from './types';
|
|
1
|
+
export * from './core';
|
|
2
|
+
export * from './constants';
|
|
3
|
+
export * from './models';
|
|
4
|
+
export * from './interfaces';
|
|
5
|
+
export * from './classes';
|
|
6
|
+
export * from './factories';
|
|
7
|
+
export * from './types';
|
|
@@ -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,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,7 +1,7 @@
|
|
|
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';
|
|
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';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
|
|
2
|
-
import { ChangesDeltaResult } from '../classes/ChangesDeltaBase';
|
|
3
|
-
import { CollectionResourceFactory } from '../factories';
|
|
4
|
-
import { CollectionEntry, CollectionResource, CollectionResourceOptions, ItemEntry, ItemResource, LocalViewResource } from '../models';
|
|
5
|
-
import { FieldMap, ItemId, ItemType, PromiseInterface } from '../types';
|
|
6
|
-
export declare class CollectionEditResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> extends CollectionResource<ItemTypeType, T> {
|
|
7
|
-
constructor(factory: CollectionResourceFactory, collectionEntry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, transactionCache: TransactionCache);
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated
|
|
10
|
-
* Use {@link ChangesDelta.setItemMoved ChangesDelta.setItemMoved}
|
|
11
|
-
*/
|
|
12
|
-
moveItems(itemEntries: Array<ItemEntry<ItemTypeType>>, destinationResource: CollectionResource<ItemTypeType>): void;
|
|
13
|
-
removeItems(idArray: ItemId[]): void;
|
|
14
|
-
removeItem(itemId: ItemId): void;
|
|
15
|
-
addItems(valuesArray: Array<FieldMap<ItemTypeType>>): PromiseInterface<ChangesDeltaResult>;
|
|
16
|
-
addItem(values: FieldMap<ItemTypeType>): PromiseInterface<ChangesDeltaResult>;
|
|
17
|
-
}
|
|
1
|
+
import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
|
|
2
|
+
import { ChangesDeltaResult } from '../classes/ChangesDeltaBase';
|
|
3
|
+
import { CollectionResourceFactory } from '../factories';
|
|
4
|
+
import { CollectionEntry, CollectionResource, CollectionResourceOptions, ItemEntry, ItemResource, LocalViewResource } from '../models';
|
|
5
|
+
import { FieldMap, ItemId, ItemType, PromiseInterface } from '../types';
|
|
6
|
+
export declare class CollectionEditResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> extends CollectionResource<ItemTypeType, T> {
|
|
7
|
+
constructor(factory: CollectionResourceFactory, collectionEntry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, transactionCache: TransactionCache);
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated
|
|
10
|
+
* Use {@link ChangesDelta.setItemMoved ChangesDelta.setItemMoved}
|
|
11
|
+
*/
|
|
12
|
+
moveItems(itemEntries: Array<ItemEntry<ItemTypeType>>, destinationResource: CollectionResource<ItemTypeType>): void;
|
|
13
|
+
removeItems(idArray: ItemId[]): void;
|
|
14
|
+
removeItem(itemId: ItemId): void;
|
|
15
|
+
addItems(valuesArray: Array<FieldMap<ItemTypeType>>): PromiseInterface<ChangesDeltaResult>;
|
|
16
|
+
addItem(values: FieldMap<ItemTypeType>): PromiseInterface<ChangesDeltaResult>;
|
|
17
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { CollectionEntryService, ColumnExpansion, ColumnInfo, ColumnSet, KeyService } from '../classes';
|
|
2
|
-
import { ColumnSetFactory } from '../factories';
|
|
3
|
-
import { CollectionEntryOptions } from '../models';
|
|
4
|
-
import { ApiQuery, ApiRequestColumns, CollectionQuery, EntryParentNull, ItemId, ItemIdConversionMap, ItemType, PromiseInterface, QueryCallback } from '../types';
|
|
5
|
-
export declare class CollectionEntry<ItemTypeType extends ItemType = any> {
|
|
6
|
-
private collectionEntryService;
|
|
7
|
-
private columnSetFactory;
|
|
8
|
-
private keyService;
|
|
9
|
-
itemType: ItemTypeType;
|
|
10
|
-
options: CollectionEntryOptions;
|
|
11
|
-
id: number;
|
|
12
|
-
parent: EntryParentNull;
|
|
13
|
-
query: CollectionQuery;
|
|
14
|
-
columns: ColumnSet<ItemTypeType>;
|
|
15
|
-
reloadQueued: boolean;
|
|
16
|
-
promise: PromiseInterface<this>;
|
|
17
|
-
constructor(collectionEntryService: CollectionEntryService, columnSetFactory: ColumnSetFactory, keyService: KeyService, itemType: ItemTypeType, options: CollectionEntryOptions);
|
|
18
|
-
isLocal(): boolean;
|
|
19
|
-
matchParent(itemType: ItemType, itemId: ItemId): boolean;
|
|
20
|
-
extendQuery(callback?: QueryCallback): ApiQuery;
|
|
21
|
-
queueReload(): void;
|
|
22
|
-
expandColumns(columnExpansion: ColumnExpansion<ItemTypeType>): void;
|
|
23
|
-
expandRequestColumns(requestColumns: ApiRequestColumns): void;
|
|
24
|
-
getUpdatedItemColumns(conversionMap: ItemIdConversionMap): {
|
|
25
|
-
[columnId: string]: ColumnInfo<ItemTypeType>;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
1
|
+
import { CollectionEntryService, ColumnExpansion, ColumnInfo, ColumnSet, KeyService } from '../classes';
|
|
2
|
+
import { ColumnSetFactory } from '../factories';
|
|
3
|
+
import { CollectionEntryOptions } from '../models';
|
|
4
|
+
import { ApiQuery, ApiRequestColumns, CollectionQuery, EntryParentNull, ItemId, ItemIdConversionMap, ItemType, PromiseInterface, QueryCallback } from '../types';
|
|
5
|
+
export declare class CollectionEntry<ItemTypeType extends ItemType = any> {
|
|
6
|
+
private collectionEntryService;
|
|
7
|
+
private columnSetFactory;
|
|
8
|
+
private keyService;
|
|
9
|
+
itemType: ItemTypeType;
|
|
10
|
+
options: CollectionEntryOptions;
|
|
11
|
+
id: number;
|
|
12
|
+
parent: EntryParentNull;
|
|
13
|
+
query: CollectionQuery;
|
|
14
|
+
columns: ColumnSet<ItemTypeType>;
|
|
15
|
+
reloadQueued: boolean;
|
|
16
|
+
promise: PromiseInterface<this>;
|
|
17
|
+
constructor(collectionEntryService: CollectionEntryService, columnSetFactory: ColumnSetFactory, keyService: KeyService, itemType: ItemTypeType, options: CollectionEntryOptions);
|
|
18
|
+
isLocal(): boolean;
|
|
19
|
+
matchParent(itemType: ItemType, itemId: ItemId): boolean;
|
|
20
|
+
extendQuery(callback?: QueryCallback): ApiQuery;
|
|
21
|
+
queueReload(): void;
|
|
22
|
+
expandColumns(columnExpansion: ColumnExpansion<ItemTypeType>): void;
|
|
23
|
+
expandRequestColumns(requestColumns: ApiRequestColumns): void;
|
|
24
|
+
getUpdatedItemColumns(conversionMap: ItemIdConversionMap): {
|
|
25
|
+
[columnId: string]: ColumnInfo<ItemTypeType>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ApiQuery, ApiRequestColumns, ApiRequestLimit, EntryParentNull } from '../types';
|
|
2
|
-
export declare type CollectionEntryOptionsInterface = Partial<CollectionEntryOptions>;
|
|
3
|
-
export declare class CollectionEntryOptions {
|
|
4
|
-
columns: ApiRequestColumns;
|
|
5
|
-
query: ApiQuery | null;
|
|
6
|
-
queryParams: any;
|
|
7
|
-
queryColumns: ApiRequestColumns;
|
|
8
|
-
parent: EntryParentNull;
|
|
9
|
-
deferRequest: boolean;
|
|
10
|
-
limit: ApiRequestLimit | null;
|
|
11
|
-
entryKey: string | null;
|
|
12
|
-
constructor(values: CollectionEntryOptionsInterface);
|
|
13
|
-
}
|
|
1
|
+
import { ApiQuery, ApiRequestColumns, ApiRequestLimit, EntryParentNull } from '../types';
|
|
2
|
+
export declare type CollectionEntryOptionsInterface = Partial<CollectionEntryOptions>;
|
|
3
|
+
export declare class CollectionEntryOptions {
|
|
4
|
+
columns: ApiRequestColumns;
|
|
5
|
+
query: ApiQuery | null;
|
|
6
|
+
queryParams: any;
|
|
7
|
+
queryColumns: ApiRequestColumns;
|
|
8
|
+
parent: EntryParentNull;
|
|
9
|
+
deferRequest: boolean;
|
|
10
|
+
limit: ApiRequestLimit | null;
|
|
11
|
+
entryKey: string | null;
|
|
12
|
+
constructor(values: CollectionEntryOptionsInterface);
|
|
13
|
+
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
|
|
2
|
-
import { CollectionResourceFactory } from '../factories';
|
|
3
|
-
import { CollectionEntry, CollectionResourceOptions, ItemEntry, ItemResource, LocalViewResource } from '../models';
|
|
4
|
-
import { ItemId, ItemResourceItemIdMap, ItemType, PromiseInterface, QueryCallback, ResponseColumnItemTypeMap } from '../types';
|
|
5
|
-
export declare abstract class CollectionResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> {
|
|
6
|
-
protected factory: CollectionResourceFactory;
|
|
7
|
-
entry: CollectionEntry<ItemTypeType>;
|
|
8
|
-
options: CollectionResourceOptions<ItemTypeType>;
|
|
9
|
-
transaction: TransactionCache;
|
|
10
|
-
items: T[];
|
|
11
|
-
columns: ResponseColumnItemTypeMap;
|
|
12
|
-
protected itemIdMap: ItemResourceItemIdMap<T>;
|
|
13
|
-
private readonly onChange;
|
|
14
|
-
protected constructor(factory: CollectionResourceFactory, entry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, transaction: TransactionCache);
|
|
15
|
-
onConstruct(): void;
|
|
16
|
-
getIdArray(): ItemId[];
|
|
17
|
-
getItemById(itemId: number): T;
|
|
18
|
-
addItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>, isInitialCall?: boolean): T[];
|
|
19
|
-
/**
|
|
20
|
-
* @description
|
|
21
|
-
* Returns the {@link ItemResource ItemResources} that where removed from the {@link CollectionResource collection}.
|
|
22
|
-
* Filters on {@link ItemResource ItemResource}.{@link ItemEntry entry} === {@link ItemEntry entry}
|
|
23
|
-
*/
|
|
24
|
-
removeItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>): T[];
|
|
25
|
-
callOnAdd(itemResources: T[], isInitialCall?: boolean): void;
|
|
26
|
-
callOnRemove(itemResources: T[]): void;
|
|
27
|
-
forEach(callback: (itemResource: T) => void): void;
|
|
28
|
-
filter(callback: (itemResource: T) => boolean): T[];
|
|
29
|
-
first(callback: (itemResource: T) => boolean): T | null;
|
|
30
|
-
some(callback: (itemResource: T) => boolean): boolean;
|
|
31
|
-
groupBy(argument: string | ((itemResource: T) => string | null)): {
|
|
32
|
-
[key: string]: T[];
|
|
33
|
-
};
|
|
34
|
-
map<U>(argument: string | ((itemResource: T) => U)): U[];
|
|
35
|
-
reduce<U>(callback: (itemResource: T, value: U) => U, value: U): U;
|
|
36
|
-
/**
|
|
37
|
-
* @description
|
|
38
|
-
* Fetches new items and adds them to the collection
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* - Used to return {@link ItemResource ItemResources}, but you should the {@link CollectionResource.onAdd onAdd) instead
|
|
42
|
-
*/
|
|
43
|
-
extend(queryCallback: QueryCallback): PromiseInterface<CollectionEntry<ItemTypeType>>;
|
|
44
|
-
/**
|
|
45
|
-
* @description
|
|
46
|
-
* Removes the reference to the {@link CollectionResource CollectionResource} from the {@link CollectionEntry CollectionEntry}
|
|
47
|
-
*
|
|
48
|
-
* @remarks
|
|
49
|
-
* - Doesn't revert changes on the items themselves
|
|
50
|
-
*/
|
|
51
|
-
clearResource(clearItems?: boolean): void;
|
|
52
|
-
}
|
|
1
|
+
import { TransactionCache } from '../classes/cache/transaction/TransactionCache';
|
|
2
|
+
import { CollectionResourceFactory } from '../factories';
|
|
3
|
+
import { CollectionEntry, CollectionResourceOptions, ItemEntry, ItemResource, LocalViewResource } from '../models';
|
|
4
|
+
import { ItemId, ItemResourceItemIdMap, ItemType, PromiseInterface, QueryCallback, ResponseColumnItemTypeMap } from '../types';
|
|
5
|
+
export declare abstract class CollectionResource<ItemTypeType extends ItemType = any, T extends ItemResource<ItemTypeType> = LocalViewResource<ItemTypeType>> {
|
|
6
|
+
protected factory: CollectionResourceFactory;
|
|
7
|
+
entry: CollectionEntry<ItemTypeType>;
|
|
8
|
+
options: CollectionResourceOptions<ItemTypeType>;
|
|
9
|
+
transaction: TransactionCache;
|
|
10
|
+
items: T[];
|
|
11
|
+
columns: ResponseColumnItemTypeMap;
|
|
12
|
+
protected itemIdMap: ItemResourceItemIdMap<T>;
|
|
13
|
+
private readonly onChange;
|
|
14
|
+
protected constructor(factory: CollectionResourceFactory, entry: CollectionEntry<ItemTypeType>, options: CollectionResourceOptions<ItemTypeType>, transaction: TransactionCache);
|
|
15
|
+
onConstruct(): void;
|
|
16
|
+
getIdArray(): ItemId[];
|
|
17
|
+
getItemById(itemId: number): T;
|
|
18
|
+
addItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>, isInitialCall?: boolean): T[];
|
|
19
|
+
/**
|
|
20
|
+
* @description
|
|
21
|
+
* Returns the {@link ItemResource ItemResources} that where removed from the {@link CollectionResource collection}.
|
|
22
|
+
* Filters on {@link ItemResource ItemResource}.{@link ItemEntry entry} === {@link ItemEntry entry}
|
|
23
|
+
*/
|
|
24
|
+
removeItemResources(itemEntries: Array<ItemEntry<ItemTypeType>>): T[];
|
|
25
|
+
callOnAdd(itemResources: T[], isInitialCall?: boolean): void;
|
|
26
|
+
callOnRemove(itemResources: T[]): void;
|
|
27
|
+
forEach(callback: (itemResource: T) => void): void;
|
|
28
|
+
filter(callback: (itemResource: T) => boolean): T[];
|
|
29
|
+
first(callback: (itemResource: T) => boolean): T | null;
|
|
30
|
+
some(callback: (itemResource: T) => boolean): boolean;
|
|
31
|
+
groupBy(argument: string | ((itemResource: T) => string | null)): {
|
|
32
|
+
[key: string]: T[];
|
|
33
|
+
};
|
|
34
|
+
map<U>(argument: string | ((itemResource: T) => U)): U[];
|
|
35
|
+
reduce<U>(callback: (itemResource: T, value: U) => U, value: U): U;
|
|
36
|
+
/**
|
|
37
|
+
* @description
|
|
38
|
+
* Fetches new items and adds them to the collection
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* - Used to return {@link ItemResource ItemResources}, but you should the {@link CollectionResource.onAdd onAdd) instead
|
|
42
|
+
*/
|
|
43
|
+
extend(queryCallback: QueryCallback): PromiseInterface<CollectionEntry<ItemTypeType>>;
|
|
44
|
+
/**
|
|
45
|
+
* @description
|
|
46
|
+
* Removes the reference to the {@link CollectionResource CollectionResource} from the {@link CollectionEntry CollectionEntry}
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* - Doesn't revert changes on the items themselves
|
|
50
|
+
*/
|
|
51
|
+
clearResource(clearItems?: boolean): void;
|
|
52
|
+
}
|