Skip to content

Commit

Permalink
Change externalReference model
Browse files Browse the repository at this point in the history
To match against data inside database changing importInformation model
  • Loading branch information
Delgee committed Feb 15, 2024
1 parent ff951be commit 3866a57
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/db/models/externalReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,29 @@ export const EXTERNAL_REFERENCE_ID = brandedType<number, ExternalReferenceId>(
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',
Expand Down

0 comments on commit 3866a57

Please sign in to comment.