Skip to content

Commit

Permalink
Relax Relationship with null
Browse files Browse the repository at this point in the history
  • Loading branch information
EHadoux committed Jul 10, 2023
1 parent 0cd074c commit eb32b2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scribelabsai/amazon-trp",
"version": "3.0.2",
"version": "3.0.3",
"description": "Amazon Textract Response Parser library for Node.",
"type": "module",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -59,4 +59,4 @@
"zod": "^3.21.4",
"commander": "^11.0.0"
}
}
}
3 changes: 2 additions & 1 deletion src/BlockStruct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const SelectionElementBlockSchema = BlockBaseSchema.extend({
Ids: string().array(),
})
.array()
.optional(),
.optional()
.nullable(),
SelectionStatus: literal('SELECTED').or(literal('NOT_SELECTED')),
});
export type SelectionElementBlock = zinfer<typeof SelectionElementBlockSchema>;
Expand Down
2 changes: 1 addition & 1 deletion src/Document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Document {
const issue = ret.error.issues[0];
if (issue)
throw new ParseError(
`${issue?.path}: ${issue?.message} @${
`${issue?.path}: ${issue.code} - ${issue?.message} @${
typeof issue.path[0] === 'number' ? JSON.stringify(blocks[issue?.path?.[0]]) : ''
}`
);
Expand Down

0 comments on commit eb32b2b

Please sign in to comment.