@burdenoff/microfe-workspaces 2026.510.50
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/README.md +88 -0
- package/dist/WorkspacesRoot.d.ts +35 -0
- package/dist/WorkspacesRoot.d.ts.map +1 -0
- package/dist/WorkspacesRoot.js +71 -0
- package/dist/WorkspacesRoot.js.map +1 -0
- package/dist/WorkspacesRoutes.d.ts +10 -0
- package/dist/WorkspacesRoutes.d.ts.map +1 -0
- package/dist/WorkspacesRoutes.js +111 -0
- package/dist/WorkspacesRoutes.js.map +1 -0
- package/dist/components/CreateProjectDialog.d.ts +6 -0
- package/dist/components/CreateProjectDialog.d.ts.map +1 -0
- package/dist/components/CreateProjectDialog.js +115 -0
- package/dist/components/CreateProjectDialog.js.map +1 -0
- package/dist/components/CreateWorkspaceDialog.d.ts +2 -0
- package/dist/components/CreateWorkspaceDialog.d.ts.map +1 -0
- package/dist/components/CreateWorkspaceDialog.js +172 -0
- package/dist/components/CreateWorkspaceDialog.js.map +1 -0
- package/dist/components/InviteMemberDialog.d.ts +7 -0
- package/dist/components/InviteMemberDialog.d.ts.map +1 -0
- package/dist/components/InviteMemberDialog.js +148 -0
- package/dist/components/InviteMemberDialog.js.map +1 -0
- package/dist/components/MemberListItem.d.ts +11 -0
- package/dist/components/MemberListItem.d.ts.map +1 -0
- package/dist/components/MemberListItem.js +118 -0
- package/dist/components/MemberListItem.js.map +1 -0
- package/dist/components/ProjectCard.d.ts +13 -0
- package/dist/components/ProjectCard.d.ts.map +1 -0
- package/dist/components/ProjectCard.js +150 -0
- package/dist/components/ProjectCard.js.map +1 -0
- package/dist/components/WorkspaceCard.d.ts +8 -0
- package/dist/components/WorkspaceCard.d.ts.map +1 -0
- package/dist/components/WorkspaceCard.js +79 -0
- package/dist/components/WorkspaceCard.js.map +1 -0
- package/dist/components/WorkspacesErrorBoundary.d.ts +27 -0
- package/dist/components/WorkspacesErrorBoundary.d.ts.map +1 -0
- package/dist/components/WorkspacesErrorBoundary.js +136 -0
- package/dist/components/WorkspacesErrorBoundary.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +7 -0
- package/dist/constants/permissions.d.ts +33 -0
- package/dist/constants/permissions.d.ts.map +1 -0
- package/dist/constants/permissions.js +31 -0
- package/dist/constants/permissions.js.map +1 -0
- package/dist/generated/global-operations.d.ts +279 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-operations.js +103 -0
- package/dist/generated/global-operations.js.map +1 -0
- package/dist/generated/global-types.d.ts +20714 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2209 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-operations.js +576 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/generated/wspace-types.d.ts +54990 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +7 -0
- package/dist/hooks/useMemberMutations.d.ts +61 -0
- package/dist/hooks/useMemberMutations.d.ts.map +1 -0
- package/dist/hooks/useMemberMutations.js +263 -0
- package/dist/hooks/useMemberMutations.js.map +1 -0
- package/dist/hooks/useProjectMutations.d.ts +26 -0
- package/dist/hooks/useProjectMutations.d.ts.map +1 -0
- package/dist/hooks/useProjectMutations.js +127 -0
- package/dist/hooks/useProjectMutations.js.map +1 -0
- package/dist/hooks/useProjects.d.ts +16 -0
- package/dist/hooks/useProjects.d.ts.map +1 -0
- package/dist/hooks/useProjects.js +103 -0
- package/dist/hooks/useProjects.js.map +1 -0
- package/dist/hooks/useScopedNavigation.d.ts +4 -0
- package/dist/hooks/useScopedNavigation.d.ts.map +1 -0
- package/dist/hooks/useScopedNavigation.js +11 -0
- package/dist/hooks/useScopedNavigation.js.map +1 -0
- package/dist/hooks/useTenants.d.ts +13 -0
- package/dist/hooks/useTenants.d.ts.map +1 -0
- package/dist/hooks/useTenants.js +47 -0
- package/dist/hooks/useTenants.js.map +1 -0
- package/dist/hooks/useWorkspaceActivity.d.ts +12 -0
- package/dist/hooks/useWorkspaceActivity.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceActivity.js +31 -0
- package/dist/hooks/useWorkspaceActivity.js.map +1 -0
- package/dist/hooks/useWorkspaceMembers.d.ts +24 -0
- package/dist/hooks/useWorkspaceMembers.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceMembers.js +130 -0
- package/dist/hooks/useWorkspaceMembers.js.map +1 -0
- package/dist/hooks/useWorkspaceMutations.d.ts +36 -0
- package/dist/hooks/useWorkspaceMutations.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceMutations.js +119 -0
- package/dist/hooks/useWorkspaceMutations.js.map +1 -0
- package/dist/hooks/useWorkspacePermissions.d.ts +29 -0
- package/dist/hooks/useWorkspacePermissions.d.ts.map +1 -0
- package/dist/hooks/useWorkspacePermissions.js +33 -0
- package/dist/hooks/useWorkspacePermissions.js.map +1 -0
- package/dist/hooks/useWorkspaceRoles.d.ts +8 -0
- package/dist/hooks/useWorkspaceRoles.d.ts.map +1 -0
- package/dist/hooks/useWorkspaceRoles.js +31 -0
- package/dist/hooks/useWorkspaceRoles.js.map +1 -0
- package/dist/hooks/useWorkspaces.d.ts +21 -0
- package/dist/hooks/useWorkspaces.d.ts.map +1 -0
- package/dist/hooks/useWorkspaces.js +75 -0
- package/dist/hooks/useWorkspaces.js.map +1 -0
- package/dist/hooks/useWorkspacesEventEmitter.d.ts +14 -0
- package/dist/hooks/useWorkspacesEventEmitter.d.ts.map +1 -0
- package/dist/hooks/useWorkspacesEventEmitter.js +14 -0
- package/dist/hooks/useWorkspacesEventEmitter.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/pages/ActivityListPage.d.ts +2 -0
- package/dist/pages/ActivityListPage.d.ts.map +1 -0
- package/dist/pages/ActivityListPage.js +119 -0
- package/dist/pages/ActivityListPage.js.map +1 -0
- package/dist/pages/CreateWorkspacePage.d.ts +2 -0
- package/dist/pages/CreateWorkspacePage.d.ts.map +1 -0
- package/dist/pages/CreateWorkspacePage.js +264 -0
- package/dist/pages/CreateWorkspacePage.js.map +1 -0
- package/dist/pages/InviteAcceptancePage.d.ts +6 -0
- package/dist/pages/InviteAcceptancePage.d.ts.map +1 -0
- package/dist/pages/InviteAcceptancePage.js +495 -0
- package/dist/pages/InviteAcceptancePage.js.map +1 -0
- package/dist/pages/MembersListPage.d.ts +2 -0
- package/dist/pages/MembersListPage.d.ts.map +1 -0
- package/dist/pages/MembersListPage.js +420 -0
- package/dist/pages/MembersListPage.js.map +1 -0
- package/dist/pages/ProjectDetailPage.d.ts +2 -0
- package/dist/pages/ProjectDetailPage.d.ts.map +1 -0
- package/dist/pages/ProjectDetailPage.js +361 -0
- package/dist/pages/ProjectDetailPage.js.map +1 -0
- package/dist/pages/ProjectsListPage.d.ts +2 -0
- package/dist/pages/ProjectsListPage.d.ts.map +1 -0
- package/dist/pages/ProjectsListPage.js +398 -0
- package/dist/pages/ProjectsListPage.js.map +1 -0
- package/dist/pages/WorkspaceDetailPage.d.ts +2 -0
- package/dist/pages/WorkspaceDetailPage.d.ts.map +1 -0
- package/dist/pages/WorkspaceDetailPage.js +230 -0
- package/dist/pages/WorkspaceDetailPage.js.map +1 -0
- package/dist/pages/WorkspaceSettingsPage.d.ts +2 -0
- package/dist/pages/WorkspaceSettingsPage.d.ts.map +1 -0
- package/dist/pages/WorkspaceSettingsPage.js +157 -0
- package/dist/pages/WorkspaceSettingsPage.js.map +1 -0
- package/dist/pages/WorkspacesListPage.d.ts +2 -0
- package/dist/pages/WorkspacesListPage.d.ts.map +1 -0
- package/dist/pages/WorkspacesListPage.js +186 -0
- package/dist/pages/WorkspacesListPage.js.map +1 -0
- package/dist/pages/dashboard/DashboardCustomizer.d.ts +12 -0
- package/dist/pages/dashboard/DashboardCustomizer.d.ts.map +1 -0
- package/dist/pages/dashboard/DashboardCustomizer.js +136 -0
- package/dist/pages/dashboard/DashboardCustomizer.js.map +1 -0
- package/dist/pages/dashboard/DashboardGrid.d.ts +8 -0
- package/dist/pages/dashboard/DashboardGrid.d.ts.map +1 -0
- package/dist/pages/dashboard/DashboardGrid.js +58 -0
- package/dist/pages/dashboard/DashboardGrid.js.map +1 -0
- package/dist/pages/dashboard/DashboardPage.d.ts +14 -0
- package/dist/pages/dashboard/DashboardPage.d.ts.map +1 -0
- package/dist/pages/dashboard/DashboardPage.js +136 -0
- package/dist/pages/dashboard/DashboardPage.js.map +1 -0
- package/dist/pages/dashboard/WidgetWrapper.d.ts +17 -0
- package/dist/pages/dashboard/WidgetWrapper.d.ts.map +1 -0
- package/dist/pages/dashboard/WidgetWrapper.js +72 -0
- package/dist/pages/dashboard/WidgetWrapper.js.map +1 -0
- package/dist/pages/dashboard/config.d.ts +9 -0
- package/dist/pages/dashboard/config.d.ts.map +1 -0
- package/dist/pages/dashboard/config.js +214 -0
- package/dist/pages/dashboard/config.js.map +1 -0
- package/dist/pages/dashboard/hooks/useDashboardData.d.ts +9 -0
- package/dist/pages/dashboard/hooks/useDashboardData.d.ts.map +1 -0
- package/dist/pages/dashboard/hooks/useDashboardData.js +118 -0
- package/dist/pages/dashboard/hooks/useDashboardData.js.map +1 -0
- package/dist/pages/dashboard/hooks/useDashboardPreferences.d.ts +4 -0
- package/dist/pages/dashboard/hooks/useDashboardPreferences.d.ts.map +1 -0
- package/dist/pages/dashboard/hooks/useDashboardPreferences.js +32 -0
- package/dist/pages/dashboard/hooks/useDashboardPreferences.js.map +1 -0
- package/dist/pages/dashboard/types.d.ts +145 -0
- package/dist/pages/dashboard/types.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/GroupsWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/GroupsWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/GroupsWidget.js +59 -0
- package/dist/pages/dashboard/widgets/GroupsWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/MembersWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/MembersWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/MembersWidget.js +65 -0
- package/dist/pages/dashboard/widgets/MembersWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/ProjectsWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/ProjectsWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +91 -0
- package/dist/pages/dashboard/widgets/ProjectsWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/QuickActionsWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/QuickActionsWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +80 -0
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/RecentActivityWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/RecentActivityWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +81 -0
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/StorageWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/StorageWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/StorageWidget.js +69 -0
- package/dist/pages/dashboard/widgets/StorageWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/SystemHealthWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/SystemHealthWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/SystemHealthWidget.js +59 -0
- package/dist/pages/dashboard/widgets/SystemHealthWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/TagCloudWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/TagCloudWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +61 -0
- package/dist/pages/dashboard/widgets/TagCloudWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/TipsWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/TipsWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/TipsWidget.js +67 -0
- package/dist/pages/dashboard/widgets/TipsWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +83 -0
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/WelcomeWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/WelcomeWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +71 -0
- package/dist/pages/dashboard/widgets/WelcomeWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +97 -0
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js.map +1 -0
- package/dist/pages/dashboard/widgets/WorkspacesWidget.d.ts +4 -0
- package/dist/pages/dashboard/widgets/WorkspacesWidget.d.ts.map +1 -0
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +67 -0
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js.map +1 -0
- package/dist/providers/WorkspacesProvider.d.ts +13 -0
- package/dist/providers/WorkspacesProvider.d.ts.map +1 -0
- package/dist/providers/WorkspacesProvider.js +24 -0
- package/dist/providers/WorkspacesProvider.js.map +1 -0
- package/dist/store/workspacesStore.d.ts +82 -0
- package/dist/store/workspacesStore.d.ts.map +1 -0
- package/dist/store/workspacesStore.js +92 -0
- package/dist/store/workspacesStore.js.map +1 -0
- package/dist/types/index.d.ts +280 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/formatters.d.ts +60 -0
- package/dist/utils/formatters.d.ts.map +1 -0
- package/dist/utils/formatters.js +61 -0
- package/dist/utils/formatters.js.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/nativeBridge.d.ts +3 -0
- package/dist/utils/nativeBridge.d.ts.map +1 -0
- package/dist/utils/nativeBridge.js +2 -0
- package/dist/utils/projectTags.d.ts +6 -0
- package/dist/utils/projectTags.d.ts.map +1 -0
- package/dist/utils/projectTags.js +49 -0
- package/dist/utils/projectTags.js.map +1 -0
- package/dist/utils/slug.d.ts +13 -0
- package/dist/utils/slug.d.ts.map +1 -0
- package/dist/utils/slug.js +8 -0
- package/dist/utils/slug.js.map +1 -0
- package/dist/utils/tokenHelpers.d.ts +114 -0
- package/dist/utils/tokenHelpers.d.ts.map +1 -0
- package/dist/utils/tokenHelpers.js +80 -0
- package/dist/utils/tokenHelpers.js.map +1 -0
- package/package.json +113 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
|
|
2
|
+
import { useQuery as t } from "@tanstack/react-query";
|
|
3
|
+
import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
|
|
4
|
+
//#region src/hooks/useProjects.ts
|
|
5
|
+
var r = "\n query GetProjects($filter: ProjectFilterInput, $pagination: PaginationInput) {\n projects(filter: $filter, pagination: $pagination) {\n items {\n id\n name\n key\n workspaceId\n creatorId\n status\n config\n tags\n archived\n createdAt\n updatedAt\n deletedAt\n }\n total\n hasMore\n }\n }\n", i = "\n query GetProject($id: ID!) {\n project(id: $id) {\n id\n name\n key\n workspaceId\n creatorId\n status\n config\n tags\n archived\n createdAt\n updatedAt\n deletedAt\n }\n }\n", a = "\n query GetMyProjects($pagination: PaginationInput) {\n myProjects(pagination: $pagination) {\n items {\n id\n name\n key\n workspaceId\n status\n tags\n archived\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n", o = "\n query GetProjectMembersCount($projectId: ID!) {\n projectMembers(filter: { projectId: $projectId }, pagination: { limit: 1 }) {\n total\n }\n }\n", s = (i, a, o) => {
|
|
6
|
+
let { authToken: s, workspaceId: c } = e(), l = i?.workspaceId || o || c;
|
|
7
|
+
return t({
|
|
8
|
+
queryKey: [
|
|
9
|
+
"projects",
|
|
10
|
+
l,
|
|
11
|
+
i,
|
|
12
|
+
a
|
|
13
|
+
],
|
|
14
|
+
queryFn: async () => {
|
|
15
|
+
let e = await n({
|
|
16
|
+
gateway: "workspace",
|
|
17
|
+
authToken: s || void 0,
|
|
18
|
+
query: r,
|
|
19
|
+
variables: {
|
|
20
|
+
filter: {
|
|
21
|
+
...i,
|
|
22
|
+
workspaceId: l
|
|
23
|
+
},
|
|
24
|
+
pagination: a
|
|
25
|
+
},
|
|
26
|
+
workspaceId: l || void 0,
|
|
27
|
+
workspaceToken: !0
|
|
28
|
+
});
|
|
29
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
30
|
+
return e.data.projects;
|
|
31
|
+
},
|
|
32
|
+
enabled: !!l,
|
|
33
|
+
staleTime: 300 * 1e3
|
|
34
|
+
});
|
|
35
|
+
}, c = (r, a) => {
|
|
36
|
+
let { authToken: o, workspaceId: s } = e(), c = a || s;
|
|
37
|
+
return t({
|
|
38
|
+
queryKey: [
|
|
39
|
+
"project",
|
|
40
|
+
c,
|
|
41
|
+
r
|
|
42
|
+
],
|
|
43
|
+
queryFn: async () => {
|
|
44
|
+
let e = await n({
|
|
45
|
+
gateway: "workspace",
|
|
46
|
+
authToken: o || void 0,
|
|
47
|
+
query: i,
|
|
48
|
+
variables: { id: r },
|
|
49
|
+
workspaceId: c || void 0,
|
|
50
|
+
workspaceToken: !0
|
|
51
|
+
});
|
|
52
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
53
|
+
return e.data.project;
|
|
54
|
+
},
|
|
55
|
+
enabled: !!r,
|
|
56
|
+
staleTime: 300 * 1e3
|
|
57
|
+
});
|
|
58
|
+
}, l = (r) => {
|
|
59
|
+
let { authToken: i, workspaceId: o } = e();
|
|
60
|
+
return t({
|
|
61
|
+
queryKey: ["myProjects", r],
|
|
62
|
+
queryFn: async () => {
|
|
63
|
+
let e = await n({
|
|
64
|
+
gateway: "workspace",
|
|
65
|
+
authToken: i || void 0,
|
|
66
|
+
query: a,
|
|
67
|
+
variables: { pagination: r },
|
|
68
|
+
workspaceId: o || void 0,
|
|
69
|
+
workspaceToken: !0
|
|
70
|
+
});
|
|
71
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
72
|
+
return e.data.myProjects;
|
|
73
|
+
},
|
|
74
|
+
staleTime: 300 * 1e3
|
|
75
|
+
});
|
|
76
|
+
}, u = (r, i) => {
|
|
77
|
+
let { authToken: a, workspaceId: s } = e(), c = i || s;
|
|
78
|
+
return t({
|
|
79
|
+
queryKey: [
|
|
80
|
+
"projectMembersCount",
|
|
81
|
+
c,
|
|
82
|
+
r
|
|
83
|
+
],
|
|
84
|
+
queryFn: async () => {
|
|
85
|
+
let e = await n({
|
|
86
|
+
gateway: "workspace",
|
|
87
|
+
authToken: a || void 0,
|
|
88
|
+
query: o,
|
|
89
|
+
variables: { projectId: r },
|
|
90
|
+
workspaceId: c || void 0,
|
|
91
|
+
workspaceToken: !0
|
|
92
|
+
});
|
|
93
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
94
|
+
return e.data?.projectMembers.total ?? 0;
|
|
95
|
+
},
|
|
96
|
+
enabled: !!r && !!c,
|
|
97
|
+
staleTime: 60 * 1e3
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
//#endregion
|
|
101
|
+
export { l as useMyProjects, c as useProject, u as useProjectMembersCount, s as useProjects };
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=useProjects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProjects.js","names":[],"sources":["../../src/hooks/useProjects.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { useWorkspacesContext } from '../providers/WorkspacesProvider';\nimport type { ProjectFilters, ProjectList, Project, PaginationInput } from '../types';\n\nconst GET_PROJECTS_QUERY = `\n query GetProjects($filter: ProjectFilterInput, $pagination: PaginationInput) {\n projects(filter: $filter, pagination: $pagination) {\n items {\n id\n name\n key\n workspaceId\n creatorId\n status\n config\n tags\n archived\n createdAt\n updatedAt\n deletedAt\n }\n total\n hasMore\n }\n }\n`;\n\nconst GET_PROJECT_QUERY = `\n query GetProject($id: ID!) {\n project(id: $id) {\n id\n name\n key\n workspaceId\n creatorId\n status\n config\n tags\n archived\n createdAt\n updatedAt\n deletedAt\n }\n }\n`;\n\nconst GET_MY_PROJECTS_QUERY = `\n query GetMyProjects($pagination: PaginationInput) {\n myProjects(pagination: $pagination) {\n items {\n id\n name\n key\n workspaceId\n status\n tags\n archived\n createdAt\n updatedAt\n }\n total\n hasMore\n }\n }\n`;\n\nconst GET_PROJECT_MEMBERS_COUNT = `\n query GetProjectMembersCount($projectId: ID!) {\n projectMembers(filter: { projectId: $projectId }, pagination: { limit: 1 }) {\n total\n }\n }\n`;\n\n/**\n * Hook to fetch all projects with filtering and pagination\n */\nexport const useProjects = (\n filters?: ProjectFilters,\n pagination?: PaginationInput,\n workspaceIdOverride?: string\n) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const effectiveWorkspaceId = filters?.workspaceId || workspaceIdOverride || workspaceId;\n\n return useQuery({\n queryKey: ['projects', effectiveWorkspaceId, filters, pagination],\n queryFn: async (): Promise<ProjectList> => {\n const result = await graphqlFetch<{ projects: ProjectList }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: GET_PROJECTS_QUERY,\n variables: {\n filter: {\n ...filters,\n workspaceId: effectiveWorkspaceId,\n },\n pagination,\n },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header (required by gateway RBAC)\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.projects;\n },\n enabled: !!effectiveWorkspaceId,\n staleTime: 5 * 60 * 1000,\n });\n};\n\n/**\n * Hook to fetch a single project by ID\n */\nexport const useProject = (id: string, workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useQuery({\n queryKey: ['project', effectiveWorkspaceId, id],\n queryFn: async (): Promise<Project> => {\n const result = await graphqlFetch<{ project: Project }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: GET_PROJECT_QUERY,\n variables: { id },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header (required by gateway RBAC)\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.project;\n },\n enabled: !!id,\n staleTime: 5 * 60 * 1000,\n });\n};\n\n/**\n * Hook to fetch current user's projects\n */\nexport const useMyProjects = (pagination?: PaginationInput) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['myProjects', pagination],\n queryFn: async (): Promise<ProjectList> => {\n const result = await graphqlFetch<{ myProjects: ProjectList }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: GET_MY_PROJECTS_QUERY,\n variables: { pagination },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header (required by gateway RBAC)\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.myProjects;\n },\n staleTime: 5 * 60 * 1000,\n });\n};\n\nexport const useProjectMembersCount = (projectId: string, workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useQuery({\n queryKey: ['projectMembersCount', effectiveWorkspaceId, projectId],\n queryFn: async (): Promise<number> => {\n const result = await graphqlFetch<{\n projectMembers: { total: number };\n }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: GET_PROJECT_MEMBERS_COUNT,\n variables: { projectId },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true,\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data?.projectMembers.total ?? 0;\n },\n enabled: !!projectId && !!effectiveWorkspaceId,\n staleTime: 60 * 1000,\n });\n};\n"],"mappings":";;;;AAKA,IAAM,IAAqB,0ZAuBrB,IAAoB,0PAmBpB,IAAwB,0TAoBxB,IAA4B,qKAWrB,KACX,GACA,GACA,MACG;CACH,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAuB,GAAS,eAAe,KAAuB;AAE5E,QAAO,EAAS;EACd,UAAU;GAAC;GAAY;GAAsB;GAAS;GAAW;EACjE,SAAS,YAAkC;GACzC,IAAM,IAAS,MAAM,EAAwC;IAC3D,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO;IACP,WAAW;KACT,QAAQ;MACN,GAAG;MACH,aAAa;MACd;KACD;KACD;IACD,aAAa,KAAwB,KAAA;IACrC,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gBAAgB;AAG/D,UAAO,EAAO,KAAM;;EAEtB,SAAS,CAAC,CAAC;EACX,WAAW,MAAS;EACrB,CAAC;GAMS,KAAc,GAAY,MAAiC;CACtE,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAuB,KAAuB;AAEpD,QAAO,EAAS;EACd,UAAU;GAAC;GAAW;GAAsB;GAAG;EAC/C,SAAS,YAA8B;GACrC,IAAM,IAAS,MAAM,EAAmC;IACtD,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO;IACP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src/hooks/useScopedNavigation.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB;8BAIxB,MAAM;EAKhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { useLocation as t } from "react-router-dom";
|
|
3
|
+
//#region src/hooks/useScopedNavigation.ts
|
|
4
|
+
function n() {
|
|
5
|
+
let n = t();
|
|
6
|
+
return { withCurrentSearch: e((e) => `${e}${n.search || ""}`, [n.search]) };
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as useScopedNavigation };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=useScopedNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScopedNavigation.js","names":[],"sources":["../../src/hooks/useScopedNavigation.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useLocation } from 'react-router-dom';\n\nexport function useScopedNavigation() {\n const location = useLocation();\n\n const withCurrentSearch = useCallback(\n (path: string) => `${path}${location.search || ''}`,\n [location.search]\n );\n\n return { withCurrentSearch };\n}\n"],"mappings":";;;AAGA,SAAgB,IAAsB;CACpC,IAAM,IAAW,GAAa;AAO9B,QAAO,EAAE,mBALiB,GACvB,MAAiB,GAAG,IAAO,EAAS,UAAU,MAC/C,CAAC,EAAS,OAAO,CAClB,EAE2B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TenantList, OrganizationList, PaginationInput } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hook to fetch tenants accessible to the current user
|
|
5
|
+
* Uses the global gateway (tenant supergraph) to query myTenants
|
|
6
|
+
*/
|
|
7
|
+
export declare const useMyTenants: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<TenantList, Error>;
|
|
8
|
+
/**
|
|
9
|
+
* Hook to fetch organizations accessible to the current user
|
|
10
|
+
* Uses the global gateway to query myOrganizations
|
|
11
|
+
*/
|
|
12
|
+
export declare const useMyOrganizations: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<OrganizationList, Error>;
|
|
13
|
+
//# sourceMappingURL=useTenants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTenants.d.ts","sourceRoot":"","sources":["../../src/hooks/useTenants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAwC9E;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,aAAa,eAAe,sEAwBxD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,aAAa,eAAe,4EAwB9D,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
|
|
2
|
+
import { useQuery as t } from "@tanstack/react-query";
|
|
3
|
+
import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
|
|
4
|
+
//#region src/hooks/useTenants.ts
|
|
5
|
+
var r = "\n query GetMyTenants($limit: Int, $offset: Int) {\n myTenants(limit: $limit, offset: $offset) {\n items {\n id\n name\n slug\n status\n type\n }\n total\n hasMore\n }\n }\n", i = "\n query GetMyOrganizations($limit: Int, $offset: Int) {\n myOrganizations(limit: $limit, offset: $offset) {\n items {\n id\n name\n slug\n tenantId\n }\n total\n hasMore\n }\n }\n", a = (i) => {
|
|
6
|
+
let { authToken: a } = e();
|
|
7
|
+
return t({
|
|
8
|
+
queryKey: ["myTenants", i],
|
|
9
|
+
queryFn: async () => {
|
|
10
|
+
let e = await n({
|
|
11
|
+
gateway: "global",
|
|
12
|
+
authToken: a || void 0,
|
|
13
|
+
query: r,
|
|
14
|
+
variables: {
|
|
15
|
+
limit: i?.limit ?? 50,
|
|
16
|
+
offset: i?.offset ?? 0
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "Failed to fetch tenants");
|
|
20
|
+
return e.data.myTenants;
|
|
21
|
+
},
|
|
22
|
+
staleTime: 300 * 1e3
|
|
23
|
+
});
|
|
24
|
+
}, o = (r) => {
|
|
25
|
+
let { authToken: a } = e();
|
|
26
|
+
return t({
|
|
27
|
+
queryKey: ["myOrganizations", r],
|
|
28
|
+
queryFn: async () => {
|
|
29
|
+
let e = await n({
|
|
30
|
+
gateway: "global",
|
|
31
|
+
authToken: a || void 0,
|
|
32
|
+
query: i,
|
|
33
|
+
variables: {
|
|
34
|
+
limit: r?.limit ?? 50,
|
|
35
|
+
offset: r?.offset ?? 0
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "Failed to fetch organizations");
|
|
39
|
+
return e.data.myOrganizations;
|
|
40
|
+
},
|
|
41
|
+
staleTime: 300 * 1e3
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { o as useMyOrganizations, a as useMyTenants };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=useTenants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTenants.js","names":[],"sources":["../../src/hooks/useTenants.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { useWorkspacesContext } from '../providers/WorkspacesProvider';\nimport type { TenantList, OrganizationList, PaginationInput } from '../types';\n\n/**\n * GraphQL query to fetch user's accessible tenants\n * This queries the global-tenant-svc via global gateway\n */\nconst GET_MY_TENANTS = `\n query GetMyTenants($limit: Int, $offset: Int) {\n myTenants(limit: $limit, offset: $offset) {\n items {\n id\n name\n slug\n status\n type\n }\n total\n hasMore\n }\n }\n`;\n\n/**\n * GraphQL query to fetch user's organizations\n */\nconst GET_MY_ORGANIZATIONS = `\n query GetMyOrganizations($limit: Int, $offset: Int) {\n myOrganizations(limit: $limit, offset: $offset) {\n items {\n id\n name\n slug\n tenantId\n }\n total\n hasMore\n }\n }\n`;\n\n/**\n * Hook to fetch tenants accessible to the current user\n * Uses the global gateway (tenant supergraph) to query myTenants\n */\nexport const useMyTenants = (pagination?: PaginationInput) => {\n const { authToken } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['myTenants', pagination],\n queryFn: async (): Promise<TenantList> => {\n const result = await graphqlFetch<{ myTenants: TenantList }>({\n gateway: 'global', // Use global gateway for tenant queries\n authToken: authToken || undefined,\n query: GET_MY_TENANTS,\n variables: {\n limit: pagination?.limit ?? 50,\n offset: pagination?.offset ?? 0,\n },\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'Failed to fetch tenants');\n }\n\n return result.data!.myTenants;\n },\n staleTime: 5 * 60 * 1000, // 5 minutes\n });\n};\n\n/**\n * Hook to fetch organizations accessible to the current user\n * Uses the global gateway to query myOrganizations\n */\nexport const useMyOrganizations = (pagination?: PaginationInput) => {\n const { authToken } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['myOrganizations', pagination],\n queryFn: async (): Promise<OrganizationList> => {\n const result = await graphqlFetch<{ myOrganizations: OrganizationList }>({\n gateway: 'global',\n authToken: authToken || undefined,\n query: GET_MY_ORGANIZATIONS,\n variables: {\n limit: pagination?.limit ?? 50,\n offset: pagination?.offset ?? 0,\n },\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'Failed to fetch organizations');\n }\n\n return result.data!.myOrganizations;\n },\n staleTime: 5 * 60 * 1000,\n });\n};\n"],"mappings":";;;;AASA,IAAM,IAAiB,gPAmBjB,IAAuB,gPAmBhB,KAAgB,MAAiC;CAC5D,IAAM,EAAE,iBAAc,GAAsB;AAE5C,QAAO,EAAS;EACd,UAAU,CAAC,aAAa,EAAW;EACnC,SAAS,YAAiC;GACxC,IAAM,IAAS,MAAM,EAAwC;IAC3D,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO;IACP,WAAW;KACT,OAAO,GAAY,SAAS;KAC5B,QAAQ,GAAY,UAAU;KAC/B;IACF,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,0BAA0B;AAGzE,UAAO,EAAO,KAAM;;EAEtB,WAAW,MAAS;EACrB,CAAC;GAOS,KAAsB,MAAiC;CAClE,IAAM,EAAE,iBAAc,GAAsB;AAE5C,QAAO,EAAS;EACd,UAAU,CAAC,mBAAmB,EAAW;EACzC,SAAS,YAAuC;GAC9C,IAAM,IAAS,MAAM,EAAoD;IACvE,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO;IACP,WAAW;KACT,OAAO,GAAY,SAAS;KAC5B,QAAQ,GAAY,UAAU;KAC/B;IACF,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gCAAgC;AAG/E,UAAO,EAAO,KAAM;;EAEtB,WAAW,MAAS;EACrB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface WorkspaceActivityItem {
|
|
2
|
+
id: string;
|
|
3
|
+
action: string;
|
|
4
|
+
resourceType?: string | null;
|
|
5
|
+
resourceId?: string | null;
|
|
6
|
+
userId: string;
|
|
7
|
+
description?: string | null;
|
|
8
|
+
details?: Record<string, unknown> | null;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const useWorkspaceActivity: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<WorkspaceActivityItem[], Error>;
|
|
12
|
+
//# sourceMappingURL=useWorkspaceActivity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorkspaceActivity.d.ts","sourceRoot":"","sources":["../../src/hooks/useWorkspaceActivity.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB;AAiBD,eAAO,MAAM,oBAAoB,GAAI,sBAAsB,MAAM,mFA2BhE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
|
|
2
|
+
import { useQuery as t } from "@tanstack/react-query";
|
|
3
|
+
import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
|
|
4
|
+
//#region src/hooks/useWorkspaceActivity.ts
|
|
5
|
+
var r = "\n query GetRecentWorkspaceActivities($workspaceId: ID, $limit: Int) {\n getRecentActivities(workspaceId: $workspaceId, limit: $limit) {\n id\n action\n resourceType\n resourceId\n userId\n description\n details\n timestamp\n }\n }\n", i = (i) => {
|
|
6
|
+
let { authToken: a, workspaceId: o } = e(), s = i || o;
|
|
7
|
+
return t({
|
|
8
|
+
queryKey: ["workspaceActivity", s],
|
|
9
|
+
queryFn: async () => {
|
|
10
|
+
let e = await n({
|
|
11
|
+
gateway: "workspace",
|
|
12
|
+
authToken: a || void 0,
|
|
13
|
+
query: r,
|
|
14
|
+
variables: {
|
|
15
|
+
workspaceId: s,
|
|
16
|
+
limit: 10
|
|
17
|
+
},
|
|
18
|
+
workspaceId: s || void 0,
|
|
19
|
+
workspaceToken: !0
|
|
20
|
+
});
|
|
21
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
22
|
+
return e.data?.getRecentActivities ?? [];
|
|
23
|
+
},
|
|
24
|
+
enabled: !!s,
|
|
25
|
+
staleTime: 60 * 1e3
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { i as useWorkspaceActivity };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=useWorkspaceActivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorkspaceActivity.js","names":[],"sources":["../../src/hooks/useWorkspaceActivity.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { useWorkspacesContext } from '../providers/WorkspacesProvider';\n\nexport interface WorkspaceActivityItem {\n id: string;\n action: string;\n resourceType?: string | null;\n resourceId?: string | null;\n userId: string;\n description?: string | null;\n details?: Record<string, unknown> | null;\n timestamp: string;\n}\n\nconst GET_RECENT_WORKSPACE_ACTIVITIES = `\n query GetRecentWorkspaceActivities($workspaceId: ID, $limit: Int) {\n getRecentActivities(workspaceId: $workspaceId, limit: $limit) {\n id\n action\n resourceType\n resourceId\n userId\n description\n details\n timestamp\n }\n }\n`;\n\nexport const useWorkspaceActivity = (workspaceIdOverride?: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n const effectiveWorkspaceId = workspaceIdOverride || workspaceId;\n\n return useQuery({\n queryKey: ['workspaceActivity', effectiveWorkspaceId],\n queryFn: async (): Promise<WorkspaceActivityItem[]> => {\n const result = await graphqlFetch<{\n getRecentActivities: WorkspaceActivityItem[];\n }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: GET_RECENT_WORKSPACE_ACTIVITIES,\n variables: { workspaceId: effectiveWorkspaceId, limit: 10 },\n workspaceId: effectiveWorkspaceId || undefined,\n workspaceToken: true,\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data?.getRecentActivities ?? [];\n },\n enabled: !!effectiveWorkspaceId,\n staleTime: 60 * 1000,\n });\n};\n"],"mappings":";;;;AAeA,IAAM,IAAkC,6RAe3B,KAAwB,MAAiC;CACpE,IAAM,EAAE,cAAW,mBAAgB,GAAsB,EACnD,IAAuB,KAAuB;AAEpD,QAAO,EAAS;EACd,UAAU,CAAC,qBAAqB,EAAqB;EACrD,SAAS,YAA8C;GACrD,IAAM,IAAS,MAAM,EAElB;IACD,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO;IACP,WAAW;KAAE,aAAa;KAAsB,OAAO;KAAI;IAC3D,aAAa,KAAwB,KAAA;IACrC,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gBAAgB;AAG/D,UAAO,EAAO,MAAM,uBAAuB,EAAE;;EAE/C,SAAS,CAAC,CAAC;EACX,WAAW,KAAK;EACjB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MemberList, WorkspaceMember, WorkspaceInvitation, InvitationList, PaginationInput, InvitationStatus } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hook to fetch all members of the current workspace
|
|
5
|
+
*/
|
|
6
|
+
export declare const useWorkspaceMembers: (workspaceId: string, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<MemberList, Error>;
|
|
7
|
+
/**
|
|
8
|
+
* Hook to fetch a single workspace member by ID
|
|
9
|
+
*/
|
|
10
|
+
export declare const useWorkspaceMember: (id: string) => import('@tanstack/react-query').UseQueryResult<WorkspaceMember, Error>;
|
|
11
|
+
/**
|
|
12
|
+
* Hook to fetch all workspaces a user is a member of
|
|
13
|
+
*/
|
|
14
|
+
export declare const useUserWorkspaces: (userId: string, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<MemberList, Error>;
|
|
15
|
+
/**
|
|
16
|
+
* Hook to fetch workspace invitations
|
|
17
|
+
* Requires x-workspace-id header for workspace context
|
|
18
|
+
*/
|
|
19
|
+
export declare const useWorkspaceInvitations: (workspaceId: string, status?: InvitationStatus, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<InvitationList, Error>;
|
|
20
|
+
/**
|
|
21
|
+
* Hook to get a single invitation by ID (for acceptance page)
|
|
22
|
+
*/
|
|
23
|
+
export declare const useInvitation: (id: string, enabled?: boolean) => import('@tanstack/react-query').UseQueryResult<WorkspaceInvitation, Error>;
|
|
24
|
+
//# sourceMappingURL=useWorkspaceMembers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorkspaceMembers.d.ts","sourceRoot":"","sources":["../../src/hooks/useWorkspaceMembers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,EAAE,aAAa,eAAe,sEAwBpF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,IAAI,MAAM,2EAwB5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,EAAE,aAAa,eAAe,sEAwB7E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAClC,aAAa,MAAM,EACnB,SAAS,gBAAgB,EACzB,aAAa,eAAe,0EAyB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,IAAI,MAAM,EAAE,iBAAc,+EA6BvD,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
|
|
2
|
+
import { GetInvitationDocument as t, GetUserWorkspacesDocument as n, GetWorkspaceInvitationsDocument as r, GetWorkspaceMemberDocument as i, GetWorkspaceMembersDocument as a } from "../generated/wspace-operations.js";
|
|
3
|
+
import { useQuery as o } from "@tanstack/react-query";
|
|
4
|
+
import { print as s } from "graphql";
|
|
5
|
+
import { graphqlFetch as c } from "@burdenoff/fe-libs/shared/graphql";
|
|
6
|
+
//#region src/hooks/useWorkspaceMembers.ts
|
|
7
|
+
var l = (t, n) => {
|
|
8
|
+
let { authToken: r } = e();
|
|
9
|
+
return o({
|
|
10
|
+
queryKey: [
|
|
11
|
+
"workspaceMembers",
|
|
12
|
+
t,
|
|
13
|
+
n
|
|
14
|
+
],
|
|
15
|
+
queryFn: async () => {
|
|
16
|
+
let e = await c({
|
|
17
|
+
gateway: "workspace",
|
|
18
|
+
authToken: r || void 0,
|
|
19
|
+
query: s(a),
|
|
20
|
+
variables: {
|
|
21
|
+
workspaceId: t,
|
|
22
|
+
pagination: n
|
|
23
|
+
},
|
|
24
|
+
workspaceId: t,
|
|
25
|
+
workspaceToken: !0
|
|
26
|
+
});
|
|
27
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
28
|
+
return e.data.workspaceMembers;
|
|
29
|
+
},
|
|
30
|
+
enabled: !!t,
|
|
31
|
+
staleTime: 300 * 1e3
|
|
32
|
+
});
|
|
33
|
+
}, u = (t) => {
|
|
34
|
+
let { authToken: n, workspaceId: r } = e();
|
|
35
|
+
return o({
|
|
36
|
+
queryKey: ["workspaceMember", t],
|
|
37
|
+
queryFn: async () => {
|
|
38
|
+
let e = await c({
|
|
39
|
+
gateway: "workspace",
|
|
40
|
+
authToken: n || void 0,
|
|
41
|
+
query: s(i),
|
|
42
|
+
variables: { id: t },
|
|
43
|
+
workspaceId: r || void 0,
|
|
44
|
+
workspaceToken: !0
|
|
45
|
+
});
|
|
46
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
47
|
+
return e.data.workspaceMember;
|
|
48
|
+
},
|
|
49
|
+
enabled: !!t,
|
|
50
|
+
staleTime: 300 * 1e3
|
|
51
|
+
});
|
|
52
|
+
}, d = (t, r) => {
|
|
53
|
+
let { authToken: i, workspaceId: a } = e();
|
|
54
|
+
return o({
|
|
55
|
+
queryKey: [
|
|
56
|
+
"userWorkspaces",
|
|
57
|
+
t,
|
|
58
|
+
r
|
|
59
|
+
],
|
|
60
|
+
queryFn: async () => {
|
|
61
|
+
let e = await c({
|
|
62
|
+
gateway: "workspace",
|
|
63
|
+
authToken: i || void 0,
|
|
64
|
+
query: s(n),
|
|
65
|
+
variables: {
|
|
66
|
+
userId: t,
|
|
67
|
+
pagination: r
|
|
68
|
+
},
|
|
69
|
+
workspaceId: a || void 0,
|
|
70
|
+
workspaceToken: !0
|
|
71
|
+
});
|
|
72
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
73
|
+
return e.data.userWorkspaces;
|
|
74
|
+
},
|
|
75
|
+
enabled: !!t,
|
|
76
|
+
staleTime: 300 * 1e3
|
|
77
|
+
});
|
|
78
|
+
}, f = (t, n, i) => {
|
|
79
|
+
let { authToken: a } = e();
|
|
80
|
+
return o({
|
|
81
|
+
queryKey: [
|
|
82
|
+
"workspaceInvitations",
|
|
83
|
+
t,
|
|
84
|
+
n,
|
|
85
|
+
i
|
|
86
|
+
],
|
|
87
|
+
queryFn: async () => {
|
|
88
|
+
let e = await c({
|
|
89
|
+
gateway: "workspace",
|
|
90
|
+
authToken: a || void 0,
|
|
91
|
+
query: s(r),
|
|
92
|
+
variables: {
|
|
93
|
+
status: n,
|
|
94
|
+
pagination: i
|
|
95
|
+
},
|
|
96
|
+
workspaceId: t,
|
|
97
|
+
workspaceToken: !0
|
|
98
|
+
});
|
|
99
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
|
|
100
|
+
return e.data.workspaceInvitations;
|
|
101
|
+
},
|
|
102
|
+
enabled: !!t,
|
|
103
|
+
staleTime: 300 * 1e3
|
|
104
|
+
});
|
|
105
|
+
}, p = (n, r = !0) => {
|
|
106
|
+
let { authToken: i, workspaceId: a } = e();
|
|
107
|
+
return o({
|
|
108
|
+
queryKey: ["invitation", n],
|
|
109
|
+
queryFn: async () => {
|
|
110
|
+
let e = await c({
|
|
111
|
+
gateway: "workspace",
|
|
112
|
+
authToken: i || void 0,
|
|
113
|
+
query: s(t),
|
|
114
|
+
variables: { id: n },
|
|
115
|
+
workspaceId: a || void 0,
|
|
116
|
+
workspaceToken: !0
|
|
117
|
+
});
|
|
118
|
+
if (e.errors?.length) throw Error(e.errors[0]?.message || "Failed to fetch invitation");
|
|
119
|
+
if (!e.data?.invitation) throw Error("Invitation not found");
|
|
120
|
+
return e.data.invitation;
|
|
121
|
+
},
|
|
122
|
+
enabled: !!n && r,
|
|
123
|
+
retry: 1,
|
|
124
|
+
staleTime: 300 * 1e3
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
//#endregion
|
|
128
|
+
export { p as useInvitation, d as useUserWorkspaces, f as useWorkspaceInvitations, u as useWorkspaceMember, l as useWorkspaceMembers };
|
|
129
|
+
|
|
130
|
+
//# sourceMappingURL=useWorkspaceMembers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorkspaceMembers.js","names":[],"sources":["../../src/hooks/useWorkspaceMembers.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { print } from 'graphql';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { useWorkspacesContext } from '../providers/WorkspacesProvider';\nimport {\n GetWorkspaceMembersDocument,\n GetWorkspaceMemberDocument,\n GetUserWorkspacesDocument,\n GetWorkspaceInvitationsDocument,\n GetInvitationDocument,\n} from '../generated/wspace-operations';\nimport type {\n MemberList,\n WorkspaceMember,\n WorkspaceInvitation,\n InvitationList,\n PaginationInput,\n InvitationStatus,\n} from '../types';\n\n/**\n * Hook to fetch all members of the current workspace\n */\nexport const useWorkspaceMembers = (workspaceId: string, pagination?: PaginationInput) => {\n const { authToken } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['workspaceMembers', workspaceId, pagination],\n queryFn: async (): Promise<MemberList> => {\n const result = await graphqlFetch<{ workspaceMembers: MemberList }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(GetWorkspaceMembersDocument),\n variables: { workspaceId, pagination },\n workspaceId,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header (required by gateway RBAC)\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.workspaceMembers;\n },\n enabled: !!workspaceId,\n staleTime: 5 * 60 * 1000,\n });\n};\n\n/**\n * Hook to fetch a single workspace member by ID\n */\nexport const useWorkspaceMember = (id: string) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['workspaceMember', id],\n queryFn: async (): Promise<WorkspaceMember> => {\n const result = await graphqlFetch<{ workspaceMember: WorkspaceMember }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(GetWorkspaceMemberDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.workspaceMember;\n },\n enabled: !!id,\n staleTime: 5 * 60 * 1000,\n });\n};\n\n/**\n * Hook to fetch all workspaces a user is a member of\n */\nexport const useUserWorkspaces = (userId: string, pagination?: PaginationInput) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['userWorkspaces', userId, pagination],\n queryFn: async (): Promise<MemberList> => {\n const result = await graphqlFetch<{ userWorkspaces: MemberList }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(GetUserWorkspacesDocument),\n variables: { userId, pagination },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.userWorkspaces;\n },\n enabled: !!userId,\n staleTime: 5 * 60 * 1000,\n });\n};\n\n/**\n * Hook to fetch workspace invitations\n * Requires x-workspace-id header for workspace context\n */\nexport const useWorkspaceInvitations = (\n workspaceId: string,\n status?: InvitationStatus,\n pagination?: PaginationInput\n) => {\n const { authToken } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['workspaceInvitations', workspaceId, status, pagination],\n queryFn: async (): Promise<InvitationList> => {\n const result = await graphqlFetch<{ workspaceInvitations: InvitationList }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(GetWorkspaceInvitationsDocument),\n variables: { status, pagination },\n workspaceId,\n workspaceToken: true, // Auto-read from profile context for x-workspace-id header\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.workspaceInvitations;\n },\n enabled: !!workspaceId,\n staleTime: 5 * 60 * 1000,\n });\n};\n\n/**\n * Hook to get a single invitation by ID (for acceptance page)\n */\nexport const useInvitation = (id: string, enabled = true) => {\n const { authToken, workspaceId } = useWorkspacesContext();\n\n return useQuery({\n queryKey: ['invitation', id],\n queryFn: async (): Promise<WorkspaceInvitation> => {\n const result = await graphqlFetch<{ invitation: WorkspaceInvitation }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(GetInvitationDocument),\n variables: { id },\n workspaceId: workspaceId || undefined,\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'Failed to fetch invitation');\n }\n\n if (!result.data?.invitation) {\n throw new Error('Invitation not found');\n }\n\n return result.data.invitation;\n },\n enabled: !!id && enabled,\n retry: 1,\n staleTime: 5 * 60 * 1000,\n });\n};\n"],"mappings":";;;;;;AAuBA,IAAa,KAAuB,GAAqB,MAAiC;CACxF,IAAM,EAAE,iBAAc,GAAsB;AAE5C,QAAO,EAAS;EACd,UAAU;GAAC;GAAoB;GAAa;GAAW;EACvD,SAAS,YAAiC;GACxC,IAAM,IAAS,MAAM,EAA+C;IAClE,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO,EAAM,EAA4B;IACzC,WAAW;KAAE;KAAa;KAAY;IACtC;IACA,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WA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,OAAO,EAAM,EAAgC;IAC7C,WAAW;KAAE;KAAQ;KAAY;IACjC;IACA,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,gBAAgB;AAG/D,UAAO,EAAO,KAAM;;EAEtB,SAAS,CAAC,CAAC;EACX,WAAW,MAAS;EACrB,CAAC;GAMS,KAAiB,GAAY,IAAU,OAAS;CAC3D,IAAM,EAAE,cAAW,mBAAgB,GAAsB;AAEzD,QAAO,EAAS;EACd,UAAU,CAAC,cAAc,EAAG;EAC5B,SAAS,YAA0C;GACjD,IAAM,IAAS,MAAM,EAAkD;IACrE,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO,EAAM,EAAsB;IACnC,WAAW,EAAE,OAAI;IACjB,aAAa,KAAe,KAAA;IAC5B,gBAAgB;IACjB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,6BAA6B;AAG5E,OAAI,CAAC,EAAO,MAAM,WAChB,OAAU,MAAM,uBAAuB;AAGzC,UAAO,EAAO,KAAK;;EAErB,SAAS,CAAC,CAAC,KAAM;EACjB,OAAO;EACP,WAAW,MAAS;EACrB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CreateWorkspaceInput, UpdateWorkspaceInput, Workspace } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hook to create a new workspace
|
|
5
|
+
*
|
|
6
|
+
* Creates workspace via global-tenant-svc (global gateway), which then
|
|
7
|
+
* automatically syncs to wspace-workspace-svc. This ensures proper
|
|
8
|
+
* tenant/org hierarchy management in the global layer.
|
|
9
|
+
*
|
|
10
|
+
* Required input fields:
|
|
11
|
+
* - tenantId: Select from myTenants query
|
|
12
|
+
* - organizationId: Select from myOrganizations query
|
|
13
|
+
* - name: Display name
|
|
14
|
+
* - slug: URL-friendly identifier (unique within tenant)
|
|
15
|
+
*/
|
|
16
|
+
export declare const useCreateWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, CreateWorkspaceInput, unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* Hook to update an existing workspace
|
|
19
|
+
*/
|
|
20
|
+
export declare const useUpdateWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, {
|
|
21
|
+
id: string;
|
|
22
|
+
input: UpdateWorkspaceInput;
|
|
23
|
+
}, unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* Hook to delete a workspace
|
|
26
|
+
*/
|
|
27
|
+
export declare const useDeleteWorkspace: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
|
|
28
|
+
/**
|
|
29
|
+
* Hook to archive a workspace
|
|
30
|
+
*/
|
|
31
|
+
export declare const useArchiveWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Hook to reactivate an archived workspace
|
|
34
|
+
*/
|
|
35
|
+
export declare const useReactivateWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, string, unknown>;
|
|
36
|
+
//# sourceMappingURL=useWorkspaceMutations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorkspaceMutations.d.ts","sourceRoot":"","sources":["../../src/hooks/useWorkspaceMutations.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAqBtF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,0GAiC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB;QAUrB,MAAM;WACH,oBAAoB;WAuBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,0FA4B9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,4FA4B/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4FA4BlC,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
|
|
2
|
+
import { ArchiveWorkspaceDocument as t, DeleteWorkspaceDocument as n, ReactivateWorkspaceDocument as r, UpdateWorkspaceDocument as i } from "../generated/wspace-operations.js";
|
|
3
|
+
import { useWorkspacesEventEmitter as a } from "./useWorkspacesEventEmitter.js";
|
|
4
|
+
import { useMutation as o, useQueryClient as s } from "@tanstack/react-query";
|
|
5
|
+
import { print as c } from "graphql";
|
|
6
|
+
import { graphqlFetch as l } from "@burdenoff/fe-libs/shared/graphql";
|
|
7
|
+
//#region src/hooks/useWorkspaceMutations.ts
|
|
8
|
+
var u = "\n mutation CreateGlobalWorkspace($input: CreateWorkspaceInput!) {\n createWorkspace(input: $input) {\n id\n name\n slug\n type\n status\n tenantId\n organizationId\n createdAt\n }\n }\n", d = () => {
|
|
9
|
+
let { authToken: t, onWorkspaceCreate: n } = e(), r = s(), { emit: i } = a();
|
|
10
|
+
return o({
|
|
11
|
+
mutationFn: async (e) => {
|
|
12
|
+
let n = await l({
|
|
13
|
+
gateway: "global",
|
|
14
|
+
authToken: t || void 0,
|
|
15
|
+
query: u,
|
|
16
|
+
variables: { input: e }
|
|
17
|
+
});
|
|
18
|
+
if (n.errors?.length) throw Error(n.errors[0]?.message || "Failed to create workspace");
|
|
19
|
+
return n.data.createWorkspace;
|
|
20
|
+
},
|
|
21
|
+
onSuccess: (e) => {
|
|
22
|
+
r.invalidateQueries({ queryKey: ["workspaces"] }), r.invalidateQueries({ queryKey: ["myWorkspaces"] }), r.invalidateQueries({ queryKey: ["myTenants"] }), r.invalidateQueries({ queryKey: ["myOrganizations"] }), i("workspace.created", {
|
|
23
|
+
workspaceId: e.id,
|
|
24
|
+
source: "microfe-workspaces"
|
|
25
|
+
}), n && n(e);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, f = () => {
|
|
29
|
+
let { authToken: t } = e(), n = s(), { emit: r } = a();
|
|
30
|
+
return o({
|
|
31
|
+
mutationFn: async ({ id: e, input: n }) => {
|
|
32
|
+
let r = await l({
|
|
33
|
+
gateway: "workspace",
|
|
34
|
+
authToken: t || void 0,
|
|
35
|
+
query: c(i),
|
|
36
|
+
variables: {
|
|
37
|
+
id: e,
|
|
38
|
+
input: n
|
|
39
|
+
},
|
|
40
|
+
workspaceToken: !0
|
|
41
|
+
});
|
|
42
|
+
if (r.errors?.length) throw Error(r.errors[0]?.message || "GraphQL error");
|
|
43
|
+
return r.data.updateWorkspace;
|
|
44
|
+
},
|
|
45
|
+
onSuccess: (e) => {
|
|
46
|
+
n.invalidateQueries({ queryKey: ["workspaces"] }), n.invalidateQueries({ queryKey: ["workspace", e.id] }), n.invalidateQueries({ queryKey: ["myWorkspaces"] }), r("workspace.updated", {
|
|
47
|
+
workspaceId: e.id,
|
|
48
|
+
source: "microfe-workspaces"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}, p = () => {
|
|
53
|
+
let { authToken: t } = e(), r = s(), { emit: i } = a();
|
|
54
|
+
return o({
|
|
55
|
+
mutationFn: async (e) => {
|
|
56
|
+
let r = await l({
|
|
57
|
+
gateway: "workspace",
|
|
58
|
+
authToken: t || void 0,
|
|
59
|
+
query: c(n),
|
|
60
|
+
variables: { id: e },
|
|
61
|
+
workspaceToken: !0
|
|
62
|
+
});
|
|
63
|
+
if (r.errors?.length) throw Error(r.errors[0]?.message || "GraphQL error");
|
|
64
|
+
return r.data.deleteWorkspace;
|
|
65
|
+
},
|
|
66
|
+
onSuccess: (e, t) => {
|
|
67
|
+
r.invalidateQueries({ queryKey: ["workspaces"] }), r.invalidateQueries({ queryKey: ["workspace", t] }), r.invalidateQueries({ queryKey: ["myWorkspaces"] }), i("workspace.deleted", {
|
|
68
|
+
workspaceId: t,
|
|
69
|
+
source: "microfe-workspaces"
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}, m = () => {
|
|
74
|
+
let { authToken: n } = e(), r = s(), { emit: i } = a();
|
|
75
|
+
return o({
|
|
76
|
+
mutationFn: async (e) => {
|
|
77
|
+
let r = await l({
|
|
78
|
+
gateway: "workspace",
|
|
79
|
+
authToken: n || void 0,
|
|
80
|
+
query: c(t),
|
|
81
|
+
variables: { id: e },
|
|
82
|
+
workspaceToken: !0
|
|
83
|
+
});
|
|
84
|
+
if (r.errors?.length) throw Error(r.errors[0]?.message || "GraphQL error");
|
|
85
|
+
return r.data.updateWorkspace;
|
|
86
|
+
},
|
|
87
|
+
onSuccess: (e) => {
|
|
88
|
+
r.invalidateQueries({ queryKey: ["workspaces"] }), r.invalidateQueries({ queryKey: ["workspace", e.id] }), r.invalidateQueries({ queryKey: ["myWorkspaces"] }), i("workspace.archived", {
|
|
89
|
+
workspaceId: e.id,
|
|
90
|
+
source: "microfe-workspaces"
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}, h = () => {
|
|
95
|
+
let { authToken: t } = e(), n = s(), { emit: i } = a();
|
|
96
|
+
return o({
|
|
97
|
+
mutationFn: async (e) => {
|
|
98
|
+
let n = await l({
|
|
99
|
+
gateway: "workspace",
|
|
100
|
+
authToken: t || void 0,
|
|
101
|
+
query: c(r),
|
|
102
|
+
variables: { id: e },
|
|
103
|
+
workspaceToken: !0
|
|
104
|
+
});
|
|
105
|
+
if (n.errors?.length) throw Error(n.errors[0]?.message || "GraphQL error");
|
|
106
|
+
return n.data.updateWorkspace;
|
|
107
|
+
},
|
|
108
|
+
onSuccess: (e) => {
|
|
109
|
+
n.invalidateQueries({ queryKey: ["workspaces"] }), n.invalidateQueries({ queryKey: ["workspace", e.id] }), n.invalidateQueries({ queryKey: ["myWorkspaces"] }), i("workspace.reactivated", {
|
|
110
|
+
workspaceId: e.id,
|
|
111
|
+
source: "microfe-workspaces"
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
//#endregion
|
|
117
|
+
export { m as useArchiveWorkspace, d as useCreateWorkspace, p as useDeleteWorkspace, h as useReactivateWorkspace, f as useUpdateWorkspace };
|
|
118
|
+
|
|
119
|
+
//# sourceMappingURL=useWorkspaceMutations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWorkspaceMutations.js","names":[],"sources":["../../src/hooks/useWorkspaceMutations.ts"],"sourcesContent":["import { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { print } from 'graphql';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\nimport { useWorkspacesContext } from '../providers/WorkspacesProvider';\nimport { useWorkspacesEventEmitter } from './useWorkspacesEventEmitter';\nimport {\n UpdateWorkspaceDocument,\n DeleteWorkspaceDocument,\n ArchiveWorkspaceDocument,\n ReactivateWorkspaceDocument,\n} from '../generated/wspace-operations';\nimport type { CreateWorkspaceInput, UpdateWorkspaceInput, Workspace } from '../types';\n\n/**\n * GraphQL mutation to create workspace via global-tenant-svc\n * This creates workspace in global layer, which then syncs to wspace layer\n */\nconst CREATE_GLOBAL_WORKSPACE = `\n mutation CreateGlobalWorkspace($input: CreateWorkspaceInput!) {\n createWorkspace(input: $input) {\n id\n name\n slug\n type\n status\n tenantId\n organizationId\n createdAt\n }\n }\n`;\n\n/**\n * Hook to create a new workspace\n *\n * Creates workspace via global-tenant-svc (global gateway), which then\n * automatically syncs to wspace-workspace-svc. This ensures proper\n * tenant/org hierarchy management in the global layer.\n *\n * Required input fields:\n * - tenantId: Select from myTenants query\n * - organizationId: Select from myOrganizations query\n * - name: Display name\n * - slug: URL-friendly identifier (unique within tenant)\n */\nexport const useCreateWorkspace = () => {\n const { authToken, onWorkspaceCreate } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (input: CreateWorkspaceInput): Promise<Workspace> => {\n // Call global gateway for workspace creation\n const result = await graphqlFetch<{ createWorkspace: Workspace }>({\n gateway: 'global', // Use global gateway, not workspace gateway\n authToken: authToken || undefined,\n query: CREATE_GLOBAL_WORKSPACE,\n variables: { input },\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'Failed to create workspace');\n }\n\n return result.data!.createWorkspace;\n },\n onSuccess: (workspace) => {\n // Invalidate both global and workspace layer queries\n queryClient.invalidateQueries({ queryKey: ['workspaces'] });\n queryClient.invalidateQueries({ queryKey: ['myWorkspaces'] });\n queryClient.invalidateQueries({ queryKey: ['myTenants'] });\n queryClient.invalidateQueries({ queryKey: ['myOrganizations'] });\n emit('workspace.created', { workspaceId: workspace.id, source: 'microfe-workspaces' });\n if (onWorkspaceCreate) {\n onWorkspaceCreate(workspace);\n }\n },\n });\n};\n\n/**\n * Hook to update an existing workspace\n */\nexport const useUpdateWorkspace = () => {\n const { authToken } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async ({\n id,\n input,\n }: {\n id: string;\n input: UpdateWorkspaceInput;\n }): Promise<Workspace> => {\n const result = await graphqlFetch<{ updateWorkspace: Workspace }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(UpdateWorkspaceDocument),\n variables: { id, input },\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.updateWorkspace;\n },\n onSuccess: (workspace) => {\n queryClient.invalidateQueries({ queryKey: ['workspaces'] });\n queryClient.invalidateQueries({ queryKey: ['workspace', workspace.id] });\n queryClient.invalidateQueries({ queryKey: ['myWorkspaces'] });\n emit('workspace.updated', { workspaceId: workspace.id, source: 'microfe-workspaces' });\n },\n });\n};\n\n/**\n * Hook to delete a workspace\n */\nexport const useDeleteWorkspace = () => {\n const { authToken } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<boolean> => {\n const result = await graphqlFetch<{ deleteWorkspace: boolean }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(DeleteWorkspaceDocument),\n variables: { id },\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.deleteWorkspace;\n },\n onSuccess: (_, id) => {\n queryClient.invalidateQueries({ queryKey: ['workspaces'] });\n queryClient.invalidateQueries({ queryKey: ['workspace', id] });\n queryClient.invalidateQueries({ queryKey: ['myWorkspaces'] });\n emit('workspace.deleted', { workspaceId: id, source: 'microfe-workspaces' });\n },\n });\n};\n\n/**\n * Hook to archive a workspace\n */\nexport const useArchiveWorkspace = () => {\n const { authToken } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<Workspace> => {\n const result = await graphqlFetch<{ updateWorkspace: Workspace }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(ArchiveWorkspaceDocument),\n variables: { id },\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.updateWorkspace;\n },\n onSuccess: (workspace) => {\n queryClient.invalidateQueries({ queryKey: ['workspaces'] });\n queryClient.invalidateQueries({ queryKey: ['workspace', workspace.id] });\n queryClient.invalidateQueries({ queryKey: ['myWorkspaces'] });\n emit('workspace.archived', { workspaceId: workspace.id, source: 'microfe-workspaces' });\n },\n });\n};\n\n/**\n * Hook to reactivate an archived workspace\n */\nexport const useReactivateWorkspace = () => {\n const { authToken } = useWorkspacesContext();\n const queryClient = useQueryClient();\n const { emit } = useWorkspacesEventEmitter();\n\n return useMutation({\n mutationFn: async (id: string): Promise<Workspace> => {\n const result = await graphqlFetch<{ updateWorkspace: Workspace }>({\n gateway: 'workspace',\n authToken: authToken || undefined,\n query: print(ReactivateWorkspaceDocument),\n variables: { id },\n workspaceToken: true, // Required by gateway RBAC for wspace-scoped operations\n });\n\n if (result.errors?.length) {\n throw new Error(result.errors[0]?.message || 'GraphQL error');\n }\n\n return result.data!.updateWorkspace;\n },\n onSuccess: (workspace) => {\n queryClient.invalidateQueries({ queryKey: ['workspaces'] });\n queryClient.invalidateQueries({ queryKey: ['workspace', workspace.id] });\n queryClient.invalidateQueries({ queryKey: ['myWorkspaces'] });\n emit('workspace.reactivated', { workspaceId: workspace.id, source: 'microfe-workspaces' });\n },\n });\n};\n"],"mappings":";;;;;;;AAiBA,IAAM,IAA0B,8OA4BnB,UAA2B;CACtC,IAAM,EAAE,cAAW,yBAAsB,GAAsB,EACzD,IAAc,GAAgB,EAC9B,EAAE,YAAS,GAA2B;AAE5C,QAAO,EAAY;EACjB,YAAY,OAAO,MAAoD;GAErE,IAAM,IAAS,MAAM,EAA6C;IAChE,SAAS;IACT,WAAW,KAAa,KAAA;IACxB,OAAO;IACP,WAAW,EAAE,UAAO;IACrB,CAAC;AAEF,OAAI,EAAO,QAAQ,OACjB,OAAU,MAAM,EAAO,OAAO,IAAI,WAAW,6BAA6B;AAG5E,UAAO,EAAO,KAAM;;EAEtB,YAAY,MAAc;AAOxB,GALA,EAAY,kBAAkB,EAAE,UAAU,CAAC,aAAa,EAAE,CAAC,EAC3D,EAAY,kBAAkB,EAAE,UAAU,CAAC,eAAe,EAAE,CAAC,EAC7D,EAAY,kBAAkB,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,EAC1D,EAAY,kBAAkB,EAAE,UAAU,CAAC,kBAAkB,EAAE,CAAC,EAChE,EAAK,qBAAqB;IAAE,aAAa,EAAU;IAAI,QAAQ;IAAsB,CAAC,EAClF,KACF,EAAkB,EAAU;;EAGjC,CAAC;GAMS,UAA2B;CACtC,IAAM,EAAE,iBAAc,GAAsB,EACtC,IAAc,GAAgB,EAC9B,EAAE,YAAS,GAA2B;AAE5C,QAAO,EAA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