@inboxsdk/core 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/inboxsdk.js +136 -78
- package/inboxsdk.js.map +1 -1
- package/package.json +1 -1
- package/pageWorld.js +26 -0
- package/pageWorld.js.map +1 -1
- package/src/inboxsdk.d.ts +3 -8
- package/src/injected-js/gmail/setup-gmail-interceptor.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getPersonDetails.d.ts +5 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver/getPersonDetails.d.ts.map +1 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver.d.ts +2 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-driver.d.ts.map +1 -1
- package/src/platform-implementation-js/dom-driver/gmail/gmail-page-communicator.d.ts +3 -0
- package/src/platform-implementation-js/dom-driver/gmail/gmail-page-communicator.d.ts.map +1 -1
- package/src/platform-implementation-js/namespaces/user.d.ts +18 -7
- package/src/platform-implementation-js/namespaces/user.d.ts.map +1 -1
package/package.json
CHANGED
package/pageWorld.js
CHANGED
|
@@ -2864,6 +2864,32 @@ function setupGmailInterceptorOnFrames(mainFrame, jsFrame) {
|
|
|
2864
2864
|
}
|
|
2865
2865
|
});
|
|
2866
2866
|
}
|
|
2867
|
+
|
|
2868
|
+
// Google API request header values
|
|
2869
|
+
{
|
|
2870
|
+
// harcoding a value observed across multiple accounts to start with.
|
|
2871
|
+
// Will be updated when we see a request, in case Gmail has changed it.
|
|
2872
|
+
let googleApiKey = 'AIzaSyBm7aDMG9actsWSlx-MvrYsepwdnLgz69I';
|
|
2873
|
+
document.addEventListener('inboxSDKgetGoogleRequestHeaders', () => {
|
|
2874
|
+
const authorizationHeader = window.gapi.auth.getAuthHeaderValueForFirstParty([]);
|
|
2875
|
+
const headers = {
|
|
2876
|
+
authorization: authorizationHeader,
|
|
2877
|
+
'x-goog-api-key': googleApiKey
|
|
2878
|
+
};
|
|
2879
|
+
document.head.setAttribute('data-inboxsdk-google-headers', JSON.stringify(headers));
|
|
2880
|
+
});
|
|
2881
|
+
main_wrappers.push({
|
|
2882
|
+
isRelevantTo(connection) {
|
|
2883
|
+
const url = new URL(connection.url);
|
|
2884
|
+
return url.hostname.endsWith('.google.com');
|
|
2885
|
+
},
|
|
2886
|
+
originalSendBodyLogger(connection) {
|
|
2887
|
+
if (connection.headers['X-Goog-Api-Key']) {
|
|
2888
|
+
googleApiKey = connection.headers['X-Goog-Api-Key'];
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
});
|
|
2892
|
+
}
|
|
2867
2893
|
}
|
|
2868
2894
|
function triggerEvent(detail) {
|
|
2869
2895
|
document.dispatchEvent(new CustomEvent('inboxSDKajaxIntercept', {
|