@elevasis/ui 2.81.0 → 2.83.0
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/LICENSE +21 -0
- package/README.md +38 -0
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +3 -3
- package/dist/app/index.d.ts +68 -3710
- package/dist/app/index.js +12 -10
- package/dist/auth/index.d.ts +2 -3
- package/dist/auth/index.js +4 -4
- package/dist/charts/index.d.ts +10 -10
- package/dist/charts/index.js +4 -4
- package/dist/{chunk-AI5OYVLR.js → chunk-2WXFPHBV.js} +1 -1
- package/dist/{chunk-7D4FKBB4.js → chunk-34YVWPW6.js} +1 -1
- package/dist/{chunk-BLYK6I4D.js → chunk-4ILZBLQY.js} +1 -1
- package/dist/{chunk-TLMNBOAG.js → chunk-6DWWZXLS.js} +5 -5
- package/dist/{chunk-LTRJZOHA.js → chunk-7D6ZLLOZ.js} +1 -1
- package/dist/chunk-BIKD5UUM.js +386 -0
- package/dist/{chunk-HDLYC63N.js → chunk-CEP5A55J.js} +1 -1
- package/dist/{chunk-JLKZUO2I.js → chunk-CUJBF3X6.js} +1 -1
- package/dist/{chunk-PNCJJE4Z.js → chunk-DRTC7LRG.js} +1 -1
- package/dist/{chunk-ROC2TFPS.js → chunk-EEONAV4R.js} +2 -2
- package/dist/{chunk-HDITVHZT.js → chunk-EHWHG6PW.js} +2 -2
- package/dist/{chunk-AKANHRQ5.js → chunk-GKTQEVSO.js} +3 -4
- package/dist/{chunk-7RS2NUC6.js → chunk-IR7HVER2.js} +1 -1
- package/dist/{chunk-3ZADOARU.js → chunk-IYY27OLF.js} +5 -5
- package/dist/{chunk-LGJASP5H.js → chunk-JCETE623.js} +1 -1
- package/dist/{chunk-42C2WVYU.js → chunk-JJCY23X3.js} +2 -2
- package/dist/{chunk-XUL4UBYJ.js → chunk-JPQNXH4X.js} +3 -3
- package/dist/{chunk-SWC54W3A.js → chunk-JXS2LDGN.js} +2 -2
- package/dist/{chunk-G6VHIXWD.js → chunk-KQ2YSAXL.js} +1 -1
- package/dist/{chunk-SOBKRB4N.js → chunk-LACAXGZK.js} +1 -1
- package/dist/{chunk-QFKOHZM3.js → chunk-LKM32PP6.js} +3 -3
- package/dist/{chunk-PJN6CMWZ.js → chunk-LKZV5TDL.js} +1 -1
- package/dist/{chunk-ILOKKA6L.js → chunk-MZXUISBI.js} +11 -12
- package/dist/{chunk-K635QVGI.js → chunk-N5O5OYLB.js} +8 -8
- package/dist/{chunk-FPRDEKFY.js → chunk-OC7TYJ75.js} +1 -1
- package/dist/{chunk-6YWBMLEM.js → chunk-PQEGQ63N.js} +8 -9
- package/dist/{chunk-52AZTFUR.js → chunk-QQ3JCEN2.js} +5 -5
- package/dist/{chunk-SHJYK2X4.js → chunk-U727JFPK.js} +3 -3
- package/dist/{chunk-DEZW7QDI.js → chunk-VFWOUD3M.js} +31 -2
- package/dist/{chunk-PSGSFPWA.js → chunk-VGHYGEPR.js} +98 -30
- package/dist/{chunk-LTKBVL7D.js → chunk-WYFNXCDJ.js} +4 -4
- package/dist/{chunk-KU7KN5VN.js → chunk-XYRMUHWN.js} +1 -1
- package/dist/{chunk-O4XUKLRY.js → chunk-YZ47UWV5.js} +1 -1
- package/dist/{chunk-5GYJ3IDO.js → chunk-YZ5Q34MK.js} +11 -6
- package/dist/{chunk-QEQXPWOK.js → chunk-ZS3BJLOJ.js} +9 -9
- package/dist/components/chat/index.d.ts +4 -5
- package/dist/components/index.d.ts +210 -198
- package/dist/components/index.js +38 -39
- package/dist/components/navigation/index.js +5 -5
- package/dist/execution/index.d.ts +2 -2
- package/dist/features/auth/index.d.ts +6 -6
- package/dist/features/auth/index.js +6 -6
- package/dist/features/clients/index.d.ts +11 -11
- package/dist/features/clients/index.js +7 -7
- package/dist/features/content/index.d.ts +36 -24
- package/dist/features/content/index.js +7 -7
- package/dist/features/crm/index.d.ts +29 -17
- package/dist/features/crm/index.js +9 -10
- package/dist/features/dashboard/index.d.ts +12 -6
- package/dist/features/dashboard/index.js +6 -6
- package/dist/features/delivery/index.d.ts +13 -13
- package/dist/features/delivery/index.js +17 -17
- package/dist/features/knowledge/index.js +4 -4
- package/dist/features/lead-gen/index.d.ts +40 -26
- package/dist/features/lead-gen/index.js +10 -11
- package/dist/features/monitoring/index.d.ts +8 -8
- package/dist/features/monitoring/index.js +8 -8
- package/dist/features/monitoring/requests/index.d.ts +10 -10
- package/dist/features/monitoring/requests/index.js +6 -6
- package/dist/features/notes/index.d.ts +7 -7
- package/dist/features/operations/index.d.ts +42 -30
- package/dist/features/operations/index.js +11 -11
- package/dist/features/public-agent-chat/index.d.ts +3 -3
- package/dist/features/right-panel-host/index.d.ts +3 -3
- package/dist/features/seo/index.d.ts +7 -7
- package/dist/features/seo/index.js +7 -7
- package/dist/features/settings/index.d.ts +13 -13
- package/dist/features/settings/index.js +7 -7
- package/dist/hooks/access/index.js +4 -4
- package/dist/hooks/delivery/index.js +3 -3
- package/dist/hooks/published.d.ts +21 -7
- package/dist/hooks/published.js +15 -15
- package/dist/knowledge/index.d.ts +65 -37
- package/dist/knowledge/index.js +20 -7185
- package/dist/layout/index.d.ts +48 -48
- package/dist/layout/index.js +8 -8
- package/dist/organization/index.d.ts +2 -3
- package/dist/provider/ElevasisServiceContext.d.ts +1 -2
- package/dist/provider/index.d.ts +103 -3736
- package/dist/provider/index.js +4 -4
- package/dist/provider/published.d.ts +80 -3721
- package/dist/provider/published.js +4 -4
- package/dist/router/index.d.ts +2 -3
- package/dist/test-utils/index.d.ts +4 -4
- package/dist/test-utils/index.js +3 -3
- package/dist/types/index.d.ts +6 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +1 -1
- package/dist/vite/index.js +2 -2
- package/dist/vite-plugin-knowledge/index.js +1 -1
- package/package.json +5 -5
- package/src/knowledge/README.md +32 -32
- package/dist/chunk-6J3SCCZ2.js +0 -200
- package/dist/chunk-75OLN23F.js +0 -231
- package/dist/knowledge-search-index-UPKXCXQP.js +0 -1539
package/dist/chunk-75OLN23F.js
DELETED
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
import { acquisitionListKeys } from './chunk-PSGSFPWA.js';
|
|
2
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-PNCJJE4Z.js';
|
|
3
|
-
import { APIClientError, buildQueryString } from './chunk-DEZW7QDI.js';
|
|
4
|
-
import { useElevasisServices } from './chunk-BI5VDO2K.js';
|
|
5
|
-
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
|
|
8
|
-
// src/hooks/acquisition/queryKeys.ts
|
|
9
|
-
var companyKeys = {
|
|
10
|
-
all: ["acquisition-companies"],
|
|
11
|
-
list: (organizationId, filters) => [...companyKeys.all, "list", organizationId, filters],
|
|
12
|
-
facets: (organizationId) => [...companyKeys.all, "facets", organizationId],
|
|
13
|
-
detail: (organizationId, companyId) => [...companyKeys.all, "detail", organizationId, companyId]
|
|
14
|
-
};
|
|
15
|
-
var contactKeys = {
|
|
16
|
-
all: ["acquisition-contacts"],
|
|
17
|
-
list: (organizationId, filters) => [...contactKeys.all, "list", organizationId, filters],
|
|
18
|
-
detail: (organizationId, contactId) => [...contactKeys.all, "detail", organizationId, contactId]
|
|
19
|
-
};
|
|
20
|
-
z.object({
|
|
21
|
-
replyBody: z.string().trim().min(1).max(1e4)
|
|
22
|
-
}).strict();
|
|
23
|
-
function deriveActions(deal, actions = []) {
|
|
24
|
-
return actions.filter((a) => a.isAvailableFor(deal)).map(({ key, label, payloadSchema }) => ({ key, label, payloadSchema }));
|
|
25
|
-
}
|
|
26
|
-
function useContacts(filters = {}) {
|
|
27
|
-
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
28
|
-
return useQuery({
|
|
29
|
-
queryKey: contactKeys.list(workOSOrganizationId, filters),
|
|
30
|
-
queryFn: async () => {
|
|
31
|
-
const queryString = buildQueryString({
|
|
32
|
-
listId: filters.listId,
|
|
33
|
-
search: filters.search,
|
|
34
|
-
openingLineIsNull: filters.openingLineIsNull,
|
|
35
|
-
batchId: filters.batchId,
|
|
36
|
-
contactStatus: filters.contactStatus,
|
|
37
|
-
limit: filters.limit,
|
|
38
|
-
offset: filters.offset
|
|
39
|
-
});
|
|
40
|
-
return apiRequest(`/acquisition/contacts${queryString}`);
|
|
41
|
-
},
|
|
42
|
-
enabled: isReady && !!workOSOrganizationId,
|
|
43
|
-
retry: (_failureCount, error) => !(error instanceof APIClientError && error.statusCode === 401)
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function useContact(contactId) {
|
|
47
|
-
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
48
|
-
return useQuery({
|
|
49
|
-
queryKey: contactKeys.detail(workOSOrganizationId, contactId),
|
|
50
|
-
queryFn: async () => {
|
|
51
|
-
if (!contactId) return null;
|
|
52
|
-
return apiRequest(`/acquisition/contacts/${contactId}`);
|
|
53
|
-
},
|
|
54
|
-
enabled: isReady && !!workOSOrganizationId && !!contactId
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
function useCreateContact() {
|
|
58
|
-
const { apiRequest } = useElevasisServices();
|
|
59
|
-
const queryClient = useQueryClient();
|
|
60
|
-
return useMutation({
|
|
61
|
-
mutationFn: (body) => apiRequest("/acquisition/contacts", {
|
|
62
|
-
method: "POST",
|
|
63
|
-
body: JSON.stringify(body)
|
|
64
|
-
}),
|
|
65
|
-
onSuccess: () => {
|
|
66
|
-
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
67
|
-
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
68
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
69
|
-
showSuccessNotification("Contact created");
|
|
70
|
-
},
|
|
71
|
-
onError: (error) => {
|
|
72
|
-
showApiErrorNotification(error);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function useUpdateContact(contactId) {
|
|
77
|
-
const { apiRequest } = useElevasisServices();
|
|
78
|
-
const queryClient = useQueryClient();
|
|
79
|
-
return useMutation({
|
|
80
|
-
mutationFn: (body) => apiRequest(`/acquisition/contacts/${contactId}`, {
|
|
81
|
-
method: "PATCH",
|
|
82
|
-
body: JSON.stringify(body)
|
|
83
|
-
}),
|
|
84
|
-
onSuccess: () => {
|
|
85
|
-
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
86
|
-
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
87
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
88
|
-
showSuccessNotification("Contact updated");
|
|
89
|
-
},
|
|
90
|
-
onError: (error) => {
|
|
91
|
-
showApiErrorNotification(error);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function useDeleteContacts() {
|
|
96
|
-
const { apiRequest } = useElevasisServices();
|
|
97
|
-
const queryClient = useQueryClient();
|
|
98
|
-
return useMutation({
|
|
99
|
-
mutationFn: async (contactIds) => {
|
|
100
|
-
const uniqueIds = [...new Set(contactIds)].filter(Boolean);
|
|
101
|
-
if (uniqueIds.length === 0) return;
|
|
102
|
-
await Promise.all(
|
|
103
|
-
uniqueIds.map(
|
|
104
|
-
(contactId) => apiRequest(`/acquisition/contacts/${contactId}`, {
|
|
105
|
-
method: "DELETE"
|
|
106
|
-
})
|
|
107
|
-
)
|
|
108
|
-
);
|
|
109
|
-
},
|
|
110
|
-
onSuccess: () => {
|
|
111
|
-
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
112
|
-
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
113
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
114
|
-
showSuccessNotification("Contacts deleted");
|
|
115
|
-
},
|
|
116
|
-
onError: (error) => {
|
|
117
|
-
showApiErrorNotification(error);
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// src/hooks/acquisition/useCompanies.ts
|
|
123
|
-
function useCompanies(filters = {}) {
|
|
124
|
-
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
125
|
-
return useQuery({
|
|
126
|
-
queryKey: companyKeys.list(workOSOrganizationId, filters),
|
|
127
|
-
queryFn: async () => {
|
|
128
|
-
const queryString = buildQueryString({
|
|
129
|
-
listId: filters.listId,
|
|
130
|
-
search: filters.search,
|
|
131
|
-
domain: filters.domain,
|
|
132
|
-
website: filters.website,
|
|
133
|
-
segment: filters.segment,
|
|
134
|
-
category: filters.category,
|
|
135
|
-
batchId: filters.batchId,
|
|
136
|
-
status: filters.status,
|
|
137
|
-
includeAll: filters.includeAll,
|
|
138
|
-
limit: filters.limit,
|
|
139
|
-
offset: filters.offset
|
|
140
|
-
});
|
|
141
|
-
return apiRequest(`/acquisition/companies${queryString}`);
|
|
142
|
-
},
|
|
143
|
-
enabled: isReady && !!workOSOrganizationId,
|
|
144
|
-
retry: (_failureCount, error) => !(error instanceof APIClientError && error.statusCode === 401)
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
function useCompanyFacets() {
|
|
148
|
-
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
149
|
-
return useQuery({
|
|
150
|
-
queryKey: companyKeys.facets(workOSOrganizationId),
|
|
151
|
-
queryFn: () => apiRequest("/acquisition/companies/facets"),
|
|
152
|
-
enabled: isReady && !!workOSOrganizationId
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
function useCompany(companyId) {
|
|
156
|
-
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
157
|
-
return useQuery({
|
|
158
|
-
queryKey: companyKeys.detail(workOSOrganizationId, companyId),
|
|
159
|
-
queryFn: async () => {
|
|
160
|
-
if (!companyId) return null;
|
|
161
|
-
return apiRequest(`/acquisition/companies/${companyId}`);
|
|
162
|
-
},
|
|
163
|
-
enabled: isReady && !!workOSOrganizationId && !!companyId
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
function useCreateCompany() {
|
|
167
|
-
const { apiRequest } = useElevasisServices();
|
|
168
|
-
const queryClient = useQueryClient();
|
|
169
|
-
return useMutation({
|
|
170
|
-
mutationFn: (body) => apiRequest("/acquisition/companies", {
|
|
171
|
-
method: "POST",
|
|
172
|
-
body: JSON.stringify(body)
|
|
173
|
-
}),
|
|
174
|
-
onSuccess: () => {
|
|
175
|
-
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
176
|
-
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
177
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
178
|
-
showSuccessNotification("Company created");
|
|
179
|
-
},
|
|
180
|
-
onError: (error) => {
|
|
181
|
-
showApiErrorNotification(error);
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
function useUpdateCompany(companyId) {
|
|
186
|
-
const { apiRequest } = useElevasisServices();
|
|
187
|
-
const queryClient = useQueryClient();
|
|
188
|
-
return useMutation({
|
|
189
|
-
mutationFn: (body) => apiRequest(`/acquisition/companies/${companyId}`, {
|
|
190
|
-
method: "PATCH",
|
|
191
|
-
body: JSON.stringify(body)
|
|
192
|
-
}),
|
|
193
|
-
onSuccess: () => {
|
|
194
|
-
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
195
|
-
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
196
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
197
|
-
showSuccessNotification("Company updated");
|
|
198
|
-
},
|
|
199
|
-
onError: (error) => {
|
|
200
|
-
showApiErrorNotification(error);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
function useDeleteCompanies() {
|
|
205
|
-
const { apiRequest } = useElevasisServices();
|
|
206
|
-
const queryClient = useQueryClient();
|
|
207
|
-
return useMutation({
|
|
208
|
-
mutationFn: async (companyIds) => {
|
|
209
|
-
const uniqueIds = [...new Set(companyIds)].filter(Boolean);
|
|
210
|
-
if (uniqueIds.length === 0) return;
|
|
211
|
-
await Promise.all(
|
|
212
|
-
uniqueIds.map(
|
|
213
|
-
(companyId) => apiRequest(`/acquisition/companies/${companyId}`, {
|
|
214
|
-
method: "DELETE"
|
|
215
|
-
})
|
|
216
|
-
)
|
|
217
|
-
);
|
|
218
|
-
},
|
|
219
|
-
onSuccess: () => {
|
|
220
|
-
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
221
|
-
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
222
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
223
|
-
showSuccessNotification("Companies deleted");
|
|
224
|
-
},
|
|
225
|
-
onError: (error) => {
|
|
226
|
-
showApiErrorNotification(error);
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export { companyKeys, contactKeys, deriveActions, useCompanies, useCompany, useCompanyFacets, useContact, useContacts, useCreateCompany, useCreateContact, useDeleteCompanies, useDeleteContacts, useUpdateCompany, useUpdateContact };
|