woodsportal-client-sdk 4.0.7-dev.0 → 4.0.7-dev.1
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/dist/adapters/angular/index.js +6 -6
- package/dist/adapters/react/index.js +6 -6
- package/dist/adapters/vue/index.js +6 -6
- package/dist/auth-interceptor-policy-LU2L5NJM.js +5 -0
- package/dist/{auth-interceptor-policy-BSY5KIIA.js.map → auth-interceptor-policy-LU2L5NJM.js.map} +1 -1
- package/dist/auth-utils-Z5P6SMLJ.js +5 -0
- package/dist/{auth-utils-XIHNYE63.js.map → auth-utils-Z5P6SMLJ.js.map} +1 -1
- package/dist/{chunk-J33YFZCS.js → chunk-6YOL5LPB.js} +8 -7
- package/dist/chunk-6YOL5LPB.js.map +1 -0
- package/dist/{chunk-ADOV2R3A.js → chunk-B2OVKOJU.js} +73 -11
- package/dist/chunk-B2OVKOJU.js.map +1 -0
- package/dist/{chunk-6ROV3EE2.js → chunk-BKT4MFQM.js} +3 -2
- package/dist/chunk-BKT4MFQM.js.map +1 -0
- package/dist/{chunk-OF5OLEE5.js → chunk-BURJ2NUL.js} +3 -3
- package/dist/{chunk-OF5OLEE5.js.map → chunk-BURJ2NUL.js.map} +1 -1
- package/dist/{chunk-GVXA7OKY.js → chunk-FJAOCLB4.js} +5 -5
- package/dist/{chunk-GVXA7OKY.js.map → chunk-FJAOCLB4.js.map} +1 -1
- package/dist/{chunk-DZC3DJUO.js → chunk-GUYIJ4ZE.js} +13 -4
- package/dist/chunk-GUYIJ4ZE.js.map +1 -0
- package/dist/{chunk-WNBF6FKG.js → chunk-HAXXPW65.js} +8 -6
- package/dist/chunk-HAXXPW65.js.map +1 -0
- package/dist/{chunk-7OGXVANB.js → chunk-OFPD644E.js} +4 -4
- package/dist/{chunk-7OGXVANB.js.map → chunk-OFPD644E.js.map} +1 -1
- package/dist/{chunk-U66LWTVC.js → chunk-PFOSN7EB.js} +4 -4
- package/dist/{chunk-U66LWTVC.js.map → chunk-PFOSN7EB.js.map} +1 -1
- package/dist/{chunk-4IKGBHFJ.js → chunk-WNE4LSVH.js} +23 -9
- package/dist/chunk-WNE4LSVH.js.map +1 -0
- package/dist/{chunk-YOT5RW3R.js → chunk-YNOZWRK3.js} +4 -4
- package/dist/chunk-YNOZWRK3.js.map +1 -0
- package/dist/cross-tab-session-TUFJ6KU7.js +9 -0
- package/dist/{cross-tab-session-OJKWJSNT.js.map → cross-tab-session-TUFJ6KU7.js.map} +1 -1
- package/dist/entries/auth.d.ts +4 -2
- package/dist/entries/auth.js +8 -8
- package/dist/entries/crm.js +7 -7
- package/dist/{http-errors-_XPPqJ_a.d.ts → http-errors-Bwhj6cfB.d.ts} +3 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +13 -13
- package/dist/{refresh-lock-UW5RRRTD.js → refresh-lock-JQVP4YOS.js} +3 -3
- package/dist/{refresh-lock-UW5RRRTD.js.map → refresh-lock-JQVP4YOS.js.map} +1 -1
- package/dist/storage-migration-BY2QL6YD.js +4 -0
- package/dist/{storage-migration-OCOML7VA.js.map → storage-migration-BY2QL6YD.js.map} +1 -1
- package/package.json +1 -1
- package/dist/auth-interceptor-policy-BSY5KIIA.js +0 -5
- package/dist/auth-utils-XIHNYE63.js +0 -5
- package/dist/chunk-4IKGBHFJ.js.map +0 -1
- package/dist/chunk-6ROV3EE2.js.map +0 -1
- package/dist/chunk-ADOV2R3A.js.map +0 -1
- package/dist/chunk-DZC3DJUO.js.map +0 -1
- package/dist/chunk-J33YFZCS.js.map +0 -1
- package/dist/chunk-WNBF6FKG.js.map +0 -1
- package/dist/chunk-YOT5RW3R.js.map +0 -1
- package/dist/cross-tab-session-OJKWJSNT.js +0 -9
- package/dist/storage-migration-OCOML7VA.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId, tableStore, actions2, userStore, fileStore, actions7, emailStore, actions5, noteStore, actions4, tableUiStore, resetAllStore, breadcrumbStage, isMessingParentLastItem, isMessingParent, generateUrl } from './chunk-
|
|
2
|
-
import { configureLogger, setIframeStorageMode, setRefreshBufferSeconds, config, setRefreshCallback, isHttpTracingEnabled, logger, getAccessToken, sanitizeAxiosErrorData, setRefreshToken, storAccessToken, storage, HUBSPOT_DATA, setRuntimeHttpClientHubContext, refreshSession, ensureValidRefresh, HUB_ID, DEV_PORTAL_ID, DEV_API_URL, isAccessTokenExpired } from './chunk-
|
|
1
|
+
import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId, tableStore, actions2, userStore, fileStore, actions7, emailStore, actions5, noteStore, actions4, tableUiStore, resetAllStore, breadcrumbStage, isMessingParentLastItem, isMessingParent, generateUrl } from './chunk-PFOSN7EB.js';
|
|
2
|
+
import { configureLogger, setIframeStorageMode, setRefreshBufferSeconds, config, setRefreshCallback, hydrateSessionRefreshState, isHttpTracingEnabled, logger, getAccessToken, sanitizeAxiosErrorData, setRefreshToken, storAccessToken, storage, HUBSPOT_DATA, setRuntimeHttpClientHubContext, refreshSession, ensureValidRefresh, HUB_ID, DEV_PORTAL_ID, DEV_API_URL, isAccessTokenExpired } from './chunk-B2OVKOJU.js';
|
|
3
3
|
import { AuthErrorCode } from './chunk-COHBSTHF.js';
|
|
4
|
-
import { configureStorageKeys } from './chunk-
|
|
4
|
+
import { configureStorageKeys } from './chunk-YNOZWRK3.js';
|
|
5
5
|
import axios2 from 'axios';
|
|
6
6
|
|
|
7
7
|
// src/main/core/http/visibility-refresh-scheduler.ts
|
|
@@ -358,7 +358,7 @@ async function handleAuthHttpError(error, axiosInstanceRef) {
|
|
|
358
358
|
return Promise.reject(error);
|
|
359
359
|
}
|
|
360
360
|
const { parseApiErrorPayload } = await import('./auth-error-codes-D7CXVBEN.js');
|
|
361
|
-
const { persistAuthError, resolveAuthErrorAction } = await import('./auth-interceptor-policy-
|
|
361
|
+
const { persistAuthError, resolveAuthErrorAction } = await import('./auth-interceptor-policy-LU2L5NJM.js');
|
|
362
362
|
const reqConfig = error.config;
|
|
363
363
|
const payload = parseApiErrorPayload(error.response.data);
|
|
364
364
|
const action = resolveAuthErrorAction({
|
|
@@ -373,6 +373,9 @@ async function handleAuthHttpError(error, axiosInstanceRef) {
|
|
|
373
373
|
return Promise.reject(error);
|
|
374
374
|
}
|
|
375
375
|
if (action.kind === "refresh_retry") {
|
|
376
|
+
if (isRefreshCallbackInFlight()) {
|
|
377
|
+
return Promise.reject(error);
|
|
378
|
+
}
|
|
376
379
|
try {
|
|
377
380
|
await refreshSession({ force: true });
|
|
378
381
|
} catch {
|
|
@@ -437,10 +440,10 @@ function initializeHttpClient(clientConfig) {
|
|
|
437
440
|
if (clientConfig.storageKeys != null) {
|
|
438
441
|
configureStorageKeys(clientConfig.storageKeys);
|
|
439
442
|
}
|
|
440
|
-
void import('./storage-migration-
|
|
443
|
+
void import('./storage-migration-BY2QL6YD.js').then(({ migrateLegacyStorageKeys }) => {
|
|
441
444
|
migrateLegacyStorageKeys();
|
|
442
445
|
});
|
|
443
|
-
void import('./cross-tab-session-
|
|
446
|
+
void import('./cross-tab-session-TUFJ6KU7.js').then(({ installCrossTabSessionListener }) => {
|
|
444
447
|
installCrossTabSessionListener();
|
|
445
448
|
});
|
|
446
449
|
setIframeStorageMode(clientConfig.storageMode === "iframe");
|
|
@@ -464,6 +467,7 @@ function initializeHttpClient(clientConfig) {
|
|
|
464
467
|
}
|
|
465
468
|
});
|
|
466
469
|
setRefreshCallback(getAuthRefreshToken);
|
|
470
|
+
hydrateSessionRefreshState();
|
|
467
471
|
axiosInstance.interceptors.request.use(async (requestConfig) => {
|
|
468
472
|
const previewMock = await resolveEditorPreviewMock(requestConfig);
|
|
469
473
|
if (previewMock) {
|
|
@@ -635,6 +639,10 @@ async function postRefreshCookie(headers) {
|
|
|
635
639
|
skipGlobalAuthRedirect: true
|
|
636
640
|
});
|
|
637
641
|
}
|
|
642
|
+
var refreshCallbackInFlight = false;
|
|
643
|
+
function isRefreshCallbackInFlight() {
|
|
644
|
+
return refreshCallbackInFlight;
|
|
645
|
+
}
|
|
638
646
|
function clearSessionAfterRefreshFailure() {
|
|
639
647
|
if (isEditorPreviewMockActive()) {
|
|
640
648
|
return;
|
|
@@ -645,6 +653,7 @@ function clearSessionAfterRefreshFailure() {
|
|
|
645
653
|
void config3.onLogout?.();
|
|
646
654
|
}
|
|
647
655
|
async function getAuthRefreshToken(refreshToken) {
|
|
656
|
+
refreshCallbackInFlight = true;
|
|
648
657
|
try {
|
|
649
658
|
const headers = {};
|
|
650
659
|
if (config.devPortalId) {
|
|
@@ -675,7 +684,10 @@ async function getAuthRefreshToken(refreshToken) {
|
|
|
675
684
|
route: API_ENDPOINTS.AUTH_REFRESH,
|
|
676
685
|
queryParams: { hubId: config.hubId }
|
|
677
686
|
});
|
|
678
|
-
response = await getAxiosInstance().post(apiUrl, { refreshToken }, {
|
|
687
|
+
response = await getAxiosInstance().post(apiUrl, { refreshToken }, {
|
|
688
|
+
headers,
|
|
689
|
+
skipGlobalAuthRedirect: true
|
|
690
|
+
});
|
|
679
691
|
}
|
|
680
692
|
const maybeData = response?.data?.data || response?.data;
|
|
681
693
|
const tokenData = maybeData?.tokenData || maybeData || {};
|
|
@@ -704,6 +716,8 @@ async function getAuthRefreshToken(refreshToken) {
|
|
|
704
716
|
logger.error("auth", error, { operation: "token refresh" });
|
|
705
717
|
clearSessionAfterRefreshFailure();
|
|
706
718
|
return { token: null, success: false };
|
|
719
|
+
} finally {
|
|
720
|
+
refreshCallbackInFlight = false;
|
|
707
721
|
}
|
|
708
722
|
}
|
|
709
723
|
|
|
@@ -2403,5 +2417,5 @@ function createMutation(mutationFn, options) {
|
|
|
2403
2417
|
}
|
|
2404
2418
|
|
|
2405
2419
|
export { Client, SERVICE_UNAVAILABLE_MESSAGE, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, classifyHttpError, createCachePurgeJob, createMutation, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, getAuthRefreshToken, getFieldErrors, getFormErrors, getHttpErrorMessage, initializeHttpClient, isServiceUnavailableError, mergePurgeTargets, navigationApi, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, resolveListTableParams, setEditorPreviewMockHandler, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler, toCachePurgeListQuery };
|
|
2406
|
-
//# sourceMappingURL=chunk-
|
|
2407
|
-
//# sourceMappingURL=chunk-
|
|
2420
|
+
//# sourceMappingURL=chunk-WNE4LSVH.js.map
|
|
2421
|
+
//# sourceMappingURL=chunk-WNE4LSVH.js.map
|