woodsportal-client-sdk 4.0.8-dev.1 → 4.0.8-dev.11
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.d.ts +6 -1
- package/dist/adapters/angular/index.js +4 -4
- package/dist/adapters/native/index.d.ts +1 -1
- package/dist/adapters/native/index.js +5 -5
- package/dist/adapters/react/index.d.ts +6 -1
- package/dist/adapters/react/index.js +5 -5
- package/dist/adapters/vue/index.d.ts +6 -1
- package/dist/adapters/vue/index.js +4 -4
- package/dist/{auth-utils-T4FIBK3O.js → auth-utils-4HFJPASF.js} +3 -3
- package/dist/{auth-utils-T4FIBK3O.js.map → auth-utils-4HFJPASF.js.map} +1 -1
- package/dist/{chunk-VN6VPM5C.js → chunk-F2DP2LL3.js} +4 -4
- package/dist/{chunk-VN6VPM5C.js.map → chunk-F2DP2LL3.js.map} +1 -1
- package/dist/{chunk-NDDE6ZZ3.js → chunk-HOUVOL2U.js} +49 -7
- package/dist/chunk-HOUVOL2U.js.map +1 -0
- package/dist/{chunk-S3CVZTU4.js → chunk-JQX3TEIH.js} +103 -53
- package/dist/chunk-JQX3TEIH.js.map +1 -0
- package/dist/{chunk-BXKFJ5NQ.js → chunk-KLAUURL2.js} +5 -5
- package/dist/{chunk-BXKFJ5NQ.js.map → chunk-KLAUURL2.js.map} +1 -1
- package/dist/{chunk-ETYE73AH.js → chunk-QXUKMUJI.js} +141 -4
- package/dist/chunk-QXUKMUJI.js.map +1 -0
- package/dist/{chunk-PVX6FWCW.js → chunk-RWQ7KPUG.js} +73 -85
- package/dist/chunk-RWQ7KPUG.js.map +1 -0
- package/dist/{chunk-ZEGKRQA4.js → chunk-U2SG3RVX.js} +3 -3
- package/dist/{chunk-ZEGKRQA4.js.map → chunk-U2SG3RVX.js.map} +1 -1
- package/dist/{chunk-5LISZE2R.js → chunk-Y5NPCET5.js} +5 -5
- package/dist/{chunk-5LISZE2R.js.map → chunk-Y5NPCET5.js.map} +1 -1
- package/dist/{chunk-AVMMEQLO.js → chunk-ZLEHRJEM.js} +21 -6
- package/dist/chunk-ZLEHRJEM.js.map +1 -0
- package/dist/{cross-tab-session-B34BLQU4.js → cross-tab-session-6VREJNSI.js} +6 -6
- package/dist/{cross-tab-session-B34BLQU4.js.map → cross-tab-session-6VREJNSI.js.map} +1 -1
- package/dist/entries/auth.d.ts +2 -2
- package/dist/entries/auth.js +5 -5
- package/dist/entries/auth.js.map +1 -1
- package/dist/entries/crm.d.ts +6 -3
- package/dist/entries/crm.js +7 -7
- package/dist/index.d.ts +19 -16
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/{build-error-description-XKI8vhGv.d.ts → route-guard-contract-KaQaafb7.d.ts} +257 -246
- package/dist/{use-sync-DpazhM4d.d.ts → use-sync-Bc3XBQBA.d.ts} +12 -12
- package/package.json +15 -23
- package/dist/chunk-AVMMEQLO.js.map +0 -1
- package/dist/chunk-ETYE73AH.js.map +0 -1
- package/dist/chunk-NDDE6ZZ3.js.map +0 -1
- package/dist/chunk-PVX6FWCW.js.map +0 -1
- package/dist/chunk-S3CVZTU4.js.map +0 -1
- package/dist/{pipeline-ui-COO9b3x2.d.ts → cache-purge-rOALAcjJ.d.ts} +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId,
|
|
2
|
-
import { 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-
|
|
1
|
+
import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId, makePreviewParams, tableStore, actions2, userStore, isPipelineBoardObjectTypeId, fileStore, actions7, emailStore, actions5, noteStore, actions4, tableUiStore, resetAllStore, breadcrumbStage, isMessingParentLastItem, isMessingParent, generateUrl } from './chunk-QXUKMUJI.js';
|
|
2
|
+
import { 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-HOUVOL2U.js';
|
|
3
3
|
import { getClientType, configureStorageKeys } from './chunk-KPHAQNS2.js';
|
|
4
4
|
import { AuthErrorCode } from './chunk-COHBSTHF.js';
|
|
5
5
|
import axios from 'axios';
|
|
@@ -139,6 +139,7 @@ var API_ENDPOINTS = {
|
|
|
139
139
|
CACHE_PURGE_STATUS_LEGACY: "/api/${hubId}/${portalId}/cache/purge/${purgeJobId}",
|
|
140
140
|
// Object (read on hubspot-object-data; form layout on hubspot-object-forms)
|
|
141
141
|
OBJECTS: "/api/${hubId}/${portalId}/hubspot-object-data/${hubspotObjectTypeId}/records",
|
|
142
|
+
OBJECTS_PUBLIC: "/api/${hubId}/public/hubspot-object-data/${hubspotObjectTypeId}/records",
|
|
142
143
|
OBJECTS_FORM: "/api/${hubId}/${portalId}/hubspot-object-forms/${hubspotObjectTypeId}/fields",
|
|
143
144
|
OBJECTS_FORM_OPTIONS: "/api/${hubId}/${portalId}/hubspot-object-forms/${formId}/${objectTypeId}",
|
|
144
145
|
RECORDS_CREATE: "/api/${hubId}/${portalId}/hubspot-object-data/${hubspotObjectTypeId}/records",
|
|
@@ -150,6 +151,7 @@ var API_ENDPOINTS = {
|
|
|
150
151
|
/** @deprecated Use RECORDS_ASSOCIATE */
|
|
151
152
|
OBJECTS_CREATE_EXISTING: "/api/${hubId}/${portalId}/hubspot-object-forms/:fromObjectTypeId/:fromRecordId/associations/:toObjectTypeId",
|
|
152
153
|
OBJECTS_DETAILS: "/api/${hubId}/${portalId}/hubspot-object-data/${objectId}/records/${id}",
|
|
154
|
+
OBJECTS_DETAILS_PUBLIC: "/api/${hubId}/public/hubspot-object-data/${objectId}/records/${id}",
|
|
153
155
|
/** @deprecated Use RECORDS_UPDATE */
|
|
154
156
|
OBJECTS_DETAILS_UPDATE: "/api/${hubId}/${portalId}/hubspot-object-forms/${objectId}/records/${id}",
|
|
155
157
|
OBJECTS_DETAILS_UPDATE_LEGACY: "/api/${hubId}/${portalId}/hubspot-object-forms/${objectId}/properties/${id}",
|
|
@@ -438,7 +440,7 @@ function initializeHttpClient(clientConfig) {
|
|
|
438
440
|
migrateLegacyStorageKeys();
|
|
439
441
|
}).catch(() => {
|
|
440
442
|
});
|
|
441
|
-
void import('./cross-tab-session-
|
|
443
|
+
void import('./cross-tab-session-6VREJNSI.js').then(({ installCrossTabSessionListener }) => {
|
|
442
444
|
installCrossTabSessionListener();
|
|
443
445
|
}).catch(() => {
|
|
444
446
|
});
|
|
@@ -909,6 +911,9 @@ var buildChildRoute = (props, breadcrumbItems) => {
|
|
|
909
911
|
o_t_id: props?.objectTypeId,
|
|
910
912
|
o_r_id: props?.recordId
|
|
911
913
|
};
|
|
914
|
+
if (props?.nodeId) {
|
|
915
|
+
newCrumb.n_id = props.nodeId;
|
|
916
|
+
}
|
|
912
917
|
breadcrumbs.push(newCrumb);
|
|
913
918
|
} else if (breadcrumbType === "root") {
|
|
914
919
|
const newCrumb = {
|
|
@@ -916,6 +921,9 @@ var buildChildRoute = (props, breadcrumbItems) => {
|
|
|
916
921
|
o_t_id: props?.objectTypeId,
|
|
917
922
|
o_r_id: props?.recordId
|
|
918
923
|
};
|
|
924
|
+
if (props?.nodeId) {
|
|
925
|
+
newCrumb.n_id = props.nodeId;
|
|
926
|
+
}
|
|
919
927
|
if (props?.isPC) {
|
|
920
928
|
newCrumb.prm = {
|
|
921
929
|
isPC: props?.isPC
|
|
@@ -932,6 +940,9 @@ var buildChildRoute = (props, breadcrumbItems) => {
|
|
|
932
940
|
o_t_id: props?.objectTypeId,
|
|
933
941
|
o_r_id: props?.recordId
|
|
934
942
|
};
|
|
943
|
+
if (props?.nodeId) {
|
|
944
|
+
newCrumb.n_id = props.nodeId;
|
|
945
|
+
}
|
|
935
946
|
if (props?.isPC) {
|
|
936
947
|
newCrumb.prm = {
|
|
937
948
|
isPC: props?.isPC
|
|
@@ -1797,45 +1808,46 @@ var authenticationClient = {
|
|
|
1797
1808
|
// src/main/features/crm/client/crm-client.ts
|
|
1798
1809
|
var crmClient = {
|
|
1799
1810
|
pipeline: {
|
|
1800
|
-
list: (payload = null,
|
|
1801
|
-
const params =
|
|
1811
|
+
list: (payload = null, listTableParams = null) => {
|
|
1812
|
+
const params = payload?.params;
|
|
1813
|
+
const queryParams = payload?.queryParams;
|
|
1802
1814
|
const { paramsObject } = getParamDetails2({ type: payload?.componentName });
|
|
1803
1815
|
const userData = userStore.getState().profile;
|
|
1804
1816
|
const apiParams = {};
|
|
1805
1817
|
const tableParams = payload?.tableParams && typeof payload.tableParams === "object" ? payload.tableParams : {};
|
|
1806
|
-
const parentObjectTypeId = paramsObject?.parentObjectTypeId ??
|
|
1818
|
+
const parentObjectTypeId = paramsObject?.parentObjectTypeId ?? listTableParams?.parentObjectTypeId ?? tableParams.parentObjectTypeId;
|
|
1807
1819
|
if (parentObjectTypeId) {
|
|
1808
1820
|
apiParams.parentObjectTypeId = parentObjectTypeId;
|
|
1809
|
-
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && !
|
|
1821
|
+
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && !listTableParams?.isPrimaryCompany) {
|
|
1810
1822
|
apiParams.parentObjectTypeId = userData?.crmProfile?.info?.objectTypeId;
|
|
1811
|
-
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId &&
|
|
1823
|
+
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && listTableParams?.isPrimaryCompany) {
|
|
1812
1824
|
apiParams.parentObjectTypeId = "0-2";
|
|
1813
1825
|
}
|
|
1814
|
-
const isPrimaryCompany =
|
|
1826
|
+
const isPrimaryCompany = listTableParams?.isPrimaryCompany ?? tableParams.isPrimaryCompany ?? paramsObject?.isPrimaryCompany;
|
|
1815
1827
|
if (isPrimaryCompany !== void 0 && isPrimaryCompany !== null && isPrimaryCompany !== "") {
|
|
1816
1828
|
apiParams.isPrimaryCompany = isPrimaryCompany;
|
|
1817
1829
|
}
|
|
1818
|
-
|
|
1819
|
-
|
|
1830
|
+
const apiUrl = generateApiUrl({
|
|
1831
|
+
route: API_ENDPOINTS.PIPELINES,
|
|
1832
|
+
params,
|
|
1833
|
+
queryParams: { ...apiParams, ...queryParams }
|
|
1834
|
+
});
|
|
1820
1835
|
return HttpClient.get(apiUrl);
|
|
1821
1836
|
}
|
|
1822
1837
|
},
|
|
1823
1838
|
stage: {
|
|
1824
|
-
list: (
|
|
1825
|
-
const params =
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
objectTypeId: props?.params?.objectTypeId,
|
|
1829
|
-
pipelineId: props?.params?.pipelineId
|
|
1830
|
-
};
|
|
1831
|
-
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.STAGES, params });
|
|
1839
|
+
list: (payload = null) => {
|
|
1840
|
+
const params = payload?.params;
|
|
1841
|
+
const queryParams = payload?.queryParams;
|
|
1842
|
+
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.STAGES, params, queryParams });
|
|
1832
1843
|
return HttpClient.get(apiUrl);
|
|
1833
1844
|
}
|
|
1834
1845
|
},
|
|
1835
1846
|
object: {
|
|
1836
|
-
list: async (payload = null,
|
|
1847
|
+
list: async (payload = null, listTableParams = null) => {
|
|
1837
1848
|
const { setObjectsQueryParams } = actions2;
|
|
1838
|
-
const params =
|
|
1849
|
+
const params = payload?.params;
|
|
1850
|
+
const queryParams = payload?.queryParams;
|
|
1839
1851
|
const { updateLink: updateLink2, getLinkParams } = updateLink();
|
|
1840
1852
|
const { paramsObject, parentAccessLabel } = getParamDetails2({ type: payload?.componentName });
|
|
1841
1853
|
const userData = userStore.getState().profile;
|
|
@@ -1843,62 +1855,63 @@ var crmClient = {
|
|
|
1843
1855
|
const mPipelines = payload?.variables?.mPipelines;
|
|
1844
1856
|
const mSelectedPipeline = pipeline !== void 0 ? pipeline : payload?.selectedPipeline;
|
|
1845
1857
|
if (mSelectedPipeline) {
|
|
1846
|
-
|
|
1858
|
+
listTableParams.filterValue = mSelectedPipeline;
|
|
1847
1859
|
} else if (payload?.specPipeLine && payload?.pipeLineId) {
|
|
1848
|
-
|
|
1860
|
+
listTableParams.filterValue = payload?.pipeLineId;
|
|
1849
1861
|
} else if (!isPipelineBoardObjectTypeId(payload?.hubspotObjectTypeId)) {
|
|
1850
|
-
|
|
1862
|
+
listTableParams.filterValue = "";
|
|
1851
1863
|
}
|
|
1852
1864
|
const fParams = getLinkParams();
|
|
1853
|
-
|
|
1865
|
+
listTableParams = { ...payload?.isFristTimeLoadData && fParams && !payload?.isHome ? fParams : listTableParams, ...paramsObject };
|
|
1854
1866
|
if (!payload?.isFristTimeLoadData || !fParams) {
|
|
1855
1867
|
await updateLink2({
|
|
1856
|
-
sort:
|
|
1857
|
-
s:
|
|
1858
|
-
fPn:
|
|
1859
|
-
fO:
|
|
1860
|
-
fV:
|
|
1861
|
-
// "c":
|
|
1862
|
-
isPC:
|
|
1863
|
-
v:
|
|
1864
|
-
l:
|
|
1865
|
-
p:
|
|
1866
|
-
a:
|
|
1868
|
+
sort: listTableParams?.sort,
|
|
1869
|
+
s: listTableParams?.search,
|
|
1870
|
+
fPn: listTableParams?.filterPropertyName,
|
|
1871
|
+
fO: listTableParams?.filterOperator,
|
|
1872
|
+
fV: listTableParams?.filterValue,
|
|
1873
|
+
// "c": listTableParams?.cache,
|
|
1874
|
+
isPC: listTableParams?.isPrimaryCompany,
|
|
1875
|
+
v: listTableParams?.view,
|
|
1876
|
+
l: listTableParams?.limit,
|
|
1877
|
+
p: listTableParams?.page,
|
|
1878
|
+
a: listTableParams?.after
|
|
1867
1879
|
});
|
|
1868
1880
|
}
|
|
1869
1881
|
if (mPipelines != void 0 && mPipelines?.length === 0 && !payload?.specPipeLine) {
|
|
1870
|
-
|
|
1882
|
+
listTableParams.filterValue = "";
|
|
1871
1883
|
await updateLink2({
|
|
1872
|
-
fV:
|
|
1884
|
+
fV: listTableParams?.filterValue
|
|
1873
1885
|
});
|
|
1874
1886
|
}
|
|
1875
1887
|
if (mPipelines != void 0 && mPipelines?.length === 1 && !payload?.specPipeLine && mSelectedPipeline != null) {
|
|
1876
|
-
|
|
1888
|
+
listTableParams.filterValue = mPipelines[0].pipelineId;
|
|
1877
1889
|
await updateLink2({
|
|
1878
|
-
fV:
|
|
1890
|
+
fV: listTableParams?.filterValue
|
|
1879
1891
|
});
|
|
1880
1892
|
}
|
|
1881
1893
|
if (payload?.isHome || payload?.hubspotObjectTypeId === "0-5" && payload?.componentName === "object") {
|
|
1882
1894
|
let parentObjectTypeId = "";
|
|
1883
|
-
if (userData?.crmProfile?.info?.objectTypeId && !
|
|
1895
|
+
if (userData?.crmProfile?.info?.objectTypeId && !listTableParams?.isPrimaryCompany) {
|
|
1884
1896
|
parentObjectTypeId = userData?.crmProfile?.info?.objectTypeId;
|
|
1885
|
-
} else if (userData?.crmProfile?.info?.objectTypeId &&
|
|
1897
|
+
} else if (userData?.crmProfile?.info?.objectTypeId && listTableParams?.isPrimaryCompany) {
|
|
1886
1898
|
parentObjectTypeId = "0-2";
|
|
1887
1899
|
}
|
|
1888
|
-
|
|
1900
|
+
listTableParams.parentObjectTypeId = parentObjectTypeId;
|
|
1889
1901
|
}
|
|
1890
|
-
|
|
1891
|
-
finalizeBoardListQueryParams(
|
|
1892
|
-
setObjectsQueryParams(
|
|
1893
|
-
|
|
1894
|
-
const
|
|
1902
|
+
listTableParams.parentAccessLabel = parentAccessLabel;
|
|
1903
|
+
finalizeBoardListQueryParams(listTableParams);
|
|
1904
|
+
setObjectsQueryParams(listTableParams);
|
|
1905
|
+
listTableParams = { ...listTableParams, ...queryParams };
|
|
1906
|
+
const route = payload?.public ? API_ENDPOINTS.OBJECTS_PUBLIC : API_ENDPOINTS.OBJECTS;
|
|
1907
|
+
const apiUrl = generateApiUrl({ route, params, queryParams: listTableParams });
|
|
1895
1908
|
return HttpClient.get(apiUrl);
|
|
1896
1909
|
},
|
|
1897
1910
|
sideBarList: async (payload = null) => {
|
|
1898
1911
|
const { setMultiObjectsQueryParams } = actions2;
|
|
1899
1912
|
const hubspotObjectTypeId = payload?.hubspotObjectTypeId;
|
|
1900
|
-
const params =
|
|
1901
|
-
const queryParams = payload
|
|
1913
|
+
const params = payload?.params;
|
|
1914
|
+
const queryParams = payload?.queryParams;
|
|
1902
1915
|
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.OBJECTS, params, queryParams });
|
|
1903
1916
|
setMultiObjectsQueryParams(hubspotObjectTypeId, queryParams ?? {});
|
|
1904
1917
|
return HttpClient.get(apiUrl);
|
|
@@ -1917,17 +1930,18 @@ var crmClient = {
|
|
|
1917
1930
|
return HttpClient.get(apiUrl);
|
|
1918
1931
|
},
|
|
1919
1932
|
create: async (props = null) => {
|
|
1933
|
+
const params = props?.params;
|
|
1934
|
+
const queryParams = props?.queryParams;
|
|
1920
1935
|
const { paramsObject } = getParamDetails2({ type: props?.componentName });
|
|
1921
1936
|
const cardParentMerge = props?.componentName === "association" || props?.componentName === "sidebarAssociation" ? true : false;
|
|
1922
1937
|
const body = mergeRecordWriteBody(props?.payload, paramsObject, {
|
|
1923
1938
|
cardParentMerge,
|
|
1924
1939
|
addAnother: props?.params?.addAnother
|
|
1925
1940
|
});
|
|
1926
|
-
const
|
|
1927
|
-
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_CREATE, params, queryParams: props?.params });
|
|
1941
|
+
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_CREATE, params, queryParams });
|
|
1928
1942
|
const response = await HttpClient.post(apiUrl, body);
|
|
1929
1943
|
triggerPostWriteListPurge({
|
|
1930
|
-
hubspotObjectTypeId: props?.hubspotObjectTypeId,
|
|
1944
|
+
hubspotObjectTypeId: props?.params?.hubspotObjectTypeId,
|
|
1931
1945
|
componentName: props?.componentName,
|
|
1932
1946
|
paramsObject,
|
|
1933
1947
|
recordId: extractHubspotRecordIdFromWriteResponse(response)
|
|
@@ -2018,51 +2032,25 @@ var crmClient = {
|
|
|
2018
2032
|
};
|
|
2019
2033
|
}
|
|
2020
2034
|
if (hubspotObjectTypeId) queryParams.parentObjectTypeId = hubspotObjectTypeId;
|
|
2021
|
-
const
|
|
2035
|
+
const route = props?.public ? API_ENDPOINTS.OBJECTS_DETAILS_PUBLIC : API_ENDPOINTS.OBJECTS_DETAILS;
|
|
2036
|
+
const apiUrl = generateApiUrl({ route, params, queryParams });
|
|
2022
2037
|
return HttpClient.get(apiUrl);
|
|
2023
2038
|
},
|
|
2024
2039
|
update: async (props = null) => {
|
|
2025
2040
|
const hubspotObjectTypeId = ticketHubspotObjectTypeId();
|
|
2026
|
-
const params =
|
|
2027
|
-
|
|
2028
|
-
id: props?.params?.id
|
|
2029
|
-
};
|
|
2041
|
+
const params = props?.params;
|
|
2042
|
+
const queryParams = props?.queryParams ?? {};
|
|
2030
2043
|
const { paramsObject } = getParamDetails2({ type: props?.componentName });
|
|
2031
2044
|
const cardParentMerge = props?.componentName === "association" ? true : false;
|
|
2032
2045
|
const rawPayload = props?.payload || {};
|
|
2033
2046
|
const properties = rawPayload.properties ?? rawPayload.propertyPayload ?? rawPayload;
|
|
2034
2047
|
const body = mergeRecordWriteBody({ properties }, paramsObject, { cardParentMerge });
|
|
2035
|
-
const queryParams = {};
|
|
2036
2048
|
if (hubspotObjectTypeId) queryParams.parentObjectTypeId = hubspotObjectTypeId;
|
|
2037
2049
|
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_UPDATE, params, queryParams });
|
|
2038
|
-
const { queryParams: tableQueryParams, multiObjectsQueryParams } = tableStore.getState();
|
|
2039
|
-
const writeContext = recordWriteContext(paramsObject);
|
|
2040
|
-
const listQuery = resolveCrmListPurgeQuery({
|
|
2041
|
-
componentName: props?.componentName,
|
|
2042
|
-
hubspotObjectTypeId: props?.hubspotObjectTypeId ?? props?.params?.objectId,
|
|
2043
|
-
tableQueryParams,
|
|
2044
|
-
multiObjectsQueryParams,
|
|
2045
|
-
writeContext
|
|
2046
|
-
});
|
|
2047
2050
|
if (props?.view === "board") {
|
|
2048
2051
|
body.options.view = "board";
|
|
2049
2052
|
}
|
|
2050
2053
|
const response = await HttpClient.put(apiUrl, body);
|
|
2051
|
-
const objectTypeId = props?.hubspotObjectTypeId ?? props?.params?.objectId;
|
|
2052
|
-
const recordId = props?.params?.id;
|
|
2053
|
-
if (objectTypeId && recordId) {
|
|
2054
|
-
purgeCrmDetailAndListAfterCrmWrite({
|
|
2055
|
-
objectTypeId: String(objectTypeId),
|
|
2056
|
-
recordIds: [String(recordId)],
|
|
2057
|
-
listQuery
|
|
2058
|
-
});
|
|
2059
|
-
} else if (objectTypeId) {
|
|
2060
|
-
triggerPostWriteListPurge({
|
|
2061
|
-
hubspotObjectTypeId: objectTypeId,
|
|
2062
|
-
componentName: props?.componentName,
|
|
2063
|
-
paramsObject
|
|
2064
|
-
});
|
|
2065
|
-
}
|
|
2066
2054
|
return response;
|
|
2067
2055
|
}
|
|
2068
2056
|
}
|
|
@@ -2516,5 +2504,5 @@ function createMutation(mutationFn, options) {
|
|
|
2516
2504
|
}
|
|
2517
2505
|
|
|
2518
2506
|
export { API_ENDPOINTS, Client, HttpClient, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, createCachePurgeJob, createMutation, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, generateApiUrl, getAuthRefreshToken, getFieldErrors, getFormErrors, initializeHttpClient, mergePurgeTargets, navigationApi, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, resolveListTableParams, setEditorPreviewMockHandler, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler, toCachePurgeListQuery };
|
|
2519
|
-
//# sourceMappingURL=chunk-
|
|
2520
|
-
//# sourceMappingURL=chunk-
|
|
2507
|
+
//# sourceMappingURL=chunk-RWQ7KPUG.js.map
|
|
2508
|
+
//# sourceMappingURL=chunk-RWQ7KPUG.js.map
|