evo360-types 1.3.74 → 1.3.77

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.
@@ -1,4 +1,6 @@
1
1
  import { z } from "zod";
2
+ export declare const zMedProcedureActionSchema: z.ZodEnum<["CREATE_PROCEDURE", "DELETE_PROCEDURE", "UPDATE_PROCEDURE"]>;
3
+ export declare const zProcedureStatusSchema: z.ZodEnum<["active", "inactive", "draft"]>;
2
4
  export declare const ProcedureTypeSchema: z.ZodObject<z.objectUtil.extendShape<{
3
5
  id: z.ZodString;
4
6
  ref: z.ZodAny;
@@ -1,9 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProcedureSchema = exports.ProcedureTypeSchema = void 0;
3
+ exports.ProcedureSchema = exports.ProcedureTypeSchema = exports.zProcedureStatusSchema = exports.zMedProcedureActionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  // Define Zod schemas for IProcedureType and IProcedure
7
+ // Enums and types
8
+ exports.zMedProcedureActionSchema = zod_1.z.enum([
9
+ "CREATE_PROCEDURE",
10
+ "DELETE_PROCEDURE",
11
+ "UPDATE_PROCEDURE",
12
+ ]);
13
+ exports.zProcedureStatusSchema = zod_1.z.enum(["active", "inactive", "draft"]);
14
+ // Main schemas
7
15
  exports.ProcedureTypeSchema = zod_schemas_1.zFireDocSchema
8
16
  .extend({
9
17
  code: zod_1.z.string().min(1).max(20),
@@ -15,17 +23,17 @@ exports.ProcedureSchema = zod_schemas_1.zFireDocSchema
15
23
  .extend({
16
24
  code: zod_1.z.string().min(1).max(20),
17
25
  name: zod_1.z.string().min(1).max(255),
18
- technical_name: zod_1.z.string(),
19
- status: zod_1.z.enum(["active", "inactive", "draft"]),
26
+ technical_name: zod_1.z.string().min(1).max(255),
27
+ status: exports.zProcedureStatusSchema,
20
28
  type_code: zod_1.z.string().max(20).optional(),
21
29
  type_name: zod_1.z.string().max(255).optional(),
22
- typeRef: zod_1.z.any().optional(),
23
- duration: zod_1.z.number().optional(),
30
+ typeRef: zod_1.z.any().optional(), // FirestoreDocumentReference
31
+ duration: zod_1.z.number().min(0).optional(),
24
32
  color: zod_1.z.string().max(255).optional(),
25
33
  acronym: zod_1.z.string().max(255).optional(),
26
34
  description: zod_1.z.string().max(1024).optional(),
27
35
  tuss: zod_1.z.string().max(255).optional(),
28
- price: zod_1.z.number().optional(),
36
+ price: zod_1.z.number().min(0).optional(),
29
37
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
30
38
  })
31
39
  .passthrough();
@@ -3,6 +3,16 @@ import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
3
3
 
4
4
  // Define Zod schemas for IProcedureType and IProcedure
5
5
 
6
+ // Enums and types
7
+ export const zMedProcedureActionSchema = z.enum([
8
+ "CREATE_PROCEDURE",
9
+ "DELETE_PROCEDURE",
10
+ "UPDATE_PROCEDURE",
11
+ ]);
12
+
13
+ export const zProcedureStatusSchema = z.enum(["active", "inactive", "draft"]);
14
+
15
+ // Main schemas
6
16
  export const ProcedureTypeSchema = zFireDocSchema
7
17
  .extend({
8
18
  code: z.string().min(1).max(20),
@@ -15,17 +25,17 @@ export const ProcedureSchema = zFireDocSchema
15
25
  .extend({
16
26
  code: z.string().min(1).max(20),
17
27
  name: z.string().min(1).max(255),
18
- technical_name: z.string(),
19
- status: z.enum(["active", "inactive", "draft"]),
28
+ technical_name: z.string().min(1).max(255),
29
+ status: zProcedureStatusSchema,
20
30
  type_code: z.string().max(20).optional(),
21
31
  type_name: z.string().max(255).optional(),
22
- typeRef: z.any().optional(),
23
- duration: z.number().optional(),
32
+ typeRef: z.any().optional(), // FirestoreDocumentReference
33
+ duration: z.number().min(0).optional(),
24
34
  color: z.string().max(255).optional(),
25
35
  acronym: z.string().max(255).optional(),
26
36
  description: z.string().max(1024).optional(),
27
37
  tuss: z.string().max(255).optional(),
28
- price: z.number().optional(),
38
+ price: z.number().min(0).optional(),
29
39
  tags: z.array(zTagSchema).nullable().optional(),
30
40
  })
31
41
  .passthrough();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.74",
3
+ "version": "1.3.77",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",