@elevasis/ui 2.28.1 → 2.30.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/dist/api/index.js +2 -2
- package/dist/app/index.d.ts +54 -0
- package/dist/app/index.js +10 -10
- package/dist/auth/index.js +4 -4
- package/dist/charts/index.d.ts +2 -1
- package/dist/charts/index.js +8 -8
- package/dist/{chunk-HNN3QALL.js → chunk-2DIYILF7.js} +9 -8
- package/dist/{chunk-XTVZFT7U.js → chunk-2Q2JQSQO.js} +1 -1
- package/dist/{chunk-UOHOKDKL.js → chunk-3GV5NHSS.js} +1052 -209
- package/dist/{chunk-PBNIW7KV.js → chunk-3MDNBHVB.js} +140 -9
- package/dist/{chunk-K4Q5QUHZ.js → chunk-4FZYEEPK.js} +6 -6
- package/dist/{chunk-MJMFIWEB.js → chunk-4SY6BTVZ.js} +2 -2
- package/dist/{chunk-HLFFKKT3.js → chunk-4VQ2PXMI.js} +14 -14
- package/dist/{chunk-WKJ47GIW.js → chunk-533DUEQY.js} +1 -1
- package/dist/{chunk-N63RKL3L.js → chunk-6EFVZV6X.js} +394 -311
- package/dist/{chunk-V3HUIZJX.js → chunk-6IXOKUBC.js} +1 -1
- package/dist/{chunk-GJXAAYZ3.js → chunk-6WXDE5LZ.js} +1 -1
- package/dist/{chunk-VKMNWHTL.js → chunk-6YT4IKJ7.js} +3 -3
- package/dist/{chunk-ZPXV5KI3.js → chunk-7E3FUTND.js} +1 -1
- package/dist/{chunk-YNYGUVGW.js → chunk-A7B7HLDF.js} +11 -10
- package/dist/{chunk-NU5FNTOB.js → chunk-AKOD52HS.js} +84 -15
- package/dist/{chunk-CT5IR4ZA.js → chunk-CLUP5H3C.js} +6 -9
- package/dist/{chunk-MYEOTM7D.js → chunk-CN2HC4D4.js} +5 -1
- package/dist/{chunk-ROSMICXG.js → chunk-CXY7FMUM.js} +35 -20
- package/dist/{chunk-HOIT677G.js → chunk-HUJCU55S.js} +1 -1
- package/dist/{chunk-SRNIHB7Y.js → chunk-HXZQWMKE.js} +1 -2
- package/dist/{chunk-M6OJ43NL.js → chunk-HYLERWRO.js} +99 -30
- package/dist/{chunk-XBMCDGHA.js → chunk-IKQ42WHU.js} +1 -1
- package/dist/{chunk-GESXCQWY.js → chunk-JA5ECJJB.js} +1 -1
- package/dist/{chunk-KU7ZDWQ7.js → chunk-JBWJ6WHZ.js} +1 -1
- package/dist/{chunk-MCRKFDKB.js → chunk-JKTPRYGV.js} +5 -5
- package/dist/{chunk-5WWZXCS5.js → chunk-KJ3QUBNU.js} +9 -2
- package/dist/{chunk-3HCTCMAS.js → chunk-LRZFLK2F.js} +3 -3
- package/dist/chunk-NITGGYH2.js +476 -0
- package/dist/{chunk-VMJVQAFZ.js → chunk-OAVTMITG.js} +1 -1
- package/dist/{chunk-TVJROM2V.js → chunk-P5WYW2GI.js} +58 -37
- package/dist/{chunk-5R27NFOI.js → chunk-SBCIB5TZ.js} +6 -27
- package/dist/{chunk-AYSO5A3R.js → chunk-SKXXT3E2.js} +4 -4
- package/dist/{chunk-MZCDRBSI.js → chunk-T2PAD63Y.js} +12 -12
- package/dist/{chunk-LH4GPYDX.js → chunk-T5Z7G2J2.js} +19 -3
- package/dist/{chunk-WFTNY755.js → chunk-VKIZUUPM.js} +1 -1
- package/dist/{chunk-S66IQSSR.js → chunk-WF227UBV.js} +1 -1
- package/dist/components/chat/index.d.ts +2 -1
- package/dist/components/chat/index.js +1 -1
- package/dist/components/index.js +42 -42
- package/dist/components/navigation/index.js +8 -8
- package/dist/features/auth/index.js +5 -5
- package/dist/features/crm/index.js +21 -21
- package/dist/features/dashboard/index.js +22 -22
- package/dist/features/delivery/index.js +21 -21
- package/dist/features/knowledge/index.js +45 -31
- package/dist/features/lead-gen/index.d.ts +116 -2
- package/dist/features/lead-gen/index.js +22 -22
- package/dist/features/monitoring/index.js +23 -23
- package/dist/features/monitoring/requests/index.js +20 -20
- package/dist/features/operations/index.js +27 -27
- package/dist/features/settings/index.js +22 -22
- package/dist/hooks/delivery/index.js +3 -3
- package/dist/hooks/index.d.ts +263 -4
- package/dist/hooks/index.js +20 -20
- package/dist/hooks/published.d.ts +263 -4
- package/dist/hooks/published.js +20 -20
- package/dist/index.d.ts +378 -10
- package/dist/index.js +21 -21
- package/dist/initialization/index.js +4 -4
- package/dist/knowledge/index.d.ts +55 -1
- package/dist/knowledge/index.js +102 -2
- package/dist/organization/index.js +4 -4
- package/dist/profile/index.js +2 -2
- package/dist/provider/ElevasisServiceContext.d.ts +11 -5
- package/dist/provider/ElevasisServiceContext.js +1 -1
- package/dist/provider/index.d.ts +119 -5
- package/dist/provider/index.js +17 -17
- package/dist/provider/published.d.ts +119 -5
- package/dist/provider/published.js +13 -13
- package/dist/test-utils/index.d.ts +3 -0
- package/dist/test-utils/index.js +30 -6
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/index.js +1 -1
- package/dist/utils/index.d.ts +1 -3
- 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/dist/chunk-JS7VBTC4.js +0 -250
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { observabilityKeys } from './chunk-
|
|
2
|
-
import { showApiErrorNotification, showSuccessNotification, projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-
|
|
1
|
+
import { observabilityKeys } from './chunk-6YT4IKJ7.js';
|
|
2
|
+
import { showApiErrorNotification, showSuccessNotification, projectKeys, noteKeys, taskKeys, milestoneKeys } from './chunk-T2PAD63Y.js';
|
|
3
3
|
import { useSupabase } from './chunk-BRXELOHC.js';
|
|
4
|
-
import { useNotificationAdapter, deriveActions } from './chunk-
|
|
5
|
-
import { useOptionalElevasisFeatures } from './chunk-
|
|
6
|
-
import { HTTP_HEADERS } from './chunk-
|
|
7
|
-
import { ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, UuidSchema, CredentialNameSchema, STALE_TIME_DEFAULT, REFETCH_INTERVAL_DASHBOARD, STALE_TIME_MONITORING, getTimeRangeDates, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_ADMIN, APIClientError, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-
|
|
8
|
-
import { useStableAccessToken } from './chunk-
|
|
9
|
-
import { useInitialization } from './chunk-
|
|
4
|
+
import { useNotificationAdapter, deriveActions } from './chunk-AKOD52HS.js';
|
|
5
|
+
import { useOptionalElevasisFeatures } from './chunk-6IXOKUBC.js';
|
|
6
|
+
import { HTTP_HEADERS } from './chunk-7E3FUTND.js';
|
|
7
|
+
import { ResourceTypeSchema, NonEmptyStringSchema, OriginResourceTypeSchema, UuidSchema, CredentialNameSchema, STALE_TIME_DEFAULT, REFETCH_INTERVAL_DASHBOARD, STALE_TIME_MONITORING, getTimeRangeDates, REFETCH_INTERVAL_RUNNING, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, STALE_TIME_ADMIN, APIClientError, GC_TIME_MEDIUM, GC_TIME_SHORT } from './chunk-HXZQWMKE.js';
|
|
8
|
+
import { useStableAccessToken } from './chunk-VKIZUUPM.js';
|
|
9
|
+
import { useInitialization } from './chunk-533DUEQY.js';
|
|
10
10
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
11
|
-
import { useElevasisServices } from './chunk-
|
|
11
|
+
import { useElevasisServices } from './chunk-KJ3QUBNU.js';
|
|
12
12
|
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
13
13
|
import { useMemo, useCallback, useState, useEffect, useId, useRef } from 'react';
|
|
14
14
|
import { useQuery, useQueryClient, useMutation, useQueries } from '@tanstack/react-query';
|
|
@@ -395,7 +395,7 @@ z.object({
|
|
|
395
395
|
z.object({
|
|
396
396
|
ids: z.array(UuidSchema).min(1).max(500)
|
|
397
397
|
}).strict();
|
|
398
|
-
var CredentialTypeSchema = z.enum(["oauth", "api-key", "webhook-secret", "api-key-secret"]);
|
|
398
|
+
var CredentialTypeSchema = z.enum(["oauth", "api-key", "webhook-secret", "api-key-secret", "clickup"]);
|
|
399
399
|
var CredentialValueSchema = z.record(z.string(), z.unknown()).refine((val) => Object.keys(val).length > 0, { message: "Credential value must not be empty" }).refine((val) => Object.keys(val).length <= 50, { message: "Credential value has too many keys (max 50)" }).refine(
|
|
400
400
|
(val) => {
|
|
401
401
|
for (const v of Object.values(val)) {
|
|
@@ -442,25 +442,37 @@ var UpdateCredentialRequestSchema = z.object({
|
|
|
442
442
|
var DeleteCredentialParamsSchema = z.object({
|
|
443
443
|
credentialId: UuidSchema
|
|
444
444
|
});
|
|
445
|
+
var VerifyCredentialParamsSchema = z.object({
|
|
446
|
+
credentialId: UuidSchema
|
|
447
|
+
});
|
|
448
|
+
var VerifyCredentialResponseSchema = z.object({
|
|
449
|
+
ok: z.boolean(),
|
|
450
|
+
provider: z.string(),
|
|
451
|
+
checkedAt: z.string().datetime(),
|
|
452
|
+
message: z.string().optional(),
|
|
453
|
+
details: z.record(z.string(), z.unknown()).optional()
|
|
454
|
+
});
|
|
445
455
|
var CredentialSchemas = {
|
|
446
456
|
CreateRequest: CreateCredentialRequestSchema,
|
|
447
457
|
CreateResponse: CreateCredentialResponseSchema,
|
|
448
458
|
ListResponse: ListCredentialsResponseSchema,
|
|
449
459
|
UpdateParams: UpdateCredentialParamsSchema,
|
|
450
460
|
UpdateRequest: UpdateCredentialRequestSchema,
|
|
451
|
-
DeleteParams: DeleteCredentialParamsSchema
|
|
461
|
+
DeleteParams: DeleteCredentialParamsSchema,
|
|
462
|
+
VerifyParams: VerifyCredentialParamsSchema,
|
|
463
|
+
VerifyResponse: VerifyCredentialResponseSchema
|
|
452
464
|
};
|
|
453
465
|
|
|
454
466
|
// src/hooks/auth/useOrganizationPermissions.ts
|
|
455
467
|
var ALL_PERMISSIONS = Object.values(PERMISSIONS);
|
|
456
468
|
function useOrganizationPermissions() {
|
|
457
|
-
const { apiRequest,
|
|
469
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
458
470
|
const { profile } = useInitialization();
|
|
459
471
|
const isPlatformAdmin = profile?.is_platform_admin === true;
|
|
460
472
|
const query = useQuery({
|
|
461
|
-
queryKey: ["organization-permissions",
|
|
462
|
-
queryFn: () => apiRequest(`/memberships/my-permissions/${
|
|
463
|
-
enabled: isReady && !!
|
|
473
|
+
queryKey: ["organization-permissions", workOSOrganizationId],
|
|
474
|
+
queryFn: () => apiRequest(`/memberships/my-permissions/${workOSOrganizationId}`),
|
|
475
|
+
enabled: isReady && !!workOSOrganizationId && !isPlatformAdmin,
|
|
464
476
|
staleTime: STALE_TIME_DEFAULT
|
|
465
477
|
});
|
|
466
478
|
const permissions = useMemo(
|
|
@@ -493,9 +505,9 @@ var executionsKeys = {
|
|
|
493
505
|
execution: (orgId, resourceId, executionId) => [...executionsKeys.all, "execution", orgId, resourceId, executionId]
|
|
494
506
|
};
|
|
495
507
|
function useExecutions(resourceId, resourceStatus, limit, offset) {
|
|
496
|
-
const { apiRequest,
|
|
508
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
497
509
|
return useQuery({
|
|
498
|
-
queryKey: executionsKeys.executions(
|
|
510
|
+
queryKey: executionsKeys.executions(workOSOrganizationId, resourceId, resourceStatus, limit, offset),
|
|
499
511
|
queryFn: async () => {
|
|
500
512
|
const params = new URLSearchParams();
|
|
501
513
|
if (resourceStatus && resourceStatus !== "all") {
|
|
@@ -514,11 +526,39 @@ function useExecutions(resourceId, resourceStatus, limit, offset) {
|
|
|
514
526
|
enabled: isReady && !!resourceId
|
|
515
527
|
});
|
|
516
528
|
}
|
|
529
|
+
function useInFlightExecutions(resourceId, options = {}) {
|
|
530
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
531
|
+
const limit = options.limit ?? 20;
|
|
532
|
+
const offset = options.offset ?? 0;
|
|
533
|
+
return useQuery({
|
|
534
|
+
queryKey: [
|
|
535
|
+
...executionsKeys.executions(workOSOrganizationId, resourceId, "all", limit, offset),
|
|
536
|
+
"in-flight"
|
|
537
|
+
],
|
|
538
|
+
queryFn: async () => {
|
|
539
|
+
const params = new URLSearchParams({
|
|
540
|
+
limit: String(limit),
|
|
541
|
+
offset: String(offset)
|
|
542
|
+
});
|
|
543
|
+
const response = await apiRequest(
|
|
544
|
+
`/execution-engine/executions/${resourceId}?${params.toString()}`
|
|
545
|
+
);
|
|
546
|
+
const executions = response.executions.filter((execution) => execution.status === "running");
|
|
547
|
+
return {
|
|
548
|
+
...response,
|
|
549
|
+
executions,
|
|
550
|
+
total: executions.length
|
|
551
|
+
};
|
|
552
|
+
},
|
|
553
|
+
enabled: isReady && !!resourceId && (options.enabled ?? true),
|
|
554
|
+
refetchInterval: options.refetchInterval
|
|
555
|
+
});
|
|
556
|
+
}
|
|
517
557
|
var REFETCH_INTERVAL_RUNNING2 = 2e3;
|
|
518
558
|
function useExecution(resourceId, executionId) {
|
|
519
|
-
const { apiRequest,
|
|
559
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
520
560
|
return useQuery({
|
|
521
|
-
queryKey: executionsKeys.execution(
|
|
561
|
+
queryKey: executionsKeys.execution(workOSOrganizationId, resourceId, executionId),
|
|
522
562
|
queryFn: () => apiRequest(`/execution-engine/executions/${resourceId}/${executionId}`),
|
|
523
563
|
enabled: isReady && !!resourceId && !!executionId,
|
|
524
564
|
refetchInterval: (query) => {
|
|
@@ -528,7 +568,7 @@ function useExecution(resourceId, executionId) {
|
|
|
528
568
|
});
|
|
529
569
|
}
|
|
530
570
|
function useExecuteAsync() {
|
|
531
|
-
const { apiRequest,
|
|
571
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
532
572
|
const queryClient = useQueryClient();
|
|
533
573
|
return useMutation({
|
|
534
574
|
mutationFn: async ({ resourceId, resourceType, input }) => {
|
|
@@ -540,21 +580,21 @@ function useExecuteAsync() {
|
|
|
540
580
|
},
|
|
541
581
|
onSuccess: (data) => {
|
|
542
582
|
queryClient.invalidateQueries({
|
|
543
|
-
queryKey: executionsKeys.executionsListBase(
|
|
583
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, data.resourceId)
|
|
544
584
|
});
|
|
545
585
|
}
|
|
546
586
|
});
|
|
547
587
|
}
|
|
548
588
|
function useCreateOrgRole() {
|
|
549
|
-
const { apiRequest,
|
|
589
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
550
590
|
const queryClient = useQueryClient();
|
|
551
591
|
return useMutation({
|
|
552
|
-
mutationFn: (input) => apiRequest(`/organizations/${
|
|
592
|
+
mutationFn: (input) => apiRequest(`/organizations/${workOSOrganizationId}/roles`, {
|
|
553
593
|
method: "POST",
|
|
554
594
|
body: JSON.stringify(input)
|
|
555
595
|
}),
|
|
556
596
|
onSettled: () => {
|
|
557
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles",
|
|
597
|
+
queryClient.invalidateQueries({ queryKey: ["org-roles", workOSOrganizationId] });
|
|
558
598
|
}
|
|
559
599
|
});
|
|
560
600
|
}
|
|
@@ -569,12 +609,12 @@ function usePermissionCatalog() {
|
|
|
569
609
|
});
|
|
570
610
|
}
|
|
571
611
|
function useResourcesHealth(params) {
|
|
572
|
-
const { apiRequest, isReady,
|
|
612
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
573
613
|
const resourcesKey = params.resources.map((r) => `${r.entityType}-${r.entityId}`).join(",");
|
|
574
614
|
return useQuery({
|
|
575
615
|
// eslint-disable-next-line @tanstack/query/exhaustive-deps -- resourcesKey is derived from params.resources
|
|
576
616
|
queryKey: observabilityKeys.resourcesHealth(
|
|
577
|
-
|
|
617
|
+
workOSOrganizationId,
|
|
578
618
|
resourcesKey,
|
|
579
619
|
params.startDate,
|
|
580
620
|
params.endDate,
|
|
@@ -596,9 +636,9 @@ function useResourcesHealth(params) {
|
|
|
596
636
|
});
|
|
597
637
|
}
|
|
598
638
|
function useErrorDetails(filters) {
|
|
599
|
-
const { apiRequest, isReady,
|
|
639
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
600
640
|
return useQuery({
|
|
601
|
-
queryKey: observabilityKeys.errorDetails(
|
|
641
|
+
queryKey: observabilityKeys.errorDetails(workOSOrganizationId, filters),
|
|
602
642
|
queryFn: async () => {
|
|
603
643
|
const params = new URLSearchParams();
|
|
604
644
|
if (filters.errorType) params.append("errorType", filters.errorType);
|
|
@@ -619,9 +659,9 @@ function useErrorDetails(filters) {
|
|
|
619
659
|
});
|
|
620
660
|
}
|
|
621
661
|
function useErrorDetail(executionId) {
|
|
622
|
-
const { apiRequest, isReady,
|
|
662
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
623
663
|
return useQuery({
|
|
624
|
-
queryKey: observabilityKeys.errorDetail(
|
|
664
|
+
queryKey: observabilityKeys.errorDetail(workOSOrganizationId, executionId),
|
|
625
665
|
queryFn: async () => {
|
|
626
666
|
if (!executionId) return null;
|
|
627
667
|
const response = await apiRequest(`/observability/error-details/${executionId}`);
|
|
@@ -775,9 +815,9 @@ var ApiKeyService = class {
|
|
|
775
815
|
}
|
|
776
816
|
};
|
|
777
817
|
function useListApiKeys() {
|
|
778
|
-
const { apiRequest,
|
|
818
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
779
819
|
return useQuery({
|
|
780
|
-
queryKey: ["api-keys",
|
|
820
|
+
queryKey: ["api-keys", workOSOrganizationId],
|
|
781
821
|
queryFn: async () => {
|
|
782
822
|
const service = new ApiKeyService(apiRequest);
|
|
783
823
|
return await service.listApiKeys();
|
|
@@ -901,11 +941,21 @@ var CredentialService = class {
|
|
|
901
941
|
method: "DELETE"
|
|
902
942
|
});
|
|
903
943
|
}
|
|
944
|
+
/**
|
|
945
|
+
* Verify a credential server-side without exposing secret material
|
|
946
|
+
*/
|
|
947
|
+
async verifyCredential(credentialId) {
|
|
948
|
+
CredentialSchemas.VerifyParams.parse({ credentialId });
|
|
949
|
+
const response = await this.apiRequest(`/credentials/${credentialId}/verify`, {
|
|
950
|
+
method: "POST"
|
|
951
|
+
});
|
|
952
|
+
return CredentialSchemas.VerifyResponse.parse(response);
|
|
953
|
+
}
|
|
904
954
|
};
|
|
905
955
|
function useCredentials() {
|
|
906
|
-
const { apiRequest,
|
|
956
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
907
957
|
return useQuery({
|
|
908
|
-
queryKey: ["credentials",
|
|
958
|
+
queryKey: ["credentials", workOSOrganizationId],
|
|
909
959
|
queryFn: async () => {
|
|
910
960
|
const service = new CredentialService(apiRequest);
|
|
911
961
|
return await service.listCredentials();
|
|
@@ -913,6 +963,15 @@ function useCredentials() {
|
|
|
913
963
|
enabled: isReady
|
|
914
964
|
});
|
|
915
965
|
}
|
|
966
|
+
function useVerifyCredential() {
|
|
967
|
+
const { apiRequest } = useElevasisServices();
|
|
968
|
+
return useMutation({
|
|
969
|
+
mutationFn: async (credentialId) => {
|
|
970
|
+
const service = new CredentialService(apiRequest);
|
|
971
|
+
return await service.verifyCredential(credentialId);
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
}
|
|
916
975
|
function useCreateCredential() {
|
|
917
976
|
const { apiRequest } = useElevasisServices();
|
|
918
977
|
const adapter = useNotificationAdapter();
|
|
@@ -1017,7 +1076,7 @@ var DeploymentService = class {
|
|
|
1017
1076
|
|
|
1018
1077
|
// src/hooks/settings/deployments/useDeploymentActions.ts
|
|
1019
1078
|
function useActivateDeployment() {
|
|
1020
|
-
const { apiRequest,
|
|
1079
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1021
1080
|
const queryClient = useQueryClient();
|
|
1022
1081
|
const showError = useErrorNotification();
|
|
1023
1082
|
return useMutation({
|
|
@@ -1026,7 +1085,7 @@ function useActivateDeployment() {
|
|
|
1026
1085
|
return service.activateDeployment(deploymentId);
|
|
1027
1086
|
},
|
|
1028
1087
|
onSuccess: () => {
|
|
1029
|
-
queryClient.invalidateQueries({ queryKey: ["deployments",
|
|
1088
|
+
queryClient.invalidateQueries({ queryKey: ["deployments", workOSOrganizationId] });
|
|
1030
1089
|
notifications.show({ title: "Success", message: "Deployment activated", color: "teal" });
|
|
1031
1090
|
},
|
|
1032
1091
|
onError: (error) => {
|
|
@@ -1036,7 +1095,7 @@ function useActivateDeployment() {
|
|
|
1036
1095
|
});
|
|
1037
1096
|
}
|
|
1038
1097
|
function useDeactivateDeployment() {
|
|
1039
|
-
const { apiRequest,
|
|
1098
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1040
1099
|
const queryClient = useQueryClient();
|
|
1041
1100
|
const showError = useErrorNotification();
|
|
1042
1101
|
return useMutation({
|
|
@@ -1045,7 +1104,7 @@ function useDeactivateDeployment() {
|
|
|
1045
1104
|
return service.deactivateDeployment(deploymentId);
|
|
1046
1105
|
},
|
|
1047
1106
|
onSuccess: () => {
|
|
1048
|
-
queryClient.invalidateQueries({ queryKey: ["deployments",
|
|
1107
|
+
queryClient.invalidateQueries({ queryKey: ["deployments", workOSOrganizationId] });
|
|
1049
1108
|
notifications.show({ title: "Success", message: "Deployment deactivated", color: "teal" });
|
|
1050
1109
|
},
|
|
1051
1110
|
onError: (error) => {
|
|
@@ -1055,7 +1114,7 @@ function useDeactivateDeployment() {
|
|
|
1055
1114
|
});
|
|
1056
1115
|
}
|
|
1057
1116
|
function useDeleteDeployment() {
|
|
1058
|
-
const { apiRequest,
|
|
1117
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1059
1118
|
const queryClient = useQueryClient();
|
|
1060
1119
|
const showError = useErrorNotification();
|
|
1061
1120
|
return useMutation({
|
|
@@ -1064,7 +1123,7 @@ function useDeleteDeployment() {
|
|
|
1064
1123
|
return service.deleteDeployment(deploymentId);
|
|
1065
1124
|
},
|
|
1066
1125
|
onSuccess: () => {
|
|
1067
|
-
queryClient.invalidateQueries({ queryKey: ["deployments",
|
|
1126
|
+
queryClient.invalidateQueries({ queryKey: ["deployments", workOSOrganizationId] });
|
|
1068
1127
|
notifications.show({ title: "Success", message: "Deployment deleted", color: "teal" });
|
|
1069
1128
|
},
|
|
1070
1129
|
onError: (error) => {
|
|
@@ -1074,9 +1133,9 @@ function useDeleteDeployment() {
|
|
|
1074
1133
|
});
|
|
1075
1134
|
}
|
|
1076
1135
|
function useListDeployments() {
|
|
1077
|
-
const { apiRequest,
|
|
1136
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
1078
1137
|
return useQuery({
|
|
1079
|
-
queryKey: ["deployments",
|
|
1138
|
+
queryKey: ["deployments", workOSOrganizationId],
|
|
1080
1139
|
queryFn: async () => {
|
|
1081
1140
|
const service = new DeploymentService(apiRequest);
|
|
1082
1141
|
return await service.listDeployments();
|
|
@@ -1089,9 +1148,9 @@ function useListDeployments() {
|
|
|
1089
1148
|
});
|
|
1090
1149
|
}
|
|
1091
1150
|
function useScheduledTasks(options = {}) {
|
|
1092
|
-
const { apiRequest,
|
|
1151
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
1093
1152
|
return useQuery({
|
|
1094
|
-
queryKey: ["schedules", "dashboard",
|
|
1153
|
+
queryKey: ["schedules", "dashboard", workOSOrganizationId, options.status, options.targetResourceType],
|
|
1095
1154
|
queryFn: async () => {
|
|
1096
1155
|
const params = new URLSearchParams();
|
|
1097
1156
|
if (options.status) params.append("status", options.status);
|
|
@@ -1117,9 +1176,9 @@ var scheduleKeys = {
|
|
|
1117
1176
|
executions: (orgId, id) => [...scheduleKeys.detail(orgId, id), "executions"]
|
|
1118
1177
|
};
|
|
1119
1178
|
function useListSchedules(filters) {
|
|
1120
|
-
const { apiRequest,
|
|
1179
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
1121
1180
|
return useQuery({
|
|
1122
|
-
queryKey: scheduleKeys.list(
|
|
1181
|
+
queryKey: scheduleKeys.list(workOSOrganizationId, filters),
|
|
1123
1182
|
queryFn: async () => {
|
|
1124
1183
|
const params = new URLSearchParams();
|
|
1125
1184
|
if (filters?.status) params.set("status", filters.status);
|
|
@@ -1135,9 +1194,9 @@ function useListSchedules(filters) {
|
|
|
1135
1194
|
});
|
|
1136
1195
|
}
|
|
1137
1196
|
function useGetSchedule(id) {
|
|
1138
|
-
const { apiRequest,
|
|
1197
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
1139
1198
|
return useQuery({
|
|
1140
|
-
queryKey: scheduleKeys.detail(
|
|
1199
|
+
queryKey: scheduleKeys.detail(workOSOrganizationId, id),
|
|
1141
1200
|
queryFn: async () => {
|
|
1142
1201
|
const data = await apiRequest(`/task-scheduler/schedules/${id}`);
|
|
1143
1202
|
return data.schedule;
|
|
@@ -1146,9 +1205,9 @@ function useGetSchedule(id) {
|
|
|
1146
1205
|
});
|
|
1147
1206
|
}
|
|
1148
1207
|
function useGetExecutionHistory(scheduleId, options) {
|
|
1149
|
-
const { apiRequest,
|
|
1208
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
1150
1209
|
return useQuery({
|
|
1151
|
-
queryKey: [...scheduleKeys.executions(
|
|
1210
|
+
queryKey: [...scheduleKeys.executions(workOSOrganizationId, scheduleId), options?.limit, options?.offset],
|
|
1152
1211
|
queryFn: async () => {
|
|
1153
1212
|
const params = new URLSearchParams();
|
|
1154
1213
|
if (options?.limit) params.set("limit", String(options.limit));
|
|
@@ -1162,7 +1221,7 @@ function useGetExecutionHistory(scheduleId, options) {
|
|
|
1162
1221
|
}
|
|
1163
1222
|
function useCreateSchedule() {
|
|
1164
1223
|
const queryClient = useQueryClient();
|
|
1165
|
-
const { apiRequest,
|
|
1224
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1166
1225
|
return useMutation({
|
|
1167
1226
|
mutationFn: async (input) => {
|
|
1168
1227
|
const validated = CreateScheduleRequestSchema.parse(input);
|
|
@@ -1173,13 +1232,13 @@ function useCreateSchedule() {
|
|
|
1173
1232
|
return data.schedule;
|
|
1174
1233
|
},
|
|
1175
1234
|
onSuccess: () => {
|
|
1176
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(
|
|
1235
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(workOSOrganizationId) });
|
|
1177
1236
|
}
|
|
1178
1237
|
});
|
|
1179
1238
|
}
|
|
1180
1239
|
function useUpdateSchedule() {
|
|
1181
1240
|
const queryClient = useQueryClient();
|
|
1182
|
-
const { apiRequest,
|
|
1241
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1183
1242
|
return useMutation({
|
|
1184
1243
|
mutationFn: async ({ id, ...fields }) => {
|
|
1185
1244
|
GetScheduleParamsSchema.parse({ id });
|
|
@@ -1192,15 +1251,15 @@ function useUpdateSchedule() {
|
|
|
1192
1251
|
},
|
|
1193
1252
|
onSuccess: (_, variables) => {
|
|
1194
1253
|
queryClient.invalidateQueries({
|
|
1195
|
-
queryKey: scheduleKeys.detail(
|
|
1254
|
+
queryKey: scheduleKeys.detail(workOSOrganizationId, variables.id)
|
|
1196
1255
|
});
|
|
1197
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(
|
|
1256
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(workOSOrganizationId) });
|
|
1198
1257
|
}
|
|
1199
1258
|
});
|
|
1200
1259
|
}
|
|
1201
1260
|
function useUpdateAnchor() {
|
|
1202
1261
|
const queryClient = useQueryClient();
|
|
1203
|
-
const { apiRequest,
|
|
1262
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1204
1263
|
return useMutation({
|
|
1205
1264
|
mutationFn: async ({ id, anchorAt }) => {
|
|
1206
1265
|
GetScheduleParamsSchema.parse({ id });
|
|
@@ -1213,15 +1272,15 @@ function useUpdateAnchor() {
|
|
|
1213
1272
|
},
|
|
1214
1273
|
onSuccess: (_, variables) => {
|
|
1215
1274
|
queryClient.invalidateQueries({
|
|
1216
|
-
queryKey: scheduleKeys.detail(
|
|
1275
|
+
queryKey: scheduleKeys.detail(workOSOrganizationId, variables.id)
|
|
1217
1276
|
});
|
|
1218
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(
|
|
1277
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(workOSOrganizationId) });
|
|
1219
1278
|
}
|
|
1220
1279
|
});
|
|
1221
1280
|
}
|
|
1222
1281
|
function usePauseSchedule() {
|
|
1223
1282
|
const queryClient = useQueryClient();
|
|
1224
|
-
const { apiRequest,
|
|
1283
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1225
1284
|
return useMutation({
|
|
1226
1285
|
mutationFn: async (id) => {
|
|
1227
1286
|
GetScheduleParamsSchema.parse({ id });
|
|
@@ -1231,14 +1290,14 @@ function usePauseSchedule() {
|
|
|
1231
1290
|
return data.schedule;
|
|
1232
1291
|
},
|
|
1233
1292
|
onSuccess: (_, id) => {
|
|
1234
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(
|
|
1235
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(
|
|
1293
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(workOSOrganizationId, id) });
|
|
1294
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(workOSOrganizationId) });
|
|
1236
1295
|
}
|
|
1237
1296
|
});
|
|
1238
1297
|
}
|
|
1239
1298
|
function useResumeSchedule() {
|
|
1240
1299
|
const queryClient = useQueryClient();
|
|
1241
|
-
const { apiRequest,
|
|
1300
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1242
1301
|
return useMutation({
|
|
1243
1302
|
mutationFn: async (id) => {
|
|
1244
1303
|
GetScheduleParamsSchema.parse({ id });
|
|
@@ -1248,14 +1307,14 @@ function useResumeSchedule() {
|
|
|
1248
1307
|
return data.schedule;
|
|
1249
1308
|
},
|
|
1250
1309
|
onSuccess: (_, id) => {
|
|
1251
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(
|
|
1252
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(
|
|
1310
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(workOSOrganizationId, id) });
|
|
1311
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(workOSOrganizationId) });
|
|
1253
1312
|
}
|
|
1254
1313
|
});
|
|
1255
1314
|
}
|
|
1256
1315
|
function useCancelSchedule() {
|
|
1257
1316
|
const queryClient = useQueryClient();
|
|
1258
|
-
const { apiRequest,
|
|
1317
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1259
1318
|
return useMutation({
|
|
1260
1319
|
mutationFn: async (id) => {
|
|
1261
1320
|
GetScheduleParamsSchema.parse({ id });
|
|
@@ -1265,22 +1324,22 @@ function useCancelSchedule() {
|
|
|
1265
1324
|
return data.schedule;
|
|
1266
1325
|
},
|
|
1267
1326
|
onSuccess: (_, id) => {
|
|
1268
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(
|
|
1269
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(
|
|
1327
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(workOSOrganizationId, id) });
|
|
1328
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(workOSOrganizationId) });
|
|
1270
1329
|
}
|
|
1271
1330
|
});
|
|
1272
1331
|
}
|
|
1273
1332
|
function useDeleteSchedule() {
|
|
1274
1333
|
const queryClient = useQueryClient();
|
|
1275
|
-
const { apiRequest,
|
|
1334
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1276
1335
|
return useMutation({
|
|
1277
1336
|
mutationFn: async (id) => {
|
|
1278
1337
|
GetScheduleParamsSchema.parse({ id });
|
|
1279
1338
|
await apiRequest(`/task-scheduler/schedules/${id}`, { method: "DELETE" });
|
|
1280
1339
|
},
|
|
1281
1340
|
onSuccess: (_, id) => {
|
|
1282
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(
|
|
1283
|
-
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(
|
|
1341
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.detail(workOSOrganizationId, id) });
|
|
1342
|
+
queryClient.invalidateQueries({ queryKey: scheduleKeys.lists(workOSOrganizationId) });
|
|
1284
1343
|
}
|
|
1285
1344
|
});
|
|
1286
1345
|
}
|
|
@@ -1387,9 +1446,9 @@ var OperationsService = class {
|
|
|
1387
1446
|
|
|
1388
1447
|
// src/hooks/executions/useResources.ts
|
|
1389
1448
|
function useResources() {
|
|
1390
|
-
const { apiRequest,
|
|
1449
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
1391
1450
|
return useQuery({
|
|
1392
|
-
queryKey: executionsKeys.resources(
|
|
1451
|
+
queryKey: executionsKeys.resources(workOSOrganizationId),
|
|
1393
1452
|
queryFn: async () => {
|
|
1394
1453
|
const service = new OperationsService(apiRequest);
|
|
1395
1454
|
const result = await service.getResources();
|
|
@@ -1412,12 +1471,12 @@ function useCommandQueue({
|
|
|
1412
1471
|
priorityMin,
|
|
1413
1472
|
priorityMax
|
|
1414
1473
|
} = {}) {
|
|
1415
|
-
const { apiRequest, isReady,
|
|
1474
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1416
1475
|
return useQuery({
|
|
1417
1476
|
queryKey: [
|
|
1418
1477
|
"command-queue",
|
|
1419
1478
|
"list",
|
|
1420
|
-
|
|
1479
|
+
workOSOrganizationId,
|
|
1421
1480
|
status,
|
|
1422
1481
|
humanCheckpoint,
|
|
1423
1482
|
timeRange,
|
|
@@ -1547,9 +1606,9 @@ function useCommandQueueTotals({
|
|
|
1547
1606
|
priorityMax,
|
|
1548
1607
|
status
|
|
1549
1608
|
} = {}) {
|
|
1550
|
-
const { apiRequest, isReady,
|
|
1609
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1551
1610
|
return useQuery({
|
|
1552
|
-
queryKey: ["command-queue", "checkpoints",
|
|
1611
|
+
queryKey: ["command-queue", "checkpoints", workOSOrganizationId, timeRange, priorityMin, priorityMax, status],
|
|
1553
1612
|
queryFn: async () => {
|
|
1554
1613
|
const params = new URLSearchParams();
|
|
1555
1614
|
params.set("timeRange", timeRange);
|
|
@@ -1630,10 +1689,10 @@ var dealKeys = {
|
|
|
1630
1689
|
detail: (id) => [...dealKeys.all, "detail", id]
|
|
1631
1690
|
};
|
|
1632
1691
|
function useDeals(filters = {}) {
|
|
1633
|
-
const { apiRequest, isReady,
|
|
1692
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1634
1693
|
const normalizedFilters = normalizeDealFilters(filters);
|
|
1635
1694
|
const query = useQuery({
|
|
1636
|
-
queryKey: dealKeys.list(
|
|
1695
|
+
queryKey: dealKeys.list(workOSOrganizationId, normalizedFilters),
|
|
1637
1696
|
queryFn: async () => {
|
|
1638
1697
|
const params = new URLSearchParams();
|
|
1639
1698
|
if (normalizedFilters.stage) params.set("stage", normalizedFilters.stage);
|
|
@@ -1678,9 +1737,9 @@ function useDeals(filters = {}) {
|
|
|
1678
1737
|
};
|
|
1679
1738
|
}
|
|
1680
1739
|
function useDealsSummary() {
|
|
1681
|
-
const { apiRequest, isReady,
|
|
1740
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1682
1741
|
return useQuery({
|
|
1683
|
-
queryKey: dealKeys.summary(
|
|
1742
|
+
queryKey: dealKeys.summary(workOSOrganizationId),
|
|
1684
1743
|
queryFn: async () => {
|
|
1685
1744
|
return apiRequest("/deals/summary");
|
|
1686
1745
|
},
|
|
@@ -1688,10 +1747,10 @@ function useDealsSummary() {
|
|
|
1688
1747
|
});
|
|
1689
1748
|
}
|
|
1690
1749
|
function useDealsLookup(filters = {}, options) {
|
|
1691
|
-
const { apiRequest, isReady,
|
|
1750
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1692
1751
|
const normalizedFilters = normalizeLookupFilters(filters);
|
|
1693
1752
|
return useQuery({
|
|
1694
|
-
queryKey: dealKeys.lookup(
|
|
1753
|
+
queryKey: dealKeys.lookup(workOSOrganizationId, normalizedFilters),
|
|
1695
1754
|
queryFn: async () => {
|
|
1696
1755
|
const params = new URLSearchParams();
|
|
1697
1756
|
if (normalizedFilters.search) params.set("search", normalizedFilters.search);
|
|
@@ -1702,14 +1761,14 @@ function useDealsLookup(filters = {}, options) {
|
|
|
1702
1761
|
});
|
|
1703
1762
|
}
|
|
1704
1763
|
function useDeleteDeal() {
|
|
1705
|
-
const { apiRequest,
|
|
1764
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1706
1765
|
const queryClient = useQueryClient();
|
|
1707
1766
|
return useMutation({
|
|
1708
1767
|
mutationFn: async (dealId) => {
|
|
1709
1768
|
await apiRequest(`/deals/${dealId}`, { method: "DELETE" });
|
|
1710
1769
|
},
|
|
1711
1770
|
onSuccess: (_, dealId) => {
|
|
1712
|
-
queryClient.removeQueries({ queryKey: ["deal-detail",
|
|
1771
|
+
queryClient.removeQueries({ queryKey: ["deal-detail", workOSOrganizationId, dealId], exact: true });
|
|
1713
1772
|
queryClient.invalidateQueries({ queryKey: dealKeys.lists() });
|
|
1714
1773
|
queryClient.invalidateQueries({ queryKey: dealKeys.summaries() });
|
|
1715
1774
|
queryClient.invalidateQueries({ queryKey: dealKeys.lookups() });
|
|
@@ -1720,7 +1779,7 @@ function useDeleteDeal() {
|
|
|
1720
1779
|
});
|
|
1721
1780
|
}
|
|
1722
1781
|
function useTransitionItem() {
|
|
1723
|
-
const { apiRequest,
|
|
1782
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1724
1783
|
const queryClient = useQueryClient();
|
|
1725
1784
|
return useMutation({
|
|
1726
1785
|
mutationFn: async (input) => {
|
|
@@ -1739,7 +1798,7 @@ function useTransitionItem() {
|
|
|
1739
1798
|
onSuccess: (_, variables) => {
|
|
1740
1799
|
queryClient.invalidateQueries({ queryKey: dealKeys.lists() });
|
|
1741
1800
|
queryClient.invalidateQueries({ queryKey: dealKeys.summaries() });
|
|
1742
|
-
queryClient.invalidateQueries({ queryKey: ["deal-detail",
|
|
1801
|
+
queryClient.invalidateQueries({ queryKey: ["deal-detail", workOSOrganizationId, variables.dealId] });
|
|
1743
1802
|
},
|
|
1744
1803
|
onError: (error) => {
|
|
1745
1804
|
queryClient.invalidateQueries({ queryKey: dealKeys.all });
|
|
@@ -1753,9 +1812,9 @@ var dealTaskKeys = {
|
|
|
1753
1812
|
due: (orgId, window, assigneeUserId) => ["deal-tasks-due", orgId, window, assigneeUserId]
|
|
1754
1813
|
};
|
|
1755
1814
|
function useDealTasks(dealId) {
|
|
1756
|
-
const { apiRequest, isReady,
|
|
1815
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1757
1816
|
return useQuery({
|
|
1758
|
-
queryKey: dealTaskKeys.list(
|
|
1817
|
+
queryKey: dealTaskKeys.list(workOSOrganizationId, dealId ?? ""),
|
|
1759
1818
|
queryFn: async () => {
|
|
1760
1819
|
return apiRequest(`/deals/${dealId}/tasks`);
|
|
1761
1820
|
},
|
|
@@ -1763,11 +1822,11 @@ function useDealTasks(dealId) {
|
|
|
1763
1822
|
});
|
|
1764
1823
|
}
|
|
1765
1824
|
function useDealTasksDue(opts) {
|
|
1766
|
-
const { apiRequest, isReady,
|
|
1825
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1767
1826
|
const window = opts?.window ?? "today_and_overdue";
|
|
1768
1827
|
const assigneeUserId = opts?.assigneeUserId ?? null;
|
|
1769
1828
|
return useQuery({
|
|
1770
|
-
queryKey: dealTaskKeys.due(
|
|
1829
|
+
queryKey: dealTaskKeys.due(workOSOrganizationId, window, assigneeUserId),
|
|
1771
1830
|
queryFn: async () => {
|
|
1772
1831
|
const params = new URLSearchParams({ window });
|
|
1773
1832
|
if (assigneeUserId) params.set("assigneeUserId", assigneeUserId);
|
|
@@ -1777,7 +1836,7 @@ function useDealTasksDue(opts) {
|
|
|
1777
1836
|
});
|
|
1778
1837
|
}
|
|
1779
1838
|
function useCreateDealTask() {
|
|
1780
|
-
const { apiRequest,
|
|
1839
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1781
1840
|
const queryClient = useQueryClient();
|
|
1782
1841
|
return useMutation({
|
|
1783
1842
|
mutationFn: async (params) => {
|
|
@@ -1794,8 +1853,8 @@ function useCreateDealTask() {
|
|
|
1794
1853
|
});
|
|
1795
1854
|
},
|
|
1796
1855
|
onSuccess: (_, variables) => {
|
|
1797
|
-
queryClient.invalidateQueries({ queryKey: dealTaskKeys.list(
|
|
1798
|
-
queryClient.invalidateQueries({ queryKey: ["deal-tasks-due",
|
|
1856
|
+
queryClient.invalidateQueries({ queryKey: dealTaskKeys.list(workOSOrganizationId, variables.dealId) });
|
|
1857
|
+
queryClient.invalidateQueries({ queryKey: ["deal-tasks-due", workOSOrganizationId] });
|
|
1799
1858
|
showSuccessNotification("Task created");
|
|
1800
1859
|
},
|
|
1801
1860
|
onError: (error) => {
|
|
@@ -1804,7 +1863,7 @@ function useCreateDealTask() {
|
|
|
1804
1863
|
});
|
|
1805
1864
|
}
|
|
1806
1865
|
function useCompleteDealTask() {
|
|
1807
|
-
const { apiRequest,
|
|
1866
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
1808
1867
|
const queryClient = useQueryClient();
|
|
1809
1868
|
return useMutation({
|
|
1810
1869
|
mutationFn: async ({ taskId, dealId }) => {
|
|
@@ -1813,8 +1872,8 @@ function useCompleteDealTask() {
|
|
|
1813
1872
|
});
|
|
1814
1873
|
},
|
|
1815
1874
|
onSuccess: (_, variables) => {
|
|
1816
|
-
queryClient.invalidateQueries({ queryKey: dealTaskKeys.list(
|
|
1817
|
-
queryClient.invalidateQueries({ queryKey: ["deal-tasks-due",
|
|
1875
|
+
queryClient.invalidateQueries({ queryKey: dealTaskKeys.list(workOSOrganizationId, variables.dealId) });
|
|
1876
|
+
queryClient.invalidateQueries({ queryKey: ["deal-tasks-due", workOSOrganizationId] });
|
|
1818
1877
|
showSuccessNotification("Task completed");
|
|
1819
1878
|
},
|
|
1820
1879
|
onError: (error) => {
|
|
@@ -1838,9 +1897,9 @@ function buildQueryString(params) {
|
|
|
1838
1897
|
return queryString ? `?${queryString}` : "";
|
|
1839
1898
|
}
|
|
1840
1899
|
function useCompanies(filters = {}) {
|
|
1841
|
-
const { apiRequest, isReady,
|
|
1900
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1842
1901
|
return useQuery({
|
|
1843
|
-
queryKey: companyKeys.list(
|
|
1902
|
+
queryKey: companyKeys.list(workOSOrganizationId, filters),
|
|
1844
1903
|
queryFn: async () => {
|
|
1845
1904
|
const queryString = buildQueryString({
|
|
1846
1905
|
listId: filters.listId,
|
|
@@ -1857,26 +1916,26 @@ function useCompanies(filters = {}) {
|
|
|
1857
1916
|
});
|
|
1858
1917
|
return apiRequest(`/acquisition/companies${queryString}`);
|
|
1859
1918
|
},
|
|
1860
|
-
enabled: isReady && !!
|
|
1919
|
+
enabled: isReady && !!workOSOrganizationId
|
|
1861
1920
|
});
|
|
1862
1921
|
}
|
|
1863
1922
|
function useCompanyFacets() {
|
|
1864
|
-
const { apiRequest, isReady,
|
|
1923
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1865
1924
|
return useQuery({
|
|
1866
|
-
queryKey: companyKeys.facets(
|
|
1925
|
+
queryKey: companyKeys.facets(workOSOrganizationId),
|
|
1867
1926
|
queryFn: () => apiRequest("/acquisition/companies/facets"),
|
|
1868
|
-
enabled: isReady && !!
|
|
1927
|
+
enabled: isReady && !!workOSOrganizationId
|
|
1869
1928
|
});
|
|
1870
1929
|
}
|
|
1871
1930
|
function useCompany(companyId) {
|
|
1872
|
-
const { apiRequest, isReady,
|
|
1931
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1873
1932
|
return useQuery({
|
|
1874
|
-
queryKey: companyKeys.detail(
|
|
1933
|
+
queryKey: companyKeys.detail(workOSOrganizationId, companyId),
|
|
1875
1934
|
queryFn: async () => {
|
|
1876
1935
|
if (!companyId) return null;
|
|
1877
1936
|
return apiRequest(`/acquisition/companies/${companyId}`);
|
|
1878
1937
|
},
|
|
1879
|
-
enabled: isReady && !!
|
|
1938
|
+
enabled: isReady && !!workOSOrganizationId && !!companyId
|
|
1880
1939
|
});
|
|
1881
1940
|
}
|
|
1882
1941
|
function useCreateCompany() {
|
|
@@ -1958,9 +2017,9 @@ function buildQueryString2(params) {
|
|
|
1958
2017
|
return queryString ? `?${queryString}` : "";
|
|
1959
2018
|
}
|
|
1960
2019
|
function useContacts(filters = {}) {
|
|
1961
|
-
const { apiRequest, isReady,
|
|
2020
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1962
2021
|
return useQuery({
|
|
1963
|
-
queryKey: contactKeys.list(
|
|
2022
|
+
queryKey: contactKeys.list(workOSOrganizationId, filters),
|
|
1964
2023
|
queryFn: async () => {
|
|
1965
2024
|
const queryString = buildQueryString2({
|
|
1966
2025
|
listId: filters.listId,
|
|
@@ -1973,18 +2032,18 @@ function useContacts(filters = {}) {
|
|
|
1973
2032
|
});
|
|
1974
2033
|
return apiRequest(`/acquisition/contacts${queryString}`);
|
|
1975
2034
|
},
|
|
1976
|
-
enabled: isReady && !!
|
|
2035
|
+
enabled: isReady && !!workOSOrganizationId
|
|
1977
2036
|
});
|
|
1978
2037
|
}
|
|
1979
2038
|
function useContact(contactId) {
|
|
1980
|
-
const { apiRequest, isReady,
|
|
2039
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
1981
2040
|
return useQuery({
|
|
1982
|
-
queryKey: contactKeys.detail(
|
|
2041
|
+
queryKey: contactKeys.detail(workOSOrganizationId, contactId),
|
|
1983
2042
|
queryFn: async () => {
|
|
1984
2043
|
if (!contactId) return null;
|
|
1985
2044
|
return apiRequest(`/acquisition/contacts/${contactId}`);
|
|
1986
2045
|
},
|
|
1987
|
-
enabled: isReady && !!
|
|
2046
|
+
enabled: isReady && !!workOSOrganizationId && !!contactId
|
|
1988
2047
|
});
|
|
1989
2048
|
}
|
|
1990
2049
|
function useCreateContact() {
|
|
@@ -2056,9 +2115,9 @@ var leadGenArtifactKeys = {
|
|
|
2056
2115
|
list: (organizationId, ownerKind, ownerId) => [...leadGenArtifactKeys.all, organizationId, ownerKind, ownerId]
|
|
2057
2116
|
};
|
|
2058
2117
|
function useArtifacts({ ownerKind, ownerId }) {
|
|
2059
|
-
const { apiRequest, isReady,
|
|
2118
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
2060
2119
|
return useQuery({
|
|
2061
|
-
queryKey: leadGenArtifactKeys.list(
|
|
2120
|
+
queryKey: leadGenArtifactKeys.list(workOSOrganizationId, ownerKind, ownerId),
|
|
2062
2121
|
queryFn: () => apiRequest(
|
|
2063
2122
|
`/acquisition/artifacts?ownerKind=${encodeURIComponent(ownerKind)}&ownerId=${encodeURIComponent(ownerId)}`
|
|
2064
2123
|
),
|
|
@@ -2066,7 +2125,7 @@ function useArtifacts({ ownerKind, ownerId }) {
|
|
|
2066
2125
|
});
|
|
2067
2126
|
}
|
|
2068
2127
|
function useCreateArtifact() {
|
|
2069
|
-
const { apiRequest,
|
|
2128
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
2070
2129
|
const queryClient = useQueryClient();
|
|
2071
2130
|
return useMutation({
|
|
2072
2131
|
mutationFn: (body) => apiRequest("/acquisition/artifacts", {
|
|
@@ -2075,7 +2134,7 @@ function useCreateArtifact() {
|
|
|
2075
2134
|
}),
|
|
2076
2135
|
onSuccess: (_, variables) => {
|
|
2077
2136
|
queryClient.invalidateQueries({
|
|
2078
|
-
queryKey: leadGenArtifactKeys.list(
|
|
2137
|
+
queryKey: leadGenArtifactKeys.list(workOSOrganizationId, variables.ownerKind, variables.ownerId)
|
|
2079
2138
|
});
|
|
2080
2139
|
showSuccessNotification("Artifact created");
|
|
2081
2140
|
},
|
|
@@ -2090,23 +2149,23 @@ var leadGenListMemberKeys = {
|
|
|
2090
2149
|
detail: (organizationId, memberId) => [...leadGenListMemberKeys.all, organizationId, "detail", memberId]
|
|
2091
2150
|
};
|
|
2092
2151
|
function useListMembers({ listId }) {
|
|
2093
|
-
const { apiRequest, isReady,
|
|
2152
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
2094
2153
|
return useQuery({
|
|
2095
|
-
queryKey: leadGenListMemberKeys.list(
|
|
2154
|
+
queryKey: leadGenListMemberKeys.list(workOSOrganizationId, listId),
|
|
2096
2155
|
queryFn: () => apiRequest(`/acquisition/lists/${listId}/members`),
|
|
2097
2156
|
enabled: isReady && !!listId
|
|
2098
2157
|
});
|
|
2099
2158
|
}
|
|
2100
2159
|
function useListMember(memberId) {
|
|
2101
|
-
const { apiRequest, isReady,
|
|
2160
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
2102
2161
|
return useQuery({
|
|
2103
|
-
queryKey: leadGenListMemberKeys.detail(
|
|
2162
|
+
queryKey: leadGenListMemberKeys.detail(workOSOrganizationId, memberId),
|
|
2104
2163
|
queryFn: () => apiRequest(`/acquisition/list-members/${memberId}`),
|
|
2105
2164
|
enabled: isReady && !!memberId
|
|
2106
2165
|
});
|
|
2107
2166
|
}
|
|
2108
2167
|
function useTransitionListMember() {
|
|
2109
|
-
const { apiRequest,
|
|
2168
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
2110
2169
|
const queryClient = useQueryClient();
|
|
2111
2170
|
return useMutation({
|
|
2112
2171
|
mutationFn: async (input) => {
|
|
@@ -2123,9 +2182,11 @@ function useTransitionListMember() {
|
|
|
2123
2182
|
});
|
|
2124
2183
|
},
|
|
2125
2184
|
onSuccess: (_, variables) => {
|
|
2126
|
-
queryClient.invalidateQueries({
|
|
2185
|
+
queryClient.invalidateQueries({
|
|
2186
|
+
queryKey: leadGenListMemberKeys.detail(workOSOrganizationId, variables.memberId)
|
|
2187
|
+
});
|
|
2127
2188
|
if (variables.listId) {
|
|
2128
|
-
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(
|
|
2189
|
+
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(workOSOrganizationId, variables.listId) });
|
|
2129
2190
|
}
|
|
2130
2191
|
},
|
|
2131
2192
|
onError: (error) => {
|
|
@@ -2139,7 +2200,7 @@ var leadGenListCompanyKeys = {
|
|
|
2139
2200
|
detail: (organizationId, listCompanyId) => [...leadGenListCompanyKeys.all, organizationId, "detail", listCompanyId]
|
|
2140
2201
|
};
|
|
2141
2202
|
function useTransitionListCompany() {
|
|
2142
|
-
const { apiRequest,
|
|
2203
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
2143
2204
|
const queryClient = useQueryClient();
|
|
2144
2205
|
return useMutation({
|
|
2145
2206
|
mutationFn: async (input) => {
|
|
@@ -2157,11 +2218,11 @@ function useTransitionListCompany() {
|
|
|
2157
2218
|
},
|
|
2158
2219
|
onSuccess: (_, variables) => {
|
|
2159
2220
|
queryClient.invalidateQueries({
|
|
2160
|
-
queryKey: leadGenListCompanyKeys.detail(
|
|
2221
|
+
queryKey: leadGenListCompanyKeys.detail(workOSOrganizationId, variables.listCompanyId)
|
|
2161
2222
|
});
|
|
2162
2223
|
if (variables.listId) {
|
|
2163
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(
|
|
2164
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(
|
|
2224
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
|
|
2225
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, variables.listId) });
|
|
2165
2226
|
}
|
|
2166
2227
|
},
|
|
2167
2228
|
onError: (error) => {
|
|
@@ -2180,7 +2241,7 @@ function useDeriveActions(item) {
|
|
|
2180
2241
|
}, [item]);
|
|
2181
2242
|
}
|
|
2182
2243
|
function useUpdateListStatus() {
|
|
2183
|
-
const { apiRequest,
|
|
2244
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
2184
2245
|
const queryClient = useQueryClient();
|
|
2185
2246
|
return useMutation({
|
|
2186
2247
|
mutationFn: async (input) => {
|
|
@@ -2190,9 +2251,9 @@ function useUpdateListStatus() {
|
|
|
2190
2251
|
});
|
|
2191
2252
|
},
|
|
2192
2253
|
onSuccess: (_, variables) => {
|
|
2193
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(
|
|
2194
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(
|
|
2195
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(
|
|
2254
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(workOSOrganizationId) });
|
|
2255
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, variables.listId) });
|
|
2256
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
|
|
2196
2257
|
},
|
|
2197
2258
|
onError: (error) => {
|
|
2198
2259
|
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.all });
|
|
@@ -2205,9 +2266,9 @@ var projectActivityKeys = {
|
|
|
2205
2266
|
list: (projectId) => [...projectActivityKeys.all, "list", projectId]
|
|
2206
2267
|
};
|
|
2207
2268
|
function useProjectActivities(projectId, enabled = true) {
|
|
2208
|
-
const { apiRequest, isReady,
|
|
2269
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
2209
2270
|
return useQuery({
|
|
2210
|
-
queryKey: [...projectActivityKeys.list(projectId),
|
|
2271
|
+
queryKey: [...projectActivityKeys.list(projectId), workOSOrganizationId],
|
|
2211
2272
|
queryFn: async () => {
|
|
2212
2273
|
const params = new URLSearchParams();
|
|
2213
2274
|
params.set("entityType", "project");
|
|
@@ -2224,9 +2285,9 @@ function useProjectActivities(projectId, enabled = true) {
|
|
|
2224
2285
|
});
|
|
2225
2286
|
}
|
|
2226
2287
|
function useCommandViewData() {
|
|
2227
|
-
const { apiRequest,
|
|
2288
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
2228
2289
|
return useQuery({
|
|
2229
|
-
queryKey: ["command-view",
|
|
2290
|
+
queryKey: ["command-view", workOSOrganizationId],
|
|
2230
2291
|
queryFn: async () => {
|
|
2231
2292
|
return apiRequest("/command-view");
|
|
2232
2293
|
},
|
|
@@ -2235,9 +2296,9 @@ function useCommandViewData() {
|
|
|
2235
2296
|
});
|
|
2236
2297
|
}
|
|
2237
2298
|
function useCommandViewStats(timeRange = "30d", options) {
|
|
2238
|
-
const { apiRequest,
|
|
2299
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
2239
2300
|
return useQuery({
|
|
2240
|
-
queryKey: ["command-view-stats",
|
|
2301
|
+
queryKey: ["command-view-stats", workOSOrganizationId, timeRange],
|
|
2241
2302
|
queryFn: async () => {
|
|
2242
2303
|
return apiRequest(`/command-view/stats?timeRange=${timeRange}`);
|
|
2243
2304
|
},
|
|
@@ -2246,9 +2307,9 @@ function useCommandViewStats(timeRange = "30d", options) {
|
|
|
2246
2307
|
});
|
|
2247
2308
|
}
|
|
2248
2309
|
function useCheckpointTasks({ checkpointId, enabled = true }) {
|
|
2249
|
-
const { apiRequest,
|
|
2310
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
2250
2311
|
return useQuery({
|
|
2251
|
-
queryKey: ["checkpoint-tasks",
|
|
2312
|
+
queryKey: ["checkpoint-tasks", workOSOrganizationId, checkpointId],
|
|
2252
2313
|
queryFn: async () => {
|
|
2253
2314
|
return apiRequest(
|
|
2254
2315
|
`/command-queue?humanCheckpoint=${checkpointId}&status=pending&limit=10`
|
|
@@ -2266,9 +2327,9 @@ function useResourceExecutions({
|
|
|
2266
2327
|
limit = 10,
|
|
2267
2328
|
enabled = true
|
|
2268
2329
|
}) {
|
|
2269
|
-
const { apiRequest,
|
|
2330
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
2270
2331
|
return useQuery({
|
|
2271
|
-
queryKey: ["resource-executions",
|
|
2332
|
+
queryKey: ["resource-executions", workOSOrganizationId, resourceId, timeRange, page, limit],
|
|
2272
2333
|
queryFn: async () => {
|
|
2273
2334
|
return apiRequest(
|
|
2274
2335
|
`/command-view/resource-executions?resourceId=${resourceId}&timeRange=${timeRange}&page=${page}&limit=${limit}`
|
|
@@ -2634,7 +2695,7 @@ function useExecutionLogSSE(resourceId, manager, apiUrl) {
|
|
|
2634
2695
|
const queryClient = useQueryClient();
|
|
2635
2696
|
const [liveExecutions, setLiveExecutions] = useState(/* @__PURE__ */ new Set());
|
|
2636
2697
|
const [streamingLogs, setStreamingLogs] = useState(/* @__PURE__ */ new Map());
|
|
2637
|
-
const { isReady: isOrganizationReady,
|
|
2698
|
+
const { isReady: isOrganizationReady, workOSOrganizationId } = useElevasisServices();
|
|
2638
2699
|
const { currentMembership } = useOrganization();
|
|
2639
2700
|
const currentWorkOSOrganizationId = currentMembership?.organization?.workos_org_id;
|
|
2640
2701
|
const sseUrl = `${apiUrl}/api/execution-engine/sse/${resourceId}`;
|
|
@@ -2658,7 +2719,7 @@ function useExecutionLogSSE(resourceId, manager, apiUrl) {
|
|
|
2658
2719
|
return updated;
|
|
2659
2720
|
});
|
|
2660
2721
|
queryClient.invalidateQueries({
|
|
2661
|
-
queryKey: executionsKeys.executionsListBase(
|
|
2722
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, resourceId)
|
|
2662
2723
|
});
|
|
2663
2724
|
}
|
|
2664
2725
|
break;
|
|
@@ -2675,10 +2736,10 @@ function useExecutionLogSSE(resourceId, manager, apiUrl) {
|
|
|
2675
2736
|
return updated;
|
|
2676
2737
|
});
|
|
2677
2738
|
queryClient.invalidateQueries({
|
|
2678
|
-
queryKey: executionsKeys.executionsListBase(
|
|
2739
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, resourceId)
|
|
2679
2740
|
});
|
|
2680
2741
|
queryClient.invalidateQueries({
|
|
2681
|
-
queryKey: executionsKeys.execution(
|
|
2742
|
+
queryKey: executionsKeys.execution(workOSOrganizationId, resourceId, event.executionId)
|
|
2682
2743
|
});
|
|
2683
2744
|
}
|
|
2684
2745
|
break;
|
|
@@ -2693,7 +2754,7 @@ function useExecutionLogSSE(resourceId, manager, apiUrl) {
|
|
|
2693
2754
|
});
|
|
2694
2755
|
}
|
|
2695
2756
|
queryClient.invalidateQueries({
|
|
2696
|
-
queryKey: executionsKeys.execution(
|
|
2757
|
+
queryKey: executionsKeys.execution(workOSOrganizationId, resourceId, event.executionId)
|
|
2697
2758
|
});
|
|
2698
2759
|
}
|
|
2699
2760
|
break;
|
|
@@ -2701,13 +2762,13 @@ function useExecutionLogSSE(resourceId, manager, apiUrl) {
|
|
|
2701
2762
|
} catch {
|
|
2702
2763
|
}
|
|
2703
2764
|
},
|
|
2704
|
-
[
|
|
2765
|
+
[workOSOrganizationId, resourceId, queryClient]
|
|
2705
2766
|
);
|
|
2706
2767
|
const { connected, error } = useSSEConnection({
|
|
2707
2768
|
manager,
|
|
2708
2769
|
connectionKey: `resource-${resourceId}`,
|
|
2709
2770
|
url: sseUrl,
|
|
2710
|
-
enabled: !!resourceId && !!
|
|
2771
|
+
enabled: !!resourceId && !!workOSOrganizationId && isOrganizationReady,
|
|
2711
2772
|
headers,
|
|
2712
2773
|
onmessage: handleMessage,
|
|
2713
2774
|
onopen: (response) => response.status === 403 ? "Organization access denied" : void 0
|
|
@@ -2717,7 +2778,7 @@ function useExecutionLogSSE(resourceId, manager, apiUrl) {
|
|
|
2717
2778
|
setLiveExecutions(/* @__PURE__ */ new Set());
|
|
2718
2779
|
setStreamingLogs(/* @__PURE__ */ new Map());
|
|
2719
2780
|
};
|
|
2720
|
-
}, [resourceId,
|
|
2781
|
+
}, [resourceId, workOSOrganizationId, isOrganizationReady]);
|
|
2721
2782
|
return {
|
|
2722
2783
|
liveExecutions,
|
|
2723
2784
|
connected,
|
|
@@ -2739,7 +2800,7 @@ function useExecutionPanelState({
|
|
|
2739
2800
|
}) {
|
|
2740
2801
|
const queryClient = useQueryClient();
|
|
2741
2802
|
const navigate = useNavigate();
|
|
2742
|
-
const {
|
|
2803
|
+
const { workOSOrganizationId } = useElevasisServices();
|
|
2743
2804
|
const [resourceStatusFilter, setResourceStatusFilter] = useState("all");
|
|
2744
2805
|
const { data: executionsData, isLoading, isFetched } = useExecutions(resourceId, resourceStatusFilter, limit, offset);
|
|
2745
2806
|
const { liveExecutions, connected, runningCount, streamingLogs } = useExecutionLogSSE(resourceId, manager, apiUrl);
|
|
@@ -2774,12 +2835,12 @@ function useExecutionPanelState({
|
|
|
2774
2835
|
}
|
|
2775
2836
|
}, [resourceId, setSelectedId]);
|
|
2776
2837
|
useEffect(() => {
|
|
2777
|
-
if (
|
|
2838
|
+
if (workOSOrganizationId) {
|
|
2778
2839
|
queryClient.invalidateQueries({
|
|
2779
2840
|
queryKey: [...executionsKeys.all, "execution"]
|
|
2780
2841
|
});
|
|
2781
2842
|
}
|
|
2782
|
-
}, [resourceId, queryClient,
|
|
2843
|
+
}, [resourceId, queryClient, workOSOrganizationId]);
|
|
2783
2844
|
useEffect(() => {
|
|
2784
2845
|
const sortedExecutions = [...executions].sort((a, b) => b.startTime - a.startTime);
|
|
2785
2846
|
const newestExecution = sortedExecutions[0];
|
|
@@ -2918,9 +2979,9 @@ function useSortedData(data, defaultColumn, accessors, defaultDirection = "desc"
|
|
|
2918
2979
|
return { sorted, sort, toggleSort };
|
|
2919
2980
|
}
|
|
2920
2981
|
function useActivityTrend(params = {}) {
|
|
2921
|
-
const { apiRequest, isReady,
|
|
2982
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
2922
2983
|
return useQuery({
|
|
2923
|
-
queryKey: ["activities", "trend",
|
|
2984
|
+
queryKey: ["activities", "trend", workOSOrganizationId, params],
|
|
2924
2985
|
queryFn: async () => {
|
|
2925
2986
|
const queryParams = new URLSearchParams();
|
|
2926
2987
|
if (params.activityType) queryParams.set("activityType", params.activityType);
|
|
@@ -2942,9 +3003,9 @@ function useActivityTrend(params = {}) {
|
|
|
2942
3003
|
});
|
|
2943
3004
|
}
|
|
2944
3005
|
function useActivities(params = {}) {
|
|
2945
|
-
const { apiRequest, isReady,
|
|
3006
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
2946
3007
|
return useQuery({
|
|
2947
|
-
queryKey: ["activities", "list",
|
|
3008
|
+
queryKey: ["activities", "list", workOSOrganizationId, params],
|
|
2948
3009
|
queryFn: async () => {
|
|
2949
3010
|
const queryParams = new URLSearchParams();
|
|
2950
3011
|
if (params.limit) queryParams.set("limit", params.limit.toString());
|
|
@@ -2976,14 +3037,15 @@ function useActivities(params = {}) {
|
|
|
2976
3037
|
});
|
|
2977
3038
|
}
|
|
2978
3039
|
function useExecutionLogs(params = {}) {
|
|
2979
|
-
const { apiRequest, isReady,
|
|
3040
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
2980
3041
|
return useQuery({
|
|
2981
|
-
queryKey: ["monitoring", "execution-logs",
|
|
3042
|
+
queryKey: ["monitoring", "execution-logs", workOSOrganizationId, params],
|
|
2982
3043
|
queryFn: async () => {
|
|
2983
3044
|
const queryParams = new URLSearchParams();
|
|
2984
3045
|
if (params.resourceId) queryParams.set("resourceId", params.resourceId);
|
|
2985
3046
|
if (params.status && params.status !== "all") queryParams.set("status", params.status);
|
|
2986
|
-
if (params.resourceStatus && params.resourceStatus !== "all")
|
|
3047
|
+
if (params.resourceStatus && params.resourceStatus !== "all")
|
|
3048
|
+
queryParams.set("resourceStatus", params.resourceStatus);
|
|
2987
3049
|
if (params.startDate !== void 0) queryParams.set("startDate", params.startDate.toString());
|
|
2988
3050
|
if (params.endDate !== void 0) queryParams.set("endDate", params.endDate.toString());
|
|
2989
3051
|
if (params.limit !== void 0) queryParams.set("limit", params.limit.toString());
|
|
@@ -3000,9 +3062,9 @@ function useExecutionLogs(params = {}) {
|
|
|
3000
3062
|
});
|
|
3001
3063
|
}
|
|
3002
3064
|
function useNotifications({ limit = 20, offset = 0 } = {}) {
|
|
3003
|
-
const { apiRequest, isReady,
|
|
3065
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3004
3066
|
return useQuery({
|
|
3005
|
-
queryKey: ["notifications",
|
|
3067
|
+
queryKey: ["notifications", workOSOrganizationId, { limit, offset }],
|
|
3006
3068
|
queryFn: async () => {
|
|
3007
3069
|
const params = GetNotificationsQuerySchema.parse({ limit, offset });
|
|
3008
3070
|
const response = await apiRequest(
|
|
@@ -3014,14 +3076,12 @@ function useNotifications({ limit = 20, offset = 0 } = {}) {
|
|
|
3014
3076
|
});
|
|
3015
3077
|
}
|
|
3016
3078
|
function useCostSummary(timeRange) {
|
|
3017
|
-
const { apiRequest, isReady,
|
|
3079
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3018
3080
|
return useQuery({
|
|
3019
|
-
queryKey: ["cost-analytics", "cost-summary",
|
|
3081
|
+
queryKey: ["cost-analytics", "cost-summary", workOSOrganizationId, timeRange],
|
|
3020
3082
|
queryFn: async () => {
|
|
3021
3083
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3022
|
-
return apiRequest(
|
|
3023
|
-
`/observability/cost-summary?startDate=${startDate}&endDate=${endDate}`
|
|
3024
|
-
);
|
|
3084
|
+
return apiRequest(`/observability/cost-summary?startDate=${startDate}&endDate=${endDate}`);
|
|
3025
3085
|
},
|
|
3026
3086
|
enabled: isReady,
|
|
3027
3087
|
refetchInterval: 6e4
|
|
@@ -3029,14 +3089,12 @@ function useCostSummary(timeRange) {
|
|
|
3029
3089
|
});
|
|
3030
3090
|
}
|
|
3031
3091
|
function useExecutionHealth({ timeRange }) {
|
|
3032
|
-
const { apiRequest, isReady,
|
|
3092
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3033
3093
|
return useQuery({
|
|
3034
|
-
queryKey: ["monitoring", "execution-health",
|
|
3094
|
+
queryKey: ["monitoring", "execution-health", workOSOrganizationId, timeRange],
|
|
3035
3095
|
queryFn: async () => {
|
|
3036
3096
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3037
|
-
return apiRequest(
|
|
3038
|
-
`/observability/dashboard?startDate=${startDate}&endDate=${endDate}`
|
|
3039
|
-
);
|
|
3097
|
+
return apiRequest(`/observability/dashboard?startDate=${startDate}&endDate=${endDate}`);
|
|
3040
3098
|
},
|
|
3041
3099
|
enabled: isReady,
|
|
3042
3100
|
refetchInterval: 6e4,
|
|
@@ -3047,9 +3105,9 @@ function useExecutionHealth({ timeRange }) {
|
|
|
3047
3105
|
}
|
|
3048
3106
|
function useNotificationCount(args) {
|
|
3049
3107
|
const { notificationCount, notificationConnected, notificationError } = args;
|
|
3050
|
-
const { apiRequest, isReady,
|
|
3108
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3051
3109
|
const query = useQuery({
|
|
3052
|
-
queryKey: ["notifications", "unread-count",
|
|
3110
|
+
queryKey: ["notifications", "unread-count", workOSOrganizationId],
|
|
3053
3111
|
queryFn: async () => {
|
|
3054
3112
|
const response = await apiRequest("/notifications/unread-count");
|
|
3055
3113
|
return response.count;
|
|
@@ -3260,9 +3318,9 @@ function useCreateWebhookEndpoint() {
|
|
|
3260
3318
|
});
|
|
3261
3319
|
}
|
|
3262
3320
|
function useListWebhookEndpoints() {
|
|
3263
|
-
const { apiRequest,
|
|
3321
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
3264
3322
|
return useQuery({
|
|
3265
|
-
queryKey: ["webhook-endpoints",
|
|
3323
|
+
queryKey: ["webhook-endpoints", workOSOrganizationId],
|
|
3266
3324
|
queryFn: async () => {
|
|
3267
3325
|
const service = new WebhookEndpointService(apiRequest);
|
|
3268
3326
|
return await service.listEndpoints();
|
|
@@ -3271,8 +3329,8 @@ function useListWebhookEndpoints() {
|
|
|
3271
3329
|
});
|
|
3272
3330
|
}
|
|
3273
3331
|
function useOrgRoles(orgId) {
|
|
3274
|
-
const { apiRequest,
|
|
3275
|
-
const targetOrgId = orgId ??
|
|
3332
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
3333
|
+
const targetOrgId = orgId ?? workOSOrganizationId;
|
|
3276
3334
|
return useQuery({
|
|
3277
3335
|
queryKey: ["org-roles", targetOrgId],
|
|
3278
3336
|
queryFn: () => apiRequest(`/organizations/${targetOrgId}/roles`),
|
|
@@ -3281,33 +3339,33 @@ function useOrgRoles(orgId) {
|
|
|
3281
3339
|
});
|
|
3282
3340
|
}
|
|
3283
3341
|
function useUpdateOrgRole() {
|
|
3284
|
-
const { apiRequest,
|
|
3342
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3285
3343
|
const queryClient = useQueryClient();
|
|
3286
3344
|
return useMutation({
|
|
3287
|
-
mutationFn: ({ roleId, input }) => apiRequest(`/organizations/${
|
|
3345
|
+
mutationFn: ({ roleId, input }) => apiRequest(`/organizations/${workOSOrganizationId}/roles/${roleId}`, {
|
|
3288
3346
|
method: "PATCH",
|
|
3289
3347
|
body: JSON.stringify(input)
|
|
3290
3348
|
}),
|
|
3291
3349
|
onSettled: (_data, _error, { roleId }) => {
|
|
3292
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles",
|
|
3293
|
-
queryClient.invalidateQueries({ queryKey: ["org-role",
|
|
3350
|
+
queryClient.invalidateQueries({ queryKey: ["org-roles", workOSOrganizationId] });
|
|
3351
|
+
queryClient.invalidateQueries({ queryKey: ["org-role", workOSOrganizationId, roleId] });
|
|
3294
3352
|
}
|
|
3295
3353
|
});
|
|
3296
3354
|
}
|
|
3297
3355
|
function useDeleteOrgRole() {
|
|
3298
|
-
const { apiRequest,
|
|
3356
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3299
3357
|
const queryClient = useQueryClient();
|
|
3300
3358
|
return useMutation({
|
|
3301
|
-
mutationFn: (roleId) => apiRequest(`/organizations/${
|
|
3359
|
+
mutationFn: (roleId) => apiRequest(`/organizations/${workOSOrganizationId}/roles/${roleId}`, {
|
|
3302
3360
|
method: "DELETE"
|
|
3303
3361
|
}),
|
|
3304
3362
|
onSettled: () => {
|
|
3305
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles",
|
|
3363
|
+
queryClient.invalidateQueries({ queryKey: ["org-roles", workOSOrganizationId] });
|
|
3306
3364
|
}
|
|
3307
3365
|
});
|
|
3308
3366
|
}
|
|
3309
3367
|
function useAssignRole() {
|
|
3310
|
-
const { apiRequest,
|
|
3368
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3311
3369
|
const queryClient = useQueryClient();
|
|
3312
3370
|
return useMutation({
|
|
3313
3371
|
mutationFn: ({ membershipId, roleId }) => apiRequest(`/memberships/${membershipId}/roles`, {
|
|
@@ -3315,30 +3373,30 @@ function useAssignRole() {
|
|
|
3315
3373
|
body: JSON.stringify({ roleId })
|
|
3316
3374
|
}),
|
|
3317
3375
|
onSettled: (_data, _error, { membershipId }) => {
|
|
3318
|
-
queryClient.invalidateQueries({ queryKey: ["member-roles",
|
|
3319
|
-
queryClient.invalidateQueries({ queryKey: ["organization-permissions",
|
|
3320
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles",
|
|
3376
|
+
queryClient.invalidateQueries({ queryKey: ["member-roles", workOSOrganizationId, membershipId] });
|
|
3377
|
+
queryClient.invalidateQueries({ queryKey: ["organization-permissions", workOSOrganizationId] });
|
|
3378
|
+
queryClient.invalidateQueries({ queryKey: ["org-roles", workOSOrganizationId] });
|
|
3321
3379
|
}
|
|
3322
3380
|
});
|
|
3323
3381
|
}
|
|
3324
3382
|
function useRevokeRole() {
|
|
3325
|
-
const { apiRequest,
|
|
3383
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3326
3384
|
const queryClient = useQueryClient();
|
|
3327
3385
|
return useMutation({
|
|
3328
3386
|
mutationFn: ({ membershipId, roleId }) => apiRequest(`/memberships/${membershipId}/roles/${roleId}`, {
|
|
3329
3387
|
method: "DELETE"
|
|
3330
3388
|
}),
|
|
3331
3389
|
onSettled: (_data, _error, { membershipId }) => {
|
|
3332
|
-
queryClient.invalidateQueries({ queryKey: ["member-roles",
|
|
3333
|
-
queryClient.invalidateQueries({ queryKey: ["organization-permissions",
|
|
3334
|
-
queryClient.invalidateQueries({ queryKey: ["org-roles",
|
|
3390
|
+
queryClient.invalidateQueries({ queryKey: ["member-roles", workOSOrganizationId, membershipId] });
|
|
3391
|
+
queryClient.invalidateQueries({ queryKey: ["organization-permissions", workOSOrganizationId] });
|
|
3392
|
+
queryClient.invalidateQueries({ queryKey: ["org-roles", workOSOrganizationId] });
|
|
3335
3393
|
}
|
|
3336
3394
|
});
|
|
3337
3395
|
}
|
|
3338
3396
|
function useEffectivePermissions(membershipId) {
|
|
3339
|
-
const { apiRequest,
|
|
3397
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
3340
3398
|
return useQuery({
|
|
3341
|
-
queryKey: ["member-roles",
|
|
3399
|
+
queryKey: ["member-roles", workOSOrganizationId, membershipId],
|
|
3342
3400
|
queryFn: () => apiRequest(`/memberships/${membershipId}/effective-permissions`),
|
|
3343
3401
|
enabled: isReady && !!membershipId,
|
|
3344
3402
|
staleTime: STALE_TIME_DEFAULT
|
|
@@ -3352,44 +3410,78 @@ var acquisitionListKeys = {
|
|
|
3352
3410
|
detail: (organizationId, listId) => [...acquisitionListKeys.all, organizationId, listId],
|
|
3353
3411
|
telemetry: (organizationId) => [...acquisitionListKeys.all, "telemetry", organizationId],
|
|
3354
3412
|
progress: (organizationId, listId) => [...acquisitionListKeys.all, "progress", organizationId, listId],
|
|
3355
|
-
|
|
3413
|
+
records: (organizationId, listId, filters) => [
|
|
3414
|
+
...acquisitionListKeys.all,
|
|
3415
|
+
"records",
|
|
3416
|
+
organizationId,
|
|
3417
|
+
listId,
|
|
3418
|
+
filters.entity,
|
|
3419
|
+
filters.stage ?? null,
|
|
3420
|
+
filters.limit ?? null,
|
|
3421
|
+
filters.offset ?? null
|
|
3422
|
+
],
|
|
3423
|
+
executions: (organizationId, listId, filters) => [
|
|
3424
|
+
...acquisitionListKeys.all,
|
|
3425
|
+
"executions",
|
|
3426
|
+
organizationId,
|
|
3427
|
+
listId,
|
|
3428
|
+
filters?.resourceId ?? null,
|
|
3429
|
+
filters?.limit ?? null
|
|
3430
|
+
]
|
|
3356
3431
|
};
|
|
3357
3432
|
function useLists() {
|
|
3358
|
-
const { apiRequest, isReady,
|
|
3433
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3359
3434
|
return useQuery({
|
|
3360
|
-
queryKey: acquisitionListKeys.list(
|
|
3435
|
+
queryKey: acquisitionListKeys.list(workOSOrganizationId),
|
|
3361
3436
|
queryFn: () => apiRequest("/acquisition/lists"),
|
|
3362
3437
|
enabled: isReady
|
|
3363
3438
|
});
|
|
3364
3439
|
}
|
|
3365
3440
|
function useList(listId) {
|
|
3366
|
-
const { apiRequest, isReady,
|
|
3441
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3367
3442
|
return useQuery({
|
|
3368
|
-
queryKey: acquisitionListKeys.detail(
|
|
3443
|
+
queryKey: acquisitionListKeys.detail(workOSOrganizationId, listId),
|
|
3369
3444
|
queryFn: () => apiRequest(`/acquisition/lists/${listId}`),
|
|
3370
3445
|
enabled: isReady && !!listId
|
|
3371
3446
|
});
|
|
3372
3447
|
}
|
|
3373
3448
|
function useListsTelemetry() {
|
|
3374
|
-
const { apiRequest, isReady,
|
|
3449
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3375
3450
|
return useQuery({
|
|
3376
|
-
queryKey: acquisitionListKeys.telemetry(
|
|
3451
|
+
queryKey: acquisitionListKeys.telemetry(workOSOrganizationId),
|
|
3377
3452
|
queryFn: () => apiRequest("/acquisition/lists/telemetry"),
|
|
3378
3453
|
enabled: isReady
|
|
3379
3454
|
});
|
|
3380
3455
|
}
|
|
3381
|
-
function useListProgress(listId) {
|
|
3382
|
-
const { apiRequest, isReady,
|
|
3456
|
+
function useListProgress(listId, options = {}) {
|
|
3457
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3383
3458
|
return useQuery({
|
|
3384
|
-
queryKey: acquisitionListKeys.progress(
|
|
3459
|
+
queryKey: acquisitionListKeys.progress(workOSOrganizationId, listId),
|
|
3385
3460
|
queryFn: () => apiRequest(`/acquisition/lists/${listId}/progress`),
|
|
3386
|
-
enabled: isReady && !!listId
|
|
3461
|
+
enabled: isReady && !!listId && (options.enabled ?? true),
|
|
3462
|
+
refetchInterval: options.refetchInterval
|
|
3463
|
+
});
|
|
3464
|
+
}
|
|
3465
|
+
function useListRecords(listId, filters) {
|
|
3466
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3467
|
+
return useQuery({
|
|
3468
|
+
queryKey: acquisitionListKeys.records(workOSOrganizationId, listId, filters),
|
|
3469
|
+
queryFn: () => {
|
|
3470
|
+
const params = new URLSearchParams({
|
|
3471
|
+
entity: filters.entity,
|
|
3472
|
+
limit: String(filters.limit ?? 50),
|
|
3473
|
+
offset: String(filters.offset ?? 0)
|
|
3474
|
+
});
|
|
3475
|
+
if (filters.stage) params.set("stage", filters.stage);
|
|
3476
|
+
return apiRequest(`/acquisition/lists/${listId}/records?${params.toString()}`);
|
|
3477
|
+
},
|
|
3478
|
+
enabled: isReady && !!listId && !!filters.entity
|
|
3387
3479
|
});
|
|
3388
3480
|
}
|
|
3389
3481
|
function useListExecutions(listId, filters = {}) {
|
|
3390
|
-
const { apiRequest, isReady,
|
|
3482
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3391
3483
|
return useQuery({
|
|
3392
|
-
queryKey: acquisitionListKeys.executions(
|
|
3484
|
+
queryKey: acquisitionListKeys.executions(workOSOrganizationId, listId, filters),
|
|
3393
3485
|
queryFn: async () => {
|
|
3394
3486
|
const executions = await apiRequest(`/acquisition/lists/${listId}/executions`);
|
|
3395
3487
|
const filteredExecutions = filters.resourceId ? executions.filter((execution) => execution.resourceId === filters.resourceId) : executions;
|
|
@@ -3399,7 +3491,7 @@ function useListExecutions(listId, filters = {}) {
|
|
|
3399
3491
|
});
|
|
3400
3492
|
}
|
|
3401
3493
|
function useCreateList() {
|
|
3402
|
-
const { apiRequest,
|
|
3494
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3403
3495
|
const queryClient = useQueryClient();
|
|
3404
3496
|
return useMutation({
|
|
3405
3497
|
mutationFn: (body) => apiRequest("/acquisition/lists", {
|
|
@@ -3407,8 +3499,8 @@ function useCreateList() {
|
|
|
3407
3499
|
body: JSON.stringify(body)
|
|
3408
3500
|
}),
|
|
3409
3501
|
onSuccess: () => {
|
|
3410
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(
|
|
3411
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(
|
|
3502
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(workOSOrganizationId) });
|
|
3503
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
|
|
3412
3504
|
showSuccessNotification("List created");
|
|
3413
3505
|
},
|
|
3414
3506
|
onError: (error) => {
|
|
@@ -3417,7 +3509,7 @@ function useCreateList() {
|
|
|
3417
3509
|
});
|
|
3418
3510
|
}
|
|
3419
3511
|
function useUpdateList(listId) {
|
|
3420
|
-
const { apiRequest,
|
|
3512
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3421
3513
|
const queryClient = useQueryClient();
|
|
3422
3514
|
return useMutation({
|
|
3423
3515
|
mutationFn: (body) => apiRequest(`/acquisition/lists/${listId}`, {
|
|
@@ -3425,9 +3517,9 @@ function useUpdateList(listId) {
|
|
|
3425
3517
|
body: JSON.stringify(body)
|
|
3426
3518
|
}),
|
|
3427
3519
|
onSuccess: () => {
|
|
3428
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(
|
|
3429
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(
|
|
3430
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(
|
|
3520
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(workOSOrganizationId) });
|
|
3521
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, listId) });
|
|
3522
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
|
|
3431
3523
|
showSuccessNotification("List updated");
|
|
3432
3524
|
},
|
|
3433
3525
|
onError: (error) => {
|
|
@@ -3436,7 +3528,7 @@ function useUpdateList(listId) {
|
|
|
3436
3528
|
});
|
|
3437
3529
|
}
|
|
3438
3530
|
function useUpdateListConfig(listId) {
|
|
3439
|
-
const { apiRequest,
|
|
3531
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3440
3532
|
const queryClient = useQueryClient();
|
|
3441
3533
|
return useMutation({
|
|
3442
3534
|
mutationFn: (body) => apiRequest(`/acquisition/lists/${listId}/config`, {
|
|
@@ -3444,8 +3536,8 @@ function useUpdateListConfig(listId) {
|
|
|
3444
3536
|
body: JSON.stringify(body)
|
|
3445
3537
|
}),
|
|
3446
3538
|
onSuccess: () => {
|
|
3447
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(
|
|
3448
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(
|
|
3539
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(workOSOrganizationId) });
|
|
3540
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, listId) });
|
|
3449
3541
|
showSuccessNotification("List configuration saved");
|
|
3450
3542
|
},
|
|
3451
3543
|
onError: (error) => {
|
|
@@ -3454,15 +3546,15 @@ function useUpdateListConfig(listId) {
|
|
|
3454
3546
|
});
|
|
3455
3547
|
}
|
|
3456
3548
|
function useDeleteList() {
|
|
3457
|
-
const { apiRequest,
|
|
3549
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3458
3550
|
const queryClient = useQueryClient();
|
|
3459
3551
|
return useMutation({
|
|
3460
3552
|
mutationFn: (listId) => apiRequest(`/acquisition/lists/${listId}`, {
|
|
3461
3553
|
method: "DELETE"
|
|
3462
3554
|
}),
|
|
3463
3555
|
onSuccess: () => {
|
|
3464
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(
|
|
3465
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(
|
|
3556
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.list(workOSOrganizationId) });
|
|
3557
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.telemetry(workOSOrganizationId) });
|
|
3466
3558
|
showSuccessNotification("List deleted");
|
|
3467
3559
|
},
|
|
3468
3560
|
onError: (error) => {
|
|
@@ -3472,13 +3564,10 @@ function useDeleteList() {
|
|
|
3472
3564
|
}
|
|
3473
3565
|
|
|
3474
3566
|
// src/hooks/executions/useWorkflowExecution.ts
|
|
3475
|
-
function useWorkflowExecution({
|
|
3476
|
-
workflowId,
|
|
3477
|
-
listId
|
|
3478
|
-
}) {
|
|
3567
|
+
function useWorkflowExecution({ workflowId, listId }) {
|
|
3479
3568
|
const mutation = useExecuteAsync();
|
|
3480
3569
|
const queryClient = useQueryClient();
|
|
3481
|
-
const {
|
|
3570
|
+
const { workOSOrganizationId } = useElevasisServices();
|
|
3482
3571
|
const execute = useCallback(
|
|
3483
3572
|
async ({ input }) => {
|
|
3484
3573
|
const result = await mutation.mutateAsync({
|
|
@@ -3487,16 +3576,16 @@ function useWorkflowExecution({
|
|
|
3487
3576
|
input
|
|
3488
3577
|
});
|
|
3489
3578
|
queryClient.invalidateQueries({
|
|
3490
|
-
queryKey: executionsKeys.executionsListBase(
|
|
3579
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, workflowId)
|
|
3491
3580
|
});
|
|
3492
3581
|
if (listId) {
|
|
3493
3582
|
queryClient.invalidateQueries({
|
|
3494
|
-
queryKey: acquisitionListKeys.executions(
|
|
3583
|
+
queryKey: acquisitionListKeys.executions(workOSOrganizationId, listId)
|
|
3495
3584
|
});
|
|
3496
3585
|
}
|
|
3497
3586
|
return result;
|
|
3498
3587
|
},
|
|
3499
|
-
[listId, mutation,
|
|
3588
|
+
[listId, mutation, workOSOrganizationId, queryClient, workflowId]
|
|
3500
3589
|
);
|
|
3501
3590
|
return {
|
|
3502
3591
|
execute,
|
|
@@ -3524,21 +3613,15 @@ function useExecutionSSE(resourceId, options = {}) {
|
|
|
3524
3613
|
const queryClient = useQueryClient();
|
|
3525
3614
|
const features = useOptionalElevasisFeatures();
|
|
3526
3615
|
const { currentMembership } = useOrganization();
|
|
3527
|
-
const { isReady,
|
|
3528
|
-
const {
|
|
3529
|
-
enabled = true,
|
|
3530
|
-
apiUrl: apiUrlOverride,
|
|
3531
|
-
manager: managerOverride,
|
|
3532
|
-
listId,
|
|
3533
|
-
onEvent
|
|
3534
|
-
} = options;
|
|
3616
|
+
const { isReady, workOSOrganizationId: serviceWorkOSOrganizationId } = useElevasisServices();
|
|
3617
|
+
const { enabled = true, apiUrl: apiUrlOverride, manager: managerOverride, listId, onEvent } = options;
|
|
3535
3618
|
const [events, setEvents] = useState([]);
|
|
3536
3619
|
const [liveExecutions, setLiveExecutions] = useState(/* @__PURE__ */ new Set());
|
|
3537
3620
|
const [streamingLogs, setStreamingLogs] = useState(/* @__PURE__ */ new Map());
|
|
3538
3621
|
const disabledManager = useMemo(() => createDisabledManager(), []);
|
|
3539
3622
|
const apiUrl = apiUrlOverride ?? features?.operationsApiUrl;
|
|
3540
3623
|
const manager = managerOverride ?? features?.operationsSSEManager ?? disabledManager;
|
|
3541
|
-
const workOSOrganizationId = currentMembership?.organization?.workos_org_id ??
|
|
3624
|
+
const workOSOrganizationId = currentMembership?.organization?.workos_org_id ?? serviceWorkOSOrganizationId;
|
|
3542
3625
|
const connectionKey = `execution-sse-${workOSOrganizationId ?? "unknown"}-${resourceId}`;
|
|
3543
3626
|
const headers = useMemo(() => {
|
|
3544
3627
|
if (!workOSOrganizationId) return {};
|
|
@@ -3565,7 +3648,7 @@ function useExecutionSSE(resourceId, options = {}) {
|
|
|
3565
3648
|
return next;
|
|
3566
3649
|
});
|
|
3567
3650
|
queryClient.invalidateQueries({
|
|
3568
|
-
queryKey: executionsKeys.executionsListBase(
|
|
3651
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, resourceId)
|
|
3569
3652
|
});
|
|
3570
3653
|
break;
|
|
3571
3654
|
case "execution-complete":
|
|
@@ -3580,17 +3663,17 @@ function useExecutionSSE(resourceId, options = {}) {
|
|
|
3580
3663
|
return next;
|
|
3581
3664
|
});
|
|
3582
3665
|
queryClient.invalidateQueries({
|
|
3583
|
-
queryKey: executionsKeys.executionsListBase(
|
|
3666
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, resourceId)
|
|
3584
3667
|
});
|
|
3585
3668
|
queryClient.invalidateQueries({
|
|
3586
|
-
queryKey: executionsKeys.execution(
|
|
3669
|
+
queryKey: executionsKeys.execution(workOSOrganizationId, resourceId, event.executionId)
|
|
3587
3670
|
});
|
|
3588
3671
|
if (listId) {
|
|
3589
3672
|
queryClient.invalidateQueries({
|
|
3590
|
-
queryKey: acquisitionListKeys.executions(
|
|
3673
|
+
queryKey: acquisitionListKeys.executions(workOSOrganizationId, listId)
|
|
3591
3674
|
});
|
|
3592
3675
|
queryClient.invalidateQueries({
|
|
3593
|
-
queryKey: acquisitionListKeys.progress(
|
|
3676
|
+
queryKey: acquisitionListKeys.progress(workOSOrganizationId, listId)
|
|
3594
3677
|
});
|
|
3595
3678
|
}
|
|
3596
3679
|
break;
|
|
@@ -3602,7 +3685,7 @@ function useExecutionSSE(resourceId, options = {}) {
|
|
|
3602
3685
|
return next;
|
|
3603
3686
|
});
|
|
3604
3687
|
queryClient.invalidateQueries({
|
|
3605
|
-
queryKey: executionsKeys.execution(
|
|
3688
|
+
queryKey: executionsKeys.execution(workOSOrganizationId, resourceId, event.executionId)
|
|
3606
3689
|
});
|
|
3607
3690
|
break;
|
|
3608
3691
|
case "connected":
|
|
@@ -3611,7 +3694,7 @@ function useExecutionSSE(resourceId, options = {}) {
|
|
|
3611
3694
|
} catch {
|
|
3612
3695
|
}
|
|
3613
3696
|
},
|
|
3614
|
-
[listId, onEvent,
|
|
3697
|
+
[listId, onEvent, workOSOrganizationId, queryClient, resourceId]
|
|
3615
3698
|
);
|
|
3616
3699
|
const { connected, error } = useSSEConnection({
|
|
3617
3700
|
manager,
|
|
@@ -3636,7 +3719,7 @@ function useExecutionSSE(resourceId, options = {}) {
|
|
|
3636
3719
|
};
|
|
3637
3720
|
}
|
|
3638
3721
|
function useRetryExecution() {
|
|
3639
|
-
const { apiRequest,
|
|
3722
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3640
3723
|
const queryClient = useQueryClient();
|
|
3641
3724
|
return useMutation({
|
|
3642
3725
|
mutationFn: async ({ resourceId, resourceType, input }) => {
|
|
@@ -3648,13 +3731,13 @@ function useRetryExecution() {
|
|
|
3648
3731
|
},
|
|
3649
3732
|
onSuccess: (data) => {
|
|
3650
3733
|
queryClient.invalidateQueries({
|
|
3651
|
-
queryKey: executionsKeys.executionsListBase(
|
|
3734
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, data.resourceId)
|
|
3652
3735
|
});
|
|
3653
3736
|
}
|
|
3654
3737
|
});
|
|
3655
3738
|
}
|
|
3656
3739
|
function useCancelExecution() {
|
|
3657
|
-
const { apiRequest,
|
|
3740
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3658
3741
|
const queryClient = useQueryClient();
|
|
3659
3742
|
return useMutation({
|
|
3660
3743
|
mutationFn: async ({ resourceId, executionId }) => {
|
|
@@ -3666,16 +3749,16 @@ function useCancelExecution() {
|
|
|
3666
3749
|
},
|
|
3667
3750
|
onSuccess: (data) => {
|
|
3668
3751
|
queryClient.invalidateQueries({
|
|
3669
|
-
queryKey: executionsKeys.execution(
|
|
3752
|
+
queryKey: executionsKeys.execution(workOSOrganizationId, data.resourceId, data.executionId)
|
|
3670
3753
|
});
|
|
3671
3754
|
queryClient.invalidateQueries({
|
|
3672
|
-
queryKey: executionsKeys.executionsListBase(
|
|
3755
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, data.resourceId)
|
|
3673
3756
|
});
|
|
3674
3757
|
}
|
|
3675
3758
|
});
|
|
3676
3759
|
}
|
|
3677
3760
|
function useDeleteExecution() {
|
|
3678
|
-
const { apiRequest,
|
|
3761
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3679
3762
|
const queryClient = useQueryClient();
|
|
3680
3763
|
return useMutation({
|
|
3681
3764
|
mutationFn: async ({ resourceId, executionId }) => {
|
|
@@ -3686,16 +3769,16 @@ function useDeleteExecution() {
|
|
|
3686
3769
|
},
|
|
3687
3770
|
onSuccess: (data) => {
|
|
3688
3771
|
queryClient.removeQueries({
|
|
3689
|
-
queryKey: executionsKeys.execution(
|
|
3772
|
+
queryKey: executionsKeys.execution(workOSOrganizationId, data.resourceId, data.executionId)
|
|
3690
3773
|
});
|
|
3691
3774
|
queryClient.invalidateQueries({
|
|
3692
|
-
queryKey: executionsKeys.executionsListBase(
|
|
3775
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, data.resourceId)
|
|
3693
3776
|
});
|
|
3694
3777
|
}
|
|
3695
3778
|
});
|
|
3696
3779
|
}
|
|
3697
3780
|
function useBulkDeleteExecutions() {
|
|
3698
|
-
const { apiRequest,
|
|
3781
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
3699
3782
|
const queryClient = useQueryClient();
|
|
3700
3783
|
return useMutation({
|
|
3701
3784
|
mutationFn: async ({
|
|
@@ -3716,15 +3799,15 @@ function useBulkDeleteExecutions() {
|
|
|
3716
3799
|
},
|
|
3717
3800
|
onSuccess: (data) => {
|
|
3718
3801
|
queryClient.invalidateQueries({
|
|
3719
|
-
queryKey: executionsKeys.executionsListBase(
|
|
3802
|
+
queryKey: executionsKeys.executionsListBase(workOSOrganizationId, data.resourceId)
|
|
3720
3803
|
});
|
|
3721
3804
|
}
|
|
3722
3805
|
});
|
|
3723
3806
|
}
|
|
3724
3807
|
function useResourceDefinition(resourceId, enabled = true) {
|
|
3725
|
-
const { apiRequest,
|
|
3808
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
3726
3809
|
return useQuery({
|
|
3727
|
-
queryKey: executionsKeys.resourceDefinition(
|
|
3810
|
+
queryKey: executionsKeys.resourceDefinition(workOSOrganizationId, resourceId),
|
|
3728
3811
|
queryFn: () => {
|
|
3729
3812
|
const service = new OperationsService(apiRequest);
|
|
3730
3813
|
return service.getResourceDefinition(resourceId);
|
|
@@ -3781,9 +3864,9 @@ function useActivitiesRealtime(organizationId, enabled) {
|
|
|
3781
3864
|
}, [organizationId, enabled, queryClient, supabase]);
|
|
3782
3865
|
}
|
|
3783
3866
|
function useErrorAnalysis(timeRange) {
|
|
3784
|
-
const { apiRequest, isReady,
|
|
3867
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3785
3868
|
return useQuery({
|
|
3786
|
-
queryKey: observabilityKeys.errorAnalysis(
|
|
3869
|
+
queryKey: observabilityKeys.errorAnalysis(workOSOrganizationId, timeRange),
|
|
3787
3870
|
queryFn: async () => {
|
|
3788
3871
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3789
3872
|
return apiRequest(`/observability/error-analysis?startDate=${startDate}&endDate=${endDate}`);
|
|
@@ -3793,9 +3876,9 @@ function useErrorAnalysis(timeRange) {
|
|
|
3793
3876
|
});
|
|
3794
3877
|
}
|
|
3795
3878
|
function useErrorDistribution({ startDate, endDate, groupBy }) {
|
|
3796
|
-
const { apiRequest, isReady,
|
|
3879
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3797
3880
|
return useQuery({
|
|
3798
|
-
queryKey: observabilityKeys.errorDistribution(
|
|
3881
|
+
queryKey: observabilityKeys.errorDistribution(workOSOrganizationId, startDate, endDate, groupBy),
|
|
3799
3882
|
queryFn: async () => {
|
|
3800
3883
|
const params = new URLSearchParams({ startDate, endDate, groupBy });
|
|
3801
3884
|
return apiRequest(`/observability/error-analytics/distribution?${params.toString()}`);
|
|
@@ -3806,9 +3889,9 @@ function useErrorDistribution({ startDate, endDate, groupBy }) {
|
|
|
3806
3889
|
});
|
|
3807
3890
|
}
|
|
3808
3891
|
function useTopFailingResources({ startDate, endDate, limit = 10 }) {
|
|
3809
|
-
const { apiRequest, isReady,
|
|
3892
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3810
3893
|
return useQuery({
|
|
3811
|
-
queryKey: observabilityKeys.topFailingResources(
|
|
3894
|
+
queryKey: observabilityKeys.topFailingResources(workOSOrganizationId, startDate, endDate, limit),
|
|
3812
3895
|
queryFn: async () => {
|
|
3813
3896
|
const params = new URLSearchParams({ startDate, endDate, limit: String(limit) });
|
|
3814
3897
|
return apiRequest(`/observability/error-analytics/top-resources?${params.toString()}`);
|
|
@@ -3823,9 +3906,9 @@ function getGranularityFromTimeRange(timeRange) {
|
|
|
3823
3906
|
}
|
|
3824
3907
|
function useCostTrends(timeRange, granularity) {
|
|
3825
3908
|
const resolvedGranularity = granularity ?? getGranularityFromTimeRange(timeRange);
|
|
3826
|
-
const { apiRequest, isReady,
|
|
3909
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3827
3910
|
return useQuery({
|
|
3828
|
-
queryKey: observabilityKeys.costTrends(
|
|
3911
|
+
queryKey: observabilityKeys.costTrends(workOSOrganizationId, timeRange, resolvedGranularity),
|
|
3829
3912
|
queryFn: async () => {
|
|
3830
3913
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3831
3914
|
const params = new URLSearchParams({ startDate, endDate, granularity: resolvedGranularity });
|
|
@@ -3836,9 +3919,9 @@ function useCostTrends(timeRange, granularity) {
|
|
|
3836
3919
|
});
|
|
3837
3920
|
}
|
|
3838
3921
|
function useCostByModel(timeRange) {
|
|
3839
|
-
const { apiRequest, isReady,
|
|
3922
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3840
3923
|
return useQuery({
|
|
3841
|
-
queryKey: observabilityKeys.costByModel(
|
|
3924
|
+
queryKey: observabilityKeys.costByModel(workOSOrganizationId, timeRange),
|
|
3842
3925
|
queryFn: async () => {
|
|
3843
3926
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3844
3927
|
const params = new URLSearchParams({ startDate, endDate });
|
|
@@ -3849,9 +3932,9 @@ function useCostByModel(timeRange) {
|
|
|
3849
3932
|
});
|
|
3850
3933
|
}
|
|
3851
3934
|
function useCostBreakdown(timeRange) {
|
|
3852
|
-
const { apiRequest, isReady,
|
|
3935
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3853
3936
|
return useQuery({
|
|
3854
|
-
queryKey: observabilityKeys.costBreakdown(
|
|
3937
|
+
queryKey: observabilityKeys.costBreakdown(workOSOrganizationId, timeRange),
|
|
3855
3938
|
queryFn: async () => {
|
|
3856
3939
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3857
3940
|
const params = new URLSearchParams({ startDate, endDate });
|
|
@@ -3862,9 +3945,9 @@ function useCostBreakdown(timeRange) {
|
|
|
3862
3945
|
});
|
|
3863
3946
|
}
|
|
3864
3947
|
function useDashboardMetrics(timeRange) {
|
|
3865
|
-
const { apiRequest, isReady,
|
|
3948
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3866
3949
|
return useQuery({
|
|
3867
|
-
queryKey: observabilityKeys.dashboardMetrics(
|
|
3950
|
+
queryKey: observabilityKeys.dashboardMetrics(workOSOrganizationId, timeRange),
|
|
3868
3951
|
queryFn: async () => {
|
|
3869
3952
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3870
3953
|
const params = new URLSearchParams({ startDate, endDate });
|
|
@@ -3875,9 +3958,9 @@ function useDashboardMetrics(timeRange) {
|
|
|
3875
3958
|
});
|
|
3876
3959
|
}
|
|
3877
3960
|
function useBusinessImpact(timeRange) {
|
|
3878
|
-
const { apiRequest, isReady,
|
|
3961
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3879
3962
|
return useQuery({
|
|
3880
|
-
queryKey: observabilityKeys.businessImpact(
|
|
3963
|
+
queryKey: observabilityKeys.businessImpact(workOSOrganizationId, timeRange),
|
|
3881
3964
|
queryFn: async () => {
|
|
3882
3965
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3883
3966
|
const params = new URLSearchParams({ startDate, endDate });
|
|
@@ -3889,7 +3972,7 @@ function useBusinessImpact(timeRange) {
|
|
|
3889
3972
|
}
|
|
3890
3973
|
var BATCH_SIZE = 20;
|
|
3891
3974
|
function useBatchedResourcesHealth(params) {
|
|
3892
|
-
const { apiRequest, isReady,
|
|
3975
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3893
3976
|
const batches = useMemo(() => {
|
|
3894
3977
|
const result = [];
|
|
3895
3978
|
for (let i = 0; i < params.resources.length; i += BATCH_SIZE) {
|
|
@@ -3900,7 +3983,7 @@ function useBatchedResourcesHealth(params) {
|
|
|
3900
3983
|
const queryResults = useQueries({
|
|
3901
3984
|
queries: batches.map((batch) => ({
|
|
3902
3985
|
queryKey: observabilityKeys.resourcesHealth(
|
|
3903
|
-
|
|
3986
|
+
workOSOrganizationId,
|
|
3904
3987
|
batch.map((r) => `${r.entityType}-${r.entityId}`).join(","),
|
|
3905
3988
|
params.startDate,
|
|
3906
3989
|
params.endDate,
|
|
@@ -3935,9 +4018,9 @@ function useBatchedResourcesHealth(params) {
|
|
|
3935
4018
|
return { healthLookup };
|
|
3936
4019
|
}
|
|
3937
4020
|
function useUnresolvedErrors({ startDate, endDate }) {
|
|
3938
|
-
const { apiRequest, isReady,
|
|
4021
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3939
4022
|
return useQuery({
|
|
3940
|
-
queryKey: observabilityKeys.unresolvedErrors(
|
|
4023
|
+
queryKey: observabilityKeys.unresolvedErrors(workOSOrganizationId, startDate, endDate),
|
|
3941
4024
|
queryFn: async () => {
|
|
3942
4025
|
const params = new URLSearchParams({
|
|
3943
4026
|
resolved: "false",
|
|
@@ -3954,9 +4037,9 @@ function useUnresolvedErrors({ startDate, endDate }) {
|
|
|
3954
4037
|
});
|
|
3955
4038
|
}
|
|
3956
4039
|
function useRecentExecutionsByResource({ timeRange, limit }) {
|
|
3957
|
-
const { apiRequest, isReady,
|
|
4040
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
3958
4041
|
return useQuery({
|
|
3959
|
-
queryKey: observabilityKeys.recentExecutionsByResource(
|
|
4042
|
+
queryKey: observabilityKeys.recentExecutionsByResource(workOSOrganizationId, timeRange, limit),
|
|
3960
4043
|
queryFn: async () => {
|
|
3961
4044
|
const { startDate, endDate } = getTimeRangeDates(timeRange);
|
|
3962
4045
|
const params = new URLSearchParams({
|
|
@@ -4334,9 +4417,9 @@ var requestsKeys = {
|
|
|
4334
4417
|
detail: (organizationId, id) => [...requestsKeys.details(), organizationId, id]
|
|
4335
4418
|
};
|
|
4336
4419
|
function useRequestsList(filters = {}) {
|
|
4337
|
-
const { apiRequest, isReady,
|
|
4420
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
4338
4421
|
return useQuery({
|
|
4339
|
-
queryKey: requestsKeys.list(
|
|
4422
|
+
queryKey: requestsKeys.list(workOSOrganizationId ?? void 0, filters),
|
|
4340
4423
|
queryFn: async () => {
|
|
4341
4424
|
const { type, severity, status, source, limit, offset } = filters;
|
|
4342
4425
|
const params = new URLSearchParams();
|
|
@@ -4354,9 +4437,9 @@ function useRequestsList(filters = {}) {
|
|
|
4354
4437
|
});
|
|
4355
4438
|
}
|
|
4356
4439
|
function useRequest(id) {
|
|
4357
|
-
const { apiRequest, isReady,
|
|
4440
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
4358
4441
|
return useQuery({
|
|
4359
|
-
queryKey: requestsKeys.detail(
|
|
4442
|
+
queryKey: requestsKeys.detail(workOSOrganizationId ?? void 0, id),
|
|
4360
4443
|
queryFn: async () => {
|
|
4361
4444
|
const { request } = await apiRequest(`/requests/${id}`);
|
|
4362
4445
|
return request;
|
|
@@ -4365,7 +4448,7 @@ function useRequest(id) {
|
|
|
4365
4448
|
});
|
|
4366
4449
|
}
|
|
4367
4450
|
function useUpdateRequestStatus() {
|
|
4368
|
-
const { apiRequest,
|
|
4451
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
4369
4452
|
const queryClient = useQueryClient();
|
|
4370
4453
|
return useMutation({
|
|
4371
4454
|
mutationFn: async ({ id, status }) => {
|
|
@@ -4378,7 +4461,7 @@ function useUpdateRequestStatus() {
|
|
|
4378
4461
|
onSuccess: (_data, { id }) => {
|
|
4379
4462
|
queryClient.invalidateQueries({ queryKey: requestsKeys.lists() });
|
|
4380
4463
|
queryClient.invalidateQueries({
|
|
4381
|
-
queryKey: requestsKeys.detail(
|
|
4464
|
+
queryKey: requestsKeys.detail(workOSOrganizationId ?? void 0, id)
|
|
4382
4465
|
});
|
|
4383
4466
|
}
|
|
4384
4467
|
});
|
|
@@ -4397,9 +4480,9 @@ function useDeleteRequest() {
|
|
|
4397
4480
|
});
|
|
4398
4481
|
}
|
|
4399
4482
|
function useResourceErrors({ resourceId, timeRange, hasFailures }) {
|
|
4400
|
-
const { apiRequest,
|
|
4483
|
+
const { apiRequest, workOSOrganizationId, isReady } = useElevasisServices();
|
|
4401
4484
|
return useQuery({
|
|
4402
|
-
queryKey: ["resource-errors",
|
|
4485
|
+
queryKey: ["resource-errors", workOSOrganizationId, resourceId, timeRange],
|
|
4403
4486
|
queryFn: async () => {
|
|
4404
4487
|
return apiRequest(
|
|
4405
4488
|
`/command-view/resource-errors?resourceId=${resourceId}&timeRange=${timeRange}`
|
|
@@ -4411,9 +4494,9 @@ function useResourceErrors({ resourceId, timeRange, hasFailures }) {
|
|
|
4411
4494
|
});
|
|
4412
4495
|
}
|
|
4413
4496
|
function useDealDetail(acqDealId) {
|
|
4414
|
-
const { apiRequest, isReady,
|
|
4497
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
4415
4498
|
return useQuery({
|
|
4416
|
-
queryKey: ["deal-detail",
|
|
4499
|
+
queryKey: ["deal-detail", workOSOrganizationId, acqDealId],
|
|
4417
4500
|
queryFn: async () => {
|
|
4418
4501
|
if (!acqDealId) return null;
|
|
4419
4502
|
try {
|
|
@@ -4427,7 +4510,7 @@ function useDealDetail(acqDealId) {
|
|
|
4427
4510
|
});
|
|
4428
4511
|
}
|
|
4429
4512
|
function useTransitionState() {
|
|
4430
|
-
const { apiRequest,
|
|
4513
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
4431
4514
|
const queryClient = useQueryClient();
|
|
4432
4515
|
return useMutation({
|
|
4433
4516
|
mutationFn: async (input) => {
|
|
@@ -4444,7 +4527,7 @@ function useTransitionState() {
|
|
|
4444
4527
|
onSuccess: (_, variables) => {
|
|
4445
4528
|
queryClient.invalidateQueries({ queryKey: dealKeys.lists() });
|
|
4446
4529
|
queryClient.invalidateQueries({ queryKey: dealKeys.summaries() });
|
|
4447
|
-
queryClient.invalidateQueries({ queryKey: ["deal-detail",
|
|
4530
|
+
queryClient.invalidateQueries({ queryKey: ["deal-detail", workOSOrganizationId, variables.dealId] });
|
|
4448
4531
|
},
|
|
4449
4532
|
onError: (error) => {
|
|
4450
4533
|
queryClient.invalidateQueries({ queryKey: dealKeys.all });
|
|
@@ -4453,7 +4536,7 @@ function useTransitionState() {
|
|
|
4453
4536
|
});
|
|
4454
4537
|
}
|
|
4455
4538
|
function useExecuteAction({ dealId }) {
|
|
4456
|
-
const { apiRequest,
|
|
4539
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
4457
4540
|
const queryClient = useQueryClient();
|
|
4458
4541
|
return useMutation({
|
|
4459
4542
|
mutationFn: async ({ key, payload }) => {
|
|
@@ -4465,7 +4548,7 @@ function useExecuteAction({ dealId }) {
|
|
|
4465
4548
|
onSuccess: () => {
|
|
4466
4549
|
queryClient.invalidateQueries({ queryKey: dealKeys.lists() });
|
|
4467
4550
|
queryClient.invalidateQueries({ queryKey: dealKeys.summaries() });
|
|
4468
|
-
queryClient.invalidateQueries({ queryKey: ["deal-detail",
|
|
4551
|
+
queryClient.invalidateQueries({ queryKey: ["deal-detail", workOSOrganizationId, dealId] });
|
|
4469
4552
|
},
|
|
4470
4553
|
onError: (error) => {
|
|
4471
4554
|
queryClient.invalidateQueries({ queryKey: dealKeys.all });
|
|
@@ -4478,9 +4561,9 @@ var dealNoteKeys = {
|
|
|
4478
4561
|
list: (organizationId, dealId) => ["deal-notes", organizationId, dealId]
|
|
4479
4562
|
};
|
|
4480
4563
|
function useDealNotes(dealId) {
|
|
4481
|
-
const { apiRequest, isReady,
|
|
4564
|
+
const { apiRequest, isReady, workOSOrganizationId } = useElevasisServices();
|
|
4482
4565
|
return useQuery({
|
|
4483
|
-
queryKey: dealNoteKeys.list(
|
|
4566
|
+
queryKey: dealNoteKeys.list(workOSOrganizationId, dealId),
|
|
4484
4567
|
queryFn: async () => {
|
|
4485
4568
|
return apiRequest(`/deals/${dealId}/notes`);
|
|
4486
4569
|
},
|
|
@@ -4488,7 +4571,7 @@ function useDealNotes(dealId) {
|
|
|
4488
4571
|
});
|
|
4489
4572
|
}
|
|
4490
4573
|
function useCreateDealNote() {
|
|
4491
|
-
const { apiRequest,
|
|
4574
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
4492
4575
|
const queryClient = useQueryClient();
|
|
4493
4576
|
return useMutation({
|
|
4494
4577
|
mutationFn: async ({ dealId, body }) => {
|
|
@@ -4498,8 +4581,8 @@ function useCreateDealNote() {
|
|
|
4498
4581
|
});
|
|
4499
4582
|
},
|
|
4500
4583
|
onSuccess: (_, variables) => {
|
|
4501
|
-
queryClient.invalidateQueries({ queryKey: dealNoteKeys.list(
|
|
4502
|
-
queryClient.invalidateQueries({ queryKey: ["recent-crm-activity",
|
|
4584
|
+
queryClient.invalidateQueries({ queryKey: dealNoteKeys.list(workOSOrganizationId, variables.dealId) });
|
|
4585
|
+
queryClient.invalidateQueries({ queryKey: ["recent-crm-activity", workOSOrganizationId] });
|
|
4503
4586
|
showSuccessNotification("Note added");
|
|
4504
4587
|
},
|
|
4505
4588
|
onError: (error) => {
|
|
@@ -4508,7 +4591,7 @@ function useCreateDealNote() {
|
|
|
4508
4591
|
});
|
|
4509
4592
|
}
|
|
4510
4593
|
function useAddCompaniesToList(listId) {
|
|
4511
|
-
const { apiRequest,
|
|
4594
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
4512
4595
|
const queryClient = useQueryClient();
|
|
4513
4596
|
return useMutation({
|
|
4514
4597
|
mutationFn: (body) => apiRequest(`/acquisition/lists/${listId}/companies`, {
|
|
@@ -4517,9 +4600,9 @@ function useAddCompaniesToList(listId) {
|
|
|
4517
4600
|
}),
|
|
4518
4601
|
onSuccess: () => {
|
|
4519
4602
|
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
4520
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(
|
|
4521
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.progress(
|
|
4522
|
-
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(
|
|
4603
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, listId) });
|
|
4604
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.progress(workOSOrganizationId, listId) });
|
|
4605
|
+
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(workOSOrganizationId, listId) });
|
|
4523
4606
|
showSuccessNotification("Companies added to list");
|
|
4524
4607
|
},
|
|
4525
4608
|
onError: (error) => {
|
|
@@ -4528,7 +4611,7 @@ function useAddCompaniesToList(listId) {
|
|
|
4528
4611
|
});
|
|
4529
4612
|
}
|
|
4530
4613
|
function useRemoveCompaniesFromList(listId) {
|
|
4531
|
-
const { apiRequest,
|
|
4614
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
4532
4615
|
const queryClient = useQueryClient();
|
|
4533
4616
|
return useMutation({
|
|
4534
4617
|
mutationFn: (body) => apiRequest(`/acquisition/lists/${listId}/companies`, {
|
|
@@ -4537,9 +4620,9 @@ function useRemoveCompaniesFromList(listId) {
|
|
|
4537
4620
|
}),
|
|
4538
4621
|
onSuccess: () => {
|
|
4539
4622
|
queryClient.invalidateQueries({ queryKey: companyKeys.all });
|
|
4540
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(
|
|
4541
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.progress(
|
|
4542
|
-
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(
|
|
4623
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, listId) });
|
|
4624
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.progress(workOSOrganizationId, listId) });
|
|
4625
|
+
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(workOSOrganizationId, listId) });
|
|
4543
4626
|
showSuccessNotification("Companies removed from list");
|
|
4544
4627
|
},
|
|
4545
4628
|
onError: (error) => {
|
|
@@ -4548,7 +4631,7 @@ function useRemoveCompaniesFromList(listId) {
|
|
|
4548
4631
|
});
|
|
4549
4632
|
}
|
|
4550
4633
|
function useAddContactsToList(listId) {
|
|
4551
|
-
const { apiRequest,
|
|
4634
|
+
const { apiRequest, workOSOrganizationId } = useElevasisServices();
|
|
4552
4635
|
const queryClient = useQueryClient();
|
|
4553
4636
|
return useMutation({
|
|
4554
4637
|
mutationFn: (body) => apiRequest(`/acquisition/lists/${listId}/contacts`, {
|
|
@@ -4557,9 +4640,9 @@ function useAddContactsToList(listId) {
|
|
|
4557
4640
|
}),
|
|
4558
4641
|
onSuccess: () => {
|
|
4559
4642
|
queryClient.invalidateQueries({ queryKey: contactKeys.all });
|
|
4560
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(
|
|
4561
|
-
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.progress(
|
|
4562
|
-
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(
|
|
4643
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.detail(workOSOrganizationId, listId) });
|
|
4644
|
+
queryClient.invalidateQueries({ queryKey: acquisitionListKeys.progress(workOSOrganizationId, listId) });
|
|
4645
|
+
queryClient.invalidateQueries({ queryKey: leadGenListMemberKeys.list(workOSOrganizationId, listId) });
|
|
4563
4646
|
showSuccessNotification("Contacts added to list");
|
|
4564
4647
|
},
|
|
4565
4648
|
onError: (error) => {
|
|
@@ -5067,7 +5150,7 @@ var noopSSEManager = {
|
|
|
5067
5150
|
function useProjectRealtime(projectId) {
|
|
5068
5151
|
const queryClient = useQueryClient();
|
|
5069
5152
|
const features = useOptionalElevasisFeatures();
|
|
5070
|
-
const { isReady,
|
|
5153
|
+
const { isReady, workOSOrganizationId } = useElevasisServices();
|
|
5071
5154
|
const { currentMembership } = useOrganization();
|
|
5072
5155
|
const deliveryApiUrl = features?.deliveryApiUrl;
|
|
5073
5156
|
const deliverySSEManager = features?.deliverySSEManager ?? noopSSEManager;
|
|
@@ -5114,7 +5197,7 @@ function useProjectRealtime(projectId) {
|
|
|
5114
5197
|
);
|
|
5115
5198
|
useSSEConnection({
|
|
5116
5199
|
manager: deliverySSEManager,
|
|
5117
|
-
connectionKey: `delivery-${currentWorkOSOrganizationId ??
|
|
5200
|
+
connectionKey: `delivery-${currentWorkOSOrganizationId ?? workOSOrganizationId ?? projectId ?? "unknown"}`,
|
|
5118
5201
|
url: deliveryApiUrl ? `${deliveryApiUrl}/api/projects/sse` : "",
|
|
5119
5202
|
enabled: Boolean(deliveryApiUrl && features?.deliverySSEManager && currentWorkOSOrganizationId && isReady),
|
|
5120
5203
|
headers,
|
|
@@ -5123,4 +5206,4 @@ function useProjectRealtime(projectId) {
|
|
|
5123
5206
|
});
|
|
5124
5207
|
}
|
|
5125
5208
|
|
|
5126
|
-
export { ApiKeyService, COMMAND_VIEW_VISUALIZATION_MODES, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, collectResourceFilterFacets, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, getCommandViewGraphPositions, getResourceFilterFacetIds, isSessionCapable, labelResourceFilterFacet, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, operationsKeys, projectActivityKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, transformMembershipToTableRow, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useAddCompaniesToList, useAddContactsToList, useArchiveSession, useArchivedLogs, useArtifacts, useAssignRole, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateArtifact, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateOrgRole, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteOrgRole, useDeleteRequest, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useDeriveActions, useEffectivePermissions, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAction, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionSSE, useExecutions, useGetExecutionHistory, useGetSchedule, useHasPermission, useList, useListApiKeys, useListDeployments, useListExecutions, useListMember, useListMembers, useListProgress, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useOrgRoles, useOrganizationMembers, useOrganizationPermissions, usePaginationState, usePatchTask, usePauseSchedule, usePermissionCatalog, useProjectActivities, useProjectRealtime, useReactivateMembership, useRecentExecutionsByResource, useRemoveCompaniesFromList, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useRevokeRole, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTopFailingResources, useTransitionItem, useTransitionListCompany, useTransitionListMember, useTransitionState, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateListStatus, useUpdateMemberConfig, useUpdateOrgRole, useUpdateRequestStatus, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVisibleResources, useWarningNotification, useWorkflowExecution };
|
|
5209
|
+
export { ApiKeyService, COMMAND_VIEW_VISUALIZATION_MODES, CredentialSchemas, CredentialService, DeploymentService, MEMBERSHIP_STATUS_COLORS, OperationsService, OrganizationMembershipService, WebhookEndpointService, acquisitionListKeys, collectResourceFilterFacets, companyKeys, contactKeys, dealKeys, dealNoteKeys, dealTaskKeys, executionsKeys, filterByDomainFilters, getCommandViewGraphPositions, getResourceFilterFacetIds, isSessionCapable, labelResourceFilterFacet, leadGenArtifactKeys, leadGenListCompanyKeys, leadGenListMemberKeys, operationsKeys, projectActivityKeys, requestsKeys, scheduleKeys, sessionsKeys, sortData, transformMembershipToTableRow, useActivateDeployment, useActivities, useActivitiesRealtime, useActivityFilters, useActivityTrend, useAddCompaniesToList, useAddContactsToList, useArchiveSession, useArchivedLogs, useArtifacts, useAssignRole, useBatchDelete, useBatchTelemetry, useBatchedResourcesHealth, useBulkDeleteExecutions, useBusinessImpact, useCancelExecution, useCancelSchedule, useCheckpointTasks, useCommandQueue, useCommandQueueTotals, useCommandViewData, useCommandViewDomainFilters, useCommandViewStats, useCommandViewStore, useCompanies, useCompany, useCompanyFacets, useCompleteDealTask, useContact, useContacts, useCostBreakdown, useCostByModel, useCostSummary, useCostTrends, useCreateApiKey, useCreateArtifact, useCreateCompany, useCreateContact, useCreateCredential, useCreateDealNote, useCreateDealTask, useCreateList, useCreateOrgRole, useCreateSchedule, useCreateSession, useCreateWebhookEndpoint, useCredentials, useDashboardMetrics, useDeactivateDeployment, useDeactivateMembership, useDealDetail, useDealNotes, useDealTasks, useDealTasksDue, useDeals, useDealsLookup, useDealsSummary, useDeleteApiKey, useDeleteCompanies, useDeleteContacts, useDeleteCredential, useDeleteDeal, useDeleteDeployment, useDeleteExecution, useDeleteList, useDeleteOrgRole, useDeleteRequest, useDeleteSchedule, useDeleteSession, useDeleteTask, useDeleteWebhookEndpoint, useDeriveActions, useEffectivePermissions, useErrorAnalysis, useErrorDetail, useErrorDetails, useErrorDistribution, useErrorNotification, useExecuteAction, useExecuteAsync, useExecuteResource, useExecution, useExecutionHealth, useExecutionLogSSE, useExecutionLogs, useExecutionLogsFilters, useExecutionPanelState, useExecutionSSE, useExecutions, useGetExecutionHistory, useGetSchedule, useHasPermission, useInFlightExecutions, useList, useListApiKeys, useListDeployments, useListExecutions, useListMember, useListMembers, useListProgress, useListRecords, useListSchedules, useListWebhookEndpoints, useLists, useListsTelemetry, useMarkAllAsRead, useMarkAsRead, useNotificationCount, useNotifications, useOrgRoles, useOrganizationMembers, useOrganizationPermissions, usePaginationState, usePatchTask, usePauseSchedule, usePermissionCatalog, useProjectActivities, useProjectRealtime, useReactivateMembership, useRecentExecutionsByResource, useRemoveCompaniesFromList, useRequest, useRequestsList, useResolveAllErrors, useResolveError, useResolveErrorsByExecution, useResourceDefinition, useResourceErrors, useResourceExecutions, useResourceSearch, useResources, useResourcesDomainFilters, useResourcesHealth, useResumeSchedule, useRetryExecution, useRevokeRole, useSSEConnection, useScheduledTasks, useSession, useSessionExecution, useSessionExecutions, useSessionMessages, useSessionWebSocket, useSessions, useSortedData, useStatusFilter, useSubmitAction, useSuccessNotification, useTableSelection, useTableSort, useTestNotification, useTimeRangeDates, useTopFailingResources, useTransitionItem, useTransitionListCompany, useTransitionListMember, useTransitionState, useUnresolveError, useUnresolvedErrors, useUpdateAnchor, useUpdateApiKey, useUpdateCompany, useUpdateContact, useUpdateCredential, useUpdateList, useUpdateListConfig, useUpdateListStatus, useUpdateMemberConfig, useUpdateOrgRole, useUpdateRequestStatus, useUpdateSchedule, useUpdateWebhookEndpoint, useUserMemberships, useVerifyCredential, useVisibleResources, useWarningNotification, useWorkflowExecution };
|