woodsportal-client-sdk 4.0.8-dev.7 → 4.0.8-dev.9
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 +5 -0
- package/dist/adapters/angular/index.js +3 -3
- package/dist/adapters/native/index.js +4 -4
- package/dist/adapters/react/index.d.ts +5 -0
- package/dist/adapters/react/index.js +4 -4
- package/dist/adapters/vue/index.d.ts +5 -0
- package/dist/adapters/vue/index.js +3 -3
- package/dist/{chunk-TOPDSDR7.js → chunk-F2DP2LL3.js} +4 -4
- package/dist/{chunk-TOPDSDR7.js.map → chunk-F2DP2LL3.js.map} +1 -1
- package/dist/{chunk-PHBLKSQL.js → chunk-PBLCNJFY.js} +103 -53
- package/dist/chunk-PBLCNJFY.js.map +1 -0
- package/dist/{chunk-G3WSU24Y.js → chunk-QXUKMUJI.js} +131 -3
- package/dist/chunk-QXUKMUJI.js.map +1 -0
- package/dist/{chunk-YBX4ZFZE.js → chunk-U2SG3RVX.js} +3 -3
- package/dist/{chunk-YBX4ZFZE.js.map → chunk-U2SG3RVX.js.map} +1 -1
- package/dist/{chunk-5LOW4BG4.js → chunk-XNGCGJOZ.js} +62 -59
- package/dist/chunk-XNGCGJOZ.js.map +1 -0
- package/dist/{chunk-4HFF7VEA.js → chunk-XXBYLL4A.js} +4 -4
- package/dist/{chunk-4HFF7VEA.js.map → chunk-XXBYLL4A.js.map} +1 -1
- package/dist/{chunk-R2MUWV5I.js → chunk-Y5NPCET5.js} +4 -4
- package/dist/{chunk-R2MUWV5I.js.map → chunk-Y5NPCET5.js.map} +1 -1
- package/dist/{chunk-KUQ35AVI.js → chunk-ZLEHRJEM.js} +21 -6
- package/dist/chunk-ZLEHRJEM.js.map +1 -0
- package/dist/{cross-tab-session-EFVMEOMN.js → cross-tab-session-6VREJNSI.js} +5 -5
- package/dist/{cross-tab-session-EFVMEOMN.js.map → cross-tab-session-6VREJNSI.js.map} +1 -1
- package/dist/entries/auth.js +4 -4
- package/dist/entries/crm.d.ts +3 -0
- package/dist/entries/crm.js +6 -6
- package/dist/index.d.ts +6 -3
- package/dist/index.js +10 -10
- package/package.json +1 -1
- package/dist/chunk-5LOW4BG4.js.map +0 -1
- package/dist/chunk-G3WSU24Y.js.map +0 -1
- package/dist/chunk-KUQ35AVI.js.map +0 -1
- package/dist/chunk-PHBLKSQL.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId, tableStore, makePreviewParams, actions2, userStore, isPipelineBoardObjectTypeId, fileStore, actions7, emailStore, actions5, noteStore, actions4, tableUiStore, resetAllStore, breadcrumbStage, isMessingParentLastItem, isMessingParent, generateUrl } from './chunk-
|
|
1
|
+
import { getParamDetails, getRouteDetails, updateLink, getParam, decodeToBase64, generatePath, getPath, getRouteMenu, tableUiActions, ticketHubspotObjectTypeId, tableStore, makePreviewParams, actions2, userStore, isPipelineBoardObjectTypeId, fileStore, actions7, emailStore, actions5, noteStore, actions4, tableUiStore, resetAllStore, breadcrumbStage, isMessingParentLastItem, isMessingParent, generateUrl } from './chunk-QXUKMUJI.js';
|
|
2
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';
|
|
@@ -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
|
});
|
|
@@ -1806,45 +1808,46 @@ var authenticationClient = {
|
|
|
1806
1808
|
// src/main/features/crm/client/crm-client.ts
|
|
1807
1809
|
var crmClient = {
|
|
1808
1810
|
pipeline: {
|
|
1809
|
-
list: (payload = null,
|
|
1810
|
-
const params =
|
|
1811
|
+
list: (payload = null, listTableParams = null) => {
|
|
1812
|
+
const params = payload?.params;
|
|
1813
|
+
const queryParams = payload?.params?.queryParams;
|
|
1811
1814
|
const { paramsObject } = getParamDetails2({ type: payload?.componentName });
|
|
1812
1815
|
const userData = userStore.getState().profile;
|
|
1813
1816
|
const apiParams = {};
|
|
1814
1817
|
const tableParams = payload?.tableParams && typeof payload.tableParams === "object" ? payload.tableParams : {};
|
|
1815
|
-
const parentObjectTypeId = paramsObject?.parentObjectTypeId ??
|
|
1818
|
+
const parentObjectTypeId = paramsObject?.parentObjectTypeId ?? listTableParams?.parentObjectTypeId ?? tableParams.parentObjectTypeId;
|
|
1816
1819
|
if (parentObjectTypeId) {
|
|
1817
1820
|
apiParams.parentObjectTypeId = parentObjectTypeId;
|
|
1818
|
-
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && !
|
|
1821
|
+
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && !listTableParams?.isPrimaryCompany) {
|
|
1819
1822
|
apiParams.parentObjectTypeId = userData?.crmProfile?.info?.objectTypeId;
|
|
1820
|
-
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId &&
|
|
1823
|
+
} else if (payload?.isHome && userData?.crmProfile?.info?.objectTypeId && listTableParams?.isPrimaryCompany) {
|
|
1821
1824
|
apiParams.parentObjectTypeId = "0-2";
|
|
1822
1825
|
}
|
|
1823
|
-
const isPrimaryCompany =
|
|
1826
|
+
const isPrimaryCompany = listTableParams?.isPrimaryCompany ?? tableParams.isPrimaryCompany ?? paramsObject?.isPrimaryCompany;
|
|
1824
1827
|
if (isPrimaryCompany !== void 0 && isPrimaryCompany !== null && isPrimaryCompany !== "") {
|
|
1825
1828
|
apiParams.isPrimaryCompany = isPrimaryCompany;
|
|
1826
1829
|
}
|
|
1827
|
-
|
|
1828
|
-
|
|
1830
|
+
const apiUrl = generateApiUrl({
|
|
1831
|
+
route: API_ENDPOINTS.PIPELINES,
|
|
1832
|
+
params,
|
|
1833
|
+
queryParams: { ...apiParams, ...queryParams }
|
|
1834
|
+
});
|
|
1829
1835
|
return HttpClient.get(apiUrl);
|
|
1830
1836
|
}
|
|
1831
1837
|
},
|
|
1832
1838
|
stage: {
|
|
1833
|
-
list: (
|
|
1834
|
-
const params =
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
objectTypeId: props?.params?.objectTypeId,
|
|
1838
|
-
pipelineId: props?.params?.pipelineId
|
|
1839
|
-
};
|
|
1840
|
-
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 });
|
|
1841
1843
|
return HttpClient.get(apiUrl);
|
|
1842
1844
|
}
|
|
1843
1845
|
},
|
|
1844
1846
|
object: {
|
|
1845
|
-
list: async (payload = null,
|
|
1847
|
+
list: async (payload = null, listTableParams = null) => {
|
|
1846
1848
|
const { setObjectsQueryParams } = actions2;
|
|
1847
|
-
const params =
|
|
1849
|
+
const params = payload?.params;
|
|
1850
|
+
const queryParams = payload?.params?.queryParams;
|
|
1848
1851
|
const { updateLink: updateLink2, getLinkParams } = updateLink();
|
|
1849
1852
|
const { paramsObject, parentAccessLabel } = getParamDetails2({ type: payload?.componentName });
|
|
1850
1853
|
const userData = userStore.getState().profile;
|
|
@@ -1852,62 +1855,63 @@ var crmClient = {
|
|
|
1852
1855
|
const mPipelines = payload?.variables?.mPipelines;
|
|
1853
1856
|
const mSelectedPipeline = pipeline !== void 0 ? pipeline : payload?.selectedPipeline;
|
|
1854
1857
|
if (mSelectedPipeline) {
|
|
1855
|
-
|
|
1858
|
+
listTableParams.filterValue = mSelectedPipeline;
|
|
1856
1859
|
} else if (payload?.specPipeLine && payload?.pipeLineId) {
|
|
1857
|
-
|
|
1860
|
+
listTableParams.filterValue = payload?.pipeLineId;
|
|
1858
1861
|
} else if (!isPipelineBoardObjectTypeId(payload?.hubspotObjectTypeId)) {
|
|
1859
|
-
|
|
1862
|
+
listTableParams.filterValue = "";
|
|
1860
1863
|
}
|
|
1861
1864
|
const fParams = getLinkParams();
|
|
1862
|
-
|
|
1865
|
+
listTableParams = { ...payload?.isFristTimeLoadData && fParams && !payload?.isHome ? fParams : listTableParams, ...paramsObject };
|
|
1863
1866
|
if (!payload?.isFristTimeLoadData || !fParams) {
|
|
1864
1867
|
await updateLink2({
|
|
1865
|
-
sort:
|
|
1866
|
-
s:
|
|
1867
|
-
fPn:
|
|
1868
|
-
fO:
|
|
1869
|
-
fV:
|
|
1870
|
-
// "c":
|
|
1871
|
-
isPC:
|
|
1872
|
-
v:
|
|
1873
|
-
l:
|
|
1874
|
-
p:
|
|
1875
|
-
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
|
|
1876
1879
|
});
|
|
1877
1880
|
}
|
|
1878
1881
|
if (mPipelines != void 0 && mPipelines?.length === 0 && !payload?.specPipeLine) {
|
|
1879
|
-
|
|
1882
|
+
listTableParams.filterValue = "";
|
|
1880
1883
|
await updateLink2({
|
|
1881
|
-
fV:
|
|
1884
|
+
fV: listTableParams?.filterValue
|
|
1882
1885
|
});
|
|
1883
1886
|
}
|
|
1884
1887
|
if (mPipelines != void 0 && mPipelines?.length === 1 && !payload?.specPipeLine && mSelectedPipeline != null) {
|
|
1885
|
-
|
|
1888
|
+
listTableParams.filterValue = mPipelines[0].pipelineId;
|
|
1886
1889
|
await updateLink2({
|
|
1887
|
-
fV:
|
|
1890
|
+
fV: listTableParams?.filterValue
|
|
1888
1891
|
});
|
|
1889
1892
|
}
|
|
1890
1893
|
if (payload?.isHome || payload?.hubspotObjectTypeId === "0-5" && payload?.componentName === "object") {
|
|
1891
1894
|
let parentObjectTypeId = "";
|
|
1892
|
-
if (userData?.crmProfile?.info?.objectTypeId && !
|
|
1895
|
+
if (userData?.crmProfile?.info?.objectTypeId && !listTableParams?.isPrimaryCompany) {
|
|
1893
1896
|
parentObjectTypeId = userData?.crmProfile?.info?.objectTypeId;
|
|
1894
|
-
} else if (userData?.crmProfile?.info?.objectTypeId &&
|
|
1897
|
+
} else if (userData?.crmProfile?.info?.objectTypeId && listTableParams?.isPrimaryCompany) {
|
|
1895
1898
|
parentObjectTypeId = "0-2";
|
|
1896
1899
|
}
|
|
1897
|
-
|
|
1900
|
+
listTableParams.parentObjectTypeId = parentObjectTypeId;
|
|
1898
1901
|
}
|
|
1899
|
-
|
|
1900
|
-
finalizeBoardListQueryParams(
|
|
1901
|
-
setObjectsQueryParams(
|
|
1902
|
-
|
|
1903
|
-
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 });
|
|
1904
1908
|
return HttpClient.get(apiUrl);
|
|
1905
1909
|
},
|
|
1906
1910
|
sideBarList: async (payload = null) => {
|
|
1907
1911
|
const { setMultiObjectsQueryParams } = actions2;
|
|
1908
1912
|
const hubspotObjectTypeId = payload?.hubspotObjectTypeId;
|
|
1909
|
-
const params =
|
|
1910
|
-
const queryParams = payload
|
|
1913
|
+
const params = payload?.params;
|
|
1914
|
+
const queryParams = payload?.queryParams;
|
|
1911
1915
|
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.OBJECTS, params, queryParams });
|
|
1912
1916
|
setMultiObjectsQueryParams(hubspotObjectTypeId, queryParams ?? {});
|
|
1913
1917
|
return HttpClient.get(apiUrl);
|
|
@@ -1926,14 +1930,15 @@ var crmClient = {
|
|
|
1926
1930
|
return HttpClient.get(apiUrl);
|
|
1927
1931
|
},
|
|
1928
1932
|
create: async (props = null) => {
|
|
1933
|
+
const params = props?.params;
|
|
1934
|
+
const queryParams = props?.queryParams;
|
|
1929
1935
|
const { paramsObject } = getParamDetails2({ type: props?.componentName });
|
|
1930
1936
|
const cardParentMerge = props?.componentName === "association" || props?.componentName === "sidebarAssociation" ? true : false;
|
|
1931
1937
|
const body = mergeRecordWriteBody(props?.payload, paramsObject, {
|
|
1932
1938
|
cardParentMerge,
|
|
1933
1939
|
addAnother: props?.params?.addAnother
|
|
1934
1940
|
});
|
|
1935
|
-
const
|
|
1936
|
-
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_CREATE, params, queryParams: props?.params });
|
|
1941
|
+
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_CREATE, params, queryParams });
|
|
1937
1942
|
const response = await HttpClient.post(apiUrl, body);
|
|
1938
1943
|
triggerPostWriteListPurge({
|
|
1939
1944
|
hubspotObjectTypeId: props?.hubspotObjectTypeId,
|
|
@@ -2027,21 +2032,19 @@ var crmClient = {
|
|
|
2027
2032
|
};
|
|
2028
2033
|
}
|
|
2029
2034
|
if (hubspotObjectTypeId) queryParams.parentObjectTypeId = hubspotObjectTypeId;
|
|
2030
|
-
const
|
|
2035
|
+
const route = props?.public ? API_ENDPOINTS.OBJECTS_DETAILS_PUBLIC : API_ENDPOINTS.OBJECTS_DETAILS;
|
|
2036
|
+
const apiUrl = generateApiUrl({ route, params, queryParams });
|
|
2031
2037
|
return HttpClient.get(apiUrl);
|
|
2032
2038
|
},
|
|
2033
2039
|
update: async (props = null) => {
|
|
2034
2040
|
const hubspotObjectTypeId = ticketHubspotObjectTypeId();
|
|
2035
|
-
const params =
|
|
2036
|
-
|
|
2037
|
-
id: props?.params?.id
|
|
2038
|
-
};
|
|
2041
|
+
const params = props?.params;
|
|
2042
|
+
const queryParams = props?.queryParams ?? {};
|
|
2039
2043
|
const { paramsObject } = getParamDetails2({ type: props?.componentName });
|
|
2040
2044
|
const cardParentMerge = props?.componentName === "association" ? true : false;
|
|
2041
2045
|
const rawPayload = props?.payload || {};
|
|
2042
2046
|
const properties = rawPayload.properties ?? rawPayload.propertyPayload ?? rawPayload;
|
|
2043
2047
|
const body = mergeRecordWriteBody({ properties }, paramsObject, { cardParentMerge });
|
|
2044
|
-
const queryParams = {};
|
|
2045
2048
|
if (hubspotObjectTypeId) queryParams.parentObjectTypeId = hubspotObjectTypeId;
|
|
2046
2049
|
const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_UPDATE, params, queryParams });
|
|
2047
2050
|
const { queryParams: tableQueryParams, multiObjectsQueryParams } = tableStore.getState();
|
|
@@ -2525,5 +2528,5 @@ function createMutation(mutationFn, options) {
|
|
|
2525
2528
|
}
|
|
2526
2529
|
|
|
2527
2530
|
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 };
|
|
2528
|
-
//# sourceMappingURL=chunk-
|
|
2529
|
-
//# sourceMappingURL=chunk-
|
|
2531
|
+
//# sourceMappingURL=chunk-XNGCGJOZ.js.map
|
|
2532
|
+
//# sourceMappingURL=chunk-XNGCGJOZ.js.map
|