@rentman/rm-core 12.1.2 → 12.1.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.
Files changed (146) hide show
  1. package/changelog.md +1509 -1495
  2. package/dist/rm-core.js +909 -965
  3. package/dist/rm-core.min.js +1 -1
  4. package/dist/types/src/FieldLookupProxy.d.ts +4 -4
  5. package/dist/types/src/classes/ApiFormatter.d.ts +56 -76
  6. package/dist/types/src/classes/ApiRequestService.d.ts +18 -18
  7. package/dist/types/src/classes/ApiResponseProcessor.d.ts +29 -29
  8. package/dist/types/src/classes/BusinessLogicManager/BusinessLogicManager.d.ts +100 -100
  9. package/dist/types/src/classes/BusinessLogicManager/BusinessLogicRule.d.ts +93 -93
  10. package/dist/types/src/classes/BusinessLogicManager/Customfield/CustomFieldTypeBusinessLogicRule.d.ts +17 -17
  11. package/dist/types/src/classes/BusinessLogicManager/Documents/DocumentTemplateBusinessLogicRule.d.ts +24 -24
  12. package/dist/types/src/classes/BusinessLogicManager/Exemplaar/ExemplaarAanschafdatumBusinessLogicRule.d.ts +13 -13
  13. package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurBetalingsconditieBusinessLogicRule.d.ts +19 -19
  14. package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurDatumBusinessLogicRule.d.ts +18 -18
  15. package/dist/types/src/classes/BusinessLogicManager/Factuur/FactuurNumberseriesBusinessLogicRule.d.ts +13 -13
  16. package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieNaaminternBusinessLogicRule.d.ts +17 -17
  17. package/dist/types/src/classes/BusinessLogicManager/Functie/FunctieTwowayBusinessLogicRule.d.ts +13 -13
  18. package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalTelexemplarenBusinessLogicRule.d.ts +15 -15
  19. package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalTypeBusinessLogicRule.d.ts +17 -17
  20. package/dist/types/src/classes/BusinessLogicManager/Materiaal/MateriaalVerhuurBusinessLogicRule.d.ts +17 -17
  21. package/dist/types/src/classes/BusinessLogicManager/Materiaal/SurfaceArticleSizeBusinessLogicRule.d.ts +18 -18
  22. package/dist/types/src/classes/BusinessLogicManager/OfferteContract/OfferteContractDatumBusinessLogicRule.d.ts +25 -25
  23. package/dist/types/src/classes/BusinessLogicManager/PlanningPersoneelTransport/PlanningPersoneelTransportBusinessLogicRule.d.ts +28 -28
  24. package/dist/types/src/classes/BusinessLogicManager/Project/ProjectClientNoteBusinessLogicRule.d.ts +22 -22
  25. package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarAantalBusinessLogicRule.d.ts +13 -13
  26. package/dist/types/src/classes/BusinessLogicManager/Reparatie/ReparatieExemplaarLocationBusinessLogicRule.d.ts +23 -23
  27. package/dist/types/src/classes/BusinessLogicManager/Rol/RolDocumentAccessBusinessLogicRule.d.ts +17 -17
  28. package/dist/types/src/classes/BusinessLogicManager/Rol/RolEditOwnDataBusinessLogicRule.d.ts +17 -17
  29. package/dist/types/src/classes/BusinessLogicManager/Rol/RolFileAccessBusinessLogicRule.d.ts +17 -17
  30. package/dist/types/src/classes/BusinessLogicManager/Rol/RolPersoneelsplannerToegangBusinessLogicRule.d.ts +17 -17
  31. package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenBewerkenBusinessLogicRule.d.ts +17 -17
  32. package/dist/types/src/classes/BusinessLogicManager/Rol/RolProjectenToegangBusinessLogicRule.d.ts +17 -17
  33. package/dist/types/src/classes/CacheSyncer.d.ts +71 -71
  34. package/dist/types/src/classes/ChangesCompilation.d.ts +33 -33
  35. package/dist/types/src/classes/ChangesDelta.d.ts +65 -65
  36. package/dist/types/src/classes/ChangesDeltaBase.d.ts +103 -88
  37. package/dist/types/src/classes/ChangesProcessor.d.ts +40 -40
  38. package/dist/types/src/classes/CollectionEntryService.d.ts +24 -24
  39. package/dist/types/src/classes/CollectionResourceService.d.ts +6 -6
  40. package/dist/types/src/classes/ColumnCache.d.ts +19 -19
  41. package/dist/types/src/classes/ColumnExpansion.d.ts +19 -19
  42. package/dist/types/src/classes/ColumnHandler.d.ts +20 -20
  43. package/dist/types/src/classes/ColumnInfo.d.ts +15 -15
  44. package/dist/types/src/classes/ColumnSet.d.ts +37 -37
  45. package/dist/types/src/classes/ColumnUtil.d.ts +108 -108
  46. package/dist/types/src/classes/ConversionMapService.d.ts +25 -25
  47. package/dist/types/src/classes/CreateRequest.d.ts +17 -17
  48. package/dist/types/src/classes/CreatedChangesDelta.d.ts +17 -17
  49. package/dist/types/src/classes/InternalChangesDelta.d.ts +44 -44
  50. package/dist/types/src/classes/ItemCache.d.ts +27 -27
  51. package/dist/types/src/classes/ItemCreateService.d.ts +18 -18
  52. package/dist/types/src/classes/ItemEntryService.d.ts +32 -32
  53. package/dist/types/src/classes/KeyService.d.ts +18 -18
  54. package/dist/types/src/classes/LockService.d.ts +28 -28
  55. package/dist/types/src/classes/ModuleChangesCompilation.d.ts +17 -17
  56. package/dist/types/src/classes/ParentChangesDelta.d.ts +41 -41
  57. package/dist/types/src/classes/QueryColumnExtractor.d.ts +18 -18
  58. package/dist/types/src/classes/QueryContainsLocalIdParser.d.ts +17 -17
  59. package/dist/types/src/classes/QueryLinkedToParser.d.ts +17 -17
  60. package/dist/types/src/classes/QueryLocallyMatchableParser.d.ts +20 -20
  61. package/dist/types/src/classes/QueryMatcher.d.ts +25 -25
  62. package/dist/types/src/classes/QueryParser.d.ts +25 -25
  63. package/dist/types/src/classes/QueryParserBase.d.ts +20 -20
  64. package/dist/types/src/classes/QueryParserIdUpdater.d.ts +17 -17
  65. package/dist/types/src/classes/QueryService.d.ts +12 -12
  66. package/dist/types/src/classes/RequestBuffer.d.ts +26 -26
  67. package/dist/types/src/classes/RequestBufferManager.d.ts +21 -21
  68. package/dist/types/src/classes/RequestColumnExpansion.d.ts +13 -13
  69. package/dist/types/src/classes/RequestColumnsOperationsCache.d.ts +46 -46
  70. package/dist/types/src/classes/SocketMessageHandler.d.ts +34 -34
  71. package/dist/types/src/classes/TemplateCache.d.ts +64 -64
  72. package/dist/types/src/classes/Util.d.ts +28 -28
  73. package/dist/types/src/classes/cache/AbstractCache.d.ts +85 -85
  74. package/dist/types/src/classes/cache/CachedQueryHandlerBase.d.ts +70 -70
  75. package/dist/types/src/classes/cache/ItemHandlerBase.d.ts +107 -107
  76. package/dist/types/src/classes/cache/server/ServerCache.d.ts +65 -65
  77. package/dist/types/src/classes/cache/server/ServerCachedQueryHandler.d.ts +27 -27
  78. package/dist/types/src/classes/cache/server/ServerItemHandler.d.ts +39 -39
  79. package/dist/types/src/classes/cache/transaction/TransactionCache.d.ts +298 -298
  80. package/dist/types/src/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +50 -50
  81. package/dist/types/src/classes/cache/transaction/TransactionCollectionHandler.d.ts +24 -24
  82. package/dist/types/src/classes/cache/transaction/TransactionEventHandler.d.ts +21 -21
  83. package/dist/types/src/classes/cache/transaction/TransactionItemHandler.d.ts +80 -80
  84. package/dist/types/src/classes/cache/transaction/TransactionValidator.d.ts +33 -33
  85. package/dist/types/src/constants.d.ts +7 -7
  86. package/dist/types/src/core.d.ts +48 -48
  87. package/dist/types/src/factories/ApiResponseProcessorFactory.d.ts +6 -6
  88. package/dist/types/src/factories/CacheSyncerFactory.d.ts +14 -14
  89. package/dist/types/src/factories/ChangesCompilationFactory.d.ts +5 -5
  90. package/dist/types/src/factories/ChangesDeltaFactory.d.ts +13 -13
  91. package/dist/types/src/factories/ChangesProcessorFactory.d.ts +13 -13
  92. package/dist/types/src/factories/CollectionEntryFactory.d.ts +11 -11
  93. package/dist/types/src/factories/CollectionResourceFactory.d.ts +18 -18
  94. package/dist/types/src/factories/ColumnExpansionFactory.d.ts +7 -7
  95. package/dist/types/src/factories/ColumnInfoFactory.d.ts +7 -7
  96. package/dist/types/src/factories/ColumnSetFactory.d.ts +18 -18
  97. package/dist/types/src/factories/CreateRequestFactory.d.ts +9 -9
  98. package/dist/types/src/factories/ItemCacheFactory.d.ts +6 -6
  99. package/dist/types/src/factories/ItemEntryFactory.d.ts +12 -12
  100. package/dist/types/src/factories/ItemResourceFactory.d.ts +11 -11
  101. package/dist/types/src/factories/ModuleChangesCompilationFactory.d.ts +6 -6
  102. package/dist/types/src/factories/QueryMatcherFactory.d.ts +8 -8
  103. package/dist/types/src/factories/QueryParserFactory.d.ts +5 -5
  104. package/dist/types/src/factories/RequestColumnExpansionFactory.d.ts +6 -6
  105. package/dist/types/src/factories/RequestColumnsOperationsCacheFactory.d.ts +8 -8
  106. package/dist/types/src/factories/TemplateFactory.d.ts +8 -8
  107. package/dist/types/src/factories/TransactionCacheFactory.d.ts +13 -13
  108. package/dist/types/src/index.d.ts +1 -1
  109. package/dist/types/src/interfaces/AbstractCacheDependencyInterface.d.ts +38 -38
  110. package/dist/types/src/interfaces/ApiRequestServiceInterface.d.ts +12 -12
  111. package/dist/types/src/interfaces/AuthInterface.d.ts +10 -10
  112. package/dist/types/src/interfaces/ErrorHandlerInterface.d.ts +6 -6
  113. package/dist/types/src/interfaces/ExceptionHandlerInterface.d.ts +3 -3
  114. package/dist/types/src/interfaces/LinkTreeServiceInterface.d.ts +4 -4
  115. package/dist/types/src/interfaces/PromiseLibraryInterface.d.ts +33 -33
  116. package/dist/types/src/interfaces/ServerCacheDependencyInterface.d.ts +5 -5
  117. package/dist/types/src/interfaces/SocketMessageInterface.d.ts +3 -3
  118. package/dist/types/src/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +17 -17
  119. package/dist/types/src/interfaces/TransactionItemHandlerDependencyInterface.d.ts +22 -22
  120. package/dist/types/src/internal.d.ts +128 -128
  121. package/dist/types/src/models/CachedQueryItem.d.ts +40 -40
  122. package/dist/types/src/models/CollectionEntry.d.ts +22 -22
  123. package/dist/types/src/models/CollectionOptions.d.ts +44 -44
  124. package/dist/types/src/models/CollectionResource.d.ts +87 -87
  125. package/dist/types/src/models/ItemEntry.d.ts +19 -19
  126. package/dist/types/src/models/ItemEntryOptions.d.ts +8 -8
  127. package/dist/types/src/models/ItemResource.d.ts +95 -95
  128. package/dist/types/src/models/Template.d.ts +11 -11
  129. package/dist/types/src/types/ItemTypesCollection.d.ts +361 -361
  130. package/dist/types/src/types/PromiseInterface.d.ts +2 -2
  131. package/dist/types/tests/integration/core.test.d.ts +1 -1
  132. package/dist/types/tests/integration/helpers/helpers.d.ts +32 -32
  133. package/dist/types/tests/integration/transactions/field_lookup.test.d.ts +1 -1
  134. package/dist/types/tests/integration/transactions/get_by.test.d.ts +1 -1
  135. package/dist/types/tests/integration/transactions/updates.test.d.ts +1 -1
  136. package/dist/types/tests/mocks/ApiMocked.d.ts +19 -19
  137. package/dist/types/tests/mocks/PromiseLibrary.mocked.d.ts +2 -2
  138. package/dist/types/tests/regression/RM4_17754.test.d.ts +1 -1
  139. package/dist/types/tests/regression/RM4_18216.test.d.ts +1 -1
  140. package/dist/types/tests/unit/query_contains_local_id_parser.test.d.ts +1 -1
  141. package/dist/types/tests/unit/query_linked_to_parser.test.d.ts +1 -1
  142. package/dist/types/tests/unit/query_matcher.test.d.ts +1 -1
  143. package/dist/types/tests/unit/query_parser_id_updater.test.d.ts +1 -1
  144. package/dist/types/tests/unit/query_service.test.d.ts +1 -1
  145. package/package.json +57 -57
  146. package/readme.md +16 -16
@@ -1,18 +1,18 @@
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 { ChangesDelta } from '../../ChangesDelta';
6
- import { BusinessLogicRule } from '../BusinessLogicRule';
7
- declare type ConditionResult = ItemId[];
8
- declare type DependencyColumns = ['width', 'height', 'oppervlakteartikel', 'nieuwprijs', 'inhuurprijs', 'verhuurprijs', 'naam'];
9
- declare type Dependency = ItemResource<ApiEnumItemType.Materiaal, DependencyColumns>[];
10
- export declare class SurfaceArticleSizeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
11
- protected apiFormatter: ApiFormatter;
12
- private locals;
13
- constructor(apiFormatter: ApiFormatter, locals: ApiModuleFunctionLocalsGetLocals);
14
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
15
- dependency(transaction: TransactionCache, materiaalIds: ConditionResult): Promise<Dependency>;
16
- apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, materiaalResources: Dependency): void;
17
- }
18
- 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 { ChangesDelta } from '../../ChangesDelta';
6
+ import { BusinessLogicRule } from '../BusinessLogicRule';
7
+ declare type ConditionResult = ItemId[];
8
+ declare type DependencyColumns = ['width', 'height', 'oppervlakteartikel', 'nieuwprijs', 'inhuurprijs', 'verhuurprijs', 'naam'];
9
+ declare type Dependency = ItemResource<ApiEnumItemType.Materiaal, DependencyColumns>[];
10
+ export declare class SurfaceArticleSizeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
11
+ protected apiFormatter: ApiFormatter;
12
+ private locals;
13
+ constructor(apiFormatter: ApiFormatter, locals: ApiModuleFunctionLocalsGetLocals);
14
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
15
+ dependency(transaction: TransactionCache, materiaalIds: ConditionResult): Promise<Dependency>;
16
+ apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, materiaalResources: Dependency): void;
17
+ }
18
+ export {};
@@ -1,25 +1,25 @@
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 { ChangesDelta } from '../../ChangesDelta';
7
- import { BusinessLogicRule } from '../BusinessLogicRule';
8
- declare type ConditionResult = {
9
- Offerte: ItemId[];
10
- Contract: ItemId[];
11
- };
12
- declare type Dependency = {
13
- Offerte: ItemResource<ApiEnumItemType.Offerte, ['vervaldatum']>[];
14
- Contract: ItemResource<ApiEnumItemType.Contract, ['vervaldatum']>[];
15
- State: ItemResource<ApiEnumItemType.State, ['geldigheidofferte']>;
16
- };
17
- export declare class OfferteContractDatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
18
- protected apiFormatter: ApiFormatter;
19
- private promiseLibrary;
20
- constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
21
- condition(changesDelta: ChangesDelta, transaction: TransactionCache): ConditionResult | undefined;
22
- dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
23
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
24
- }
25
- 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 { ChangesDelta } from '../../ChangesDelta';
7
+ import { BusinessLogicRule } from '../BusinessLogicRule';
8
+ declare type ConditionResult = {
9
+ Offerte: ItemId[];
10
+ Contract: ItemId[];
11
+ };
12
+ declare type Dependency = {
13
+ Offerte: ItemResource<ApiEnumItemType.Offerte, ['vervaldatum']>[];
14
+ Contract: ItemResource<ApiEnumItemType.Contract, ['vervaldatum']>[];
15
+ State: ItemResource<ApiEnumItemType.State, ['geldigheidofferte']>;
16
+ };
17
+ export declare class OfferteContractDatumBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
18
+ protected apiFormatter: ApiFormatter;
19
+ private promiseLibrary;
20
+ constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
21
+ condition(changesDelta: ChangesDelta, transaction: TransactionCache): ConditionResult | undefined;
22
+ dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
23
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
24
+ }
25
+ export {};
@@ -1,28 +1,28 @@
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 { ChangesDelta } from '../../ChangesDelta';
7
- import { BusinessLogicRule } from '../BusinessLogicRule';
8
- declare type ConditionResult = {
9
- Planningpersoneel: ItemId[];
10
- Planningtransport: ItemId[];
11
- };
12
- declare type Dependency = {
13
- Planningpersoneel: ItemResource<ApiEnumItemType.Planningpersoneel, ['vervoer', 'functie', 'planvan', 'plantot']>[];
14
- Planningtransport: ItemResource<ApiEnumItemType.Planningtransport, ['vervoer', 'functie', 'planvan', 'plantot']>[];
15
- Functie: {
16
- [functieId: string]: ItemResource<ApiEnumItemType.Functie, ['reistijd_vooraf', 'reistijd_achteraf']>;
17
- };
18
- };
19
- export declare class PlanningPersoneelTransportBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
20
- protected apiFormatter: ApiFormatter;
21
- private promiseLibrary;
22
- constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
23
- condition(changesDelta: ChangesDelta, transaction: TransactionCache): ConditionResult | undefined;
24
- dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
25
- apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
26
- private updatePlanningColumns;
27
- }
28
- 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 { ChangesDelta } from '../../ChangesDelta';
7
+ import { BusinessLogicRule } from '../BusinessLogicRule';
8
+ declare type ConditionResult = {
9
+ Planningpersoneel: ItemId[];
10
+ Planningtransport: ItemId[];
11
+ };
12
+ declare type Dependency = {
13
+ Planningpersoneel: ItemResource<ApiEnumItemType.Planningpersoneel, ['vervoer', 'functie', 'planvan', 'plantot']>[];
14
+ Planningtransport: ItemResource<ApiEnumItemType.Planningtransport, ['vervoer', 'functie', 'planvan', 'plantot']>[];
15
+ Functie: {
16
+ [functieId: string]: ItemResource<ApiEnumItemType.Functie, ['reistijd_vooraf', 'reistijd_achteraf']>;
17
+ };
18
+ };
19
+ export declare class PlanningPersoneelTransportBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
20
+ protected apiFormatter: ApiFormatter;
21
+ private promiseLibrary;
22
+ constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
23
+ condition(changesDelta: ChangesDelta, transaction: TransactionCache): ConditionResult | undefined;
24
+ dependency(transaction: TransactionCache, itemIdMap: ConditionResult): Promise<Dependency>;
25
+ apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, items: Dependency): void;
26
+ private updatePlanningColumns;
27
+ }
28
+ export {};
@@ -1,22 +1,22 @@
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 { ChangesDelta } from '../../ChangesDelta';
7
- import { BusinessLogicRule } from '../BusinessLogicRule';
8
- declare type ConditionResult = {
9
- [projectId: string]: ItemId;
10
- };
11
- declare type Dependency = {
12
- [projectId: string]: ItemResource<ApiEnumItemType.Contact, ['projectnotitie_naam', 'projectnotitie']>;
13
- };
14
- export declare class ProjectClientNoteBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
15
- protected apiFormatter: ApiFormatter;
16
- private promiseLibrary;
17
- constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
18
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
19
- dependency(transaction: TransactionCache, obj: ConditionResult): Promise<Dependency>;
20
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, obj: Dependency): Promise<void>;
21
- }
22
- 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 { ChangesDelta } from '../../ChangesDelta';
7
+ import { BusinessLogicRule } from '../BusinessLogicRule';
8
+ declare type ConditionResult = {
9
+ [projectId: string]: ItemId;
10
+ };
11
+ declare type Dependency = {
12
+ [projectId: string]: ItemResource<ApiEnumItemType.Contact, ['projectnotitie_naam', 'projectnotitie']>;
13
+ };
14
+ export declare class ProjectClientNoteBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
15
+ protected apiFormatter: ApiFormatter;
16
+ private promiseLibrary;
17
+ constructor(apiFormatter: ApiFormatter, promiseLibrary: PromiseLibraryInterface);
18
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
19
+ dependency(transaction: TransactionCache, obj: ConditionResult): Promise<Dependency>;
20
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, obj: Dependency): Promise<void>;
21
+ }
22
+ export {};
@@ -1,13 +1,13 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { ChangesDelta } from '../../ChangesDelta';
5
- import { BusinessLogicRule } from '../BusinessLogicRule';
6
- declare type ConditionResult = ItemId[];
7
- declare type Dependency = ItemResource<ApiEnumItemType.Reparatie, ['aantal']>[];
8
- export declare class ReparatiesExemplaarAantalBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
9
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
10
- dependency(transaction: TransactionCache, reparatieIds: ConditionResult): Promise<Dependency>;
11
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, reparatieResources: Dependency): void;
12
- }
13
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { ChangesDelta } from '../../ChangesDelta';
5
+ import { BusinessLogicRule } from '../BusinessLogicRule';
6
+ declare type ConditionResult = ItemId[];
7
+ declare type Dependency = ItemResource<ApiEnumItemType.Reparatie, ['aantal']>[];
8
+ export declare class ReparatiesExemplaarAantalBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
9
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
10
+ dependency(transaction: TransactionCache, reparatieIds: ConditionResult): Promise<Dependency>;
11
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, reparatieResources: Dependency): void;
12
+ }
13
+ export {};
@@ -1,23 +1,23 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemEntry } from '../../../models/ItemEntry';
3
- import { ItemResource } from '../../../models/ItemResource';
4
- import { ApiFormatter } from '../../ApiFormatter';
5
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
6
- import { ChangesDelta } from '../../ChangesDelta';
7
- import { BusinessLogicRule } from '../BusinessLogicRule';
8
- declare type ConditionResult = {
9
- entry: ItemEntry<ApiEnumItemType.Reparatie>;
10
- exemplaar: ItemId;
11
- }[];
12
- declare type Dependency = {
13
- entries: ItemEntry<ApiEnumItemType.Reparatie>[];
14
- exemplaarResources: ItemResource<ApiEnumItemType.Exemplaar, ['id', 'asset_location']>[];
15
- };
16
- export declare class ReparatiesExemplaarLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
17
- protected apiFormatter: ApiFormatter;
18
- constructor(apiFormatter: ApiFormatter);
19
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
20
- dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
21
- apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, dependency: Dependency): void;
22
- }
23
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemEntry } from '../../../models/ItemEntry';
3
+ import { ItemResource } from '../../../models/ItemResource';
4
+ import { ApiFormatter } from '../../ApiFormatter';
5
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
6
+ import { ChangesDelta } from '../../ChangesDelta';
7
+ import { BusinessLogicRule } from '../BusinessLogicRule';
8
+ declare type ConditionResult = {
9
+ entry: ItemEntry<ApiEnumItemType.Reparatie>;
10
+ exemplaar: ItemId;
11
+ }[];
12
+ declare type Dependency = {
13
+ entries: ItemEntry<ApiEnumItemType.Reparatie>[];
14
+ exemplaarResources: ItemResource<ApiEnumItemType.Exemplaar, ['id', 'asset_location']>[];
15
+ };
16
+ export declare class ReparatiesExemplaarLocationBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
17
+ protected apiFormatter: ApiFormatter;
18
+ constructor(apiFormatter: ApiFormatter);
19
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
20
+ dependency(transaction: TransactionCache, conditionResult: ConditionResult): Promise<Dependency>;
21
+ apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, dependency: Dependency): void;
22
+ }
23
+ export {};
@@ -1,17 +1,17 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { ChangesDelta } from '../../ChangesDelta';
5
- import { BusinessLogicRule } from '../BusinessLogicRule';
6
- declare type ConditionResult = ItemId[];
7
- declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_bestanden_downloaden']>[];
8
- /**
9
- * @description
10
- * If you have project access or can make quotations/contracts you should have permissions to download files
11
- */
12
- export declare class RolDocumentAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
- dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
- }
17
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { ChangesDelta } from '../../ChangesDelta';
5
+ import { BusinessLogicRule } from '../BusinessLogicRule';
6
+ declare type ConditionResult = ItemId[];
7
+ declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_bestanden_downloaden']>[];
8
+ /**
9
+ * @description
10
+ * If you have project access or can make quotations/contracts you should have permissions to download files
11
+ */
12
+ export declare class RolDocumentAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
+ dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
+ }
17
+ export {};
@@ -1,17 +1,17 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { ChangesDelta } from '../../ChangesDelta';
5
- import { BusinessLogicRule } from '../BusinessLogicRule';
6
- declare type ConditionResult = ItemId[];
7
- declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_eigen_medewerker_edit']>[];
8
- /**
9
- * @description
10
- * If you can access update crew data, you can also always update your own data
11
- */
12
- export declare class RolEditOwnDataBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
- dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
- }
17
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { ChangesDelta } from '../../ChangesDelta';
5
+ import { BusinessLogicRule } from '../BusinessLogicRule';
6
+ declare type ConditionResult = ItemId[];
7
+ declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['general_eigen_medewerker_edit']>[];
8
+ /**
9
+ * @description
10
+ * If you can access update crew data, you can also always update your own data
11
+ */
12
+ export declare class RolEditOwnDataBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
+ dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
+ }
17
+ export {};
@@ -1,17 +1,17 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { ChangesDelta } from '../../ChangesDelta';
5
- import { BusinessLogicRule } from '../BusinessLogicRule';
6
- declare type ConditionResult = ItemId[];
7
- declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['facturen_eigen', 'general_bestanden_downloaden', 'facturen_toegang', 'projecten_toegang']>[];
8
- /**
9
- * @description
10
- * If you have project access or can make invoices you should have permissions to download files, see invoices and edit invoices
11
- */
12
- export declare class RolFileAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
- dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
- apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
- }
17
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { ChangesDelta } from '../../ChangesDelta';
5
+ import { BusinessLogicRule } from '../BusinessLogicRule';
6
+ declare type ConditionResult = ItemId[];
7
+ declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['facturen_eigen', 'general_bestanden_downloaden', 'facturen_toegang', 'projecten_toegang']>[];
8
+ /**
9
+ * @description
10
+ * If you have project access or can make invoices you should have permissions to download files, see invoices and edit invoices
11
+ */
12
+ export declare class RolFileAccessBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
+ dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
+ apply(changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
+ }
17
+ export {};
@@ -1,17 +1,17 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { ChangesDelta } from '../../ChangesDelta';
5
- import { BusinessLogicRule } from '../BusinessLogicRule';
6
- declare type ConditionResult = ItemId[];
7
- declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['personeelsplanner_toegang']>[];
8
- /**
9
- * @description
10
- * If you can enter the crew planner you can also access projects
11
- */
12
- export declare class RolPersoneelsplannerToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
- dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
- }
17
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { ChangesDelta } from '../../ChangesDelta';
5
+ import { BusinessLogicRule } from '../BusinessLogicRule';
6
+ declare type ConditionResult = ItemId[];
7
+ declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['personeelsplanner_toegang']>[];
8
+ /**
9
+ * @description
10
+ * If you can enter the crew planner you can also access projects
11
+ */
12
+ export declare class RolPersoneelsplannerToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
+ dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
+ }
17
+ export {};
@@ -1,17 +1,17 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { ChangesDelta } from '../../ChangesDelta';
5
- import { BusinessLogicRule } from '../BusinessLogicRule';
6
- declare type ConditionResult = ItemId[];
7
- declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['materialen_tijdlijn']>[];
8
- /**
9
- * @description
10
- * If you can edit projects you should be able to see the equipment availability
11
- */
12
- export declare class RolProjectenBewerkenBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
- dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
- }
17
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { ChangesDelta } from '../../ChangesDelta';
5
+ import { BusinessLogicRule } from '../BusinessLogicRule';
6
+ declare type ConditionResult = ItemId[];
7
+ declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['materialen_tijdlijn']>[];
8
+ /**
9
+ * @description
10
+ * If you can edit projects you should be able to see the equipment availability
11
+ */
12
+ export declare class RolProjectenBewerkenBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
+ dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
+ }
17
+ export {};
@@ -1,17 +1,17 @@
1
- import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
- import { ItemResource } from '../../../models/ItemResource';
3
- import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
- import { ChangesDelta } from '../../ChangesDelta';
5
- import { BusinessLogicRule } from '../BusinessLogicRule';
6
- declare type ConditionResult = ItemId[];
7
- declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['uren_kosten']>[];
8
- /**
9
- * @description
10
- * If you have access to projects you should be able to make costs for registered hours
11
- */
12
- export declare class RolProjectenToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
- condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
- dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
- apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
- }
17
- export {};
1
+ import { ApiEnumItemType, ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { ChangesDelta } from '../../ChangesDelta';
5
+ import { BusinessLogicRule } from '../BusinessLogicRule';
6
+ declare type ConditionResult = ItemId[];
7
+ declare type Dependency = ItemResource<ApiEnumItemType.Rol, ['uren_kosten']>[];
8
+ /**
9
+ * @description
10
+ * If you have access to projects you should be able to make costs for registered hours
11
+ */
12
+ export declare class RolProjectenToegangBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
13
+ condition(changesDelta: ChangesDelta): ConditionResult | undefined;
14
+ dependency(transaction: TransactionCache, rolIds: ConditionResult): Promise<Dependency>;
15
+ apply(_changesDelta: ChangesDelta, destinationChangesDelta: ChangesDelta, rolResources: Dependency): void;
16
+ }
17
+ export {};