@furystack/rest-service
Version:
Repository implementation for FuryStack
15 lines • 722 B
TypeScript
import type { Constructable } from '@furystack/inject';
import type { DeleteEndpoint } from '@furystack/rest';
import type { RequestAction } from '../request-action-implementation.js';
/**
* Creates a DELETE endpoint for removing entities
* @param options The options for endpoint creation
* @param options.model The Model class
* @param options.primaryKey The field used as primary key on the model
* @returns a boolean that indicates the success
*/
export declare const createDeleteEndpoint: <T extends object, TPrimaryKey extends keyof T>(options: {
model: Constructable<T>;
primaryKey: TPrimaryKey;
}) => RequestAction<DeleteEndpoint<T, TPrimaryKey>>;
//# sourceMappingURL=create-delete-endpoint.d.ts.map