feat: collection move
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -17,6 +17,8 @@ import type {
|
||||
CollectionDeleteResponse,
|
||||
CollectionDeleteRequest,
|
||||
CollectionInterface,
|
||||
CollectionMoveRequest,
|
||||
CollectionMoveResponse,
|
||||
} from '../types/collection';
|
||||
import { useIntegrationStore } from '@KTXC/stores/integrationStore';
|
||||
import { CollectionObject, CollectionPropertiesObject } from '../models/collection';
|
||||
@@ -132,6 +134,18 @@ export const collectionService = {
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Move a collection to a new target collection
|
||||
*
|
||||
* @param request - move request parameters
|
||||
*
|
||||
* @returns Promise with moved collection object
|
||||
*/
|
||||
async move(request: CollectionMoveRequest): Promise<CollectionObject> {
|
||||
const response = await transceivePost<CollectionMoveRequest, CollectionMoveResponse>('collection.move', request);
|
||||
return createCollectionObject(response);
|
||||
}
|
||||
};
|
||||
|
||||
export default collectionService;
|
||||
|
||||
Reference in New Issue
Block a user