woodsportal-client-sdk 4.0.7-dev.2 → 4.0.7-dev.3

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.
@@ -230,6 +230,8 @@ type CrmCachePurgeOptions = {
230
230
  warmListDelayMs?: number;
231
231
  engagementItemIds?: string[];
232
232
  waitForWarm?: boolean;
233
+ pollTimeoutMs?: number;
234
+ pollIntervalMs?: number;
233
235
  idempotencyKey?: string;
234
236
  };
235
237
 
@@ -1351,6 +1351,20 @@ function expandListPurgeQueriesForCrmWrite(base) {
1351
1351
  }
1352
1352
  return expanded;
1353
1353
  }
1354
+ function applyFilterValueFromPipelineState(query) {
1355
+ if (query.filterValue) {
1356
+ return query;
1357
+ }
1358
+ const { filterPropertyName, filterOperator } = query;
1359
+ if (!filterPropertyName || !filterOperator) {
1360
+ return query;
1361
+ }
1362
+ const selectedPipeline = tableUiStore.getState().selectedPipeline;
1363
+ if (!selectedPipeline) {
1364
+ return query;
1365
+ }
1366
+ return { ...query, filterValue: selectedPipeline };
1367
+ }
1354
1368
  function resolveCrmListPurgeQuery(options) {
1355
1369
  let raw;
1356
1370
  if (options.componentName === "sidebarTable" && options.hubspotObjectTypeId) {
@@ -1361,14 +1375,15 @@ function resolveCrmListPurgeQuery(options) {
1361
1375
  if (!hasPurgeFilterContext(raw)) {
1362
1376
  raw = mergeLiveTableUiState(raw);
1363
1377
  }
1364
- const base = toCachePurgeListQuery(raw ?? void 0);
1378
+ let base = applyFilterValueFromPipelineState(toCachePurgeListQuery(raw ?? void 0));
1365
1379
  if (!options.writeContext || Object.keys(options.writeContext).length === 0) {
1366
1380
  return base;
1367
1381
  }
1368
- return {
1382
+ base = {
1369
1383
  ...base,
1370
1384
  ...options.writeContext
1371
1385
  };
1386
+ return applyFilterValueFromPipelineState(base);
1372
1387
  }
1373
1388
 
1374
1389
  // src/main/core/utils/cache/crmCacheRefresh.ts
@@ -1423,7 +1438,9 @@ async function purgeCrmListCache(options) {
1423
1438
  });
1424
1439
  return createCachePurgeJob(request, {
1425
1440
  idempotencyKey: options.idempotencyKey,
1426
- waitForWarm: options.waitForWarm
1441
+ waitForWarm: options.waitForWarm,
1442
+ pollTimeoutMs: options.pollTimeoutMs,
1443
+ pollIntervalMs: options.pollIntervalMs
1427
1444
  });
1428
1445
  }
1429
1446
  async function purgeCrmRecordCache(options) {
@@ -1444,7 +1461,9 @@ async function purgeCrmRecordCache(options) {
1444
1461
  });
1445
1462
  return createCachePurgeJob(request, {
1446
1463
  idempotencyKey: options.idempotencyKey,
1447
- waitForWarm: options.waitForWarm
1464
+ waitForWarm: options.waitForWarm,
1465
+ pollTimeoutMs: options.pollTimeoutMs,
1466
+ pollIntervalMs: options.pollIntervalMs
1448
1467
  });
1449
1468
  }
1450
1469
  async function purgeEngagementCaches(options) {
@@ -1478,7 +1497,9 @@ async function purgeEngagementCachesInternal(options) {
1478
1497
  });
1479
1498
  return createCachePurgeJob(request, {
1480
1499
  idempotencyKey: options.idempotencyKey,
1481
- waitForWarm: options.waitForWarm
1500
+ waitForWarm: options.waitForWarm,
1501
+ pollTimeoutMs: options.pollTimeoutMs,
1502
+ pollIntervalMs: options.pollIntervalMs
1482
1503
  });
1483
1504
  }
1484
1505
  async function purgeCrmCombined(options) {
@@ -1490,7 +1511,9 @@ async function purgeCrmCombined(options) {
1490
1511
  });
1491
1512
  return createCachePurgeJob(request, {
1492
1513
  idempotencyKey: options.idempotencyKey,
1493
- waitForWarm: options.waitForWarm
1514
+ waitForWarm: options.waitForWarm,
1515
+ pollTimeoutMs: options.pollTimeoutMs,
1516
+ pollIntervalMs: options.pollIntervalMs
1494
1517
  });
1495
1518
  }
1496
1519
 
@@ -1611,7 +1634,9 @@ var triggerPostWriteListPurge = (props) => {
1611
1634
  purgeCrmListCacheAfterCrmWrite({
1612
1635
  objectTypeId: String(objectTypeId),
1613
1636
  listQuery,
1614
- recordIds
1637
+ recordIds,
1638
+ waitForWarm: true,
1639
+ pollTimeoutMs: 45e3
1615
1640
  });
1616
1641
  };
1617
1642
  var mergeRecordWriteBody = (payload, paramsObject, options) => {
@@ -2417,5 +2442,5 @@ function createMutation(mutationFn, options) {
2417
2442
  }
2418
2443
 
2419
2444
  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 };
2420
- //# sourceMappingURL=chunk-V32OMFDK.js.map
2421
- //# sourceMappingURL=chunk-V32OMFDK.js.map
2445
+ //# sourceMappingURL=chunk-PPZCZJMI.js.map
2446
+ //# sourceMappingURL=chunk-PPZCZJMI.js.map