@rentman/rm-core 10.0.3 → 10.0.5
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.
|
@@ -36,8 +36,10 @@ export declare class ApiFormatter {
|
|
|
36
36
|
*
|
|
37
37
|
* We have to check the parent transaction because on a child transaction initial/modified can be equal (the copied field of the parent)
|
|
38
38
|
* and will then incorrectly be overwritten by applyChangesFromParent
|
|
39
|
+
*
|
|
40
|
+
* Note: parentChanges can be undefined for local items
|
|
39
41
|
*/
|
|
40
|
-
mergeCopyFields<ItemTypeType extends ApiEnumItemType, ColumnIds extends ItemTypeColumnIds<ItemTypeType> = any>(parentChanges: FieldMap<ItemTypeType, ColumnIds
|
|
42
|
+
mergeCopyFields<ItemTypeType extends ApiEnumItemType, ColumnIds extends ItemTypeColumnIds<ItemTypeType> = any>(parentChanges: FieldMap<ItemTypeType, ColumnIds> | undefined, changes: FieldMap<ItemTypeType, ColumnIds>, initial: FieldMap<ItemTypeType, ColumnIds>, newInitial: FieldMap<ItemTypeType, ColumnIds>, columns: ColumnInfo<ItemTypeType>[]): FieldMap<ItemTypeType, ColumnIds>;
|
|
41
43
|
formatRequest<ItemTypeType extends ApiEnumItemType>(initial: FieldMap<ItemTypeType>, modified: FieldMap<ItemTypeType>, columns: ColumnInfo<ItemTypeType>[]): {
|
|
42
44
|
[columnId: string]: any;
|
|
43
45
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiEnumItemType, ApiFields, ItemId } from '@rentman/backend-types';
|
|
2
|
-
import { ApiFormatter, ChangesDeltaBase, ColumnSet, CreatedChangesDelta, EntryParent, EntryParentNull, ErrorHandlerInterface, FieldMap, ItemCreateService, ItemEntry, ItemEntryService, PromiseInterface } from '../internal';
|
|
2
|
+
import { ApiFormatter, ChangesDeltaBase, ColumnExpansionResult, ColumnSet, CreatedChangesDelta, EntryParent, EntryParentNull, ErrorHandlerInterface, FieldMap, ItemCreateService, ItemEntry, ItemEntryService, PromiseInterface } from '../internal';
|
|
3
3
|
export declare type ChangesDeltaItemDeleteDelta = ItemEntry;
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
@@ -17,7 +17,9 @@ export declare class ChangesDelta extends ChangesDeltaBase {
|
|
|
17
17
|
private itemCreateService;
|
|
18
18
|
created: CreatedChangesDelta;
|
|
19
19
|
deleted: {
|
|
20
|
-
[itemType: string]:
|
|
20
|
+
[itemType: string]: {
|
|
21
|
+
[entryId: string]: ChangesDeltaItemDeleteDelta;
|
|
22
|
+
};
|
|
21
23
|
};
|
|
22
24
|
constructor(errorHandler: ErrorHandlerInterface, itemCreateService: ItemCreateService, itemEntryService: ItemEntryService, apiFormatter: ApiFormatter);
|
|
23
25
|
merge(otherChangesDelta: ChangesDelta): ChangesDelta;
|
|
@@ -30,6 +32,7 @@ export declare class ChangesDelta extends ChangesDeltaBase {
|
|
|
30
32
|
* - If you want to set a parent set the proper field, you can't pass it as a separate object
|
|
31
33
|
*/
|
|
32
34
|
setItemCreated<ItemTypeType extends ApiEnumItemType, Fields extends Partial<FieldMap<ItemTypeType>>>(itemType: ItemTypeType, values: Fields): PromiseInterface<this>;
|
|
35
|
+
setItemUpdated<ItemTypeType extends ApiEnumItemType>(entry: ItemEntry<ItemTypeType>, fields: Partial<FieldMap<ItemTypeType>>, columnExpansionResult?: ColumnExpansionResult<ItemTypeType> | null, parent?: EntryParentNull, updateModified?: boolean, updateInitial?: boolean): this;
|
|
33
36
|
setItemDeleted(deleted: ChangesDeltaItemDeleteDelta): this;
|
|
34
37
|
setItemsDeleted(deleted: ChangesDeltaItemDeleteDelta[]): this;
|
|
35
38
|
/**
|
|
@@ -17,7 +17,9 @@ export declare class ParentChangesDelta extends ChangesDeltaBase {
|
|
|
17
17
|
[itemEntryId: string]: InternalCreateDelta;
|
|
18
18
|
};
|
|
19
19
|
deleted: {
|
|
20
|
-
[itemType: string]:
|
|
20
|
+
[itemType: string]: {
|
|
21
|
+
[entryId: string]: ParentChangesDeltaItemDeleteDelta;
|
|
22
|
+
};
|
|
21
23
|
};
|
|
22
24
|
moved: {
|
|
23
25
|
[itemEntryId: number]: {
|