lincd
Version:
LINCD is a JavaScript library for building user interfaces with linked data (also known as 'structured data', or RDF)
36 lines (35 loc) • 1.2 kB
TypeScript
import { Shape } from '../shapes/Shape.js';
import { NodeShape } from '../shapes/SHACL.js';
import { LinkedQuery } from './SelectQuery.js';
import { NodeReferenceValue, UpdatePartial } from './QueryFactory.js';
import { MutationQueryFactory, NodeId } from './MutationQuery.js';
export interface DeleteQuery extends LinkedQuery {
type: 'delete';
shape: NodeShape;
ids: NodeReferenceValue[];
}
export type DeleteResponse = {
/**
* The IDs of the items that were successfully deleted.
*/
deleted: NodeReferenceValue[];
/**
* The number of successfully deleted items.
*/
count: number;
/**
* The IDs of the items that couldn't be deleted.
*/
failed?: NodeReferenceValue[];
/**
* A mapping of IDs to error messages for the items that couldn't be deleted.
*/
errors?: Record<string, string>;
};
export declare class DeleteQueryFactory<ShapeType extends Shape, U extends UpdatePartial<ShapeType>> extends MutationQueryFactory {
shapeClass: typeof Shape;
readonly id: string;
readonly ids: NodeReferenceValue[];
constructor(shapeClass: typeof Shape, ids: NodeId[] | NodeId);
getQueryObject(): DeleteQuery;
}