@rentman/rm-core 7.0.5 → 7.0.6
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 +820 -817
- package/dist/rm-core.js +9804 -9800
- package/dist/rm-core.min.js +1 -1
- package/dist/types/classes/ApiFormatter.d.ts +65 -65
- package/dist/types/classes/ApiRequestService.d.ts +20 -20
- package/dist/types/classes/ApiResponseProcessor.d.ts +31 -31
- package/dist/types/classes/ChangesCompilation.d.ts +34 -34
- package/dist/types/classes/ChangesDelta.d.ts +61 -61
- package/dist/types/classes/ChangesDeltaBase.d.ts +51 -51
- package/dist/types/classes/ChangesProcessor.d.ts +47 -47
- package/dist/types/classes/CollectionEntryService.d.ts +26 -26
- package/dist/types/classes/CollectionMatcherBase.d.ts +21 -21
- package/dist/types/classes/CollectionMatcherCachedCollectionProcessor.d.ts +31 -31
- package/dist/types/classes/CollectionResourceService.d.ts +7 -7
- package/dist/types/classes/ColumnCache.d.ts +21 -21
- package/dist/types/classes/ColumnExpansion.d.ts +22 -22
- package/dist/types/classes/ColumnHandler.d.ts +21 -21
- package/dist/types/classes/ColumnInfo.d.ts +14 -14
- package/dist/types/classes/ColumnSet.d.ts +38 -38
- package/dist/types/classes/ColumnSubsetCache.d.ts +10 -10
- package/dist/types/classes/ColumnUtil.d.ts +99 -99
- package/dist/types/classes/ConversionMapService.d.ts +27 -27
- package/dist/types/classes/CreateRequest.d.ts +19 -19
- package/dist/types/classes/CreatedChangesDelta.d.ts +16 -16
- package/dist/types/classes/InternalChangesDelta.d.ts +39 -39
- package/dist/types/classes/ItemCache.d.ts +29 -29
- package/dist/types/classes/ItemCreateService.d.ts +24 -24
- package/dist/types/classes/ItemEntryService.d.ts +34 -34
- package/dist/types/classes/KeyService.d.ts +17 -17
- package/dist/types/classes/LockService.d.ts +32 -32
- package/dist/types/classes/ModuleChangesCompilation.d.ts +18 -18
- package/dist/types/classes/QueryColumnExtractor.d.ts +20 -20
- package/dist/types/classes/QueryContainsLocalIdParser.d.ts +17 -17
- package/dist/types/classes/QueryLinkedToParser.d.ts +16 -16
- package/dist/types/classes/QueryLocallyMatchableParser.d.ts +19 -19
- package/dist/types/classes/QueryMatcher.d.ts +18 -18
- package/dist/types/classes/QueryParser.d.ts +24 -24
- package/dist/types/classes/QueryParserBase.d.ts +29 -29
- package/dist/types/classes/QueryParserIdUpdater.d.ts +16 -16
- package/dist/types/classes/QueryService.d.ts +18 -18
- package/dist/types/classes/RequestBuffer.d.ts +28 -28
- package/dist/types/classes/RequestBufferManager.d.ts +25 -25
- package/dist/types/classes/RequestColumnExpansion.d.ts +15 -15
- package/dist/types/classes/SocketMessageHandler.d.ts +39 -39
- package/dist/types/classes/TemplateCache.d.ts +66 -66
- package/dist/types/classes/Util.d.ts +31 -31
- package/dist/types/classes/cache/AbstractCache.d.ts +103 -103
- package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +74 -74
- package/dist/types/classes/cache/CollectionMatcherCachedQueryProcessor.d.ts +35 -35
- package/dist/types/classes/cache/ItemHandlerBase.d.ts +105 -105
- package/dist/types/classes/cache/server/ServerCache.d.ts +82 -82
- package/dist/types/classes/cache/server/ServerCachedQueryHandler.d.ts +34 -34
- package/dist/types/classes/cache/server/ServerItemHandler.d.ts +52 -52
- package/dist/types/classes/cache/transaction/TransactionCache.d.ts +324 -324
- package/dist/types/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +23 -23
- package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +28 -28
- package/dist/types/classes/cache/transaction/TransactionEventHandler.d.ts +24 -24
- package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +90 -90
- package/dist/types/classes/cache/transaction/TransactionValidator.d.ts +34 -34
- package/dist/types/classes/index.d.ts +46 -46
- package/dist/types/constants.d.ts +7 -7
- package/dist/types/core.d.ts +51 -51
- package/dist/types/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/types/factories/ChangesCompilationFactory.d.ts +6 -6
- package/dist/types/factories/ChangesDeltaFactory.d.ts +13 -13
- package/dist/types/factories/ChangesProcessorFactory.d.ts +22 -22
- package/dist/types/factories/CollectionEntryFactory.d.ts +14 -14
- package/dist/types/factories/CollectionMatcherFactory.d.ts +19 -19
- package/dist/types/factories/CollectionResourceFactory.d.ts +22 -22
- package/dist/types/factories/ColumnExpansionFactory.d.ts +8 -8
- package/dist/types/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/types/factories/ColumnSetFactory.d.ts +19 -19
- package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +7 -7
- package/dist/types/factories/CreateRequestFactory.d.ts +11 -11
- package/dist/types/factories/ItemCacheFactory.d.ts +8 -8
- package/dist/types/factories/ItemEntryFactory.d.ts +15 -15
- package/dist/types/factories/ItemResourceFactory.d.ts +14 -14
- package/dist/types/factories/ModuleChangesCompilationFactory.d.ts +5 -5
- package/dist/types/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/types/factories/QueryParserFactory.d.ts +6 -6
- package/dist/types/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/types/factories/TemplateFactory.d.ts +10 -10
- package/dist/types/factories/TransactionCacheFactory.d.ts +15 -15
- package/dist/types/factories/index.d.ts +21 -21
- package/dist/types/index.d.ts +7 -7
- package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +43 -43
- package/dist/types/interfaces/ApiRequestServiceInterface.d.ts +11 -11
- package/dist/types/interfaces/AuthInterface.d.ts +9 -9
- package/dist/types/interfaces/ErrorHandlerInterface.d.ts +5 -5
- package/dist/types/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/types/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/types/interfaces/PromiseLibraryInterface.d.ts +25 -25
- package/dist/types/interfaces/ServerCacheDependencyInterface.d.ts +7 -7
- package/dist/types/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +20 -20
- package/dist/types/interfaces/TransactionItemHandlerDependencyInterface.d.ts +26 -27
- package/dist/types/interfaces/index.d.ts +11 -11
- package/dist/types/models/CollectionEntry.d.ts +23 -23
- package/dist/types/models/CollectionOptions.d.ts +18 -18
- package/dist/types/models/CollectionResource.d.ts +72 -72
- package/dist/types/models/ItemEntry.d.ts +19 -19
- package/dist/types/models/ItemEntryOptions.d.ts +8 -8
- package/dist/types/models/ItemResource.d.ts +84 -84
- package/dist/types/models/Template.d.ts +11 -11
- package/dist/types/models/index.d.ts +7 -7
- package/dist/types/types/ItemTypesCollection.d.ts +262 -262
- package/dist/types/types/PromiseInterface.d.ts +2 -2
- package/dist/types/types/index.d.ts +2 -2
- package/package.json +36 -36
- package/readme.md +15 -15
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ApiResponseProcessor } from '../classes';
|
|
2
|
-
import { ApiResponseProcessorFactory } from '../factories';
|
|
3
|
-
import { ApiRequestServiceInterface } from '../interfaces';
|
|
4
|
-
import { ApiRequestColumnMap, ApiRequestItemMap, ApiRequestLimit, ItemId, ItemType, PromiseInterface } from '../types';
|
|
5
|
-
export declare class ApiRequestService {
|
|
6
|
-
private externalApiRequestService;
|
|
7
|
-
private apiResponseProcessorFactory;
|
|
8
|
-
constructor(externalApiRequestService: ApiRequestServiceInterface, apiResponseProcessorFactory: ApiResponseProcessorFactory);
|
|
9
|
-
template(itemType: ItemType, params: any): PromiseInterface<ApiResponseProcessor>;
|
|
10
|
-
create(itemType: ItemType, itemId: ItemId, values: any, parentType?: ItemType, parentId?: ItemId): PromiseInterface<ApiResponseProcessor>;
|
|
11
|
-
delete(itemType: ItemType, itemIds: ItemId[]): PromiseInterface<ApiResponseProcessor>;
|
|
12
|
-
updateItems(itemType: ItemType, items: ApiRequestItemMap, columns: any): PromiseInterface<ApiResponseProcessor>;
|
|
13
|
-
requestSkeleton(params: any, requestCanceler?: PromiseInterface<any>): PromiseInterface<ApiResponseProcessor>;
|
|
14
|
-
moveItems(parentType: ItemType, parentId: ItemId, items: {
|
|
15
|
-
[itemType: string]: ItemId[];
|
|
16
|
-
}): PromiseInterface<ApiResponseProcessor>;
|
|
17
|
-
columns(itemType: ItemType, columns: ApiRequestColumnMap, params?: any): PromiseInterface<ApiResponseProcessor>;
|
|
18
|
-
query(itemType: ItemType, query: any, columns: ApiRequestColumnMap, limit?: ApiRequestLimit): PromiseInterface<ApiResponseProcessor>;
|
|
19
|
-
processResponse(request: any): PromiseInterface<ApiResponseProcessor>;
|
|
20
|
-
}
|
|
1
|
+
import { ApiResponseProcessor } from '../classes';
|
|
2
|
+
import { ApiResponseProcessorFactory } from '../factories';
|
|
3
|
+
import { ApiRequestServiceInterface } from '../interfaces';
|
|
4
|
+
import { ApiRequestColumnMap, ApiRequestItemMap, ApiRequestLimit, ItemId, ItemType, PromiseInterface } from '../types';
|
|
5
|
+
export declare class ApiRequestService {
|
|
6
|
+
private externalApiRequestService;
|
|
7
|
+
private apiResponseProcessorFactory;
|
|
8
|
+
constructor(externalApiRequestService: ApiRequestServiceInterface, apiResponseProcessorFactory: ApiResponseProcessorFactory);
|
|
9
|
+
template(itemType: ItemType, params: any): PromiseInterface<ApiResponseProcessor>;
|
|
10
|
+
create(itemType: ItemType, itemId: ItemId, values: any, parentType?: ItemType, parentId?: ItemId): PromiseInterface<ApiResponseProcessor>;
|
|
11
|
+
delete(itemType: ItemType, itemIds: ItemId[]): PromiseInterface<ApiResponseProcessor>;
|
|
12
|
+
updateItems(itemType: ItemType, items: ApiRequestItemMap, columns: any): PromiseInterface<ApiResponseProcessor>;
|
|
13
|
+
requestSkeleton(params: any, requestCanceler?: PromiseInterface<any>): PromiseInterface<ApiResponseProcessor>;
|
|
14
|
+
moveItems(parentType: ItemType, parentId: ItemId, items: {
|
|
15
|
+
[itemType: string]: ItemId[];
|
|
16
|
+
}): PromiseInterface<ApiResponseProcessor>;
|
|
17
|
+
columns(itemType: ItemType, columns: ApiRequestColumnMap, params?: any): PromiseInterface<ApiResponseProcessor>;
|
|
18
|
+
query(itemType: ItemType, query: any, columns: ApiRequestColumnMap, limit?: ApiRequestLimit): PromiseInterface<ApiResponseProcessor>;
|
|
19
|
+
processResponse(request: any): PromiseInterface<ApiResponseProcessor>;
|
|
20
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ApiFormatter } from '../classes';
|
|
2
|
-
import { ColumnIdTypeMap, FieldMap, ItemId, ItemType, ItemTypeMap, ResponseColumn } from '../types';
|
|
3
|
-
export declare class ApiResponseProcessor<RequestItemType extends ItemType = any> {
|
|
4
|
-
apiFormatter: ApiFormatter;
|
|
5
|
-
response: any;
|
|
6
|
-
itemType: RequestItemType;
|
|
7
|
-
columns: ItemTypeMap<ResponseColumn[]>;
|
|
8
|
-
links: ItemTypeMap<ItemId[]>;
|
|
9
|
-
cacheable: boolean;
|
|
10
|
-
map: any;
|
|
11
|
-
items: any;
|
|
12
|
-
columnIndexMap: {
|
|
13
|
-
[itemType: string]: {
|
|
14
|
-
[columnId: string]: number;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
columnMap: any;
|
|
18
|
-
constructor(apiFormatter: ApiFormatter, response: any);
|
|
19
|
-
fetchColumnObject(itemType: ItemType): ResponseColumn;
|
|
20
|
-
fetchValue(itemType: ItemType, itemId: ItemId, columnId: string): any;
|
|
21
|
-
fetchColumnArray(itemType: ItemType): ResponseColumn[];
|
|
22
|
-
fetchDerivedObject(itemType: ItemType, itemId: ItemId, rootColumns: ResponseColumn[]): {};
|
|
23
|
-
fetchDerivedValues(value: any, column: ResponseColumn, destination: any): void;
|
|
24
|
-
fetchObject<Fields extends ColumnIdTypeMap, ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: string | ItemId): FieldMap<ItemTypeType, Fields> | undefined;
|
|
25
|
-
fetchObjectArray<ItemTypeType extends ItemType>(itemType: ItemTypeType, idArray?: ItemId[] | null): Array<FieldMap<ItemTypeType>>;
|
|
26
|
-
fetchColumnsObject(): {
|
|
27
|
-
[itemType: string]: ResponseColumn;
|
|
28
|
-
};
|
|
29
|
-
private addLazyFormattingFunction;
|
|
30
|
-
private createColumnMaps;
|
|
31
|
-
}
|
|
1
|
+
import { ApiFormatter } from '../classes';
|
|
2
|
+
import { ColumnIdTypeMap, FieldMap, ItemId, ItemType, ItemTypeMap, ResponseColumn } from '../types';
|
|
3
|
+
export declare class ApiResponseProcessor<RequestItemType extends ItemType = any> {
|
|
4
|
+
apiFormatter: ApiFormatter;
|
|
5
|
+
response: any;
|
|
6
|
+
itemType: RequestItemType;
|
|
7
|
+
columns: ItemTypeMap<ResponseColumn[]>;
|
|
8
|
+
links: ItemTypeMap<ItemId[]>;
|
|
9
|
+
cacheable: boolean;
|
|
10
|
+
map: any;
|
|
11
|
+
items: any;
|
|
12
|
+
columnIndexMap: {
|
|
13
|
+
[itemType: string]: {
|
|
14
|
+
[columnId: string]: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
columnMap: any;
|
|
18
|
+
constructor(apiFormatter: ApiFormatter, response: any);
|
|
19
|
+
fetchColumnObject(itemType: ItemType): ResponseColumn;
|
|
20
|
+
fetchValue(itemType: ItemType, itemId: ItemId, columnId: string): any;
|
|
21
|
+
fetchColumnArray(itemType: ItemType): ResponseColumn[];
|
|
22
|
+
fetchDerivedObject(itemType: ItemType, itemId: ItemId, rootColumns: ResponseColumn[]): {};
|
|
23
|
+
fetchDerivedValues(value: any, column: ResponseColumn, destination: any): void;
|
|
24
|
+
fetchObject<Fields extends ColumnIdTypeMap, ItemTypeType extends ItemType>(itemType: ItemTypeType, itemId: string | ItemId): FieldMap<ItemTypeType, Fields> | undefined;
|
|
25
|
+
fetchObjectArray<ItemTypeType extends ItemType>(itemType: ItemTypeType, idArray?: ItemId[] | null): Array<FieldMap<ItemTypeType>>;
|
|
26
|
+
fetchColumnsObject(): {
|
|
27
|
+
[itemType: string]: ResponseColumn;
|
|
28
|
+
};
|
|
29
|
+
private addLazyFormattingFunction;
|
|
30
|
+
private createColumnMaps;
|
|
31
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { ItemEntry } from '../models';
|
|
2
|
-
import { ItemEntryMap, ItemMap, ItemType } from '../types';
|
|
3
|
-
import { TransactionCache } from './cache/transaction/TransactionCache';
|
|
4
|
-
import { InternalCreateDelta } from './InternalChangesDelta';
|
|
5
|
-
export declare type CreateCompilation = {
|
|
6
|
-
[parentType: string]: {
|
|
7
|
-
[parentId: number]: ItemMap<InternalCreateDelta>;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare type DeleteCompilation = {
|
|
11
|
-
[itemType: string]: Array<ItemEntry<ItemType>>;
|
|
12
|
-
};
|
|
13
|
-
export declare type UpdateCompilation = ItemEntryMap<ItemType>;
|
|
14
|
-
export declare type MoveCompilation = {
|
|
15
|
-
[parentType: string]: {
|
|
16
|
-
[parentId: number]: ItemEntry[];
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export declare class ChangesCompilation {
|
|
20
|
-
private transaction;
|
|
21
|
-
compilation: {
|
|
22
|
-
create: CreateCompilation;
|
|
23
|
-
delete: DeleteCompilation;
|
|
24
|
-
update: UpdateCompilation;
|
|
25
|
-
move: MoveCompilation;
|
|
26
|
-
};
|
|
27
|
-
constructor(transaction: TransactionCache);
|
|
28
|
-
private processDelta;
|
|
29
|
-
private getDefaultParent;
|
|
30
|
-
private addMoveEntry;
|
|
31
|
-
private addDeleteEntry;
|
|
32
|
-
private addUpdateEntry;
|
|
33
|
-
private addCreateEntry;
|
|
34
|
-
}
|
|
1
|
+
import { ItemEntry } from '../models';
|
|
2
|
+
import { ItemEntryMap, ItemMap, ItemType } from '../types';
|
|
3
|
+
import { TransactionCache } from './cache/transaction/TransactionCache';
|
|
4
|
+
import { InternalCreateDelta } from './InternalChangesDelta';
|
|
5
|
+
export declare type CreateCompilation = {
|
|
6
|
+
[parentType: string]: {
|
|
7
|
+
[parentId: number]: ItemMap<InternalCreateDelta>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare type DeleteCompilation = {
|
|
11
|
+
[itemType: string]: Array<ItemEntry<ItemType>>;
|
|
12
|
+
};
|
|
13
|
+
export declare type UpdateCompilation = ItemEntryMap<ItemType>;
|
|
14
|
+
export declare type MoveCompilation = {
|
|
15
|
+
[parentType: string]: {
|
|
16
|
+
[parentId: number]: ItemEntry[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare class ChangesCompilation {
|
|
20
|
+
private transaction;
|
|
21
|
+
compilation: {
|
|
22
|
+
create: CreateCompilation;
|
|
23
|
+
delete: DeleteCompilation;
|
|
24
|
+
update: UpdateCompilation;
|
|
25
|
+
move: MoveCompilation;
|
|
26
|
+
};
|
|
27
|
+
constructor(transaction: TransactionCache);
|
|
28
|
+
private processDelta;
|
|
29
|
+
private getDefaultParent;
|
|
30
|
+
private addMoveEntry;
|
|
31
|
+
private addDeleteEntry;
|
|
32
|
+
private addUpdateEntry;
|
|
33
|
+
private addCreateEntry;
|
|
34
|
+
}
|
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { ErrorHandlerInterface } from '../interfaces';
|
|
2
|
-
import { ItemEntry } from '../models';
|
|
3
|
-
import { EntryParent, EntryParentNull, FieldMap, ItemId, ItemType, PromiseInterface } from '../types';
|
|
4
|
-
import { ChangesDeltaBase } from './ChangesDeltaBase';
|
|
5
|
-
import { ColumnSet } from './ColumnSet';
|
|
6
|
-
import { CreatedChangesDelta } from './CreatedChangesDelta';
|
|
7
|
-
import { ItemCreateService } from './ItemCreateService';
|
|
8
|
-
import { ItemEntryService } from './ItemEntryService';
|
|
9
|
-
/**
|
|
10
|
-
* @description
|
|
11
|
-
* ChangesDelta used to apply changes from outside of the core to a transaction
|
|
12
|
-
*
|
|
13
|
-
* ----------
|
|
14
|
-
*
|
|
15
|
-
* The difference between {@link InternalChangesDelta InternalChangesDelta} and {@link ChangesDelta ChangesDelta} is that the ChangesDelta
|
|
16
|
-
* assumes 'created' values have no itemEntries yet.
|
|
17
|
-
*
|
|
18
|
-
* Use this when calling {@link TransactionCache.applyChangesDelta applyChangesDelta}
|
|
19
|
-
*/
|
|
20
|
-
export declare class ChangesDelta extends ChangesDeltaBase {
|
|
21
|
-
private errorHandler;
|
|
22
|
-
private itemCreateService;
|
|
23
|
-
created: CreatedChangesDelta;
|
|
24
|
-
constructor(errorHandler: ErrorHandlerInterface, itemCreateService: ItemCreateService, itemEntryService: ItemEntryService);
|
|
25
|
-
/**
|
|
26
|
-
* @description
|
|
27
|
-
* Fetches a template for the passed itemType and processes the passed values and sets the item to be created when the delta is applied
|
|
28
|
-
*
|
|
29
|
-
* @remark
|
|
30
|
-
* - If the values don't contain an `id` a new one will be generated
|
|
31
|
-
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
32
|
-
*/
|
|
33
|
-
setItemCreated<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType>>(itemType: ItemTypeType, values: Fields): PromiseInterface<this>;
|
|
34
|
-
/**
|
|
35
|
-
* @description
|
|
36
|
-
* Fetches a template for the passed itemType and processes the passed values and sets the items to be created when the delta is applied
|
|
37
|
-
*
|
|
38
|
-
* @remark
|
|
39
|
-
* - If the values don't contain an `id` a new one will be generated
|
|
40
|
-
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
41
|
-
*/
|
|
42
|
-
setItemsCreated<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType>>(itemType: ItemTypeType, valuesArray: Fields[]): PromiseInterface<this>;
|
|
43
|
-
/**
|
|
44
|
-
* @description
|
|
45
|
-
* Will create an {@link ItemEntry ItemEntry} when the delta is applied
|
|
46
|
-
* Does not always mean the item is local, just that it isn't cached yet
|
|
47
|
-
*
|
|
48
|
-
* @remark
|
|
49
|
-
* If you're calling this from the frontend you probably want to call `setItemCreated`, which will fetch a template and process the values for you
|
|
50
|
-
* If you don't, you have to make sure the values are all correct and all template items are processed
|
|
51
|
-
*
|
|
52
|
-
* @internal
|
|
53
|
-
*/
|
|
54
|
-
_setItemCreated<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType>>(itemId: ItemId, fields: Fields, columns: ColumnSet<ItemTypeType>, parent?: EntryParentNull): this;
|
|
55
|
-
/**
|
|
56
|
-
* @description
|
|
57
|
-
* Convenience function to assign the proper parent fields, will call {@link ChangesDeltaBase.setItemUpdated setItemUpdated} internally
|
|
58
|
-
*/
|
|
59
|
-
setItemMoved(entry: ItemEntry, to: EntryParent): this;
|
|
60
|
-
isEmpty(): boolean;
|
|
61
|
-
}
|
|
1
|
+
import { ErrorHandlerInterface } from '../interfaces';
|
|
2
|
+
import { ItemEntry } from '../models';
|
|
3
|
+
import { EntryParent, EntryParentNull, FieldMap, ItemId, ItemType, PromiseInterface } from '../types';
|
|
4
|
+
import { ChangesDeltaBase } from './ChangesDeltaBase';
|
|
5
|
+
import { ColumnSet } from './ColumnSet';
|
|
6
|
+
import { CreatedChangesDelta } from './CreatedChangesDelta';
|
|
7
|
+
import { ItemCreateService } from './ItemCreateService';
|
|
8
|
+
import { ItemEntryService } from './ItemEntryService';
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* ChangesDelta used to apply changes from outside of the core to a transaction
|
|
12
|
+
*
|
|
13
|
+
* ----------
|
|
14
|
+
*
|
|
15
|
+
* The difference between {@link InternalChangesDelta InternalChangesDelta} and {@link ChangesDelta ChangesDelta} is that the ChangesDelta
|
|
16
|
+
* assumes 'created' values have no itemEntries yet.
|
|
17
|
+
*
|
|
18
|
+
* Use this when calling {@link TransactionCache.applyChangesDelta applyChangesDelta}
|
|
19
|
+
*/
|
|
20
|
+
export declare class ChangesDelta extends ChangesDeltaBase {
|
|
21
|
+
private errorHandler;
|
|
22
|
+
private itemCreateService;
|
|
23
|
+
created: CreatedChangesDelta;
|
|
24
|
+
constructor(errorHandler: ErrorHandlerInterface, itemCreateService: ItemCreateService, itemEntryService: ItemEntryService);
|
|
25
|
+
/**
|
|
26
|
+
* @description
|
|
27
|
+
* Fetches a template for the passed itemType and processes the passed values and sets the item to be created when the delta is applied
|
|
28
|
+
*
|
|
29
|
+
* @remark
|
|
30
|
+
* - If the values don't contain an `id` a new one will be generated
|
|
31
|
+
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
32
|
+
*/
|
|
33
|
+
setItemCreated<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType>>(itemType: ItemTypeType, values: Fields): PromiseInterface<this>;
|
|
34
|
+
/**
|
|
35
|
+
* @description
|
|
36
|
+
* Fetches a template for the passed itemType and processes the passed values and sets the items to be created when the delta is applied
|
|
37
|
+
*
|
|
38
|
+
* @remark
|
|
39
|
+
* - If the values don't contain an `id` a new one will be generated
|
|
40
|
+
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
41
|
+
*/
|
|
42
|
+
setItemsCreated<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType>>(itemType: ItemTypeType, valuesArray: Fields[]): PromiseInterface<this>;
|
|
43
|
+
/**
|
|
44
|
+
* @description
|
|
45
|
+
* Will create an {@link ItemEntry ItemEntry} when the delta is applied
|
|
46
|
+
* Does not always mean the item is local, just that it isn't cached yet
|
|
47
|
+
*
|
|
48
|
+
* @remark
|
|
49
|
+
* If you're calling this from the frontend you probably want to call `setItemCreated`, which will fetch a template and process the values for you
|
|
50
|
+
* If you don't, you have to make sure the values are all correct and all template items are processed
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
_setItemCreated<ItemTypeType extends ItemType, Fields extends FieldMap<ItemTypeType>>(itemId: ItemId, fields: Fields, columns: ColumnSet<ItemTypeType>, parent?: EntryParentNull): this;
|
|
55
|
+
/**
|
|
56
|
+
* @description
|
|
57
|
+
* Convenience function to assign the proper parent fields, will call {@link ChangesDeltaBase.setItemUpdated setItemUpdated} internally
|
|
58
|
+
*/
|
|
59
|
+
setItemMoved(entry: ItemEntry, to: EntryParent): this;
|
|
60
|
+
isEmpty(): boolean;
|
|
61
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { ItemEntry } from '../models';
|
|
2
|
-
import { ColumnExpansionResult, EntryParentNull, FieldMap, ItemId, ItemIdConversionMap, ItemType } from '../types';
|
|
3
|
-
import { ItemEntryService } from './ItemEntryService';
|
|
4
|
-
export declare type ChangesDeltaResult = {
|
|
5
|
-
rollback: () => void;
|
|
6
|
-
created: ItemEntry[];
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* @remark
|
|
10
|
-
* We explicitly keep track of the new parent, so we can set an item to moved if it isn't null (Needed for linkTo request)
|
|
11
|
-
*/
|
|
12
|
-
export declare type ChangesDeltaItemUpdateDelta<ItemTypeType extends ItemType = any> = {
|
|
13
|
-
entry: ItemEntry<ItemTypeType>;
|
|
14
|
-
changes: {
|
|
15
|
-
expandedColumns: ColumnExpansionResult<ItemTypeType> | null;
|
|
16
|
-
fields: FieldMap<ItemTypeType>;
|
|
17
|
-
parent: EntryParentNull;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export declare type ChangesDeltaItemDeleteDelta = ItemEntry[];
|
|
21
|
-
export declare abstract class ChangesDeltaBase {
|
|
22
|
-
protected itemEntryService: ItemEntryService;
|
|
23
|
-
updated: {
|
|
24
|
-
[itemEntryId: number]: ChangesDeltaItemUpdateDelta;
|
|
25
|
-
};
|
|
26
|
-
deleted: {
|
|
27
|
-
[itemType: string]: ChangesDeltaItemDeleteDelta;
|
|
28
|
-
};
|
|
29
|
-
itemIdConversionMap: ItemIdConversionMap;
|
|
30
|
-
/**
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
_queryResults: {
|
|
34
|
-
[itemType: string]: {
|
|
35
|
-
[queryString: string]: ItemId[];
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
protected constructor(itemEntryService: ItemEntryService);
|
|
39
|
-
/**
|
|
40
|
-
* @description
|
|
41
|
-
* Adds a hint for the {@link CollectionMatcherBase CollectionMatcherBase] to the ChangesDelta, when the CollectionMatcher encounters a collection
|
|
42
|
-
* with the exact query, it will use the hint instead of running the matcher
|
|
43
|
-
*
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
_setQueryResult(itemType: ItemType, queryString: string, itemIds: ItemId[]): void;
|
|
47
|
-
setItemUpdated<ItemEntryType extends ItemEntry>(entry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>, columnExpansionResult?: ColumnExpansionResult<ItemEntryType['itemType']> | null, parent?: EntryParentNull): this;
|
|
48
|
-
setItemDeleted(deleted: ItemEntry): this;
|
|
49
|
-
setItemsDeleted(deleted: ItemEntry[]): this;
|
|
50
|
-
isEmpty(): boolean;
|
|
51
|
-
}
|
|
1
|
+
import { ItemEntry } from '../models';
|
|
2
|
+
import { ColumnExpansionResult, EntryParentNull, FieldMap, ItemId, ItemIdConversionMap, ItemType } from '../types';
|
|
3
|
+
import { ItemEntryService } from './ItemEntryService';
|
|
4
|
+
export declare type ChangesDeltaResult = {
|
|
5
|
+
rollback: () => void;
|
|
6
|
+
created: ItemEntry[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* @remark
|
|
10
|
+
* We explicitly keep track of the new parent, so we can set an item to moved if it isn't null (Needed for linkTo request)
|
|
11
|
+
*/
|
|
12
|
+
export declare type ChangesDeltaItemUpdateDelta<ItemTypeType extends ItemType = any> = {
|
|
13
|
+
entry: ItemEntry<ItemTypeType>;
|
|
14
|
+
changes: {
|
|
15
|
+
expandedColumns: ColumnExpansionResult<ItemTypeType> | null;
|
|
16
|
+
fields: FieldMap<ItemTypeType>;
|
|
17
|
+
parent: EntryParentNull;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare type ChangesDeltaItemDeleteDelta = ItemEntry[];
|
|
21
|
+
export declare abstract class ChangesDeltaBase {
|
|
22
|
+
protected itemEntryService: ItemEntryService;
|
|
23
|
+
updated: {
|
|
24
|
+
[itemEntryId: number]: ChangesDeltaItemUpdateDelta;
|
|
25
|
+
};
|
|
26
|
+
deleted: {
|
|
27
|
+
[itemType: string]: ChangesDeltaItemDeleteDelta;
|
|
28
|
+
};
|
|
29
|
+
itemIdConversionMap: ItemIdConversionMap;
|
|
30
|
+
/**
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
_queryResults: {
|
|
34
|
+
[itemType: string]: {
|
|
35
|
+
[queryString: string]: ItemId[];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
protected constructor(itemEntryService: ItemEntryService);
|
|
39
|
+
/**
|
|
40
|
+
* @description
|
|
41
|
+
* Adds a hint for the {@link CollectionMatcherBase CollectionMatcherBase] to the ChangesDelta, when the CollectionMatcher encounters a collection
|
|
42
|
+
* with the exact query, it will use the hint instead of running the matcher
|
|
43
|
+
*
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
_setQueryResult(itemType: ItemType, queryString: string, itemIds: ItemId[]): void;
|
|
47
|
+
setItemUpdated<ItemEntryType extends ItemEntry>(entry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>, columnExpansionResult?: ColumnExpansionResult<ItemEntryType['itemType']> | null, parent?: EntryParentNull): this;
|
|
48
|
+
setItemDeleted(deleted: ItemEntry): this;
|
|
49
|
+
setItemsDeleted(deleted: ItemEntry[]): this;
|
|
50
|
+
isEmpty(): boolean;
|
|
51
|
+
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { ApiRequestService, CollectionEntryService, ItemEntryService } from '../classes';
|
|
2
|
-
import { ChangesCompilationFactory, ColumnExpansionFactory, CreateRequestFactory, RequestColumnExpansionFactory } from '../factories';
|
|
3
|
-
import { ChangesDeltaFactory } from '../factories/ChangesDeltaFactory';
|
|
4
|
-
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
5
|
-
import { ItemIdConversionMap, PromiseInterface } from '../types';
|
|
6
|
-
import { TransactionCache } from './cache/transaction/TransactionCache';
|
|
7
|
-
export declare type OnAfterCreateCallback = (conversionMap: ItemIdConversionMap) => void;
|
|
8
|
-
/**
|
|
9
|
-
* @description
|
|
10
|
-
* Executes the changes from a specific {@link TransactionCache transaction} and returns a {@link ChangesDelta ChangesDelta}
|
|
11
|
-
*/
|
|
12
|
-
export declare class ChangesProcessor {
|
|
13
|
-
private changesDeltaFactory;
|
|
14
|
-
private apiRequestService;
|
|
15
|
-
private changesCompilationFactory;
|
|
16
|
-
private columnExpansionFactory;
|
|
17
|
-
private createRequestFactory;
|
|
18
|
-
private errorHandler;
|
|
19
|
-
private promiseService;
|
|
20
|
-
private requestColumnExpansionFactory;
|
|
21
|
-
private collectionEntryService;
|
|
22
|
-
private itemEntryService;
|
|
23
|
-
private transaction;
|
|
24
|
-
private breakUpByParent?;
|
|
25
|
-
private onAfterCreateCallback?;
|
|
26
|
-
private itemIdConversionMap;
|
|
27
|
-
private serverCache;
|
|
28
|
-
constructor(changesDeltaFactory: ChangesDeltaFactory, apiRequestService: ApiRequestService, changesCompilationFactory: ChangesCompilationFactory, columnExpansionFactory: ColumnExpansionFactory, createRequestFactory: CreateRequestFactory, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory, collectionEntryService: CollectionEntryService, itemEntryService: ItemEntryService, transaction: TransactionCache, breakUpByParent?: boolean | undefined, onAfterCreateCallback?: OnAfterCreateCallback | undefined);
|
|
29
|
-
/**
|
|
30
|
-
* @description
|
|
31
|
-
* Executes the requests in the order of:
|
|
32
|
-
* 1. create
|
|
33
|
-
* 2. move
|
|
34
|
-
* 3. delete
|
|
35
|
-
* 4. update
|
|
36
|
-
*/
|
|
37
|
-
execute(): PromiseInterface<ItemIdConversionMap>;
|
|
38
|
-
private buildMoveRequest;
|
|
39
|
-
private getMapValue;
|
|
40
|
-
private executeCreateRequests;
|
|
41
|
-
private executeCreateRequest;
|
|
42
|
-
private executeUpdateRequests;
|
|
43
|
-
private executeUpdateRequest;
|
|
44
|
-
private executeDeleteRequests;
|
|
45
|
-
private executeDeleteRequest;
|
|
46
|
-
private executeMoveRequests;
|
|
47
|
-
}
|
|
1
|
+
import { ApiRequestService, CollectionEntryService, ItemEntryService } from '../classes';
|
|
2
|
+
import { ChangesCompilationFactory, ColumnExpansionFactory, CreateRequestFactory, RequestColumnExpansionFactory } from '../factories';
|
|
3
|
+
import { ChangesDeltaFactory } from '../factories/ChangesDeltaFactory';
|
|
4
|
+
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
5
|
+
import { ItemIdConversionMap, PromiseInterface } from '../types';
|
|
6
|
+
import { TransactionCache } from './cache/transaction/TransactionCache';
|
|
7
|
+
export declare type OnAfterCreateCallback = (conversionMap: ItemIdConversionMap) => void;
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* Executes the changes from a specific {@link TransactionCache transaction} and returns a {@link ChangesDelta ChangesDelta}
|
|
11
|
+
*/
|
|
12
|
+
export declare class ChangesProcessor {
|
|
13
|
+
private changesDeltaFactory;
|
|
14
|
+
private apiRequestService;
|
|
15
|
+
private changesCompilationFactory;
|
|
16
|
+
private columnExpansionFactory;
|
|
17
|
+
private createRequestFactory;
|
|
18
|
+
private errorHandler;
|
|
19
|
+
private promiseService;
|
|
20
|
+
private requestColumnExpansionFactory;
|
|
21
|
+
private collectionEntryService;
|
|
22
|
+
private itemEntryService;
|
|
23
|
+
private transaction;
|
|
24
|
+
private breakUpByParent?;
|
|
25
|
+
private onAfterCreateCallback?;
|
|
26
|
+
private itemIdConversionMap;
|
|
27
|
+
private serverCache;
|
|
28
|
+
constructor(changesDeltaFactory: ChangesDeltaFactory, apiRequestService: ApiRequestService, changesCompilationFactory: ChangesCompilationFactory, columnExpansionFactory: ColumnExpansionFactory, createRequestFactory: CreateRequestFactory, errorHandler: ErrorHandlerInterface, promiseService: PromiseLibraryInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory, collectionEntryService: CollectionEntryService, itemEntryService: ItemEntryService, transaction: TransactionCache, breakUpByParent?: boolean | undefined, onAfterCreateCallback?: OnAfterCreateCallback | undefined);
|
|
29
|
+
/**
|
|
30
|
+
* @description
|
|
31
|
+
* Executes the requests in the order of:
|
|
32
|
+
* 1. create
|
|
33
|
+
* 2. move
|
|
34
|
+
* 3. delete
|
|
35
|
+
* 4. update
|
|
36
|
+
*/
|
|
37
|
+
execute(): PromiseInterface<ItemIdConversionMap>;
|
|
38
|
+
private buildMoveRequest;
|
|
39
|
+
private getMapValue;
|
|
40
|
+
private executeCreateRequests;
|
|
41
|
+
private executeCreateRequest;
|
|
42
|
+
private executeUpdateRequests;
|
|
43
|
+
private executeUpdateRequest;
|
|
44
|
+
private executeDeleteRequests;
|
|
45
|
+
private executeDeleteRequest;
|
|
46
|
+
private executeMoveRequests;
|
|
47
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { QueryService } from '../classes';
|
|
2
|
-
import { QueryParserFactory } from '../factories';
|
|
3
|
-
import { ItemEntry } from '../models';
|
|
4
|
-
import { CollectionOptions, CollectionOptionsInterface } from '../models/CollectionOptions';
|
|
5
|
-
import { ApiQuery, CollectionQuery, EntryParentNull, ItemId, ItemType } from '../types';
|
|
6
|
-
export declare class CollectionEntryService {
|
|
7
|
-
private queryParserFactory;
|
|
8
|
-
private queryService;
|
|
9
|
-
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
10
|
-
createUnfoundLocalCollectionError(itemType: ItemType): {
|
|
11
|
-
message: string;
|
|
12
|
-
};
|
|
13
|
-
cloneOptions(options: CollectionOptions, parent: EntryParentNull): CollectionOptions<any, any>;
|
|
14
|
-
processOptions<ItemTypeType extends ItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions;
|
|
15
|
-
createQuery(query: ApiQuery): CollectionQuery;
|
|
16
|
-
createQueryFromOptions(options: CollectionOptions): CollectionQuery;
|
|
17
|
-
getIdArray(itemEntries: Array<ItemEntry<any>>, accumulator?: ItemId[]): ItemId[];
|
|
18
|
-
/**
|
|
19
|
-
* @description
|
|
20
|
-
* Filters an array of {@link ItemEntry ItemEntries} according to the callback function.
|
|
21
|
-
* Does an in-place replacement of the items in the array that do match the condition (keeping the array reference)
|
|
22
|
-
*
|
|
23
|
-
* @returns {@link ItemEntry ItemEntries} that failed the condition
|
|
24
|
-
*/
|
|
25
|
-
filterArray<T extends ItemEntry<any> = ItemEntry<any>>(itemEntries: T[], callback: (itemEntry: T) => boolean): T[];
|
|
26
|
-
}
|
|
1
|
+
import { QueryService } from '../classes';
|
|
2
|
+
import { QueryParserFactory } from '../factories';
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { CollectionOptions, CollectionOptionsInterface } from '../models/CollectionOptions';
|
|
5
|
+
import { ApiQuery, CollectionQuery, EntryParentNull, ItemId, ItemType } from '../types';
|
|
6
|
+
export declare class CollectionEntryService {
|
|
7
|
+
private queryParserFactory;
|
|
8
|
+
private queryService;
|
|
9
|
+
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
10
|
+
createUnfoundLocalCollectionError(itemType: ItemType): {
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
cloneOptions(options: CollectionOptions, parent: EntryParentNull): CollectionOptions<any, any>;
|
|
14
|
+
processOptions<ItemTypeType extends ItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions;
|
|
15
|
+
createQuery(query: ApiQuery): CollectionQuery;
|
|
16
|
+
createQueryFromOptions(options: CollectionOptions): CollectionQuery;
|
|
17
|
+
getIdArray(itemEntries: Array<ItemEntry<any>>, accumulator?: ItemId[]): ItemId[];
|
|
18
|
+
/**
|
|
19
|
+
* @description
|
|
20
|
+
* Filters an array of {@link ItemEntry ItemEntries} according to the callback function.
|
|
21
|
+
* Does an in-place replacement of the items in the array that do match the condition (keeping the array reference)
|
|
22
|
+
*
|
|
23
|
+
* @returns {@link ItemEntry ItemEntries} that failed the condition
|
|
24
|
+
*/
|
|
25
|
+
filterArray<T extends ItemEntry<any> = ItemEntry<any>>(itemEntries: T[], callback: (itemEntry: T) => boolean): T[];
|
|
26
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { AbstractCache, CollectionQuery, FieldMap, ItemType, QueryService } from '../';
|
|
2
|
-
import { QueryMatcherFactory } from '../factories/';
|
|
3
|
-
import { ItemEntry } from '../models';
|
|
4
|
-
import { GroupedCollectionMatcherResult } from './cache/CollectionMatcherCachedQueryProcessor';
|
|
5
|
-
import { InternalChangesDelta } from './InternalChangesDelta';
|
|
6
|
-
export declare type CollectionMatcherMatches<ItemTypeType extends ItemType = ItemType> = {
|
|
7
|
-
[itemId: number]: {
|
|
8
|
-
item: ItemEntry<ItemTypeType>;
|
|
9
|
-
isMatch: boolean | 'maybe';
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare abstract class CollectionMatcherBase {
|
|
13
|
-
protected queryService: QueryService;
|
|
14
|
-
protected queryMatcherFactory: QueryMatcherFactory;
|
|
15
|
-
protected transaction: AbstractCache;
|
|
16
|
-
protected constructor(queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache);
|
|
17
|
-
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
18
|
-
processDelta(internalChangesDelta: InternalChangesDelta): this;
|
|
19
|
-
protected groupItemEntries<ItemTypeType extends ItemType>(matches: CollectionMatcherMatches<ItemTypeType>): GroupedCollectionMatcherResult<ItemTypeType>;
|
|
20
|
-
protected abstract _expand<ItemTypeType extends ItemType = string>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
21
|
-
}
|
|
1
|
+
import { AbstractCache, CollectionQuery, FieldMap, ItemType, QueryService } from '../';
|
|
2
|
+
import { QueryMatcherFactory } from '../factories/';
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { GroupedCollectionMatcherResult } from './cache/CollectionMatcherCachedQueryProcessor';
|
|
5
|
+
import { InternalChangesDelta } from './InternalChangesDelta';
|
|
6
|
+
export declare type CollectionMatcherMatches<ItemTypeType extends ItemType = ItemType> = {
|
|
7
|
+
[itemId: number]: {
|
|
8
|
+
item: ItemEntry<ItemTypeType>;
|
|
9
|
+
isMatch: boolean | 'maybe';
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare abstract class CollectionMatcherBase {
|
|
13
|
+
protected queryService: QueryService;
|
|
14
|
+
protected queryMatcherFactory: QueryMatcherFactory;
|
|
15
|
+
protected transaction: AbstractCache;
|
|
16
|
+
protected constructor(queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache);
|
|
17
|
+
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
18
|
+
processDelta(internalChangesDelta: InternalChangesDelta): this;
|
|
19
|
+
protected groupItemEntries<ItemTypeType extends ItemType>(matches: CollectionMatcherMatches<ItemTypeType>): GroupedCollectionMatcherResult<ItemTypeType>;
|
|
20
|
+
protected abstract _expand<ItemTypeType extends ItemType = string>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
21
|
+
}
|