@rentman/rm-core 11.0.2 → 11.0.4
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 +1438 -1420
- package/dist/rm-core.js +829 -816
- package/dist/rm-core.min.js +1 -1
- package/dist/types/src/classes/ApiFormatter.d.ts +79 -79
- package/dist/types/src/classes/ApiRequestService.d.ts +18 -18
- package/dist/types/src/classes/ApiResponseProcessor.d.ts +29 -29
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicManager.d.ts +98 -98
- package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRule.d.ts +94 -94
- package/dist/types/src/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +25 -25
- package/dist/types/src/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +14 -14
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +20 -20
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +19 -19
- package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +14 -14
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +14 -14
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalTelexemplarenBusinessLogicRule.d.ts +15 -15
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalTypeBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +19 -19
- package/dist/types/src/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +26 -26
- package/dist/types/src/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +29 -29
- package/dist/types/src/classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule.d.ts +23 -23
- package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarBusinessLogicRule.d.ts +14 -14
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +18 -18
- package/dist/types/src/classes/CacheSyncer.d.ts +70 -70
- package/dist/types/src/classes/ChangesCompilation.d.ts +33 -33
- package/dist/types/src/classes/ChangesDelta.d.ts +65 -65
- package/dist/types/src/classes/ChangesDeltaBase.d.ts +79 -79
- package/dist/types/src/classes/ChangesProcessor.d.ts +40 -40
- package/dist/types/src/classes/CollectionEntryService.d.ts +24 -24
- package/dist/types/src/classes/CollectionResourceService.d.ts +6 -6
- package/dist/types/src/classes/ColumnCache.d.ts +19 -19
- package/dist/types/src/classes/ColumnExpansion.d.ts +19 -19
- package/dist/types/src/classes/ColumnHandler.d.ts +20 -20
- package/dist/types/src/classes/ColumnInfo.d.ts +15 -15
- package/dist/types/src/classes/ColumnSet.d.ts +37 -37
- package/dist/types/src/classes/ColumnSubsetCache.d.ts +14 -14
- package/dist/types/src/classes/ColumnUtil.d.ts +108 -108
- package/dist/types/src/classes/ConversionMapService.d.ts +25 -25
- package/dist/types/src/classes/CreateRequest.d.ts +17 -17
- package/dist/types/src/classes/CreatedChangesDelta.d.ts +17 -17
- package/dist/types/src/classes/InternalChangesDelta.d.ts +44 -44
- package/dist/types/src/classes/ItemCache.d.ts +27 -27
- package/dist/types/src/classes/ItemCreateService.d.ts +18 -18
- package/dist/types/src/classes/ItemEntryService.d.ts +32 -32
- package/dist/types/src/classes/KeyService.d.ts +18 -18
- package/dist/types/src/classes/LockService.d.ts +28 -28
- package/dist/types/src/classes/ModuleChangesCompilation.d.ts +18 -18
- package/dist/types/src/classes/ParentChangesDelta.d.ts +41 -41
- package/dist/types/src/classes/QueryColumnExtractor.d.ts +18 -18
- package/dist/types/src/classes/QueryContainsLocalIdParser.d.ts +17 -17
- package/dist/types/src/classes/QueryLinkedToParser.d.ts +17 -17
- package/dist/types/src/classes/QueryLocallyMatchableParser.d.ts +20 -20
- package/dist/types/src/classes/QueryMatcher.d.ts +24 -24
- package/dist/types/src/classes/QueryParser.d.ts +25 -25
- package/dist/types/src/classes/QueryParserBase.d.ts +20 -20
- package/dist/types/src/classes/QueryParserIdUpdater.d.ts +17 -17
- package/dist/types/src/classes/QueryService.d.ts +12 -12
- package/dist/types/src/classes/RequestBuffer.d.ts +26 -26
- package/dist/types/src/classes/RequestBufferManager.d.ts +21 -21
- package/dist/types/src/classes/RequestColumnExpansion.d.ts +15 -15
- package/dist/types/src/classes/SocketMessageHandler.d.ts +34 -34
- package/dist/types/src/classes/TemplateCache.d.ts +64 -64
- package/dist/types/src/classes/Util.d.ts +28 -28
- package/dist/types/src/classes/cache/AbstractCache.d.ts +86 -86
- package/dist/types/src/classes/cache/CachedQueryHandlerBase.d.ts +69 -69
- package/dist/types/src/classes/cache/ItemHandlerBase.d.ts +102 -102
- package/dist/types/src/classes/cache/server/ServerCache.d.ts +78 -78
- package/dist/types/src/classes/cache/server/ServerCachedQueryHandler.d.ts +26 -26
- package/dist/types/src/classes/cache/server/ServerItemHandler.d.ts +43 -43
- package/dist/types/src/classes/cache/transaction/TransactionCache.d.ts +318 -318
- package/dist/types/src/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +39 -39
- package/dist/types/src/classes/cache/transaction/TransactionCollectionHandler.d.ts +24 -24
- package/dist/types/src/classes/cache/transaction/TransactionEventHandler.d.ts +21 -21
- package/dist/types/src/classes/cache/transaction/TransactionItemHandler.d.ts +90 -90
- package/dist/types/src/classes/cache/transaction/TransactionValidator.d.ts +33 -33
- package/dist/types/src/constants.d.ts +7 -7
- package/dist/types/src/core.d.ts +48 -48
- package/dist/types/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
- package/dist/types/src/factories/CacheSyncerFactory.d.ts +10 -10
- package/dist/types/src/factories/ChangesCompilationFactory.d.ts +5 -5
- package/dist/types/src/factories/ChangesDeltaFactory.d.ts +13 -13
- package/dist/types/src/factories/ChangesProcessorFactory.d.ts +13 -13
- package/dist/types/src/factories/CollectionEntryFactory.d.ts +11 -11
- package/dist/types/src/factories/CollectionResourceFactory.d.ts +18 -18
- package/dist/types/src/factories/ColumnExpansionFactory.d.ts +7 -7
- package/dist/types/src/factories/ColumnInfoFactory.d.ts +7 -7
- package/dist/types/src/factories/ColumnSetFactory.d.ts +18 -18
- package/dist/types/src/factories/ColumnSubsetCacheFactory.d.ts +8 -8
- package/dist/types/src/factories/CreateRequestFactory.d.ts +9 -9
- package/dist/types/src/factories/ItemCacheFactory.d.ts +6 -6
- package/dist/types/src/factories/ItemEntryFactory.d.ts +12 -12
- package/dist/types/src/factories/ItemResourceFactory.d.ts +11 -11
- package/dist/types/src/factories/ModuleChangesCompilationFactory.d.ts +4 -4
- package/dist/types/src/factories/QueryMatcherFactory.d.ts +7 -7
- package/dist/types/src/factories/QueryParserFactory.d.ts +5 -5
- package/dist/types/src/factories/RequestColumnExpansionFactory.d.ts +8 -8
- package/dist/types/src/factories/TemplateFactory.d.ts +8 -8
- package/dist/types/src/factories/TransactionCacheFactory.d.ts +13 -13
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/interfaces/AbstractCacheDependencyInterface.d.ts +38 -38
- package/dist/types/src/interfaces/ApiRequestServiceInterface.d.ts +12 -12
- package/dist/types/src/interfaces/AuthInterface.d.ts +10 -10
- package/dist/types/src/interfaces/ErrorHandlerInterface.d.ts +6 -6
- package/dist/types/src/interfaces/ExceptionHandlerInterface.d.ts +3 -3
- package/dist/types/src/interfaces/LinkTreeServiceInterface.d.ts +4 -4
- package/dist/types/src/interfaces/PromiseLibraryInterface.d.ts +33 -33
- package/dist/types/src/interfaces/ServerCacheDependencyInterface.d.ts +5 -5
- package/dist/types/src/interfaces/SocketMessageInterface.d.ts +3 -3
- package/dist/types/src/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +17 -17
- package/dist/types/src/interfaces/TransactionItemHandlerDependencyInterface.d.ts +22 -22
- package/dist/types/src/internal.d.ts +128 -128
- package/dist/types/src/models/CachedQueryItem.d.ts +40 -40
- package/dist/types/src/models/CollectionEntry.d.ts +22 -22
- package/dist/types/src/models/CollectionOptions.d.ts +44 -44
- package/dist/types/src/models/CollectionResource.d.ts +87 -87
- package/dist/types/src/models/ItemEntry.d.ts +19 -19
- package/dist/types/src/models/ItemEntryOptions.d.ts +8 -8
- package/dist/types/src/models/ItemResource.d.ts +90 -90
- package/dist/types/src/models/Template.d.ts +11 -11
- package/dist/types/src/types/ItemTypesCollection.d.ts +345 -345
- package/dist/types/src/types/PromiseInterface.d.ts +2 -2
- package/dist/types/tests/integration/core.test.d.ts +1 -1
- package/dist/types/tests/integration/helpers/helpers.d.ts +31 -31
- package/dist/types/tests/integration/transactions/get_by.test.d.ts +1 -1
- package/dist/types/tests/integration/transactions/updates.test.d.ts +1 -1
- package/dist/types/tests/mocks/ApiMocked.d.ts +19 -19
- package/dist/types/tests/mocks/PromiseLibrary.mocked.d.ts +2 -2
- package/dist/types/tests/regression/RM4_17754.test.d.ts +1 -1
- package/dist/types/tests/regression/RM4_18216.test.d.ts +1 -1
- package/dist/types/tests/unit/query_contains_local_id_parser.test.d.ts +1 -0
- package/dist/types/tests/unit/query_linked_to_parser.test.d.ts +1 -1
- package/dist/types/tests/unit/query_matcher.test.d.ts +1 -1
- package/dist/types/tests/unit/query_parser_id_updater.test.d.ts +1 -0
- package/dist/types/tests/unit/query_service.test.d.ts +1 -1
- package/package.json +57 -57
- package/readme.md +16 -16
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ApiFields, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ChangesDelta, ColumnSetFactory, ConversionMapService, EntryParentNull, ErrorHandlerInterface, FieldMap, FilterItemEntryCallback, ItemIdConversionMap, KeyService, ModifyFieldsCallback, PromiseInterface, PromiseLibraryInterface, Template, TemplateCache } from '../internal';
|
|
3
|
-
export declare class ItemCreateService {
|
|
4
|
-
private columnSetFactory;
|
|
5
|
-
private conversionMapService;
|
|
6
|
-
private errorHandler;
|
|
7
|
-
private keyService;
|
|
8
|
-
private promiseService;
|
|
9
|
-
private templateCache;
|
|
10
|
-
constructor(columnSetFactory: ColumnSetFactory, conversionMapService: ConversionMapService, errorHandler: ErrorHandlerInterface, keyService: KeyService, promiseService: PromiseLibraryInterface, templateCache: TemplateCache);
|
|
11
|
-
/**
|
|
12
|
-
* @description
|
|
13
|
-
* Fetches a new {@link Template template} and sets the items created on the passed {@link ChangesDelta}
|
|
14
|
-
*/
|
|
15
|
-
createItemsFromValues<ItemTypeType extends ApiEnumItemType, ColumnIds extends (keyof ApiFields[ItemTypeType])[] = (keyof ApiFields[ItemTypeType])[]>(changesDelta: ChangesDelta, itemType: ItemTypeType, valuesArray: Partial<FieldMap<ItemTypeType, ColumnIds>>[], parent?: EntryParentNull): PromiseInterface<void>;
|
|
16
|
-
processTemplate<ItemTypeType extends ApiEnumItemType, ColumnIds extends (keyof ApiFields[ItemTypeType])[] = (keyof ApiFields[ItemTypeType])[]>(changesDelta: ChangesDelta, itemType: ItemTypeType, itemId: ItemId, parent: EntryParentNull, template: Template<ItemTypeType, ColumnIds>, filterItemEntryCallback?: FilterItemEntryCallback, modifyFieldsCallback?: ModifyFieldsCallback, isRoot?: boolean): void;
|
|
17
|
-
processTemplateLinkItems<ParentItemType extends ApiEnumItemType>(changesDelta: ChangesDelta, parentType: ParentItemType, localParentId: ItemId, template: Template<ParentItemType>, itemIdConversion: ItemIdConversionMap, filterItemEntryCallback?: FilterItemEntryCallback, modifyFieldsCallback?: ModifyFieldsCallback): void;
|
|
18
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ApiFields, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ChangesDelta, ColumnSetFactory, ConversionMapService, EntryParentNull, ErrorHandlerInterface, FieldMap, FilterItemEntryCallback, ItemIdConversionMap, KeyService, ModifyFieldsCallback, PromiseInterface, PromiseLibraryInterface, Template, TemplateCache } from '../internal';
|
|
3
|
+
export declare class ItemCreateService {
|
|
4
|
+
private columnSetFactory;
|
|
5
|
+
private conversionMapService;
|
|
6
|
+
private errorHandler;
|
|
7
|
+
private keyService;
|
|
8
|
+
private promiseService;
|
|
9
|
+
private templateCache;
|
|
10
|
+
constructor(columnSetFactory: ColumnSetFactory, conversionMapService: ConversionMapService, errorHandler: ErrorHandlerInterface, keyService: KeyService, promiseService: PromiseLibraryInterface, templateCache: TemplateCache);
|
|
11
|
+
/**
|
|
12
|
+
* @description
|
|
13
|
+
* Fetches a new {@link Template template} and sets the items created on the passed {@link ChangesDelta}
|
|
14
|
+
*/
|
|
15
|
+
createItemsFromValues<ItemTypeType extends ApiEnumItemType, ColumnIds extends (keyof ApiFields[ItemTypeType])[] = (keyof ApiFields[ItemTypeType])[]>(changesDelta: ChangesDelta, itemType: ItemTypeType, valuesArray: Partial<FieldMap<ItemTypeType, ColumnIds>>[], parent?: EntryParentNull): PromiseInterface<void>;
|
|
16
|
+
processTemplate<ItemTypeType extends ApiEnumItemType, ColumnIds extends (keyof ApiFields[ItemTypeType])[] = (keyof ApiFields[ItemTypeType])[]>(changesDelta: ChangesDelta, itemType: ItemTypeType, itemId: ItemId, parent: EntryParentNull, template: Template<ItemTypeType, ColumnIds>, filterItemEntryCallback?: FilterItemEntryCallback, modifyFieldsCallback?: ModifyFieldsCallback, isRoot?: boolean): void;
|
|
17
|
+
processTemplateLinkItems<ParentItemType extends ApiEnumItemType>(changesDelta: ChangesDelta, parentType: ParentItemType, localParentId: ItemId, template: Template<ParentItemType>, itemIdConversion: ItemIdConversionMap, filterItemEntryCallback?: FilterItemEntryCallback, modifyFieldsCallback?: ModifyFieldsCallback): void;
|
|
18
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
-
import { AuthInterface, EntryParent, EntryParentNull, FieldMap, ItemEntry, ItemEntryOptions, ItemError, ItemOptionsInterface, LinkTreeServiceInterface } from '../internal';
|
|
3
|
-
export declare class ItemEntryService {
|
|
4
|
-
private authInterface;
|
|
5
|
-
private linkTreeService;
|
|
6
|
-
constructor(authInterface: AuthInterface, linkTreeService: LinkTreeServiceInterface);
|
|
7
|
-
matchParent(oldParent: EntryParentNull, newParent: EntryParentNull): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* @description
|
|
10
|
-
* Gets the fields required to set the parent
|
|
11
|
-
*
|
|
12
|
-
* @remark
|
|
13
|
-
* Opposite of {@link ItemEntryService.getParentByFields ItemEntryService.getParentByFields}
|
|
14
|
-
*/
|
|
15
|
-
getLinkFieldsByParent<ParentItemType extends ApiEnumItemType, ItemTypeType extends ApiEnumItemType>(parent: EntryParent<ParentItemType>, itemType: ItemTypeType): Partial<FieldMap<ItemTypeType>>;
|
|
16
|
-
/**
|
|
17
|
-
* @description
|
|
18
|
-
* Gets an {@link EntryParent EntryParent} object from the fields
|
|
19
|
-
*
|
|
20
|
-
* @remark
|
|
21
|
-
* Opposite of {@link ItemEntryService.getLinkFieldsByParent ItemEntryService.getLinkFieldsByParent}
|
|
22
|
-
*/
|
|
23
|
-
getParentByFields<ItemTypeType extends ApiEnumItemType>(parentType: ApiEnumItemType, itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): EntryParent;
|
|
24
|
-
getDisplayName<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): string | undefined;
|
|
25
|
-
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
26
|
-
createUnfoundRemoteItemError(): ItemError;
|
|
27
|
-
createUnfoundLocalItemError(itemType: ApiEnumItemType): ItemError;
|
|
28
|
-
createExistingLocalItemError(itemType: ApiEnumItemType): ItemError;
|
|
29
|
-
getFullName(firstName: string, infix: string, lastName: string): string | undefined;
|
|
30
|
-
getTitleField(itemType: ApiEnumItemType): string;
|
|
31
|
-
getLocalDefaultValues<ItemTypeType extends ApiEnumItemType>(): FieldMap<ItemTypeType, ['permissions', 'creator', 'created']>;
|
|
32
|
-
}
|
|
1
|
+
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
+
import { AuthInterface, EntryParent, EntryParentNull, FieldMap, ItemEntry, ItemEntryOptions, ItemError, ItemOptionsInterface, LinkTreeServiceInterface } from '../internal';
|
|
3
|
+
export declare class ItemEntryService {
|
|
4
|
+
private authInterface;
|
|
5
|
+
private linkTreeService;
|
|
6
|
+
constructor(authInterface: AuthInterface, linkTreeService: LinkTreeServiceInterface);
|
|
7
|
+
matchParent(oldParent: EntryParentNull, newParent: EntryParentNull): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @description
|
|
10
|
+
* Gets the fields required to set the parent
|
|
11
|
+
*
|
|
12
|
+
* @remark
|
|
13
|
+
* Opposite of {@link ItemEntryService.getParentByFields ItemEntryService.getParentByFields}
|
|
14
|
+
*/
|
|
15
|
+
getLinkFieldsByParent<ParentItemType extends ApiEnumItemType, ItemTypeType extends ApiEnumItemType>(parent: EntryParent<ParentItemType>, itemType: ItemTypeType): Partial<FieldMap<ItemTypeType>>;
|
|
16
|
+
/**
|
|
17
|
+
* @description
|
|
18
|
+
* Gets an {@link EntryParent EntryParent} object from the fields
|
|
19
|
+
*
|
|
20
|
+
* @remark
|
|
21
|
+
* Opposite of {@link ItemEntryService.getLinkFieldsByParent ItemEntryService.getLinkFieldsByParent}
|
|
22
|
+
*/
|
|
23
|
+
getParentByFields<ItemTypeType extends ApiEnumItemType>(parentType: ApiEnumItemType, itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): EntryParent;
|
|
24
|
+
getDisplayName<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): string | undefined;
|
|
25
|
+
processOptions(options: ItemOptionsInterface): ItemEntryOptions;
|
|
26
|
+
createUnfoundRemoteItemError(): ItemError;
|
|
27
|
+
createUnfoundLocalItemError(itemType: ApiEnumItemType): ItemError;
|
|
28
|
+
createExistingLocalItemError(itemType: ApiEnumItemType): ItemError;
|
|
29
|
+
getFullName(firstName: string, infix: string, lastName: string): string | undefined;
|
|
30
|
+
getTitleField(itemType: ApiEnumItemType): string;
|
|
31
|
+
getLocalDefaultValues<ItemTypeType extends ApiEnumItemType>(): FieldMap<ItemTypeType, ['permissions', 'creator', 'created']>;
|
|
32
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { StateKey } from '../internal';
|
|
3
|
-
export declare class KeyService {
|
|
4
|
-
private separator;
|
|
5
|
-
private idCounter;
|
|
6
|
-
constructor();
|
|
7
|
-
getSingleKey(itemType: string, itemId: ItemId | string): string;
|
|
8
|
-
getCssKey(...args: (string | number)[]): string;
|
|
9
|
-
parseStateKey(stateKey: string): StateKey | null;
|
|
10
|
-
getDuplicateStateKey(itemId: string | ItemId): string;
|
|
11
|
-
getNewStateKey(templateType: string): string;
|
|
12
|
-
getLocalId(): ItemId;
|
|
13
|
-
getLocalDuplicateId(): ItemId;
|
|
14
|
-
getRandomString(): string;
|
|
15
|
-
isLocalId(itemId: any): boolean;
|
|
16
|
-
isNewId(itemId: any): boolean;
|
|
17
|
-
isDuplicateId(itemId: any): boolean;
|
|
18
|
-
}
|
|
1
|
+
import { ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { StateKey } from '../internal';
|
|
3
|
+
export declare class KeyService {
|
|
4
|
+
private separator;
|
|
5
|
+
private idCounter;
|
|
6
|
+
constructor();
|
|
7
|
+
getSingleKey(itemType: string, itemId: ItemId | string): string;
|
|
8
|
+
getCssKey(...args: (string | number)[]): string;
|
|
9
|
+
parseStateKey(stateKey: string): StateKey | null;
|
|
10
|
+
getDuplicateStateKey(itemId: string | ItemId): string;
|
|
11
|
+
getNewStateKey(templateType: string): string;
|
|
12
|
+
getLocalId(): ItemId;
|
|
13
|
+
getLocalDuplicateId(): ItemId;
|
|
14
|
+
getRandomString(): string;
|
|
15
|
+
isLocalId(itemId: any): boolean;
|
|
16
|
+
isNewId(itemId: any): boolean;
|
|
17
|
+
isDuplicateId(itemId: any): boolean;
|
|
18
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiRequestService, ErrorHandlerInterface, FieldMap, ItemEntry, KeyService, PromiseInterface, PromiseLibraryInterface } from '../internal';
|
|
3
|
-
declare type LockTokenError = {
|
|
4
|
-
isForeign: true;
|
|
5
|
-
message: string;
|
|
6
|
-
};
|
|
7
|
-
export declare type LockToken = FieldMap<ApiEnumItemType.Locktoken, ['token', 'id']> | LockTokenError;
|
|
8
|
-
export declare class LockService {
|
|
9
|
-
private apiRequestService;
|
|
10
|
-
private errorHandler;
|
|
11
|
-
private keyService;
|
|
12
|
-
private promiseService;
|
|
13
|
-
private lockItems;
|
|
14
|
-
private promises;
|
|
15
|
-
constructor(apiRequestService: ApiRequestService, errorHandler: ErrorHandlerInterface, keyService: KeyService, promiseService: PromiseLibraryInterface);
|
|
16
|
-
getLocks(): LockService['lockItems'];
|
|
17
|
-
hasLock(lockTokenId: ItemId): boolean;
|
|
18
|
-
isLocked(itemEntry: ItemEntry): boolean;
|
|
19
|
-
getMessage(itemEntry: ItemEntry): undefined | string;
|
|
20
|
-
fetchLock(itemEntry: ItemEntry): PromiseInterface<LockToken>;
|
|
21
|
-
deleteLock(itemEntry: ItemEntry): PromiseInterface<void>;
|
|
22
|
-
clearLock(itemEntry: ItemEntry): boolean;
|
|
23
|
-
isRemoteLock(token: LockToken): token is LockTokenError;
|
|
24
|
-
private requestLock;
|
|
25
|
-
private getValue;
|
|
26
|
-
private setValue;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ApiRequestService, ErrorHandlerInterface, FieldMap, ItemEntry, KeyService, PromiseInterface, PromiseLibraryInterface } from '../internal';
|
|
3
|
+
declare type LockTokenError = {
|
|
4
|
+
isForeign: true;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
export declare type LockToken = FieldMap<ApiEnumItemType.Locktoken, ['token', 'id']> | LockTokenError;
|
|
8
|
+
export declare class LockService {
|
|
9
|
+
private apiRequestService;
|
|
10
|
+
private errorHandler;
|
|
11
|
+
private keyService;
|
|
12
|
+
private promiseService;
|
|
13
|
+
private lockItems;
|
|
14
|
+
private promises;
|
|
15
|
+
constructor(apiRequestService: ApiRequestService, errorHandler: ErrorHandlerInterface, keyService: KeyService, promiseService: PromiseLibraryInterface);
|
|
16
|
+
getLocks(): LockService['lockItems'];
|
|
17
|
+
hasLock(lockTokenId: ItemId): boolean;
|
|
18
|
+
isLocked(itemEntry: ItemEntry): boolean;
|
|
19
|
+
getMessage(itemEntry: ItemEntry): undefined | string;
|
|
20
|
+
fetchLock(itemEntry: ItemEntry): PromiseInterface<LockToken>;
|
|
21
|
+
deleteLock(itemEntry: ItemEntry): PromiseInterface<void>;
|
|
22
|
+
clearLock(itemEntry: ItemEntry): boolean;
|
|
23
|
+
isRemoteLock(token: LockToken): token is LockTokenError;
|
|
24
|
+
private requestLock;
|
|
25
|
+
private getValue;
|
|
26
|
+
private setValue;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiRequestItemMap, TransactionCache } from '../internal';
|
|
3
|
-
export declare type ModuleChangesCompilationResult = {
|
|
4
|
-
itemType: ApiEnumItemType;
|
|
5
|
-
itemId: ItemId;
|
|
6
|
-
items: ApiRequestItemMap;
|
|
7
|
-
};
|
|
8
|
-
export declare class ModuleChangesCompilation {
|
|
9
|
-
private transaction;
|
|
10
|
-
parentMap: any;
|
|
11
|
-
destination: ApiRequestItemMap;
|
|
12
|
-
constructor(transaction: TransactionCache);
|
|
13
|
-
process(): ModuleChangesCompilationResult;
|
|
14
|
-
private createParentMap;
|
|
15
|
-
private processItems;
|
|
16
|
-
private processItem;
|
|
17
|
-
private getItemsByParent;
|
|
18
|
-
}
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ApiRequestItemMap, TransactionCache } from '../internal';
|
|
3
|
+
export declare type ModuleChangesCompilationResult = {
|
|
4
|
+
itemType: ApiEnumItemType;
|
|
5
|
+
itemId: ItemId;
|
|
6
|
+
items: ApiRequestItemMap;
|
|
7
|
+
};
|
|
8
|
+
export declare class ModuleChangesCompilation {
|
|
9
|
+
private transaction;
|
|
10
|
+
parentMap: any;
|
|
11
|
+
destination: ApiRequestItemMap;
|
|
12
|
+
constructor(transaction: TransactionCache);
|
|
13
|
+
process(): ModuleChangesCompilationResult;
|
|
14
|
+
private createParentMap;
|
|
15
|
+
private processItems;
|
|
16
|
+
private processItem;
|
|
17
|
+
private getItemsByParent;
|
|
18
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ChangesDeltaBase, ChangesDeltaItemDeleteDelta, EntryParent, FieldMap, InternalCreateDelta, ItemEntry, ItemEntryService, ItemIdConversionMap } from '../internal';
|
|
3
|
-
export declare type ParentChangesDeltaItemDeleteDelta = ItemEntry;
|
|
4
|
-
/**
|
|
5
|
-
* @description
|
|
6
|
-
* ChangesDelta used internally by the core
|
|
7
|
-
*
|
|
8
|
-
* ----------
|
|
9
|
-
*
|
|
10
|
-
* The difference between {@link ParentChangesDelta ParentChangesDelta} and {@link ChangesDelta ChangesDelta} is that the ParentChangesDelta
|
|
11
|
-
* assumes 'created' entries are already existing, and deletedEntries don't have changes (since you cannot undo an action that happened on a parent on a child transaction)
|
|
12
|
-
*
|
|
13
|
-
* Use this when calling {@link TransactionCache.applyChangesFromParent applyChangesFromParent}
|
|
14
|
-
*/
|
|
15
|
-
export declare class ParentChangesDelta extends ChangesDeltaBase {
|
|
16
|
-
created: {
|
|
17
|
-
[itemEntryId: string]: InternalCreateDelta;
|
|
18
|
-
};
|
|
19
|
-
deleted: {
|
|
20
|
-
[itemType: string]: {
|
|
21
|
-
[entryId: string]: ParentChangesDeltaItemDeleteDelta;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
moved: {
|
|
25
|
-
[itemEntryId: number]: {
|
|
26
|
-
entry: ItemEntry;
|
|
27
|
-
to: EntryParent;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
itemIdConversionMap: ItemIdConversionMap;
|
|
31
|
-
constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
32
|
-
setItemDeleted(deleted: ChangesDeltaItemDeleteDelta): this;
|
|
33
|
-
setItemsDeleted(deleted: ChangesDeltaItemDeleteDelta[]): this;
|
|
34
|
-
setItemCreated<ItemTypeType extends ApiEnumItemType>(itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): void;
|
|
35
|
-
/**
|
|
36
|
-
* @remark
|
|
37
|
-
* Parent fields are non-writable so we need to keep track of moved entries another way (to do a linkTo request)
|
|
38
|
-
*/
|
|
39
|
-
setItemMoved(entry: ItemEntry, to: EntryParent): void;
|
|
40
|
-
isEmpty(): boolean;
|
|
41
|
-
}
|
|
1
|
+
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
+
import { ApiFormatter, ChangesDeltaBase, ChangesDeltaItemDeleteDelta, EntryParent, FieldMap, InternalCreateDelta, ItemEntry, ItemEntryService, ItemIdConversionMap } from '../internal';
|
|
3
|
+
export declare type ParentChangesDeltaItemDeleteDelta = ItemEntry;
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* ChangesDelta used internally by the core
|
|
7
|
+
*
|
|
8
|
+
* ----------
|
|
9
|
+
*
|
|
10
|
+
* The difference between {@link ParentChangesDelta ParentChangesDelta} and {@link ChangesDelta ChangesDelta} is that the ParentChangesDelta
|
|
11
|
+
* assumes 'created' entries are already existing, and deletedEntries don't have changes (since you cannot undo an action that happened on a parent on a child transaction)
|
|
12
|
+
*
|
|
13
|
+
* Use this when calling {@link TransactionCache.applyChangesFromParent applyChangesFromParent}
|
|
14
|
+
*/
|
|
15
|
+
export declare class ParentChangesDelta extends ChangesDeltaBase {
|
|
16
|
+
created: {
|
|
17
|
+
[itemEntryId: string]: InternalCreateDelta;
|
|
18
|
+
};
|
|
19
|
+
deleted: {
|
|
20
|
+
[itemType: string]: {
|
|
21
|
+
[entryId: string]: ParentChangesDeltaItemDeleteDelta;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
moved: {
|
|
25
|
+
[itemEntryId: number]: {
|
|
26
|
+
entry: ItemEntry;
|
|
27
|
+
to: EntryParent;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
itemIdConversionMap: ItemIdConversionMap;
|
|
31
|
+
constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
32
|
+
setItemDeleted(deleted: ChangesDeltaItemDeleteDelta): this;
|
|
33
|
+
setItemsDeleted(deleted: ChangesDeltaItemDeleteDelta[]): this;
|
|
34
|
+
setItemCreated<ItemTypeType extends ApiEnumItemType>(itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): void;
|
|
35
|
+
/**
|
|
36
|
+
* @remark
|
|
37
|
+
* Parent fields are non-writable so we need to keep track of moved entries another way (to do a linkTo request)
|
|
38
|
+
*/
|
|
39
|
+
setItemMoved(entry: ItemEntry, to: EntryParent): void;
|
|
40
|
+
isEmpty(): boolean;
|
|
41
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ApiQueryConditionLinkedTo, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
-
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions, ApiRequestColumn, ColumnUtil, QueryParserBase } from '../internal';
|
|
3
|
-
declare type ReturnType = ApiRequestColumn[];
|
|
4
|
-
export declare class QueryColumnExtractor extends QueryParserBase<ReturnType> {
|
|
5
|
-
private columnUtil;
|
|
6
|
-
private itemType;
|
|
7
|
-
constructor(columnUtil: ColumnUtil, itemType: ApiEnumItemType, query: ApiQuery);
|
|
8
|
-
protected parseEmptyQuery(): ReturnType;
|
|
9
|
-
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], subQuery: T['query']): ReturnType;
|
|
10
|
-
protected parseSubFieldQuery(): ReturnType;
|
|
11
|
-
protected parseSearchQuery(): ReturnType;
|
|
12
|
-
protected parseCustomQuery(): ReturnType;
|
|
13
|
-
protected parseSimpleQuery<T extends ApiQueryConditionComparator>(key: T['key']): ReturnType;
|
|
14
|
-
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(linkedTo: T['linkedTo'], _query: T['query'], reverse: T['reverse']): ReturnType;
|
|
15
|
-
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
16
|
-
private parseConditions;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ApiQueryConditionLinkedTo, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
+
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions, ApiRequestColumn, ColumnUtil, QueryParserBase } from '../internal';
|
|
3
|
+
declare type ReturnType = ApiRequestColumn[];
|
|
4
|
+
export declare class QueryColumnExtractor extends QueryParserBase<ReturnType> {
|
|
5
|
+
private columnUtil;
|
|
6
|
+
private itemType;
|
|
7
|
+
constructor(columnUtil: ColumnUtil, itemType: ApiEnumItemType, query: ApiQuery);
|
|
8
|
+
protected parseEmptyQuery(): ReturnType;
|
|
9
|
+
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], subQuery: T['query']): ReturnType;
|
|
10
|
+
protected parseSubFieldQuery(): ReturnType;
|
|
11
|
+
protected parseSearchQuery(): ReturnType;
|
|
12
|
+
protected parseCustomQuery(): ReturnType;
|
|
13
|
+
protected parseSimpleQuery<T extends ApiQueryConditionComparator>(key: T['key']): ReturnType;
|
|
14
|
+
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(linkedTo: T['linkedTo'], _query: T['query'], reverse: T['reverse']): ReturnType;
|
|
15
|
+
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
16
|
+
private parseConditions;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ApiQueryConditionLinkedTo, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
-
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions, KeyService, QueryParserBase } from '../internal';
|
|
3
|
-
declare type ReturnType = boolean;
|
|
4
|
-
export declare class QueryContainsLocalIdParser extends QueryParserBase<ReturnType> {
|
|
5
|
-
private keyService;
|
|
6
|
-
constructor(keyService: KeyService, query: ApiQuery);
|
|
7
|
-
protected parseEmptyQuery(): ReturnType;
|
|
8
|
-
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(_key: T['key'], subQuery: T['query']): ReturnType;
|
|
9
|
-
protected parseSubFieldQuery<T extends ApiQueryConditionSubQuery>(_key: T['key'], _itemType: T['itemType'], field: T['field'], query: T['query']): ReturnType;
|
|
10
|
-
protected parseSearchQuery(): ReturnType;
|
|
11
|
-
protected parseCustomQuery(): ReturnType;
|
|
12
|
-
protected parseSimpleQuery<T extends ApiQueryConditionComparator>(_key: T['key'], value: T['value']): ReturnType;
|
|
13
|
-
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(_linkedTo: T['linkedTo'], query: T['query']): ReturnType;
|
|
14
|
-
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
15
|
-
private parseConditions;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
1
|
+
import { ApiQueryConditionIn, ApiQueryConditionLinkedTo, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
+
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions, KeyService, QueryParserBase } from '../internal';
|
|
3
|
+
declare type ReturnType = boolean;
|
|
4
|
+
export declare class QueryContainsLocalIdParser extends QueryParserBase<ReturnType> {
|
|
5
|
+
private keyService;
|
|
6
|
+
constructor(keyService: KeyService, query: ApiQuery);
|
|
7
|
+
protected parseEmptyQuery(): ReturnType;
|
|
8
|
+
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(_key: T['key'], subQuery: T['query']): ReturnType;
|
|
9
|
+
protected parseSubFieldQuery<T extends ApiQueryConditionSubQuery>(_key: T['key'], _itemType: T['itemType'], field: T['field'], query: T['query']): ReturnType;
|
|
10
|
+
protected parseSearchQuery(): ReturnType;
|
|
11
|
+
protected parseCustomQuery(): ReturnType;
|
|
12
|
+
protected parseSimpleQuery<T extends ApiQueryConditionComparator | ApiQueryConditionIn>(_key: T['key'], value: T['value'], comparator: T['comparator']): ReturnType;
|
|
13
|
+
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(_linkedTo: T['linkedTo'], query: T['query']): ReturnType;
|
|
14
|
+
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
15
|
+
private parseConditions;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ApiEnumItemType, ApiQueryConditionLinkedTo, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
-
import { ApiQuery, ApiQueryWithConditions, QueryParserBase } from '../internal';
|
|
3
|
-
declare type ReturnType = boolean;
|
|
4
|
-
export declare class QueryLinkedToParser extends QueryParserBase<ReturnType> {
|
|
5
|
-
private callback;
|
|
6
|
-
constructor(callback: <ItemTypeType extends ApiEnumItemType>(linkedTo: ItemTypeType, query: ApiQuery<ItemTypeType>) => boolean, query: ApiQuery);
|
|
7
|
-
protected parseEmptyQuery(): ReturnType;
|
|
8
|
-
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(_key: T['key'], subQuery: T['query']): ReturnType;
|
|
9
|
-
protected parseSubFieldQuery(): ReturnType;
|
|
10
|
-
protected parseSearchQuery(): ReturnType;
|
|
11
|
-
protected parseCustomQuery(): ReturnType;
|
|
12
|
-
protected parseSimpleQuery(): ReturnType;
|
|
13
|
-
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(linkedTo: T['linkedTo'], query: T['query'], _reverse: T['reverse'], not?: T['not']): ReturnType;
|
|
14
|
-
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
15
|
-
private parseConditions;
|
|
16
|
-
}
|
|
17
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ApiQueryConditionLinkedTo, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
+
import { ApiQuery, ApiQueryWithConditions, QueryParserBase } from '../internal';
|
|
3
|
+
declare type ReturnType = boolean;
|
|
4
|
+
export declare class QueryLinkedToParser extends QueryParserBase<ReturnType> {
|
|
5
|
+
private callback;
|
|
6
|
+
constructor(callback: <ItemTypeType extends ApiEnumItemType>(linkedTo: ItemTypeType, query: ApiQuery<ItemTypeType>) => boolean, query: ApiQuery);
|
|
7
|
+
protected parseEmptyQuery(): ReturnType;
|
|
8
|
+
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(_key: T['key'], subQuery: T['query']): ReturnType;
|
|
9
|
+
protected parseSubFieldQuery(): ReturnType;
|
|
10
|
+
protected parseSearchQuery(): ReturnType;
|
|
11
|
+
protected parseCustomQuery(): ReturnType;
|
|
12
|
+
protected parseSimpleQuery(): ReturnType;
|
|
13
|
+
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(linkedTo: T['linkedTo'], query: T['query'], _reverse: T['reverse'], not?: T['not']): ReturnType;
|
|
14
|
+
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
15
|
+
private parseConditions;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ApiQueryConditionLinkedTo } from '@rentman/backend-types';
|
|
2
|
-
import { ApiQuery, ApiQueryWithConditions, QueryParserBase } from '../internal';
|
|
3
|
-
declare type ReturnType = boolean;
|
|
4
|
-
/**
|
|
5
|
-
* @description
|
|
6
|
-
* Returns whether or not a query can be parsed by the {@link QueryMatcher QueryMatcher}
|
|
7
|
-
*/
|
|
8
|
-
export declare class QueryLocallyMatchableParser extends QueryParserBase<ReturnType> {
|
|
9
|
-
constructor(query: ApiQuery);
|
|
10
|
-
protected parseEmptyQuery(): ReturnType;
|
|
11
|
-
protected parseSubQuery(): ReturnType;
|
|
12
|
-
protected parseSubFieldQuery(): ReturnType;
|
|
13
|
-
protected parseSearchQuery(): ReturnType;
|
|
14
|
-
protected parseCustomQuery(): ReturnType;
|
|
15
|
-
protected parseSimpleQuery(): ReturnType;
|
|
16
|
-
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(_linkedTo: T['linkedTo'], _query: T['query'], reverse: T['reverse'], _not: T['not']): ReturnType;
|
|
17
|
-
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
18
|
-
private parseConditions;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
import { ApiQueryConditionLinkedTo } from '@rentman/backend-types';
|
|
2
|
+
import { ApiQuery, ApiQueryWithConditions, QueryParserBase } from '../internal';
|
|
3
|
+
declare type ReturnType = boolean;
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Returns whether or not a query can be parsed by the {@link QueryMatcher QueryMatcher}
|
|
7
|
+
*/
|
|
8
|
+
export declare class QueryLocallyMatchableParser extends QueryParserBase<ReturnType> {
|
|
9
|
+
constructor(query: ApiQuery);
|
|
10
|
+
protected parseEmptyQuery(): ReturnType;
|
|
11
|
+
protected parseSubQuery(): ReturnType;
|
|
12
|
+
protected parseSubFieldQuery(): ReturnType;
|
|
13
|
+
protected parseSearchQuery(): ReturnType;
|
|
14
|
+
protected parseCustomQuery(): ReturnType;
|
|
15
|
+
protected parseSimpleQuery(): ReturnType;
|
|
16
|
+
protected parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(_linkedTo: T['linkedTo'], _query: T['query'], reverse: T['reverse'], _not: T['not']): ReturnType;
|
|
17
|
+
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions']): ReturnType;
|
|
18
|
+
private parseConditions;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ApiQuery, EntryParentNull, FieldMap } from '../internal';
|
|
3
|
-
export declare class QueryMatcher {
|
|
4
|
-
private apiFormatter;
|
|
5
|
-
itemType: ApiEnumItemType;
|
|
6
|
-
fields: FieldMap | [FieldMap, FieldMap];
|
|
7
|
-
parent: EntryParentNull;
|
|
8
|
-
/**
|
|
9
|
-
* @param apiFormatter
|
|
10
|
-
* @param itemType
|
|
11
|
-
* @param fields The fields to match against, if "fields" is an array index [0] should be the new/updated values, and index [1] the cached ones
|
|
12
|
-
* @param parent
|
|
13
|
-
*/
|
|
14
|
-
constructor(apiFormatter: ApiFormatter, itemType: ApiEnumItemType, fields: FieldMap | [FieldMap, FieldMap], parent?: EntryParentNull);
|
|
15
|
-
/**
|
|
16
|
-
* @remark
|
|
17
|
-
* When changing this code also change {@link QueryLocallyMatchableParser QueryLocallyMatchableParser}
|
|
18
|
-
*/
|
|
19
|
-
matchQuery(query: ApiQuery): boolean | 'maybe';
|
|
20
|
-
private compareValues;
|
|
21
|
-
private matchLinkedToQuery;
|
|
22
|
-
private matchComplexQuery;
|
|
23
|
-
private matchSimpleQuery;
|
|
24
|
-
}
|
|
1
|
+
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
+
import { ApiFormatter, ApiQuery, EntryParentNull, FieldMap } from '../internal';
|
|
3
|
+
export declare class QueryMatcher {
|
|
4
|
+
private apiFormatter;
|
|
5
|
+
itemType: ApiEnumItemType;
|
|
6
|
+
fields: FieldMap | [FieldMap, FieldMap];
|
|
7
|
+
parent: EntryParentNull;
|
|
8
|
+
/**
|
|
9
|
+
* @param apiFormatter
|
|
10
|
+
* @param itemType
|
|
11
|
+
* @param fields The fields to match against, if "fields" is an array index [0] should be the new/updated values, and index [1] the cached ones
|
|
12
|
+
* @param parent
|
|
13
|
+
*/
|
|
14
|
+
constructor(apiFormatter: ApiFormatter, itemType: ApiEnumItemType, fields: FieldMap | [FieldMap, FieldMap], parent?: EntryParentNull);
|
|
15
|
+
/**
|
|
16
|
+
* @remark
|
|
17
|
+
* When changing this code also change {@link QueryLocallyMatchableParser QueryLocallyMatchableParser}
|
|
18
|
+
*/
|
|
19
|
+
matchQuery(query: ApiQuery): boolean | 'maybe';
|
|
20
|
+
private compareValues;
|
|
21
|
+
private matchLinkedToQuery;
|
|
22
|
+
private matchComplexQuery;
|
|
23
|
+
private matchSimpleQuery;
|
|
24
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ApiQuery as BackendApiQuery, ApiQueryConditionInShort, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
-
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions, QueryParserBase } from '../internal';
|
|
3
|
-
export declare enum CONSTANTS {
|
|
4
|
-
OBJ = 0,
|
|
5
|
-
STR = 1,
|
|
6
|
-
SEP = ":"
|
|
7
|
-
}
|
|
8
|
-
declare type ReturnType = [BackendApiQuery, string];
|
|
9
|
-
export declare class QueryParser extends QueryParserBase<ReturnType> {
|
|
10
|
-
constructor(query: ApiQuery);
|
|
11
|
-
protected parseEmptyQuery(): ReturnType;
|
|
12
|
-
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], subQuery: T['query'], not?: T['not']): ReturnType;
|
|
13
|
-
protected parseSubFieldQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], itemType: T['itemType'], field: T['field'], query: T['query'], not?: T['not']): ReturnType;
|
|
14
|
-
protected parseSearchQuery(value: any, not?: boolean): ReturnType;
|
|
15
|
-
protected parseCustomQuery(custom: string, parameters: any, not?: boolean): ReturnType;
|
|
16
|
-
protected parseCustomParameters(parameters: any): ReturnType;
|
|
17
|
-
protected parseSimpleQuery<T extends ApiQueryConditionComparator | ApiQueryConditionInShort<any, any>>(key: T['key'], value: T['value'], comparator: T['comparator'], not?: T['not']): ReturnType;
|
|
18
|
-
protected parseLinkedToQuery(linkedTo: any, query?: ApiQuery, reverse?: boolean, not?: boolean): ReturnType;
|
|
19
|
-
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions'], operator?: T['operator'], not?: T['not']): ReturnType;
|
|
20
|
-
private parseConditions;
|
|
21
|
-
private formatValue;
|
|
22
|
-
private processValue;
|
|
23
|
-
private compareParsedQueries;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
1
|
+
import { ApiQuery as BackendApiQuery, ApiQueryConditionInShort, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
+
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions, QueryParserBase } from '../internal';
|
|
3
|
+
export declare enum CONSTANTS {
|
|
4
|
+
OBJ = 0,
|
|
5
|
+
STR = 1,
|
|
6
|
+
SEP = ":"
|
|
7
|
+
}
|
|
8
|
+
declare type ReturnType = [BackendApiQuery, string];
|
|
9
|
+
export declare class QueryParser extends QueryParserBase<ReturnType> {
|
|
10
|
+
constructor(query: ApiQuery);
|
|
11
|
+
protected parseEmptyQuery(): ReturnType;
|
|
12
|
+
protected parseSubQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], subQuery: T['query'], not?: T['not']): ReturnType;
|
|
13
|
+
protected parseSubFieldQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], itemType: T['itemType'], field: T['field'], query: T['query'], not?: T['not']): ReturnType;
|
|
14
|
+
protected parseSearchQuery(value: any, not?: boolean): ReturnType;
|
|
15
|
+
protected parseCustomQuery(custom: string, parameters: any, not?: boolean): ReturnType;
|
|
16
|
+
protected parseCustomParameters(parameters: any): ReturnType;
|
|
17
|
+
protected parseSimpleQuery<T extends ApiQueryConditionComparator | ApiQueryConditionInShort<any, any>>(key: T['key'], value: T['value'], comparator: T['comparator'], not?: T['not']): ReturnType;
|
|
18
|
+
protected parseLinkedToQuery(linkedTo: any, query?: ApiQuery, reverse?: boolean, not?: boolean): ReturnType;
|
|
19
|
+
protected parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions'], operator?: T['operator'], not?: T['not']): ReturnType;
|
|
20
|
+
private parseConditions;
|
|
21
|
+
private formatValue;
|
|
22
|
+
private processValue;
|
|
23
|
+
private compareParsedQueries;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ApiQueryConditionCustom, ApiQueryConditionLinkedTo, ApiQueryConditionSearch, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
-
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions } from '../internal';
|
|
3
|
-
export declare abstract class QueryParserBase<ReturnType extends any> {
|
|
4
|
-
protected query: ApiQuery;
|
|
5
|
-
protected constructor(query: ApiQuery);
|
|
6
|
-
parse(query?: ApiQuery): ReturnType;
|
|
7
|
-
protected abstract parseEmptyQuery(): ReturnType;
|
|
8
|
-
protected abstract parseSubQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], subQuery: T['query'], not: T['not'], queryPart: T): ReturnType;
|
|
9
|
-
protected abstract parseSubFieldQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], itemType: T['itemType'], field: T['field'], query: T['query'], not: T['not'], queryPart: T): ReturnType;
|
|
10
|
-
protected abstract parseSearchQuery<T extends ApiQueryConditionSearch>(value: T['search'], not: T['not'], queryPart: T): ReturnType;
|
|
11
|
-
protected abstract parseCustomQuery<T extends ApiQueryConditionCustom>(custom: T['custom'], parameters: T['parameters'], not: T['not'], queryPart: T): ReturnType;
|
|
12
|
-
protected abstract parseSimpleQuery<T extends ApiQueryConditionComparator>(key: T['key'], value: T['value'], comparator: T['comparator'], not: T['not'], queryPart: T): ReturnType;
|
|
13
|
-
protected abstract parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(linkedTo: T['linkedTo'], query: T['query'], reverse: T['reverse'], not: T['not'], queryPart: T): ReturnType;
|
|
14
|
-
protected abstract parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions'], operator: T['operator'], not: T['not'], queryPart: T): ReturnType;
|
|
15
|
-
protected isLinkedTo(query: ApiQuery): query is ApiQueryConditionLinkedTo;
|
|
16
|
-
protected isCustom(query: ApiQuery): query is ApiQueryConditionCustom;
|
|
17
|
-
protected isSearch(query: ApiQuery): query is ApiQueryConditionSearch;
|
|
18
|
-
protected isQueryWithConditions(query: ApiQuery): query is ApiQueryWithConditions;
|
|
19
|
-
protected isSub(query: ApiQuery): query is ApiQueryConditionSubQuery;
|
|
20
|
-
}
|
|
1
|
+
import { ApiQueryConditionCustom, ApiQueryConditionLinkedTo, ApiQueryConditionSearch, ApiQueryConditionSubQuery } from '@rentman/backend-types';
|
|
2
|
+
import { ApiQuery, ApiQueryConditionComparator, ApiQueryWithConditions } from '../internal';
|
|
3
|
+
export declare abstract class QueryParserBase<ReturnType extends any> {
|
|
4
|
+
protected query: ApiQuery;
|
|
5
|
+
protected constructor(query: ApiQuery);
|
|
6
|
+
parse(query?: ApiQuery): ReturnType;
|
|
7
|
+
protected abstract parseEmptyQuery(): ReturnType;
|
|
8
|
+
protected abstract parseSubQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], subQuery: T['query'], not: T['not'], queryPart: T): ReturnType;
|
|
9
|
+
protected abstract parseSubFieldQuery<T extends ApiQueryConditionSubQuery>(key: T['key'], itemType: T['itemType'], field: T['field'], query: T['query'], not: T['not'], queryPart: T): ReturnType;
|
|
10
|
+
protected abstract parseSearchQuery<T extends ApiQueryConditionSearch>(value: T['search'], not: T['not'], queryPart: T): ReturnType;
|
|
11
|
+
protected abstract parseCustomQuery<T extends ApiQueryConditionCustom>(custom: T['custom'], parameters: T['parameters'], not: T['not'], queryPart: T): ReturnType;
|
|
12
|
+
protected abstract parseSimpleQuery<T extends ApiQueryConditionComparator>(key: T['key'], value: T['value'], comparator: T['comparator'], not: T['not'], queryPart: T): ReturnType;
|
|
13
|
+
protected abstract parseLinkedToQuery<T extends ApiQueryConditionLinkedTo>(linkedTo: T['linkedTo'], query: T['query'], reverse: T['reverse'], not: T['not'], queryPart: T): ReturnType;
|
|
14
|
+
protected abstract parseComplexQuery<T extends ApiQueryWithConditions>(conditions: T['conditions'], operator: T['operator'], not: T['not'], queryPart: T): ReturnType;
|
|
15
|
+
protected isLinkedTo(query: ApiQuery): query is ApiQueryConditionLinkedTo;
|
|
16
|
+
protected isCustom(query: ApiQuery): query is ApiQueryConditionCustom;
|
|
17
|
+
protected isSearch(query: ApiQuery): query is ApiQueryConditionSearch;
|
|
18
|
+
protected isQueryWithConditions(query: ApiQuery): query is ApiQueryWithConditions;
|
|
19
|
+
protected isSub(query: ApiQuery): query is ApiQueryConditionSubQuery;
|
|
20
|
+
}
|