evo360-types 1.3.74 → 1.3.78

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,5 +1,7 @@
1
1
  import { z } from "zod";
2
- export declare const ProcedureTypeSchema: z.ZodObject<z.objectUtil.extendShape<{
2
+ export declare const zMedProcedureActionSchema: z.ZodEnum<["CREATE_PROCEDURE", "DELETE_PROCEDURE", "UPDATE_PROCEDURE"]>;
3
+ export declare const zProcedureStatusSchema: z.ZodEnum<["active", "inactive", "draft"]>;
4
+ export declare const zProcedureTypeSchema: z.ZodObject<z.objectUtil.extendShape<{
3
5
  id: z.ZodString;
4
6
  ref: z.ZodAny;
5
7
  tenant: z.ZodString;
@@ -90,7 +92,7 @@ export declare const ProcedureTypeSchema: z.ZodObject<z.objectUtil.extendShape<{
90
92
  category?: string | null | undefined;
91
93
  }>, "many">>>;
92
94
  }>, z.ZodTypeAny, "passthrough">>;
93
- export declare const ProcedureSchema: z.ZodObject<z.objectUtil.extendShape<{
95
+ export declare const zProcedureSchema: z.ZodObject<z.objectUtil.extendShape<{
94
96
  id: z.ZodString;
95
97
  ref: z.ZodAny;
96
98
  tenant: z.ZodString;
@@ -1,31 +1,39 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProcedureSchema = exports.ProcedureTypeSchema = void 0;
3
+ exports.zProcedureSchema = exports.zProcedureTypeSchema = 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
- exports.ProcedureTypeSchema = zod_schemas_1.zFireDocSchema
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
15
+ exports.zProcedureTypeSchema = zod_schemas_1.zFireDocSchema
8
16
  .extend({
9
17
  code: zod_1.z.string().min(1).max(20),
10
18
  name: zod_1.z.string().min(1).max(255),
11
19
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
12
20
  })
13
21
  .passthrough();
14
- exports.ProcedureSchema = zod_schemas_1.zFireDocSchema
22
+ exports.zProcedureSchema = 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,7 +3,17 @@ import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
3
3
 
4
4
  // Define Zod schemas for IProcedureType and IProcedure
5
5
 
6
- export const ProcedureTypeSchema = zFireDocSchema
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
16
+ export const zProcedureTypeSchema = zFireDocSchema
7
17
  .extend({
8
18
  code: z.string().min(1).max(20),
9
19
  name: z.string().min(1).max(255),
@@ -11,21 +21,21 @@ export const ProcedureTypeSchema = zFireDocSchema
11
21
  })
12
22
  .passthrough();
13
23
 
14
- export const ProcedureSchema = zFireDocSchema
24
+ export const zProcedureSchema = 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.78",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",