@rentman/rm-core 1.7.1 → 1.7.3
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 +522 -512
- package/dist/rm-core.js +7481 -7473
- package/dist/rm-core.min.js +1 -1
- package/dist/src/classes/ApiFormatter.d.ts +39 -39
- package/dist/src/classes/ApiRequestService.d.ts +20 -20
- package/dist/src/classes/ApiResponseProcessor.d.ts +41 -41
- package/dist/src/classes/BatchStatus.d.ts +28 -27
- package/dist/src/classes/ChangesCompilation.d.ts +51 -51
- package/dist/src/classes/ChangesProcessor.d.ts +33 -33
- package/dist/src/classes/CollectionCache.d.ts +34 -34
- package/dist/src/classes/CollectionEntryService.d.ts +23 -23
- package/dist/src/classes/CollectionHandler.d.ts +54 -54
- package/dist/src/classes/CollectionMatcher.d.ts +42 -42
- 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 +18 -18
- 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 +46 -46
- package/dist/src/classes/ColumnSubsetCache.d.ts +8 -8
- package/dist/src/classes/ColumnUtil.d.ts +89 -89
- package/dist/src/classes/CreateRequest.d.ts +20 -20
- package/dist/src/classes/ItemAdministrator.d.ts +238 -238
- package/dist/src/classes/ItemCache.d.ts +23 -23
- package/dist/src/classes/ItemEntryService.d.ts +24 -24
- package/dist/src/classes/ItemHandler.d.ts +60 -60
- package/dist/src/classes/ItemRequestService.d.ts +23 -23
- package/dist/src/classes/KeyService.d.ts +16 -16
- package/dist/src/classes/LocalCache.d.ts +97 -97
- package/dist/src/classes/LockService.d.ts +32 -32
- package/dist/src/classes/ModuleChangesCompilation.d.ts +21 -21
- package/dist/src/classes/QueryMatcher.d.ts +14 -14
- package/dist/src/classes/QueryParser.d.ts +34 -34
- package/dist/src/classes/QueryService.d.ts +14 -14
- package/dist/src/classes/RequestColumnExpansion.d.ts +14 -14
- package/dist/src/classes/ResourceCache.d.ts +25 -25
- package/dist/src/classes/SocketMessageHandler.d.ts +41 -41
- package/dist/src/classes/Util.d.ts +28 -28
- package/dist/src/classes/index.d.ts +35 -35
- package/dist/src/constants.d.ts +18 -18
- package/dist/src/core.d.ts +48 -48
- package/dist/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/src/factories/BatchStatusFactory.d.ts +9 -8
- package/dist/src/factories/ChangesCompilationFactory.d.ts +10 -9
- package/dist/src/factories/CollectionCacheFactory.d.ts +8 -8
- package/dist/src/factories/CollectionEntryFactory.d.ts +23 -23
- package/dist/src/factories/CollectionMatcherFactory.d.ts +8 -7
- package/dist/src/factories/CollectionResourceFactory.d.ts +33 -32
- 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 +11 -11
- 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 +7 -7
- package/dist/src/factories/ItemEntryFactory.d.ts +21 -21
- package/dist/src/factories/ItemResourceFactory.d.ts +29 -29
- package/dist/src/factories/LocalCacheFactory.d.ts +16 -16
- package/dist/src/factories/ModuleChangesCompilationFactory.d.ts +6 -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/index.d.ts +21 -21
- 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/LocalCacheManagerInterface.d.ts +5 -5
- 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 +14 -14
- package/dist/src/models/CollectionEntry.d.ts +82 -82
- package/dist/src/models/CollectionEntryOptions.d.ts +12 -12
- package/dist/src/models/CollectionResource.d.ts +41 -41
- package/dist/src/models/CollectionResourceOptions.d.ts +22 -22
- package/dist/src/models/CollectionViewResource.d.ts +7 -6
- package/dist/src/models/EditResource.d.ts +18 -18
- package/dist/src/models/ItemEntry.d.ts +70 -70
- package/dist/src/models/ItemEntryOptions.d.ts +11 -11
- package/dist/src/models/ItemResource.d.ts +27 -27
- package/dist/src/models/ItemResourceOptions.d.ts +9 -8
- package/dist/src/models/LocalViewResource.d.ts +7 -6
- package/dist/src/models/RemoteViewResource.d.ts +7 -6
- 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 +213 -213
- package/dist/src/types/PromiseInterface.d.ts +2 -2
- package/dist/src/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/readme.md +15 -15
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { ItemResourceFactory } from '../factories';
|
|
3
|
-
import { ItemEntry, ItemResourceOptions } from '../models';
|
|
4
|
-
import { FieldMap, ResponseColumn } from '../types';
|
|
5
|
-
export declare abstract class ItemResource {
|
|
6
|
-
protected readonly factory: ItemResourceFactory;
|
|
7
|
-
readonly entry: ItemEntry
|
|
8
|
-
readonly options: ItemResourceOptions
|
|
9
|
-
protected readonly _isNew: boolean;
|
|
10
|
-
protected readonly localCache: LocalCache | null;
|
|
11
|
-
columns: {
|
|
12
|
-
[columnId: string]: ResponseColumn;
|
|
13
|
-
};
|
|
14
|
-
fields: FieldMap;
|
|
15
|
-
derived: FieldMap;
|
|
16
|
-
protected constructor(factory: ItemResourceFactory, entry: ItemEntry
|
|
17
|
-
isNew(): boolean;
|
|
18
|
-
isLocal(): boolean;
|
|
19
|
-
clearResource(): void;
|
|
20
|
-
deactivate(): void;
|
|
21
|
-
toJSON(): {
|
|
22
|
-
columns: string[];
|
|
23
|
-
fields: FieldMap
|
|
24
|
-
derived: FieldMap
|
|
25
|
-
entry: ItemEntry
|
|
26
|
-
};
|
|
27
|
-
}
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { ItemResourceFactory } from '../factories';
|
|
3
|
+
import { ItemEntry, ItemResourceOptions } from '../models';
|
|
4
|
+
import { FieldMap, ItemType, ResponseColumn } from '../types';
|
|
5
|
+
export declare abstract class ItemResource<ItemTypeType extends ItemType = any> {
|
|
6
|
+
protected readonly factory: ItemResourceFactory;
|
|
7
|
+
readonly entry: ItemEntry<ItemTypeType>;
|
|
8
|
+
readonly options: ItemResourceOptions<ItemResource<ItemTypeType>>;
|
|
9
|
+
protected readonly _isNew: boolean;
|
|
10
|
+
protected readonly localCache: LocalCache | null;
|
|
11
|
+
columns: {
|
|
12
|
+
[columnId: string]: ResponseColumn;
|
|
13
|
+
};
|
|
14
|
+
fields: FieldMap;
|
|
15
|
+
derived: FieldMap;
|
|
16
|
+
protected constructor(factory: ItemResourceFactory, entry: ItemEntry<ItemTypeType>, options: ItemResourceOptions<ItemResource<ItemTypeType>>, _isNew: boolean, localCache: LocalCache | null);
|
|
17
|
+
isNew(): boolean;
|
|
18
|
+
isLocal(): boolean;
|
|
19
|
+
clearResource(): void;
|
|
20
|
+
deactivate(): void;
|
|
21
|
+
toJSON(): {
|
|
22
|
+
columns: string[];
|
|
23
|
+
fields: FieldMap<any>;
|
|
24
|
+
derived: FieldMap<any>;
|
|
25
|
+
entry: ItemEntry<ItemTypeType>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { OnChangeFunction } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { OnChangeFunction } from '../types';
|
|
2
|
+
import { ItemResource } from './ItemResource';
|
|
3
|
+
export declare type ItemResourceOptionsInterface<ItemResourceType extends ItemResource<any> = ItemResource<any>> = Partial<ItemResourceOptions<ItemResourceType>>;
|
|
4
|
+
export declare class ItemResourceOptions<ItemResourceType extends ItemResource<any> = ItemResource<any>> {
|
|
5
|
+
edit: boolean;
|
|
6
|
+
remote: boolean;
|
|
7
|
+
onChange: OnChangeFunction<ItemResourceType>;
|
|
8
|
+
constructor(values: ItemResourceOptionsInterface<ItemResourceType>);
|
|
9
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { ItemResourceFactory } from '../factories';
|
|
3
|
-
import { ItemEntry, ItemResourceOptions, ViewResource } from '../models';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { ItemResourceFactory } from '../factories';
|
|
3
|
+
import { ItemEntry, ItemResourceOptions, ViewResource } from '../models';
|
|
4
|
+
import { ItemType } from '../types';
|
|
5
|
+
export declare class LocalViewResource<ItemTypeType extends ItemType = any> extends ViewResource<ItemTypeType> {
|
|
6
|
+
constructor(factory: ItemResourceFactory, entry: ItemEntry<ItemTypeType>, options: ItemResourceOptions, isNew: boolean, localCache: LocalCache | null);
|
|
7
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { ItemResourceFactory } from '../factories';
|
|
3
|
-
import { ItemEntry, ItemResourceOptions, ViewResource } from '../models';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { ItemResourceFactory } from '../factories';
|
|
3
|
+
import { ItemEntry, ItemResourceOptions, ViewResource } from '../models';
|
|
4
|
+
import { ItemType } from '../types';
|
|
5
|
+
export declare class RemoteViewResource<ItemTypeType extends ItemType = any> extends ViewResource<ItemTypeType> {
|
|
6
|
+
constructor(factory: ItemResourceFactory, entry: ItemEntry<ItemTypeType>, options: ItemResourceOptions<RemoteViewResource<ItemTypeType>>, isNew: boolean, localCache: LocalCache | null);
|
|
7
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ColumnSet } from '../classes';
|
|
2
|
-
import { TemplateFactory } from '../factories';
|
|
3
|
-
import { ApiResponse, FieldMap, ItemType, ResponseColumnMap } from '../types';
|
|
4
|
-
export declare class Template {
|
|
5
|
-
itemType:
|
|
6
|
-
response: ApiResponse;
|
|
7
|
-
fields: FieldMap
|
|
8
|
-
responseColumns: ResponseColumnMap;
|
|
9
|
-
columns: ColumnSet
|
|
10
|
-
constructor(factory: TemplateFactory, itemType:
|
|
11
|
-
}
|
|
1
|
+
import { ColumnSet } from '../classes';
|
|
2
|
+
import { TemplateFactory } from '../factories';
|
|
3
|
+
import { ApiResponse, FieldMap, ItemType, ResponseColumnMap } from '../types';
|
|
4
|
+
export declare class Template<ItemTypeType extends ItemType = any> {
|
|
5
|
+
itemType: ItemTypeType;
|
|
6
|
+
response: ApiResponse;
|
|
7
|
+
fields: FieldMap<ItemTypeType>;
|
|
8
|
+
responseColumns: ResponseColumnMap;
|
|
9
|
+
columns: ColumnSet<ItemTypeType>;
|
|
10
|
+
constructor(factory: TemplateFactory, itemType: ItemTypeType, response: ApiResponse, additionalColumns: ResponseColumnMap);
|
|
11
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LocalCache } from '../classes';
|
|
2
|
-
import { ItemResourceFactory } from '../factories';
|
|
3
|
-
import { ItemEntry, ItemResource, ItemResourceOptions } from '../models';
|
|
4
|
-
import { FieldMap } from '../types';
|
|
5
|
-
export declare abstract class ViewResource extends ItemResource {
|
|
6
|
-
fields: Readonly<FieldMap>;
|
|
7
|
-
protected constructor(factory: ItemResourceFactory, entry: ItemEntry
|
|
8
|
-
}
|
|
1
|
+
import { LocalCache } from '../classes';
|
|
2
|
+
import { ItemResourceFactory } from '../factories';
|
|
3
|
+
import { ItemEntry, ItemResource, ItemResourceOptions } from '../models';
|
|
4
|
+
import { FieldMap, ItemType } from '../types';
|
|
5
|
+
export declare abstract class ViewResource<ItemTypeType extends ItemType = any> extends ItemResource<ItemTypeType> {
|
|
6
|
+
fields: Readonly<FieldMap>;
|
|
7
|
+
protected constructor(factory: ItemResourceFactory, entry: ItemEntry<ItemTypeType>, options: ItemResourceOptions<ViewResource<ItemTypeType>>, isNew: boolean, localCache: LocalCache | null);
|
|
8
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from './ItemEntryOptions';
|
|
2
|
-
export * from './ItemResourceOptions';
|
|
3
|
-
export * from './ItemEntry';
|
|
4
|
-
export * from './ItemResource';
|
|
5
|
-
export * from './ViewResource';
|
|
6
|
-
export * from './EditResource';
|
|
7
|
-
export * from './CollectionEntryOptions';
|
|
8
|
-
export * from './CollectionResourceOptions';
|
|
9
|
-
export * from './CollectionEntry';
|
|
10
|
-
export * from './CollectionResource';
|
|
11
|
-
export * from './CollectionViewResource';
|
|
12
|
-
export * from './CollectionEditResource';
|
|
13
|
-
export * from './Template';
|
|
14
|
-
export * from './RemoteViewResource';
|
|
15
|
-
export * from './LocalViewResource';
|
|
1
|
+
export * from './ItemEntryOptions';
|
|
2
|
+
export * from './ItemResourceOptions';
|
|
3
|
+
export * from './ItemEntry';
|
|
4
|
+
export * from './ItemResource';
|
|
5
|
+
export * from './ViewResource';
|
|
6
|
+
export * from './EditResource';
|
|
7
|
+
export * from './CollectionEntryOptions';
|
|
8
|
+
export * from './CollectionResourceOptions';
|
|
9
|
+
export * from './CollectionEntry';
|
|
10
|
+
export * from './CollectionResource';
|
|
11
|
+
export * from './CollectionViewResource';
|
|
12
|
+
export * from './CollectionEditResource';
|
|
13
|
+
export * from './Template';
|
|
14
|
+
export * from './RemoteViewResource';
|
|
15
|
+
export * from './LocalViewResource';
|
|
@@ -1,213 +1,213 @@
|
|
|
1
|
-
import { ApiResponseProcessor, CollectionMatcher, ColumnSet, LocalCache, RequestColumnExpansion } from '../classes';
|
|
2
|
-
import { ENTRY_STATUS } from '../constants';
|
|
3
|
-
import { CollectionEntry, CollectionEntryOptions, CollectionEntryOptionsInterface, CollectionResource, CollectionResourceOptions, CollectionResourceOptionsInterface, ItemEntry, ItemEntryOptionsInterface, ItemResource, ItemResourceOptionsInterface } from '../models';
|
|
4
|
-
export declare type EntryParent = {
|
|
5
|
-
itemType: string;
|
|
6
|
-
itemId: number;
|
|
7
|
-
};
|
|
8
|
-
export declare type EntryParentNull = EntryParent | null;
|
|
9
|
-
export declare type FieldMap = {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
|
-
export declare type ItemOptionsInterface = ItemEntryOptionsInterface & ItemResourceOptionsInterface;
|
|
13
|
-
export declare type CollectionOptionsInterface = CollectionEntryOptionsInterface & CollectionResourceOptionsInterface
|
|
14
|
-
export interface CollectionDefinition {
|
|
15
|
-
itemType:
|
|
16
|
-
options: {
|
|
17
|
-
entry: CollectionEntryOptions;
|
|
18
|
-
resource: CollectionResourceOptions
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
export interface LinkCollectionDefinition extends CollectionDefinition {
|
|
22
|
-
linkField: string;
|
|
23
|
-
}
|
|
24
|
-
export declare type OnChangeFunction = (itemResource:
|
|
25
|
-
export declare const enum StateKeyType {
|
|
26
|
-
New = "new",
|
|
27
|
-
Duplicate = "duplicate"
|
|
28
|
-
}
|
|
29
|
-
export declare type StateKey = {
|
|
30
|
-
type: StateKeyType;
|
|
31
|
-
template?: string;
|
|
32
|
-
itemId?: number;
|
|
33
|
-
};
|
|
34
|
-
export declare type OnSaveCallback = (localCache: LocalCache, conversionMap: ItemIdConversionMap) => any;
|
|
35
|
-
export declare enum LocalCacheCallbackCondition {
|
|
36
|
-
Always = "always",
|
|
37
|
-
OnClose = "onClose",
|
|
38
|
-
SkipOnClose = "skipOnClose"
|
|
39
|
-
}
|
|
40
|
-
export declare type LocalCacheCallbacks<T> = {
|
|
41
|
-
always: {
|
|
42
|
-
[key: string]: T;
|
|
43
|
-
};
|
|
44
|
-
onClose: {
|
|
45
|
-
[key: string]: T;
|
|
46
|
-
};
|
|
47
|
-
skipOnClose: {
|
|
48
|
-
[key: string]: T;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export declare type SocketMessageType = 'event' | 'notification';
|
|
52
|
-
export interface SocketMessage {
|
|
53
|
-
header: {
|
|
54
|
-
domain: string;
|
|
55
|
-
account: string;
|
|
56
|
-
sender: {
|
|
57
|
-
displayname: string;
|
|
58
|
-
itemType: 'Medewerker';
|
|
59
|
-
itemId: ItemId;
|
|
60
|
-
authorized: boolean;
|
|
61
|
-
session: string;
|
|
62
|
-
};
|
|
63
|
-
messageId: {
|
|
64
|
-
Id: string;
|
|
65
|
-
sequence: number;
|
|
66
|
-
batch: number;
|
|
67
|
-
request: number;
|
|
68
|
-
};
|
|
69
|
-
sent: string;
|
|
70
|
-
forceEvaluate: boolean;
|
|
71
|
-
};
|
|
72
|
-
body: any;
|
|
73
|
-
messageType: SocketMessageType;
|
|
74
|
-
}
|
|
75
|
-
export interface FunctionChangesResolveSocketMessage extends SocketMessage {
|
|
76
|
-
body: {
|
|
77
|
-
itemType: 'FunctionChangesResolve';
|
|
78
|
-
[key: string]: any;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export declare type ItemResourceItemIdMap<T extends ItemResource = ItemResource
|
|
82
|
-
[itemId: number]: T;
|
|
83
|
-
};
|
|
84
|
-
export declare type ItemResourcesItemTypeMap<T extends ItemResource = ItemResource
|
|
85
|
-
[itemType: string]: T[];
|
|
86
|
-
};
|
|
87
|
-
export declare type ItemId = number;
|
|
88
|
-
export declare type ItemType = string;
|
|
89
|
-
export declare type ItemMap<T> = {
|
|
90
|
-
[itemType: string]: {
|
|
91
|
-
[itemId: string]: T;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
export declare type ItemEntryMap = ItemMap<ItemEntry
|
|
95
|
-
export declare type LinkedItemEntryMap = {
|
|
96
|
-
itemType:
|
|
97
|
-
itemEntries: ItemEntry
|
|
98
|
-
columnSet: ColumnSet
|
|
99
|
-
};
|
|
100
|
-
export declare type EntryStatusMap<T> = {
|
|
101
|
-
[entryStatus: string]: T[];
|
|
102
|
-
};
|
|
103
|
-
export declare type ItemEntryParentIdMap = {
|
|
104
|
-
[parentId: number]: ItemEntry
|
|
105
|
-
};
|
|
106
|
-
export declare type ConversionMap = {
|
|
107
|
-
[itemId: number]: number;
|
|
108
|
-
};
|
|
109
|
-
export declare type ItemIdConversionMap = {
|
|
110
|
-
[itemType: string]: ConversionMap;
|
|
111
|
-
};
|
|
112
|
-
export declare type CreateRequestParameterMap = ItemMap<
|
|
113
|
-
export declare type ItemError = {
|
|
114
|
-
message: string;
|
|
115
|
-
};
|
|
116
|
-
export declare type QueryParams = any;
|
|
117
|
-
export declare type CollectionQuery = {
|
|
118
|
-
object: object;
|
|
119
|
-
string: string;
|
|
120
|
-
};
|
|
121
|
-
export declare type QueryCallback = (queryParams: QueryParams) => QueryParams;
|
|
122
|
-
export declare type CollectionEntryParentIdMap = {
|
|
123
|
-
[parentId: number]: CollectionEntry
|
|
124
|
-
};
|
|
125
|
-
export declare type CollectionResourceParentIdMap<T extends CollectionResource<
|
|
126
|
-
[parentId: number]: T;
|
|
127
|
-
};
|
|
128
|
-
export declare type CollectionMatchResult = {
|
|
129
|
-
fitting: CollectionEntry
|
|
130
|
-
notfitting: CollectionEntry
|
|
131
|
-
maybe: CollectionEntry
|
|
132
|
-
};
|
|
133
|
-
export interface ExtendedCollectionMatchResult extends CollectionMatchResult {
|
|
134
|
-
collection: CollectionEntry
|
|
135
|
-
}
|
|
136
|
-
export interface GroupedExtendedCollectionMatchResult {
|
|
137
|
-
[collectionId: number]: ExtendedCollectionMatchResult
|
|
138
|
-
}
|
|
139
|
-
export declare type ResponseColumn = any;
|
|
140
|
-
export declare type ResponseColumnMap = {
|
|
141
|
-
[itemType: string]: {
|
|
142
|
-
[columnId: string]: ResponseColumn;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
export declare type ColumnExpansionResult = {
|
|
146
|
-
merged: ColumnSet
|
|
147
|
-
difference: ColumnSet
|
|
148
|
-
};
|
|
149
|
-
export declare type RootColumnMap = {
|
|
150
|
-
[columnId: string]: {
|
|
151
|
-
apiColumn: ResponseColumn;
|
|
152
|
-
children: RootColumnMap;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
export declare type ApiResponse = ApiResponseProcessor;
|
|
156
|
-
export declare type TemplateItemResourceMap<T extends ItemResource
|
|
157
|
-
main: T;
|
|
158
|
-
linked: ItemResourcesItemTypeMap;
|
|
159
|
-
};
|
|
160
|
-
export declare type TemplateItemEntryMap = {
|
|
161
|
-
main: ItemEntry
|
|
162
|
-
linked: LinkedItemEntryMap
|
|
163
|
-
};
|
|
164
|
-
export declare type ItemTypeMap = {
|
|
165
|
-
[itemType: string]: any;
|
|
166
|
-
};
|
|
167
|
-
export declare type EntryStatus<T> = {
|
|
168
|
-
entry: T;
|
|
169
|
-
status: ENTRY_STATUS;
|
|
170
|
-
};
|
|
171
|
-
export declare type ApiQuery = any;
|
|
172
|
-
export declare type ApiRequestItemValues = {
|
|
173
|
-
values?: any;
|
|
174
|
-
links?: {
|
|
175
|
-
[itemType: string]: ItemId[];
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
export declare type ApiRequestItemMap = {
|
|
179
|
-
[itemType: string]: {
|
|
180
|
-
[itemId: number]: ApiRequestItemValues;
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
export declare type ApiRequestColumn = string | {
|
|
184
|
-
[columnId: string]: ApiRequestColumn[];
|
|
185
|
-
};
|
|
186
|
-
export declare type ApiRequestColumns = ApiRequestColumn[] | true;
|
|
187
|
-
export declare type ApiRequestColumnMap = {
|
|
188
|
-
[itemType: string]: ApiRequestColumns;
|
|
189
|
-
};
|
|
190
|
-
export declare type ApiRequestLimit = {
|
|
191
|
-
field: string;
|
|
192
|
-
limit: number;
|
|
193
|
-
offset?: number;
|
|
194
|
-
order?: 'desc' | 'asc';
|
|
195
|
-
};
|
|
196
|
-
export declare type ApiRequestMoveItems = {
|
|
197
|
-
[itemType: string]: ItemId[];
|
|
198
|
-
};
|
|
199
|
-
export declare type CreateRequestEntry = {
|
|
200
|
-
request: {
|
|
201
|
-
requestType: 'create';
|
|
202
|
-
itemType?:
|
|
203
|
-
parentType?: ItemType;
|
|
204
|
-
parentId?: {
|
|
205
|
-
[itemId: string]: ItemId;
|
|
206
|
-
};
|
|
207
|
-
items: ApiRequestItemMap;
|
|
208
|
-
columns: ApiRequestColumnMap;
|
|
209
|
-
};
|
|
210
|
-
columns: RequestColumnExpansion;
|
|
211
|
-
items: ItemEntryMap
|
|
212
|
-
collections: CollectionMatcher
|
|
213
|
-
};
|
|
1
|
+
import { ApiResponseProcessor, CollectionMatcher, ColumnSet, LocalCache, RequestColumnExpansion } from '../classes';
|
|
2
|
+
import { ENTRY_STATUS } from '../constants';
|
|
3
|
+
import { CollectionEntry, CollectionEntryOptions, CollectionEntryOptionsInterface, CollectionResource, CollectionResourceOptions, CollectionResourceOptionsInterface, ItemEntry, ItemEntryOptionsInterface, ItemResource, ItemResourceOptionsInterface } from '../models';
|
|
4
|
+
export declare type EntryParent = {
|
|
5
|
+
itemType: string;
|
|
6
|
+
itemId: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type EntryParentNull = EntryParent | null;
|
|
9
|
+
export declare type FieldMap<_ItemTypeType extends ItemType = any> = {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
export declare type ItemOptionsInterface = ItemEntryOptionsInterface & ItemResourceOptionsInterface;
|
|
13
|
+
export declare type CollectionOptionsInterface<ItemTypeType extends ItemType = any> = CollectionEntryOptionsInterface & CollectionResourceOptionsInterface<ItemTypeType>;
|
|
14
|
+
export interface CollectionDefinition<ItemTypeType extends ItemType = any> {
|
|
15
|
+
itemType: ItemTypeType;
|
|
16
|
+
options: {
|
|
17
|
+
entry: CollectionEntryOptions;
|
|
18
|
+
resource: CollectionResourceOptions<ItemTypeType>;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface LinkCollectionDefinition<ItemTypeType extends ItemType = any> extends CollectionDefinition<ItemTypeType> {
|
|
22
|
+
linkField: string;
|
|
23
|
+
}
|
|
24
|
+
export declare type OnChangeFunction<ItemResourceType extends ItemResource<any> = ItemResource<any>> = (itemResource: ItemResourceType, previous?: FieldMap) => void;
|
|
25
|
+
export declare const enum StateKeyType {
|
|
26
|
+
New = "new",
|
|
27
|
+
Duplicate = "duplicate"
|
|
28
|
+
}
|
|
29
|
+
export declare type StateKey = {
|
|
30
|
+
type: StateKeyType;
|
|
31
|
+
template?: string;
|
|
32
|
+
itemId?: number;
|
|
33
|
+
};
|
|
34
|
+
export declare type OnSaveCallback = (localCache: LocalCache, conversionMap: ItemIdConversionMap) => any;
|
|
35
|
+
export declare enum LocalCacheCallbackCondition {
|
|
36
|
+
Always = "always",
|
|
37
|
+
OnClose = "onClose",
|
|
38
|
+
SkipOnClose = "skipOnClose"
|
|
39
|
+
}
|
|
40
|
+
export declare type LocalCacheCallbacks<T> = {
|
|
41
|
+
always: {
|
|
42
|
+
[key: string]: T;
|
|
43
|
+
};
|
|
44
|
+
onClose: {
|
|
45
|
+
[key: string]: T;
|
|
46
|
+
};
|
|
47
|
+
skipOnClose: {
|
|
48
|
+
[key: string]: T;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export declare type SocketMessageType = 'event' | 'notification';
|
|
52
|
+
export interface SocketMessage {
|
|
53
|
+
header: {
|
|
54
|
+
domain: string;
|
|
55
|
+
account: string;
|
|
56
|
+
sender: {
|
|
57
|
+
displayname: string;
|
|
58
|
+
itemType: 'Medewerker';
|
|
59
|
+
itemId: ItemId;
|
|
60
|
+
authorized: boolean;
|
|
61
|
+
session: string;
|
|
62
|
+
};
|
|
63
|
+
messageId: {
|
|
64
|
+
Id: string;
|
|
65
|
+
sequence: number;
|
|
66
|
+
batch: number;
|
|
67
|
+
request: number;
|
|
68
|
+
};
|
|
69
|
+
sent: string;
|
|
70
|
+
forceEvaluate: boolean;
|
|
71
|
+
};
|
|
72
|
+
body: any;
|
|
73
|
+
messageType: SocketMessageType;
|
|
74
|
+
}
|
|
75
|
+
export interface FunctionChangesResolveSocketMessage extends SocketMessage {
|
|
76
|
+
body: {
|
|
77
|
+
itemType: 'FunctionChangesResolve';
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export declare type ItemResourceItemIdMap<T extends ItemResource<any> = ItemResource<any>> = {
|
|
82
|
+
[itemId: number]: T;
|
|
83
|
+
};
|
|
84
|
+
export declare type ItemResourcesItemTypeMap<T extends ItemResource<any> = ItemResource<any>> = {
|
|
85
|
+
[itemType: string]: T[];
|
|
86
|
+
};
|
|
87
|
+
export declare type ItemId = number;
|
|
88
|
+
export declare type ItemType = string;
|
|
89
|
+
export declare type ItemMap<T> = {
|
|
90
|
+
[itemType: string]: {
|
|
91
|
+
[itemId: string]: T;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare type ItemEntryMap<ItemTypeType extends ItemType> = ItemMap<ItemEntry<ItemTypeType>>;
|
|
95
|
+
export declare type LinkedItemEntryMap<ItemTypeType extends ItemType = any> = {
|
|
96
|
+
itemType: ItemTypeType;
|
|
97
|
+
itemEntries: Array<ItemEntry<ItemTypeType>>;
|
|
98
|
+
columnSet: ColumnSet<ItemTypeType>;
|
|
99
|
+
};
|
|
100
|
+
export declare type EntryStatusMap<T> = {
|
|
101
|
+
[entryStatus: string]: T[];
|
|
102
|
+
};
|
|
103
|
+
export declare type ItemEntryParentIdMap<ItemTypeType extends ItemType> = {
|
|
104
|
+
[parentId: number]: Array<ItemEntry<ItemTypeType>>;
|
|
105
|
+
};
|
|
106
|
+
export declare type ConversionMap = {
|
|
107
|
+
[itemId: number]: number;
|
|
108
|
+
};
|
|
109
|
+
export declare type ItemIdConversionMap = {
|
|
110
|
+
[itemType: string]: ConversionMap;
|
|
111
|
+
};
|
|
112
|
+
export declare type CreateRequestParameterMap<T = any> = ItemMap<T>;
|
|
113
|
+
export declare type ItemError = {
|
|
114
|
+
message: string;
|
|
115
|
+
};
|
|
116
|
+
export declare type QueryParams = any;
|
|
117
|
+
export declare type CollectionQuery = {
|
|
118
|
+
object: object;
|
|
119
|
+
string: string;
|
|
120
|
+
};
|
|
121
|
+
export declare type QueryCallback = (queryParams: QueryParams) => QueryParams;
|
|
122
|
+
export declare type CollectionEntryParentIdMap<ItemTypeType extends ItemType> = {
|
|
123
|
+
[parentId: number]: CollectionEntry<ItemTypeType>;
|
|
124
|
+
};
|
|
125
|
+
export declare type CollectionResourceParentIdMap<T extends CollectionResource<any> = CollectionResource<any>> = {
|
|
126
|
+
[parentId: number]: T;
|
|
127
|
+
};
|
|
128
|
+
export declare type CollectionMatchResult<ItemTypeType extends ItemType> = {
|
|
129
|
+
fitting: Array<CollectionEntry<ItemTypeType>>;
|
|
130
|
+
notfitting: Array<CollectionEntry<ItemTypeType>>;
|
|
131
|
+
maybe: Array<CollectionEntry<ItemTypeType>>;
|
|
132
|
+
};
|
|
133
|
+
export interface ExtendedCollectionMatchResult<ItemTypeType extends ItemType> extends CollectionMatchResult<ItemTypeType> {
|
|
134
|
+
collection: CollectionEntry<ItemTypeType>;
|
|
135
|
+
}
|
|
136
|
+
export interface GroupedExtendedCollectionMatchResult<ItemTypeType extends ItemType> {
|
|
137
|
+
[collectionId: number]: ExtendedCollectionMatchResult<ItemTypeType>;
|
|
138
|
+
}
|
|
139
|
+
export declare type ResponseColumn = any;
|
|
140
|
+
export declare type ResponseColumnMap = {
|
|
141
|
+
[itemType: string]: {
|
|
142
|
+
[columnId: string]: ResponseColumn;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export declare type ColumnExpansionResult<ItemTypeType extends ItemType> = {
|
|
146
|
+
merged: ColumnSet<ItemTypeType>;
|
|
147
|
+
difference: ColumnSet<ItemTypeType>;
|
|
148
|
+
};
|
|
149
|
+
export declare type RootColumnMap = {
|
|
150
|
+
[columnId: string]: {
|
|
151
|
+
apiColumn: ResponseColumn;
|
|
152
|
+
children: RootColumnMap;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export declare type ApiResponse = ApiResponseProcessor;
|
|
156
|
+
export declare type TemplateItemResourceMap<T extends ItemResource<any>> = {
|
|
157
|
+
main: T;
|
|
158
|
+
linked: ItemResourcesItemTypeMap;
|
|
159
|
+
};
|
|
160
|
+
export declare type TemplateItemEntryMap<ItemTypeType extends ItemType> = {
|
|
161
|
+
main: ItemEntry<ItemTypeType>;
|
|
162
|
+
linked: Array<LinkedItemEntryMap<ItemType>>;
|
|
163
|
+
};
|
|
164
|
+
export declare type ItemTypeMap = {
|
|
165
|
+
[itemType: string]: any;
|
|
166
|
+
};
|
|
167
|
+
export declare type EntryStatus<T> = {
|
|
168
|
+
entry: T;
|
|
169
|
+
status: ENTRY_STATUS;
|
|
170
|
+
};
|
|
171
|
+
export declare type ApiQuery = any;
|
|
172
|
+
export declare type ApiRequestItemValues = {
|
|
173
|
+
values?: any;
|
|
174
|
+
links?: {
|
|
175
|
+
[itemType: string]: ItemId[];
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
export declare type ApiRequestItemMap = {
|
|
179
|
+
[itemType: string]: {
|
|
180
|
+
[itemId: number]: ApiRequestItemValues;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
export declare type ApiRequestColumn = string | {
|
|
184
|
+
[columnId: string]: ApiRequestColumn[];
|
|
185
|
+
};
|
|
186
|
+
export declare type ApiRequestColumns = ApiRequestColumn[] | true;
|
|
187
|
+
export declare type ApiRequestColumnMap = {
|
|
188
|
+
[itemType: string]: ApiRequestColumns;
|
|
189
|
+
};
|
|
190
|
+
export declare type ApiRequestLimit = {
|
|
191
|
+
field: string;
|
|
192
|
+
limit: number;
|
|
193
|
+
offset?: number;
|
|
194
|
+
order?: 'desc' | 'asc';
|
|
195
|
+
};
|
|
196
|
+
export declare type ApiRequestMoveItems = {
|
|
197
|
+
[itemType: string]: ItemId[];
|
|
198
|
+
};
|
|
199
|
+
export declare type CreateRequestEntry<ItemTypeType extends ItemType> = {
|
|
200
|
+
request: {
|
|
201
|
+
requestType: 'create';
|
|
202
|
+
itemType?: ItemTypeType;
|
|
203
|
+
parentType?: ItemType;
|
|
204
|
+
parentId?: {
|
|
205
|
+
[itemId: string]: ItemId;
|
|
206
|
+
};
|
|
207
|
+
items: ApiRequestItemMap;
|
|
208
|
+
columns: ApiRequestColumnMap;
|
|
209
|
+
};
|
|
210
|
+
columns: RequestColumnExpansion;
|
|
211
|
+
items: ItemEntryMap<ItemTypeType>;
|
|
212
|
+
collections: CollectionMatcher<ItemTypeType>;
|
|
213
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export interface PromiseInterface<T> extends Promise<T> {
|
|
2
|
-
}
|
|
1
|
+
export interface PromiseInterface<T> extends Promise<T> {
|
|
2
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './ItemTypesCollection';
|
|
2
|
-
export * from './PromiseInterface';
|
|
1
|
+
export * from './ItemTypesCollection';
|
|
2
|
+
export * from './PromiseInterface';
|