@thangnv-dev/rest-nest
v0.0.9
Published
Reusable library package in this monorepo.
Downloads
45
Readme
@thangnv-dev/rest-nest
Reusable library package in this monorepo.
Install
npm install @thangnv-dev/rest-nestUsage
import * as api from '@thangnv-dev/rest-nest'Public API
This package exports the following API surface from src/index.ts:
export { extractBearerToken } from './auth.js'
export { toDataEnvelope, toListEnvelope } from './envelope.js'
export { BaseResourceDto } from './dto/base-resource.dto.js'
export { ErrorBodyDto, ErrorEnvelopeDto } from './dto/error-envelope.dto.js'
export { PageInfoDto } from './dto/page-info.dto.js'
export { PaginationQueryDto } from './dto/pagination-query.dto.js'
export { ErrorEnvelopeFilter } from './error-envelope.filter.js'
export {
toVersionEtag,
parseIfMatchVersion,
ensureVersionMatches,
ensureOptionalIfMatchVersion,
} from './etag.js'
export {
REQUEST_ID_HEADER,
type RequestContext,
type RequestWithContext,
} from './http-context.js'
export {
type ParsedPagination,
type CursorPagination,
type OffsetPagination,
type PageInfo,
parsePaginationInput,
createPaginationSignature,
encodeOffsetCursor,
decodeOffsetCursor,
} from './pagination.js'
export {
PreconditionFailedException,
PreconditionRequiredException,
} from './precondition.exception.js'
export { createRequestId, attachRequestId, requestIdMiddleware } from './request-id.middleware.js'
export {
RestNestModule,
type RestOpenApiOptions,
type RestNestModuleAsyncOptions,
type RestNestModuleOptions,
} from './rest-nest.module.js'
Development
yarn workspace @thangnv-dev/rest-nest build
yarn workspace @thangnv-dev/rest-nest test