Skip to content

Commit

Permalink
move constants to heleprs
Browse files Browse the repository at this point in the history
  • Loading branch information
abrantesarthur committed Jan 14, 2025
1 parent 6ec35ba commit 5f94a17
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/oneTrust/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { createDefaultCodec } from '@transcend-io/type-utils';
import { OneTrustEnrichedAssessment } from '../codecs';
import { flattenOneTrustAssessment } from '.';

/**
* An object with default values of type OneTrustEnrichedAssessment. It's very
* valuable when converting assessments to CSV, as it contains all keys that
* make up the CSV header in the expected order
*/
const DEFAULT_ONE_TRUST_COMBINED_ASSESSMENT: OneTrustEnrichedAssessment =
createDefaultCodec(OneTrustEnrichedAssessment);

/** The header of the OneTrust ASsessment CSV file */
export const DEFAULT_ONE_TRUST_ASSESSMENT_CSV_HEADER = Object.keys(
flattenOneTrustAssessment(DEFAULT_ONE_TRUST_COMBINED_ASSESSMENT),
);

0 comments on commit 5f94a17

Please sign in to comment.