diff --git a/src/oneTrust/constants.ts b/src/oneTrust/constants.ts index de4cf982..ad249a2a 100644 --- a/src/oneTrust/constants.ts +++ b/src/oneTrust/constants.ts @@ -1,6 +1,6 @@ import { createDefaultCodec } from '@transcend-io/type-utils'; import { OneTrustEnrichedAssessment } from './codecs'; -import { flattenOneTrustAssessment } from './flattenOneTrustAssessment'; +import { flattenOneTrustAssessment } from './helpers'; /** * An object with default values of type OneTrustEnrichedAssessment. It's very diff --git a/src/oneTrust/getListOfOneTrustAssessments.ts b/src/oneTrust/endpoints/getListOfOneTrustAssessments.ts similarity index 97% rename from src/oneTrust/getListOfOneTrustAssessments.ts rename to src/oneTrust/endpoints/getListOfOneTrustAssessments.ts index 2ca9abea..5d848a30 100644 --- a/src/oneTrust/getListOfOneTrustAssessments.ts +++ b/src/oneTrust/endpoints/getListOfOneTrustAssessments.ts @@ -1,5 +1,5 @@ import { Got } from 'got'; -import { logger } from '../logger'; +import { logger } from '../../logger'; import { decodeCodec } from '@transcend-io/type-utils'; import { OneTrustAssessment, diff --git a/src/oneTrust/getOneTrustAssessment.ts b/src/oneTrust/endpoints/getOneTrustAssessment.ts similarity index 100% rename from src/oneTrust/getOneTrustAssessment.ts rename to src/oneTrust/endpoints/getOneTrustAssessment.ts diff --git a/src/oneTrust/getOneTrustRisk.ts b/src/oneTrust/endpoints/getOneTrustRisk.ts similarity index 100% rename from src/oneTrust/getOneTrustRisk.ts rename to src/oneTrust/endpoints/getOneTrustRisk.ts diff --git a/src/oneTrust/endpoints/index.ts b/src/oneTrust/endpoints/index.ts new file mode 100644 index 00000000..7f84cfce --- /dev/null +++ b/src/oneTrust/endpoints/index.ts @@ -0,0 +1,3 @@ +export * from './getListOfOneTrustAssessments'; +export * from './getOneTrustAssessment'; +export * from './getOneTrustRisk'; diff --git a/src/oneTrust/flattenOneTrustAssessment.ts b/src/oneTrust/helpers/flattenOneTrustAssessment.ts similarity index 99% rename from src/oneTrust/flattenOneTrustAssessment.ts rename to src/oneTrust/helpers/flattenOneTrustAssessment.ts index 9702b0fb..89f4743d 100644 --- a/src/oneTrust/flattenOneTrustAssessment.ts +++ b/src/oneTrust/helpers/flattenOneTrustAssessment.ts @@ -7,13 +7,13 @@ import { OneTrustAssessmentSectionHeader, OneTrustRiskCategories, } from '@transcend-io/privacy-types'; -import { extractProperties } from '../helpers'; +import { extractProperties } from '../../helpers'; import { OneTrustEnrichedAssessment, OneTrustEnrichedAssessmentQuestion, OneTrustEnrichedAssessmentSection, OneTrustEnrichedRisk, -} from './codecs'; +} from '../codecs'; // import { DEFAULT_ONE_TRUST_COMBINED_ASSESSMENT } from './constants'; // TODO: will have to use something like csv-stringify diff --git a/src/oneTrust/helpers/index.ts b/src/oneTrust/helpers/index.ts new file mode 100644 index 00000000..504bb11e --- /dev/null +++ b/src/oneTrust/helpers/index.ts @@ -0,0 +1,3 @@ +export * from './flattenOneTrustAssessment'; +export * from './parseCliSyncOtArguments'; +export * from './writeOneTrustAssessment'; diff --git a/src/oneTrust/parseCliSyncOtArguments.ts b/src/oneTrust/helpers/parseCliSyncOtArguments.ts similarity index 96% rename from src/oneTrust/parseCliSyncOtArguments.ts rename to src/oneTrust/helpers/parseCliSyncOtArguments.ts index 6ab39a86..feabaf44 100644 --- a/src/oneTrust/parseCliSyncOtArguments.ts +++ b/src/oneTrust/helpers/parseCliSyncOtArguments.ts @@ -1,7 +1,7 @@ -import { logger } from '../logger'; +import { logger } from '../../logger'; import colors from 'colors'; import yargs from 'yargs-parser'; -import { OneTrustFileFormat, OneTrustPullResource } from '../enums'; +import { OneTrustFileFormat, OneTrustPullResource } from '../../enums'; const VALID_RESOURCES = Object.values(OneTrustPullResource); const VALID_FILE_FORMATS = Object.values(OneTrustFileFormat); diff --git a/src/oneTrust/writeOneTrustAssessment.ts b/src/oneTrust/helpers/writeOneTrustAssessment.ts similarity index 92% rename from src/oneTrust/writeOneTrustAssessment.ts rename to src/oneTrust/helpers/writeOneTrustAssessment.ts index 56e29fa9..2867ab34 100644 --- a/src/oneTrust/writeOneTrustAssessment.ts +++ b/src/oneTrust/helpers/writeOneTrustAssessment.ts @@ -1,12 +1,12 @@ -import { logger } from '../logger'; +import { logger } from '../../logger'; import colors from 'colors'; -import { OneTrustFileFormat } from '../enums'; +import { OneTrustFileFormat } from '../../enums'; import fs from 'fs'; import { flattenOneTrustAssessment } from './flattenOneTrustAssessment'; -import { DEFAULT_ONE_TRUST_ASSESSMENT_CSV_HEADER } from './constants'; +import { DEFAULT_ONE_TRUST_ASSESSMENT_CSV_HEADER } from '../constants'; import { decodeCodec } from '@transcend-io/type-utils'; import { OneTrustAssessmentCsvRecord } from '@transcend-io/privacy-types'; -import { OneTrustEnrichedAssessment } from './codecs'; +import { OneTrustEnrichedAssessment } from '../codecs'; /** * Write the assessment to disk at the specified file path. diff --git a/src/oneTrust/index.ts b/src/oneTrust/index.ts index 5c921384..4f127531 100644 --- a/src/oneTrust/index.ts +++ b/src/oneTrust/index.ts @@ -1,6 +1,3 @@ export * from './createOneTrustGotInstance'; -export * from './getOneTrustAssessment'; -export * from './writeOneTrustAssessment'; -export * from './parseCliSyncOtArguments'; -export * from './getListOfOneTrustAssessments'; -export * from './getOneTrustRisk'; +export * from './helpers'; +export * from './endpoints';