Skip to content

index

Classes

InvalidCursorError

Defined in: src/errors/invalid-cursor.error.ts:3

Extends

  • BadRequestException

Constructors

Constructor
ts
new InvalidCursorError(cursor): InvalidCursorError;

Defined in: src/errors/invalid-cursor.error.ts:4

Parameters
ParameterType
cursorstring
Returns

InvalidCursorError

Overrides
ts
BadRequestException.constructor

Properties

cause
ts
cause: unknown;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:28

Exception cause. Indicates the specific original cause of the error. It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.

Inherited from
ts
BadRequestException.cause
message
ts
message: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from
ts
BadRequestException.message
name
ts
name: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from
ts
BadRequestException.name
stack?
ts
optional stack?: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from
ts
BadRequestException.stack

Methods

createBody()
Call Signature
ts
static createBody(
   nil, 
   message, 
   statusCode): HttpExceptionBody;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:74

Parameters
ParameterType
nil"" | null
messageHttpExceptionBodyMessage
statusCodenumber
Returns

HttpExceptionBody

Inherited from
ts
BadRequestException.createBody
Call Signature
ts
static createBody(
   message, 
   error, 
   statusCode): HttpExceptionBody;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:75

Parameters
ParameterType
messageHttpExceptionBodyMessage
errorstring
statusCodenumber
Returns

HttpExceptionBody

Inherited from
ts
BadRequestException.createBody
Call Signature
ts
static createBody<Body>(custom): Body;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:76

Type Parameters
Type Parameter
Body extends Record<string, unknown>
Parameters
ParameterType
customBody
Returns

Body

Inherited from
ts
BadRequestException.createBody
extractDescriptionAndOptionsFrom()
ts
static extractDescriptionAndOptionsFrom(descriptionOrOptions): DescriptionAndOptions;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:84

Utility method used to extract the error description and httpExceptionOptions from the given argument. This is used by inheriting classes to correctly parse both options.

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

DescriptionAndOptions

the error description and the httpExceptionOptions as an object.

Inherited from
ts
BadRequestException.extractDescriptionAndOptionsFrom
getDescriptionFrom()
ts
static getDescriptionFrom(descriptionOrOptions): string;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:77

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

string

Inherited from
ts
BadRequestException.getDescriptionFrom
getHttpExceptionOptionsFrom()
ts
static getHttpExceptionOptionsFrom(descriptionOrOptions): HttpExceptionOptions;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:78

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

HttpExceptionOptions

Inherited from
ts
BadRequestException.getHttpExceptionOptionsFrom
getResponse()
ts
getResponse(): string | object;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:72

Returns

string | object

Inherited from
ts
BadRequestException.getResponse
getStatus()
ts
getStatus(): number;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:73

Returns

number

