Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
25 changes: 24 additions & 1 deletion src/oneTrust/enrichedCodecs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,36 @@ export const OneTrustEnrichedRisks = t.union([
/** Type override */
export type OneTrustEnrichedRisks = t.TypeOf<typeof OneTrustEnrichedRisks>;

export const OneTrustQuestionComment = t.type({
comment: t.string,
CreatedBy: t.string,
CreateDate: t.string,
Comment on lines +34 to +35
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This capitalization is different than I've seen on other one trust types. Is there a typo or is one trust just not consistent?

(I noticed when I was about to submit my review that I was also not consistent--my other comment says OneTrust 😂)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question. yeah, unfortunately this is correct 😆 That's how OneTrust gives it to us.

});

/**
* A OneTrust comment manually injected to the question
*/
export type OneTrustQuestionComment = t.TypeOf<typeof OneTrustQuestionComment>;

export const OneTrustQuestionComments = t.array(OneTrustQuestionComment);

/**
* A list of OneTrust comment manually injected to the question
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: comment -> comments

I'm also not totally sure what you mean by manually injected--is this because the question didn't originally come with these comments when we got it from OneTrust and we're attaching them ourselves? Maybe something like "A list of OneTrust comments related to the question" is clear enough?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. It was manually injected by the customer. Basically we can pull assessments directly from OneTrust, or download them from OneTrust into a json file, then push them to Transcend from this file. The customer injected the file with these comments.

*/
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 */
Expand Down