Skip to content

Commit

Permalink
Increase api version for Winter 24
Browse files Browse the repository at this point in the history
  • Loading branch information
tprouvot committed Oct 16, 2023
1 parent 811245c commit 35ce6b3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
14 changes: 7 additions & 7 deletions addon/inspector.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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");
}
Expand Down Expand Up @@ -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");
}
Expand All @@ -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}
}
});

Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions sfdx-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "58.0"
}
"sourceApiVersion": "59.0"
}

0 comments on commit 35ce6b3

Please sign in to comment.