Badge indicator showing whether an opportunity has an associated Workload Workbench Action

This commit is contained in:
2026-09-24 17:00:32 -03:00
parent f9595b94e0
commit f74071e39e
30 changed files with 1625 additions and 68 deletions

View File

@@ -1,5 +1,6 @@
function createAuthTokenRelay({
TOKEN_RELAY_URL,
authSessionState,
createDebugBody,
getXsrfToken,
logRequestFailure,
@@ -13,6 +14,7 @@ function createAuthTokenRelay({
}) {
const { fetch } = environment;
async function requestTokenRelay({ name = "requestTokenRelay", url = TOKEN_RELAY_URL, includeExpiry = false } = {}) {
if (url === TOKEN_RELAY_URL) authSessionState.principal = "";
let refreshResult = null;
let refreshAttempted = false;
@@ -95,6 +97,9 @@ function createAuthTokenRelay({
access_token: maskToken(responseData.access_token)
}, null, 2)));
if (url === TOKEN_RELAY_URL) {
authSessionState.principal = typeof responseData.principal === "string" ? responseData.principal.trim() : "";
}
if (includeExpiry) {
const lifetime = Number(responseData.expires_in);
return {