diff --git a/package.json b/package.json index c804444..6fb21c1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Transcend Inc.", "name": "@transcend-io/privacy-types", "description": "Core enums and types that can be useful when interacting with Transcend's public APIs.", - "version": "4.110.0", + "version": "4.110.1", "homepage": "https://github.com/transcend-io/privacy-types", "repository": { "type": "git", diff --git a/src/oneTrust/enrichedCodecs.ts b/src/oneTrust/enrichedCodecs.ts index 1baa90b..31bfea9 100644 --- a/src/oneTrust/enrichedCodecs.ts +++ b/src/oneTrust/enrichedCodecs.ts @@ -29,13 +29,36 @@ export const OneTrustEnrichedRisks = t.union([ /** Type override */ export type OneTrustEnrichedRisks = t.TypeOf; +export const OneTrustQuestionComment = t.type({ + comment: t.string, + CreatedBy: t.string, + CreateDate: t.string, +}); + +/** + * A OneTrust comment manually injected to the question + */ +export type OneTrustQuestionComment = t.TypeOf; + +export const OneTrustQuestionComments = t.array(OneTrustQuestionComment); + +/** + * A list of OneTrust comment manually injected to the question + */ +export type OneTrustQuestionComments = t.TypeOf< + typeof OneTrustQuestionComments +>; + /** The default OneTrust Get Assessment question response with enriched risks. */ export const OneTrustEnrichedAssessmentQuestion = t.intersection([ t.type({ ...OneTrustAssessmentQuestion.types[0].props, risks: OneTrustEnrichedRisks, }), - t.partial({ ...OneTrustAssessmentQuestion.types[1].props }), + t.partial({ + ...OneTrustAssessmentQuestion.types[1].props, + comments: OneTrustQuestionComments, + }), ]); /** Type override */