@jvhaile/loopback4-helper
Version:
Helper components and tools for loopback 4.
110 lines (109 loc) • 3.06 kB
TypeScript
import { Model } from "@loopback/rest";
import { JsonSchemaOptions } from "@loopback/repository-json-schema";
export declare function singleResponse<T extends Model>(modelCtor: Function & {
prototype: T;
}, options?: JsonSchemaOptions<T>): {
responses: {
'200': {
description: string;
content: {
'application/json': {
schema: import("@loopback/rest").SchemaRef;
};
};
};
};
};
export declare function countResponse<T extends Model>(modelCtor: Function & {
prototype: T;
}): {
responses: {
'200': {
description: string;
content: {
'application/json': {
schema: {
type: "object";
title: string;
'x-typescript-type': string;
properties: {
count: {
type: "number";
};
};
};
};
};
};
};
};
export declare function plainBody(): {
content: {
'application/json': {
schema: {
$ref: string;
definitions: {
query: never[];
};
};
};
};
};
export declare function singleBody<T extends Model>(modelCtor: Function & {
prototype: T;
}, options?: JsonSchemaOptions<T>): {
content: {
'application/json': {
schema: import("@loopback/rest").SchemaRef;
};
};
};
export declare function arrayResponse<T extends Model>(modelCtor: Function & {
prototype: T;
}): {
responses: {
'200': {
description: string;
content: {
'application/json': {
schema: {
type: string;
items: import("@loopback/rest").SchemaRef;
};
};
};
};
};
};
export declare function patchManyResponse<T extends Model>(modelCtor: Function & {
prototype: T;
}): {
responses: {
'200': {
description: string;
content: {
'application/json': {
schema: {
type: "object";
title: string;
'x-typescript-type': string;
properties: {
count: {
type: "number";
};
};
};
};
};
};
};
};
export declare function deleteResponse<T extends Model>(modelCtor: Function & {
prototype: T;
}): {
responses: {
'204': {
description: string;
};
};
};