diff --git a/src/db/models/externalReference.ts b/src/db/models/externalReference.ts index dd2c2e09..9f8ff6ed 100644 --- a/src/db/models/externalReference.ts +++ b/src/db/models/externalReference.ts @@ -17,23 +17,29 @@ export const EXTERNAL_REFERENCE_ID = brandedType( t.number ); -export const EXTERNAL_REFERENCE_IMPORT_INFORMATION = t.intersection([ - t.type({ - inferred: t.array( +export const EXTERNAL_REFERENCE_IMPORT_INFORMATION = t.partial({ + inferred: t.array( + t.intersection([ t.type({ key: t.string, reason: t.string, - }) - ), - }), - t.partial({ - transferred: t.array( + }), + t.partial({ + valueId: t.any, + }), + ]) + ), + transferred: t.array( + t.intersection([ t.type({ key: t.string, - }) - ), - }), -]); + }), + t.partial({ + valueId: t.any, + }), + ]) + ), +}); export default defineIDModel({ tableName: 'externalReference',