@antelopejs/interface-data-api 0.0.2 → 0.0.4
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 +12 -23
- package/dist/antelope.test.js +12 -12
- package/dist/antelope.test.js.map +1 -1
- package/package.json +13 -17
package/README.md
CHANGED
|
@@ -1,44 +1,33 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
1
|
# Interface Data API
|
|
4
2
|
|
|
5
3
|
<div align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/@antelopejs/interface-data-api"><img src="https://img.shields.io/npm/v/@antelopejs/interface-data-api?style=for-the-badge&labelColor=000000&color=000000" alt="npm"></a>
|
|
6
5
|
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg?style=for-the-badge&labelColor=000000"></a>
|
|
7
6
|
<a href="https://discord.gg/sjK28QHrA7"><img src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000" alt="Discord"></a>
|
|
8
7
|
<a href="./docs/1.introduction.md"><img src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000" alt="Documentation"></a>
|
|
9
8
|
</div>
|
|
10
9
|
|
|
11
|
-
A
|
|
10
|
+
A declarative framework for building data-driven REST APIs with automatic CRUD operations. Interface Data API connects your database models to API endpoints with built-in validation, access control, foreign key resolution, and pagination.
|
|
12
11
|
|
|
13
12
|
## Installation
|
|
14
13
|
|
|
15
14
|
```bash
|
|
16
|
-
|
|
15
|
+
npm install @antelopejs/interface-data-api
|
|
17
16
|
```
|
|
18
17
|
|
|
19
18
|
## Documentation
|
|
20
19
|
|
|
21
20
|
Detailed documentation is available in the `docs` directory:
|
|
22
21
|
|
|
23
|
-
- [Introduction](./docs/1.introduction.md) - Overview and
|
|
24
|
-
- [Data Controllers](./docs/2.data-controllers.md) -
|
|
25
|
-
- [Routes](./docs/3.routes.md) -
|
|
26
|
-
- [Access Rights](./docs/4.access-rights.md) -
|
|
27
|
-
- [
|
|
28
|
-
- [
|
|
29
|
-
- [Foreign Keys](./docs/7.foreign-keys.md) -
|
|
30
|
-
- [Filters](./docs/8.filters.md) -
|
|
31
|
-
|
|
32
|
-
## Current Status
|
|
33
|
-
|
|
34
|
-
This is the development version (`beta`) of the Interface Data API. It is currently in pre-release stage and may undergo changes before the final release. The interface is not considered stable for production use without understanding that breaking changes may occur.
|
|
35
|
-
|
|
36
|
-
## Versions
|
|
37
|
-
|
|
38
|
-
| Version | Link | Status |
|
|
39
|
-
|---------|----------------------------------------------------------------------------------------|-----------------------------------------------|
|
|
40
|
-
| beta | [data-api@beta](https://github.com/AntelopeJS/data-api/tree/main/output/data-api/beta) | Waiting validation from community to go in v1 |
|
|
41
|
-
| 1 | _Not yet released_ | Planned stable release |
|
|
22
|
+
- [Introduction](./docs/1.introduction.md) - Overview, key features, and quick start
|
|
23
|
+
- [Data Controllers](./docs/2.data-controllers.md) - Create and configure data controllers
|
|
24
|
+
- [Routes](./docs/3.routes.md) - Default routes, custom routes, and route options
|
|
25
|
+
- [Access Rights](./docs/4.access-rights.md) - Control field read/write permissions with per-action overrides
|
|
26
|
+
- [Validators](./docs/5.validators.md) - Field-level validation and mandatory fields
|
|
27
|
+
- [Listable Fields](./docs/6.listable.md) - Pagination, pluck modes, and sorting
|
|
28
|
+
- [Foreign Keys](./docs/7.foreign-keys.md) - Establish relationships between tables
|
|
29
|
+
- [Filters](./docs/8.filters.md) - Add filtering capabilities to list endpoints
|
|
30
|
+
- [Modifiers](./docs/9.modifiers.md) - Automatic data transformation with database-decorators
|
|
42
31
|
|
|
43
32
|
## License
|
|
44
33
|
|
package/dist/antelope.test.js
CHANGED
|
@@ -9,30 +9,30 @@ exports.default = (0, config_1.defineConfig)({
|
|
|
9
9
|
modules: {
|
|
10
10
|
"data-api": {
|
|
11
11
|
source: {
|
|
12
|
-
type: "
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
type: "package",
|
|
13
|
+
package: "@antelopejs/data-api",
|
|
14
|
+
version: "1.0.0",
|
|
15
15
|
},
|
|
16
16
|
},
|
|
17
17
|
mongodb: {
|
|
18
18
|
source: {
|
|
19
|
-
type: "
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
type: "package",
|
|
20
|
+
package: "@antelopejs/mongodb",
|
|
21
|
+
version: "1.0.0",
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
database_decorators: {
|
|
25
25
|
source: {
|
|
26
|
-
type: "
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
type: "package",
|
|
27
|
+
package: "@antelopejs/database-decorators",
|
|
28
|
+
version: "1.0.0",
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
api: {
|
|
32
32
|
source: {
|
|
33
|
-
type: "
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
type: "package",
|
|
34
|
+
package: "@antelopejs/api",
|
|
35
|
+
version: "1.0.0",
|
|
36
36
|
},
|
|
37
37
|
config: {
|
|
38
38
|
servers: [{ protocol: "http", host: "127.0.0.1", port: 5010 }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antelope.test.js","sourceRoot":"","sources":["../src/antelope.test.ts"],"names":[],"mappings":";;AAAA,8DAAiE;AACjE,2EAA+D;AAE/D,IAAI,MAAyB,CAAC;AAE9B,kBAAe,IAAA,qBAAY,EAAC;IAC1B,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE;QACP,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"antelope.test.js","sourceRoot":"","sources":["../src/antelope.test.ts"],"names":[],"mappings":";;AAAA,8DAAiE;AACjE,2EAA+D;AAE/D,IAAI,MAAyB,CAAC;AAE9B,kBAAe,IAAA,qBAAY,EAAC;IAC1B,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,iBAAiB;IAC9B,OAAO,EAAE;QACP,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,sBAAsB;gBAC/B,OAAO,EAAE,OAAO;aACjB;SACF;QACD,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,qBAAqB;gBAC9B,OAAO,EAAE,OAAO;aACjB;SACF;QACD,mBAAmB,EAAE;YACnB,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,iCAAiC;gBAC1C,OAAO,EAAE,OAAO;aACjB;SACF;QACD,GAAG,EAAE;YACH,MAAM,EAAE;gBACN,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,iBAAiB;gBAC1B,OAAO,EAAE,OAAO;aACjB;YACD,MAAM,EAAE;gBACN,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;aAC/D;SACF;KACF;IACD,IAAI,EAAE;QACJ,MAAM,EAAE,YAAY;QACpB,KAAK,CAAC,KAAK;YACT,MAAM,GAAG,MAAM,8CAAiB,CAAC,MAAM,EAAE,CAAC;YAC1C,OAAO;gBACL,OAAO,EAAE;oBACP,OAAO,EAAE;wBACP,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE;qBACjC;iBACF;aACF,CAAC;QACJ,CAAC;QACD,KAAK,CAAC,OAAO;YACX,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC;KACF;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/interface-data-api",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "AntelopeJS interface for data API with CRUD controllers and route generation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -24,10 +24,6 @@
|
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
25
|
"default": "./dist/index.js"
|
|
26
26
|
},
|
|
27
|
-
"./*": {
|
|
28
|
-
"types": "./dist/*.d.ts",
|
|
29
|
-
"default": "./dist/*.js"
|
|
30
|
-
},
|
|
31
27
|
"./package.json": "./package.json"
|
|
32
28
|
},
|
|
33
29
|
"scripts": {
|
|
@@ -40,24 +36,24 @@
|
|
|
40
36
|
"test": "pnpm run build && ajs module test ."
|
|
41
37
|
},
|
|
42
38
|
"dependencies": {
|
|
43
|
-
"@antelopejs/interface-api": "^0.0.
|
|
44
|
-
"@antelopejs/interface-api-util": "^0.0.
|
|
45
|
-
"@antelopejs/interface-core": "^0.0.
|
|
46
|
-
"@antelopejs/interface-database": "^0.0.
|
|
47
|
-
"@antelopejs/interface-database-decorators": "^0.0.
|
|
39
|
+
"@antelopejs/interface-api": "^0.0.3",
|
|
40
|
+
"@antelopejs/interface-api-util": "^0.0.4",
|
|
41
|
+
"@antelopejs/interface-core": "^0.0.3",
|
|
42
|
+
"@antelopejs/interface-database": "^0.0.4",
|
|
43
|
+
"@antelopejs/interface-database-decorators": "^0.0.4"
|
|
48
44
|
},
|
|
49
45
|
"devDependencies": {
|
|
46
|
+
"@biomejs/biome": "2.3.2",
|
|
50
47
|
"@types/chai": "^4.3.20",
|
|
51
48
|
"@types/mocha": "^10.0.10",
|
|
52
|
-
"@types/node": "^22.
|
|
53
|
-
"@
|
|
49
|
+
"@types/node": "^22.19.15",
|
|
50
|
+
"@types/semver": "^7.7.1",
|
|
54
51
|
"chai": "^4.5.0",
|
|
55
|
-
"
|
|
52
|
+
"mongodb-memory-server-core": "^10.4.3",
|
|
53
|
+
"release-it": "^19.2.4",
|
|
56
54
|
"release-it-changelogen": "^0.1.0",
|
|
57
|
-
"rimraf": "^6.
|
|
58
|
-
"typescript": "^5.
|
|
59
|
-
"mongodb-memory-server-core": "^10.1.4",
|
|
60
|
-
"@types/semver": "^7.7.0"
|
|
55
|
+
"rimraf": "^6.1.3",
|
|
56
|
+
"typescript": "^5.9.3"
|
|
61
57
|
},
|
|
62
58
|
"publishConfig": {
|
|
63
59
|
"access": "public"
|