feat: entity move
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -113,6 +113,10 @@ export type CollectionSelector = {
|
||||
|
||||
export type EntitySelector = (string | number)[];
|
||||
|
||||
export type ProviderIdentifier = `${string}`;
|
||||
export type ServiceIdentifier = `${string}:${string}`;
|
||||
export type CollectionIdentifier = `${string}:${string}:${string}`;
|
||||
export type EntityIdentifier = `${string}:${string}:${string}:${string}`;
|
||||
|
||||
/**
|
||||
* Filter comparison for list operations
|
||||
|
||||
+25
-1
@@ -2,10 +2,12 @@
|
||||
* Entity type definitions
|
||||
*/
|
||||
import type {
|
||||
CollectionIdentifier,
|
||||
EntityIdentifier,
|
||||
SourceSelector,
|
||||
ListFilter,
|
||||
ListRange,
|
||||
ListSort,
|
||||
SourceSelector,
|
||||
} from './common';
|
||||
import type { MessageInterface } from './message';
|
||||
|
||||
@@ -133,6 +135,28 @@ export interface EntityDeltaResponse {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Entity move
|
||||
*/
|
||||
export interface EntityMoveRequest {
|
||||
target: CollectionIdentifier;
|
||||
sources: EntityIdentifier[];
|
||||
}
|
||||
|
||||
export interface EntityMoveResultSuccess {
|
||||
success: boolean;
|
||||
identifier: EntityIdentifier;
|
||||
}
|
||||
|
||||
export interface EntityMoveResultFailure {
|
||||
success: boolean;
|
||||
error: string;
|
||||
}
|
||||
|
||||
export interface EntityMoveResponse {
|
||||
[sourceIdentifier: EntityIdentifier]: EntityMoveResultSuccess | EntityMoveResultFailure;
|
||||
}
|
||||
|
||||
/**
|
||||
* Entity transmit
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user