@elevasis/ui 2.74.0 → 2.76.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.
Files changed (105) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +277 -249
  3. package/dist/app/index.js +12 -11
  4. package/dist/auth/index.js +6 -7
  5. package/dist/charts/index.js +6 -7
  6. package/dist/{chunk-GO4XJ5D4.js → chunk-2GIHWU5O.js} +4 -3
  7. package/dist/chunk-2Y6AKWGU.js +42 -0
  8. package/dist/chunk-3QYRZSHP.js +854 -0
  9. package/dist/{chunk-CRA7WQZH.js → chunk-3RK2NNJX.js} +1 -1
  10. package/dist/{chunk-R6NMRXNO.js → chunk-4WLAVUPS.js} +1 -1
  11. package/dist/{chunk-GPQQGQGT.js → chunk-5R4I2PAN.js} +9 -43
  12. package/dist/{chunk-R5UGIFYU.js → chunk-5ZK7K7YP.js} +25 -1
  13. package/dist/chunk-6B4ZPBQJ.js +7 -0
  14. package/dist/{chunk-ARAFQBNI.js → chunk-73G3I5HJ.js} +160 -160
  15. package/dist/{chunk-ZWI62BQ6.js → chunk-BFLYDVEN.js} +32 -42
  16. package/dist/{chunk-W2QRBQQA.js → chunk-BG6PWDJ3.js} +381 -381
  17. package/dist/{chunk-7ARBBELS.js → chunk-BV2RNLPP.js} +1 -1
  18. package/dist/{chunk-FA7LMNQO.js → chunk-CTT4RDXE.js} +150 -151
  19. package/dist/chunk-E2LJ3FRA.js +237 -0
  20. package/dist/{chunk-E6YGA5WH.js → chunk-EFQLXRYT.js} +1 -2
  21. package/dist/{chunk-FZSG6M6W.js → chunk-EVNLJHDD.js} +3 -3
  22. package/dist/{chunk-ZYNVCWDZ.js → chunk-GDQQX5SL.js} +4 -42
  23. package/dist/{chunk-DCQKTDIG.js → chunk-GFSOQH3N.js} +1 -1
  24. package/dist/{chunk-3LOKYZJC.js → chunk-H5AEYSVX.js} +164 -3
  25. package/dist/{chunk-ZFISGKYW.js → chunk-IIEZXXDD.js} +1 -1
  26. package/dist/{chunk-3QHX4ZKV.js → chunk-INCEZAM3.js} +1 -1
  27. package/dist/{chunk-O32UQ26A.js → chunk-JZQNUQE4.js} +1 -1
  28. package/dist/{chunk-6JN2TLV2.js → chunk-K55TU6CC.js} +2023 -1700
  29. package/dist/chunk-KB5CAN5D.js +33 -0
  30. package/dist/{chunk-2MRRDF32.js → chunk-KMA4FOSV.js} +5682 -5675
  31. package/dist/{chunk-HYQOGRWG.js → chunk-KXNRTJAE.js} +1 -1
  32. package/dist/{chunk-7RJ7P6S6.js → chunk-MGAELVTZ.js} +12 -12
  33. package/dist/chunk-MKH2KOAO.js +39 -0
  34. package/dist/{chunk-4MXNHJTA.js → chunk-NAPXMYFW.js} +939 -1570
  35. package/dist/{chunk-CQPULKKL.js → chunk-OGG3QJYW.js} +14 -5
  36. package/dist/{chunk-4M2BSHVT.js → chunk-P6HHXMLJ.js} +1 -1
  37. package/dist/{chunk-WZU3MCKI.js → chunk-QAILYRC2.js} +1 -1
  38. package/dist/{chunk-RBGVNPA6.js → chunk-RXZ3XDBM.js} +1 -1
  39. package/dist/{chunk-BA3AZJUR.js → chunk-SPW6UA6B.js} +1 -1
  40. package/dist/{chunk-RFNJ2PTO.js → chunk-SVZR4GYA.js} +1 -1
  41. package/dist/{chunk-5A6KCFS5.js → chunk-UEY4AB3R.js} +789 -66
  42. package/dist/{chunk-LN4UW6S4.js → chunk-UL6MPMKY.js} +1 -1
  43. package/dist/{chunk-ZFA56VSR.js → chunk-WELN7DDV.js} +2 -2
  44. package/dist/{chunk-43LC6XAX.js → chunk-WJN2VVVJ.js} +1 -1
  45. package/dist/{chunk-BRTGCFBH.js → chunk-XODQUPFW.js} +11 -11
  46. package/dist/components/index.d.ts +181 -34
  47. package/dist/components/index.js +2249 -1804
  48. package/dist/components/navigation/index.js +7 -8
  49. package/dist/features/auth/index.d.ts +35 -3716
  50. package/dist/features/auth/index.js +9 -10
  51. package/dist/features/clients/index.js +18 -12
  52. package/dist/features/content/index.js +34 -31
  53. package/dist/features/crm/index.css +59 -59
  54. package/dist/features/crm/index.d.ts +18 -1
  55. package/dist/features/crm/index.js +13 -11
  56. package/dist/features/dashboard/index.css +59 -59
  57. package/dist/features/dashboard/index.js +8 -9
  58. package/dist/features/delivery/index.d.ts +3 -0
  59. package/dist/features/delivery/index.js +21 -20
  60. package/dist/features/knowledge/index.js +6 -7
  61. package/dist/features/lead-gen/index.css +59 -59
  62. package/dist/features/lead-gen/index.d.ts +3903 -2
  63. package/dist/features/lead-gen/index.js +15 -13
  64. package/dist/features/monitoring/index.js +10 -11
  65. package/dist/features/monitoring/requests/index.css +59 -59
  66. package/dist/features/monitoring/requests/index.js +8 -9
  67. package/dist/features/notes/index.js +4 -4
  68. package/dist/features/operations/index.css +59 -59
  69. package/dist/features/operations/index.js +13 -15
  70. package/dist/features/seo/index.css +659 -0
  71. package/dist/features/seo/index.d.ts +3962 -1
  72. package/dist/features/seo/index.js +31 -2
  73. package/dist/features/settings/index.css +59 -59
  74. package/dist/features/settings/index.d.ts +87 -3745
  75. package/dist/features/settings/index.js +10 -12
  76. package/dist/hooks/access/index.js +6 -7
  77. package/dist/hooks/delivery/index.css +59 -59
  78. package/dist/hooks/delivery/index.d.ts +13 -4
  79. package/dist/hooks/delivery/index.js +3 -3
  80. package/dist/hooks/published.d.ts +69 -27
  81. package/dist/hooks/published.js +19 -19
  82. package/dist/initialization/index.d.ts +35 -3716
  83. package/dist/knowledge/index.js +11 -11
  84. package/dist/layout/index.d.ts +55 -2
  85. package/dist/layout/index.js +10 -10
  86. package/dist/organization/index.css +59 -59
  87. package/dist/profile/index.d.ts +64 -3716
  88. package/dist/provider/index.d.ts +3 -0
  89. package/dist/provider/index.js +6 -7
  90. package/dist/provider/published.d.ts +3 -0
  91. package/dist/provider/published.js +6 -7
  92. package/dist/test-utils/index.js +3 -3
  93. package/dist/theme/index.js +3 -3
  94. package/dist/theme/presets/index.js +1 -1
  95. package/dist/types/index.d.ts +312 -251
  96. package/dist/utils/index.d.ts +1 -1
  97. package/dist/utils/index.js +1 -1
  98. package/package.json +9 -9
  99. package/src/hooks/README.md +22 -23
  100. package/dist/chunk-6ZAP3FOA.js +0 -93
  101. package/dist/chunk-AH52XQB7.js +0 -1
  102. package/dist/chunk-GDOR57D7.js +0 -165
  103. package/dist/chunk-MISHPEJX.js +0 -244
  104. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -879
  105. package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +0 -2
