woodsportal-client-sdk 4.0.9-dev.4 → 4.0.9-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.
@@ -105,6 +105,13 @@ declare function existingList(options?: MutationOptions<any, any>): {
105
105
  getExistingObjects: (payload?: any) => Promise<any>;
106
106
  isLoading: () => boolean;
107
107
  };
108
+ declare function addExistingList(options?: MutationOptions<any, any>): {
109
+ mutate: (payload?: any) => Promise<any>;
110
+ addExistingList: (payload?: any) => Promise<any>;
111
+ listAddExisting: (payload?: any) => Promise<any>;
112
+ getAddExistingObjects: (payload?: any) => Promise<any>;
113
+ isLoading: () => boolean;
114
+ };
108
115
  declare function sideBarList(options?: MutationOptions<any, any>): {
109
116
  mutate: (payload?: any) => Promise<any>;
110
117
  listSidebar: (payload?: any) => Promise<any>;
@@ -252,4 +259,4 @@ type CrmCachePurgeOptions = {
252
259
  idempotencyKey?: string;
253
260
  };
254
261
 
255
- export { purgeStatus as A, type CachePurgeListQuery as B, type CachePurgeDomain as C, type CachePurgeMode as D, type CachePurgeRequest as E, type CachePurgeTarget as F, type CachePurgeView as G, type CreateCachePurgeJobOptions as H, type CrmCachePurgeOptions as I, HUBSPOT_DEALS_OBJECT_TYPE_ID as J, HUBSPOT_TICKETS_OBJECT_TYPE_ID as K, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS as L, type PurgeResult as M, isPipelineBoardObjectType as N, isPipelineBoardObjectTypeId as O, PIPELINE_BOARD_OBJECT_TYPE_IDS as P, shouldShowPipelineSelector as Q, supportsBoardView as R, list$1 as a, list$2 as b, create as c, details as d, existingList as e, form as f, createExisting as g, list$3 as h, create$1 as i, update$1 as j, list$4 as k, list as l, create$2 as m, update$2 as n, objectFormOptions as o, list$5 as p, details$1 as q, removeExisting as r, sideBarList as s, download as t, update as u, addFolder as v, addFile as w, imageUpload as x, attachmentUpload as y, purge as z };
262
+ export { purge as A, purgeStatus as B, type CachePurgeDomain as C, type CachePurgeListQuery as D, type CachePurgeMode as E, type CachePurgeRequest as F, type CachePurgeTarget as G, type CachePurgeView as H, type CreateCachePurgeJobOptions as I, type CrmCachePurgeOptions as J, HUBSPOT_DEALS_OBJECT_TYPE_ID as K, HUBSPOT_TICKETS_OBJECT_TYPE_ID as L, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS as M, type PurgeResult as N, isPipelineBoardObjectType as O, PIPELINE_BOARD_OBJECT_TYPE_IDS as P, isPipelineBoardObjectTypeId as Q, shouldShowPipelineSelector as R, supportsBoardView as S, list$1 as a, list$2 as b, addExistingList as c, details as d, existingList as e, form as f, create as g, createExisting as h, list$3 as i, create$1 as j, update$1 as k, list as l, list$4 as m, create$2 as n, objectFormOptions as o, update$2 as p, list$5 as q, removeExisting as r, sideBarList as s, details$1 as t, update as u, download as v, addFolder as w, addFile as x, imageUpload as y, attachmentUpload as z };
@@ -149,6 +149,8 @@ var API_ENDPOINTS = {
149
149
  RECORDS_UPDATE: "/api/${hubId}/${portalId}/hubspot-object-data/${objectId}/records/${id}",
150
150
  RECORDS_ASSOCIATE: "/api/${hubId}/${portalId}/hubspot-object-data/${fromObjectTypeId}/records/${fromRecordId}/associations/${toObjectTypeId}",
151
151
  RECORDS_DISASSOCIATE: "/api/${hubId}/${portalId}/hubspot-object-data/${fromObjectTypeId}/records/${fromRecordId}/associations/${toObjectTypeId}",
152
+ RECORDS_EXISTING: "/api/${hubId}/${portalId}/hubspot-object-data/${hubspotObjectTypeId}/existing-records",
153
+ RECORDS_ADD_EXISTING: "/api/${hubId}/${portalId}/hubspot-object-data/${parentObjectTypeId}/records/${recordId}/associations/${hubspotObjectTypeId}",
152
154
  /** @deprecated Use RECORDS_CREATE */
153
155
  OBJECTS_CREATE: "/api/${hubId}/${portalId}/hubspot-object-forms/${hubspotObjectTypeId}/fields",
154
156
  /** @deprecated Use RECORDS_ASSOCIATE */
@@ -1915,73 +1917,22 @@ var crmClient = {
1915
1917
  const apiUrl = generateApiUrl({ route, params, queryParams: listTableParams });
1916
1918
  return HttpClient.get(apiUrl);
1917
1919
  },
1918
- existingList: async (payload = null, listTableParams = null) => {
1919
- const { setObjectsQueryParams } = actions2;
1920
- const queryParams = payload?.queryParams;
1921
- const { updateLink: updateLink2, getLinkParams } = updateLink();
1922
- const { paramsObject, parentAccessLabel } = getParamDetails2({ type: payload?.componentName });
1923
- const userData = userStore.getState().profile;
1924
- const toObjectTypeId = payload?.toObjectTypeId ?? payload?.urlParams?.toObjectTypeId ?? payload?.hubspotObjectTypeId;
1925
- ({ ...payload});
1926
- const pipeline = payload?.variables?.pipeline;
1927
- const mPipelines = payload?.variables?.mPipelines;
1928
- const mSelectedPipeline = pipeline !== void 0 ? pipeline : payload?.selectedPipeline;
1929
- if (mSelectedPipeline) {
1930
- listTableParams.filterValue = mSelectedPipeline;
1931
- } else if (payload?.specPipeLine && payload?.pipeLineId) {
1932
- listTableParams.filterValue = payload?.pipeLineId;
1933
- } else if (!isPipelineBoardObjectTypeId(toObjectTypeId)) {
1934
- listTableParams.filterValue = "";
1935
- }
1936
- const fParams = getLinkParams();
1937
- listTableParams = { ...payload?.isFristTimeLoadData && fParams && !payload?.isHome ? fParams : listTableParams, ...paramsObject };
1938
- if (!payload?.isFristTimeLoadData || !fParams) {
1939
- await updateLink2({
1940
- sort: listTableParams?.sort,
1941
- s: listTableParams?.search,
1942
- fPn: listTableParams?.filterPropertyName,
1943
- fO: listTableParams?.filterOperator,
1944
- fV: listTableParams?.filterValue,
1945
- isPC: listTableParams?.isPrimaryCompany,
1946
- v: listTableParams?.view,
1947
- l: listTableParams?.limit,
1948
- p: listTableParams?.page,
1949
- a: listTableParams?.after
1950
- });
1951
- }
1952
- if (mPipelines != void 0 && mPipelines?.length === 0 && !payload?.specPipeLine) {
1953
- listTableParams.filterValue = "";
1954
- await updateLink2({
1955
- fV: listTableParams?.filterValue
1956
- });
1957
- }
1958
- if (mPipelines != void 0 && mPipelines?.length === 1 && !payload?.specPipeLine && mSelectedPipeline != null) {
1959
- listTableParams.filterValue = mPipelines[0].pipelineId;
1960
- await updateLink2({
1961
- fV: listTableParams?.filterValue
1962
- });
1963
- }
1964
- if (payload?.isHome || toObjectTypeId === "0-5" && payload?.componentName === "object") {
1965
- let parentObjectTypeId = "";
1966
- if (userData?.crmProfile?.info?.objectTypeId && !listTableParams?.isPrimaryCompany) {
1967
- parentObjectTypeId = userData?.crmProfile?.info?.objectTypeId;
1968
- } else if (userData?.crmProfile?.info?.objectTypeId && listTableParams?.isPrimaryCompany) {
1969
- parentObjectTypeId = "0-2";
1970
- }
1971
- listTableParams.parentObjectTypeId = parentObjectTypeId;
1972
- }
1973
- listTableParams.parentAccessLabel = parentAccessLabel;
1974
- finalizeBoardListQueryParams(listTableParams);
1975
- setObjectsQueryParams(listTableParams);
1976
- listTableParams = { ...listTableParams, ...queryParams };
1977
- const params = {
1978
- fromObjectTypeId: payload?.fromObjectTypeId ?? payload?.urlParams?.fromObjectTypeId ?? payload?.hubspotObjectTypeId,
1979
- fromRecordId: payload?.fromRecordId ?? payload?.urlParams?.fromRecordId,
1980
- toObjectTypeId
1981
- };
1982
- const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_ASSOCIATE, params, queryParams: listTableParams });
1920
+ existingList: async (payload = null) => {
1921
+ const hubspotObjectTypeId = payload?.hubspotObjectTypeId;
1922
+ const params = { ...{ hubspotObjectTypeId }, ...payload?.params };
1923
+ const { paramsObject } = getParamDetails2({ type: payload?.componentName });
1924
+ const queryParams = { ...{ parentObjectTypeId: paramsObject?.parentObjectTypeId }, ...payload?.queryParams };
1925
+ const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_EXISTING, params, queryParams });
1983
1926
  return HttpClient.get(apiUrl);
