@rentman/rm-core 63.0.2 → 63.2.0-RM4-45884

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.
@@ -4,7 +4,7 @@ import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
4
4
  import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
5
5
  import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
6
6
  import { LatestItem } from '../BusinessLogicRuleContextBase';
7
- declare const materiaalColumns: readonly ["id", "type", "is_combination", "is_physical"];
7
+ declare const materiaalColumns: readonly ["id", "type", "is_combination", "is_physical", "telexemplaren", "verhuur"];
8
8
  type ConditionResult = ChangesDeltaItemCreateDelta<'Setinhoud'>[];
9
9
  type Dependency = Record<string, LatestItem<'Materiaal', typeof materiaalColumns>>;
10
10
  /**
@@ -0,0 +1,27 @@
1
+ import { ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
5
+ import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
6
+ import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
7
+ declare const taakColumns: readonly [{
8
+ readonly deadline_relative_time_period: readonly ["tot", "van"];
9
+ }, "deadline_type", "deadline_relative_offset_amount", "deadline_relative_offset_base", "deadline_relative_offset_direction", "deadline_relative_offset_unit"];
10
+ declare const tijdColumns: readonly ["tot", "van"];
11
+ type ConditionResult = ItemId[];
12
+ type Dependency = {
13
+ taakResources: ItemResource<'Taak', typeof taakColumns>[];
14
+ tijdResources: ItemResource<'Tijd', typeof tijdColumns>[];
15
+ };
16
+ /**
17
+ * @description
18
+ * When the fields used to calculate relative deadline change,
19
+ * apply offsets to recalculate the deadline field
20
+ */
21
+ export declare class TaakDeadlineOffsetBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
22
+ condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
23
+ dependency(transaction: TransactionCache, taakIds: ConditionResult): Promise<Dependency>;
24
+ apply(context: BusinessLogicRuleApplyContext, { taakResources, }: Dependency): void;
25
+ calculateTaskTimeWithOffset(context: BusinessLogicRuleApplyContext, selectedDateWithoutOffset: moment.Moment, taskResource: ItemResource<'Taak', any>): moment.Moment;
26
+ }
27
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ItemId } from '@rentman/backend-types';
2
+ import { ItemResource } from '../../../models/ItemResource';
3
+ import { TransactionCache } from '../../cache/transaction/TransactionCache';
4
+ import { BLR_SKIP_RULE, BusinessLogicRule } from '../BusinessLogicRule';
5
+ import { BusinessLogicRuleApplyContext } from '../BusinessLogicRuleApplyContext';
6
+ import { BusinessLogicRuleConditionContext } from '../BusinessLogicRuleConditionContext';
7
+ declare const taakColumns: readonly ["deadline_type", "deadline_relative_time_period", "deadline_relative_offset_amount", "deadline_relative_offset_base", "deadline_relative_offset_direction", "deadline_relative_offset_unit"];
8
+ type ConditionResult = ItemId[];
9
+ type Dependency = ItemResource<'Taak', typeof taakColumns>[];
10
+ /**
11
+ * @description
12
+ * When the 'deadline_type' field changes to 'absolute', reset the relative deadline fields
13
+ * so that they do not contain stale values.
14
+ */
15
+ export declare class TaakDeadlineTypeBusinessLogicRule extends BusinessLogicRule<ConditionResult, Dependency> {
16
+ condition(context: BusinessLogicRuleConditionContext): ConditionResult | typeof BLR_SKIP_RULE;
17
+ dependency(transaction: TransactionCache, taakIds: ConditionResult): Promise<Dependency>;
18
+ apply(context: BusinessLogicRuleApplyContext, taakResources: Dependency): void;
19
+ }
20
+ export {};
@@ -61,6 +61,8 @@ import { SetinhoudUpdateFixedBusinessLogicRule } from './Setinhoud/SetinhoudUpda
61
61
  import { SubprojectInPlanningBusinessLogicRule } from './Subproject/SubprojectInPlanningBusinessLogicRule';