@@ -1,4 +1,4 @@
1
- import { showApiErrorNotification } from './chunk-HYQOGRWG.js';
1
+ import { showApiErrorNotification } from './chunk-KXNRTJAE.js';
2
2
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
3
3
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
4
4
 
@@ -1,8 +1,11 @@
1
- import { useNotificationAdapter } from './chunk-6JN2TLV2.js';
1
+ import { deriveActions } from './chunk-GDQQX5SL.js';
2
+ import { acquisitionListKeys, useNotificationAdapter } from './chunk-K55TU6CC.js';
3
+ import { showApiErrorNotification, showSuccessNotification } from './chunk-KXNRTJAE.js';
2
4
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
3
5
  import { CredentialNameSchema, UuidSchema } from './chunk-TVTSASST.js';
6
+ import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
4
7
  import { z } from 'zod';
5
- import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
8
+ import { useMemo } from 'react';
6
9
  import { notifications } from '@mantine/notifications';
7
10
 
8
11
  var CredentialTypeSchema = z.enum([
@@ -80,6 +83,126 @@ var CredentialSchemas = {
80
83
  VerifyResponse: VerifyCredentialResponseSchema
81
84
  };
82
85
 
86
+ // src/hooks/lead-gen/useListMembers.ts
87
+ var leadGenListMemberKeys = {
88
+ all: ["lead-gen-list-members"],
89
+ list: (organizationId, listId) => [...leadGenListMemberKeys.all, organizationId, "list", listId],
90
+ detail: (organizationId, memberId) => [...leadGenListMemberKeys.all, organizationId, "detail", memberId]
91
+ };
92
+ function useListMembers({ listId }) {
93
+ const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
94
+ return useQuery({
95
+ queryKey: leadGenListMemberKeys.list(workOSOrganizationId, listId),
96
+ queryFn: () => apiRequest(`/acquisition/lists/${listId}/members`),
97
+ enabled: isReady && !!listId
98
+ });
99
+ }
100
+ function useListMember(memberId) {
101
+ const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
102
+ return useQuery({
103
+ queryKey: leadGenListMemberKeys.detail(workOSOrganizationId, memberId),
104
+ queryFn: () => apiRequest(`/acquisition/list-members/${memberId}`),
105
+ enabled: isReady && !!memberId
106
+ });
107
+ }
108
+ var leadGenArtifactKeys = {
109
+ all: ["lead-gen-artifacts"],
110
+ // ownerId is nullable/undefined here to match CreateArtifactRequest -- an
111
+ // 'organization'-owned artifact has no single owning entity row. See
112
+ // CreateArtifactRequestSchema (business/acquisition/api-schemas.ts).
113
+ list: (organizationId, ownerKind, ownerId) => [...leadGenArtifactKeys.all, organizationId, ownerKind, ownerId]
114
+ };
115
+ function useArtifacts({ ownerKind, ownerId }) {
116
+ const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
117
+ return useQuery({
118
+ queryKey: leadGenArtifactKeys.list(workOSOrganizationId, ownerKind, ownerId),
119
+ queryFn: () => apiRequest(
120
+ `/acquisition/artifacts?ownerKind=${encodeURIComponent(ownerKind)}&ownerId=${encodeURIComponent(ownerId)}`
121
+ ),
122
+ enabled: isReady && !!ownerId
123
+ });
124
+ }
125
+ function useCreateArtifact() {
126
+ const { apiRequest, workOSOrganizationId } = useElevasisServices();
127
+ const queryClient = useQueryClient();
128
+ return useMutation({
129
+ mutationFn: (body) => apiRequest("/acquisition/artifacts", {
130
+ method: "POST",
131
+ body: JSON.stringify(body)
132
+ }),
133
+ onSuccess: (_, variables) => {
134
+ queryClient.invalidateQueries({
135
+ queryKey: leadGenArtifactKeys.list(workOSOrganizationId, variables.ownerKind, variables.ownerId)
136
+ });
137
+ showSuccessNotification("Artifact created");
138
+ },
139
+ onError: (error) => {
140
+ showApiErrorNotification(error);
141
+ }
142
+ });
143
+ }
144
+ function useTransitionListMember() {
145
+ const { apiRequest, workOSOrganizationId } = useElevasisServices();
146
+ const queryClient = useQueryClient();
147
+ return useMutation({
148
+ mutationFn: async (input) => {
149
+ const { memberId, pipelineKey, stageKey, stateKey, reason, expectedUpdatedAt } = input;
150
+ await apiRequest(`/acquisition/list-members/${memberId}/transition`, {
151
+ method: "PATCH",
152
+ body: JSON.stringify({
153
+ pipelineKey,
154
+ stageKey,
155
+ ...stateKey !== void 0 ? { stateKey } : {},
156
+ ...reason !== void 0 ? { reason } : {},
157
+ ...expectedUpdatedAt !== void 0 ? { expectedUpdatedAt } : {}
158
+ })
159
+ });
160
+ },
161
+ onSuccess: (_, variables) => {
162
+ queryClient.invalidateQueries({
163
+ queryKey: leadGenListMemberKeys.detail(workOSOrganizationId, variables.memberId)
164
+ });
165
+ if (variables.listId) {
166
+ queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(workOSOrganizationId, variables.listId) });
167
+ }
168
+ },
169
+ onError: (error) => {
170
+ queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.all });
171
+ showApiErrorNotification(error);
172
+ }
173
+ });
174
+ }
175
+ function useDeriveActions(item) {
176
+ return useMemo(() => {
177
+ if (!item) return [];
178
+ if (item.pipeline_key !== "lead-gen") {
179
+ return deriveActions(item);
180
+ }
181
+ return [];
182
+ }, [item]);
183
+ }
184
+ function useUpdateListStatus() {
185
+ const { apiRequest, workOSOrganizationId } = useElevasisServices();
186
+ const queryClient = useQueryClient();
187
+ return useMutation({
188
+ mutationFn: async (input) => {
189
+ await apiRequest(`/acquisition/lists/${input.listId}/status`, {
190
+ method: "PATCH",
191
+ body: JSON.stringify({ status: input.status })
192
+ });
193
+ },
194
+ onSuccess: (_, variables) => {
195
+ queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(workOSOrganizationId) });
196
+ queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, variables.listId) });
197
+ queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
198
+ },
199
+ onError: (error) => {
200
+ queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
201
+ showApiErrorNotification(error);
202
+ }
203
+ });
204
+ }
205
+
83
206
  // src/hooks/settings/credentials/credentialService.ts
