@drax/audit-back 0.50.0 → 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.
@@ -3,7 +3,7 @@ import { CrudSchemaBuilder } from "@drax/crud-back";
3
3
  import { AuditSchema, AuditBaseSchema } from '../schemas/AuditSchema.js';
4
4
  async function AuditFastifyRoutes(fastify, options) {
5
5
  const controller = new AuditController();
6
- const schemas = new CrudSchemaBuilder(AuditSchema, AuditBaseSchema, AuditBaseSchema, 'Audit', 'openApi3', ['Audit']);
6
+ const schemas = new CrudSchemaBuilder(AuditSchema, AuditBaseSchema, AuditBaseSchema, 'Audit', 'openapi-3.0', ['Audit']);
7
7
  fastify.get('/api/audits', { schema: schemas.paginateSchema }, (req, rep) => controller.paginate(req, rep));
8
8
  fastify.get('/api/audits/find', { schema: schemas.findSchema }, (req, rep) => controller.find(req, rep));
9
9
  fastify.get('/api/audits/search', { schema: schemas.searchSchema }, (req, rep) => controller.search(req, rep));
@@ -30,7 +30,7 @@ const AuditBaseSchema = z.object({
30
30
  const AuditSchema = AuditBaseSchema
31
31
  .extend({
32
32
  _id: z.string(),
33
- createdAt: z.date(),
33
+ createdAt: z.iso.datetime(),
34
34
  });
35
35
  export default AuditSchema;
36
36
  export { AuditSchema, AuditBaseSchema };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.50.0",
6
+ "version": "1.0.0",
7
7
  "description": "Audit backend",
8
8
  "main": "dist/index.js",
9
9
  "types": "types/index.d.ts",
@@ -22,8 +22,8 @@
22
22
  "author": "Cristian Incarnato & Drax Team",
23
23
  "license": "ISC",
24
24
  "dependencies": {
25
- "@drax/crud-back": "^0.50.0",
26
- "@drax/crud-share": "^0.50.0",
25
+ "@drax/crud-back": "^1.0.0",
26
+ "@drax/crud-share": "^1.0.0",
27
27
  "mongoose": "^8.21.0",
28
28
  "mongoose-paginate-v2": "^1.8.3"
29
29
  },
@@ -39,5 +39,5 @@
39
39
  "tsc-alias": "^1.8.10",
40
40
  "typescript": "^5.6.2"
41
41
  },
42
- "gitHead": "92cb8fa7600090791ace14afa4518f3f4c7113e1"
42
+ "gitHead": "8e60f7548448f339e7e9bb665ceacd3e051ef32e"
43
43
  }
@@ -6,7 +6,7 @@ import {AuditSchema, AuditBaseSchema} from '../schemas/AuditSchema.js'
6
6
  async function AuditFastifyRoutes(fastify, options) {
7
7
 
8
8
  const controller: AuditController = new AuditController()
9
- const schemas = new CrudSchemaBuilder(AuditSchema, AuditBaseSchema,AuditBaseSchema, 'Audit', 'openApi3', ['Audit']);
9
+ const schemas = new CrudSchemaBuilder(AuditSchema, AuditBaseSchema,AuditBaseSchema, 'Audit', 'openapi-3.0', ['Audit']);
10
10
 
11
11
  fastify.get('/api/audits', {schema: schemas.paginateSchema}, (req,rep) => controller.paginate(req,rep))
12
12
 
@@ -35,7 +35,7 @@ const AuditBaseSchema = z.object({
35
35
  const AuditSchema = AuditBaseSchema
36
36
  .extend({
37
37
  _id: z.string(),
38
- createdAt: z.date(),
38
+ createdAt: z.iso.datetime(),
39
39
 
40
40
  })
41
41