Inherited from
ts
BadRequestException.getStatus
initCause()
ts
initCause(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:69

Configures error chaining support

Returns

void

See
Inherited from
ts
BadRequestException.initCause
initMessage()
ts
initMessage(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:70

Returns

void

Inherited from
ts
BadRequestException.initMessage
initName()
ts
initName(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:71

Returns

void

Inherited from
ts
BadRequestException.initName

InvalidFilterColumnError

Defined in: src/errors/invalid-filter-column.error.ts:3

Extends

  • BadRequestException

Constructors

Constructor
ts
new InvalidFilterColumnError(
   column, 
   filterableColumns, 
   operator?, 
   allowedOperators?): InvalidFilterColumnError;

Defined in: src/errors/invalid-filter-column.error.ts:4

Parameters
ParameterType
columnstring
filterableColumnsstring[]
operator?string
allowedOperators?string[]
Returns

InvalidFilterColumnError

Overrides
ts
BadRequestException.constructor

Properties

cause
ts
cause: unknown;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:28

Exception cause. Indicates the specific original cause of the error. It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.

Inherited from
ts
BadRequestException.cause
message
ts
message: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from
ts
BadRequestException.message
name
ts
name: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from
ts
BadRequestException.name
stack?
ts
optional stack?: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from
ts
BadRequestException.stack

Methods

createBody()
Call Signature
ts
static createBody(
   nil, 
   message, 
   statusCode): HttpExceptionBody;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:74

Parameters
ParameterType
nil"" | null
messageHttpExceptionBodyMessage
statusCodenumber
Returns

HttpExceptionBody

Inherited from
ts
BadRequestException.createBody
Call Signature
ts
static createBody(
   message, 
   error, 
   statusCode): HttpExceptionBody;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:75

Parameters
ParameterType
messageHttpExceptionBodyMessage
errorstring
statusCodenumber
Returns

HttpExceptionBody

Inherited from
ts
BadRequestException.createBody
Call Signature
ts
static createBody<Body>(custom): Body;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:76

Type Parameters
Type Parameter
Body extends Record<string, unknown>
Parameters
ParameterType
customBody
Returns

Body

Inherited from
ts
BadRequestException.createBody
extractDescriptionAndOptionsFrom()
ts
static extractDescriptionAndOptionsFrom(descriptionOrOptions): DescriptionAndOptions;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:84

Utility method used to extract the error description and httpExceptionOptions from the given argument. This is used by inheriting classes to correctly parse both options.

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

DescriptionAndOptions

the error description and the httpExceptionOptions as an object.

Inherited from
ts
BadRequestException.extractDescriptionAndOptionsFrom
getDescriptionFrom()
ts
static getDescriptionFrom(descriptionOrOptions): string;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:77

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

string

Inherited from
ts
BadRequestException.getDescriptionFrom
getHttpExceptionOptionsFrom()
ts
static getHttpExceptionOptionsFrom(descriptionOrOptions): HttpExceptionOptions;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:78

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

HttpExceptionOptions

Inherited from
ts
BadRequestException.getHttpExceptionOptionsFrom
getResponse()
ts
getResponse(): string | object;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:72

Returns

string | object

Inherited from
ts
BadRequestException.getResponse
getStatus()
ts
getStatus(): number;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:73

Returns

number

Inherited from
ts
BadRequestException.getStatus
initCause()
ts
initCause(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:69

Configures error chaining support

Returns

void

See
Inherited from
ts
BadRequestException.initCause
initMessage()
ts
initMessage(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:70

Returns

void

Inherited from
ts
BadRequestException.initMessage
initName()
ts
initName(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:71

Returns

void

Inherited from
ts
BadRequestException.initName

InvalidSortColumnError

Defined in: src/errors/invalid-sort-column.error.ts:3

Extends

  • BadRequestException

Constructors

Constructor
ts
new InvalidSortColumnError(column, sortableColumns): InvalidSortColumnError;

Defined in: src/errors/invalid-sort-column.error.ts:4

Parameters
ParameterType
columnstring
sortableColumnsstring[]
Returns

InvalidSortColumnError

Overrides
ts
BadRequestException.constructor

Properties

cause
ts
cause: unknown;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:28

Exception cause. Indicates the specific original cause of the error. It is used when catching and re-throwing an error with a more-specific or useful error message in order to still have access to the original error.

Inherited from
ts
BadRequestException.cause
message
ts
message: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1075

Inherited from
ts
BadRequestException.message
name
ts
name: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1074

Inherited from
ts
BadRequestException.name
stack?
ts
optional stack?: string;

Defined in: ../../../../../../../opt/hostedtoolcache/node/18.20.8/x64/lib/node_modules/typedoc/node_modules/typescript/lib/lib.es5.d.ts:1076

Inherited from
ts
BadRequestException.stack

Methods

createBody()
Call Signature
ts
static createBody(
   nil, 
   message, 
   statusCode): HttpExceptionBody;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:74

Parameters
ParameterType
nil"" | null
messageHttpExceptionBodyMessage
statusCodenumber
Returns

HttpExceptionBody

Inherited from
ts
BadRequestException.createBody
Call Signature
ts
static createBody(
   message, 
   error, 
   statusCode): HttpExceptionBody;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:75

Parameters
ParameterType
messageHttpExceptionBodyMessage
errorstring
statusCodenumber
Returns

HttpExceptionBody

Inherited from
ts
BadRequestException.createBody
Call Signature
ts
static createBody<Body>(custom): Body;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:76

Type Parameters
Type Parameter
Body extends Record<string, unknown>
Parameters
ParameterType
customBody
Returns

Body

Inherited from
ts
BadRequestException.createBody
extractDescriptionAndOptionsFrom()
ts
static extractDescriptionAndOptionsFrom(descriptionOrOptions): DescriptionAndOptions;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:84

Utility method used to extract the error description and httpExceptionOptions from the given argument. This is used by inheriting classes to correctly parse both options.

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

DescriptionAndOptions

the error description and the httpExceptionOptions as an object.

Inherited from
ts
BadRequestException.extractDescriptionAndOptionsFrom
getDescriptionFrom()
ts
static getDescriptionFrom(descriptionOrOptions): string;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:77

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

string

Inherited from
ts
BadRequestException.getDescriptionFrom
getHttpExceptionOptionsFrom()
ts
static getHttpExceptionOptionsFrom(descriptionOrOptions): HttpExceptionOptions;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:78

Parameters
ParameterType
descriptionOrOptionsstring | HttpExceptionOptions
Returns

HttpExceptionOptions

Inherited from
ts
BadRequestException.getHttpExceptionOptionsFrom
getResponse()
ts
getResponse(): string | object;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:72

Returns

string | object

Inherited from
ts
BadRequestException.getResponse
getStatus()
ts
getStatus(): number;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:73

Returns

number

Inherited from
ts
BadRequestException.getStatus
initCause()
ts
initCause(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:69

Configures error chaining support

Returns

void

See
Inherited from
ts
BadRequestException.initCause
initMessage()
ts
initMessage(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:70

Returns

void

Inherited from
ts
BadRequestException.initMessage
initName()
ts
initName(): void;

Defined in: node_modules/@nestjs/common/exceptions/http.exception.d.ts:71

Returns

void

Inherited from
ts
BadRequestException.initName

PaginateService

Defined in: src/paginate.service.ts:12

Constructors

Constructor
ts
new PaginateService(moduleOptions?, reflector): PaginateService;

Defined in: src/paginate.service.ts:13

Parameters
ParameterType
moduleOptionsPaginationModuleOptions
reflectorReflector
Returns

PaginateService

Methods

paginate()
ts
paginate<T>(
   query, 
   delegate, 
   config, 
   handler?): Promise<
  | Paginated<T>
| CursorPaginated<T>>;

Defined in: src/paginate.service.ts:20

Type Parameters
Type Parameter
T
Parameters
ParameterType
queryPaginateQuery
delegate{ count: (args) => Promise<number>; findMany: (args) => Promise<T[]>; }
delegate.count(args) => Promise<number>
delegate.findMany(args) => Promise<T[]>
config?PaginateConfig<T>
handler?Function
Returns

Promise< | Paginated<T> | CursorPaginated<T>>


PaginationModule

Defined in: src/pagination.module.ts:11

Constructors

Constructor
ts
new PaginationModule(): PaginationModule;
Returns

PaginationModule

Methods

forRoot()
ts
static forRoot(options?): DynamicModule;

Defined in: src/pagination.module.ts:12

Parameters
ParameterType
options?PaginationModuleOptions
Returns

DynamicModule

forRootAsync()
ts
static forRootAsync(options): DynamicModule;

Defined in: src/pagination.module.ts:28

Parameters
ParameterType
optionsPaginationModuleAsyncOptions
Returns

DynamicModule

Interfaces

CursorPaginated

Defined in: src/interfaces/paginated.interface.ts:23

Type Parameters

Type Parameter
T

Properties

data
ts
data: T[];

Defined in: src/interfaces/paginated.interface.ts:24

ts
links: {
  current: string;
  next: string | null;
  previous: string | null;
};

Defined in: src/interfaces/paginated.interface.ts:36

current
ts
current: string;
next
ts
next: string | null;
previous
ts
previous: string | null;
meta
ts
meta: {
  endCursor: string | null;
  filter?: Record<string, string>;
  hasNextPage: boolean;
  hasPreviousPage: boolean;
  itemsPerPage: number;
  search?: string;
  sortBy: [string, SortOrder][];
  startCursor: string | null;
  totalItems?: number;
};

Defined in: src/interfaces/paginated.interface.ts:25

endCursor
ts
endCursor: string | null;
filter?
ts
optional filter?: Record<string, string>;
hasNextPage
ts
hasNextPage: boolean;
hasPreviousPage
ts
hasPreviousPage: boolean;
itemsPerPage
ts
itemsPerPage: number;
ts
optional search?: string;
sortBy
ts
sortBy: [string, SortOrder][];
startCursor
ts
startCursor: string | null;
totalItems?
ts
optional totalItems?: number;

PaginateConfig

Defined in: src/interfaces/paginate-config.interface.ts:3

Type Parameters

Type ParameterDefault type
Tany

Properties

allowWithDeleted?
ts
optional allowWithDeleted?: boolean;

Defined in: src/interfaces/paginate-config.interface.ts:35

cursorColumn?
ts
optional cursorColumn?: keyof T & string;

Defined in: src/interfaces/paginate-config.interface.ts:29

Column used as cursor for cursor-based pagination. Defaults to 'id'.

Requirements:

  • Must be included in sortableColumns
  • Should have unique, sequential values (e.g., auto-increment ID, UUID v7, timestamp)
  • Non-unique cursor columns may produce inconsistent results across pages
See

https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination

defaultLimit?
ts
optional defaultLimit?: number;

Defined in: src/interfaces/paginate-config.interface.ts:30

defaultSortBy?
ts
optional defaultSortBy?: [keyof T & string, SortOrder][];

Defined in: src/interfaces/paginate-config.interface.ts:6

filterableColumns?
ts
optional filterableColumns?: { [K in string]?: FilterOperator[] };

Defined in: src/interfaces/paginate-config.interface.ts:11

maxLimit?
ts
optional maxLimit?: number;

Defined in: src/interfaces/paginate-config.interface.ts:31

nullSort?
ts
optional nullSort?: "first" | "last";

Defined in: src/interfaces/paginate-config.interface.ts:7

paginationType?
ts
optional paginationType?: "offset" | "cursor";

Defined in: src/interfaces/paginate-config.interface.ts:18

relations?
ts
optional relations?: Record<string, boolean | object>;

Defined in: src/interfaces/paginate-config.interface.ts:15

searchableColumns?
ts
optional searchableColumns?: keyof T & string[];

Defined in: src/interfaces/paginate-config.interface.ts:9

select?
ts
optional select?: keyof T & string[];

Defined in: src/interfaces/paginate-config.interface.ts:16

sortableColumns
ts
sortableColumns: keyof T & string[];

Defined in: src/interfaces/paginate-config.interface.ts:4

where?
ts
optional where?: object;

Defined in: src/interfaces/paginate-config.interface.ts:34

withTotalCount?
ts
optional withTotalCount?: boolean;

Defined in: src/interfaces/paginate-config.interface.ts:32


Paginated

Defined in: src/interfaces/paginated.interface.ts:3

Type Parameters

Type Parameter
T

Properties

data
ts
data: T[];

Defined in: src/interfaces/paginated.interface.ts:4

ts
links: {
  current: string;
  first: string;
  last: string;
  next: string | null;
  previous: string | null;
};

Defined in: src/interfaces/paginated.interface.ts:14

current
ts
current: string;
first
ts
first: string;
last
ts
last: string;
next
ts
next: string | null;
previous
ts
previous: string | null;
meta
ts
meta: {
  currentPage: number;
  filter?: Record<string, string>;
  itemsPerPage: number;
  search?: string;
  sortBy: [string, SortOrder][];
  totalItems: number;
  totalPages: number;
};

Defined in: src/interfaces/paginated.interface.ts:5

currentPage
ts
currentPage: number;
filter?
ts
optional filter?: Record<string, string>;
itemsPerPage
ts
itemsPerPage: number;
search?
ts
optional search?: string;
sortBy
ts
sortBy: [string, SortOrder][];
totalItems
ts
totalItems: number;
totalPages
ts
totalPages: number;

PaginateDefaultsOptions

Defined in: src/decorators/paginate-defaults.decorator.ts:6

Properties

defaultLimit?
ts
optional defaultLimit?: number;

Defined in: src/decorators/paginate-defaults.decorator.ts:7

defaultSortBy?
ts
optional defaultSortBy?: [string, SortOrder][];

Defined in: src/decorators/paginate-defaults.decorator.ts:9

maxLimit?
ts
optional maxLimit?: number;

Defined in: src/decorators/paginate-defaults.decorator.ts:8

paginationType?
ts
optional paginationType?: "offset" | "cursor";

Defined in: src/decorators/paginate-defaults.decorator.ts:10


PaginateQuery

Defined in: src/interfaces/paginate-query.interface.ts:3

Properties

after?
ts
optional after?: string;

Defined in: src/interfaces/paginate-query.interface.ts:14

before?
ts
optional before?: string;

Defined in: src/interfaces/paginate-query.interface.ts:15

filter?
ts
optional filter?: Record<string, string | string[]>;

Defined in: src/interfaces/paginate-query.interface.ts:7

limit?
ts
optional limit?: number;

Defined in: src/interfaces/paginate-query.interface.ts:4

page?
ts
optional page?: number;

Defined in: src/interfaces/paginate-query.interface.ts:11

path
ts
path: string;

Defined in: src/interfaces/paginate-query.interface.ts:8

search?
ts
optional search?: string;

Defined in: src/interfaces/paginate-query.interface.ts:6

sortBy?
ts
optional sortBy?: [string, SortOrder][];

Defined in: src/interfaces/paginate-query.interface.ts:5


PaginationModuleAsyncOptions

Defined in: src/interfaces/pagination-options.interface.ts:14

Extends

  • Pick<ModuleMetadata, "imports">

Properties

imports?
ts
optional imports?: (
  | DynamicModule
  | Type<any>
  | Promise<DynamicModule>
  | ForwardReference<any>)[];

Defined in: node_modules/@nestjs/common/interfaces/modules/module-metadata.interface.d.ts:18

Optional list of imported modules that export the providers which are required in this module.

Inherited from
ts
Pick.imports
inject?
ts
optional inject?: any[];

Defined in: src/interfaces/pagination-options.interface.ts:19

useFactory
ts
useFactory: (...args) => 
  | PaginationModuleOptions
| Promise<PaginationModuleOptions>;

Defined in: src/interfaces/pagination-options.interface.ts:16

Parameters
ParameterType
...argsany[]
Returns

| PaginationModuleOptions | Promise<PaginationModuleOptions>


PaginationModuleOptions

Defined in: src/interfaces/pagination-options.interface.ts:4

Properties

defaultLimit?
ts
optional defaultLimit?: number;

Defined in: src/interfaces/pagination-options.interface.ts:5

defaultPaginationType?
ts
optional defaultPaginationType?: "offset" | "cursor";

Defined in: src/interfaces/pagination-options.interface.ts:7

defaultSortBy?
ts
optional defaultSortBy?: [string, SortOrder][];

Defined in: src/interfaces/pagination-options.interface.ts:8

fieldNamingStrategy?
ts
optional fieldNamingStrategy?: "camelCase" | "snake_case";

Defined in: src/interfaces/pagination-options.interface.ts:11

maxLimit?
ts
optional maxLimit?: number;

Defined in: src/interfaces/pagination-options.interface.ts:6

ts
optional withLinks?: boolean;

Defined in: src/interfaces/pagination-options.interface.ts:9

withTotalCount?
ts
optional withTotalCount?: boolean;

Defined in: src/interfaces/pagination-options.interface.ts:10

Type Aliases

FilterOperator

ts
type FilterOperator = 
  | "$eq"
  | "$ne"
  | "$gt"
  | "$gte"
  | "$lt"
  | "$lte"
  | "$in"
  | "$nin"
  | "$ilike"
  | "$btw"
  | "$null"
  | "$not:null";

Defined in: src/interfaces/filter-operator.type.ts:1


SortOrder

ts
type SortOrder = "ASC" | "DESC";

Defined in: src/interfaces/filter-operator.type.ts:15

Variables

Paginate

ts
const Paginate: (...dataOrPipes) => ParameterDecorator;

Defined in: src/decorators/paginate.decorator.ts:5

Parameters

ParameterType
...dataOrPipesunknown[]

Returns

ParameterDecorator


PAGINATE_DEFAULTS_KEY

ts
const PAGINATE_DEFAULTS_KEY: "PAGINATE_DEFAULTS" = 'PAGINATE_DEFAULTS';

Defined in: src/decorators/paginate-defaults.decorator.ts:4


PAGINATION_MODULE_OPTIONS

ts
const PAGINATION_MODULE_OPTIONS: "PAGINATION_MODULE_OPTIONS" = 'PAGINATION_MODULE_OPTIONS';

Defined in: src/pagination.constants.ts:1

Functions

ApiCursorPaginatedResponse()

ts
function ApiCursorPaginatedResponse(dataDto): MethodDecorator;

Defined in: src/decorators/api-paginated-response.decorator.ts:59

Parameters

ParameterType
dataDtoType

Returns

MethodDecorator


ApiPaginatedResponse()

ts
function ApiPaginatedResponse(dataDto): MethodDecorator;

Defined in: src/decorators/api-paginated-response.decorator.ts:10

Parameters

ParameterType
dataDtoType

Returns

MethodDecorator


paginate()

ts
function paginate<T>(
   query, 
   delegate, 
   config): Promise<
  | Paginated<T>
| CursorPaginated<T>>;

Defined in: src/paginate.ts:11

Type Parameters

Type Parameter
T

Parameters

ParameterType
queryPaginateQuery
delegate{ count: (args) => Promise<number>; findMany: (args) => Promise<T[]>; }
delegate.count(args) => Promise<number>
delegate.findMany(args) => Promise<T[]>
configPaginateConfig<T>

Returns

Promise< | Paginated<T> | CursorPaginated<T>>


PaginateDefaults()

ts
function PaginateDefaults(defaults): CustomDecorator<string>;

Defined in: src/decorators/paginate-defaults.decorator.ts:13

Parameters

ParameterType
defaultsPaginateDefaultsOptions

Returns

CustomDecorator<string>

Released under the MIT License.