UNPKG

@minimaltech/node-infra

Version:

Minimal Technology NodeJS Infrastructure - Loopback 4 Framework

27 lines (26 loc) 1.16 kB
import { BaseIdEntity } from '../base/base.model'; import { IController } from '../common'; import { Interceptor, InvocationContext, InvocationResult, Provider, ValueOrPromise } from '@loopback/core'; import { Response } from '@loopback/rest'; export declare class ContentRangeInterceptor implements Provider<Interceptor> { private response; static readonly BINDING_KEY: string; constructor(response: Response); value(): (context: InvocationContext, next: () => ValueOrPromise<InvocationResult>) => Promise<any>; identifyControllerType(opts: { target: IController; }): 'single-entity' | 'relation-entity' | undefined; handleSingleEntity(opts: { context: InvocationContext; result: Array<BaseIdEntity>; }): Promise<void>; handleRelationalEntity(opts: { context: InvocationContext; result: Array<BaseIdEntity>; }): Promise<never[] | undefined>; enrichResponseContentRange(opts: { context: InvocationContext; result: Array<BaseIdEntity>; }): Promise<void>; intercept(context: InvocationContext, next: () => ValueOrPromise<InvocationResult>): Promise<any>; }