@nestjs-odata/core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/dist/index.cjs +2688 -0
- package/dist/index.d.cts +1402 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +1402 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2565 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @nestjs-odata/core
|
|
2
|
+
|
|
3
|
+
Core OData v4 library for NestJS — parser, EDM, decorators, interceptors, and batch support.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@nestjs-odata/core)
|
|
6
|
+
[](https://www.npmjs.com/package/@nestjs-odata/core)
|
|
7
|
+
[](https://github.com/cberd1509/nestjs-odata/blob/main/LICENSE)
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- OData v4 query parser (`$filter`, `$select`, `$expand`, `$orderby`, `$top`, `$skip`, `$count`)
|
|
12
|
+
- EDM (Entity Data Model) auto-derivation via decorators
|
|
13
|
+
- `ODataModule` — drop-in NestJS module with zero boilerplate
|
|
14
|
+
- Request/response interceptors for spec-compliant OData envelopes
|
|
15
|
+
- `$batch` multi-operation support
|
|
16
|
+
- Decorator-first API — annotate once, get OData for free
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pnpm add @nestjs-odata/core @nestjs-odata/typeorm reflect-metadata
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import 'reflect-metadata'
|
|
28
|
+
import { Module } from '@nestjs/common'
|
|
29
|
+
import { ODataModule } from '@nestjs-odata/core'
|
|
30
|
+
import { TypeOrmODataModule } from '@nestjs-odata/typeorm'
|
|
31
|
+
import { Product } from './product.entity'
|
|
32
|
+
|
|
33
|
+
@Module({
|
|
34
|
+
imports: [
|
|
35
|
+
ODataModule.forRoot({ serviceRoot: '/odata' }),
|
|
36
|
+
TypeOrmODataModule.forFeature([Product]),
|
|
37
|
+
],
|
|
38
|
+
})
|
|
39
|
+
export class AppModule {}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Visit `GET /odata/$metadata` to see the auto-generated EDM.
|
|
43
|
+
|
|
44
|
+
## Documentation
|
|
45
|
+
|
|
46
|
+
Full documentation, guides, and API reference:
|
|
47
|
+
**https://cberd1509.github.io/nestjs-odata/**
|
|
48
|
+
|
|
49
|
+
## Repository
|
|
50
|
+
|
|
51
|
+
https://github.com/cberd1509/nestjs-odata
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|