@rentman/rm-core 9.3.1 → 10.0.0-alpha.1
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 +4 -0
- package/dist/rm-core.js +5114 -1533
- package/dist/rm-core.min.js +1 -1
- package/dist/types/classes/BusinessLogicManager/BusinessLogicManager.d.ts +95 -0
- package/dist/types/classes/BusinessLogicManager/BusinessLogicRule.d.ts +94 -0
- package/dist/types/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +25 -0
- package/dist/types/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +14 -0
- package/dist/types/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +20 -0
- package/dist/types/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +19 -0
- package/dist/types/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +14 -0
- package/dist/types/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +14 -0
- package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalTypeBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +19 -0
- package/dist/types/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +26 -0
- package/dist/types/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +29 -0
- package/dist/types/classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule.d.ts +23 -0
- package/dist/types/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarBusinessLogicRule.d.ts +14 -0
- package/dist/types/classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +18 -0
- package/dist/types/classes/ChangesDelta.d.ts +1 -0
- package/dist/types/classes/ChangesDeltaBase.d.ts +2 -1
- package/dist/types/classes/InternalChangesDelta.d.ts +1 -0
- package/dist/types/core.d.ts +4 -1
- package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +2 -0
- package/dist/types/interfaces/ErrorHandlerInterface.d.ts +1 -0
- package/dist/types/internal.d.ts +23 -0
- package/package.json +1 -1
|
@@ -0,0 +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 {};
|
|
@@ -20,6 +20,7 @@ export declare class ChangesDelta extends ChangesDeltaBase {
|
|
|
20
20
|
[itemType: string]: ChangesDeltaItemDeleteDelta[];
|
|
21
21
|
};
|
|
22
22
|
constructor(errorHandler: ErrorHandlerInterface, itemCreateService: ItemCreateService, itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
23
|
+
merge(otherChangesDelta: ChangesDelta): ChangesDelta;
|
|
23
24
|
/**
|
|
24
25
|
* @description
|
|
25
26
|
* Fetches a template for the passed itemType and processes the passed values and sets the item to be created when the delta is applied
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ColumnExpansionResult, EntryParentNull, FieldMap, ItemEntry, ItemEntryService, ItemIdConversionMap, TransactionItemEntryChanges, TransactionItemEntryChangesTuple } from '../internal';
|
|
2
|
+
import { ApiFormatter, ColumnExpansionResult, EntryParentNull, FieldMap, ItemEntry, ItemEntryService, ItemIdConversionMap, ItemTypeColumnId, TransactionItemEntryChanges, TransactionItemEntryChangesTuple } from '../internal';
|
|
3
3
|
export declare type ChangesDeltaResult = {
|
|
4
4
|
itemIdConversionMap: ItemIdConversionMap;
|
|
5
5
|
created: ItemEntry[];
|
|
@@ -62,6 +62,7 @@ export declare abstract class ChangesDeltaBase {
|
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
protected constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
65
|
+
getUpdatedValue<ItemTypeType extends ApiEnumItemType, ColumnId extends ItemTypeColumnId<ItemTypeType> = any>(itemEntry: ItemEntry<ItemTypeType>, columnId: ColumnId): FieldMap<ItemTypeType>[ColumnId] | undefined;
|
|
65
66
|
/**
|
|
66
67
|
* @description
|
|
67
68
|
* Adds a hint for the {@link CollectionMatcherBase CacheSyncer] to the ChangesDelta, when the CollectionMatcher encounters a collection
|
|
@@ -30,6 +30,7 @@ export declare class InternalChangesDelta extends ChangesDeltaBase {
|
|
|
30
30
|
};
|
|
31
31
|
itemIdConversionMap: ItemIdConversionMap;
|
|
32
32
|
constructor(itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
33
|
+
merge(otherChangesDelta: InternalChangesDelta): InternalChangesDelta;
|
|
33
34
|
setItemDeleted(tuple: TransactionItemEntryChangesTuple<any>): this;
|
|
34
35
|
setItemsDeleted(deleted: TransactionItemEntryChangesTuple<any>[]): this;
|
|
35
36
|
setItemCreated<ItemTypeType extends ApiEnumItemType>(itemEntry: ItemEntry<ItemTypeType>, fields: FieldMap<ItemTypeType>): void;
|
package/dist/types/core.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ApiModuleFunctionLocalsGetLocals } from '@rentman/backend-types';
|
|
2
|
+
import { BusinessLogicManager } from './classes/BusinessLogicManager/BusinessLogicManager';
|
|
1
3
|
import { ApiFormatter, ApiRequestService, ApiRequestServiceInterface, ApiResponseProcessorFactory, AuthInterface, CacheSyncerFactory, ChangesCompilationFactory, ChangesDeltaFactory, ChangesProcessorFactory, CollectionEntryFactory, CollectionEntryService, CollectionResourceFactory, CollectionResourceService, ColumnCache, ColumnExpansionFactory, ColumnHandler, ColumnInfoFactory, ColumnSetFactory, ColumnSubsetCacheFactory, ColumnUtil, ConversionMapService, CreateRequestFactory, ErrorHandlerInterface, ExceptionHandlerInterface, ItemCacheFactory, ItemCreateService, ItemEntryFactory, ItemEntryService, ItemResourceFactory, KeyService, LinkTreeServiceInterface, LockService, ModuleChangesCompilationFactory, PromiseLibraryInterface, QueryMatcherFactory, QueryParserFactory, QueryService, RequestColumnExpansionFactory, SocketMessageHandler, TemplateCache, TemplateFactory, TransactionCacheFactory } from './internal';
|
|
2
4
|
export declare class RmCore {
|
|
3
5
|
version: string;
|
|
@@ -38,7 +40,8 @@ export declare class RmCore {
|
|
|
38
40
|
templateCache: TemplateCache;
|
|
39
41
|
templateFactory: TemplateFactory;
|
|
40
42
|
transactionCacheFactory: TransactionCacheFactory;
|
|
41
|
-
|
|
43
|
+
businessLogicManager: BusinessLogicManager;
|
|
44
|
+
constructor(_apiRequestService: ApiRequestServiceInterface, authInterface: AuthInterface, errorHandler: ErrorHandlerInterface, exceptionHandler: ExceptionHandlerInterface, promiseLibrary: PromiseLibraryInterface, linkTreeService: LinkTreeServiceInterface, locals: ApiModuleFunctionLocalsGetLocals);
|
|
42
45
|
}
|
|
43
46
|
export declare function noop(): void;
|
|
44
47
|
export declare function identity<T extends any>(value: T): T;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { BusinessLogicManager } from '../classes/BusinessLogicManager/BusinessLogicManager';
|
|
1
2
|
import { ApiFormatter, ApiRequestService, AuthInterface, CacheSyncerFactory, ChangesDeltaFactory, CollectionEntryFactory, CollectionEntryService, CollectionResourceFactory, ColumnCache, ColumnExpansionFactory, ColumnHandler, ColumnSetFactory, ColumnSubsetCacheFactory, ColumnUtil, ConversionMapService, ErrorHandlerInterface, ExceptionHandlerInterface, ItemCacheFactory, ItemCreateService, ItemEntryFactory, ItemEntryService, ItemResourceFactory, KeyService, LinkTreeServiceInterface, LockService, ModuleChangesCompilationFactory, PromiseLibraryInterface, QueryMatcherFactory, QueryParserFactory, QueryService, RequestBufferManager, RequestColumnExpansionFactory, TemplateCache } from '../internal';
|
|
2
3
|
export interface AbstractCacheDependencyInterface {
|
|
4
|
+
businessLogicManager: BusinessLogicManager;
|
|
3
5
|
apiFormatter: ApiFormatter;
|
|
4
6
|
apiRequestService: ApiRequestService;
|
|
5
7
|
authInterface: AuthInterface;
|
package/dist/types/internal.d.ts
CHANGED
|
@@ -76,6 +76,29 @@ export * from './classes/RequestBuffer';
|
|
|
76
76
|
export * from './classes/ItemCreateService';
|
|
77
77
|
export * from './classes/CreatedChangesDelta';
|
|
78
78
|
export * from './classes/TemplateCache';
|
|
79
|
+
export * from './classes/BusinessLogicManager/BusinessLogicManager';
|
|
80
|
+
export * from './classes/BusinessLogicManager/BusinessLogicRule';
|
|
81
|
+
export * from './classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule';
|
|
82
|
+
export * from './classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule';
|
|
83
|
+
export * from './classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule';
|
|
84
|
+
export * from './classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule';
|
|
85
|
+
export * from './classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule';
|
|
86
|
+
export * from './classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule';
|
|
87
|
+
export * from './classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule';
|
|
88
|
+
export * from './classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule';
|
|
89
|
+
export * from './classes/BusinessLogicManager/Materiaal/MateriaalTypeBusinessLogicRule';
|
|
90
|
+
export * from './classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule';
|
|
91
|
+
export * from './classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule';
|
|
92
|
+
export * from './classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule';
|
|
93
|
+
export * from './classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule';
|
|
94
|
+
export * from './classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule';
|
|
95
|
+
export * from './classes/BusinessLogicManager/Reparatie/ReparatieExemplaarBusinessLogicRule';
|
|
96
|
+
export * from './classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule';
|
|
97
|
+
export * from './classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule';
|
|
98
|
+
export * from './classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule';
|
|
99
|
+
export * from './classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule';
|
|
100
|
+
export * from './classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule';
|
|
101
|
+
export * from './classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule';
|
|
79
102
|
export * from './factories/ApiResponseProcessorFactory';
|
|
80
103
|
export * from './factories/ChangesCompilationFactory';
|
|
81
104
|
export * from './factories/CollectionEntryFactory';
|