feat: implement entity patch
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
+17
-2
@@ -128,15 +128,30 @@ export interface EntityUpdateRequest<T = MessageInterface> {
|
||||
|
||||
export interface EntityUpdateResponse<T = MessageInterface> extends EntityInterface<T> {}
|
||||
|
||||
/**
|
||||
* Entity patch
|
||||
*/
|
||||
export interface EntityPatchRequest<T = MessageInterface> {
|
||||
properties: T;
|
||||
targets: EntityIdentifier[];
|
||||
}
|
||||
|
||||
export interface EntityPatchResponse{
|
||||
[targetIdentifier: EntityIdentifier]: {
|
||||
disposition: 'patched' | 'error';
|
||||
error?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Entity delete
|
||||
*/
|
||||
export interface EntityDeleteRequest {
|
||||
sources: EntityIdentifier[];
|
||||
targets: EntityIdentifier[];
|
||||
}
|
||||
|
||||
export interface EntityDeleteResponse {
|
||||
[sourceIdentifier: EntityIdentifier]: {
|
||||
[targetIdentifier: EntityIdentifier]: {
|
||||
disposition: 'deleted' | 'moved' | 'error';
|
||||
destination: CollectionIdentifier | null;
|
||||
mutation: EntityIdentifier | null;
|
||||
|
||||
Reference in New Issue
Block a user