@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 CHANGED
@@ -1,44 +1,33 @@
1
- ![Data API](.github/social-card.png)
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 robust framework for building data-driven APIs with a focus on CRUD operations. Interface Data API extends the core API interface with specialized functionality for handling database records, making it simple to create RESTful endpoints for your data models.
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
- ajs module imports add data-api@beta
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 basic concepts
24
- - [Data Controllers](./docs/2.data-controllers.md) - Creating and using Data API controllers
25
- - [Routes](./docs/3.routes.md) - Defining routes and endpoints
26
- - [Access Rights](./docs/4.access-rights.md) - Managing read and write access of objects fields
27
- - [Validation](./docs/5.validators.md) - Validating requests data data before processing
28
- - [Listing](./docs/6.listable.md) - Retrieving lists of records with pagination
29
- - [Foreign Keys](./docs/7.foreign-keys.md) - Handling foreign key relationships in data models
30
- - [Filters](./docs/8.filters.md) - Applying filters to data queries
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
 
@@ -9,30 +9,30 @@ exports.default = (0, config_1.defineConfig)({
9
9
  modules: {
10
10
  "data-api": {
11
11
  source: {
12
- type: "local",
13
- path: "../data-api",
14
- installCommand: ["pnpm install", "npx tsc"],
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: "local",
20
- path: "../mongodb",
21
- installCommand: ["pnpm install", "npx tsc"],
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: "local",
27
- path: "../database-decorators",
28
- installCommand: ["pnpm install", "npx tsc"],
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: "local",
34
- path: "../api",
35
- installCommand: ["pnpm install", "npx tsc"],
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,OAAO;gBACb,IAAI,EAAE,aAAa;gBACnB,cAAc,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC;aAC5C;SACF;QACD,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,YAAY;gBAClB,cAAc,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC;aAC5C;SACF;QACD,mBAAmB,EAAE;YACnB,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,wBAAwB;gBAC9B,cAAc,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC;aAC5C;SACF;QACD,GAAG,EAAE;YACH,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,cAAc,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC;aAC5C;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"}
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.2",
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.2",
44
- "@antelopejs/interface-api-util": "^0.0.2",
45
- "@antelopejs/interface-core": "^0.0.2",
46
- "@antelopejs/interface-database": "^0.0.2",
47
- "@antelopejs/interface-database-decorators": "^0.0.2"
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.14.1",
53
- "@biomejs/biome": "2.3.2",
49
+ "@types/node": "^22.19.15",
50
+ "@types/semver": "^7.7.1",
54
51
  "chai": "^4.5.0",
55
- "release-it": "^19.0.2",
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.0.1",
58
- "typescript": "^5.8.3",
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"