@rentman/rm-core 11.0.2 → 11.0.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 +1432 -1420
- package/dist/rm-core.js +823 -808
- 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_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_service.test.d.ts +1 -1
- package/package.json +57 -57
- package/readme.md +16 -16
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ApiEnumItemType, ApiModuleFunctionLocalsGetLocals, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { ApiFormatter } from '../../ApiFormatter';
|
|
4
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
6
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
7
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
8
|
-
declare type ConditionResult = ItemId[];
|
|
9
|
-
declare type DependencyColumns = ['width', 'height', 'oppervlakteartikel', 'nieuwprijs', 'inhuurprijs', 'verhuurprijs', 'naam'];
|
|
10
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Materiaal, DependencyColumns>[];
|
|
11
|
-
export declare class SurfaceArticleSizeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
12
|
-
protected apiFormatter: ApiFormatter;
|
|
13
|
-
private locals;
|
|
14
|
-
constructor(apiFormatter: ApiFormatter, locals: ApiModuleFunctionLocalsGetLocals);
|
|
15
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
16
|
-
dependency(transaction: TransactionCache, materiaalIds: ConditionResult): Promise<Dependency>;
|
|
17
|
-
apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, materiaalResources: Dependency): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ApiModuleFunctionLocalsGetLocals, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { ApiFormatter } from '../../ApiFormatter';
|
|
4
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
5
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
6
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
7
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
8
|
+
declare type ConditionResult = ItemId[];
|
|
9
|
+
declare type DependencyColumns = ['width', 'height', 'oppervlakteartikel', 'nieuwprijs', 'inhuurprijs', 'verhuurprijs', 'naam'];
|
|
10
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Materiaal, DependencyColumns>[];
|
|
11
|
+
export declare class SurfaceArticleSizeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
12
|
+
protected apiFormatter: ApiFormatter;
|
|
13
|
+
private locals;
|
|
14
|
+
constructor(apiFormatter: ApiFormatter, locals: ApiModuleFunctionLocalsGetLocals);
|
|
15
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
16
|
+
dependency(transaction: TransactionCache, materiaalIds: ConditionResult): Promise<Dependency>;
|
|
17
|
+
apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, materiaalResources: Dependency): void;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { PromiseLibraryInterface } from '../../../interfaces/PromiseLibraryInterface';
|
|
3
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
4
|
-
import { ApiFormatter } from '../../ApiFormatter';
|
|
5
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
6
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
7
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
8
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
9
|
-
declare type ConditionResult = {
|
|
10
|
-
Offerte: ItemId[];
|
|
11
|
-
Contract: ItemId[];
|
|
12
|
-
};
|
|
13
|
-
declare type Dependency = {
|
|
14
|
-
Offerte: ItemResource<ApiEnumItemType.Offerte, ['vervaldatum']>[];
|
|
15
|
-
Contract: ItemResource<ApiEnumItemType.Contract, ['vervaldatum']>[];
|
|
16
|
-
State: ItemResource<ApiEnumItemType.State, ['geldigheidofferte']>;
|
|
17
|
-
};
|
|
18
|
-
export declare class OfferteContractDatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
19
|
-
protected apiFormatter: ApiFormatter;
|
|
20
|
-
private promiseLibrary;
|
|
21
|
-
constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
|
|
22
|
-
condition(changesDelta: ChangesDelta, itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
23
|
-
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
24
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { PromiseLibraryInterface } from '../../../interfaces/PromiseLibraryInterface';
|
|
3
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
4
|
+
import { ApiFormatter } from '../../ApiFormatter';
|
|
5
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
6
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
7
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
8
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
9
|
+
declare type ConditionResult = {
|
|
10
|
+
Offerte: ItemId[];
|
|
11
|
+
Contract: ItemId[];
|
|
12
|
+
};
|
|
13
|
+
declare type Dependency = {
|
|
14
|
+
Offerte: ItemResource<ApiEnumItemType.Offerte, ['vervaldatum']>[];
|
|
15
|
+
Contract: ItemResource<ApiEnumItemType.Contract, ['vervaldatum']>[];
|
|
16
|
+
State: ItemResource<ApiEnumItemType.State, ['geldigheidofferte']>;
|
|
17
|
+
};
|
|
18
|
+
export declare class OfferteContractDatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
19
|
+
protected apiFormatter: ApiFormatter;
|
|
20
|
+
private promiseLibrary;
|
|
21
|
+
constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
|
|
22
|
+
condition(changesDelta: ChangesDelta, itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
23
|
+
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
24
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { PromiseLibraryInterface } from '../../../interfaces/PromiseLibraryInterface';
|
|
3
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
4
|
-
import { ApiFormatter } from '../../ApiFormatter';
|
|
5
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
6
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
7
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
8
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
9
|
-
declare type ConditionResult = {
|
|
10
|
-
Planningpersoneel: ItemId[];
|
|
11
|
-
Planningtransport: ItemId[];
|
|
12
|
-
};
|
|
13
|
-
declare type Dependency = {
|
|
14
|
-
Planningpersoneel: ItemResource<ApiEnumItemType.Planningpersoneel, ['vervoer', 'functie', 'planvan', 'plantot']>[];
|
|
15
|
-
Planningtransport: ItemResource<ApiEnumItemType.Planningtransport, ['vervoer', 'functie', 'planvan', 'plantot']>[];
|
|
16
|
-
Functie: {
|
|
17
|
-
[functieId: string]: ItemResource<ApiEnumItemType.Functie, ['reistijd_vooraf', 'reistijd_achteraf']>;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export declare class PlanningPersoneelTransportBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
21
|
-
protected apiFormatter: ApiFormatter;
|
|
22
|
-
private promiseLibrary;
|
|
23
|
-
constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
|
|
24
|
-
condition(changesDelta: ChangesDelta, itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
25
|
-
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
26
|
-
apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
|
|
27
|
-
private updatePlanningColumns;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { PromiseLibraryInterface } from '../../../interfaces/PromiseLibraryInterface';
|
|
3
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
4
|
+
import { ApiFormatter } from '../../ApiFormatter';
|
|
5
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
6
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
7
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
8
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
9
|
+
declare type ConditionResult = {
|
|
10
|
+
Planningpersoneel: ItemId[];
|
|
11
|
+
Planningtransport: ItemId[];
|
|
12
|
+
};
|
|
13
|
+
declare type Dependency = {
|
|
14
|
+
Planningpersoneel: ItemResource<ApiEnumItemType.Planningpersoneel, ['vervoer', 'functie', 'planvan', 'plantot']>[];
|
|
15
|
+
Planningtransport: ItemResource<ApiEnumItemType.Planningtransport, ['vervoer', 'functie', 'planvan', 'plantot']>[];
|
|
16
|
+
Functie: {
|
|
17
|
+
[functieId: string]: ItemResource<ApiEnumItemType.Functie, ['reistijd_vooraf', 'reistijd_achteraf']>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare class PlanningPersoneelTransportBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
21
|
+
protected apiFormatter: ApiFormatter;
|
|
22
|
+
private promiseLibrary;
|
|
23
|
+
constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
|
|
24
|
+
condition(changesDelta: ChangesDelta, itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
25
|
+
dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
|
|
26
|
+
apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
|
|
27
|
+
private updatePlanningColumns;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
package/dist/types/src/classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { PromiseLibraryInterface } from '../../../interfaces/PromiseLibraryInterface';
|
|
3
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
4
|
-
import { ApiFormatter } from '../../ApiFormatter';
|
|
5
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
6
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
7
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
8
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
9
|
-
declare type ConditionResult = {
|
|
10
|
-
[projectId: string]: ItemId;
|
|
11
|
-
};
|
|
12
|
-
declare type Dependency = {
|
|
13
|
-
[projectId: string]: ItemResource<ApiEnumItemType.Contact, ['projectnotitie_naam', 'projectnotitie']>;
|
|
14
|
-
};
|
|
15
|
-
export declare class ProjectClientNoteBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
16
|
-
protected apiFormatter: ApiFormatter;
|
|
17
|
-
private promiseLibrary;
|
|
18
|
-
constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
|
|
19
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
20
|
-
dependency(transaction: TransactionCache, obj: ConditionResult): Promise<Dependency>;
|
|
21
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, obj: Dependency): Promise<void>;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { PromiseLibraryInterface } from '../../../interfaces/PromiseLibraryInterface';
|
|
3
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
4
|
+
import { ApiFormatter } from '../../ApiFormatter';
|
|
5
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
6
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
7
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
8
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
9
|
+
declare type ConditionResult = {
|
|
10
|
+
[projectId: string]: ItemId;
|
|
11
|
+
};
|
|
12
|
+
declare type Dependency = {
|
|
13
|
+
[projectId: string]: ItemResource<ApiEnumItemType.Contact, ['projectnotitie_naam', 'projectnotitie']>;
|
|
14
|
+
};
|
|
15
|
+
export declare class ProjectClientNoteBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
16
|
+
protected apiFormatter: ApiFormatter;
|
|
17
|
+
private promiseLibrary;
|
|
18
|
+
constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
|
|
19
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
20
|
+
dependency(transaction: TransactionCache, obj: ConditionResult): Promise<Dependency>;
|
|
21
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, obj: Dependency): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
declare type ConditionResult = ItemId[];
|
|
8
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Reparatie, ['aantal']>[];
|
|
9
|
-
export declare class ReparatieAanschafdatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
10
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
11
|
-
dependency(transaction: TransactionCache, reparatieIds: ConditionResult): Promise<Dependency>;
|
|
12
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, reparatieResources: Dependency): void;
|
|
13
|
-
}
|
|
14
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
+
declare type ConditionResult = ItemId[];
|
|
8
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Reparatie, ['aantal']>[];
|
|
9
|
+
export declare class ReparatieAanschafdatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
10
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
11
|
+
dependency(transaction: TransactionCache, reparatieIds: ConditionResult): Promise<Dependency>;
|
|
12
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, reparatieResources: Dependency): void;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
declare type ConditionResult = ItemId[];
|
|
8
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_bestanden_downloaden']>[];
|
|
9
|
-
/**
|
|
10
|
-
* @description
|
|
11
|
-
* If you have project access or can make quotations/contracts you should have permissions to download files
|
|
12
|
-
*/
|
|
13
|
-
export declare class RolDocumentAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
-
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
+
declare type ConditionResult = ItemId[];
|
|
8
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_bestanden_downloaden']>[];
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* If you have project access or can make quotations/contracts you should have permissions to download files
|
|
12
|
+
*/
|
|
13
|
+
export declare class RolDocumentAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
declare type ConditionResult = ItemId[];
|
|
8
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_eigen_medewerker_edit']>[];
|
|
9
|
-
/**
|
|
10
|
-
* @description
|
|
11
|
-
* If you can access update crew data, you can also always update your own data
|
|
12
|
-
*/
|
|
13
|
-
export declare class RolEditOwnDataBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
-
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
+
declare type ConditionResult = ItemId[];
|
|
8
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_eigen_medewerker_edit']>[];
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* If you can access update crew data, you can also always update your own data
|
|
12
|
+
*/
|
|
13
|
+
export declare class RolEditOwnDataBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
declare type ConditionResult = ItemId[];
|
|
8
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['facturen_eigen', 'general_bestanden_downloaden', 'facturen_toegang', 'projecten_toegang']>[];
|
|
9
|
-
/**
|
|
10
|
-
* @description
|
|
11
|
-
* If you have project access or can make invoices you should have permissions to download files, see invoices and edit invoices
|
|
12
|
-
*/
|
|
13
|
-
export declare class RolFileAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
-
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
-
apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
+
declare type ConditionResult = ItemId[];
|
|
8
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['facturen_eigen', 'general_bestanden_downloaden', 'facturen_toegang', 'projecten_toegang']>[];
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* If you have project access or can make invoices you should have permissions to download files, see invoices and edit invoices
|
|
12
|
+
*/
|
|
13
|
+
export declare class RolFileAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
+
apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
declare type ConditionResult = ItemId[];
|
|
8
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['personeelsplanner_toegang']>[];
|
|
9
|
-
/**
|
|
10
|
-
* @description
|
|
11
|
-
* If you can enter the crew planner you can also access projects
|
|
12
|
-
*/
|
|
13
|
-
export declare class RolPersoneelsplannerToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
-
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
+
declare type ConditionResult = ItemId[];
|
|
8
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['personeelsplanner_toegang']>[];
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* If you can enter the crew planner you can also access projects
|
|
12
|
+
*/
|
|
13
|
+
export declare class RolPersoneelsplannerToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
declare type ConditionResult = ItemId[];
|
|
8
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['materialen_tijdlijn']>[];
|
|
9
|
-
/**
|
|
10
|
-
* @description
|
|
11
|
-
* If you can edit projects you should be able to see the equipment availability
|
|
12
|
-
*/
|
|
13
|
-
export declare class RolProjectenBewerkenBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
-
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
+
declare type ConditionResult = ItemId[];
|
|
8
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['materialen_tijdlijn']>[];
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* If you can edit projects you should be able to see the equipment availability
|
|
12
|
+
*/
|
|
13
|
+
export declare class RolProjectenBewerkenBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
-
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
-
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
-
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
-
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
-
declare type ConditionResult = ItemId[];
|
|
8
|
-
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['uren_kosten']>[];
|
|
9
|
-
/**
|
|
10
|
-
* @description
|
|
11
|
-
* If you have access to projects you should be able to make costs for registered hours
|
|
12
|
-
*/
|
|
13
|
-
export declare class RolProjectenToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
-
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
-
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
-
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
+
import { ItemResource } from '../../../models/ItemResource';
|
|
3
|
+
import { TransactionCache } from '../../cache/transaction/TransactionCache';
|
|
4
|
+
import { TransactionItemHandler } from '../../cache/transaction/TransactionItemHandler';
|
|
5
|
+
import { ChangesDelta } from '../../ChangesDelta';
|
|
6
|
+
import { BusinessLogicRule } from '../BusinessLogicRule';
|
|
7
|
+
declare type ConditionResult = ItemId[];
|
|
8
|
+
declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['uren_kosten']>[];
|
|
9
|
+
/**
|
|
10
|
+
* @description
|
|
11
|
+
* If you have access to projects you should be able to make costs for registered hours
|
|
12
|
+
*/
|
|
13
|
+
export declare class RolProjectenToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
|
|
14
|
+
condition(changesDelta: ChangesDelta, _itemChanges: TransactionItemHandler['itemChanges']): ConditionResult | undefined;
|
|
15
|
+
dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
|
|
16
|
+
apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
-
import { AbstractCache, ApiRequestService, CachedQueryItem, ChangesDeltaBase, CollectionQuery, CollectionResource, FieldMap, ItemEntry, ItemTypeMap, ParentChangesDelta, PromiseInterface, PromiseLibraryInterface, QueryMatcherFactory, QueryService } from '../internal';
|
|
3
|
-
export declare type CacheSyncerQueryMap = ItemTypeMap<{
|
|
4
|
-
[cachedQueryString: string]: {
|
|
5
|
-
cachedQueryItems: CachedQueryItem[];
|
|
6
|
-
collectionResources: CollectionResource[];
|
|
7
|
-
};
|
|
8
|
-
}>;
|
|
9
|
-
declare type CacheSyncerMatchesMapEntry = {
|
|
10
|
-
query: CollectionQuery;
|
|
11
|
-
items: ItemEntry[];
|
|
12
|
-
};
|
|
13
|
-
declare type CacheSyncerMatchesMap = ItemTypeMap<{
|
|
14
|
-
[cachedQueryString: string]: CacheSyncerMatchesMapEntry;
|
|
15
|
-
}>;
|
|
16
|
-
export declare class CacheSyncer {
|
|
17
|
-
private queryService;
|
|
18
|
-
private queryMatcherFactory;
|
|
19
|
-
private apiRequestService;
|
|
20
|
-
private promiseService;
|
|
21
|
-
private transaction;
|
|
22
|
-
private cachedQueryMap;
|
|
23
|
-
matches: {
|
|
24
|
-
true: CacheSyncerMatchesMap;
|
|
25
|
-
false: CacheSyncerMatchesMap;
|
|
26
|
-
maybe: CacheSyncerMatchesMap;
|
|
27
|
-
};
|
|
28
|
-
constructor(queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, apiRequestService: ApiRequestService, promiseService: PromiseLibraryInterface, transaction: AbstractCache, cachedQueryMap: CacheSyncerQueryMap);
|
|
29
|
-
getMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, queryString: string, type: 'true' | 'false' | 'maybe'): ItemEntry<ItemTypeType>[];
|
|
30
|
-
/**
|
|
31
|
-
* Syncing of collections always runs in 3 phases:
|
|
32
|
-
* - Remove items from collections
|
|
33
|
-
* - Add items to collections
|
|
34
|
-
* - Process MAYBE matches
|
|
35
|
-
* -- Remove MAYBE items from collections
|
|
36
|
-
* -- Add MAYBE items to collections
|
|
37
|
-
*
|
|
38
|
-
* @param isCalledAfterSocketUpdate
|
|
39
|
-
* @param changesDelta
|
|
40
|
-
*/
|
|
41
|
-
syncCollections(isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Syncing of cached queries runs in 3 phases:
|
|
44
|
-
* - Remove items from collections
|
|
45
|
-
* - Add items to collections
|
|
46
|
-
* - Process MAYBE matches
|
|
47
|
-
* -- Remove MAYBE items from collections
|
|
48
|
-
* -- Add MAYBE items to collections
|
|
49
|
-
*
|
|
50
|
-
* @param _isCalledAfterSocketUpdate
|
|
51
|
-
* @param changesDelta
|
|
52
|
-
*/
|
|
53
|
-
syncCachedQueries(_isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void[]>;
|
|
54
|
-
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
55
|
-
processDelta(parentChangesDelta: ParentChangesDelta): this;
|
|
56
|
-
_expand<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
57
|
-
/**
|
|
58
|
-
* Unlike the functions that use a promise accumulator, this function *can* result in a rejection. It should be handled
|
|
59
|
-
* by the caller.
|
|
60
|
-
*/
|
|
61
|
-
protected processMaybeMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, query: CollectionQuery, maybeItemEntries: ItemEntry<ItemTypeType>[], changesDelta: ChangesDeltaBase | undefined): PromiseInterface<ItemEntry<ItemTypeType>[]>;
|
|
62
|
-
/**
|
|
63
|
-
* Returns null if none of the promises resulted in an exception, or the exception otherwise.
|
|
64
|
-
*/
|
|
65
|
-
private resolveAll;
|
|
66
|
-
private addMatchedEntriesToCollections;
|
|
67
|
-
private processCollectionMaybe;
|
|
68
|
-
private processCachedQueryMaybe;
|
|
69
|
-
}
|
|
70
|
-
export {};
|
|
1
|
+
import { ApiEnumItemType } from '@rentman/backend-types';
|
|
2
|
+
import { AbstractCache, ApiRequestService, CachedQueryItem, ChangesDeltaBase, CollectionQuery, CollectionResource, FieldMap, ItemEntry, ItemTypeMap, ParentChangesDelta, PromiseInterface, PromiseLibraryInterface, QueryMatcherFactory, QueryService } from '../internal';
|
|
3
|
+
export declare type CacheSyncerQueryMap = ItemTypeMap<{
|
|
4
|
+
[cachedQueryString: string]: {
|
|
5
|
+
cachedQueryItems: CachedQueryItem[];
|
|
6
|
+
collectionResources: CollectionResource[];
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
9
|
+
declare type CacheSyncerMatchesMapEntry = {
|
|
10
|
+
query: CollectionQuery;
|
|
11
|
+
items: ItemEntry[];
|
|
12
|
+
};
|
|
13
|
+
declare type CacheSyncerMatchesMap = ItemTypeMap<{
|
|
14
|
+
[cachedQueryString: string]: CacheSyncerMatchesMapEntry;
|
|
15
|
+
}>;
|
|
16
|
+
export declare class CacheSyncer {
|
|
17
|
+
private queryService;
|
|
18
|
+
private queryMatcherFactory;
|
|
19
|
+
private apiRequestService;
|
|
20
|
+
private promiseService;
|
|
21
|
+
private transaction;
|
|
22
|
+
private cachedQueryMap;
|
|
23
|
+
matches: {
|
|
24
|
+
true: CacheSyncerMatchesMap;
|
|
25
|
+
false: CacheSyncerMatchesMap;
|
|
26
|
+
maybe: CacheSyncerMatchesMap;
|
|
27
|
+
};
|
|
28
|
+
constructor(queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, apiRequestService: ApiRequestService, promiseService: PromiseLibraryInterface, transaction: AbstractCache, cachedQueryMap: CacheSyncerQueryMap);
|
|
29
|
+
getMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, queryString: string, type: 'true' | 'false' | 'maybe'): ItemEntry<ItemTypeType>[];
|
|
30
|
+
/**
|
|
31
|
+
* Syncing of collections always runs in 3 phases:
|
|
32
|
+
* - Remove items from collections
|
|
33
|
+
* - Add items to collections
|
|
34
|
+
* - Process MAYBE matches
|
|
35
|
+
* -- Remove MAYBE items from collections
|
|
36
|
+
* -- Add MAYBE items to collections
|
|
37
|
+
*
|
|
38
|
+
* @param isCalledAfterSocketUpdate
|
|
39
|
+
* @param changesDelta
|
|
40
|
+
*/
|
|
41
|
+
syncCollections(isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Syncing of cached queries runs in 3 phases:
|
|
44
|
+
* - Remove items from collections
|
|
45
|
+
* - Add items to collections
|
|
46
|
+
* - Process MAYBE matches
|
|
47
|
+
* -- Remove MAYBE items from collections
|
|
48
|
+
* -- Add MAYBE items to collections
|
|
49
|
+
*
|
|
50
|
+
* @param _isCalledAfterSocketUpdate
|
|
51
|
+
* @param changesDelta
|
|
52
|
+
*/
|
|
53
|
+
syncCachedQueries(_isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void[]>;
|
|
54
|
+
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
55
|
+
processDelta(parentChangesDelta: ParentChangesDelta): this;
|
|
56
|
+
_expand<ItemTypeType extends ApiEnumItemType = any>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
57
|
+
/**
|
|
58
|
+
* Unlike the functions that use a promise accumulator, this function *can* result in a rejection. It should be handled
|
|
59
|
+
* by the caller.
|
|
60
|
+
*/
|
|
61
|
+
protected processMaybeMatches<ItemTypeType extends ApiEnumItemType>(itemType: ItemTypeType, query: CollectionQuery, maybeItemEntries: ItemEntry<ItemTypeType>[], changesDelta: ChangesDeltaBase | undefined): PromiseInterface<ItemEntry<ItemTypeType>[]>;
|
|
62
|
+
/**
|
|
63
|
+
* Returns null if none of the promises resulted in an exception, or the exception otherwise.
|
|
64
|
+
*/
|
|
65
|
+
private resolveAll;
|
|
66
|
+
private addMatchedEntriesToCollections;
|
|
67
|
+
private processCollectionMaybe;
|
|
68
|
+
private processCachedQueryMaybe;
|
|
69
|
+
}
|
|
70
|
+
export {};
|