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 new transcend API spec for fetching policies with dynamic variables #141

Merged

Conversation

michaelfarrell76
Copy link
Member

Working on some new endpoints that are included in the transcend consent manager UI API.

There are 2 new APIS that are being exposed:

  1. transcend.setTranscendUiVariables - this allows for setting dynamic variables that can be used to template into the message contents displayed in the Transcend UI or when fetching policies
  2. transcend.getTranscendPolicies returns the ID, title and translated content of a Transcend policy. these may be policies shown on the privacy center, or hidden policies distributed by our privacy center CDN. this content is templated with the same variables set by transcend.setTranscendUiVariables
  3. transcend.getTranscendUiVariables returns the current set of global variables
Screenshot 2024-08-06 at 10 17 05 PM
        transcend
          .setTranscendUiVariables({
            labelName: 'Marshmalt Records',
          })
          .then(() => {
            transcend
              .getTranscendPolicies({
                policyTitles: ['Label Privacy Policy'],
                // variables: { labelName: 'Marshmalt Records' },
              })
              .then(([policy]) => {
                document.getElementById('policy-content').innerHTML =
                  policy.content;
              });
          });

@michaelfarrell76 michaelfarrell76 requested review from eligrey and a team August 7, 2024 05:22
Copy link
Member

@eligrey eligrey left a comment

Choose a reason for hiding this comment

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

lgtm!

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.

2 participants