plugin updates

This commit is contained in:
Tony Volpe
2024-11-20 22:40:39 -05:00
parent 0238f0c4ca
commit 3362947c6e
434 changed files with 13405 additions and 9202 deletions

View File

@@ -3,6 +3,7 @@ import {
hubspotBaseUrl,
locale,
portalId,
leadinPluginVersion,
} from '../constants/leadinConfig';
import { initApp } from './appUtils';
@@ -19,6 +20,12 @@ export function initBackgroundApp(initFn: CallbackFn | CallbackFn[]) {
initApp(main);
}
const getLeadinConfig = () => {
return {
leadinPluginVersion,
};
};
export const getOrCreateBackgroundApp = (refreshToken = '') => {
if ((window as any).LeadinBackgroundApp) {
return (window as any).LeadinBackgroundApp;
@@ -27,6 +34,7 @@ export const getOrCreateBackgroundApp = (refreshToken = '') => {
const options = new IntegratedAppOptions()
.setLocale(locale)
.setDeviceId(deviceId)
.setLeadinConfig(getLeadinConfig())
.setRefreshToken(refreshToken);
const embedder = new IntegratedAppEmbedder(