@furystack/rest-service
Version:
Repository implementation for FuryStack
15 lines • 756 B
TypeScript
import type { Constructable } from '@furystack/inject';
import type { GetCollectionEndpoint } from '@furystack/rest';
import type { RequestAction } from '../request-action-implementation.js';
/**
* Creates a GetCollection endpoint for the given model. The model should have a Repository DataSet
* @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 The created endpoint
*/
export declare const createGetCollectionEndpoint: <T, TPrimaryKey extends keyof T>(options: {
model: Constructable<T>;
primaryKey: TPrimaryKey;
}) => RequestAction<GetCollectionEndpoint<T>>;
//# sourceMappingURL=create-get-collection-endpoint.d.ts.map