woodsportal-client-sdk 4.1.2-dev.2 → 4.1.2-dev.4
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 +9 -2
- package/dist/adapters/angular/index.js +5 -5
- package/dist/adapters/angular/index.js.map +1 -1
- package/dist/adapters/native/index.d.ts +1 -1
- package/dist/adapters/native/index.js +4 -4
- package/dist/adapters/react/index.d.ts +9 -2
- package/dist/adapters/react/index.js +4 -4
- package/dist/adapters/vue/index.d.ts +9 -2
- package/dist/adapters/vue/index.js +5 -5
- package/dist/adapters/vue/index.js.map +1 -1
- package/dist/chunk-CUVU6DCT.js +3 -0
- package/dist/{chunk-55MIERLJ.js.map → chunk-CUVU6DCT.js.map} +1 -1
- package/dist/{chunk-UFQW7TDL.js → chunk-FKSZNQY7.js} +4 -4
- package/dist/{chunk-UFQW7TDL.js.map → chunk-FKSZNQY7.js.map} +1 -1
- package/dist/{chunk-NJIMZXP4.js → chunk-HXHOLT5V.js} +15 -7
- package/dist/chunk-HXHOLT5V.js.map +1 -0
- package/dist/{chunk-T553DXBI.js → chunk-I3JF5QOY.js} +5 -4
- package/dist/chunk-I3JF5QOY.js.map +1 -0
- package/dist/{chunk-USEVXBRI.js → chunk-OXTWWDM3.js} +7 -4
- package/dist/chunk-OXTWWDM3.js.map +1 -0
- package/dist/chunk-P5EWTH5Q.js +16 -0
- package/dist/chunk-P5EWTH5Q.js.map +1 -0
- package/dist/{chunk-3VH52USP.js → chunk-QREX7YVN.js} +6 -5
- package/dist/chunk-QREX7YVN.js.map +1 -0
- package/dist/{chunk-X6NNUGP7.js → chunk-T4YJV6MP.js} +22 -3
- package/dist/chunk-T4YJV6MP.js.map +1 -0
- package/dist/chunk-UCBM5ZFU.js +343 -0
- package/dist/chunk-UCBM5ZFU.js.map +1 -0
- package/dist/{cross-tab-session-VJBW7BK6.js → cross-tab-session-QIUHW33Y.js} +6 -6
- package/dist/{cross-tab-session-VJBW7BK6.js.map → cross-tab-session-QIUHW33Y.js.map} +1 -1
- package/dist/entries/auth.js +4 -4
- package/dist/entries/crm.d.ts +15 -1
- package/dist/entries/crm.js +10 -9
- package/dist/entries/crm.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/{use-sync-B4xio81b.d.ts → use-sync-BQfzHacf.d.ts} +6 -1
- package/package.json +1 -1
- package/dist/chunk-3VH52USP.js.map +0 -1
- package/dist/chunk-55MIERLJ.js +0 -3
- package/dist/chunk-7XZSJGCX.js +0 -16
- package/dist/chunk-7XZSJGCX.js.map +0 -1
- package/dist/chunk-NJIMZXP4.js.map +0 -1
- package/dist/chunk-T553DXBI.js.map +0 -1
- package/dist/chunk-USEVXBRI.js.map +0 -1
- package/dist/chunk-X6NNUGP7.js.map +0 -1
- package/dist/chunk-YKA26CVL.js +0 -110
- package/dist/chunk-YKA26CVL.js.map +0 -1
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { createStore, isLoadingPrependRow } from './chunk-T4YJV6MP.js';
|
|
2
|
+
|
|
3
|
+
// src/main/state/crm/use-object.ts
|
|
4
|
+
var OBJECT_DATA_META_KEYS = /* @__PURE__ */ new Set(["createdAt", "updatedAt", "id"]);
|
|
5
|
+
var objectStore = createStore({
|
|
6
|
+
object: null,
|
|
7
|
+
id: ""
|
|
8
|
+
});
|
|
9
|
+
function resolveRecordId(source, data) {
|
|
10
|
+
const fromSource = source?.params?.id ?? source?.recordId ?? source?.id;
|
|
11
|
+
if (fromSource != null && fromSource !== "") {
|
|
12
|
+
return String(fromSource);
|
|
13
|
+
}
|
|
14
|
+
const fromData = data?.id ?? data?.hs_object_id?.value ?? data?.hs_object_id;
|
|
15
|
+
if (fromData != null && fromData !== "") {
|
|
16
|
+
return String(fromData);
|
|
17
|
+
}
|
|
18
|
+
return "";
|
|
19
|
+
}
|
|
20
|
+
function isObjectField(key, value) {
|
|
21
|
+
if (OBJECT_DATA_META_KEYS.has(key) || key === "associations") {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
const field = value;
|
|
28
|
+
return "fieldType" in field || "isEditableField" in field || "isPrimaryDisplayProperty" in field || "value" in field;
|
|
29
|
+
}
|
|
30
|
+
function mergeObjectFields(existing, data) {
|
|
31
|
+
const next = { ...existing };
|
|
32
|
+
for (const [key, value] of Object.entries(data)) {
|
|
33
|
+
if (!isObjectField(key, value)) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const existingField = existing[key];
|
|
37
|
+
next[key] = existingField != null && typeof existingField === "object" && !Array.isArray(existingField) ? { ...existingField, ...value } : value;
|
|
38
|
+
}
|
|
39
|
+
return next;
|
|
40
|
+
}
|
|
41
|
+
function patchAssociationRecord(associations, recordId, data) {
|
|
42
|
+
for (const [key, group] of Object.entries(associations)) {
|
|
43
|
+
const rows = group?.data;
|
|
44
|
+
if (!Array.isArray(rows)) {
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
const index = rows.findIndex((row) => resolveRecordId(row, row) === recordId);
|
|
48
|
+
if (index === -1) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const nextRows = [...rows];
|
|
52
|
+
nextRows[index] = mergeObjectFields(rows[index] ?? {}, data);
|
|
53
|
+
return {
|
|
54
|
+
...associations,
|
|
55
|
+
[key]: {
|
|
56
|
+
...group,
|
|
57
|
+
data: nextRows
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function resolveAssociationObjectTypeId(props) {
|
|
64
|
+
const objectTypeId = props?.params?.hubspotObjectTypeId ?? props?.hubspotObjectTypeId;
|
|
65
|
+
return objectTypeId != null && objectTypeId !== "" ? String(objectTypeId) : "";
|
|
66
|
+
}
|
|
67
|
+
function findAssociationGroupKey(associations, objectTypeId) {
|
|
68
|
+
for (const [key, group] of Object.entries(associations)) {
|
|
69
|
+
if (group?.objectTypeId != null && String(group.objectTypeId) === objectTypeId) {
|
|
70
|
+
return key;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
for (const key of Object.keys(associations)) {
|
|
74
|
+
if (key === objectTypeId || key.startsWith(`${objectTypeId}_`)) {
|
|
75
|
+
return key;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
function isLoadingAssociationRow(row) {
|
|
81
|
+
if (!row || typeof row !== "object") {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
const values = Object.values(row);
|
|
85
|
+
if (values.length === 0) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return values.every((value) => value === "loading" || value != null && typeof value === "object" && !Array.isArray(value) && value.value === "loading");
|
|
89
|
+
}
|
|
90
|
+
function toLoadingAssociationRow(template) {
|
|
91
|
+
if (template != null && typeof template === "object" && !Array.isArray(template)) {
|
|
92
|
+
return Object.fromEntries(
|
|
93
|
+
Object.entries(template).map(([key, value]) => {
|
|
94
|
+
if (value != null && typeof value === "object" && !Array.isArray(value) && "value" in value) {
|
|
95
|
+
return [key, { ...value, value: "loading" }];
|
|
96
|
+
}
|
|
97
|
+
return [key, "loading"];
|
|
98
|
+
})
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
return { name: { value: "loading" } };
|
|
102
|
+
}
|
|
103
|
+
function toAssociationRow(data) {
|
|
104
|
+
const row = {};
|
|
105
|
+
for (const [key, value] of Object.entries(data)) {
|
|
106
|
+
if (!isObjectField(key, value)) {
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
row[key] = value;
|
|
110
|
+
}
|
|
111
|
+
return row;
|
|
112
|
+
}
|
|
113
|
+
function setAssociationGroup(state, associations, key, group, rows, total) {
|
|
114
|
+
objectStore.setState({
|
|
115
|
+
object: {
|
|
116
|
+
...state.object,
|
|
117
|
+
data: {
|
|
118
|
+
...state.object.data,
|
|
119
|
+
associations: {
|
|
120
|
+
...associations,
|
|
121
|
+
[key]: {
|
|
122
|
+
...group,
|
|
123
|
+
data: rows,
|
|
124
|
+
...total != null ? { total } : {}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
var actions = {
|
|
132
|
+
setObjectData(response, payload) {
|
|
133
|
+
const data = response?.data;
|
|
134
|
+
const id = resolveRecordId(payload, data);
|
|
135
|
+
objectStore.setState({
|
|
136
|
+
object: response ?? null,
|
|
137
|
+
id
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
updateObjectData(response, payload) {
|
|
141
|
+
const data = response?.data;
|
|
142
|
+
const recordId = resolveRecordId(payload, data);
|
|
143
|
+
const state = objectStore.getState();
|
|
144
|
+
if (!data || !state.object) {
|
|
145
|
+
return response;
|
|
146
|
+
}
|
|
147
|
+
const existingData = state.object.data ?? {};
|
|
148
|
+
const associations = existingData.associations;
|
|
149
|
+
const isParentRecordUpdate = !state.id || !recordId || state.id === recordId;
|
|
150
|
+
if (!isParentRecordUpdate) {
|
|
151
|
+
const nextAssociations = associations && typeof associations === "object" ? patchAssociationRecord(associations, recordId, data) : null;
|
|
152
|
+
if (!nextAssociations) {
|
|
153
|
+
return response;
|
|
154
|
+
}
|
|
155
|
+
objectStore.setState({
|
|
156
|
+
object: {
|
|
157
|
+
...state.object,
|
|
158
|
+
data: {
|
|
159
|
+
...existingData,
|
|
160
|
+
associations: nextAssociations
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
return response;
|
|
165
|
+
}
|
|
166
|
+
const nextData = mergeObjectFields(existingData, data);
|
|
167
|
+
objectStore.setState({
|
|
168
|
+
object: {
|
|
169
|
+
...state.object,
|
|
170
|
+
data: nextData,
|
|
171
|
+
...response?.configurations != null ? { configurations: response.configurations } : {},
|
|
172
|
+
...response?.info != null ? { info: response.info } : {}
|
|
173
|
+
},
|
|
174
|
+
id: state.id || recordId
|
|
175
|
+
});
|
|
176
|
+
return response;
|
|
177
|
+
},
|
|
178
|
+
async setObjectAssociationPrependData(response, props) {
|
|
179
|
+
const state = objectStore.getState();
|
|
180
|
+
const associations = state.object?.data?.associations;
|
|
181
|
+
const objectTypeId = resolveAssociationObjectTypeId(props);
|
|
182
|
+
if (!associations || typeof associations !== "object" || !objectTypeId) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const key = findAssociationGroupKey(associations, objectTypeId);
|
|
186
|
+
if (!key) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const group = associations[key];
|
|
190
|
+
const rows = Array.isArray(group?.data) ? [...group.data] : [];
|
|
191
|
+
if (response === "loading") {
|
|
192
|
+
rows.unshift(toLoadingAssociationRow(rows[0]));
|
|
193
|
+
setAssociationGroup(state, associations, key, group, rows);
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const data = response?.data;
|
|
197
|
+
if (!data) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
const hadLoading = isLoadingAssociationRow(rows[0]);
|
|
201
|
+
const row = toAssociationRow(data);
|
|
202
|
+
if (hadLoading) {
|
|
203
|
+
rows[0] = row;
|
|
204
|
+
} else {
|
|
205
|
+
rows.unshift(row);
|
|
206
|
+
}
|
|
207
|
+
const baseTotal = typeof group?.total === "number" ? group.total : Math.max((Array.isArray(group?.data) ? group.data.length : 0) - (hadLoading ? 1 : 0), 0);
|
|
208
|
+
setAssociationGroup(state, associations, key, group, rows, baseTotal + 1);
|
|
209
|
+
},
|
|
210
|
+
clearLatestObjectAssociationPrependData(props) {
|
|
211
|
+
const state = objectStore.getState();
|
|
212
|
+
const associations = state.object?.data?.associations;
|
|
213
|
+
const objectTypeId = resolveAssociationObjectTypeId(props);
|
|
214
|
+
if (!associations || typeof associations !== "object" || !objectTypeId) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const key = findAssociationGroupKey(associations, objectTypeId);
|
|
218
|
+
if (!key) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const group = associations[key];
|
|
222
|
+
const rows = Array.isArray(group?.data) ? group.data : [];
|
|
223
|
+
if (rows.length === 0 || !isLoadingAssociationRow(rows[0])) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
setAssociationGroup(state, associations, key, group, rows.slice(1));
|
|
227
|
+
},
|
|
228
|
+
clearObjectData() {
|
|
229
|
+
objectStore.setState({
|
|
230
|
+
object: null,
|
|
231
|
+
id: ""
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
// src/main/state/crm/use-multi-object.ts
|
|
237
|
+
var multiObjectStore = createStore({
|
|
238
|
+
objects: {},
|
|
239
|
+
objectsPrependData: {},
|
|
240
|
+
meta: {}
|
|
241
|
+
});
|
|
242
|
+
function getObjectKey(payload) {
|
|
243
|
+
return String(payload?.params?.hubspotObjectTypeId ?? "");
|
|
244
|
+
}
|
|
245
|
+
var actions2 = {
|
|
246
|
+
setMultiObjectData(response, payload) {
|
|
247
|
+
const key = getObjectKey(payload);
|
|
248
|
+
const state = multiObjectStore.getState();
|
|
249
|
+
const rows = response?.data?.results?.rows ?? [];
|
|
250
|
+
const rowIds = new Set(
|
|
251
|
+
rows.map((row) => row.id ?? row.hs_object_id).filter((id) => id != null && id !== "").map((id) => String(id))
|
|
252
|
+
);
|
|
253
|
+
let newPrependForKey = (state.objectsPrependData[key] ?? []).filter((item) => {
|
|
254
|
+
const itemId = item.id ?? item.hs_object_id;
|
|
255
|
+
if (itemId == null || itemId === "") return true;
|
|
256
|
+
return !rowIds.has(String(itemId));
|
|
257
|
+
});
|
|
258
|
+
const selectedPipeline = payload?.queryParams?.selectedPipeline ?? "";
|
|
259
|
+
const viewType = response?.info?.viewType ?? "";
|
|
260
|
+
const prevMeta = state.meta[key];
|
|
261
|
+
if (response?.data?.total < 1 || payload?.queryParams?.componentName) {
|
|
262
|
+
newPrependForKey = [];
|
|
263
|
+
}
|
|
264
|
+
if (prevMeta?.viewType && prevMeta.viewType !== viewType) {
|
|
265
|
+
newPrependForKey = [];
|
|
266
|
+
}
|
|
267
|
+
if (prevMeta?.selectedPipeline && prevMeta.selectedPipeline !== selectedPipeline) {
|
|
268
|
+
newPrependForKey = [];
|
|
269
|
+
}
|
|
270
|
+
multiObjectStore.setState({
|
|
271
|
+
objects: { ...state.objects, [key]: response },
|
|
272
|
+
objectsPrependData: { ...state.objectsPrependData, [key]: newPrependForKey },
|
|
273
|
+
meta: {
|
|
274
|
+
...state.meta,
|
|
275
|
+
[key]: { selectedPipeline, viewType }
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
clearMultiObjectPrependData(hubspotObjectTypeId) {
|
|
280
|
+
const state = multiObjectStore.getState();
|
|
281
|
+
if (!hubspotObjectTypeId) {
|
|
282
|
+
multiObjectStore.setState({ objectsPrependData: {} });
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const key = String(hubspotObjectTypeId);
|
|
286
|
+
const { [key]: _, ...rest } = state.objectsPrependData;
|
|
287
|
+
multiObjectStore.setState({ objectsPrependData: rest });
|
|
288
|
+
},
|
|
289
|
+
clearLatestMultiObjectPrependData(hubspotObjectTypeId) {
|
|
290
|
+
if (!hubspotObjectTypeId) {
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
const key = String(hubspotObjectTypeId);
|
|
294
|
+
const state = multiObjectStore.getState();
|
|
295
|
+
const prependRows = state.objectsPrependData[key] ?? [];
|
|
296
|
+
const latest = prependRows[0];
|
|
297
|
+
if (!latest || !isLoadingPrependRow(latest)) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
multiObjectStore.setState({
|
|
301
|
+
objectsPrependData: { ...state.objectsPrependData, [key]: prependRows.slice(1) }
|
|
302
|
+
});
|
|
303
|
+
},
|
|
304
|
+
async setMultiObjectPrependData(response, props) {
|
|
305
|
+
const key = getObjectKey(props);
|
|
306
|
+
const state = multiObjectStore.getState();
|
|
307
|
+
const tableResponse = state.objects[key];
|
|
308
|
+
let rows = state.objectsPrependData[key] ?? [];
|
|
309
|
+
if (tableResponse?.data?.total > 1) {
|
|
310
|
+
if (response === "loading") {
|
|
311
|
+
const row = tableResponse?.data?.results?.columns.reduce((acc, item) => {
|
|
312
|
+
if (!item.hidden) {
|
|
313
|
+
acc[item.key] = "loading";
|
|
314
|
+
}
|
|
315
|
+
return acc;
|
|
316
|
+
}, {});
|
|
317
|
+
rows = [row, ...rows];
|
|
318
|
+
} else if (response?.data) {
|
|
319
|
+
const data = response?.data;
|
|
320
|
+
if (!data) {
|
|
321
|
+
multiObjectStore.setState({
|
|
322
|
+
objectsPrependData: { ...state.objectsPrependData, [key]: [] }
|
|
323
|
+
});
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
const row = Object.fromEntries(Object.entries(data).map(([k, value]) => [k, value?.value ?? value]));
|
|
327
|
+
rows = [...rows];
|
|
328
|
+
if (rows.length > 0) {
|
|
329
|
+
rows[0] = row;
|
|
330
|
+
} else {
|
|
331
|
+
rows.push(row);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
multiObjectStore.setState({
|
|
336
|
+
objectsPrependData: { ...state.objectsPrependData, [key]: rows }
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
export { actions2 as actions, actions as actions2, multiObjectStore, objectStore };
|
|
342
|
+
//# sourceMappingURL=chunk-UCBM5ZFU.js.map
|
|
343
|
+
//# sourceMappingURL=chunk-UCBM5ZFU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/main/state/crm/use-object.ts","../src/main/state/crm/use-multi-object.ts"],"names":["actions"],"mappings":";;;AAOA,IAAM,wCAAwB,IAAI,G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AAO,CAAC,GAAA,EAAK,GAAG,IAAI,CAAA;AAAA,MACxB,CAAA,MAAA,IAAW,UAAU,IAAA,EAAM;AACvB,QAAA,MAAM,OAAO,QAAA,EAAU,IAAA;AACvB,QAAA,IAAI,CAAC,IAAA,EAAM;AACP,UAAA,gBAAA,CAAiB,QAAA,CAAS;AAAA,YACtB,kBAAA,EAAoB,EAAE,GAAG,KAAA,CAAM,oBAAoB,CAAC,GAAG,GAAG,EAAC;AAAE,WAChE,CAAA;AACD,UAAA;AAAA,QACJ;AAEA,QAAA,MAAM,MAAM,MAAA,CAAO,WAAA,CAAY,OAAO,OAAA,CAAQ,IAAI,EAAE,GAAA,CAAI,CAAC,CAAC,CAAA,EAAG,KAAK,MAAW,CAAC,CAAA,EAAG,OAAO,KAAA,IAAS,KAAK,CAAC,CAAC,CAAA;AAExG,QAAA,IAAA,GAAO,CAAC,GAAG,IAAI,CAAA;AACf,QAAA,IAAI,IAAA,CAAK,SAAS,CAAA,EAAG;AACjB,UAAA,IAAA,CAAK,CAAC,CAAA,GAAI,GAAA;AAAA,QACd,CAAA,MAAO;AACH,UAAA,IAAA,CAAK,KAAK,GAAG,CAAA;AAAA,QACjB;AAAA,MACJ;AAAA,IACJ;AAEA,IAAA,gBAAA,CAAiB,QAAA,CAAS;AAAA,MACtB,kBAAA,EAAoB,EAAE,GAAG,KAAA,CAAM,oBAAoB,CAAC,GAAG,GAAG,IAAA;AAAK,KAClE,CAAA;AAAA,EACL;AACJ","file":"chunk-UCBM5ZFU.js","sourcesContent":["import { createStore } from './store'\n\nexport interface ObjectState {\n object: any\n id: string\n}\n\nconst OBJECT_DATA_META_KEYS = new Set(['createdAt', 'updatedAt', 'id'])\n\nexport const objectStore = createStore<ObjectState>({\n object: null,\n id: ''\n})\n\nfunction resolveRecordId(source: any, data?: any): string {\n const fromSource = source?.params?.id ?? source?.recordId ?? source?.id\n if (fromSource != null && fromSource !== '') {\n return String(fromSource)\n }\n\n const fromData = data?.id ?? data?.hs_object_id?.value ?? data?.hs_object_id\n if (fromData != null && fromData !== '') {\n return String(fromData)\n }\n\n return ''\n}\n\nfunction isObjectField(key: string, value: unknown): boolean {\n if (OBJECT_DATA_META_KEYS.has(key) || key === 'associations') {\n return false\n }\n\n if (value == null || typeof value !== 'object' || Array.isArray(value)) {\n return false\n }\n\n const field = value as Record<string, unknown>\n return 'fieldType' in field || 'isEditableField' in field || 'isPrimaryDisplayProperty' in field || 'value' in field\n}\n\nfunction mergeObjectFields(existing: Record<string, any>, data: Record<string, any>): Record<string, any> {\n const next = { ...existing }\n\n for (const [key, value] of Object.entries(data)) {\n if (!isObjectField(key, value)) {\n continue\n }\n\n const existingField = existing[key]\n next[key] =\n existingField != null && typeof existingField === 'object' && !Array.isArray(existingField)\n ? { ...existingField, ...(value as Record<string, unknown>) }\n : value\n }\n\n return next\n}\n\nfunction patchAssociationRecord(associations: Record<string, any>, recordId: string, data: Record<string, any>): Record<string, any> | null {\n for (const [key, group] of Object.entries(associations)) {\n const rows = group?.data\n if (!Array.isArray(rows)) {\n continue\n }\n\n const index = rows.findIndex((row: any) => resolveRecordId(row, row) === recordId)\n if (index === -1) {\n continue\n }\n\n const nextRows = [...rows]\n nextRows[index] = mergeObjectFields(rows[index] ?? {}, data)\n\n return {\n ...associations,\n [key]: {\n ...group,\n data: nextRows\n }\n }\n }\n\n return null\n}\n\nfunction resolveAssociationObjectTypeId(props?: any): string {\n const objectTypeId = props?.params?.hubspotObjectTypeId ?? props?.hubspotObjectTypeId\n return objectTypeId != null && objectTypeId !== '' ? String(objectTypeId) : ''\n}\n\nfunction findAssociationGroupKey(associations: Record<string, any>, objectTypeId: string): string | undefined {\n for (const [key, group] of Object.entries(associations)) {\n if (group?.objectTypeId != null && String(group.objectTypeId) === objectTypeId) {\n return key\n }\n }\n\n for (const key of Object.keys(associations)) {\n if (key === objectTypeId || key.startsWith(`${objectTypeId}_`)) {\n return key\n }\n }\n\n return undefined\n}\n\nfunction isLoadingAssociationRow(row: any): boolean {\n if (!row || typeof row !== 'object') {\n return false\n }\n\n const values = Object.values(row)\n if (values.length === 0) {\n return false\n }\n\n return values.every((value) => value === 'loading' || (value != null && typeof value === 'object' && !Array.isArray(value) && (value as any).value === 'loading'))\n}\n\nfunction toLoadingAssociationRow(template?: any): Record<string, any> {\n if (template != null && typeof template === 'object' && !Array.isArray(template)) {\n return Object.fromEntries(\n Object.entries(template).map(([key, value]) => {\n if (value != null && typeof value === 'object' && !Array.isArray(value) && 'value' in (value as object)) {\n return [key, { ...(value as Record<string, unknown>), value: 'loading' }]\n }\n\n return [key, 'loading']\n })\n )\n }\n\n return { name: { value: 'loading' } }\n}\n\nfunction toAssociationRow(data: Record<string, any>): Record<string, any> {\n const row: Record<string, any> = {}\n\n for (const [key, value] of Object.entries(data)) {\n if (!isObjectField(key, value)) {\n continue\n }\n\n row[key] = value\n }\n\n return row\n}\n\nfunction setAssociationGroup(state: ObjectState, associations: Record<string, any>, key: string, group: any, rows: any[], total?: number) {\n objectStore.setState({\n object: {\n ...state.object,\n data: {\n ...state.object.data,\n associations: {\n ...associations,\n [key]: {\n ...group,\n data: rows,\n ...(total != null ? { total } : {})\n }\n }\n }\n }\n })\n}\n\nexport const actions = {\n setObjectData(response: any, payload?: any) {\n const data = response?.data\n const id = resolveRecordId(payload, data)\n\n objectStore.setState({\n object: response ?? null,\n id\n })\n },\n\n updateObjectData(response: any, payload?: any) {\n const data = response?.data\n const recordId = resolveRecordId(payload, data)\n const state = objectStore.getState()\n\n if (!data || !state.object) {\n return response\n }\n\n const existingData = state.object.data ?? {}\n const associations = existingData.associations\n const isParentRecordUpdate = !state.id || !recordId || state.id === recordId\n\n if (!isParentRecordUpdate) {\n const nextAssociations = associations && typeof associations === 'object' ? patchAssociationRecord(associations, recordId, data) : null\n\n if (!nextAssociations) {\n return response\n }\n\n objectStore.setState({\n object: {\n ...state.object,\n data: {\n ...existingData,\n associations: nextAssociations\n }\n }\n })\n\n return response\n }\n\n const nextData = mergeObjectFields(existingData, data)\n\n objectStore.setState({\n object: {\n ...state.object,\n data: nextData,\n ...(response?.configurations != null ? { configurations: response.configurations } : {}),\n ...(response?.info != null ? { info: response.info } : {})\n },\n id: state.id || recordId\n })\n\n return response\n },\n\n async setObjectAssociationPrependData(response: any, props?: any) {\n const state = objectStore.getState()\n const associations = state.object?.data?.associations\n const objectTypeId = resolveAssociationObjectTypeId(props)\n\n if (!associations || typeof associations !== 'object' || !objectTypeId) {\n return\n }\n\n const key = findAssociationGroupKey(associations, objectTypeId)\n if (!key) {\n return\n }\n\n const group = associations[key]\n const rows = Array.isArray(group?.data) ? [...group.data] : []\n\n if (response === 'loading') {\n rows.unshift(toLoadingAssociationRow(rows[0]))\n setAssociationGroup(state, associations, key, group, rows)\n return\n }\n\n const data = response?.data\n if (!data) {\n return\n }\n\n const hadLoading = isLoadingAssociationRow(rows[0])\n const row = toAssociationRow(data)\n if (hadLoading) {\n rows[0] = row\n } else {\n rows.unshift(row)\n }\n\n const baseTotal = typeof group?.total === 'number' ? group.total : Math.max((Array.isArray(group?.data) ? group.data.length : 0) - (hadLoading ? 1 : 0), 0)\n setAssociationGroup(state, associations, key, group, rows, baseTotal + 1)\n },\n\n clearLatestObjectAssociationPrependData(props?: any) {\n const state = objectStore.getState()\n const associations = state.object?.data?.associations\n const objectTypeId = resolveAssociationObjectTypeId(props)\n\n if (!associations || typeof associations !== 'object' || !objectTypeId) {\n return\n }\n\n const key = findAssociationGroupKey(associations, objectTypeId)\n if (!key) {\n return\n }\n\n const group = associations[key]\n const rows = Array.isArray(group?.data) ? group.data : []\n if (rows.length === 0 || !isLoadingAssociationRow(rows[0])) {\n return\n }\n\n setAssociationGroup(state, associations, key, group, rows.slice(1))\n },\n\n clearObjectData() {\n objectStore.setState({\n object: null,\n id: ''\n })\n }\n}\n","import { createStore } from './store'\nimport { isLoadingPrependRow } from './prepend-row'\n\nexport interface MultiObjectTableState {\n objects: Record<string, any>\n objectsPrependData: Record<string, any[]>\n meta: Record<string, { selectedPipeline: string; viewType: string }>\n}\n\nexport const multiObjectStore = createStore<MultiObjectTableState>({\n objects: {},\n objectsPrependData: {},\n meta: {}\n})\n\nfunction getObjectKey(payload: any): string {\n return String(payload?.params?.hubspotObjectTypeId ?? '')\n}\n\nexport const actions = {\n setMultiObjectData(response: any, payload: any) {\n const key = getObjectKey(payload)\n const state = multiObjectStore.getState()\n\n const rows = response?.data?.results?.rows ?? []\n const rowIds = new Set(\n rows\n .map((row: any) => row.id ?? row.hs_object_id)\n .filter((id: unknown) => id != null && id !== '')\n .map((id: unknown) => String(id))\n )\n\n let newPrependForKey = (state.objectsPrependData[key] ?? []).filter((item: any) => {\n const itemId = item.id ?? item.hs_object_id\n if (itemId == null || itemId === '') return true\n return !rowIds.has(String(itemId))\n })\n\n const selectedPipeline = payload?.queryParams?.selectedPipeline ?? ''\n const viewType = response?.info?.viewType ?? ''\n const prevMeta = state.meta[key]\n\n if (response?.data?.total < 1 || payload?.queryParams?.componentName) {\n newPrependForKey = []\n }\n\n if (prevMeta?.viewType && prevMeta.viewType !== viewType) {\n newPrependForKey = []\n }\n\n if (prevMeta?.selectedPipeline && prevMeta.selectedPipeline !== selectedPipeline) {\n newPrependForKey = []\n }\n\n multiObjectStore.setState({\n objects: { ...state.objects, [key]: response },\n objectsPrependData: { ...state.objectsPrependData, [key]: newPrependForKey },\n meta: {\n ...state.meta,\n [key]: { selectedPipeline, viewType }\n }\n })\n },\n\n clearMultiObjectPrependData(hubspotObjectTypeId?: string) {\n const state = multiObjectStore.getState()\n\n if (!hubspotObjectTypeId) {\n multiObjectStore.setState({ objectsPrependData: {} })\n return\n }\n\n const key = String(hubspotObjectTypeId)\n const { [key]: _, ...rest } = state.objectsPrependData\n multiObjectStore.setState({ objectsPrependData: rest })\n },\n\n clearLatestMultiObjectPrependData(hubspotObjectTypeId?: string) {\n if (!hubspotObjectTypeId) {\n return\n }\n\n const key = String(hubspotObjectTypeId)\n const state = multiObjectStore.getState()\n const prependRows = state.objectsPrependData[key] ?? []\n const latest = prependRows[0]\n\n if (!latest || !isLoadingPrependRow(latest)) {\n return\n }\n\n multiObjectStore.setState({\n objectsPrependData: { ...state.objectsPrependData, [key]: prependRows.slice(1) }\n })\n },\n\n async setMultiObjectPrependData(response: any, props?: any) {\n const key = getObjectKey(props)\n const state = multiObjectStore.getState()\n const tableResponse = state.objects[key]\n let rows: any[] = state.objectsPrependData[key] ?? []\n\n if (tableResponse?.data?.total > 1) {\n if (response === 'loading') {\n const row = tableResponse?.data?.results?.columns.reduce((acc: any, item: any) => {\n if (!item.hidden) {\n acc[item.key] = 'loading'\n }\n return acc\n }, {})\n rows = [row, ...rows]\n } else if (response?.data) {\n const data = response?.data\n if (!data) {\n multiObjectStore.setState({\n objectsPrependData: { ...state.objectsPrependData, [key]: [] }\n })\n return\n }\n\n const row = Object.fromEntries(Object.entries(data).map(([k, value]: any) => [k, value?.value ?? value]))\n\n rows = [...rows]\n if (rows.length > 0) {\n rows[0] = row\n } else {\n rows.push(row)\n }\n }\n }\n\n multiObjectStore.setState({\n objectsPrependData: { ...state.objectsPrependData, [key]: rows }\n })\n }\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { applyCrossTabSessionRevocation, installCrossTabSessionListener, resetCrossTabSessionSyncForTests, signalSessionChanged } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
export { applyCrossTabSessionRevocation, installCrossTabSessionListener, resetCrossTabSessionSyncForTests, signalSessionChanged } from './chunk-I3JF5QOY.js';
|
|
2
|
+
import './chunk-CUVU6DCT.js';
|
|
3
|
+
import './chunk-UCBM5ZFU.js';
|
|
4
|
+
import './chunk-T4YJV6MP.js';
|
|
5
5
|
import './chunk-JVJMM4SZ.js';
|
|
6
6
|
import './chunk-32ERSTFY.js';
|
|
7
7
|
import './chunk-DB6W3CJT.js';
|
|
8
8
|
import './chunk-KGNMN7B3.js';
|
|
9
9
|
import './chunk-COHBSTHF.js';
|
|
10
|
-
//# sourceMappingURL=cross-tab-session-
|
|
11
|
-
//# sourceMappingURL=cross-tab-session-
|
|
10
|
+
//# sourceMappingURL=cross-tab-session-QIUHW33Y.js.map
|
|
11
|
+
//# sourceMappingURL=cross-tab-session-QIUHW33Y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"cross-tab-session-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"cross-tab-session-QIUHW33Y.js"}
|
package/dist/entries/auth.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { authApi } from '../chunk-
|
|
2
|
-
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiErrorDisplay, resolveAuthRouteAction } from '../chunk-
|
|
1
|
+
import { authApi } from '../chunk-FKSZNQY7.js';
|
|
2
|
+
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiErrorDisplay, resolveAuthRouteAction } from '../chunk-FKSZNQY7.js';
|
|
3
3
|
export { isOptionalAuthFailureUrl, isSessionProbeUrl, persistAuthError, readPersistedAuthError, resolveAuthErrorAction } from '../chunk-JRT5XSVY.js';
|
|
4
|
-
export { getFieldErrors, getFormErrors, initializeHttpClient, setEditorPreviewMockHandler, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
4
|
+
export { getFieldErrors, getFormErrors, initializeHttpClient, setEditorPreviewMockHandler, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler } from '../chunk-OXTWWDM3.js';
|
|
5
|
+
import '../chunk-T4YJV6MP.js';
|
|
6
6
|
export { SERVICE_UNAVAILABLE_MESSAGE, SessionRefreshDeferredError, SessionRefreshFailedError, classifyHttpError, clearMfaPendingAccessToken, getHttpErrorMessage, hydrateMfaPendingAccessToken, isMfaPendingAccessSession, isServiceUnavailableError, isSessionRefreshDeferredError, isSessionRefreshFailedError, readMfaPendingAccessToken, setSessionLifecycleListener, storeMfaPendingAccessToken } from '../chunk-JVJMM4SZ.js';
|
|
7
7
|
import '../chunk-32ERSTFY.js';
|
|
8
8
|
import '../chunk-DB6W3CJT.js';
|
package/dist/entries/crm.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TableUiState, T as TableState, U as UserState, N as NoteState, E as EmailState, S as SyncState } from '../use-sync-
|
|
1
|
+
import { a as TableUiState, T as TableState, U as UserState, O as ObjectState, N as NoteState, E as EmailState, S as SyncState } from '../use-sync-BQfzHacf.js';
|
|
2
2
|
import { l as list, a as list$1, b as list$2, e as existingList, c as addExistingList, s as sideBarList, f as form, o as objectFormOptions, d as details, u as update, g as create, h as createExisting, r as removeExisting, i as list$3, j as create$1, k as update$1, m as list$4, n as create$2, p as update$2, q as list$5, t as details$1, v as download, w as addFolder, x as addFile, y as imageUpload, z as attachmentUpload, A as purge, B as purgeStatus } from '../crmCacheRefresh-B9sAQzI7.js';
|
|
3
3
|
export { C as AssociationCachePurgeOptions, D as CachePurgeDomain, E as CachePurgeListQuery, F as CachePurgeMode, G as CachePurgeRequest, H as CachePurgeTarget, I as CachePurgeView, J as CreateCachePurgeJobOptions, K as CrmCachePurgeOptions, L as HUBSPOT_DEALS_OBJECT_TYPE_ID, M as HUBSPOT_TICKETS_OBJECT_TYPE_ID, P as PIPELINE_BOARD_OBJECT_TYPE_IDS, N as PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, O as PurgeResult, Q as isPipelineBoardObjectType, R as isPipelineBoardObjectTypeId, S as purgeCrmAssociationCaches, T as purgeCrmDetailAndListAfterCrmWrite, U as purgeCrmListCache, V as purgeCrmListCacheAfterCrmWrite, W as purgeCrmObjectDataCache, X as purgeEngagementCaches, Y as shouldShowPipelineSelector, Z as supportsBoardView } from '../crmCacheRefresh-B9sAQzI7.js';
|
|
4
4
|
import '../index-CWYPrDBp.js';
|
|
@@ -177,6 +177,20 @@ declare const store: {
|
|
|
177
177
|
setProfile(response: any): void;
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
|
+
object: {
|
|
181
|
+
store: {
|
|
182
|
+
getState(): ObjectState;
|
|
183
|
+
setState(partial: Partial<ObjectState>): void;
|
|
184
|
+
subscribe(listener: (state: ObjectState) => void): () => boolean;
|
|
185
|
+
};
|
|
186
|
+
actions: {
|
|
187
|
+
setObjectData(response: any, payload?: any): void;
|
|
188
|
+
updateObjectData(response: any, payload?: any): any;
|
|
189
|
+
setObjectAssociationPrependData(response: any, props?: any): Promise<void>;
|
|
190
|
+
clearLatestObjectAssociationPrependData(props?: any): void;
|
|
191
|
+
clearObjectData(): void;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
180
194
|
note: {
|
|
181
195
|
store: {
|
|
182
196
|
getState(): NoteState;
|
package/dist/entries/crm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { crmApi } from '../chunk-
|
|
2
|
-
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import { navigationApi } from '../chunk-
|
|
5
|
-
export { purgeCrmAssociationCaches, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeEngagementCaches } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2, tableStore, tableUiActions, tableUiStore } from '../chunk-
|
|
8
|
-
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from '../chunk-
|
|
1
|
+
import { crmApi } from '../chunk-HXHOLT5V.js';
|
|
2
|
+
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from '../chunk-HXHOLT5V.js';
|
|
3
|
+
import '../chunk-CUVU6DCT.js';
|
|
4
|
+
import { navigationApi } from '../chunk-OXTWWDM3.js';
|
|
5
|
+
export { purgeCrmAssociationCaches, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeEngagementCaches } from '../chunk-OXTWWDM3.js';
|
|
6
|
+
import { actions2, objectStore } from '../chunk-UCBM5ZFU.js';
|
|
7
|
+
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2 as actions2$1, tableStore, tableUiActions, tableUiStore } from '../chunk-T4YJV6MP.js';
|
|
8
|
+
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from '../chunk-T4YJV6MP.js';
|
|
9
9
|
import { storage } from '../chunk-JVJMM4SZ.js';
|
|
10
10
|
import '../chunk-32ERSTFY.js';
|
|
11
11
|
import '../chunk-DB6W3CJT.js';
|
|
@@ -20,8 +20,9 @@ var api = {
|
|
|
20
20
|
var store = {
|
|
21
21
|
storage,
|
|
22
22
|
tableUi: { store: tableUiStore, actions: tableUiActions },
|
|
23
|
-
table: { store: tableStore, actions: actions2 },
|
|
23
|
+
table: { store: tableStore, actions: actions2$1 },
|
|
24
24
|
user: { store: userStore, actions: actions6 },
|
|
25
|
+
object: { store: objectStore, actions: actions2 },
|
|
25
26
|
note: { store: noteStore, actions: actions4 },
|
|
26
27
|
email: { store: emailStore, actions: actions5 },
|
|
27
28
|
sync: { store: syncStore, actions: actions8 }
|
package/dist/entries/crm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/main/entries/crm.ts"],"names":["actions"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/main/entries/crm.ts"],"names":["actions"],"mappings":";;;;;;;;;;;;;;;AAuBO,IAAM,GAAA,GAAM;AAAA,EACf,GAAA,EAAK,MAAA;AAAA,EACL,UAAA,EAAY;AAChB;AAEO,IAAM,KAAA,GAAQ;AAAA,EACjB,OAAA;AAAA,EACA,OAAA,EAAS,EAAE,KAAA,EAAO,YAAA,EAAc,SAAS,cAAA,EAAe;AAAA,EACxD,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,WAAYA,UAAA,EAAsB;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,MAAA,EAAQ,EAAE,KAAA,EAAO,WAAA,EAAa,SAASA,QAAAA,EAAc;AAAA,EACrD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA,EAAY;AAAA,EAC/C,KAAA,EAAO,EAAE,KAAA,EAAO,UAAA,EAAY,SAASA,QAAAA,EAAa;AAAA,EAClD,IAAA,EAAM,EAAE,KAAA,EAAO,SAAA,EAAW,SAASA,QAAAA;AACvC","file":"crm.js","sourcesContent":["/**\n * CRM subpath export — pipelines, objects, notes, emails, files, cache purge, navigation, state.\n */\nimport { crmApi } from '../api/nested-crm-api'\nimport { navigationApi } from '../api/navigation-api'\nimport {\n tableStore,\n tableActions,\n tableUiStore,\n tableUiActions,\n userStore,\n userActions,\n objectStore,\n objectActions,\n noteStore,\n noteActions,\n emailStore,\n emailActions,\n syncStore,\n syncActions\n} from '../state'\nimport { storage } from '../core/utils/localStorage'\n\nexport const api = {\n crm: crmApi,\n navigation: navigationApi\n}\n\nexport const store = {\n storage,\n tableUi: { store: tableUiStore, actions: tableUiActions },\n table: { store: tableStore, actions: tableActions },\n user: { store: userStore, actions: userActions },\n object: { store: objectStore, actions: objectActions },\n note: { store: noteStore, actions: noteActions },\n email: { store: emailStore, actions: emailActions },\n sync: { store: syncStore, actions: syncActions }\n}\n\nexport {\n HUBSPOT_DEALS_OBJECT_TYPE_ID,\n HUBSPOT_TICKETS_OBJECT_TYPE_ID,\n PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS,\n PIPELINE_BOARD_OBJECT_TYPE_IDS,\n isPipelineBoardObjectTypeId\n} from '../core/constants/hubspot-object-type-ids'\nexport { isPipelineBoardObjectType, supportsBoardView, shouldShowPipelineSelector } from '../core/constants/pipeline-ui'\n\nexport type { CrmCachePurgeOptions, AssociationCachePurgeOptions } from '../core/types/cache-purge'\nexport type {\n CachePurgeRequest,\n CachePurgeTarget,\n CachePurgeListQuery,\n CachePurgeView,\n CachePurgeDomain,\n CachePurgeMode,\n PurgeResult,\n CreateCachePurgeJobOptions\n} from '../core/types/cache-purge'\n\nexport {\n purgeCrmListCache,\n purgeCrmListCacheAfterCrmWrite,\n purgeCrmDetailAndListAfterCrmWrite,\n purgeCrmAssociationCaches,\n purgeCrmObjectDataCache,\n purgeEngagementCaches\n} from '../core/utils/cache/crmCacheRefresh'\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TableUiState, T as TableState, U as UserState, N as NoteState, E as EmailState, S as SyncState } from './use-sync-
|
|
1
|
+
import { a as TableUiState, T as TableState, U as UserState, O as ObjectState, N as NoteState, E as EmailState, S as SyncState } from './use-sync-BQfzHacf.js';
|
|
2
2
|
import { M as MutationOptions, P as PreLoginPayload, L as LoginPayload, V as VerifyEmailPayload, a as ResetPasswordVerifyTokenPayload, R as ResetPasswordPayload, F as ForgetPasswordPayload, b as ForgetPasswordOtpVerifyPayload, C as ChangePasswordPayload } from './index-CWYPrDBp.js';
|
|
3
3
|
export { c as Config } from './index-CWYPrDBp.js';
|
|
4
4
|
import { H as CachePurgeTarget, G as CachePurgeRequest, E as CachePurgeListQuery, I as CachePurgeView, J as CreateCachePurgeJobOptions, O as PurgeResult, l as list, a as list$1, b as list$2, e as existingList, c as addExistingList, s as sideBarList, f as form, o as objectFormOptions, d as details, u as update, g as create, h as createExisting, r as removeExisting, i as list$3, j as create$1, k as update$1, m as list$4, n as create$2, p as update$2, q as list$5, t as details$1, v as download, w as addFolder, x as addFile, y as imageUpload, z as attachmentUpload, A as purge, B as purgeStatus } from './crmCacheRefresh-B9sAQzI7.js';
|
|
@@ -649,6 +649,20 @@ declare const store: {
|
|
|
649
649
|
setProfile(response: any): void;
|
|
650
650
|
};
|
|
651
651
|
};
|
|
652
|
+
object: {
|
|
653
|
+
store: {
|
|
654
|
+
getState(): ObjectState;
|
|
655
|
+
setState(partial: Partial<ObjectState>): void;
|
|
656
|
+
subscribe(listener: (state: ObjectState) => void): () => boolean;
|
|
657
|
+
};
|
|
658
|
+
actions: {
|
|
659
|
+
setObjectData(response: any, payload?: any): void;
|
|
660
|
+
updateObjectData(response: any, payload?: any): any;
|
|
661
|
+
setObjectAssociationPrependData(response: any, props?: any): Promise<void>;
|
|
662
|
+
clearLatestObjectAssociationPrependData(props?: any): void;
|
|
663
|
+
clearObjectData(): void;
|
|
664
|
+
};
|
|
665
|
+
};
|
|
652
666
|
note: {
|
|
653
667
|
store: {
|
|
654
668
|
getState(): NoteState;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { applyCrossTabSessionRevocation, clearClientSdkSession, installCrossTabSessionListener, resetSessionStores, signalSessionChanged } from './chunk-
|
|
2
|
-
import { authApi } from './chunk-
|
|
3
|
-
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isExpectedApiError, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiContentState, resolveApiErrorDisplay, resolveAuthRouteAction } from './chunk-
|
|
1
|
+
export { applyCrossTabSessionRevocation, clearClientSdkSession, installCrossTabSessionListener, resetSessionStores, signalSessionChanged } from './chunk-I3JF5QOY.js';
|
|
2
|
+
import { authApi } from './chunk-FKSZNQY7.js';
|
|
3
|
+
export { API_ERROR_CATEGORY_FALLBACK, API_ERROR_DISPLAY_CONFIG, WOODSPORTAL_API_ACTIVE_ERROR_CODES, buildErrorDescription, getApiErrorFromUnknown, hasAuthenticatedAccess, hasValidAccess, isExpectedApiError, isFullyAuthenticated, isMfaPendingSession, recoverMfaGateOnBoot, resolveApiContentState, resolveApiErrorDisplay, resolveAuthRouteAction } from './chunk-FKSZNQY7.js';
|
|
4
4
|
export { isOptionalAuthFailureUrl, isSessionProbeUrl, persistAuthError, readPersistedAuthError, resolveAuthErrorAction } from './chunk-JRT5XSVY.js';
|
|
5
|
-
import { crmApi } from './chunk-
|
|
6
|
-
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import { navigationApi, HttpClient, API_ENDPOINTS, generateApiUrl, createMutation, initializeHttpClient } from './chunk-
|
|
9
|
-
export { Client, applyContractApiDate, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, createCachePurgeJob, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, getConfiguredContractApiDate, getFieldErrors, getFormErrors, initializeHttpClient, mergePurgeTargets, purgeCrmAssociationCaches, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler, toCachePurgeListQuery } from './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2, tableStore, tableUiActions, tableUiStore, hydrateUserStoreFromSession } from './chunk-
|
|
12
|
-
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from './chunk-
|
|
5
|
+
import { crmApi } from './chunk-HXHOLT5V.js';
|
|
6
|
+
export { isPipelineBoardObjectType, shouldShowPipelineSelector, supportsBoardView } from './chunk-HXHOLT5V.js';
|
|
7
|
+
import './chunk-CUVU6DCT.js';
|
|
8
|
+
import { navigationApi, HttpClient, API_ENDPOINTS, generateApiUrl, createMutation, initializeHttpClient } from './chunk-OXTWWDM3.js';
|
|
9
|
+
export { Client, applyContractApiDate, buildCachePurgeRequest, buildCrmListPurgeTarget, buildCrmSinglePurgeTarget, buildEngagementPurgeTarget, buildPortalConfigPurgeTarget, buildUserSessionPurgeTarget, createCachePurgeJob, extractEngagementItemIdFromWriteResponse, extractHubspotRecordIdFromWriteResponse, getConfiguredContractApiDate, getFieldErrors, getFormErrors, initializeHttpClient, mergePurgeTargets, purgeCrmAssociationCaches, purgeCrmCombined, purgeCrmDetailAndListAfterCrmWrite, purgeCrmListCache, purgeCrmListCacheAfterCrmWrite, purgeCrmObjectDataCache, purgeCrmRecordCache, purgeEngagementCaches, purgeEngagementCachesAfterCrmWrite, resolveCrmListPurgeQuery, startVisibilityRefreshScheduler, stopVisibilityRefreshScheduler, toCachePurgeListQuery } from './chunk-OXTWWDM3.js';
|
|
10
|
+
import { actions2, objectStore } from './chunk-UCBM5ZFU.js';
|
|
11
|
+
import { actions8, syncStore, actions5, emailStore, actions4, noteStore, actions6, userStore, actions2 as actions2$1, tableStore, tableUiActions, tableUiStore, hydrateUserStoreFromSession } from './chunk-T4YJV6MP.js';
|
|
12
|
+
export { HUBSPOT_DEALS_OBJECT_TYPE_ID, HUBSPOT_TICKETS_OBJECT_TYPE_ID, PIPELINE_BOARD_OBJECT_TYPE_IDS, PIPELINE_REQUIRED_MANAGED_OBJECT_TYPE_IDS, isPipelineBoardObjectTypeId } from './chunk-T4YJV6MP.js';
|
|
13
13
|
import { storage, hydrateSessionRefreshState, hydrateMfaPendingAccessToken, storAccessToken } from './chunk-JVJMM4SZ.js';
|
|
14
14
|
export { SERVICE_UNAVAILABLE_MESSAGE, SessionRefreshDeferredError, SessionRefreshFailedError, classifyHttpError, clearMfaPendingAccessToken, configureLogger, getHttpErrorMessage, config as hubContext, hydrateMfaPendingAccessToken, isMfaPendingAccessSession, isServiceUnavailableError, isSessionRefreshDeferredError, isSessionRefreshFailedError, readMfaPendingAccessToken, setConfig as setHubContext, setSessionLifecycleListener, storeMfaPendingAccessToken } from './chunk-JVJMM4SZ.js';
|
|
15
15
|
import { setClientType } from './chunk-32ERSTFY.js';
|
|
@@ -172,8 +172,9 @@ function initializeMobileClient({ storage: storage2, ...httpConfig }) {
|
|
|
172
172
|
var store = {
|
|
173
173
|
storage,
|
|
174
174
|
tableUi: { store: tableUiStore, actions: tableUiActions },
|
|
175
|
-
table: { store: tableStore, actions: actions2 },
|
|
175
|
+
table: { store: tableStore, actions: actions2$1 },
|
|
176
176
|
user: { store: userStore, actions: actions6 },
|
|
177
|
+
object: { store: objectStore, actions: actions2 },
|
|
177
178
|
note: { store: noteStore, actions: actions4 },
|
|
178
179
|
email: { store: emailStore, actions: actions5 },
|
|
179
180
|
sync: { store: syncStore, actions: actions8 }
|