diff --git a/CHANGES.md b/CHANGES.md index ece87f3c..fa478e35 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ ## Version 1.20 +- Update to Salesforce API v 59.0 (Winter '24) - Add a parameter to activate summary view of pset / psetGroup from shortcut tab [feature 175](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/175) - Display record name (and link) in popup [feature 165](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/165) - Add documentation link to popup diff --git a/addon/inspector.js b/addon/inspector.js index 7c002695..96fc5003 100644 --- a/addon/inspector.js +++ b/addon/inspector.js @@ -1,10 +1,10 @@ -export let apiVersion = localStorage.getItem("apiVersion") == null ? "57.0" : localStorage.getItem("apiVersion"); +export let apiVersion = localStorage.getItem("apiVersion") == null ? "59.0" : localStorage.getItem("apiVersion"); export let sfConn = { async getSession(sfHost) { let paramKey = "access_token"; let message = await new Promise(resolve => - chrome.runtime.sendMessage({ message: "getSession", sfHost }, resolve)); + chrome.runtime.sendMessage({message: "getSession", sfHost}, resolve)); if (message) { this.instanceHostname = message.hostname; this.sessionId = message.key; @@ -31,7 +31,7 @@ export let sfConn = { } }, - async rest(url, { logErrors = true, method = "GET", api = "normal", body = undefined, bodyType = "json", headers = {}, progressHandler = null } = {}) { + async rest(url, {logErrors = true, method = "GET", api = "normal", body = undefined, bodyType = "json", headers = {}, progressHandler = null} = {}) { if (!this.instanceHostname || !this.sessionId) { throw new Error("Session not found"); } @@ -137,7 +137,7 @@ export let sfConn = { return wsdl; }, - async soap(wsdl, method, args, { headers } = {}) { + async soap(wsdl, method, args, {headers} = {}) { if (!this.instanceHostname || !this.sessionId) { throw new Error("Session not found"); } @@ -147,13 +147,13 @@ export let sfConn = { xhr.setRequestHeader("Content-Type", "text/xml"); xhr.setRequestHeader("SOAPAction", '""'); - let sessionHeader = { SessionHeader: { sessionId: this.sessionId } }; + let sessionHeader = {SessionHeader: {sessionId: this.sessionId}}; let requestBody = XML.stringify({ name: "soapenv:Envelope", attributes: ` xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"${wsdl.targetNamespaces}`, value: { "soapenv:Header": Object.assign({}, sessionHeader, headers), - "soapenv:Body": { [method]: args } + "soapenv:Body": {[method]: args} } }); @@ -193,7 +193,7 @@ export let sfConn = { }; class XML { - static stringify({ name, attributes, value }) { + static stringify({name, attributes, value}) { function buildRequest(el, params) { if (params == null) { el.setAttribute("xsi:nil", "true"); diff --git a/sfdx-project.json b/sfdx-project.json index a6ae1cfc..5dd1c75d 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -7,5 +7,5 @@ ], "namespace": "", "sfdcLoginUrl": "https://login.salesforce.com", - "sourceApiVersion": "58.0" -} \ No newline at end of file + "sourceApiVersion": "59.0" +}