62
62
  import { SubprojectOneSubLocationAlignBusinessLogicRule } from './Subproject/SubprojectOneSubLocationAlignBusinessRule';
63
63
  import { SubprojectOneSubNameAlignBusinessLogicRule } from './Subproject/SubprojectOneSubNameAlignBusinessRule';
64
+ import { TaakDeadlineTypeBusinessLogicRule } from './Taak/TaakDeadlineTypeBusinessLogicRule';
65
+ import { TaakDeadlineOffsetBusinessLogicRule } from './Taak/TaakDeadlineOffsetBusinessLogicRule';
64
66
  import { TijdNameChangedBusinessLogicRule } from './Tijd/TijdNameChangedBusinessLogicRule';
65
67
  import { TijdSubprojectChangedBusinessLogicRule } from './Tijd/TijdSubprojectChangedBusinessLogicRule';
66
- export declare const registeredBusinessLogicRules: readonly [typeof DefaultContactPersonUpdateBusinessLogicRule, typeof ContactAddressBusinessLogicRule, typeof CustomFieldLinkedItemTypeBusinessLogicRule, typeof CustomFieldTypeBusinessLogicRule, typeof DocumentTemplateBusinessLogicRule, typeof ExemplaarAanschafdatumBusinessLogicRule, typeof ExemplaarBarcodeDeleteBusinessLogicRule, typeof FactuurBetalingsconditieBusinessLogicRule, typeof FactuurDatumBusinessLogicRule, typeof FactuurNumberseriesBusinessLogicRule, typeof FilesNameExtensionBusinessLogicRule, typeof FunctieNaaminternBusinessLogicRule, typeof FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof InhuurmateriaalAantalBusinessLogicRule, typeof MateriaalIsCombinationBusinessLogicRule, typeof MateriaalIsPhysicalCombinationBulkBusinessLogicRule, typeof MateriaalToVirtualBusinessLogicRule, typeof MateriaalToPhysicalBusinessLogicRule, typeof MateriaalBulkToSerialBusinessLogicRule, typeof MateriaalSerialToBulkBusinessLogicRule, typeof MateriaalTypePropertiesBusinessLogicRule, typeof MateriaalVerhuurBusinessLogicRule, typeof SurfaceArticleSizeBusinessLogicRule, typeof LinkedTimeItemDurationBusinessLogicRule, typeof LinkedTimeItemTimeSchemeBusinessLogicRule, typeof LinkedTimeItemTimeSchemeStartBusinessLogicRule, typeof LinkedTimeItemTimeValueStartBusinessLogicRule, typeof LinkedTimeItemSubprojectBusinessLogicRule, typeof LinkedTimeItemMateriaalCatBusinessLogicRule, typeof OfferteContractDatumBusinessLogicRule, typeof PlanningmateriaalAantalBusinessLogicRule, typeof PlanningmateriaalAantaltotaalBusinessLogicRule, typeof PlanningmateriaalOptieBusinessLogicRule, typeof PlanningmateriaalParentBusinessLogicRule, typeof PlanningmateriaalStaysAtLocationBusinessLogicRule, typeof PlanningPersoneelTransportBusinessLogicRule, typeof ProjectClientChangedBusinessLogicRule, typeof ProjectContactProjectNoteBusinessLogicRule, typeof ProjectOneSubLocationAlignBusinessLogicRule, typeof ProjectSubprojectDefaultTimeBusinessLogicRule, typeof PurchaseOrderOwnerBusinessLogicRule, typeof PurchaseOrderApprovalStatusBusinessLogicRule, typeof RateUpdatedBusinessLogicRule, typeof ReparatiesExemplaarAantalBusinessLogicRule, typeof ReparatieLostItemExemplaarLocationBusinessLogicRule, typeof RolEditOwnDataBusinessLogicRule, typeof RolFileAccessBusinessLogicRule, typeof RolPersoneelsplannerToegangBusinessLogicRule, typeof RolProjectenBewerkenBusinessLogicRule, typeof RolProjectenToegangBusinessLogicRule, typeof RolVisibilityFinancialsBusinessLogicRule, typeof RolWarehouseTrackingLogAccessBusinessLogicRule, typeof RolPurchaseOrderAttachPlanningBusinessLogicRule, typeof SetinhoudCreateFixedBusinessLogicRule, typeof SetinhoudUpdateFixedBusinessLogicRule, typeof SubprojectOneSubLocationAlignBusinessLogicRule, typeof SubprojectOneSubNameAlignBusinessLogicRule, typeof SubprojectInPlanningBusinessLogicRule, typeof TijdSubprojectChangedBusinessLogicRule, typeof TijdNameChangedBusinessLogicRule, typeof AfspraakRecureindBusinessLogicRule, typeof BeschikbaarheidRecureindBusinessLogicRule];
68
+ export declare const registeredBusinessLogicRules: readonly [typeof DefaultContactPersonUpdateBusinessLogicRule, typeof ContactAddressBusinessLogicRule, typeof CustomFieldLinkedItemTypeBusinessLogicRule, typeof CustomFieldTypeBusinessLogicRule, typeof DocumentTemplateBusinessLogicRule, typeof ExemplaarAanschafdatumBusinessLogicRule, typeof ExemplaarBarcodeDeleteBusinessLogicRule, typeof FactuurBetalingsconditieBusinessLogicRule, typeof FactuurDatumBusinessLogicRule, typeof FactuurNumberseriesBusinessLogicRule, typeof FilesNameExtensionBusinessLogicRule, typeof FunctieNaaminternBusinessLogicRule, typeof FunctieTwowayBusinessLogicRule, typeof FunctieRecureindBusinessLogicRule, typeof FunctiegroepSubprojectBusinessLogicRule, typeof InhuurmateriaalAantaltotaalBusinessLogicRule, typeof InhuurmateriaalAantalBusinessLogicRule, typeof MateriaalIsCombinationBusinessLogicRule, typeof MateriaalIsPhysicalCombinationBulkBusinessLogicRule, typeof MateriaalToVirtualBusinessLogicRule, typeof MateriaalToPhysicalBusinessLogicRule, typeof MateriaalBulkToSerialBusinessLogicRule, typeof MateriaalSerialToBulkBusinessLogicRule, typeof MateriaalTypePropertiesBusinessLogicRule, typeof MateriaalVerhuurBusinessLogicRule, typeof SurfaceArticleSizeBusinessLogicRule, typeof LinkedTimeItemDurationBusinessLogicRule, typeof LinkedTimeItemTimeSchemeBusinessLogicRule, typeof LinkedTimeItemTimeSchemeStartBusinessLogicRule, typeof LinkedTimeItemTimeValueStartBusinessLogicRule, typeof LinkedTimeItemSubprojectBusinessLogicRule, typeof LinkedTimeItemMateriaalCatBusinessLogicRule, typeof OfferteContractDatumBusinessLogicRule, typeof PlanningmateriaalAantalBusinessLogicRule, typeof PlanningmateriaalAantaltotaalBusinessLogicRule, typeof PlanningmateriaalOptieBusinessLogicRule, typeof PlanningmateriaalParentBusinessLogicRule, typeof PlanningmateriaalStaysAtLocationBusinessLogicRule, typeof PlanningPersoneelTransportBusinessLogicRule, typeof ProjectClientChangedBusinessLogicRule, typeof ProjectContactProjectNoteBusinessLogicRule, typeof ProjectOneSubLocationAlignBusinessLogicRule, typeof ProjectSubprojectDefaultTimeBusinessLogicRule, typeof PurchaseOrderOwnerBusinessLogicRule, typeof PurchaseOrderApprovalStatusBusinessLogicRule, typeof RateUpdatedBusinessLogicRule, typeof ReparatiesExemplaarAantalBusinessLogicRule, typeof ReparatieLostItemExemplaarLocationBusinessLogicRule, typeof RolEditOwnDataBusinessLogicRule, typeof RolFileAccessBusinessLogicRule, typeof RolPersoneelsplannerToegangBusinessLogicRule, typeof RolProjectenBewerkenBusinessLogicRule, typeof RolProjectenToegangBusinessLogicRule, typeof RolVisibilityFinancialsBusinessLogicRule, typeof RolWarehouseTrackingLogAccessBusinessLogicRule, typeof RolPurchaseOrderAttachPlanningBusinessLogicRule, typeof SetinhoudCreateFixedBusinessLogicRule, typeof SetinhoudUpdateFixedBusinessLogicRule, typeof SubprojectOneSubLocationAlignBusinessLogicRule, typeof SubprojectOneSubNameAlignBusinessLogicRule, typeof SubprojectInPlanningBusinessLogicRule, typeof TaakDeadlineTypeBusinessLogicRule, typeof TaakDeadlineOffsetBusinessLogicRule, typeof TijdSubprojectChangedBusinessLogicRule, typeof TijdNameChangedBusinessLogicRule, typeof AfspraakRecureindBusinessLogicRule, typeof BeschikbaarheidRecureindBusinessLogicRule];
@@ -12,6 +12,9 @@ export declare class LockService {
12
12
  private promises;
13
13
  constructor(apiRequestService: ApiRequestService);
14
14
  getLocksSignal(): Signal<ItemMap<LockToken>>;
15
+ /**
16
+ * @deprecated use getLocksSignal instead
17
+ */
15
18
  getLocks(): ItemMap<LockToken>;
16
19
  hasLock(lockTokenId: ItemId): boolean;
17
20
  isLocked(itemEntry: ItemEntry): boolean;
@@ -21,7 +21,7 @@ export interface CachedQueryItemsItemTypeTuple<ItemTypeType extends ApiItemType>
21
21
  export interface CachedQueryHandlerCollectionTuple<ItemTypeType extends ApiItemType> {
22
22
  cachedQueryItem?: CachedQueryItem<ItemTypeType>;
23
23
  }
24
- type RequireOnly<ObjectType, Keys extends keyof ObjectType> = ObjectType & {
24
+ export type RequireOnly<ObjectType, Keys extends keyof ObjectType> = ObjectType & {
25
25
  [Key in Keys]-?: ObjectType[Key];
26
26
  };
27
27
  export declare abstract class CachedQueryHandlerBase {
@@ -135,11 +135,10 @@ export declare abstract class CachedQueryHandlerBase {
135
135
  * @param changesDelta - When doing a back-end request for `maybeMatchedItemEntries`, the resulting item IDs are
136
136
  * stored in this changes delta.
137
137
  */
138
- protected processMaybeMatches<ItemTypeType extends ApiItemType>(itemType: ItemTypeType, queryString: string, matchingResultsTuple: RequireOnly<MatchingResultsAccumulatorTuple<any>, 'maybe'>, changesDelta: ChangesDeltaBase): Promise<void>;
138
+ protected abstract processMaybeMatches<ItemTypeType extends ApiItemType>(itemType: ItemTypeType, queryString: string, matchingResultsTuple: RequireOnly<MatchingResultsAccumulatorTuple<any>, 'maybe'>, changesDelta: ChangesDeltaBase): void | Promise<void>;
139
139
  /**
140
140
  * Every time a cached query item is created, either 'resolve' or 'reject' has to be called on the cached query item.
141
141
  */
142
142
  protected constructCachedQuery<ItemTypeType extends ApiItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery<ItemTypeType>, itemEntries: ItemEntry<ItemTypeType>[], requestColumnsTuple: RequestColumnsTuple<ItemTypeType>, queryGraph?: RootQueryNode<ItemTypeType>): CachedQueryItem<ItemTypeType>;
143
143
  private createQueryGraph;
144
144
  }
145
- export {};
@@ -1,6 +1,6 @@
1
1
  import { ApiItemType } from '@rentman/backend-types';
2
2
  import { GraphQueryParserFactory } from '../../../factories/GraphQueryParserFactory';
3
- import { ApiRequestService, CachedQueryHandlerBase, CachedQueryItem, CachedQueryOptions, CollectionQuery, CollectionResource, ErrorHandlerInterface, LinkCollectionBatchQueryTuple, LinkTreeServiceInterface, QueryService, RequestColumnExpansionFactory, RequestColumnsOperationsCache, RequestColumnsOperationsCacheFactory, ServerCache } from '../../../internal';
3
+ import { ApiRequestService, CachedQueryHandlerBase, CachedQueryItem, CachedQueryOptions, CollectionQuery, CollectionResource, ErrorHandlerInterface, LinkCollectionBatchQueryTuple, LinkTreeServiceInterface, MatchingResultsAccumulatorTuple, QueryService, RequestColumnExpansionFactory, RequestColumnsOperationsCache, RequestColumnsOperationsCacheFactory, RequireOnly, ServerCache } from '../../../internal';
4
4
  export declare class ServerCachedQueryHandler extends CachedQueryHandlerBase {
5
5
  protected transaction: ServerCache;
6
6
  constructor(dependencies: {
@@ -26,4 +26,5 @@ export declare class ServerCachedQueryHandler extends CachedQueryHandlerBase {
26
26
  * Will create a new {@link CollectionEntry CollectionEntry} if the CollectionEntry didn't exist yet
27
27
  */
28
28
  __fetchItemEntriesByQueryData<const ItemTypeType extends ApiItemType>(itemType: ItemTypeType, options: CachedQueryOptions<ItemTypeType>, columnsOperationsCache: RequestColumnsOperationsCache<ItemTypeType>, collectionQuery: CollectionQuery<ItemTypeType>, linkCollectionBatchQueryTuple?: LinkCollectionBatchQueryTuple<ItemTypeType>): Promise<CachedQueryItem<ItemTypeType>>;
29
+ protected processMaybeMatches<ItemTypeType extends ApiItemType>(itemType: ItemTypeType, queryString: string, matchingResultsTuple: RequireOnly<MatchingResultsAccumulatorTuple<any>, 'maybe'>): void;
29
30
  }
@@ -107,11 +107,15 @@ export declare class TransactionCache extends AbstractCache {
107
107
  */
108
108
  id?: string | undefined, validatorFactory?: TransactionValidatorFactory, options?: Partial<TransactionOptions>);
109
109
  /**
110
+ * @deprecated use rootItemSignal instead
111
+ *
110
112
  * @description
111
113
  * Stores the 'root' {@link ItemEntry ItemEntry}, this {@link ItemEntry ItemEntry} can be used as request parent to store the whole transaction at once
112
114
  */
113
115
  get rootItem(): ItemEntry | undefined;
114
116
  /**
117
+ * @deprecated use hasChangesSignal instead
118
+ *
115
119
  * @description
116
120
  * Is true when the current transaction has:
117
121
  * - Newly created items
@@ -120,18 +124,27 @@ export declare class TransactionCache extends AbstractCache {
120
124
  */
121
125
  get hasChanges(): boolean;
122
126
  /**
127
+ * @deprecated use isSavingSignal instead
128
+ *
123
129
  * @description
124
130
  * Is true while the {@link TransactionCache TransactionCache} is applying changes to the parent (can either be through a merge or an Api save)
125
131
  */
126
132
  get isSaving(): boolean;
127
133
  /**
134
+ * @deprecated use isReadySignal instead
135
+ *
128
136
  * @description
129
137
  * Is true while the {@link TransactionCache TransactionCache} is ready to handle new saves
130
138
  */
131
139
  get isReady(): boolean;
140
+ /**
141
+ * @deprecated use isValidSignal instead
142
+ */
132
143
  get isValid(): boolean;
133
144
  attachValidator(validator: TransactionValidatorWithDependencies<any>): void;
134
145
  /**
146
+ * @deprecated use isPendingSignal instead
147
+ *
135
148
  * @description
136
149
  * Checks if the transaction is pending (or saving) on itself and on all of its children recursively
137
150
  * This can be used to block a transaction if one of the children is still loading (for instance for a file upload)
@@ -146,6 +159,9 @@ export declare class TransactionCache extends AbstractCache {
146
159
  setPending(promise: Promise<any>): Promise<any>;
147
160
  createChild(id?: string, validatorFactory?: TransactionValidatorFactory, options?: TransactionOptions): TransactionCache;
148
161
  destroy(): void;
162
+ /**
163
+ * @deprecated use isDestroyedSignal instead
164
+ */
149
165
  isDestroyed(): boolean;
150
166
  expandCollectionResource<ItemTypeType extends ApiItemType>(collectionResource: CollectionResource<ItemTypeType>, newColumns: ApiRequestColumns<ItemTypeType>): Promise<CollectionResource<ItemTypeType>>;
151
167
  /**
@@ -156,6 +172,9 @@ export declare class TransactionCache extends AbstractCache {
156
172
  expandCollectionResources<const ItemTypeType extends ApiItemType, CollectionResourceType extends CollectionResource<ItemTypeType, any, any>>(itemType: ItemTypeType, collections: ParentIdMap<CollectionResourceType>, newColumns: ApiRequestColumnArray<ItemTypeType>): Promise<ParentIdMap<CollectionResourceType>>;
157
173
  registerFieldChangeCallback<const ItemTypeType extends ApiItemType>(itemType: ItemTypeType, itemId: ItemId, callback: ItemChangesListener<ItemTypeType>): DeregFunction;
158
174
  createChangesDelta(logMissingColumnErrors?: boolean): ChangesDelta;
175
+ /**
176
+ * @deprecated use firstErrorString instead
177
+ */
159
178
  getFirstErrorString(): undefined | string;
160
179
  /**
161
180
  * @description
@@ -1,5 +1,5 @@
1
1
  import { ApiItemType, ItemId } from '@rentman/backend-types';
2
- import { ApiQuery, CachedQueryHandlerBase, CachedQueryHandlerCollectionTuple, CachedQueryItem, CachedQueryItemsItemTypeTuple, CachedQueryItemTuple, CachedQueryOptions, ChildCollectionsOption, CollectionItemResourceChanges, CollectionOptions, CollectionQuery, CollectionResource, EntryParent, ItemIdConversionMap, LinkCollectionBatchQueryTuple, MatchesAccumulatorMap, MatchingResultsAccumulatorMapType, ParentCachedQueryItemTuple, RequestColumnsOperationsCache, TransactionCache, TransactionCollectionHandlerDependencyInterface } from '../../../internal';
2
+ import { ApiQuery, CachedQueryHandlerBase, CachedQueryHandlerCollectionTuple, CachedQueryItem, CachedQueryItemsItemTypeTuple, CachedQueryItemTuple, CachedQueryOptions, ChangesDeltaBase, ChildCollectionsOption, CollectionItemResourceChanges, CollectionOptions, CollectionQuery, CollectionResource, EntryParent, ItemIdConversionMap, LinkCollectionBatchQueryTuple, MatchesAccumulatorMap, MatchingResultsAccumulatorMapType, MatchingResultsAccumulatorTuple, ParentCachedQueryItemTuple, RequestColumnsOperationsCache, RequireOnly, TransactionCache, TransactionCollectionHandlerDependencyInterface } from '../../../internal';
3
3
  import { RootQueryNode } from '../../matcher/RootQueryNode';
4
4
  export interface LinkCollectionOptionsItemTypeTuple<ItemTypeType extends ApiItemType> {
5
5
  itemType: ItemTypeType;
@@ -87,6 +87,7 @@ export declare class TransactionCachedQueryHandler extends CachedQueryHandlerBas
87
87
  protected clearCollectionTupleIfEmpty<ItemTypeType extends ApiItemType>(itemType: ItemTypeType, queryString: string, didAlreadyClearResourceRefs?: boolean): void;
88
88
  protected getQueryGraphsForItemType<ItemTypeType extends ApiItemType>(itemType: ItemTypeType): Set<RootQueryNode<ItemTypeType>>;
89
89
  protected getCollectionQueries<ItemTypeType extends ApiItemType>(itemType: ItemTypeType, queryString: string): Set<CollectionQuery<ItemTypeType>>;
90
+ protected processMaybeMatches<ItemTypeType extends ApiItemType>(itemType: ItemTypeType, queryString: string, matchingResultsTuple: RequireOnly<MatchingResultsAccumulatorTuple<any>, 'maybe'>, changesDelta: ChangesDeltaBase): Promise<void>;
90
91
  private getCollectionResourcesByTuple;
91
92
  private updateQueryLocalItemIdReferences;
92
93
  /**
@@ -6,6 +6,8 @@ export declare abstract class TransactionValidatorBase {
6
6
  protected _lastCallId: number;
7
7
  constructor(transaction: TransactionCache);
8
8
  /**
9
+ * @deprecated use isPendingSignal instead
10
+ *
9
11
  * @description
10
12
  * Will return `true` if there are any validators pending
11
13
  */
@@ -45,6 +45,9 @@ export declare class CollectionResource<ItemTypeType extends ApiItemType, Reques
45
45
  readonly itemType: ItemTypeType;
46
46
  readonly entry: CollectionEntry<ItemTypeType>;
47
47
  readonly columns: ResponseColumnItemTypeMap;
48
+ /**
49
+ * @deprecated Use itemsSignal instead
50
+ */
48
51
  items: ItemResource<ItemTypeType, RequestColumns, Children>[];
49
52
  readonly itemsSignal: WritableSignal<ItemResource<ItemTypeType, RequestColumns, Children>[]>;
50
53
  parentItem: ItemResource<any, any, any> | null;
@@ -2,13 +2,19 @@ import { ApiItemType, ItemId } from '@rentman/backend-types';
2
2
  import { ColumnSet } from '../internal';
3
3
  export declare class ItemEntry<ItemTypeType extends ApiItemType = any> {
4
4
  itemType: ItemTypeType;
5
- itemId: ItemId;
6
5
  columns: ColumnSet<ItemTypeType>;
7
6
  private static currentId;
8
7
  id: number;
9
8
  isLockableSignal: import("@angular/core").WritableSignal<boolean>;
10
9
  isLocalSignal: import("@angular/core").WritableSignal<boolean>;
11
10
  private outdated;
11
+ /**
12
+ * Use {@link updateId} to set this value
13
+ *
14
+ * This is necessary to support the signals based on this value.
15
+ */
16
+ get itemId(): ItemId;
17
+ private _itemId;
12
18
  constructor(itemType: ItemTypeType, itemId: ItemId, columns: ColumnSet<ItemTypeType>);
13
19
  updateId(newItemId: number): void;
14
20
  isOutdated(): boolean;
@@ -24,6 +24,9 @@ export declare class ItemResource<ItemTypeType extends ApiItemType = ApiItemType
24
24
  readonly transaction: TransactionCache;
25
25
  private readonly _isNew;
26
26
  columns: ResponseColumnMap<ItemTypeType, RequestToItemColumns<ItemTypeType, RequestColumns>>;
27
+ /**
28
+ * @deprecated Use fieldSignals instead
29
+ */
27
30
  fields: Readonly<RequestColumnsFieldMap<ItemTypeType, RequestColumns>>;
28
31
  initial: Readonly<RequestColumnsFieldMap<ItemTypeType, RequestColumns>>;
29
32
  fieldSignals: Readonly<RequestColumnsSignalFieldMap<ItemTypeType, RequestColumns>>;
@@ -100,6 +103,9 @@ export declare class ItemResource<ItemTypeType extends ApiItemType = ApiItemType
100
103
  * 'isNew' means that the {@link ItemEntry ItemEntry} is a local item and that this resource was created when the {@link ItemEntry ItemEntry} was first created
101
104
  */
102
105
  isNew(): boolean;
106
+ /**
107
+ * @deprecated use `entry.isLocalSignal` instead
108
+ */
103
109
  isLocal(): boolean;
104
110
  toJSON(): {
105
111
  columns: string[];
@@ -109,6 +115,8 @@ export declare class ItemResource<ItemTypeType extends ApiItemType = ApiItemType
109
115
  getDerivedSignal<const T extends RequestColumnsToDerivedStringPaths<RequestColumns>, DefaultValue = unknown>(pathInput: T, defaultValue?: DefaultValue): Signal<MaybeDefaultValue<ResolveDerivedValue<ItemTypeType, DerivedStringToRequestColumnPath<T>>, DefaultValue>>;
110
116
  getDerivedSignal<const T extends RequestColumnsToDerivedArrayPaths<RequestColumns>, DefaultValue = unknown>(pathInput: T, defaultValue?: DefaultValue): Signal<MaybeDefaultValue<ResolveDerivedValue<ItemTypeType, T>, DefaultValue>>;
111
117
  /**
118
+ * @deprecated Use getDerivedSignal instead
119
+ *
112
120
  * @description
113
121
  * Returns the value of the columnPath, or undefined when the path couldn't be traversed
114
122
  *
@@ -117,6 +125,8 @@ export declare class ItemResource<ItemTypeType extends ApiItemType = ApiItemType
117
125
  getDerivedValue<const T extends RequestColumnsToDerivedStringPaths<RequestColumns>, DefaultValue = unknown>(columnPath: T, defaultValue?: DefaultValue): MaybeDefaultValue<ResolveDerivedValue<ItemTypeType, DerivedStringToRequestColumnPath<T>>, DefaultValue>;
118
126
  getDerivedValue<const T extends RequestColumnsToDerivedArrayPaths<RequestColumns>, DefaultValue = unknown>(columnPath: T, defaultValue?: DefaultValue): MaybeDefaultValue<ResolveDerivedValue<ItemTypeType, T>, DefaultValue>;
119
127
  /**
128
+ * @deprecated Use signal version instead
129
+ *
120
130
  * @description
121
131
  * Traverses the column path and returns the fields of the derived item, returns undefined if the item isn't found
122
132
  *
@@ -114,6 +114,14 @@ export interface SocketMessageBase {
114
114
  messageType: string;
115
115
  inResponse: boolean;
116
116
  }
117
+ export interface SocketMessageMassUpdate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
118
+ messageType: 'event';
119
+ body: {
120
+ itemType: ItemTypeType;
121
+ eventType: 'massUpdate';
122
+ items: Pick<SocketUpdatedItems, ItemTypeType>;
123
+ };
124
+ }
117
125
  export interface SocketMessageCreate<ItemTypeType extends ApiItemType> extends SocketMessageBase {
118
126
  messageType: 'event';
119
127
  body: {
@@ -155,7 +163,7 @@ export type SocketMessageValuesTuple<ItemTypeType extends ApiItemType, ColumnIds
155
163
  parent: EntryParent | null;
156
164
  values: FieldMap<ItemTypeType, ColumnIds>;
157
165
  };
158
- export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete;
166
+ export type SocketMessage<ItemTypeType extends ApiItemType> = SocketMessageCreate<ItemTypeType> | SocketMessageUpdate<ItemTypeType> | SocketMessageLinkTo<ItemTypeType> | SocketMessageDelete | SocketMessageMassUpdate<ItemTypeType>;
159
167
  export type ItemResourcesItemTypeMap = {
160
168
  [ItemTypeType in ApiItemType]?: ItemResource<ItemTypeType>[];
161
169
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentman/rm-core",
3
- "version": "63.0.2",
3
+ "version": "63.2.0-RM4-45884",
4
4
  "description": "Rentman core functionalities",
5
5
  "main": "./dist/rm-core.js",
6
6
  "types": "./dist/types/src/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@angular/core": "^20",
37
- "@rentman/backend-types": ">=4.818.0-28-gc3d424afbb",
37
+ "@rentman/backend-types": "4.833.1-55-g225f90b238",
38
38
  "moment": "^2.30.1",
39
39
  "rxjs": "^7"
40
40
  },