UNPKG

@furystack/rest-service

Version:

Repository implementation for FuryStack

17 lines 880 B
import type { Constructable } from '@furystack/inject'; import type { PatchEndpoint } from '@furystack/rest'; import '@furystack/repository'; import type { RequestAction } from '../request-action-implementation.js'; import type { WithOptionalId } from '@furystack/core'; /** * Creates a PATCH endpoint for updating entities * @param options The options for endpoint creation * @param options.model The Model class * @param options.primaryKey The field name that is used as primary key on the model * @returns a boolean that indicates the success */ export declare const createPatchEndpoint: <T extends object, TPrimaryKey extends keyof T, TWritableData = WithOptionalId<T, TPrimaryKey>>(options: { model: Constructable<T>; primaryKey: TPrimaryKey; }) => RequestAction<PatchEndpoint<T, TPrimaryKey, TWritableData>>; //# sourceMappingURL=create-patch-endpoint.d.ts.map