@minded-ai/mindedjs 2.0.39-beta.1 → 2.0.39-beta.2

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.
@@ -41,6 +41,7 @@ The `minded-parse-documents` library tool is available in the Minded platform. A
41
41
  ## Programmatic Usage
42
42
 
43
43
  ### Structured Extraction
44
+ Note: use nullable() instead of optional() for fields that are not required.
44
45
 
45
46
  ```typescript
46
47
  import { extractFromDocument } from '@minded-ai/mindedjs';
@@ -49,7 +50,7 @@ import { z } from 'zod';
49
50
  const schema = z.object({
50
51
  name: z.string(),
51
52
  email: z.string(),
52
- phoneNumber: z.string().optional(),
53
+ phoneNumber: z.string().nullable(),
53
54
  });
54
55
 
55
56
  const result = await extractFromDocument({
@@ -175,7 +176,7 @@ const idSchema = z.object({
175
176
  fullName: z.string(),
176
177
  dateOfBirth: z.string(),
177
178
  documentNumber: z.string(),
178
- expiryDate: z.string().optional(),
179
+ expiryDate: z.string().nullable(),
179
180
  });
180
181
 
181
182
  const result = await extractFromDocument({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minded-ai/mindedjs",
3
- "version": "2.0.39-beta.1",
3
+ "version": "2.0.39-beta.2",
4
4
  "description": "MindedJS is a TypeScript library for building agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",