prisma-generator-express 1.5.0 → 1.6.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 CHANGED
@@ -161,21 +161,20 @@ The following properties can be attached to the `req` object to control the beha
161
161
  | `outputValidation` | ZodTypeAny | (Optional) A Zod schema used to validate the data returned from the Prisma query before sending it to the client. This helps ensure the response adheres to expected data formats. |
162
162
  | `omitOutputValidation` | Boolean | (Optional) A flag that, if set to `true`, disables output validation even if a Zod schema is provided. |
163
163
 
164
- ## Roadmap
165
-
166
- | Function | Supported | Notes |
167
- | -------------- | ------------------ | ---------- |
168
- | `Model router` | :white_check_mark: | Available. |
169
- | `findUnique` | :white_check_mark: | Available. |
170
- | `findFirst` | :white_check_mark: | Available. |
171
- | `findMany` | :white_check_mark: | Available. |
172
- | `create` | :white_check_mark: | Available. |
173
- | `createMany` | :white_check_mark: | Available. |
174
- | `update` | :white_check_mark: | Available. |
175
- | `updateMany` | :white_check_mark: | Available. |
176
- | `upsert` | :white_check_mark: | Available. |
177
- | `delete` | :white_check_mark: | Available. |
178
- | `deleteMany` | :white_check_mark: | Available. |
179
- | `aggregate` | :white_check_mark: | Available. |
180
- | `count` | :white_check_mark: | Available. |
181
- | `groupBy` | :white_check_mark: | Available. |
164
+ ## Router Schema
165
+
166
+ | Function | Method | URL |
167
+ | ------------ | -------- | ------------ |
168
+ | `findUnique` | `GET` | `/:id` |
169
+ | `findFirst` | `GET` | `/first` |
170
+ | `findMany` | `GET` | `/` |
171
+ | `create` | `POST` | `/` |
172
+ | `createMany` | `POST` | `/many` |
173
+ | `update` | `PUT` | `/` |
174
+ | `updateMany` | `PUT` | `/many` |
175
+ | `upsert` | `PATCH` | `/` |
176
+ | `delete` | `DELETE` | `/` |
177
+ | `deleteMany` | `DELETE` | `/many` |
178
+ | `aggregate` | `GET` | `/aggregate` |
179
+ | `count` | `GET` | `/count` |
180
+ | `groupBy` | `GET` | `/groupby` |
@@ -23,7 +23,7 @@ export interface FindFirstRequest extends Request {
23
23
  outputValidation?: ZodTypeAny;
24
24
  omitOutputValidation?: boolean;
25
25
  passToNext?: boolean;
26
- locals: {
26
+ locals?: {
27
27
  data?: ${modelName} | null
28
28
  }
29
29
  }
@@ -23,7 +23,7 @@ export interface FindManyRequest extends Request {
23
23
  outputValidation?: ZodTypeAny;
24
24
  omitOutputValidation?: boolean;
25
25
  passToNext?: boolean;
26
- locals: {
26
+ locals?: {
27
27
  data?: ${modelName}[]
28
28
  }
29
29
  }
@@ -23,7 +23,7 @@ export interface FindUniqueRequest extends Request {
23
23
  outputValidation?: ZodTypeAny;
24
24
  omitOutputValidation?: boolean;
25
25
  passToNext?: boolean;
26
- locals: {
26
+ locals?: {
27
27
  data?: ${modelName} | null
28
28
  }
29
29
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prisma-generator-express",
3
3
  "description": "Prisma generator of Express CRUD API",
4
- "version": "1.5.0",
4
+ "version": "1.6.0",
5
5
  "main": "dist/generator.js",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -31,7 +31,7 @@ export interface FindFirstRequest extends Request {
31
31
  outputValidation?: ZodTypeAny;
32
32
  omitOutputValidation?: boolean;
33
33
  passToNext?: boolean;
34
- locals: {
34
+ locals?: {
35
35
  data?: ${modelName} | null
36
36
  }
37
37
  }
@@ -31,7 +31,7 @@ export interface FindManyRequest extends Request {
31
31
  outputValidation?: ZodTypeAny;
32
32
  omitOutputValidation?: boolean;
33
33
  passToNext?: boolean;
34
- locals: {
34
+ locals?: {
35
35
  data?: ${modelName}[]
36
36
  }
37
37
  }
@@ -31,7 +31,7 @@ export interface FindUniqueRequest extends Request {
31
31
  outputValidation?: ZodTypeAny;
32
32
  omitOutputValidation?: boolean;
33
33
  passToNext?: boolean;
34
- locals: {
34
+ locals?: {
35
35
  data?: ${modelName} | null
36
36
  }
37
37
  }