woodsportal-client-sdk 4.1.0-dev.4 → 4.1.0-dev.5
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/native/index.js +7 -7
- package/dist/adapters/react/index.js +7 -7
- package/dist/adapters/vue/index.js +6 -6
- package/dist/auth-interceptor-policy-K46P4VM4.js +6 -0
- package/dist/{auth-interceptor-policy-RGQ26NWR.js.map → auth-interceptor-policy-K46P4VM4.js.map} +1 -1
- package/dist/{auth-utils-YGYEJXVB.js → auth-utils-GAA4AG2B.js} +5 -5
- package/dist/{auth-utils-YGYEJXVB.js.map → auth-utils-GAA4AG2B.js.map} +1 -1
- package/dist/{chunk-KPHAQNS2.js → chunk-32ERSTFY.js} +3 -3
- package/dist/{chunk-KPHAQNS2.js.map → chunk-32ERSTFY.js.map} +1 -1
- package/dist/{chunk-JUGKGKUN.js → chunk-3JEBKR6A.js} +7 -7
- package/dist/{chunk-JUGKGKUN.js.map → chunk-3JEBKR6A.js.map} +1 -1
- package/dist/{chunk-3GOXOYKI.js → chunk-3SZ7P64I.js} +3 -3
- package/dist/{chunk-3GOXOYKI.js.map → chunk-3SZ7P64I.js.map} +1 -1
- package/dist/{chunk-72J2YIJW.js → chunk-7E5VHCKC.js} +8 -8
- package/dist/{chunk-72J2YIJW.js.map → chunk-7E5VHCKC.js.map} +1 -1
- package/dist/{chunk-EFMD3WAU.js → chunk-AFCDQWSY.js} +3 -3
- package/dist/{chunk-EFMD3WAU.js.map → chunk-AFCDQWSY.js.map} +1 -1
- package/dist/{chunk-TIQZXED6.js → chunk-IFMSRJZ6.js} +6 -6
- package/dist/{chunk-TIQZXED6.js.map → chunk-IFMSRJZ6.js.map} +1 -1
- package/dist/{chunk-JG3TEXWP.js → chunk-JRT5XSVY.js} +3 -3
- package/dist/{chunk-JG3TEXWP.js.map → chunk-JRT5XSVY.js.map} +1 -1
- package/dist/{chunk-UDAPRD7Z.js → chunk-KGNMN7B3.js} +5 -3
- package/dist/chunk-KGNMN7B3.js.map +1 -0
- package/dist/{chunk-NB353MQ7.js → chunk-KQVPRUIS.js} +4 -4
- package/dist/{chunk-NB353MQ7.js.map → chunk-KQVPRUIS.js.map} +1 -1
- package/dist/{chunk-52MGERAH.js → chunk-LHZA2JRQ.js} +6 -6
- package/dist/{chunk-52MGERAH.js.map → chunk-LHZA2JRQ.js.map} +1 -1
- package/dist/{chunk-XD2VPUML.js → chunk-OVHH3XYO.js} +5 -5
- package/dist/{chunk-XD2VPUML.js.map → chunk-OVHH3XYO.js.map} +1 -1
- package/dist/{chunk-VLUJUKZM.js → chunk-UFBXTF6R.js} +4 -4
- package/dist/{chunk-VLUJUKZM.js.map → chunk-UFBXTF6R.js.map} +1 -1
- package/dist/cross-tab-session-WMYZT4JL.js +11 -0
- package/dist/{cross-tab-session-ZATT7AGT.js.map → cross-tab-session-WMYZT4JL.js.map} +1 -1
- package/dist/entries/auth.js +8 -8
- package/dist/entries/crm.js +9 -9
- package/dist/index.d.ts +3 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/storage-migration-CWOS6CNV.js +4 -0
- package/dist/{storage-migration-2PF52ZSB.js.map → storage-migration-CWOS6CNV.js.map} +1 -1
- package/package.json +1 -1
- package/dist/auth-interceptor-policy-RGQ26NWR.js +0 -6
- package/dist/chunk-UDAPRD7Z.js.map +0 -1
- package/dist/cross-tab-session-ZATT7AGT.js +0 -11
- package/dist/storage-migration-2PF52ZSB.js +0 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { applyCrossTabSessionRevocation, installCrossTabSessionListener, resetCrossTabSessionSyncForTests, signalSessionChanged } from './chunk-3JEBKR6A.js';
|
|
2
|
+
import './chunk-55MIERLJ.js';
|
|
3
|
+
import './chunk-3SZ7P64I.js';
|
|
4
|
+
import './chunk-UFBXTF6R.js';
|
|
5
|
+
import './chunk-OVHH3XYO.js';
|
|
6
|
+
import './chunk-32ERSTFY.js';
|
|
7
|
+
import './chunk-DB6W3CJT.js';
|
|
8
|
+
import './chunk-KGNMN7B3.js';
|
|
9
|
+
import './chunk-COHBSTHF.js';
|
|
10
|
+
//# sourceMappingURL=cross-tab-session-WMYZT4JL.js.map
|
|
11
|
+
//# sourceMappingURL=cross-tab-session-WMYZT4JL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"cross-tab-session-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cross-tab-session-WMYZT4JL.js"}
|
package/dist/entries/auth.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { authApi } from '../chunk-
|
|
2
|
-
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiErrorDisplay, resolveAuthRouteAction } from '../chunk-
|
|
3
|
-
export { isOptionalAuthFailureUrl, isSessionProbeUrl, persistAuthError, readPersistedAuthError, resolveAuthErrorAction } from '../chunk-
|
|
4
|
-
export { getFieldErrors, getFormErrors, initializeHttpClient, setEditorPreviewMockHandler, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
export { SERVICE_UNAVAILABLE_MESSAGE, SessionRefreshDeferredError, SessionRefreshFailedError, classifyHttpError, clearMfaPendingAccessToken, getHttpErrorMessage, hydrateMfaPendingAccessToken, isMfaPendingAccessSession, isServiceUnavailableError, isSessionRefreshDeferredError, isSessionRefreshFailedError, readMfaPendingAccessToken, setSessionLifecycleListener, storeMfaPendingAccessToken } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
1
|
+
import { authApi } from '../chunk-IFMSRJZ6.js';
|
|
2
|
+
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiErrorDisplay, resolveAuthRouteAction } from '../chunk-IFMSRJZ6.js';
|
|
3
|
+
export { isOptionalAuthFailureUrl, isSessionProbeUrl, persistAuthError, readPersistedAuthError, resolveAuthErrorAction } from '../chunk-JRT5XSVY.js';
|
|
4
|
+
export { getFieldErrors, getFormErrors, initializeHttpClient, setEditorPreviewMockHandler, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler } from '../chunk-7E5VHCKC.js';
|
|
5
|
+
import '../chunk-UFBXTF6R.js';
|
|
6
|
+
export { SERVICE_UNAVAILABLE_MESSAGE, SessionRefreshDeferredError, SessionRefreshFailedError, classifyHttpError, clearMfaPendingAccessToken, getHttpErrorMessage, hydrateMfaPendingAccessToken, isMfaPendingAccessSession, isServiceUnavailableError, isSessionRefreshDeferredError, isSessionRefreshFailedError, readMfaPendingAccessToken, setSessionLifecycleListener, storeMfaPendingAccessToken } from '../chunk-OVHH3XYO.js';
|
|
7
|
+
import '../chunk-32ERSTFY.js';
|
|
8
8
|
import '../chunk-DB6W3CJT.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-KGNMN7B3.js';
|
|
10
10
|
export { AuthErrorCode, getUnauthorizedPageCopy, parseApiErrorPayload } from '../chunk-COHBSTHF.js';
|
|
11
11
|
|
|
12
12
|
// src/main/entries/auth.ts
|
package/dist/entries/crm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { crmApi } from '../chunk-
|
|
2
|
-
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from '../chunk-
|
|
1
|
+
import { crmApi } from '../chunk-LHZA2JRQ.js';
|
|
2
|
+
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from '../chunk-LHZA2JRQ.js';
|
|
3
3
|
import '../chunk-55MIERLJ.js';
|
|
4
|
-
import { navigationApi } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2, tableStore, tableUiActions, tableUiStore } from '../chunk-
|
|
7
|
-
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from '../chunk-
|
|
8
|
-
import { storage } from '../chunk-
|
|
9
|
-
import '../chunk-
|
|
4
|
+
import { navigationApi } from '../chunk-7E5VHCKC.js';
|
|
5
|
+
import '../chunk-3SZ7P64I.js';
|
|
6
|
+
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2, tableStore, tableUiActions, tableUiStore } from '../chunk-UFBXTF6R.js';
|
|
7
|
+
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from '../chunk-UFBXTF6R.js';
|
|
8
|
+
import { storage } from '../chunk-OVHH3XYO.js';
|
|
9
|
+
import '../chunk-32ERSTFY.js';
|
|
10
10
|
import '../chunk-DB6W3CJT.js';
|
|
11
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-KGNMN7B3.js';
|
|
12
12
|
import '../chunk-COHBSTHF.js';
|
|
13
13
|
|
|
14
14
|
// src/main/entries/crm.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export { ah as API_ERROR_CATEGORY_FALLBACK, ai as API_ERROR_DISPLAY_CONFIG, aj a
|
|
|
8
8
|
import 'axios';
|
|
9
9
|
|
|
10
10
|
declare const WP_UI_THEME = "wp.ui.theme";
|
|
11
|
+
declare const WP_UI_TIME_ZONE = "wp.ui.timeZone";
|
|
12
|
+
declare const WP_UI_TIME_FORMAT = "wp.ui.timeFormat";
|
|
11
13
|
declare const WP_STORAGE_KEYS: {
|
|
12
14
|
readonly c: {
|
|
13
15
|
readonly hub: "wp.c.hub";
|
|
@@ -714,4 +716,4 @@ declare const store: {
|
|
|
714
716
|
};
|
|
715
717
|
};
|
|
716
718
|
|
|
717
|
-
export { ApiContentVariant, ApiErrorSeverity, CachePurgeListQuery, CachePurgeRequest, CachePurgeTarget, CachePurgeView, ChangePasswordPayload, Client, CreateCachePurgeJobOptions, CrmCachePurgeOptions, DEFAULT_HUBSPOT_TIMEZONE, ForgetPasswordPayload, HttpClientConfig, type HubSpotActivityDateTimeParts, LoggerConfig, LoginPayload, type MobileClientConfig, MutationOptions, PreLoginPayload, PurgeResult, ResetPasswordPayload, ResetPasswordVerifyTokenPayload, ResolveApiErrorDisplayOptions, type ResolvedApiContentState, ResolvedApiErrorDisplay, SessionContractInput, type SessionStorageAdapter, TwoFaVerificationRequest, VerifyEmailPayload, WP_STORAGE_KEYS, WP_UI_THEME, api, applyContractApiDate, applyCrossTabSessionRevocation, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, clearClientAuthCookies, clearClientIframeRefreshLocalKeys, clearClientSdkSession, clearClientSessionStorageKeys, clearStaleIframeRefreshForOtherHubs, configureLogger, createCachePurgeJob, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, formatGmtOffset, formatHubSpotActivityDateTime, formatHubSpotActivityDateTimeParts, getClientAuthCookieNamesToClear, getClientType, getConfiguredContractApiDate, getCurrentTimeZone, config as hubContext, initializeMobileClient, installCrossTabSessionListener, isExpectedApiError, mergePurgeTargets, migrateLegacyStorageKeys, normalizeToTimestamp, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resetSessionStores, resolveApiContentState, resolveCrmListPurgeQuery, setConfig as setHubContext, signalSessionChanged, store, toCachePurgeListQuery, wpClientIframeRefreshExpKey, wpClientIframeRefreshKey };
|
|
719
|
+
export { ApiContentVariant, ApiErrorSeverity, CachePurgeListQuery, CachePurgeRequest, CachePurgeTarget, CachePurgeView, ChangePasswordPayload, Client, CreateCachePurgeJobOptions, CrmCachePurgeOptions, DEFAULT_HUBSPOT_TIMEZONE, ForgetPasswordPayload, HttpClientConfig, type HubSpotActivityDateTimeParts, LoggerConfig, LoginPayload, type MobileClientConfig, MutationOptions, PreLoginPayload, PurgeResult, ResetPasswordPayload, ResetPasswordVerifyTokenPayload, ResolveApiErrorDisplayOptions, type ResolvedApiContentState, ResolvedApiErrorDisplay, SessionContractInput, type SessionStorageAdapter, TwoFaVerificationRequest, VerifyEmailPayload, WP_STORAGE_KEYS, WP_UI_THEME, WP_UI_TIME_FORMAT, WP_UI_TIME_ZONE, api, applyContractApiDate, applyCrossTabSessionRevocation, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, clearClientAuthCookies, clearClientIframeRefreshLocalKeys, clearClientSdkSession, clearClientSessionStorageKeys, clearStaleIframeRefreshForOtherHubs, configureLogger, createCachePurgeJob, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, formatGmtOffset, formatHubSpotActivityDateTime, formatHubSpotActivityDateTimeParts, getClientAuthCookieNamesToClear, getClientType, getConfiguredContractApiDate, getCurrentTimeZone, config as hubContext, initializeMobileClient, installCrossTabSessionListener, isExpectedApiError, mergePurgeTargets, migrateLegacyStorageKeys, normalizeToTimestamp, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resetSessionStores, resolveApiContentState, resolveCrmListPurgeQuery, setConfig as setHubContext, signalSessionChanged, store, toCachePurgeListQuery, wpClientIframeRefreshExpKey, wpClientIframeRefreshKey };
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export { applyCrossTabSessionRevocation, clearClientSdkSession, installCrossTabSessionListener, resetSessionStores, signalSessionChanged } from './chunk-
|
|
2
|
-
import { authApi } from './chunk-
|
|
3
|
-
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isExpectedApiError, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiContentState, resolveApiErrorDisplay, resolveAuthRouteAction } from './chunk-
|
|
4
|
-
export { isOptionalAuthFailureUrl, isSessionProbeUrl, persistAuthError, readPersistedAuthError, resolveAuthErrorAction } from './chunk-
|
|
5
|
-
import { crmApi } from './chunk-
|
|
6
|
-
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from './chunk-
|
|
1
|
+
export { applyCrossTabSessionRevocation, clearClientSdkSession, installCrossTabSessionListener, resetSessionStores, signalSessionChanged } from './chunk-3JEBKR6A.js';
|
|
2
|
+
import { authApi } from './chunk-IFMSRJZ6.js';
|
|
3
|
+
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isExpectedApiError, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiContentState, resolveApiErrorDisplay, resolveAuthRouteAction } from './chunk-IFMSRJZ6.js';
|
|
4
|
+
export { isOptionalAuthFailureUrl, isSessionProbeUrl, persistAuthError, readPersistedAuthError, resolveAuthErrorAction } from './chunk-JRT5XSVY.js';
|
|
5
|
+
import { crmApi } from './chunk-LHZA2JRQ.js';
|
|
6
|
+
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from './chunk-LHZA2JRQ.js';
|
|
7
7
|
import './chunk-55MIERLJ.js';
|
|
8
|
-
import { navigationApi, HttpClient, API_ENDPOINTS, generateApiUrl, createMutation, initializeHttpClient } from './chunk-
|
|
9
|
-
export { Client, applyContractApiDate, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, createCachePurgeJob, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, getConfiguredContractApiDate, getFieldErrors, getFormErrors, initializeHttpClient, mergePurgeTargets, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler, toCachePurgeListQuery } from './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2, tableStore, tableUiActions, tableUiStore, hydrateUserStoreFromSession } from './chunk-
|
|
12
|
-
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from './chunk-
|
|
13
|
-
import { storage, hydrateSessionRefreshState, hydrateMfaPendingAccessToken, storAccessToken } from './chunk-
|
|
14
|
-
export { SERVICE_UNAVAILABLE_MESSAGE, SessionRefreshDeferredError, SessionRefreshFailedError, classifyHttpError, clearMfaPendingAccessToken, configureLogger, getHttpErrorMessage, config as hubContext, hydrateMfaPendingAccessToken, isMfaPendingAccessSession, isServiceUnavailableError, isSessionRefreshDeferredError, isSessionRefreshFailedError, readMfaPendingAccessToken, setConfig as setHubContext, setSessionLifecycleListener, storeMfaPendingAccessToken } from './chunk-
|
|
15
|
-
import { setClientType } from './chunk-
|
|
16
|
-
export { clearClientAuthCookies, clearClientIframeRefreshLocalKeys, clearClientSessionStorageKeys, clearStaleIframeRefreshForOtherHubs, configureStorageKeys, getClientAuthCookieNamesToClear, getClientType, getStorageKeys, migrateLegacyStorageKeys, resetStorageKeysForTests } from './chunk-
|
|
8
|
+
import { navigationApi, HttpClient, API_ENDPOINTS, generateApiUrl, createMutation, initializeHttpClient } from './chunk-7E5VHCKC.js';
|
|
9
|
+
export { Client, applyContractApiDate, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, createCachePurgeJob, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, getConfiguredContractApiDate, getFieldErrors, getFormErrors, initializeHttpClient, mergePurgeTargets, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler, toCachePurgeListQuery } from './chunk-7E5VHCKC.js';
|
|
10
|
+
import './chunk-3SZ7P64I.js';
|
|
11
|
+
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2, tableStore, tableUiActions, tableUiStore, hydrateUserStoreFromSession } from './chunk-UFBXTF6R.js';
|
|
12
|
+
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from './chunk-UFBXTF6R.js';
|
|
13
|
+
import { storage, hydrateSessionRefreshState, hydrateMfaPendingAccessToken, storAccessToken } from './chunk-OVHH3XYO.js';
|
|
14
|
+
export { SERVICE_UNAVAILABLE_MESSAGE, SessionRefreshDeferredError, SessionRefreshFailedError, classifyHttpError, clearMfaPendingAccessToken, configureLogger, getHttpErrorMessage, config as hubContext, hydrateMfaPendingAccessToken, isMfaPendingAccessSession, isServiceUnavailableError, isSessionRefreshDeferredError, isSessionRefreshFailedError, readMfaPendingAccessToken, setConfig as setHubContext, setSessionLifecycleListener, storeMfaPendingAccessToken } from './chunk-OVHH3XYO.js';
|
|
15
|
+
import { setClientType } from './chunk-32ERSTFY.js';
|
|
16
|
+
export { clearClientAuthCookies, clearClientIframeRefreshLocalKeys, clearClientSessionStorageKeys, clearStaleIframeRefreshForOtherHubs, configureStorageKeys, getClientAuthCookieNamesToClear, getClientType, getStorageKeys, migrateLegacyStorageKeys, resetStorageKeysForTests } from './chunk-32ERSTFY.js';
|
|
17
17
|
import { registerSessionStorageAdapter } from './chunk-DB6W3CJT.js';
|
|
18
|
-
export { WP_STORAGE_KEYS, WP_UI_THEME, wpClientIframeRefreshExpKey, wpClientIframeRefreshKey } from './chunk-
|
|
18
|
+
export { WP_STORAGE_KEYS, WP_UI_THEME, WP_UI_TIME_FORMAT, WP_UI_TIME_ZONE, wpClientIframeRefreshExpKey, wpClientIframeRefreshKey } from './chunk-KGNMN7B3.js';
|
|
19
19
|
export { AuthErrorCode, getUnauthorizedPageCopy, parseApiErrorPayload } from './chunk-COHBSTHF.js';
|
|
20
20
|
|
|
21
21
|
// src/main/features/accounts/client/accounts-client.ts
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main/features/accounts/client/accounts-client.ts","../src/main/api/nested-accounts-api.ts","../src/main/features/mobile/client/mobile-navigation-client.ts","../src/main/api/nested-mobile-api.ts","../src/main/features/notifications/client/notification-preferences-client.ts","../src/main/features/notifications/api/preferences.ts","../src/main/api/nested-notifications-api.ts","../src/main/api/compose-api.ts","../src/main/core/utils/datetime.ts","../src/main/core/http/mobile-client-config.ts","../src/main/index.ts"],"names":["storage","actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC1B,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAc,QAAQ,CAAA;AAAA,EACzD,WAAA,EAAa,CAAC,KAAA,KAAkB,UAAA,CAAW,IAAI,aAAA,CAAc,OAAA,EAAS,EAAE,KAAA,EAAO;AACnF,CAAA;;;ACFO,IAAM,WAAA,GAAc;AAAA,EACvB,cAAc,cAAA,CAAe,YAAA;AAAA,EAC7B,aAAa,cAAA,CAAe;AAChC,CAAA;;;ACJO,IAAM,sBAAA,GAAyB;AAAA,EAClC,aAAA,EAAe,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAC,CAAA;AAAA,EAC9F,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAC,CAAA;AAAA,EAC7F,aAAA,EAAe,CAAC,OAAA,KAAqB,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAA,EAAG,OAAO,CAAA;AAAA,EACvH,iBAAA,EAAmB,CAAC,OAAA,KAAqB,UAAA,CAAW,IAAA,CAAK,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iCAAA,EAAmC,CAAA,EAAG,OAAO;AAChJ,CAAA;;;ACJO,IAAM,SAAA,GAAY;AAAA,EACrB,eAAe,sBAAA,CAAuB,aAAA;AAAA,EACtC,cAAc,sBA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AG,SAAA,IAAa,EAAA;AACjF;;;ACjFO,SAAS,uBAAuB,EAAE,OAAA,EAAAA,QAAAA,EAAS,GAAG,YAAW,EAA6B;AACzF,EAAA,6BAAA,CAA8BA,QAAO,CAAA;AACrC,EAAA,aAAA,CAAc,QAAQ,CAAA;AACtB,EAAA,0BAAA,EAA2B;AAC3B,EAAA,KAAK,4BAAA,CAA6B;AAAA,IAC9B,IAAA,EAAM,GAAA;AAAA,IACN,cAAA,EAAgB,CAAC,KAAA,EAAO,SAAA,KAAc;AAClC,MAAA,eAAA,CAAgB,OAAO,SAAS,CAAA;AAAA,IACpC;AAAA,GACH,CAAA;AACD,EAAA,2BAAA,EAA4B;AAC5B,EAAA,oBAAA,CAAqB;AAAA,IACjB,GAAG,UAAA;AAAA,IACH,OAAA,EAAS;AAAA,MACL,eAAA,EAAiB,QAAA;AAAA,MACjB,GAAG,UAAA,CAAW;AAAA;AAClB,GACH,CAAA;AACL;;;ACuKO,IAAM,KAAA,GAAQ;AAAA,EACjB,OAAA;AAAA,EACA,OAAA,EAAS,EAAE,KAAA,EAAO,YAAA,EAAc,SAAS,cAAA,EAAe;AAAA,EACxD,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,WAAYC,QAAA,EAAsB;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,EAAY,SAASA,QAAAA,EAAa;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA;AACvC","file":"index.js","sourcesContent":["import { API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const accountsClient = {\n listHubspots: () => HttpClient.get(API_ENDPOINTS.HUBSPOTS),\n listPortals: (hubId: number) => HttpClient.get(API_ENDPOINTS.PORTALS, { hubId })\n}\n","import { accountsClient } from '../features/accounts/client/accounts-client'\n\n/** Client account listing (hubspots / portals) for mobile and multi-account flows. */\nexport const accountsApi = {\n listHubspots: accountsClient.listHubspots,\n listPortals: accountsClient.listPortals\n}\n","import { generateApiUrl, API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const mobileNavigationClient = {\n getNavigation: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION })),\n getAppConfig: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_APP_CONFIG })),\n putNavigation: (payload: unknown) => HttpClient.put(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION }), payload),\n importFromWebMenu: (payload: unknown) => HttpClient.post(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION_IMPORT_WEB_MENU }), payload)\n}\n","import { mobileNavigationClient } from '../features/mobile/client/mobile-navigation-client'\n\n/** Mobile-specific API surface (navigation config, etc.). */\nexport const mobileApi = {\n getNavigation: mobileNavigationClient.getNavigation,\n getAppConfig: mobileNavigationClient.getAppConfig,\n putNavigation: mobileNavigationClient.putNavigation,\n importFromWebMenu: mobileNavigationClient.importFromWebMenu\n}\n","import { generateApiUrl, API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\nimport type { NotificationPreference } from '../../../core/types/notification'\n\nexport const notificationPreferencesClient = {\n getPreferences: () =>\n HttpClient.get<NotificationPreference>(generateApiUrl({ route: API_ENDPOINTS.NOTIFICATION_PREFERENCES })),\n updatePreferences: (payload: NotificationPreference) =>\n HttpClient.put<NotificationPreference>(\n generateApiUrl({ route: API_ENDPOINTS.NOTIFICATION_PREFERENCES }),\n payload\n )\n}\n","import { createMutation } from '../../../core/mutation/createMutation'\nimport type { MutationOptions } from '../../../core/types'\nimport type { NotificationPreference } from '../../../core/types/notification'\nimport { notificationPreferencesClient } from '../client/notification-preferences-client'\n\n/**\n * Load the signed-in portal user's email notification preferences.\n *\n * **API:** `GET /api/{hubId}/{portalId}/notification-preferences`\n * **Auth:** Bearer portal client JWT (`PROFILE_READ`).\n * **Defaults:** both flags `true` until the user saves.\n */\nexport function getPreferences(options?: MutationOptions<NotificationPreference, any>) {\n const { mutate, isLoading } = createMutation<void, NotificationPreference>(\n async () => (await notificationPreferencesClient.getPreferences()) as NotificationPreference,\n options\n )\n\n return { mutate, getPreferences: mutate, isLoading }\n}\n\n/**\n * Upsert email notification preferences for the signed-in portal user.\n *\n * **API:** `PUT /api/{hubId}/{portalId}/notification-preferences`\n * **Auth:** Bearer portal client JWT (`PROFILE_WRITE`).\n * **Body:** `{ emailProductAnnouncements, emailJobErrors }` (both required booleans).\n */\nexport function updatePreferences(options?: MutationOptions<NotificationPreference, any>) {\n const { mutate, isLoading } = createMutation<NotificationPreference, NotificationPreference>(\n async (payload?: NotificationPreference) =>\n (await notificationPreferencesClient.updatePreferences(payload!)) as NotificationPreference,\n options\n )\n\n return { mutate, updatePreferences: mutate, isLoading }\n}\n","import { getPreferences, updatePreferences } from '../features/notifications/api/preferences'\n\n/** Portal client notification preferences (email product announcements / job errors). */\nexport const notificationsApi = {\n getPreferences,\n updatePreferences\n}\n","import { authApi } from './nested-auth-api'\nimport { crmApi } from './nested-crm-api'\nimport { navigationApi } from './navigation-api'\nimport { accountsApi } from './nested-accounts-api'\nimport { mobileApi } from './nested-mobile-api'\nimport { notificationsApi } from './nested-notifications-api'\n\n/** Public API — nested domains only (SDK 4.0). */\nexport const api = {\n auth: authApi,\n crm: crmApi,\n navigation: navigationApi,\n accounts: accountsApi,\n mobile: mobileApi,\n notifications: notificationsApi\n}\n","/** HubSpot portal default; override when portal timezone is available from config. */\nexport const DEFAULT_HUBSPOT_TIMEZONE = 'Asia/Kolkata'\n\n/**\n * Detect the runtime/browser IANA timezone (e.g. `Asia/Kolkata`).\n * Falls back to the WoodsPortal default timezone when unavailable.\n */\nexport function getCurrentTimeZone(): string {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone || DEFAULT_HUBSPOT_TIMEZONE\n } catch {\n return DEFAULT_HUBSPOT_TIMEZONE\n }\n}\n\n/**\n * Coerce HubSpot-style timestamps (ms string/number) to epoch milliseconds.\n */\nexport function normalizeToTimestamp(value: unknown): number | null {\n if (value == null || value === '') return null\n\n if (typeof value === 'number') {\n return value > 100_000_000_000 ? value : null\n }\n\n if (typeof value === 'string' && /^\\d+$/.test(value)) {\n const n = Number(value)\n return n > 100_000_000_000 ? n : null\n }\n\n if (typeof value === 'string' || value instanceof Date) {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date.getTime()\n }\n\n return null\n}\n\n/**\n * GMT offset label aligned with HubSpot activity timeline (e.g. `GMT+5:30`).\n */\nexport function formatGmtOffset(timeZone: string = getCurrentTimeZone(), date: Date = new Date()): string {\n const raw = new Intl.DateTimeFormat('en-US', {\n timeZone,\n timeZoneName: 'longOffset'\n })\n .formatToParts(date)\n .find((part) => part.type === 'timeZoneName')?.value\n\n if (!raw) return ''\n\n // Intl may emit GMT+05:30; HubSpot uses GMT+5:30.\n return raw.replace(/GMT([+-])0(\\d)(?=:)/, 'GMT$1$2')\n}\n\nexport type HubSpotActivityDateTimeParts = {\n date: string\n time: string\n gmtOffset: string\n /** Full HubSpot-style label, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`. */\n formatted: string\n}\n\n/**\n * Format a HubSpot epoch-ms timestamp like the CRM activity timeline.\n */\nexport function formatHubSpotActivityDateTimeParts(timestamp: unknown, timeZone: string = getCurrentTimeZone()): HubSpotActivityDateTimeParts | null {\n const ms = normalizeToTimestamp(timestamp)\n if (ms == null) return null\n\n const date = new Date(ms)\n const datePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n month: 'long',\n day: 'numeric',\n year: 'numeric'\n }).format(date)\n const timePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n hour: 'numeric',\n minute: '2-digit',\n hour12: true\n }).format(date)\n const gmtOffset = formatGmtOffset(timeZone, date)\n\n return {\n date: datePart,\n time: timePart,\n gmtOffset,\n formatted: `${datePart} at ${timePart} ${gmtOffset}`.trim()\n }\n}\n\n/**\n * @returns HubSpot activity string, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`, or empty string.\n */\nexport function formatHubSpotActivityDateTime(timestamp: unknown, timeZone: string = getCurrentTimeZone()): string {\n return formatHubSpotActivityDateTimeParts(timestamp, timeZone)?.formatted ?? ''\n}\n","import type { SessionStorageAdapter } from '../storage/session-storage-adapter'\nimport { registerSessionStorageAdapter } from '../storage/session-storage-registry'\nimport { setClientType } from './client-type'\nimport { initializeHttpClient, type HttpClientConfig } from './http-client'\nimport { hydrateSessionRefreshState } from './token-store'\nimport { hydrateMfaPendingAccessToken } from '../auth/mfa-pending-token-storage'\nimport { storAccessToken } from './token-store'\nimport { hydrateUserStoreFromSession } from '../../state/crm/use-user'\n\nexport type MobileClientConfig = HttpClientConfig & {\n storage: SessionStorageAdapter\n}\n\n/**\n * Configure the SDK for native/mobile hosts: pluggable storage, client type `mobile`,\n * and `X-Client-Type: mobile` on all HTTP requests.\n */\nexport function initializeMobileClient({ storage, ...httpConfig }: MobileClientConfig): void {\n registerSessionStorageAdapter(storage)\n setClientType('mobile')\n hydrateSessionRefreshState()\n void hydrateMfaPendingAccessToken({\n lane: 'c',\n setAccessToken: (token, expiresIn) => {\n storAccessToken(token, expiresIn)\n }\n })\n hydrateUserStoreFromSession()\n initializeHttpClient({\n ...httpConfig,\n headers: {\n 'X-Client-Type': 'mobile',\n ...httpConfig.headers\n }\n })\n}\n","/**\n * WoodsPortal client SDK — public entry module.\n *\n * Configure HTTP once with {@link initializeHttpClient} in production, then use\n * {@link api}, {@link store}, and {@link api.navigation}.\n */\nimport { api } from './api/compose-api'\nimport {\n tableStore,\n tableActions,\n tableUiStore,\n tableUiActions,\n userStore,\n userActions,\n noteStore,\n noteActions,\n emailStore,\n emailActions,\n syncStore,\n syncActions\n} from './state'\nimport { storage } from './core/utils/localStorage'\n\nexport {\n DEFAULT_HUBSPOT_TIMEZONE,\n getCurrentTimeZone,\n formatGmtOffset,\n formatHubSpotActivityDateTime,\n formatHubSpotActivityDateTimeParts,\n normalizeToTimestamp\n} from './core/utils/datetime'\nexport type { HubSpotActivityDateTimeParts } from './core/utils/datetime'\nexport {\n purgeCrmObjectDataCache,\n purgeCrmListCache,\n purgeCrmListCacheAfterCrmWrite,\n purgeCrmDetailAndListAfterCrmWrite,\n purgeCrmRecordCache,\n purgeEngagementCaches,\n purgeEngagementCachesAfterCrmWrite,\n purgeCrmCombined,\n buildCachePurgeRequest,\n buildCrmListPurgeTarget,\n buildCrmSinglePurgeTarget,\n buildEngagementPurgeTarget,\n buildPortalConfigPurgeTarget,\n buildUserSessionPurgeTarget,\n mergePurgeTargets,\n createCachePurgeJob,\n extractHubspotRecordIdFromWriteResponse,\n extractEngagementItemIdFromWriteResponse,\n resolveCrmListPurgeQuery,\n toCachePurgeListQuery\n} from './core/utils/cache'\nexport type { CrmCachePurgeOptions } from './core/types/cache-purge'\nexport type {\n CachePurgeRequest,\n CachePurgeTarget,\n CachePurgeListQuery,\n CachePurgeView,\n CachePurgeDomain,\n CachePurgeMode,\n PurgeResult,\n CreateCachePurgeJobOptions\n} from './core/types/cache-purge'\n\n/** Axios setup, error helpers, and {@link HttpClientConfig}. */\nexport { initializeHttpClient, getFormErrors, getFieldErrors } from './core/http/http-client'\nexport type { HttpClientConfig, StorageKeyConfig } from './core/http/http-client'\nexport { initializeMobileClient } from './core/http/mobile-client-config'\nexport type { MobileClientConfig } from './core/http/mobile-client-config'\nexport type { SessionStorageAdapter } from './core/storage/session-storage-adapter'\nexport { getClientType } from './core/http/client-type'\n\n/** Shared auth contract (client + admin consistency). */\nexport {\n AuthErrorCode,\n parseApiErrorPayload,\n getUnauthorizedPageCopy,\n resolveAuthErrorAction,\n isOptionalAuthFailureUrl,\n isSessionProbeUrl,\n persistAuthError,\n readPersistedAuthError,\n hasValidAccess,\n isFullyAuthenticated,\n isMfaPendingSession,\n hasAuthenticatedAccess,\n recoverMfaGateOnBoot,\n startVisibilityRefreshScheduler,\n stopVisibilityRefreshScheduler,\n resolveAuthRouteAction,\n storeMfaPendingAccessToken,\n readMfaPendingAccessToken,\n clearMfaPendingAccessToken,\n hydrateMfaPendingAccessToken,\n isMfaPendingAccessSession\n} from './core/auth/index.js'\nexport type {\n ApiErrorPayload,\n StoredAuthError,\n AuthErrorCodeValue,\n UnauthorizedPageCopy,\n AuthErrorAction,\n AuthPolicyRoutes,\n AuthInterceptorPolicyConfig,\n WoodsportalRequestConfig,\n SessionContractInput,\n MfaBootRecoveryResult,\n AuthRouteAction,\n AuthFunnelState,\n MfaStorageLane,\n MfaPendingAccessToken,\n HydrateMfaPendingAccessTokenInput\n} from './core/auth/index.js'\nexport { classifyHttpError, getHttpErrorMessage, isServiceUnavailableError, SERVICE_UNAVAILABLE_MESSAGE } from './core/http/http-errors'\nexport type { HttpErrorKind } from './core/http/http-errors'\nexport {\n SessionRefreshDeferredError,\n SessionRefreshFailedError,\n isSessionRefreshDeferredError,\n isSessionRefreshFailedError\n} from './core/http/session-refresh-errors'\n\nexport {\n API_ERROR_DISPLAY_CONFIG,\n API_ERROR_CATEGORY_FALLBACK,\n WOODSPORTAL_API_ACTIVE_ERROR_CODES,\n buildErrorDescription,\n getApiErrorFromUnknown,\n resolveApiErrorDisplay,\n resolveApiContentState,\n isExpectedApiError\n} from './core/errors/index.js'\nexport type {\n ApiErrorVariant,\n ApiContentVariant,\n ApiErrorSeverity,\n ApiErrorDisplayConfig,\n ResolvedApiErrorDisplay,\n ResolvedApiContentState,\n ResolveApiErrorDisplayOptions\n} from './core/errors/index.js'\n\nexport { configureLogger } from './core/logging/logger'\nexport type { LogLevel, LogMeta, LoggerConfig } from './core/logging/logger-types'\n\nexport { Client } from './core/http/client-assembler'\nexport { config as hubContext, setConfig as setHubContext } from './core/utils/hub-context'\nexport {\n applyContractApiDate,\n getConfiguredContractApiDate,\n} from './core/utils/generateApiUrl'\n\nexport { WP_STORAGE_KEYS, WP_UI_THEME, wpClientIframeRefreshKey, wpClientIframeRefreshExpKey } from './core/utils/wp-storage-keys'\nexport {\n migrateLegacyStorageKeys,\n getClientAuthCookieNamesToClear,\n clearClientSessionStorageKeys,\n clearClientIframeRefreshLocalKeys,\n clearStaleIframeRefreshForOtherHubs\n} from './core/utils/storage-migration'\nexport { clearClientAuthCookies } from './core/utils/cookie'\nexport { clearClientSdkSession, resetSessionStores } from './core/http/session-teardown'\nexport { setSessionLifecycleListener } from './core/http/token-store'\nexport { signalSessionChanged, installCrossTabSessionListener, applyCrossTabSessionRevocation } from './core/http/cross-tab-session'\nexport { configureStorageKeys, getStorageKeys, resetStorageKeysForTests } from './core/utils/storage-keys'\n\nexport {\n HUBSPOT_DEALS_OBJECT_TYPE_ID,\n HUBSPOT_TICKETS_OBJECT_TYPE_ID,\n PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS,\n PIPELINE_BOARD_OBJECT_TYPE_IDS,\n isPipelineBoardObjectTypeId\n} from './core/constants/hubspot-object-type-ids'\nexport { isPipelineBoardObjectType, supportsBoardView, shouldShowPipelineSelector } from './core/constants/pipeline-ui'\n\nexport type {\n Config,\n MutationOptions,\n PreLoginPayload,\n LoginPayload,\n VerifyEmailPayload,\n ResetPasswordVerifyTokenPayload,\n ResetPasswordPayload,\n ForgetPasswordPayload,\n ChangePasswordPayload,\n MfaMethod,\n MfaMethodOption,\n MfaPortalScopeContext,\n LoginResponseData,\n TwoFaVerificationRequest,\n MfaEnrollmentStatus,\n SecurityOverview,\n LoginHistoryRow,\n ActiveSession,\n PaginationResponse\n} from './core/types'\n\nexport { api }\n\n/** Storage helpers and CRM stores. */\nexport const store = {\n storage,\n tableUi: { store: tableUiStore, actions: tableUiActions },\n table: { store: tableStore, actions: tableActions },\n user: { store: userStore, actions: userActions },\n note: { store: noteStore, actions: noteActions },\n email: { store: emailStore, actions: emailActions },\n sync: { store: syncStore, actions: syncActions }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/main/features/accounts/client/accounts-client.ts","../src/main/api/nested-accounts-api.ts","../src/main/features/mobile/client/mobile-navigation-client.ts","../src/main/api/nested-mobile-api.ts","../src/main/features/notifications/client/notification-preferences-client.ts","../src/main/features/notifications/api/preferences.ts","../src/main/api/nested-notifications-api.ts","../src/main/api/compose-api.ts","../src/main/core/utils/datetime.ts","../src/main/core/http/mobile-client-config.ts","../src/main/index.ts"],"names":["storage","actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEO,IAAM,cAAA,GAAiB;AAAA,EAC1B,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAc,QAAQ,CAAA;AAAA,EACzD,WAAA,EAAa,CAAC,KAAA,KAAkB,UAAA,CAAW,IAAI,aAAA,CAAc,OAAA,EAAS,EAAE,KAAA,EAAO;AACnF,CAAA;;;ACFO,IAAM,WAAA,GAAc;AAAA,EACvB,cAAc,cAAA,CAAe,YAAA;AAAA,EAC7B,aAAa,cAAA,CAAe;AAChC,CAAA;;;ACJO,IAAM,sBAAA,GAAyB;AAAA,EAClC,aAAA,EAAe,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAC,CAAA;AAAA,EAC9F,YAAA,EAAc,MAAM,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAC,CAAA;AAAA,EAC7F,aAAA,EAAe,CAAC,OAAA,KAAqB,UAAA,CAAW,GAAA,CAAI,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iBAAA,EAAmB,CAAA,EAAG,OAAO,CAAA;AAAA,EACvH,iBAAA,EAAmB,CAAC,OAAA,KAAqB,UAAA,CAAW,IAAA,CAAK,cAAA,CAAe,EAAE,KAAA,EAAO,aAAA,CAAc,iCAAA,EAAmC,CAAA,EAAG,OAAO;AAChJ,CAAA;;;ACJO,IAAM,SAAA,GAAY;AAAA,EACrB,eAAe,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kCAAA,CAAmC,SAAA,EAAW,QAAQ,CAAA,EAAG,SAAA,IAAa,EAAA;AACjF;;;ACjFO,SAAS,uBAAuB,EAAE,OAAA,EAAAA,QAAAA,EAAS,GAAG,YAAW,EAA6B;AACzF,EAAA,6BAAA,CAA8BA,QAAO,CAAA;AACrC,EAAA,aAAA,CAAc,QAAQ,CAAA;AACtB,EAAA,0BAAA,EAA2B;AAC3B,EAAA,KAAK,4BAAA,CAA6B;AAAA,IAC9B,IAAA,EAAM,GAAA;AAAA,IACN,cAAA,EAAgB,CAAC,KAAA,EAAO,SAAA,KAAc;AAClC,MAAA,eAAA,CAAgB,OAAO,SAAS,CAAA;AAAA,IACpC;AAAA,GACH,CAAA;AACD,EAAA,2BAAA,EAA4B;AAC5B,EAAA,oBAAA,CAAqB;AAAA,IACjB,GAAG,UAAA;AAAA,IACH,OAAA,EAAS;AAAA,MACL,eAAA,EAAiB,QAAA;AAAA,MACjB,GAAG,UAAA,CAAW;AAAA;AAClB,GACH,CAAA;AACL;;;ACuKO,IAAM,KAAA,GAAQ;AAAA,EACjB,OAAA;AAAA,EACA,OAAA,EAAS,EAAE,KAAA,EAAO,YAAA,EAAc,SAAS,cAAA,EAAe;AAAA,EACxD,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,WAAYC,QAAA,EAAsB;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,EAAY,SAASA,QAAAA,EAAa;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA;AACvC","file":"index.js","sourcesContent":["import { API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const accountsClient = {\n listHubspots: () => HttpClient.get(API_ENDPOINTS.HUBSPOTS),\n listPortals: (hubId: number) => HttpClient.get(API_ENDPOINTS.PORTALS, { hubId })\n}\n","import { accountsClient } from '../features/accounts/client/accounts-client'\n\n/** Client account listing (hubspots / portals) for mobile and multi-account flows. */\nexport const accountsApi = {\n listHubspots: accountsClient.listHubspots,\n listPortals: accountsClient.listPortals\n}\n","import { generateApiUrl, API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\n\nexport const mobileNavigationClient = {\n getNavigation: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION })),\n getAppConfig: () => HttpClient.get(generateApiUrl({ route: API_ENDPOINTS.MOBILE_APP_CONFIG })),\n putNavigation: (payload: unknown) => HttpClient.put(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION }), payload),\n importFromWebMenu: (payload: unknown) => HttpClient.post(generateApiUrl({ route: API_ENDPOINTS.MOBILE_NAVIGATION_IMPORT_WEB_MENU }), payload)\n}\n","import { mobileNavigationClient } from '../features/mobile/client/mobile-navigation-client'\n\n/** Mobile-specific API surface (navigation config, etc.). */\nexport const mobileApi = {\n getNavigation: mobileNavigationClient.getNavigation,\n getAppConfig: mobileNavigationClient.getAppConfig,\n putNavigation: mobileNavigationClient.putNavigation,\n importFromWebMenu: mobileNavigationClient.importFromWebMenu\n}\n","import { generateApiUrl, API_ENDPOINTS, HttpClient } from '../../../core/http/client-context'\nimport type { NotificationPreference } from '../../../core/types/notification'\n\nexport const notificationPreferencesClient = {\n getPreferences: () =>\n HttpClient.get<NotificationPreference>(generateApiUrl({ route: API_ENDPOINTS.NOTIFICATION_PREFERENCES })),\n updatePreferences: (payload: NotificationPreference) =>\n HttpClient.put<NotificationPreference>(\n generateApiUrl({ route: API_ENDPOINTS.NOTIFICATION_PREFERENCES }),\n payload\n )\n}\n","import { createMutation } from '../../../core/mutation/createMutation'\nimport type { MutationOptions } from '../../../core/types'\nimport type { NotificationPreference } from '../../../core/types/notification'\nimport { notificationPreferencesClient } from '../client/notification-preferences-client'\n\n/**\n * Load the signed-in portal user's email notification preferences.\n *\n * **API:** `GET /api/{hubId}/{portalId}/notification-preferences`\n * **Auth:** Bearer portal client JWT (`PROFILE_READ`).\n * **Defaults:** both flags `true` until the user saves.\n */\nexport function getPreferences(options?: MutationOptions<NotificationPreference, any>) {\n const { mutate, isLoading } = createMutation<void, NotificationPreference>(\n async () => (await notificationPreferencesClient.getPreferences()) as NotificationPreference,\n options\n )\n\n return { mutate, getPreferences: mutate, isLoading }\n}\n\n/**\n * Upsert email notification preferences for the signed-in portal user.\n *\n * **API:** `PUT /api/{hubId}/{portalId}/notification-preferences`\n * **Auth:** Bearer portal client JWT (`PROFILE_WRITE`).\n * **Body:** `{ emailProductAnnouncements, emailJobErrors }` (both required booleans).\n */\nexport function updatePreferences(options?: MutationOptions<NotificationPreference, any>) {\n const { mutate, isLoading } = createMutation<NotificationPreference, NotificationPreference>(\n async (payload?: NotificationPreference) =>\n (await notificationPreferencesClient.updatePreferences(payload!)) as NotificationPreference,\n options\n )\n\n return { mutate, updatePreferences: mutate, isLoading }\n}\n","import { getPreferences, updatePreferences } from '../features/notifications/api/preferences'\n\n/** Portal client notification preferences (email product announcements / job errors). */\nexport const notificationsApi = {\n getPreferences,\n updatePreferences\n}\n","import { authApi } from './nested-auth-api'\nimport { crmApi } from './nested-crm-api'\nimport { navigationApi } from './navigation-api'\nimport { accountsApi } from './nested-accounts-api'\nimport { mobileApi } from './nested-mobile-api'\nimport { notificationsApi } from './nested-notifications-api'\n\n/** Public API — nested domains only (SDK 4.0). */\nexport const api = {\n auth: authApi,\n crm: crmApi,\n navigation: navigationApi,\n accounts: accountsApi,\n mobile: mobileApi,\n notifications: notificationsApi\n}\n","/** HubSpot portal default; override when portal timezone is available from config. */\nexport const DEFAULT_HUBSPOT_TIMEZONE = 'Asia/Kolkata'\n\n/**\n * Detect the runtime/browser IANA timezone (e.g. `Asia/Kolkata`).\n * Falls back to the WoodsPortal default timezone when unavailable.\n */\nexport function getCurrentTimeZone(): string {\n try {\n return Intl.DateTimeFormat().resolvedOptions().timeZone || DEFAULT_HUBSPOT_TIMEZONE\n } catch {\n return DEFAULT_HUBSPOT_TIMEZONE\n }\n}\n\n/**\n * Coerce HubSpot-style timestamps (ms string/number) to epoch milliseconds.\n */\nexport function normalizeToTimestamp(value: unknown): number | null {\n if (value == null || value === '') return null\n\n if (typeof value === 'number') {\n return value > 100_000_000_000 ? value : null\n }\n\n if (typeof value === 'string' && /^\\d+$/.test(value)) {\n const n = Number(value)\n return n > 100_000_000_000 ? n : null\n }\n\n if (typeof value === 'string' || value instanceof Date) {\n const date = new Date(value)\n return Number.isNaN(date.getTime()) ? null : date.getTime()\n }\n\n return null\n}\n\n/**\n * GMT offset label aligned with HubSpot activity timeline (e.g. `GMT+5:30`).\n */\nexport function formatGmtOffset(timeZone: string = getCurrentTimeZone(), date: Date = new Date()): string {\n const raw = new Intl.DateTimeFormat('en-US', {\n timeZone,\n timeZoneName: 'longOffset'\n })\n .formatToParts(date)\n .find((part) => part.type === 'timeZoneName')?.value\n\n if (!raw) return ''\n\n // Intl may emit GMT+05:30; HubSpot uses GMT+5:30.\n return raw.replace(/GMT([+-])0(\\d)(?=:)/, 'GMT$1$2')\n}\n\nexport type HubSpotActivityDateTimeParts = {\n date: string\n time: string\n gmtOffset: string\n /** Full HubSpot-style label, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`. */\n formatted: string\n}\n\n/**\n * Format a HubSpot epoch-ms timestamp like the CRM activity timeline.\n */\nexport function formatHubSpotActivityDateTimeParts(timestamp: unknown, timeZone: string = getCurrentTimeZone()): HubSpotActivityDateTimeParts | null {\n const ms = normalizeToTimestamp(timestamp)\n if (ms == null) return null\n\n const date = new Date(ms)\n const datePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n month: 'long',\n day: 'numeric',\n year: 'numeric'\n }).format(date)\n const timePart = new Intl.DateTimeFormat('en-US', {\n timeZone,\n hour: 'numeric',\n minute: '2-digit',\n hour12: true\n }).format(date)\n const gmtOffset = formatGmtOffset(timeZone, date)\n\n return {\n date: datePart,\n time: timePart,\n gmtOffset,\n formatted: `${datePart} at ${timePart} ${gmtOffset}`.trim()\n }\n}\n\n/**\n * @returns HubSpot activity string, e.g. `May 27, 2026 at 11:31 PM GMT+5:30`, or empty string.\n */\nexport function formatHubSpotActivityDateTime(timestamp: unknown, timeZone: string = getCurrentTimeZone()): string {\n return formatHubSpotActivityDateTimeParts(timestamp, timeZone)?.formatted ?? ''\n}\n","import type { SessionStorageAdapter } from '../storage/session-storage-adapter'\nimport { registerSessionStorageAdapter } from '../storage/session-storage-registry'\nimport { setClientType } from './client-type'\nimport { initializeHttpClient, type HttpClientConfig } from './http-client'\nimport { hydrateSessionRefreshState } from './token-store'\nimport { hydrateMfaPendingAccessToken } from '../auth/mfa-pending-token-storage'\nimport { storAccessToken } from './token-store'\nimport { hydrateUserStoreFromSession } from '../../state/crm/use-user'\n\nexport type MobileClientConfig = HttpClientConfig & {\n storage: SessionStorageAdapter\n}\n\n/**\n * Configure the SDK for native/mobile hosts: pluggable storage, client type `mobile`,\n * and `X-Client-Type: mobile` on all HTTP requests.\n */\nexport function initializeMobileClient({ storage, ...httpConfig }: MobileClientConfig): void {\n registerSessionStorageAdapter(storage)\n setClientType('mobile')\n hydrateSessionRefreshState()\n void hydrateMfaPendingAccessToken({\n lane: 'c',\n setAccessToken: (token, expiresIn) => {\n storAccessToken(token, expiresIn)\n }\n })\n hydrateUserStoreFromSession()\n initializeHttpClient({\n ...httpConfig,\n headers: {\n 'X-Client-Type': 'mobile',\n ...httpConfig.headers\n }\n })\n}\n","/**\n * WoodsPortal client SDK — public entry module.\n *\n * Configure HTTP once with {@link initializeHttpClient} in production, then use\n * {@link api}, {@link store}, and {@link api.navigation}.\n */\nimport { api } from './api/compose-api'\nimport {\n tableStore,\n tableActions,\n tableUiStore,\n tableUiActions,\n userStore,\n userActions,\n noteStore,\n noteActions,\n emailStore,\n emailActions,\n syncStore,\n syncActions\n} from './state'\nimport { storage } from './core/utils/localStorage'\n\nexport {\n DEFAULT_HUBSPOT_TIMEZONE,\n getCurrentTimeZone,\n formatGmtOffset,\n formatHubSpotActivityDateTime,\n formatHubSpotActivityDateTimeParts,\n normalizeToTimestamp\n} from './core/utils/datetime'\nexport type { HubSpotActivityDateTimeParts } from './core/utils/datetime'\nexport {\n purgeCrmObjectDataCache,\n purgeCrmListCache,\n purgeCrmListCacheAfterCrmWrite,\n purgeCrmDetailAndListAfterCrmWrite,\n purgeCrmRecordCache,\n purgeEngagementCaches,\n purgeEngagementCachesAfterCrmWrite,\n purgeCrmCombined,\n buildCachePurgeRequest,\n buildCrmListPurgeTarget,\n buildCrmSinglePurgeTarget,\n buildEngagementPurgeTarget,\n buildPortalConfigPurgeTarget,\n buildUserSessionPurgeTarget,\n mergePurgeTargets,\n createCachePurgeJob,\n extractHubspotRecordIdFromWriteResponse,\n extractEngagementItemIdFromWriteResponse,\n resolveCrmListPurgeQuery,\n toCachePurgeListQuery\n} from './core/utils/cache'\nexport type { CrmCachePurgeOptions } from './core/types/cache-purge'\nexport type {\n CachePurgeRequest,\n CachePurgeTarget,\n CachePurgeListQuery,\n CachePurgeView,\n CachePurgeDomain,\n CachePurgeMode,\n PurgeResult,\n CreateCachePurgeJobOptions\n} from './core/types/cache-purge'\n\n/** Axios setup, error helpers, and {@link HttpClientConfig}. */\nexport { initializeHttpClient, getFormErrors, getFieldErrors } from './core/http/http-client'\nexport type { HttpClientConfig, StorageKeyConfig } from './core/http/http-client'\nexport { initializeMobileClient } from './core/http/mobile-client-config'\nexport type { MobileClientConfig } from './core/http/mobile-client-config'\nexport type { SessionStorageAdapter } from './core/storage/session-storage-adapter'\nexport { getClientType } from './core/http/client-type'\n\n/** Shared auth contract (client + admin consistency). */\nexport {\n AuthErrorCode,\n parseApiErrorPayload,\n getUnauthorizedPageCopy,\n resolveAuthErrorAction,\n isOptionalAuthFailureUrl,\n isSessionProbeUrl,\n persistAuthError,\n readPersistedAuthError,\n hasValidAccess,\n isFullyAuthenticated,\n isMfaPendingSession,\n hasAuthenticatedAccess,\n recoverMfaGateOnBoot,\n startVisibilityRefreshScheduler,\n stopVisibilityRefreshScheduler,\n resolveAuthRouteAction,\n storeMfaPendingAccessToken,\n readMfaPendingAccessToken,\n clearMfaPendingAccessToken,\n hydrateMfaPendingAccessToken,\n isMfaPendingAccessSession\n} from './core/auth/index.js'\nexport type {\n ApiErrorPayload,\n StoredAuthError,\n AuthErrorCodeValue,\n UnauthorizedPageCopy,\n AuthErrorAction,\n AuthPolicyRoutes,\n AuthInterceptorPolicyConfig,\n WoodsportalRequestConfig,\n SessionContractInput,\n MfaBootRecoveryResult,\n AuthRouteAction,\n AuthFunnelState,\n MfaStorageLane,\n MfaPendingAccessToken,\n HydrateMfaPendingAccessTokenInput\n} from './core/auth/index.js'\nexport { classifyHttpError, getHttpErrorMessage, isServiceUnavailableError, SERVICE_UNAVAILABLE_MESSAGE } from './core/http/http-errors'\nexport type { HttpErrorKind } from './core/http/http-errors'\nexport {\n SessionRefreshDeferredError,\n SessionRefreshFailedError,\n isSessionRefreshDeferredError,\n isSessionRefreshFailedError\n} from './core/http/session-refresh-errors'\n\nexport {\n API_ERROR_DISPLAY_CONFIG,\n API_ERROR_CATEGORY_FALLBACK,\n WOODSPORTAL_API_ACTIVE_ERROR_CODES,\n buildErrorDescription,\n getApiErrorFromUnknown,\n resolveApiErrorDisplay,\n resolveApiContentState,\n isExpectedApiError\n} from './core/errors/index.js'\nexport type {\n ApiErrorVariant,\n ApiContentVariant,\n ApiErrorSeverity,\n ApiErrorDisplayConfig,\n ResolvedApiErrorDisplay,\n ResolvedApiContentState,\n ResolveApiErrorDisplayOptions\n} from './core/errors/index.js'\n\nexport { configureLogger } from './core/logging/logger'\nexport type { LogLevel, LogMeta, LoggerConfig } from './core/logging/logger-types'\n\nexport { Client } from './core/http/client-assembler'\nexport { config as hubContext, setConfig as setHubContext } from './core/utils/hub-context'\nexport {\n applyContractApiDate,\n getConfiguredContractApiDate,\n} from './core/utils/generateApiUrl'\n\nexport { WP_STORAGE_KEYS, WP_UI_THEME, WP_UI_TIME_ZONE, WP_UI_TIME_FORMAT, wpClientIframeRefreshKey, wpClientIframeRefreshExpKey } from './core/utils/wp-storage-keys'\nexport {\n migrateLegacyStorageKeys,\n getClientAuthCookieNamesToClear,\n clearClientSessionStorageKeys,\n clearClientIframeRefreshLocalKeys,\n clearStaleIframeRefreshForOtherHubs\n} from './core/utils/storage-migration'\nexport { clearClientAuthCookies } from './core/utils/cookie'\nexport { clearClientSdkSession, resetSessionStores } from './core/http/session-teardown'\nexport { setSessionLifecycleListener } from './core/http/token-store'\nexport { signalSessionChanged, installCrossTabSessionListener, applyCrossTabSessionRevocation } from './core/http/cross-tab-session'\nexport { configureStorageKeys, getStorageKeys, resetStorageKeysForTests } from './core/utils/storage-keys'\n\nexport {\n HUBSPOT_DEALS_OBJECT_TYPE_ID,\n HUBSPOT_TICKETS_OBJECT_TYPE_ID,\n PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS,\n PIPELINE_BOARD_OBJECT_TYPE_IDS,\n isPipelineBoardObjectTypeId\n} from './core/constants/hubspot-object-type-ids'\nexport { isPipelineBoardObjectType, supportsBoardView, shouldShowPipelineSelector } from './core/constants/pipeline-ui'\n\nexport type {\n Config,\n MutationOptions,\n PreLoginPayload,\n LoginPayload,\n VerifyEmailPayload,\n ResetPasswordVerifyTokenPayload,\n ResetPasswordPayload,\n ForgetPasswordPayload,\n ChangePasswordPayload,\n MfaMethod,\n MfaMethodOption,\n MfaPortalScopeContext,\n LoginResponseData,\n TwoFaVerificationRequest,\n MfaEnrollmentStatus,\n SecurityOverview,\n LoginHistoryRow,\n ActiveSession,\n PaginationResponse\n} from './core/types'\n\nexport { api }\n\n/** Storage helpers and CRM stores. */\nexport const store = {\n storage,\n tableUi: { store: tableUiStore, actions: tableUiActions },\n table: { store: tableStore, actions: tableActions },\n user: { store: userStore, actions: userActions },\n note: { store: noteStore, actions: noteActions },\n email: { store: emailStore, actions: emailActions },\n sync: { store: syncStore, actions: syncActions }\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { clearClientIframeRefreshLocalKeys, clearClientSessionStorageKeys, clearStaleIframeRefreshForOtherHubs, getClientAuthCookieNamesToClear, migrateLegacyStorageKeys } from './chunk-32ERSTFY.js';
|
|
2
|
+
import './chunk-KGNMN7B3.js';
|
|
3
|
+
//# sourceMappingURL=storage-migration-CWOS6CNV.js.map
|
|
4
|
+
//# sourceMappingURL=storage-migration-CWOS6CNV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"storage-migration-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"storage-migration-CWOS6CNV.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "woodsportal-client-sdk",
|
|
3
|
-
"version": "4.1.0-dev.
|
|
3
|
+
"version": "4.1.0-dev.5",
|
|
4
4
|
"packageManager": "pnpm@10.12.1",
|
|
5
5
|
"description": "Official TypeScript/JavaScript SDK for WoodsPortal API - Authentication, user management, pipelines, and more",
|
|
6
6
|
"type": "module",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { isOptionalAuthFailureUrl, isRefreshEndpointUrl, isSessionProbeUrl, persistAuthError, readPersistedAuthError, resolveAuthErrorAction } from './chunk-JG3TEXWP.js';
|
|
2
|
-
import './chunk-DB6W3CJT.js';
|
|
3
|
-
import './chunk-UDAPRD7Z.js';
|
|
4
|
-
import './chunk-COHBSTHF.js';
|
|
5
|
-
//# sourceMappingURL=auth-interceptor-policy-RGQ26NWR.js.map
|
|
6
|
-
//# sourceMappingURL=auth-interceptor-policy-RGQ26NWR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main/core/utils/wp-storage-keys.ts"],"names":[],"mappings":";AAKO,IAAM,WAAA,GAAc;AAEpB,IAAM,eAAA,GAA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,CAAC,cAAA,EAAgB,eAAA,CAAgB,CAAA,CAAE,KAAK,OAAO,CAAA;AAAA,EAC/C,CAAC,oBAAA,EAAsB,eAAA,CAAgB,CAAA,CAAE,KAAK,MAAM,CAAA;AAAA,EACpD,CAAC,QAAA,EAAU,eAAA,CAAgB,CAAA,CAAE,KAAK,MAAM,CAAA;AAAA,EACxC,CAAC,0BAAA,EAA4B,eAAA,CAAgB,CAAA,CAAE,KAAK,GAAG,CAAA;AAAA,EACvD,CAAC,kBAAA,EAAoB,eAAA,CAAgB,CAAA,CAAE,KAAK,GAAG,CAAA;AAAA,EAC/C,CAAC,wBAAA,EAA0B,eAAA,CAAgB,CAAA,CAAE,GAAG,GAAG,CAAA;AAAA,EACnD,CAAC,wBAAA,EAA0B,eAAA,CAAgB,CAAA,CAAE,GAAG,IAAI,CAAA;AAAA,EACpD,CAAC,8BAAA,EAAgC,eAAA,CAAgB,CAAA,CAAE,GAAG,KAAK,CAAA;AAAA,EAC3D,CAAC,iBAAA,EAAmB,eAAA,CAAgB,CAAA,CAAE,KAAK,OAAO;AACtD","file":"chunk-UDAPRD7Z.js","sourcesContent":["/**\n * Canonical WoodsPortal browser storage key names (`wp.{lane}.{domain}.{name}`).\n * Import from here — do not scatter string literals in app code.\n */\n\nexport const WP_UI_THEME = 'wp.ui.theme'\n\nexport const WP_STORAGE_KEYS = {\n c: {\n hub: 'wp.c.hub',\n auth: {\n login: 'wp.c.auth.login',\n refresh: 'wp.c.auth.refresh',\n portal: 'wp.c.auth.portal',\n sub: 'wp.c.auth.sub',\n emailOk: 'wp.c.auth.emailOk',\n err: 'wp.c.auth.err',\n refreshExhausted: 'wp.c.auth.refreshExhausted',\n rev: 'wp.c.auth.rev',\n refreshLock: 'wp.c.auth.refreshLock',\n iframeRtPrefix: 'wp.c.auth.rt.'\n },\n ui: {\n pag: 'wp.c.ui.pag',\n menu: 'wp.c.ui.menu',\n assoc: 'wp.c.ui.assoc'\n },\n login: {\n email: 'wp.c.login.email',\n force: 'wp.c.login.force',\n passkey: 'wp.c.login.passkey',\n done: 'wp.c.login.done',\n outcome: 'wp.c.login.outcome',\n registerPayload: 'wp.c.login.registerPayload',\n awaitingVerify: 'wp.c.login.awaitingVerify',\n returnPath: 'wp.c.login.returnPath'\n },\n mfa: {\n methods: 'wp.c.mfa.methods',\n default: 'wp.c.mfa.default',\n otp: 'wp.c.mfa.otp',\n scope: 'wp.c.mfa.scope',\n portalId: 'wp.c.mfa.portalId',\n portalName: 'wp.c.mfa.portalName',\n portalUrl: 'wp.c.mfa.portalUrl',\n enrolled: 'wp.c.mfa.enrolled',\n emailOk: 'wp.c.mfa.emailOk',\n phoneOk: 'wp.c.mfa.phoneOk',\n pendingToken: 'wp.c.mfa.pendingToken',\n pendingTokenExp: 'wp.c.mfa.pendingTokenExp',\n otpSend: 'wp.c.mfa.otpSend'\n },\n sso: {\n cb: 'wp.c.sso.cb'\n }\n },\n a: {\n auth: {\n login: 'wp.a.auth.login',\n emailOk: 'wp.a.auth.emailOk',\n mfa: 'wp.a.auth.mfa',\n portalId: 'wp.a.auth.portalId',\n portal: 'wp.a.auth.portal',\n accT: 'wp.a.auth.accT',\n sesT: 'wp.a.auth.sesT',\n err: 'wp.a.auth.err',\n noBoot: 'wp.a.auth.noBoot',\n refreshLock: 'wp.a.auth.refreshLock',\n rev: 'wp.a.auth.rev'\n },\n hub: {\n id: 'wp.a.hub.id',\n acct: 'wp.a.hub.acct',\n cfg: 'wp.a.hub.cfg'\n },\n sync: {\n create: 'wp.a.sync.create',\n state: 'wp.a.sync.state',\n jobId: 'wp.a.sync.jobId',\n jobType: 'wp.a.sync.jobType'\n },\n ui: {\n loading: 'wp.a.ui.loading',\n intTabPrefix: 'wp.a.ui.intTab.'\n },\n mfa: {\n methods: 'wp.a.mfa.methods',\n default: 'wp.a.mfa.default',\n otp: 'wp.a.mfa.otp',\n scope: 'wp.a.mfa.scope',\n portalId: 'wp.a.mfa.portalId',\n portalName: 'wp.a.mfa.portalName',\n portalUrl: 'wp.a.mfa.portalUrl',\n enrolled: 'wp.a.mfa.enrolled',\n emailOk: 'wp.a.mfa.emailOk',\n phoneOk: 'wp.a.mfa.phoneOk',\n pendingToken: 'wp.a.mfa.pendingToken',\n pendingTokenExp: 'wp.a.mfa.pendingTokenExp',\n otpSend: 'wp.a.mfa.otpSend'\n },\n sso: {\n cbPrefix: 'wp.a.sso.cb.'\n },\n bill: {\n result: 'wp.a.bill.result'\n }\n },\n d: {\n log: 'wp.d.log',\n cfg: {\n theme: 'wp.d.cfg.theme',\n side: 'wp.d.cfg.side'\n }\n }\n} as const\n\n/** Dynamic iframe refresh localStorage key for a hub. */\nexport function wpClientIframeRefreshKey(hubId: string | number): string {\n return `${WP_STORAGE_KEYS.c.auth.iframeRtPrefix}${hubId}`\n}\n\nexport function wpClientIframeRefreshExpKey(hubId: string | number): string {\n return `${wpClientIframeRefreshKey(hubId)}.exp`\n}\n\nexport function wpAdminIntegrationTabKey(hubId: string | number, portalId: string | number): string {\n return `${WP_STORAGE_KEYS.a.ui.intTabPrefix}${hubId}.${portalId}`\n}\n\nexport function wpAdminSsoCallbackKey(code: string, state: string): string {\n return `${WP_STORAGE_KEYS.a.sso.cbPrefix}${code}.${state}`\n}\n\n/** Legacy client cookie names cleared during logout (two release cycles). */\nexport const LEGACY_CLIENT_AUTH_COOKIES = [\n 'woodsportal_login',\n 'woodsportal_user',\n 'woodsportal_refresh',\n 'woodsportal_portal',\n 'woodsportal_subscription',\n 'woodsportal_pagination',\n 'woodsportal_route_menu',\n 'woodsportal_association_view',\n 'woodsportal_access_token',\n 'IS_EMAIL_VERIFY',\n 'loginDetails',\n 'refreshToken',\n 'portal',\n 'subscriptionType'\n] as const\n\n/** Legacy client localStorage keys. */\nexport const LEGACY_CLIENT_LOCAL_KEYS = ['hubSpotData', 'theme', 'wp_iframe_rt_'] as const\n\n/** Legacy client sessionStorage key prefixes / exact names. */\nexport const LEGACY_CLIENT_SESSION_EXACT = ['authError', 'sso_callback_processed', 'entredEmail'] as const\n\nexport const LEGACY_CLIENT_SESSION_PREFIXES = ['woodsportal.login.', 'woodsportal.mfa.'] as const\n\n/** Pairs of [legacy, canonical] for exact sessionStorage keys. */\nexport const CLIENT_SESSION_STORAGE_MIGRATIONS: ReadonlyArray<readonly [string, string]> = [\n ['woodsportal.login.email', WP_STORAGE_KEYS.c.login.email],\n ['woodsportal.login.forcePreLogin', WP_STORAGE_KEYS.c.login.force],\n ['woodsportal.login.passkeyPrimaryEnrolled', WP_STORAGE_KEYS.c.login.passkey],\n ['woodsportal.login.preLoginCompletedKey', WP_STORAGE_KEYS.c.login.done],\n ['authError', WP_STORAGE_KEYS.c.auth.err],\n ['sso_callback_processed', WP_STORAGE_KEYS.c.sso.cb],\n ['woodsportal.mfa.methods', WP_STORAGE_KEYS.c.mfa.methods],\n ['woodsportal.mfa.defaultMethod', WP_STORAGE_KEYS.c.mfa.default],\n ['woodsportal.mfa.otpDelivery', WP_STORAGE_KEYS.c.mfa.otp],\n ['woodsportal.mfa.otpDestinationMasked', WP_STORAGE_KEYS.c.mfa.otp],\n ['woodsportal.mfa.scopeKey', WP_STORAGE_KEYS.c.mfa.scope],\n ['woodsportal.mfa.portalId', WP_STORAGE_KEYS.c.mfa.portalId],\n ['woodsportal.mfa.portalName', WP_STORAGE_KEYS.c.mfa.portalName],\n ['woodsportal.mfa.portalUrl', WP_STORAGE_KEYS.c.mfa.portalUrl],\n ['woodsportal.mfa.enrolledForThisPortal', WP_STORAGE_KEYS.c.mfa.enrolled],\n ['woodsportal.mfa.emailVerifiedForThisPortal', WP_STORAGE_KEYS.c.mfa.emailOk],\n ['woodsportal.mfa.phoneVerifiedForThisPortal', WP_STORAGE_KEYS.c.mfa.phoneOk]\n]\n\n/** Cookie migration pairs [legacy, canonical]. */\nexport const CLIENT_COOKIE_MIGRATIONS: ReadonlyArray<readonly [string, string]> = [\n ['woodsportal_login', WP_STORAGE_KEYS.c.auth.login],\n ['loginDetails', WP_STORAGE_KEYS.c.auth.login],\n ['woodsportal_user', WP_STORAGE_KEYS.c.auth.login],\n ['woodsportal_refresh', WP_STORAGE_KEYS.c.auth.refresh],\n ['refreshToken', WP_STORAGE_KEYS.c.auth.refresh],\n ['woodsportal_portal', WP_STORAGE_KEYS.c.auth.portal],\n ['portal', WP_STORAGE_KEYS.c.auth.portal],\n ['woodsportal_subscription', WP_STORAGE_KEYS.c.auth.sub],\n ['subscriptionType', WP_STORAGE_KEYS.c.auth.sub],\n ['woodsportal_pagination', WP_STORAGE_KEYS.c.ui.pag],\n ['woodsportal_route_menu', WP_STORAGE_KEYS.c.ui.menu],\n ['woodsportal_association_view', WP_STORAGE_KEYS.c.ui.assoc],\n ['IS_EMAIL_VERIFY', WP_STORAGE_KEYS.c.auth.emailOk]\n]\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { applyCrossTabSessionRevocation, installCrossTabSessionListener, resetCrossTabSessionSyncForTests, signalSessionChanged } from './chunk-JUGKGKUN.js';
|
|
2
|
-
import './chunk-55MIERLJ.js';
|
|
3
|
-
import './chunk-3GOXOYKI.js';
|
|
4
|
-
import './chunk-VLUJUKZM.js';
|
|
5
|
-
import './chunk-XD2VPUML.js';
|
|
6
|
-
import './chunk-KPHAQNS2.js';
|
|
7
|
-
import './chunk-DB6W3CJT.js';
|
|
8
|
-
import './chunk-UDAPRD7Z.js';
|
|
9
|
-
import './chunk-COHBSTHF.js';
|
|
10
|
-
//# sourceMappingURL=cross-tab-session-ZATT7AGT.js.map
|
|
11
|
-
//# sourceMappingURL=cross-tab-session-ZATT7AGT.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { clearClientIframeRefreshLocalKeys, clearClientSessionStorageKeys, clearStaleIframeRefreshForOtherHubs, getClientAuthCookieNamesToClear, migrateLegacyStorageKeys } from './chunk-KPHAQNS2.js';
|
|
2
|
-
import './chunk-UDAPRD7Z.js';
|
|
3
|
-
//# sourceMappingURL=storage-migration-2PF52ZSB.js.map
|
|
4
|
-
//# sourceMappingURL=storage-migration-2PF52ZSB.js.map
|