1984
1927
  },
1928
+ addExistingList: async (payload = null) => {
1929
+ const hubspotObjectTypeId = payload?.hubspotObjectTypeId;
1930
+ const { paramsObject } = getParamDetails2({ type: payload?.componentName });
1931
+ const params = { ...{ hubspotObjectTypeId, parentObjectTypeId: paramsObject?.parentObjectTypeId, recordId: paramsObject?.parentObjectRecordId }, ...payload?.params };
1932
+ const queryParams = payload?.queryParams;
1933
+ const apiUrl = generateApiUrl({ route: API_ENDPOINTS.RECORDS_ADD_EXISTING, params, queryParams });
1934
+ return HttpClient.post(apiUrl, payload?.payload);
1935
+ },
1985
1936
  sideBarList: async (payload = null) => {
1986
1937
  const { setMultiObjectsQueryParams } = actions2;
1987
1938
  const hubspotObjectTypeId = payload?.hubspotObjectTypeId;
@@ -2579,5 +2530,5 @@ function createMutation(mutationFn, options) {
2579
2530
  }
2580
2531
 
2581
2532
  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 };
2582
- //# sourceMappingURL=chunk-DZF5LIXW.js.map
2583
- //# sourceMappingURL=chunk-DZF5LIXW.js.map
2533
+ //# sourceMappingURL=chunk-FB6BAPIW.js.map
2534
+ //# sourceMappingURL=chunk-FB6BAPIW.js.map