@rentman/rm-core 1.2.3 → 1.2.5
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 +13 -1
- package/dist/dist/classes/ApiFormatter.d.ts +40 -40
- package/dist/dist/classes/ApiRequestService.d.ts +18 -18
- package/dist/dist/classes/ApiResponseProcessor.d.ts +33 -33
- package/dist/dist/classes/BatchStatus.d.ts +19 -19
- package/dist/dist/classes/ChangesCompilation.d.ts +26 -26
- package/dist/dist/classes/ChangesProcessor.d.ts +37 -37
- package/dist/dist/classes/CollectionCache.d.ts +37 -37
- package/dist/dist/classes/CollectionEntryService.d.ts +26 -26
- package/dist/dist/classes/CollectionHandler.d.ts +56 -56
- package/dist/dist/classes/CollectionMatcher.d.ts +29 -29
- package/dist/dist/classes/CollectionResourceService.d.ts +5 -5
- package/dist/dist/classes/ColumnCache.d.ts +21 -21
- package/dist/dist/classes/ColumnExpansion.d.ts +14 -14
- package/dist/dist/classes/ColumnHandler.d.ts +21 -21
- package/dist/dist/classes/ColumnInfo.d.ts +12 -12
- package/dist/dist/classes/ColumnSet.d.ts +38 -38
- package/dist/dist/classes/ColumnUtil.d.ts +81 -81
- package/dist/dist/classes/CreateRequest.d.ts +20 -20
- package/dist/dist/classes/ItemAdministrator.d.ts +94 -95
- package/dist/dist/classes/ItemCache.d.ts +25 -25
- package/dist/dist/classes/ItemEntryService.d.ts +23 -21
- package/dist/dist/classes/ItemHandler.d.ts +76 -72
- package/dist/dist/classes/ItemRequestService.d.ts +23 -23
- package/dist/dist/classes/ItemResourceService.d.ts +5 -5
- package/dist/dist/classes/KeyService.d.ts +16 -17
- package/dist/dist/classes/LocalCache.d.ts +49 -49
- package/dist/dist/classes/LockService.d.ts +23 -23
- package/dist/dist/classes/ModuleChangesCompilation.d.ts +19 -19
- package/dist/dist/classes/QueryMatcher.d.ts +14 -14
- package/dist/dist/classes/QueryParser.d.ts +16 -16
- package/dist/dist/classes/QueryService.d.ts +19 -19
- package/dist/dist/classes/RequestColumnExpansion.d.ts +9 -9
- package/dist/dist/classes/SocketMessageHandler.d.ts +32 -32
- package/dist/dist/classes/Util.d.ts +25 -25
- package/dist/dist/classes/index.d.ts +34 -34
- package/dist/dist/constants.d.ts +16 -16
- package/dist/dist/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/dist/factories/BatchStatusFactory.d.ts +9 -9
- package/dist/dist/factories/ChangesCompilationFactory.d.ts +8 -8
- package/dist/dist/factories/ChangesProcessorFactory.d.ts +18 -18
- package/dist/dist/factories/CollectionCacheFactory.d.ts +7 -7
- package/dist/dist/factories/CollectionEntryFactory.d.ts +18 -18
- package/dist/dist/factories/CollectionMatcherFactory.d.ts +7 -7
- package/dist/dist/factories/CollectionResourceFactory.d.ts +14 -14
- package/dist/dist/factories/ColumnExpansionFactory.d.ts +6 -6
- package/dist/dist/factories/ColumnInfoFactory.d.ts +6 -6
- package/dist/dist/factories/ColumnSetFactory.d.ts +11 -11
- package/dist/dist/factories/CreateRequestFactory.d.ts +10 -10
- package/dist/dist/factories/ItemCacheFactory.d.ts +7 -7
- package/dist/dist/factories/ItemEntryFactory.d.ts +19 -19
- package/dist/dist/factories/ItemResourceFactory.d.ts +15 -15
- package/dist/dist/factories/LocalCacheFactory.d.ts +16 -16
- package/dist/dist/factories/ModuleChangesCompilationFactory.d.ts +5 -5
- package/dist/dist/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/dist/factories/QueryParserFactory.d.ts +5 -5
- package/dist/dist/factories/RequestColumnExpansionFactory.d.ts +6 -6
- package/dist/dist/factories/TemplateFactory.d.ts +10 -10
- package/dist/dist/factories/index.d.ts +21 -21
- package/dist/dist/index.d.ts +7 -7
- package/dist/dist/interfaces/ApiRequestServiceInterface.d.ts +11 -11
- package/dist/dist/interfaces/AuthInterface.d.ts +9 -9
- package/dist/dist/interfaces/ErrorHandlerInterface.d.ts +4 -4
- package/dist/dist/interfaces/LocalCacheManagerInterface.d.ts +5 -5
- package/dist/dist/interfaces/PromiseInterface.d.ts +14 -14
- package/dist/dist/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/dist/interfaces/index.d.ts +6 -6
- package/dist/dist/main.d.ts +48 -48
- package/dist/dist/models/CollectionEditResource.d.ts +15 -15
- package/dist/dist/models/CollectionEntry.d.ts +63 -63
- package/dist/dist/models/CollectionResource.d.ts +40 -40
- package/dist/dist/models/CollectionViewResource.d.ts +6 -6
- package/dist/dist/models/EditResource.d.ts +18 -18
- package/dist/dist/models/ItemEntry.d.ts +61 -61
- package/dist/dist/models/ItemResource.d.ts +17 -17
- package/dist/dist/models/Template.d.ts +11 -11
- package/dist/dist/models/ViewResource.d.ts +4 -4
- package/dist/dist/models/index.d.ts +9 -9
- package/dist/dist/types/ItemTypesCollection.d.ts +119 -125
- package/dist/dist/types/index.d.ts +1 -1
- package/dist/rm-core.js +6912 -6941
- package/dist/rm-core.min.js +1 -1
- package/package.json +1 -1
- package/readme.md +15 -15
package/changelog.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
#Changelog
|
|
2
2
|
Contains new features, breaking changes and their reasoning
|
|
3
3
|
|
|
4
|
+
## v1.2.5
|
|
5
|
+
- When a local item cannot by found, return a newly created item in `getItemByState` (`ItemAdministrator`) only. This
|
|
6
|
+
solves an issue with refreshing on a local edit view.
|
|
7
|
+
|
|
8
|
+
## v1.2.4
|
|
9
|
+
- **Breaking:** When a local item cannot by found, instead of a new item being created an error is thrown. This means it
|
|
10
|
+
is no longer possible to create local items using `getItemById` or `getItemsById` in the `ItemAdministrator` class.
|
|
11
|
+
- **Breaking:** Removed `getItemDefinition` and `getItemByDef` in the `ItemAdministrator` class. Added `getItemByState`.
|
|
12
|
+
- Renamed types `TemplateResponseItemEntryMap` to `TemplateItemEntryMap` and `TemplateResponseLinkedItemEntryMap` to
|
|
13
|
+
`TemplateLinkedItemEntryMap`.
|
|
14
|
+
- Removed `getCollectionCacheKey` in `KeyService`. (Legacy code.)
|
|
15
|
+
|
|
4
16
|
## v1.2.3
|
|
5
|
-
- Fixed issue where derived values deeper than one layer couldn't be resolved
|
|
17
|
+
- Fixed issue where derived values deeper than one layer couldn't be resolved.
|
|
6
18
|
|
|
7
19
|
## v1.2.2
|
|
8
20
|
- Fixed issue where in derived values weren't set after create request.
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
/// <reference types="moment" />
|
|
2
|
-
import * as moment from 'moment';
|
|
3
|
-
import { FieldMap } from '../types';
|
|
4
|
-
import { ColumnInfo } from './ColumnInfo';
|
|
5
|
-
export declare class ApiFormatter {
|
|
6
|
-
MOMENT_INVALID: string;
|
|
7
|
-
SERVER_DATETIME_FORMAT: string;
|
|
8
|
-
SERVER_TIME_FORMAT: string;
|
|
9
|
-
SERVER_DATE_FORMAT: string;
|
|
10
|
-
constructor();
|
|
11
|
-
formatResponse(fields: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
12
|
-
expandResponse(current: FieldMap, expanded: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
13
|
-
formatRequest(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
14
|
-
formatRequestLocal(fields: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
15
|
-
hasChanges(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): boolean;
|
|
16
|
-
getChanges(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
17
|
-
copyFields(source: FieldMap, destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
18
|
-
shallowCopyFields(shallowSource: FieldMap, deepSource: FieldMap, destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
19
|
-
setDefaultValues(destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
20
|
-
compareFields<T>(columnType: string, first: T, second: T): boolean;
|
|
21
|
-
compareFloats(a: any, b: any): boolean;
|
|
22
|
-
compareMomentObjects(first: any, second: any): boolean;
|
|
23
|
-
compareDurations(first: any, second: any): boolean;
|
|
24
|
-
formatResponseValue(columnType: any, value: any): any;
|
|
25
|
-
formatRequestValue(columnType: any, value: any): any;
|
|
26
|
-
formatResponseDate(value: any): moment.Moment;
|
|
27
|
-
formatResponseDuration(value: any): moment.Duration;
|
|
28
|
-
formatResponseColor(value: any): any;
|
|
29
|
-
formatRequestDateTime(value: any): any;
|
|
30
|
-
formatRequestDate(value: any): any;
|
|
31
|
-
formatRequestDuration(value: any): any;
|
|
32
|
-
formatRequestColor(value: any): any;
|
|
33
|
-
getDefaultValue(columnType: any): false | 0 | "" | moment.Moment | moment.Duration | "0" | "#000000" | null;
|
|
34
|
-
isDefaultValue(columnType: any, value: any): boolean;
|
|
35
|
-
clone(columnType: any, value: any): any;
|
|
36
|
-
getCloneFunction(columnType: any): (date: any) => any;
|
|
37
|
-
cloneDuration(duration: any): moment.Duration;
|
|
38
|
-
cloneDate(date: any): any;
|
|
39
|
-
identity(input: any): any;
|
|
40
|
-
}
|
|
1
|
+
/// <reference types="moment" />
|
|
2
|
+
import * as moment from 'moment';
|
|
3
|
+
import { FieldMap } from '../types';
|
|
4
|
+
import { ColumnInfo } from './ColumnInfo';
|
|
5
|
+
export declare class ApiFormatter {
|
|
6
|
+
MOMENT_INVALID: string;
|
|
7
|
+
SERVER_DATETIME_FORMAT: string;
|
|
8
|
+
SERVER_TIME_FORMAT: string;
|
|
9
|
+
SERVER_DATE_FORMAT: string;
|
|
10
|
+
constructor();
|
|
11
|
+
formatResponse(fields: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
12
|
+
expandResponse(current: FieldMap, expanded: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
13
|
+
formatRequest(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
14
|
+
formatRequestLocal(fields: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
15
|
+
hasChanges(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): boolean;
|
|
16
|
+
getChanges(initial: FieldMap, modified: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
17
|
+
copyFields(source: FieldMap, destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
18
|
+
shallowCopyFields(shallowSource: FieldMap, deepSource: FieldMap, destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
19
|
+
setDefaultValues(destination: FieldMap, columns: ColumnInfo[]): FieldMap;
|
|
20
|
+
compareFields<T>(columnType: string, first: T, second: T): boolean;
|
|
21
|
+
compareFloats(a: any, b: any): boolean;
|
|
22
|
+
compareMomentObjects(first: any, second: any): boolean;
|
|
23
|
+
compareDurations(first: any, second: any): boolean;
|
|
24
|
+
formatResponseValue(columnType: any, value: any): any;
|
|
25
|
+
formatRequestValue(columnType: any, value: any): any;
|
|
26
|
+
formatResponseDate(value: any): moment.Moment;
|
|
27
|
+
formatResponseDuration(value: any): moment.Duration;
|
|
28
|
+
formatResponseColor(value: any): any;
|
|
29
|
+
formatRequestDateTime(value: any): any;
|
|
30
|
+
formatRequestDate(value: any): any;
|
|
31
|
+
formatRequestDuration(value: any): any;
|
|
32
|
+
formatRequestColor(value: any): any;
|
|
33
|
+
getDefaultValue(columnType: any): false | 0 | "" | moment.Moment | moment.Duration | "0" | "#000000" | null;
|
|
34
|
+
isDefaultValue(columnType: any, value: any): boolean;
|
|
35
|
+
clone(columnType: any, value: any): any;
|
|
36
|
+
getCloneFunction(columnType: any): (date: any) => any;
|
|
37
|
+
cloneDuration(duration: any): moment.Duration;
|
|
38
|
+
cloneDate(date: any): any;
|
|
39
|
+
identity(input: any): any;
|
|
40
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiResponseProcessor } from '../classes';
|
|
2
|
-
import { ApiResponseProcessorFactory } from '../factories';
|
|
3
|
-
import { ApiRequestServiceInterface } from '../interfaces';
|
|
4
|
-
import { ItemId, ItemType } 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): Promise<ApiResponseProcessor>;
|
|
10
|
-
create(itemType: ItemType, itemId: ItemId, values: any, parentType?: ItemType, parentId?: ItemId): Promise<ApiResponseProcessor>;
|
|
11
|
-
delete(itemType: ItemType, itemIds: ItemId[]): Promise<ApiResponseProcessor>;
|
|
12
|
-
updateItems(itemType: ItemType, items: object, columns: any): Promise<ApiResponseProcessor>;
|
|
13
|
-
requestSkeleton(params: any, requestCanceler?: Promise<any>): Promise<ApiResponseProcessor>;
|
|
14
|
-
moveItems(parentType: ItemType, parentId: ItemId, items: object): Promise<ApiResponseProcessor>;
|
|
15
|
-
columns(itemType: ItemType, columns: object, params?: any): Promise<ApiResponseProcessor>;
|
|
16
|
-
query(itemType: ItemType, query: object, columns: object, limit?: object): Promise<ApiResponseProcessor>;
|
|
17
|
-
processResponse(request: any): Promise<ApiResponseProcessor>;
|
|
18
|
-
}
|
|
1
|
+
import { ApiResponseProcessor } from '../classes';
|
|
2
|
+
import { ApiResponseProcessorFactory } from '../factories';
|
|
3
|
+
import { ApiRequestServiceInterface } from '../interfaces';
|
|
4
|
+
import { ItemId, ItemType } 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): Promise<ApiResponseProcessor>;
|
|
10
|
+
create(itemType: ItemType, itemId: ItemId, values: any, parentType?: ItemType, parentId?: ItemId): Promise<ApiResponseProcessor>;
|
|
11
|
+
delete(itemType: ItemType, itemIds: ItemId[]): Promise<ApiResponseProcessor>;
|
|
12
|
+
updateItems(itemType: ItemType, items: object, columns: any): Promise<ApiResponseProcessor>;
|
|
13
|
+
requestSkeleton(params: any, requestCanceler?: Promise<any>): Promise<ApiResponseProcessor>;
|
|
14
|
+
moveItems(parentType: ItemType, parentId: ItemId, items: object): Promise<ApiResponseProcessor>;
|
|
15
|
+
columns(itemType: ItemType, columns: object, params?: any): Promise<ApiResponseProcessor>;
|
|
16
|
+
query(itemType: ItemType, query: object, columns: object, limit?: object): Promise<ApiResponseProcessor>;
|
|
17
|
+
processResponse(request: any): Promise<ApiResponseProcessor>;
|
|
18
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { ApiFormatter } from '../classes';
|
|
2
|
-
import { ItemTypeMap } from '../types';
|
|
3
|
-
export declare class ApiResponseProcessor {
|
|
4
|
-
apiFormatter: ApiFormatter;
|
|
5
|
-
response: any;
|
|
6
|
-
columns: ItemTypeMap;
|
|
7
|
-
items: ItemTypeMap;
|
|
8
|
-
links: ItemTypeMap;
|
|
9
|
-
cacheable: boolean;
|
|
10
|
-
map: any;
|
|
11
|
-
columnIndexMap: any;
|
|
12
|
-
columnMap: any;
|
|
13
|
-
constructor(apiFormatter: ApiFormatter, response: any);
|
|
14
|
-
createColumnMaps(): void;
|
|
15
|
-
fetchValue(itemType: any, itemId: any, columnId: any): any;
|
|
16
|
-
fetchDerivedObject(itemType: any, itemId: any, rootColumns: any): {};
|
|
17
|
-
fetchDerivedValues(value: any, column: any, destination: any): void;
|
|
18
|
-
fetchObject(itemType: any, itemId: any, includeLinks?: boolean): any;
|
|
19
|
-
fetchObjectArray(itemType: any, includeLinks: any, idArray: any): any;
|
|
20
|
-
fetchObjectMap(itemType: any, columnId: any, includeLinks: any, returnKeys: any): {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
};
|
|
23
|
-
fetchFieldMap(itemType: any, columnId: any): {};
|
|
24
|
-
fetchColumnArray(itemType: any): any[];
|
|
25
|
-
fetchColumnObject(itemType: any): any;
|
|
26
|
-
fetchColumnsObject(): any;
|
|
27
|
-
createResource(itemType: any, id: any): {
|
|
28
|
-
object: any;
|
|
29
|
-
links: any;
|
|
30
|
-
};
|
|
31
|
-
hasItems(itemType: any): boolean;
|
|
32
|
-
getIdArray(itemType: any): string[];
|
|
33
|
-
}
|
|
1
|
+
import { ApiFormatter } from '../classes';
|
|
2
|
+
import { ItemTypeMap } from '../types';
|
|
3
|
+
export declare class ApiResponseProcessor {
|
|
4
|
+
apiFormatter: ApiFormatter;
|
|
5
|
+
response: any;
|
|
6
|
+
columns: ItemTypeMap;
|
|
7
|
+
items: ItemTypeMap;
|
|
8
|
+
links: ItemTypeMap;
|
|
9
|
+
cacheable: boolean;
|
|
10
|
+
map: any;
|
|
11
|
+
columnIndexMap: any;
|
|
12
|
+
columnMap: any;
|
|
13
|
+
constructor(apiFormatter: ApiFormatter, response: any);
|
|
14
|
+
createColumnMaps(): void;
|
|
15
|
+
fetchValue(itemType: any, itemId: any, columnId: any): any;
|
|
16
|
+
fetchDerivedObject(itemType: any, itemId: any, rootColumns: any): {};
|
|
17
|
+
fetchDerivedValues(value: any, column: any, destination: any): void;
|
|
18
|
+
fetchObject(itemType: any, itemId: any, includeLinks?: boolean): any;
|
|
19
|
+
fetchObjectArray(itemType: any, includeLinks: any, idArray: any): any;
|
|
20
|
+
fetchObjectMap(itemType: any, columnId: any, includeLinks: any, returnKeys: any): {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
};
|
|
23
|
+
fetchFieldMap(itemType: any, columnId: any): {};
|
|
24
|
+
fetchColumnArray(itemType: any): any[];
|
|
25
|
+
fetchColumnObject(itemType: any): any;
|
|
26
|
+
fetchColumnsObject(): any;
|
|
27
|
+
createResource(itemType: any, id: any): {
|
|
28
|
+
object: any;
|
|
29
|
+
links: any;
|
|
30
|
+
};
|
|
31
|
+
hasItems(itemType: any): boolean;
|
|
32
|
+
getIdArray(itemType: any): string[];
|
|
33
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ENTRY_STATUS } from '../constants';
|
|
2
|
-
import { PromiseInterface } from '../interfaces';
|
|
3
|
-
import { ItemEntry } from '../models';
|
|
4
|
-
import { EntryStatus, ItemEntryEntryStatusMap, ItemId } from '../types';
|
|
5
|
-
export declare class BatchStatus {
|
|
6
|
-
private promiseService;
|
|
7
|
-
getItemId: (itemEntry: ItemEntry) => ItemId;
|
|
8
|
-
getPromise: (itemEntry: ItemEntry) => Promise<ItemEntry>;
|
|
9
|
-
readonly requestStatusArray: ENTRY_STATUS[];
|
|
10
|
-
entries: ItemEntryEntryStatusMap;
|
|
11
|
-
constructor(promiseService: PromiseInterface, getItemId: (itemEntry: ItemEntry) => ItemId, getPromise: (itemEntry: ItemEntry) => Promise<ItemEntry>);
|
|
12
|
-
add(entryStatus: EntryStatus<ItemEntry>): void;
|
|
13
|
-
hasEntries(statusArray: ENTRY_STATUS[]): boolean;
|
|
14
|
-
hasRequests(): boolean;
|
|
15
|
-
forEachEntry(statusArray: ENTRY_STATUS[], callback: (itemEntry: ItemEntry) => void): void;
|
|
16
|
-
getPromises(): Promise<ItemEntry[]>;
|
|
17
|
-
getRequestIds(): number[];
|
|
18
|
-
getArray(): ItemEntry[];
|
|
19
|
-
}
|
|
1
|
+
import { ENTRY_STATUS } from '../constants';
|
|
2
|
+
import { PromiseInterface } from '../interfaces';
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { EntryStatus, ItemEntryEntryStatusMap, ItemId } from '../types';
|
|
5
|
+
export declare class BatchStatus {
|
|
6
|
+
private promiseService;
|
|
7
|
+
getItemId: (itemEntry: ItemEntry) => ItemId;
|
|
8
|
+
getPromise: (itemEntry: ItemEntry) => Promise<ItemEntry>;
|
|
9
|
+
readonly requestStatusArray: ENTRY_STATUS[];
|
|
10
|
+
entries: ItemEntryEntryStatusMap;
|
|
11
|
+
constructor(promiseService: PromiseInterface, getItemId: (itemEntry: ItemEntry) => ItemId, getPromise: (itemEntry: ItemEntry) => Promise<ItemEntry>);
|
|
12
|
+
add(entryStatus: EntryStatus<ItemEntry>): void;
|
|
13
|
+
hasEntries(statusArray: ENTRY_STATUS[]): boolean;
|
|
14
|
+
hasRequests(): boolean;
|
|
15
|
+
forEachEntry(statusArray: ENTRY_STATUS[], callback: (itemEntry: ItemEntry) => void): void;
|
|
16
|
+
getPromises(): Promise<ItemEntry[]>;
|
|
17
|
+
getRequestIds(): number[];
|
|
18
|
+
getArray(): ItemEntry[];
|
|
19
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { CollectionCache } from '../classes';
|
|
2
|
-
import { CollectionCacheFactory } from '../factories';
|
|
3
|
-
import { CollectionEntry, ItemEntry } from '../models';
|
|
4
|
-
import { EntryParent } from '../types';
|
|
5
|
-
export declare class ChangesCompilation {
|
|
6
|
-
private collectionCacheFactory;
|
|
7
|
-
singleItems: ItemEntry[];
|
|
8
|
-
compilation: {
|
|
9
|
-
create: {};
|
|
10
|
-
delete: {};
|
|
11
|
-
update: {};
|
|
12
|
-
move: {};
|
|
13
|
-
};
|
|
14
|
-
collections: CollectionCache;
|
|
15
|
-
private moveArray;
|
|
16
|
-
private deleteMap;
|
|
17
|
-
constructor(collectionCacheFactory: CollectionCacheFactory, singleItems: ItemEntry[], collectionEntries: CollectionEntry[]);
|
|
18
|
-
getDefaultParent(): EntryParent;
|
|
19
|
-
addMoveEntry(itemEntry: any): void;
|
|
20
|
-
addDeleteEntry(itemEntry: any, parentId: any, parentType: any): void;
|
|
21
|
-
addUpdateEntry(itemEntry: any): void;
|
|
22
|
-
addCreateEntry(itemEntry: any): void;
|
|
23
|
-
postProcess(): void;
|
|
24
|
-
private processSingleItems();
|
|
25
|
-
private processCollections(collectionEntries);
|
|
26
|
-
}
|
|
1
|
+
import { CollectionCache } from '../classes';
|
|
2
|
+
import { CollectionCacheFactory } from '../factories';
|
|
3
|
+
import { CollectionEntry, ItemEntry } from '../models';
|
|
4
|
+
import { EntryParent } from '../types';
|
|
5
|
+
export declare class ChangesCompilation {
|
|
6
|
+
private collectionCacheFactory;
|
|
7
|
+
singleItems: ItemEntry[];
|
|
8
|
+
compilation: {
|
|
9
|
+
create: {};
|
|
10
|
+
delete: {};
|
|
11
|
+
update: {};
|
|
12
|
+
move: {};
|
|
13
|
+
};
|
|
14
|
+
collections: CollectionCache;
|
|
15
|
+
private moveArray;
|
|
16
|
+
private deleteMap;
|
|
17
|
+
constructor(collectionCacheFactory: CollectionCacheFactory, singleItems: ItemEntry[], collectionEntries: CollectionEntry[]);
|
|
18
|
+
getDefaultParent(): EntryParent;
|
|
19
|
+
addMoveEntry(itemEntry: any): void;
|
|
20
|
+
addDeleteEntry(itemEntry: any, parentId: any, parentType: any): void;
|
|
21
|
+
addUpdateEntry(itemEntry: any): void;
|
|
22
|
+
addCreateEntry(itemEntry: any): void;
|
|
23
|
+
postProcess(): void;
|
|
24
|
+
private processSingleItems();
|
|
25
|
+
private processCollections(collectionEntries);
|
|
26
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { ApiFormatter, CollectionEntryService, CollectionHandler, ItemHandler } from '../classes';
|
|
2
|
-
import { ChangesCompilationFactory, ColumnExpansionFactory, CreateRequestFactory, RequestColumnExpansionFactory } from '../factories';
|
|
3
|
-
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
-
import { CollectionEntry, ItemEntry } from '../models';
|
|
5
|
-
import { CreateRequestParameterMap, ItemIdConversionMap } from '../types';
|
|
6
|
-
export declare class ChangesProcessor {
|
|
7
|
-
private apiRequestService;
|
|
8
|
-
private itemHandler;
|
|
9
|
-
private errorHandler;
|
|
10
|
-
private collectionHandler;
|
|
11
|
-
private changesCompilationFactory;
|
|
12
|
-
private createRequestFactory;
|
|
13
|
-
private columnExpansionFactory;
|
|
14
|
-
private requestColumnExpansionFactory;
|
|
15
|
-
private collectionEntryService;
|
|
16
|
-
private apiFormatter;
|
|
17
|
-
private promiseService;
|
|
18
|
-
constructor(apiRequestService: ApiRequestServiceInterface, itemHandler: ItemHandler, errorHandler: ErrorHandlerInterface, collectionHandler: CollectionHandler, changesCompilationFactory: ChangesCompilationFactory, createRequestFactory: CreateRequestFactory, columnExpansionFactory: ColumnExpansionFactory, requestColumnExpansionFactory: RequestColumnExpansionFactory, collectionEntryService: CollectionEntryService, apiFormatter: ApiFormatter, promiseService: PromiseInterface);
|
|
19
|
-
getItemTypeUpdatePriority(itemType: any): 0 | 1 | 2;
|
|
20
|
-
isDocumentItemType(itemType: any): boolean;
|
|
21
|
-
isDocumentUpdate(compilation: any): boolean;
|
|
22
|
-
buildMoveRequest(compilationEntries: any): {};
|
|
23
|
-
getMapValue(itemType: any, itemId: any, map: any): any;
|
|
24
|
-
private executeCreateRequests(changesCompilation, parameters, conversionMap, breakupByParent?, onAfterCreateCallback?);
|
|
25
|
-
private executeCreateRequest(requestResource, conversionMap);
|
|
26
|
-
private prioritizeUpdateRequests(compilation, parameters);
|
|
27
|
-
private executeUpdateRequests(itemTypes, compilation, parameters);
|
|
28
|
-
private executeUpdateRequest(itemType, itemEntries, parameterMap);
|
|
29
|
-
private executeDeleteRequests(compilation);
|
|
30
|
-
private executeDeleteRequest(itemType, itemEntries);
|
|
31
|
-
private executeMoveRequests(compilation, conversionMap);
|
|
32
|
-
private processMoveResponse(compilationEntries);
|
|
33
|
-
private addCollectionMapEntry(collectionMap, parentId, itemEntry, value);
|
|
34
|
-
private forEachCollection(collectionMap, method);
|
|
35
|
-
private onItemsCreated(conversionMap, singleItems, collections);
|
|
36
|
-
execute(singleItems: ItemEntry[], collections: CollectionEntry[], parameters?: CreateRequestParameterMap, breakupByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): Promise<ItemIdConversionMap>;
|
|
37
|
-
}
|
|
1
|
+
import { ApiFormatter, CollectionEntryService, CollectionHandler, ItemHandler } from '../classes';
|
|
2
|
+
import { ChangesCompilationFactory, ColumnExpansionFactory, CreateRequestFactory, RequestColumnExpansionFactory } from '../factories';
|
|
3
|
+
import { ApiRequestServiceInterface, ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
4
|
+
import { CollectionEntry, ItemEntry } from '../models';
|
|
5
|
+
import { CreateRequestParameterMap, ItemIdConversionMap } from '../types';
|
|
6
|
+
export declare class ChangesProcessor {
|
|
7
|
+
private apiRequestService;
|
|
8
|
+
private itemHandler;
|
|
9
|
+
private errorHandler;
|
|
10
|
+
private collectionHandler;
|
|
11
|
+
private changesCompilationFactory;
|
|
12
|
+
private createRequestFactory;
|
|
13
|
+
private columnExpansionFactory;
|
|
14
|
+
private requestColumnExpansionFactory;
|
|
15
|
+
private collectionEntryService;
|
|
16
|
+
private apiFormatter;
|
|
17
|
+
private promiseService;
|
|
18
|
+
constructor(apiRequestService: ApiRequestServiceInterface, itemHandler: ItemHandler, errorHandler: ErrorHandlerInterface, collectionHandler: CollectionHandler, changesCompilationFactory: ChangesCompilationFactory, createRequestFactory: CreateRequestFactory, columnExpansionFactory: ColumnExpansionFactory, requestColumnExpansionFactory: RequestColumnExpansionFactory, collectionEntryService: CollectionEntryService, apiFormatter: ApiFormatter, promiseService: PromiseInterface);
|
|
19
|
+
getItemTypeUpdatePriority(itemType: any): 0 | 1 | 2;
|
|
20
|
+
isDocumentItemType(itemType: any): boolean;
|
|
21
|
+
isDocumentUpdate(compilation: any): boolean;
|
|
22
|
+
buildMoveRequest(compilationEntries: any): {};
|
|
23
|
+
getMapValue(itemType: any, itemId: any, map: any): any;
|
|
24
|
+
private executeCreateRequests(changesCompilation, parameters, conversionMap, breakupByParent?, onAfterCreateCallback?);
|
|
25
|
+
private executeCreateRequest(requestResource, conversionMap);
|
|
26
|
+
private prioritizeUpdateRequests(compilation, parameters);
|
|
27
|
+
private executeUpdateRequests(itemTypes, compilation, parameters);
|
|
28
|
+
private executeUpdateRequest(itemType, itemEntries, parameterMap);
|
|
29
|
+
private executeDeleteRequests(compilation);
|
|
30
|
+
private executeDeleteRequest(itemType, itemEntries);
|
|
31
|
+
private executeMoveRequests(compilation, conversionMap);
|
|
32
|
+
private processMoveResponse(compilationEntries);
|
|
33
|
+
private addCollectionMapEntry(collectionMap, parentId, itemEntry, value);
|
|
34
|
+
private forEachCollection(collectionMap, method);
|
|
35
|
+
private onItemsCreated(conversionMap, singleItems, collections);
|
|
36
|
+
execute(singleItems: ItemEntry[], collections: CollectionEntry[], parameters?: CreateRequestParameterMap, breakupByParent?: boolean, onAfterCreateCallback?: (conversionMap: ItemIdConversionMap) => void): Promise<ItemIdConversionMap>;
|
|
37
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { QueryMatcherFactory } from '../factories';
|
|
2
|
-
import { CollectionEntry, CollectionResource } from '../models';
|
|
3
|
-
import { CollectionMatchResult, EntryParentNull, FieldMap, ItemType } from '../types';
|
|
4
|
-
export declare class CollectionCache {
|
|
5
|
-
private queryMatcherFactory;
|
|
6
|
-
entries: {
|
|
7
|
-
[itemType: string]: {
|
|
8
|
-
[collectionEntryId: number]: CollectionEntry;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
12
|
-
contains(collectionEntry: CollectionEntry): boolean;
|
|
13
|
-
some(callback: (entry: CollectionEntry) => boolean): boolean;
|
|
14
|
-
forEach(callback: (entry: CollectionEntry) => void): void;
|
|
15
|
-
toArray(): CollectionEntry[];
|
|
16
|
-
add(collectionEntry: CollectionEntry): CollectionEntry;
|
|
17
|
-
clear(collectionEntry?: CollectionEntry): boolean;
|
|
18
|
-
getByItemType(itemType: string): CollectionEntry[];
|
|
19
|
-
matchParent(collectionEntry: CollectionEntry, itemType: string, itemId: any): boolean;
|
|
20
|
-
getByParent(parentType: any, parentId: any, itemType: any): CollectionEntry | null;
|
|
21
|
-
getResourceByParent(parentType: any, parentId: any, itemType: any): CollectionResource | null;
|
|
22
|
-
getCollectionsByParent(parentType: any, parentId: any): CollectionEntry[];
|
|
23
|
-
/**
|
|
24
|
-
* Only resources
|
|
25
|
-
* @param {String} itemType
|
|
26
|
-
* @param {String|Integer} itemId
|
|
27
|
-
* @returns {Object} Array of collections.
|
|
28
|
-
*/
|
|
29
|
-
getByContainingItem(itemType: any, itemId: any): CollectionEntry[];
|
|
30
|
-
/**
|
|
31
|
-
* Returns an array of collections the item 'belongs' in.
|
|
32
|
-
*/
|
|
33
|
-
getByFittingItem(itemType: ItemType, fields: FieldMap, parent: EntryParentNull): CollectionMatchResult;
|
|
34
|
-
getByQuery(itemType: any, query: any): CollectionEntry | null;
|
|
35
|
-
getByKey(itemType: any, entryKey: any): CollectionEntry[];
|
|
36
|
-
getResourceByKey(itemType: any, resourceKey: any): CollectionResource[];
|
|
37
|
-
}
|
|
1
|
+
import { QueryMatcherFactory } from '../factories';
|
|
2
|
+
import { CollectionEntry, CollectionResource } from '../models';
|
|
3
|
+
import { CollectionMatchResult, EntryParentNull, FieldMap, ItemType } from '../types';
|
|
4
|
+
export declare class CollectionCache {
|
|
5
|
+
private queryMatcherFactory;
|
|
6
|
+
entries: {
|
|
7
|
+
[itemType: string]: {
|
|
8
|
+
[collectionEntryId: number]: CollectionEntry;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
constructor(queryMatcherFactory: QueryMatcherFactory);
|
|
12
|
+
contains(collectionEntry: CollectionEntry): boolean;
|
|
13
|
+
some(callback: (entry: CollectionEntry) => boolean): boolean;
|
|
14
|
+
forEach(callback: (entry: CollectionEntry) => void): void;
|
|
15
|
+
toArray(): CollectionEntry[];
|
|
16
|
+
add(collectionEntry: CollectionEntry): CollectionEntry;
|
|
17
|
+
clear(collectionEntry?: CollectionEntry): boolean;
|
|
18
|
+
getByItemType(itemType: string): CollectionEntry[];
|
|
19
|
+
matchParent(collectionEntry: CollectionEntry, itemType: string, itemId: any): boolean;
|
|
20
|
+
getByParent(parentType: any, parentId: any, itemType: any): CollectionEntry | null;
|
|
21
|
+
getResourceByParent(parentType: any, parentId: any, itemType: any): CollectionResource | null;
|
|
22
|
+
getCollectionsByParent(parentType: any, parentId: any): CollectionEntry[];
|
|
23
|
+
/**
|
|
24
|
+
* Only resources
|
|
25
|
+
* @param {String} itemType
|
|
26
|
+
* @param {String|Integer} itemId
|
|
27
|
+
* @returns {Object} Array of collections.
|
|
28
|
+
*/
|
|
29
|
+
getByContainingItem(itemType: any, itemId: any): CollectionEntry[];
|
|
30
|
+
/**
|
|
31
|
+
* Returns an array of collections the item 'belongs' in.
|
|
32
|
+
*/
|
|
33
|
+
getByFittingItem(itemType: ItemType, fields: FieldMap, parent: EntryParentNull): CollectionMatchResult;
|
|
34
|
+
getByQuery(itemType: any, query: any): CollectionEntry | null;
|
|
35
|
+
getByKey(itemType: any, entryKey: any): CollectionEntry[];
|
|
36
|
+
getResourceByKey(itemType: any, resourceKey: any): CollectionResource[];
|
|
37
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { QueryService } from '../classes';
|
|
2
|
-
import { QueryParserFactory } from '../factories';
|
|
3
|
-
import { ItemEntry } from '../models';
|
|
4
|
-
import { ItemId } from '../types';
|
|
5
|
-
export declare class CollectionEntryService {
|
|
6
|
-
private queryParserFactory;
|
|
7
|
-
private queryService;
|
|
8
|
-
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
9
|
-
cloneOptions(options: any, parent: any): any;
|
|
10
|
-
cloneQueryParams(parameters: any): {};
|
|
11
|
-
processOptions(options: any): any;
|
|
12
|
-
createQuery(options: any): {
|
|
13
|
-
object: any;
|
|
14
|
-
string: any;
|
|
15
|
-
};
|
|
16
|
-
getIdArray(itemEntries: ItemEntry[], accumulator: any): ItemId[];
|
|
17
|
-
/**
|
|
18
|
-
* @param {ItemEntry[]} itemEntries
|
|
19
|
-
* @param {(itemEntry: ItemEntry) => boolean} callback
|
|
20
|
-
* @returns {ItemEntry[]}
|
|
21
|
-
*
|
|
22
|
-
* filter an array according to the callback function. Return the entries that failed the condition
|
|
23
|
-
* Replace the given array with the entries that didn't fail the condition.
|
|
24
|
-
*/
|
|
25
|
-
filterArray(itemEntries: ItemEntry[], callback: (itemEntry: ItemEntry) => boolean): ItemEntry[];
|
|
26
|
-
}
|
|
1
|
+
import { QueryService } from '../classes';
|
|
2
|
+
import { QueryParserFactory } from '../factories';
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { ItemId } from '../types';
|
|
5
|
+
export declare class CollectionEntryService {
|
|
6
|
+
private queryParserFactory;
|
|
7
|
+
private queryService;
|
|
8
|
+
constructor(queryParserFactory: QueryParserFactory, queryService: QueryService);
|
|
9
|
+
cloneOptions(options: any, parent: any): any;
|
|
10
|
+
cloneQueryParams(parameters: any): {};
|
|
11
|
+
processOptions(options: any): any;
|
|
12
|
+
createQuery(options: any): {
|
|
13
|
+
object: any;
|
|
14
|
+
string: any;
|
|
15
|
+
};
|
|
16
|
+
getIdArray(itemEntries: ItemEntry[], accumulator: any): ItemId[];
|
|
17
|
+
/**
|
|
18
|
+
* @param {ItemEntry[]} itemEntries
|
|
19
|
+
* @param {(itemEntry: ItemEntry) => boolean} callback
|
|
20
|
+
* @returns {ItemEntry[]}
|
|
21
|
+
*
|
|
22
|
+
* filter an array according to the callback function. Return the entries that failed the condition
|
|
23
|
+
* Replace the given array with the entries that didn't fail the condition.
|
|
24
|
+
*/
|
|
25
|
+
filterArray(itemEntries: ItemEntry[], callback: (itemEntry: ItemEntry) => boolean): ItemEntry[];
|
|
26
|
+
}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { CollectionCache, CollectionEntryService, CollectionMatcher, ColumnExpansion, ColumnHandler, ColumnSet, ItemCache, ItemRequestService, KeyService, QueryService } from '../classes';
|
|
2
|
-
import { ENTRY_STATUS } from '../constants';
|
|
3
|
-
import { CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, ColumnSetFactory, QueryParserFactory } from '../factories';
|
|
4
|
-
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
5
|
-
import { CollectionEntry, CollectionResource, ItemResource } from '../models';
|
|
6
|
-
import { CollectionEntryBatchStatusMap, CollectionEntryParentIdMap, EntryStatus, ItemEntryParentIdMap, ItemId, ItemResourceItemIdMap, ItemType, RequestColumn } from '../types';
|
|
7
|
-
export declare class CollectionHandler {
|
|
8
|
-
private errorHandler;
|
|
9
|
-
private itemRequestService;
|
|
10
|
-
private columnHandler;
|
|
11
|
-
private columnSetFactory;
|
|
12
|
-
private collectionEntryFactory;
|
|
13
|
-
private collectionCacheFactory;
|
|
14
|
-
private queryParserFactory;
|
|
15
|
-
private collectionEntryService;
|
|
16
|
-
private keyService;
|
|
17
|
-
private promiseService;
|
|
18
|
-
private queryService;
|
|
19
|
-
private collectionMatcherFactory;
|
|
20
|
-
entries: CollectionCache;
|
|
21
|
-
constructor(errorHandler: ErrorHandlerInterface, itemRequestService: ItemRequestService, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, collectionEntryFactory: CollectionEntryFactory, collectionCacheFactory: CollectionCacheFactory, queryParserFactory: QueryParserFactory, collectionEntryService: CollectionEntryService, keyService: KeyService, promiseService: PromiseInterface, queryService: QueryService, collectionMatcherFactory: CollectionMatcherFactory);
|
|
22
|
-
getPromises(statusResource: CollectionEntryBatchStatusMap): CollectionEntry[];
|
|
23
|
-
getRequestIds(statusResource: any): number[];
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated, use collectionMatcherFactory
|
|
26
|
-
*/
|
|
27
|
-
removeFromAndAddToCollections(collectionMap: any, updateInitial?: any): void;
|
|
28
|
-
getCollectionMatcher(): CollectionMatcher;
|
|
29
|
-
/**
|
|
30
|
-
* @deprecated, use collectionMatcherFactory
|
|
31
|
-
*/
|
|
32
|
-
removeFromCollections(collectionMap: any, updateInitial?: any, resultResource?: CollectionResource | null): any;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated, use collectionMatcherFactory
|
|
35
|
-
*/
|
|
36
|
-
addToCollections(collectionMap: any, updateInitial: boolean, resultResource?: CollectionResource | null): ItemResource[];
|
|
37
|
-
batchExpand(parentType: ItemType, itemType: ItemType, collections: CollectionResource[], newColumns: RequestColumn[]): Promise<CollectionResource[]>;
|
|
38
|
-
batchExtend(parentType: string, itemType: string, options: any, queryCallback: any, collections: CollectionResource[], returnAllItems?: boolean): Promise<ItemResourceItemIdMap>;
|
|
39
|
-
batchFetch(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntryParentIdMap>;
|
|
40
|
-
createStatusResource(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: any, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): CollectionEntryBatchStatusMap;
|
|
41
|
-
fetch(itemType: ItemType, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntry>;
|
|
42
|
-
getCachedEntryStatus(collectionEntry: CollectionEntry, options: any): ENTRY_STATUS;
|
|
43
|
-
getDeferredEntryStatus(itemType: ItemType, options: any, query: any, deferredEntries: CollectionCache): {
|
|
44
|
-
entry: CollectionEntry;
|
|
45
|
-
isDeferred: boolean;
|
|
46
|
-
};
|
|
47
|
-
getEntryStatus(itemType: ItemType, options: any, localEntries: CollectionCache, deferredEntries: CollectionCache): EntryStatus<CollectionEntry>;
|
|
48
|
-
handleBatchResponse(statusResource: any, itemEntryCompound: {
|
|
49
|
-
columns: ColumnSet;
|
|
50
|
-
columnExpansion?: ColumnExpansion;
|
|
51
|
-
items?: ItemEntryParentIdMap;
|
|
52
|
-
}, itemCache: ItemCache): CollectionEntryParentIdMap;
|
|
53
|
-
resolveLocal(collectionEntry: CollectionEntry, itemCache: ItemCache): Promise<CollectionEntry>;
|
|
54
|
-
resolveRemote(collectionEntry: CollectionEntry, itemCache: ItemCache): Promise<CollectionEntry>;
|
|
55
|
-
isLocal(options: any): boolean;
|
|
56
|
-
}
|
|
1
|
+
import { CollectionCache, CollectionEntryService, CollectionMatcher, ColumnExpansion, ColumnHandler, ColumnSet, ItemCache, ItemRequestService, KeyService, QueryService } from '../classes';
|
|
2
|
+
import { ENTRY_STATUS } from '../constants';
|
|
3
|
+
import { CollectionCacheFactory, CollectionEntryFactory, CollectionMatcherFactory, ColumnSetFactory, QueryParserFactory } from '../factories';
|
|
4
|
+
import { ErrorHandlerInterface, PromiseInterface } from '../interfaces';
|
|
5
|
+
import { CollectionEntry, CollectionResource, ItemResource } from '../models';
|
|
6
|
+
import { CollectionEntryBatchStatusMap, CollectionEntryParentIdMap, EntryStatus, ItemEntryParentIdMap, ItemId, ItemResourceItemIdMap, ItemType, RequestColumn } from '../types';
|
|
7
|
+
export declare class CollectionHandler {
|
|
8
|
+
private errorHandler;
|
|
9
|
+
private itemRequestService;
|
|
10
|
+
private columnHandler;
|
|
11
|
+
private columnSetFactory;
|
|
12
|
+
private collectionEntryFactory;
|
|
13
|
+
private collectionCacheFactory;
|
|
14
|
+
private queryParserFactory;
|
|
15
|
+
private collectionEntryService;
|
|
16
|
+
private keyService;
|
|
17
|
+
private promiseService;
|
|
18
|
+
private queryService;
|
|
19
|
+
private collectionMatcherFactory;
|
|
20
|
+
entries: CollectionCache;
|
|
21
|
+
constructor(errorHandler: ErrorHandlerInterface, itemRequestService: ItemRequestService, columnHandler: ColumnHandler, columnSetFactory: ColumnSetFactory, collectionEntryFactory: CollectionEntryFactory, collectionCacheFactory: CollectionCacheFactory, queryParserFactory: QueryParserFactory, collectionEntryService: CollectionEntryService, keyService: KeyService, promiseService: PromiseInterface, queryService: QueryService, collectionMatcherFactory: CollectionMatcherFactory);
|
|
22
|
+
getPromises(statusResource: CollectionEntryBatchStatusMap): CollectionEntry[];
|
|
23
|
+
getRequestIds(statusResource: any): number[];
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated, use collectionMatcherFactory
|
|
26
|
+
*/
|
|
27
|
+
removeFromAndAddToCollections(collectionMap: any, updateInitial?: any): void;
|
|
28
|
+
getCollectionMatcher(): CollectionMatcher;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated, use collectionMatcherFactory
|
|
31
|
+
*/
|
|
32
|
+
removeFromCollections(collectionMap: any, updateInitial?: any, resultResource?: CollectionResource | null): any;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated, use collectionMatcherFactory
|
|
35
|
+
*/
|
|
36
|
+
addToCollections(collectionMap: any, updateInitial: boolean, resultResource?: CollectionResource | null): ItemResource[];
|
|
37
|
+
batchExpand(parentType: ItemType, itemType: ItemType, collections: CollectionResource[], newColumns: RequestColumn[]): Promise<CollectionResource[]>;
|
|
38
|
+
batchExtend(parentType: string, itemType: string, options: any, queryCallback: any, collections: CollectionResource[], returnAllItems?: boolean): Promise<ItemResourceItemIdMap>;
|
|
39
|
+
batchFetch(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntryParentIdMap>;
|
|
40
|
+
createStatusResource(parentType: ItemType, parentIdArray: ItemId[], itemType: ItemType, options: any, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): CollectionEntryBatchStatusMap;
|
|
41
|
+
fetch(itemType: ItemType, options: any, itemCache: ItemCache, localCollectionCache: CollectionCache, deferredCollectionCache: CollectionCache): Promise<CollectionEntry>;
|
|
42
|
+
getCachedEntryStatus(collectionEntry: CollectionEntry, options: any): ENTRY_STATUS;
|
|
43
|
+
getDeferredEntryStatus(itemType: ItemType, options: any, query: any, deferredEntries: CollectionCache): {
|
|
44
|
+
entry: CollectionEntry;
|
|
45
|
+
isDeferred: boolean;
|
|
46
|
+
};
|
|
47
|
+
getEntryStatus(itemType: ItemType, options: any, localEntries: CollectionCache, deferredEntries: CollectionCache): EntryStatus<CollectionEntry>;
|
|
48
|
+
handleBatchResponse(statusResource: any, itemEntryCompound: {
|
|
49
|
+
columns: ColumnSet;
|
|
50
|
+
columnExpansion?: ColumnExpansion;
|
|
51
|
+
items?: ItemEntryParentIdMap;
|
|
52
|
+
}, itemCache: ItemCache): CollectionEntryParentIdMap;
|
|
53
|
+
resolveLocal(collectionEntry: CollectionEntry, itemCache: ItemCache): Promise<CollectionEntry>;
|
|
54
|
+
resolveRemote(collectionEntry: CollectionEntry, itemCache: ItemCache): Promise<CollectionEntry>;
|
|
55
|
+
isLocal(options: any): boolean;
|
|
56
|
+
}
|