nuxt-auto-crud 2.1.3 → 2.1.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
@@ -73,7 +73,7 @@ Nb: Endpoints follow the pattern `/api/_nac/:model`.
73
73
 
74
74
  | Method | Endpoint | Action |
75
75
  | --- | --- | --- |
76
- | **GET** | `/:model` | List records (supports filtering & pagination) |
76
+ | **GET** | `/:model` | List records |
77
77
  | **POST** | `/:model` | Create record with Zod validation |
78
78
  | **GET** | `/:model/:id` | Fetch single record |
79
79
  | **PATCH** | `/:model/:id` | Partial update with validation |
@@ -83,7 +83,7 @@ Nb: Endpoints follow the pattern `/api/_nac/:model`.
83
83
 
84
84
  | Action | HTTP Method | Endpoint | Example Result |
85
85
  | --- | --- | --- | --- |
86
- | **Fetch All** | `GET` | `/api/_nac/users` | List of all users (paginated) |
86
+ | **Fetch All** | `GET` | `/api/_nac/users` | List of all users |
87
87
  | **Create** | `POST` | `/api/_nac/users` | New user record added |
88
88
  | **Fetch One** | `GET` | `/api/_nac/users/1` | Details of user with `id: 1` |
89
89
  | **Update** | `PATCH` | `/api/_nac/users/1` | Partial update to user `1` |
@@ -157,7 +157,7 @@ Enabling `authentication` in the `autoCrud` config protects all **nac** routes (
157
157
  | `realtime` | `false` | Enables/disables real-time capabilities. |
158
158
  | `auth.authentication` | `true` | Requires a valid session for all NAC routes. |
159
159
  | `auth.authorization` | `true` | Enables role/owner-based access checks. |
160
- | `auth.ownerKey` | `'ownerId'` | The column name used to identify the record creator. |
160
+ | `auth.ownerKey` | `'createdBy'` | The column name used to identify the record creator. |
161
161
  | `publicResources` | `{}` | Defines tables and specific columns accessible without auth. |
162
162
  | `nacEndpointPrefix` | `'/api/_nac'` | The base path for NAC routes. Access via `useRuntimeConfig().public.autoCrud`. |
163
163
  | `schemaPath` | `'server/db/schema'` | Location of your Drizzle schema files. |
@@ -170,7 +170,7 @@ autoCrud: {
170
170
  auth: {
171
171
  authentication: true,
172
172
  authorization: true,
173
- ownerKey: 'ownerId',
173
+ ownerKey: 'createdBy',
174
174
  },
175
175
  publicResources: {
176
176
  users: ['id', 'name', 'email'],
@@ -195,7 +195,7 @@ To align with standard application behavior, **nac** automatically filters recor
195
195
 
196
196
  ### Ownership & Permissions
197
197
 
198
- While the implementing app handles the authentication layer, **nac** provides a standardized way to enforce record ownership and granular access.
198
+ While the implementing app handles the authentication & authorization layer, **nac** provides a standardized way to enforce record ownership and granular access.
199
199
 
200
200
  If your middleware populates `event.context.nac` with `resourcePermissions`, **nac** automatically injects the necessary SQL filters.
201
201
 
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-auto-crud",
3
3
  "configKey": "autoCrud",
4
- "version": "2.1.3",
4
+ "version": "2.1.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "unknown"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-auto-crud",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Dynamic RESTful CRUD APIs for Nuxt without code generation, fully schema-driven.",
5
5
  "author": "Cliford Pereira",
6
6
  "license": "MIT",