spaps-types 1.0.15 → 1.0.17

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.
@@ -9,8 +9,8 @@ exports.secureMessageMetadataSchema = defaultMetadataSchema;
9
9
  * Consumers can pass a custom metadata schema to get typed inference.
10
10
  */
11
11
  const createSecureMessageRequestSchema = (metadataSchema = defaultMetadataSchema) => zod_1.z.object({
12
- patientId: zod_1.z.string().min(1, 'patientId is required'),
13
- practitionerId: zod_1.z.string().min(1, 'practitionerId is required'),
12
+ patientId: zod_1.z.string().uuid('patientId must be a valid UUID'),
13
+ practitionerId: zod_1.z.string().uuid('practitionerId must be a valid UUID'),
14
14
  content: zod_1.z.string().min(1, 'content is required'),
15
15
  metadata: metadataSchema.optional()
16
16
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spaps-types",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Shared TypeScript types for SPAPS ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -10,8 +10,8 @@ export const createSecureMessageRequestSchema = <MetadataSchema extends z.ZodTyp
10
10
  metadataSchema: MetadataSchema = defaultMetadataSchema as unknown as MetadataSchema
11
11
  ) =>
12
12
  z.object({
13
- patientId: z.string().min(1, 'patientId is required'),
14
- practitionerId: z.string().min(1, 'practitionerId is required'),
13
+ patientId: z.string().uuid('patientId must be a valid UUID'),
14
+ practitionerId: z.string().uuid('practitionerId must be a valid UUID'),
15
15
  content: z.string().min(1, 'content is required'),
16
16
  metadata: metadataSchema.optional()
17
17
  });