Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds request helpers to submit a privacy request #86

Merged
merged 2 commits into from Dec 4, 2022

Conversation

michaelfarrell76
Copy link
Member

@michaelfarrell76 michaelfarrell76 commented Dec 4, 2022

Related Issues

New updates:

  • New helper function mapCsvRowsToRequestInput maps raw CSV rows to the privacy request input shape.
  • New helper function submitPrivacyRequest makes a call to sombra to submit the request.
import { createSombraGotInstance, submitPrivacyRequest } from '@transcend-io/cli';

 const sombra = await createSombraGotInstance(
    'https://api.transcend.io',
    TRANSCEND_API_KEY,
    SOMBRA_API_KEY,
  );
  
const request = await submitPrivacyRequest(sombra, {
  email: 'mike@transcend.io',
  emailIsVerified: true,
  isSilent: true,
  coreIdentifier: '12345',
  requestType: 'ERASURE',
  subjectType: 'Customer',
  // locale: 'en',
  // status: 'COMPLETED',
  // createdAt: new Date().toISOString(),
  // dataSiloId: ['20f976de-453d-4fd2-b645-8cc3540fca6b'],
},  {
  details: `Uploaded by Transcend cli`,
  isTest: true,
  additionalAttributes: [{ key: 'test', values: ['dog', 'cat'] }],
});

@height
Copy link

height bot commented Dec 4, 2022

This pull request has been linked to 1 task:

💡Tip: Add "Close T-13685" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

@michaelfarrell76 michaelfarrell76 merged commit c970052 into main Dec 4, 2022
@delete-merged-branch delete-merged-branch bot deleted the michaelfarrell76/helpers-submit branch December 4, 2022 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants