woodsportal-client-sdk 4.1.1 → 4.1.2-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.
Files changed (33) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/adapters/angular/index.js +3 -3
  3. package/dist/adapters/native/index.js +4 -4
  4. package/dist/adapters/react/index.js +4 -4
  5. package/dist/adapters/vue/index.js +3 -3
  6. package/dist/{chunk-WJBWIUQM.js → chunk-3VH52USP.js} +4 -4
  7. package/dist/{chunk-WJBWIUQM.js.map → chunk-3VH52USP.js.map} +1 -1
  8. package/dist/{chunk-XQAVHI2F.js → chunk-7XZSJGCX.js} +3 -3
  9. package/dist/{chunk-XQAVHI2F.js.map → chunk-7XZSJGCX.js.map} +1 -1
  10. package/dist/{chunk-IOBRI7OT.js → chunk-JCYGLNF4.js} +63 -5
  11. package/dist/chunk-JCYGLNF4.js.map +1 -0
  12. package/dist/{chunk-AHGJODTH.js → chunk-N4SV7IQN.js} +4 -4
  13. package/dist/{chunk-AHGJODTH.js.map → chunk-N4SV7IQN.js.map} +1 -1
  14. package/dist/{chunk-OO5ZL2AS.js → chunk-R6CZONMV.js} +5 -5
  15. package/dist/{chunk-OO5ZL2AS.js.map → chunk-R6CZONMV.js.map} +1 -1
  16. package/dist/{chunk-JWEA5HWX.js → chunk-T553DXBI.js} +4 -4
  17. package/dist/{chunk-JWEA5HWX.js.map → chunk-T553DXBI.js.map} +1 -1
  18. package/dist/{chunk-ZZCYSW32.js → chunk-X6NNUGP7.js} +3 -3
  19. package/dist/chunk-X6NNUGP7.js.map +1 -0
  20. package/dist/{chunk-F43GSZXK.js → chunk-YKA26CVL.js} +3 -3
  21. package/dist/{chunk-F43GSZXK.js.map → chunk-YKA26CVL.js.map} +1 -1
  22. package/dist/{cache-purge-CokkqLSk.d.ts → crmCacheRefresh-VRgYlnBv.d.ts} +23 -1
  23. package/dist/{cross-tab-session-VAOXHEZL.js → cross-tab-session-VJBW7BK6.js} +5 -5
  24. package/dist/{cross-tab-session-VAOXHEZL.js.map → cross-tab-session-VJBW7BK6.js.map} +1 -1
  25. package/dist/entries/auth.js +4 -4
  26. package/dist/entries/crm.d.ts +2 -2
  27. package/dist/entries/crm.js +7 -6
  28. package/dist/entries/crm.js.map +1 -1
  29. package/dist/index.d.ts +25 -47
  30. package/dist/index.js +10 -10
  31. package/package.json +1 -1
  32. package/dist/chunk-IOBRI7OT.js.map +0 -1
  33. package/dist/chunk-ZZCYSW32.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to **woodsportal-client-sdk** are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.1.2] - 2026-08-14
9
+
10
+ ### Fixed
11
+
12
+ - Block HTTP requests whose URL contains unresolved id segments (`undefined` / `null` / `NaN`).
13
+ - When the embedding page CSP blocks API calls, log the violated directive and the fix to apply.
14
+
8
15
  ## [4.1.0] - 2026-08-06
9
16
 
10
17
  ### Added
@@ -1,7 +1,7 @@
1
1
  import { bindStoreWithActions } from '../../chunk-AYTO6ND7.js';
2
- import { createAdapterHooks } from '../../chunk-WJBWIUQM.js';
3
- import '../../chunk-F43GSZXK.js';
4
- import '../../chunk-ZZCYSW32.js';
2
+ import { createAdapterHooks } from '../../chunk-3VH52USP.js';
3
+ import '../../chunk-YKA26CVL.js';
4
+ import '../../chunk-X6NNUGP7.js';
5
5
  import '../../chunk-JVJMM4SZ.js';
6
6
  import '../../chunk-32ERSTFY.js';
7
7
  import '../../chunk-DB6W3CJT.js';
@@ -1,7 +1,7 @@
1
- export { useTable, useTableUi, useUser } from '../../chunk-XQAVHI2F.js';
2
- import '../../chunk-WJBWIUQM.js';
3
- import '../../chunk-F43GSZXK.js';
4
- import '../../chunk-ZZCYSW32.js';
1
+ export { useTable, useTableUi, useUser } from '../../chunk-7XZSJGCX.js';
2
+ import '../../chunk-3VH52USP.js';
3
+ import '../../chunk-YKA26CVL.js';
4
+ import '../../chunk-X6NNUGP7.js';
5
5
  import '../../chunk-JVJMM4SZ.js';
6
6
  import '../../chunk-32ERSTFY.js';
7
7
  import '../../chunk-DB6W3CJT.js';
@@ -1,7 +1,7 @@
1
- export { useEmail, useFile, useMultiObjectActions, useNote, useSync, useTable, useTableUi, useUploader, useUser } from '../../chunk-XQAVHI2F.js';
2
- import '../../chunk-WJBWIUQM.js';
3
- import '../../chunk-F43GSZXK.js';
4
- import '../../chunk-ZZCYSW32.js';
1
+ export { useEmail, useFile, useMultiObjectActions, useNote, useSync, useTable, useTableUi, useUploader, useUser } from '../../chunk-7XZSJGCX.js';
2
+ import '../../chunk-3VH52USP.js';
3
+ import '../../chunk-YKA26CVL.js';
4
+ import '../../chunk-X6NNUGP7.js';
5
5
  import '../../chunk-JVJMM4SZ.js';
6
6
  import '../../chunk-32ERSTFY.js';
7
7
  import '../../chunk-DB6W3CJT.js';
@@ -1,7 +1,7 @@
1
1
  import { bindStoreWithActions } from '../../chunk-AYTO6ND7.js';
2
- import { createAdapterHooks } from '../../chunk-WJBWIUQM.js';
3
- import '../../chunk-F43GSZXK.js';
4
- import '../../chunk-ZZCYSW32.js';
2
+ import { createAdapterHooks } from '../../chunk-3VH52USP.js';
3
+ import '../../chunk-YKA26CVL.js';
4
+ import '../../chunk-X6NNUGP7.js';
5
5
  import '../../chunk-JVJMM4SZ.js';
6
6
  import '../../chunk-32ERSTFY.js';
7
7
  import '../../chunk-DB6W3CJT.js';
@@ -1,5 +1,5 @@
1
- import { multiObjectStore, actions } from './chunk-F43GSZXK.js';
2
- import { fileStore, actions7, uploaderStore, actions3, syncStore, actions8, userStore, actions6, emailStore, actions5, noteStore, actions4, tableUiStore, tableUiActions, tableStore, actions2 } from './chunk-ZZCYSW32.js';
1
+ import { multiObjectStore, actions } from './chunk-YKA26CVL.js';
2
+ import { fileStore, actions7, uploaderStore, actions3, syncStore, actions8, userStore, actions6, emailStore, actions5, noteStore, actions4, tableUiStore, tableUiActions, tableStore, actions2 } from './chunk-X6NNUGP7.js';
3
3
 
4
4
  // src/main/adapters/shared/createAdapterHooks.ts
