From 89f5bcf56a925a724d08804ca7cdb1bee7eadd44 Mon Sep 17 00:00:00 2001 From: Meike P <33579339+damienxy@users.noreply.github.com> Date: Thu, 15 Dec 2022 17:02:02 +0100 Subject: [PATCH] fix: add optional 'errors' property to entry reference return type (#1595) --- lib/entities/entry.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/entities/entry.ts b/lib/entities/entry.ts index e7b96a7033..1a0c9c7a42 100644 --- a/lib/entities/entry.ts +++ b/lib/entities/entry.ts @@ -22,11 +22,24 @@ export type EntryProps = { export type CreateEntryProps = Omit, 'sys'> +export type EntryReferenceError = { + sys: { + type: 'error' + id: 'notResolvable' + } + details: { + type: 'Link' + linkType: 'Entry' | 'Asset' + id: string + } +} + export interface EntryReferenceProps extends CollectionProp { includes?: { Entry?: EntryProps[] Asset?: AssetProps[] } + errors?: EntryReferenceError[] } export type EntryReferenceOptionsProps = {