UNPKG

@furystack/rest-service

Version:

Repository implementation for FuryStack

15 lines 773 B
import type { Constructable } from '@furystack/inject'; import type { GetEntityEndpoint } from '@furystack/rest'; import type { RequestAction } from '../request-action-implementation.js'; /** * Creates a simple Get Entity endpoint for a specified model. * @param options The options for endpoint creation * @param options.model The entity model, should have a Repository DataSet * @param options.primaryKey The field name used as primary key on the model * @returns The generated endpoint */ export declare const createGetEntityEndpoint: <T extends object, TPrimaryKey extends keyof T>(options: { model: Constructable<T>; primaryKey: TPrimaryKey; }) => RequestAction<GetEntityEndpoint<T, TPrimaryKey>>; //# sourceMappingURL=create-get-entity-endpoint.d.ts.map