Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/the-software-compagny/nestjs_module_restools
Simple tools for NestJS framework and REST APIs
https://github.com/the-software-compagny/nestjs_module_restools
abstract async auth-public decorators library nestjs node nodejs npm promise request-context rest search-filter-schema spaces tools
Last synced: 28 days ago
JSON representation
Simple tools for NestJS framework and REST APIs
- Host: GitHub
- URL: https://github.com/the-software-compagny/nestjs_module_restools
- Owner: The-Software-Compagny
- License: mit
- Created: 2024-06-17T15:27:46.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-10-15T13:04:12.000Z (3 months ago)
- Last Synced: 2024-11-18T21:02:45.959Z (about 2 months ago)
- Topics: abstract, async, auth-public, decorators, library, nestjs, node, nodejs, npm, promise, request-context, rest, search-filter-schema, spaces, tools
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@the-software-compagny/nestjs_module_restools
- Size: 206 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
Restools - Simple tools for NestJS framework and REST APIs
# NestJS Restools Module
Simple tools for NestJS framework and REST APIs## Install dependencies
```bash
yarn add @the-software-compagny/nestjs_module_restools
```## Usages
### Filters
#### Syntax
`filters[PREFIX + FIELD]=SEARCH`
#### Example
`filters[=subject]=53`
subject field equal to 53
#### Usage
```bash
curl --request GET \
--url 'http://localhost/search?limit=9999&filters%5B%5Esequence%5D=%2F53%2F&sort%5Bmetadata.createdAt%5D=-1&sort%5Bsubject%5D=1'
# limit=9999
# filters[^sequence]=/53/
# sort[metadata.createdAt]=-1
# sort[subject]=1
```
#### List
| Filter | Description |
|--------|-----------------------|
| : | Equal |
| # | Number Equal |
| !# | Number Not Equal |
| !: | Not Equal |
| \> | Greater Than |
| \>| | Greater Than or Equal |
| \< | Less Than |
| \<| | Less Than or Equal |
| @ | in |
| !@ | not in |
| @# | number in |
| !@# | number not in |
| \^ | regex |