Skip to content

Commit

Permalink
default for pushing to transcend is json
Browse files Browse the repository at this point in the history
  • Loading branch information
abrantesarthur committed Jan 18, 2025
1 parent a4b6ea7 commit 8ab3780
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ The API key needs the following scopes when pushing the various resource types:
| transcendAuth | The Transcend API Key to with the scopes necessary to access Transcend's Public APIs. | string | N/A | false |
| transcendUrl | URL of the Transcend backend. Use https://api.us.transcend.io for US hosting. | string - URL | https://api.transcend.io | false |
| file | Path to the file to pull the resource into. Its format must match the fileFormat argument. | string | N/A | false |
| fileFormat | The format of the output file. | string | csv | false |
| fileFormat | The format of the output file. | string | json | false |
| resource | The resource to pull from OneTrust. For now, only assessments is supported. | string | assessments | false |
| dryRun | Whether to export the resource to a file rather than sync to Transcend. | boolean | false | false |
| debug | Whether to print detailed logs in case of error. | boolean | false | false |
Expand Down
4 changes: 0 additions & 4 deletions src/oneTrust/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { createDefaultCodec } from '@transcend-io/type-utils';
import { OneTrustEnrichedAssessment } from '../codecs';
import {
OneTrustAssessmentQuestionResponses,
OneTrustAssessmentResponses,
} from '@transcend-io/privacy-types';
import { flattenOneTrustAssessment } from './flattenOneTrustAssessment';

/**
Expand Down
6 changes: 3 additions & 3 deletions src/oneTrust/helpers/parseCliSyncOtArguments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const parseCliSyncOtArguments = (): OneTrustCliArguments => {
boolean: ['debug', 'dryRun'],
default: {
resource: OneTrustPullResource.Assessments,
fileFormat: OneTrustFileFormat.Csv,
fileFormat: OneTrustFileFormat.Json,
debug: false,
dryRun: false,
transcendUrl: 'https://api.transcend.io',
Expand Down Expand Up @@ -85,10 +85,10 @@ export const parseCliSyncOtArguments = (): OneTrustCliArguments => {
}

// Can only sync to Transcend via a CSV file format!
if (!dryRun && fileFormat !== OneTrustFileFormat.Csv) {
if (!dryRun && fileFormat !== OneTrustFileFormat.Json) {
logger.error(
colors.red(
`The "fileFormat" parameter must equal ${OneTrustFileFormat.Csv} to sync resources to Transcend.`,
`The "fileFormat" parameter must equal ${OneTrustFileFormat.Json} to sync resources to Transcend.`,
),
);
return process.exit(1);
Expand Down

0 comments on commit 8ab3780

Please sign in to comment.