84
207
  var CredentialService = class {
85
208
  constructor(apiRequest) {
@@ -228,4 +351,42 @@ function useUpdateCredential() {
228
351
  });
229
352
  }
230
353
 
231
- export { CredentialSchemas, CredentialService, useCreateCredential, useCredentials, useDeleteCredential, useUpdateCredential, useVerifyCredential };
354
+ // src/hooks/lead-gen/useTransitionListCompany.ts
355
+ var leadGenListCompanyKeys = {
356
+ all: ["lead-gen-list-companies"],
357
+ detail: (organizationId, listCompanyId) => [...leadGenListCompanyKeys.all, organizationId, "detail", listCompanyId]
358
+ };
359
+ function useTransitionListCompany() {
360
+ const { apiRequest, workOSOrganizationId } = useElevasisServices();
361
+ const queryClient = useQueryClient();
362
+ return useMutation({
363
+ mutationFn: async (input) => {
364
+ const { listCompanyId, pipelineKey, stageKey, stateKey, reason, expectedUpdatedAt } = input;
365
+ await apiRequest(`/acquisition/list-companies/${listCompanyId}/transition`, {
366
+ method: "PATCH",
367
+ body: JSON.stringify({
368
+ pipelineKey,
369
+ stageKey,
370
+ ...stateKey !== void 0 ? { stateKey } : {},
371
+ ...reason !== void 0 ? { reason } : {},
372
+ ...expectedUpdatedAt !== void 0 ? { expectedUpdatedAt } : {}
373
+ })
374
+ });
375
+ },
376
+ onSuccess: (_, variables) => {
377
+ queryClient.invalidateQueries({
378
+ queryKey: leadGenListCompanyKeys.detail(workOSOrganizationId, variables.listCompanyId)
379
+ });
380
+ if (variables.listId) {
381
+ queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
382
+ queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, variables.listId) });
383
+ }
384
+ },
385
+ onError: (error) => {
386
+ queryClient.invalidateQueries({ queryKey: leadGenListCompanyKeys.all });
387
+ showApiErrorNotification(error);
388
+ }
389
+ });
390
+ }
391
+
392
+ export { CredentialSchemas, CredentialService, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, useArtifacts, useCreateArtifact, useCreateCredential, useCredentials, useDeleteCredential, useDeriveActions, useListMember, useListMembers, useTransitionListCompany, useTransitionListMember, useUpdateCredential, useUpdateListStatus, useVerifyCredential };
@@ -1,4 +1,4 @@
1
- import { usePresetsContext } from './chunk-R6NMRXNO.js';
1
+ import { usePresetsContext } from './chunk-4WLAVUPS.js';
2
2
  import { useMemo } from 'react';
3
3
 
4
4
  var BUILT_IN_NAMES = /* @__PURE__ */ new Set([
@@ -1,4 +1,4 @@
1
- import { showApiErrorNotification } from './chunk-HYQOGRWG.js';
1
+ import { showApiErrorNotification } from './chunk-KXNRTJAE.js';
2
2
  import { useElevasisServices } from './chunk-BI5VDO2K.js';
3
3
  import { useQuery, useQueries, useMutation } from '@tanstack/react-query';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { OrganizationContext } from './chunk-DD3CCMCZ.js';
2
- import { APIClientError } from './chunk-R5UGIFYU.js';
2
+ import { APIClientError } from './chunk-5ZK7K7YP.js';
3
3
  import { createContext, useContext, useMemo, useCallback } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5