5
5
  function createAdapterHooks(createComposable) {
@@ -17,5 +17,5 @@ function createAdapterHooks(createComposable) {
17
17
  }
18
18
 
19
19
  export { createAdapterHooks };
20
- //# sourceMappingURL=chunk-WJBWIUQM.js.map
21
- //# sourceMappingURL=chunk-WJBWIUQM.js.map
20
+ //# sourceMappingURL=chunk-3VH52USP.js.map
21
+ //# sourceMappingURL=chunk-3VH52USP.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main/adapters/shared/createAdapterHooks.ts"],"names":["actions"],"mappings":";;;;AAmCO,SAAS,mBAAmB,gBAAA,EAAqC;AACpE,EAAA,OAAO;AAAA,IACH,QAAA,EAAU,gBAAA,CAAkD,UAAA,EAAYA,QAAY,CAAA;AAAA,IACpF,UAAA,EAAY,gBAAA,CAAsD,YAAA,EAAc,cAAc,CAAA;AAAA,IAC9F,qBAAA,EAAuB,gBAAA,CAAiB,gBAAA,EAAkBA,OAAkB,CAAA;AAAA,IAC5E,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW,CAAA;AAAA,IAC/E,QAAA,EAAU,gBAAA,CAAkD,UAAA,EAAYA,QAAY,CAAA;AAAA,IACpF,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW,CAAA;AAAA,IAC/E,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW,CAAA;AAAA,IAC/E,WAAA,EAAa,gBAAA,CAAwD,aAAA,EAAeA,QAAe,CAAA;AAAA,IACnG,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW;AAAA,GACnF;AACJ","file":"chunk-WJBWIUQM.js","sourcesContent":["import type { SubscribableStore } from './bindStoreWithActions'\nimport {\n tableStore,\n tableActions,\n type TableState,\n tableUiStore,\n tableUiActions,\n type TableUiState,\n multiObjectStore,\n multiObjectActions,\n noteStore,\n noteActions,\n type NoteState,\n emailStore,\n emailActions,\n type EmailState,\n userStore,\n userActions,\n type UserState,\n syncStore,\n syncActions,\n type SyncState,\n uploaderStore,\n uploaderActions,\n type UploaderState,\n fileStore,\n fileActions,\n type FileState\n} from './stores'\n\ntype ComposableFactory = <TState extends object, TActions extends object>(\n store: SubscribableStore<TState>,\n actions: TActions\n) => () => TState & TActions\n\nexport function createAdapterHooks(createComposable: ComposableFactory) {\n return {\n useTable: createComposable<TableState, typeof tableActions>(tableStore, tableActions),\n useTableUi: createComposable<TableUiState, typeof tableUiActions>(tableUiStore, tableUiActions),\n useMultiObjectActions: createComposable(multiObjectStore, multiObjectActions),\n useNote: createComposable<NoteState, typeof noteActions>(noteStore, noteActions),\n useEmail: createComposable<EmailState, typeof emailActions>(emailStore, emailActions),\n useUser: createComposable<UserState, typeof userActions>(userStore, userActions),\n useSync: createComposable<SyncState, typeof syncActions>(syncStore, syncActions),\n useUploader: createComposable<UploaderState, typeof uploaderActions>(uploaderStore, uploaderActions),\n useFile: createComposable<FileState, typeof fileActions>(fileStore, fileActions)\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/main/adapters/shared/createAdapterHooks.ts"],"names":["actions"],"mappings":";;;;AAmCO,SAAS,mBAAmB,gBAAA,EAAqC;AACpE,EAAA,OAAO;AAAA,IACH,QAAA,EAAU,gBAAA,CAAkD,UAAA,EAAYA,QAAY,CAAA;AAAA,IACpF,UAAA,EAAY,gBAAA,CAAsD,YAAA,EAAc,cAAc,CAAA;AAAA,IAC9F,qBAAA,EAAuB,gBAAA,CAAiB,gBAAA,EAAkBA,OAAkB,CAAA;AAAA,IAC5E,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW,CAAA;AAAA,IAC/E,QAAA,EAAU,gBAAA,CAAkD,UAAA,EAAYA,QAAY,CAAA;AAAA,IACpF,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW,CAAA;AAAA,IAC/E,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW,CAAA;AAAA,IAC/E,WAAA,EAAa,gBAAA,CAAwD,aAAA,EAAeA,QAAe,CAAA;AAAA,IACnG,OAAA,EAAS,gBAAA,CAAgD,SAAA,EAAWA,QAAW;AAAA,GACnF;AACJ","file":"chunk-3VH52USP.js","sourcesContent":["import type { SubscribableStore } from './bindStoreWithActions'\nimport {\n tableStore,\n tableActions,\n type TableState,\n tableUiStore,\n tableUiActions,\n type TableUiState,\n multiObjectStore,\n multiObjectActions,\n noteStore,\n noteActions,\n type NoteState,\n emailStore,\n emailActions,\n type EmailState,\n userStore,\n userActions,\n type UserState,\n syncStore,\n syncActions,\n type SyncState,\n uploaderStore,\n uploaderActions,\n type UploaderState,\n fileStore,\n fileActions,\n type FileState\n} from './stores'\n\ntype ComposableFactory = <TState extends object, TActions extends object>(\n store: SubscribableStore<TState>,\n actions: TActions\n) => () => TState & TActions\n\nexport function createAdapterHooks(createComposable: ComposableFactory) {\n return {\n useTable: createComposable<TableState, typeof tableActions>(tableStore, tableActions),\n useTableUi: createComposable<TableUiState, typeof tableUiActions>(tableUiStore, tableUiActions),\n useMultiObjectActions: createComposable(multiObjectStore, multiObjectActions),\n useNote: createComposable<NoteState, typeof noteActions>(noteStore, noteActions),\n useEmail: createComposable<EmailState, typeof emailActions>(emailStore, emailActions),\n useUser: createComposable<UserState, typeof userActions>(userStore, userActions),\n useSync: createComposable<SyncState, typeof syncActions>(syncStore, syncActions),\n useUploader: createComposable<UploaderState, typeof uploaderActions>(uploaderStore, uploaderActions),\n useFile: createComposable<FileState, typeof fileActions>(fileStore, fileActions)\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { createAdapterHooks } from './chunk-WJBWIUQM.js';
1
+ import { createAdapterHooks } from './chunk-3VH52USP.js';
2
2
  import { useSyncExternalStore } from 'react';
3
3
 
4
4
  function createReactStoreComposable(store, actions) {
@@ -12,5 +12,5 @@ function createReactStoreComposable(store, actions) {
12
12
  var { useTable, useTableUi, useMultiObjectActions, useNote, useEmail, useUser, useSync, useUploader, useFile } = createAdapterHooks(createReactStoreComposable);
13
13
 
14
14
  export { useEmail, useFile, useMultiObjectActions, useNote, useSync, useTable, useTableUi, useUploader, useUser };
15
- //# sourceMappingURL=chunk-XQAVHI2F.js.map
16
- //# sourceMappingURL=chunk-XQAVHI2F.js.map
15
+ //# sourceMappingURL=chunk-7XZSJGCX.js.map
16
+ //# sourceMappingURL=chunk-7XZSJGCX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/main/adapters/shared/createReactComposable.ts","../src/main/adapters/react/index.ts"],"names":[],"mappings":";;;AAGO,SAAS,0BAAA,CAA2E,OAAkC,OAAA,EAAmB;AAC5I,EAAA,OAAO,SAAS,QAAA,GAA8B;AAC1C,IAAA,MAAM,QAAQ,oBAAA,CAAqB,KAAA,CAAM,WAAW,KAAA,CAAM,QAAA,EAAU,MAAM,QAAQ,CAAA;AAClF,IAAA,OAAO,EAAE,GAAG,KAAA,EAAO,GAAG,OAAA,EAAQ;AAAA,EAClC,CAAA;AACJ;;;ACLO,IAAM,EAAE,QAAA,EAAU,UAAA,EAAY,qBAAA,EAAuB,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,OAAA,EAAS,WAAA,EAAa,OAAA,EAAQ,GAClH,kBAAA,CAAmB,0BAA0B","file":"chunk-XQAVHI2F.js","sourcesContent":["import { useSyncExternalStore } from 'react'\nimport type { SubscribableStore } from './bindStoreWithActions'\n\nexport function createReactStoreComposable<TState extends object, TActions extends object>(store: SubscribableStore<TState>, actions: TActions) {\n return function useStore(): TState & TActions {\n const state = useSyncExternalStore(store.subscribe, store.getState, store.getState)\n return { ...state, ...actions }\n }\n}\n","import { createAdapterHooks } from '../shared/createAdapterHooks'\nimport { createReactStoreComposable } from '../shared/createReactComposable'\n\nexport const { useTable, useTableUi, useMultiObjectActions, useNote, useEmail, useUser, useSync, useUploader, useFile } =\n createAdapterHooks(createReactStoreComposable)\n"]}
1
+ {"version":3,"sources":["../src/main/adapters/shared/createReactComposable.ts","../src/main/adapters/react/index.ts"],"names":[],"mappings":";;;AAGO,SAAS,0BAAA,CAA2E,OAAkC,OAAA,EAAmB;AAC5I,EAAA,OAAO,SAAS,QAAA,GAA8B;AAC1C,IAAA,MAAM,QAAQ,oBAAA,CAAqB,KAAA,CAAM,WAAW,KAAA,CAAM,QAAA,EAAU,MAAM,QAAQ,CAAA;AAClF,IAAA,OAAO,EAAE,GAAG,KAAA,EAAO,GAAG,OAAA,EAAQ;AAAA,EAClC,CAAA;AACJ;;;ACLO,IAAM,EAAE,QAAA,EAAU,UAAA,EAAY,qBAAA,EAAuB,OAAA,EAAS,QAAA,EAAU,OAAA,EAAS,OAAA,EAAS,WAAA,EAAa,OAAA,EAAQ,GAClH,kBAAA,CAAmB,0BAA0B","file":"chunk-7XZSJGCX.js","sourcesContent":["import { useSyncExternalStore } from 'react'\nimport type { SubscribableStore } from './bindStoreWithActions'\n\nexport function createReactStoreComposable<TState extends object, TActions extends object>(store: SubscribableStore<TState>, actions: TActions) {\n return function useStore(): TState & TActions {\n const state = useSyncExternalStore(store.subscribe, store.getState, store.getState)\n return { ...state, ...actions }\n }\n}\n","import { createAdapterHooks } from '../shared/createAdapterHooks'\nimport { createReactStoreComposable } from '../shared/createReactComposable'\n\nexport const { useTable, useTableUi, useMultiObjectActions, useNote, useEmail, useUser, useSync, useUploader, useFile } =\n createAdapterHooks(createReactStoreComposable)\n"]}
@@ -1,5 +1,5 @@
1
- import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId, makePreviewParams, tableStore, actions2, userStore, isPipelineBoardObjectTypeId, tableUiStore, fileStore, actions7, emailStore, actions5, noteStore, actions4, resetAllStore, breadcrumbStage, isMessingParentLastItem, isMessingParent, generateUrl } from './chunk-ZZCYSW32.js';
2
- import { getRuntimeHttpClientApiDate, config, configureLogger, setIframeStorageMode, setRefreshBufferSeconds, setRefreshCallback, hydrateSessionRefreshState, isHttpTracingEnabled, logger, getAccessToken, sanitizeAxiosErrorData, classifyRefreshHttpError, shouldLogoutAfterRefreshFailure, setRefreshToken, storAccessToken, classifyRefreshResponseWithoutToken, storage, HUBSPOT_DATA, setRuntimeHttpClientHubContext, isServiceUnavailableError, refreshSession, ensureValidRefresh, HUB_ID, DEV_PORTAL_ID, PORTAL_ID, DEV_API_URL, isAccessTokenExpired } from './chunk-JVJMM4SZ.js';
1
+ import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId, makePreviewParams, tableStore, actions2, userStore, isPipelineBoardObjectTypeId, tableUiStore, fileStore, actions7, emailStore, actions5, noteStore, actions4, resetAllStore, breadcrumbStage, isMessingParentLastItem, isMessingParent, generateUrl } from './chunk-X6NNUGP7.js';
2
+ import { getRuntimeHttpClientApiDate, config, configureLogger, setIframeStorageMode, setRefreshBufferSeconds, setRefreshCallback, hydrateSessionRefreshState, logger, isHttpTracingEnabled, getAccessToken, sanitizeAxiosErrorData, classifyRefreshHttpError, shouldLogoutAfterRefreshFailure, setRefreshToken, storAccessToken, classifyRefreshResponseWithoutToken, storage, HUBSPOT_DATA, setRuntimeHttpClientHubContext, isServiceUnavailableError, refreshSession, ensureValidRefresh, HUB_ID, DEV_PORTAL_ID, PORTAL_ID, DEV_API_URL, isAccessTokenExpired } from './chunk-JVJMM4SZ.js';
3
3
  import { getClientType, configureStorageKeys } from './chunk-32ERSTFY.js';
4
4
  import { AuthErrorCode } from './chunk-COHBSTHF.js';
5
5
  import axios from 'axios';
@@ -300,7 +300,46 @@ function getHttpUrl(config4) {
300
300
  return sanitizeHttpUrl(config4.url);
301
301
  }
302
302
 
303
+ // src/main/core/http/csp-violation-monitor.ts
304
+ var VIOLATION_TTL_MS = 3e4;
305
+ var MAX_RECORDED = 20;
306
+ var violations = [];
307
+ var installed = false;
308
+ function installCspViolationMonitor() {
309
+ if (installed || typeof document === "undefined" || typeof document.addEventListener !== "function") {
310
+ return;
311
+ }
312
+ installed = true;
313
+ document.addEventListener("securitypolicyviolation", (event) => {
314
+ violations.push({
315
+ blockedUri: event.blockedURI ?? "",
316
+ effectiveDirective: event.effectiveDirective ?? event.violatedDirective ?? "",
317
+ at: Date.now()
318
+ });
319
+ if (violations.length > MAX_RECORDED) {
320
+ violations = violations.slice(-MAX_RECORDED);
321
+ }
322
+ });
323
+ }
324
+ function findCspViolationFor(requestUrl) {
325
+ if (!requestUrl) {
326
+ return void 0;
327
+ }
328
+ const now = Date.now();
329
+ violations = violations.filter((violation) => now - violation.at <= VIOLATION_TTL_MS);
330
+ let origin;
331
+ try {
332
+ origin = new URL(requestUrl, typeof location !== "undefined" ? location.href : void 0).origin;
333
+ } catch {
334
+ return void 0;
335
+ }
336
+ return violations.find(
337
+ (violation) => violation.blockedUri === origin || violation.blockedUri.startsWith(`${origin}/`)
338
+ );
339
+ }
340
+
303
341
  // src/main/core/http/http-client.ts
342
+ var INVALID_PATH_SEGMENT_PATTERN = /\/(undefined|null|NaN)([/?#]|$)/;
304
343
  var axiosInstance = null;
305
344
  var config3 = {};
306
345
  function hasBrowserLocation() {
@@ -478,7 +517,7 @@ function initializeHttpClient(clientConfig) {
478
517
  migrateLegacyStorageKeys();
479
518
  }).catch(() => {
480
519
  });
481
- void import('./cross-tab-session-VAOXHEZL.js').then(({ installCrossTabSessionListener }) => {
520
+ void import('./cross-tab-session-VJBW7BK6.js').then(({ installCrossTabSessionListener }) => {
482
521
  installCrossTabSessionListener();
483
522
  }).catch(() => {
484
523
  });
@@ -502,9 +541,17 @@ function initializeHttpClient(clientConfig) {
502
541
  ...config3.headers
503
542
  }
504
543
  });
544
+ installCspViolationMonitor();
505
545
  setRefreshCallback(getAuthRefreshToken);
506
546
  hydrateSessionRefreshState();
507
547
  axiosInstance.interceptors.request.use(async (requestConfig) => {
548
+ const requestUrl = getHttpUrl(requestConfig);
549
+ if (requestUrl && INVALID_PATH_SEGMENT_PATTERN.test(requestUrl)) {
550
+ logger.error("http", "blocked request with unresolved id in path", { url: requestUrl });
551
+ throw new Error(
552
+ `[woodsportal-sdk] Blocked request: URL contains an unresolved id segment: ${requestUrl}`
553
+ );
554
+ }
508
555
  const previewMock = await resolveEditorPreviewMock(requestConfig);
509
556
  if (previewMock) {
510
557
  requestConfig.adapter = () => Promise.resolve({
@@ -545,6 +592,17 @@ function initializeHttpClient(clientConfig) {
545
592
  (error) => {
546
593
  if (axios.isAxiosError(error) && error.config) {
547
594
  const status = error.response?.status;
595
+ if (status == null) {
596
+ const violation = findCspViolationFor(getHttpUrl(error.config));
597
+ if (violation) {
598
+ logger.error("http", "request blocked by the embedding page CSP", {
599
+ url: sanitizeHttpUrl(error.config.url),
600
+ violatedDirective: violation.effectiveDirective,
601
+ blockedUri: violation.blockedUri,
602
+ fix: `the embedding page's Content-Security-Policy must include "${violation.effectiveDirective} ${violation.blockedUri}"`
603
+ });
604
+ }
605
+ }
548
606
  if (isHttpTracingEnabled()) {
549
607
  logger.debug("http", "request failed", {
550
608
  method: getHttpMethod(error.config),
@@ -2605,5 +2663,5 @@ function createMutation(mutationFn, options) {
2605
2663
  }
2606
2664
 
2607
2665
  export { API_ENDPOINTS, Client, HttpClient, applyContractApiDate, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, createCachePurgeJob, createMutation, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, generateApiUrl, getAuthRefreshToken, getConfiguredContractApiDate, getFieldErrors, getFormErrors, initializeHttpClient, mergePurgeTargets, navigationApi, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, resolveListTableParams, setEditorPreviewMockHandler, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler, toCachePurgeListQuery };
2608
- //# sourceMappingURL=chunk-IOBRI7OT.js.map
2609
- //# sourceMappingURL=chunk-IOBRI7OT.js.map
2666
+ //# sourceMappingURL=chunk-JCYGLNF4.js.map
2667
+ //# sourceMappingURL=chunk-JCYGLNF4.js.map