From 1e5b23db811d60565932715e64f8826273c0e83f Mon Sep 17 00:00:00 2001 From: Phan Shi Yu Date: Thu, 2 May 2024 14:54:18 +0800 Subject: [PATCH] fix: array items cannot be undefined --- src/4.0/types.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/4.0/types.ts b/src/4.0/types.ts index 15b615c1..42516006 100644 --- a/src/4.0/types.ts +++ b/src/4.0/types.ts @@ -224,13 +224,11 @@ export const V4Document = _W3cVerifiableCredential // [Optional] Attachments attachments: z .array( - z - .object({ - data: z.string().describe("Base64 encoding of this attachment"), - fileName: z.string().min(1).describe("Name of this attachment, with appropriate extensions"), - mimeType: z.string().min(1).describe("Media type (or MIME type) of this attachment"), - }) - .optional() + z.object({ + data: z.string().describe("Base64 encoding of this attachment"), + fileName: z.string().min(1).describe("Name of this attachment, with appropriate extensions"), + mimeType: z.string().min(1).describe("Media type (or MIME type) of this attachment"), + }) ) .optional(), })