Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions main/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@
"integrations": {
"gtm": {
"tagId": "GTM-W7FRLJ"
},
"onetrust": {
"domainScript": "96e22fd8-d619-4cdd-a3c6-d51529d21faf",
"categoryId": "C0002",
"scriptSource": "https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
},
"heap": {
"appId": "1279799279"
},
"adobe": {
"launchUrl": "https://assets.adobedtm.com/6bb3f7663515/7006851c9849/launch-af624fe9e34f.min.js"
}
},
"api": {
Expand Down
File renamed without changes.
124 changes: 124 additions & 0 deletions main/ui/auth0-docs-ui-1.10.0.umd.js

Large diffs are not rendered by default.

150 changes: 0 additions & 150 deletions main/ui/auth0-docs-ui-1.9.4.umd.js

This file was deleted.

2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ui",
"private": true,
"version": "1.9.4",
"version": "1.10.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
4 changes: 0 additions & 4 deletions ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import './index.css';
import { NavActions } from '@/components';
import { initFeedbackListeners } from '@/lib/feedback';
import { overrideHistoryMethods } from '@/lib/history';
import { initOneTrust } from '@/lib/one-trust';
import { initSentry } from '@/lib/sentry';
import { initRootStore } from '@/stores';
import { addResizeObserver } from '@/lib/resize-observer';
Expand Down Expand Up @@ -36,9 +35,6 @@ async function main() {
return;
}

// Initialize one-trust for cookie-consent management
initOneTrust();

// Initialize sentry for error tracking and monitoring
initSentry();

Expand Down
29 changes: 0 additions & 29 deletions ui/src/lib/adobe.ts

This file was deleted.

58 changes: 3 additions & 55 deletions ui/src/lib/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { config } from './config';

// Type declaration only. The window.heap object is injected at runtime by
// Mintlify's Heap integration (configured in docs.json); this interface tells
// TypeScript its shape so callers like feedback.ts can use window.heap.track().
interface Heap {
track: (event: string, properties?: object) => void;
identify: (identity: string) => void;
Expand All @@ -19,56 +20,3 @@ declare global {
heap: Heap;
}
}

export function heap(heapId: string): void {
// load heap analytics script
const script = document.createElement('script');
script.innerHTML = `window.heapReadyCb=window.heapReadyCb||[],window.heap=window.heap||[],
heap.load=function(e,t){window.heap.envId=e,window.heap.clientConfig=t=t||{},
window.heap.clientConfig.shouldFetchServerConfig=!1;
var a=document.createElement("script");
a.type="text/javascript",a.async=!0,a.crossOrigin="anonymous",a.src="https://cdn.us.heap-api.com/config/"+e+"/heap_config.js";
var r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(a,r);
var n=["init",
"startTracking",
"stopTracking",
"track","resetIdentity",
"identify","identifyHashed",
"getSessionId","getUserId","getIdentity",
"addUserProperties","addEventProperties",
"removeEventProperty","clearEventProperties",
"addAccountProperties",
"addAdapter",
"addTransformer",
"addTransformerFn",
"onReady",
"addPageviewProperties",
"removePageviewProperty",
"clearPageviewProperties",
"trackPageview"],
i=function(e){return function(){var t=Array.prototype.slice.call(arguments,0);
window.heapReadyCb.push({name:e,fn:function(){heap[e]&&heap[e].apply(heap,t)}})}};
for(var p=0;p<n.length;p++)heap[n[p]]=i(n[p])};
heap.load("${heapId}");`;

script.id = 'heap-script';
// Important: Set type to 'text/plain' to prevent immediate execution
// The actual execution will be controlled by OneTrust based on user consent
script.type = 'text/plain';
script.classList.add('consent-required:C0002'); // needed for one-trust
script.async = true;
script.crossOrigin = 'anonymous';

document.body.append(script);
}

export function loadHeapScript(): void {
if (typeof window === 'undefined') return;

if (!config.heapAnalytics.enabled || !config.heapAnalytics.appId) {
console.log('Heap analytics is disabled or appId is missing.');
return;
}

heap(config.heapAnalytics.appId);
}
51 changes: 0 additions & 51 deletions ui/src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -1,102 +1,51 @@
export interface EnvConfig {
apiBaseUrl: string;
dashboardBaseUrl: string;
heapAnalytics: {
appId: string;
enabled: boolean;
};
sentry: {
dsn: string;
enabled: boolean;
release: string;
environment: string;
loaderScript: string;
};
oneTrust: {
enabled: boolean;
domainId: string;
};
adobeTagManager: {
enabled: boolean;
loaderScript: string;
};
}

type Env = 'prod' | 'staging' | 'dev' | 'local';

const devConfig: EnvConfig = {
apiBaseUrl: 'https://tus.auth0.com/docs/v2',
dashboardBaseUrl: 'https://manage.tus.auth0.com',
heapAnalytics: {
enabled: true,
appId: '2269341915',
},
sentry: {
enabled: true,
dsn: 'https://8eae506d264532942aace9ecc223a526@o27592.ingest.us.sentry.io/4510008367972352',
release: 'docs-v2-tus',
environment: 'tus',
loaderScript: 'https://js.sentry-cdn.com/8eae506d264532942aace9ecc223a526.min.js'
},
oneTrust: {
enabled: true,
domainId: '96e22fd8-d619-4cdd-a3c6-d51529d21faf-test',
},
adobeTagManager: {
enabled: true,
loaderScript:
'https://assets.adobedtm.com/6bb3f7663515/7006851c9849/launch-b7216a0e70ca-development.min.js',
},
};

const env: { [key in Env]: EnvConfig } = {
prod: {
apiBaseUrl: 'https://auth0.com/docs/v2',
dashboardBaseUrl: 'https://manage.auth0.com',
heapAnalytics: {
enabled: true,
appId: '1279799279',
},
sentry: {
enabled: true,
dsn: 'https://d433d747a8af0820757f35be62ee08be@o27592.ingest.us.sentry.io/4509985515241472',
release: 'docs-v2',
environment: 'prod',
loaderScript: 'https://js.sentry-cdn.com/d433d747a8af0820757f35be62ee08be.min.js'
},
oneTrust: {
enabled: true,
domainId: '96e22fd8-d619-4cdd-a3c6-d51529d21faf',
},
adobeTagManager: {
enabled: true,
loaderScript:
'https://assets.adobedtm.com/6bb3f7663515/7006851c9849/launch-af624fe9e34f.min.js',
},
},
staging: {
apiBaseUrl: 'https://sus.auth0.com/docs/v2',
dashboardBaseUrl: 'https://manage.sus.auth0.com',
heapAnalytics: {
enabled: true,
appId: '2269341915',
},
sentry: {
enabled: true,
dsn: 'https://0fe11b3e3241a0986fc2755ca26fbe79@o27592.ingest.us.sentry.io/4510008371970048',
release: 'docs-v2-sus',
environment: 'sus',
loaderScript: 'https://js.sentry-cdn.com/0fe11b3e3241a0986fc2755ca26fbe79.min.js'
},
oneTrust: {
enabled: true,
domainId: '96e22fd8-d619-4cdd-a3c6-d51529d21faf',
},
adobeTagManager: {
enabled: true,
loaderScript:
'https://assets.adobedtm.com/6bb3f7663515/7006851c9849/launch-e2cf6c285fa0-staging.min.js',
},
},
dev: devConfig,
local: {
Expand Down
4 changes: 0 additions & 4 deletions ui/src/lib/cookies.ts

This file was deleted.

120 changes: 0 additions & 120 deletions ui/src/lib/one-trust.ts

This file was deleted.

3 changes: 0 additions & 3 deletions ui/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
postSample,
userLogin,
} from '@/lib/api';
import { initOneTrust } from '@/lib/one-trust';
import { initRootStore } from './stores';

async function main() {
Expand All @@ -28,8 +27,6 @@ async function main() {

await initRootStore();

initOneTrust();

createRoot(document.getElementById('root')!).render(
<StrictMode>
<OptOutBanner
Expand Down