@burdenoff/microfe-workspaces 2026.1109.1 → 2026.1110.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/WorkspacesRoot.js +10 -9
  2. package/dist/WorkspacesRoutes.js +1 -2
  3. package/dist/components/CreateProjectDialog.js +22 -22
  4. package/dist/components/CreateWorkspaceDialog.js +8 -9
  5. package/dist/components/InviteMemberDialog.js +18 -23
  6. package/dist/components/MemberListItem.js +16 -17
  7. package/dist/components/ProjectCard.js +14 -15
  8. package/dist/components/ProjectMemberPickerDialog.js +92 -93
  9. package/dist/components/RenameProjectDialog.js +12 -17
  10. package/dist/components/WorkspaceCard.js +6 -7
  11. package/dist/components/WorkspaceContextPathSync.js +4 -5
  12. package/dist/components/WorkspacesErrorBoundary.js +6 -11
  13. package/dist/components/index.js +8 -7
  14. package/dist/components/tags/ProjectTagsWidget.js +56 -57
  15. package/dist/components/tags/WorkspaceTagsEditor.js +2 -3
  16. package/dist/constants/permissions.js +1 -2
  17. package/dist/generated/global-operations.js +1 -2
  18. package/dist/generated/wspace-operations.js +1 -2
  19. package/dist/hooks/index.js +9 -8
  20. package/dist/hooks/useMemberMutations.js +165 -166
  21. package/dist/hooks/useOpenWorkspace.js +1 -2
  22. package/dist/hooks/useOrgsWithPermission.js +2 -3
  23. package/dist/hooks/usePendingInvitations.d.ts +1 -1
  24. package/dist/hooks/usePendingInvitations.js +2 -3
  25. package/dist/hooks/useProjectMemberMutations.js +23 -24
  26. package/dist/hooks/useProjectMembers.d.ts +2 -2
  27. package/dist/hooks/useProjectMembers.js +2 -3
  28. package/dist/hooks/useProjectMutations.js +68 -69
  29. package/dist/hooks/useProjects.d.ts +3 -3
  30. package/dist/hooks/useProjects.js +5 -6
  31. package/dist/hooks/useScopedNavigation.js +1 -2
  32. package/dist/hooks/useTenants.d.ts +2 -2
  33. package/dist/hooks/useTenants.js +3 -4
  34. package/dist/hooks/useTr.js +1 -2
  35. package/dist/hooks/useWorkspaceActivity.d.ts +1 -1
  36. package/dist/hooks/useWorkspaceActivity.js +2 -3
  37. package/dist/hooks/useWorkspaceMembers.d.ts +5 -5
  38. package/dist/hooks/useWorkspaceMembers.js +7 -8
  39. package/dist/hooks/useWorkspaceMutations.js +70 -71
  40. package/dist/hooks/useWorkspacePermissions.js +1 -2
  41. package/dist/hooks/useWorkspaceRoles.d.ts +1 -1
  42. package/dist/hooks/useWorkspaceRoles.js +3 -4
  43. package/dist/hooks/useWorkspaces.d.ts +3 -3
  44. package/dist/hooks/useWorkspaces.js +4 -5
  45. package/dist/hooks/useWorkspacesEventEmitter.js +1 -2
  46. package/dist/hooks/useWorkspacesPageView.js +1 -2
  47. package/dist/index.js +15 -15
  48. package/dist/pages/ActivityListPage.js +28 -29
  49. package/dist/pages/CreateWorkspacePage.js +137 -138
  50. package/dist/pages/InviteAcceptancePage.js +65 -66
  51. package/dist/pages/MembersListPage.js +203 -204
  52. package/dist/pages/PendingInvitesPage.js +63 -64
  53. package/dist/pages/ProjectDetailPage.js +71 -72
  54. package/dist/pages/ProjectMembersPage.js +116 -117
  55. package/dist/pages/ProjectsListPage.js +62 -67
  56. package/dist/pages/WorkspaceDetailPage.js +153 -154
  57. package/dist/pages/WorkspaceInvitePage.js +88 -92
  58. package/dist/pages/WorkspaceSettingsPage.js +32 -33
  59. package/dist/pages/WorkspacesListPage.js +40 -41
  60. package/dist/pages/dashboard/DashboardCustomizer.js +98 -94
  61. package/dist/pages/dashboard/DashboardGrid.js +1 -2
  62. package/dist/pages/dashboard/DashboardPage.js +12 -13
  63. package/dist/pages/dashboard/WidgetWrapper.js +3 -3
  64. package/dist/pages/dashboard/config.js +3 -4
  65. package/dist/pages/dashboard/hooks/useDashboardData.d.ts +5 -5
  66. package/dist/pages/dashboard/hooks/useDashboardData.js +9 -10
  67. package/dist/pages/dashboard/hooks/useDashboardPreferences.js +7 -8
  68. package/dist/pages/dashboard/reorder.js +11 -14
  69. package/dist/pages/dashboard/widgets/AgentsWidget.js +13 -14
  70. package/dist/pages/dashboard/widgets/GroupsWidget.js +9 -10
  71. package/dist/pages/dashboard/widgets/MembersWidget.js +10 -11
  72. package/dist/pages/dashboard/widgets/ProjectsWidget.js +11 -12
  73. package/dist/pages/dashboard/widgets/QuickActionsWidget.js +28 -29
  74. package/dist/pages/dashboard/widgets/RecentActivityWidget.js +22 -23
  75. package/dist/pages/dashboard/widgets/SessionsWidget.js +28 -29
  76. package/dist/pages/dashboard/widgets/StorageWidget.js +19 -20
  77. package/dist/pages/dashboard/widgets/TagCloudWidget.js +9 -10
  78. package/dist/pages/dashboard/widgets/TipsWidget.js +5 -6
  79. package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +17 -18
  80. package/dist/pages/dashboard/widgets/VibesWidget.js +13 -14
  81. package/dist/pages/dashboard/widgets/WelcomeWidget.js +11 -12
  82. package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +16 -17
  83. package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +11 -12
  84. package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +17 -18
  85. package/dist/pages/dashboard/widgets/WorkspacesWidget.js +7 -8
  86. package/dist/pages/dashboard/widgets/tipsCatalog.js +1 -2
  87. package/dist/providers/WorkspacesProvider.js +1 -2
  88. package/dist/store/workspacesStore.d.ts +1 -1
  89. package/dist/store/workspacesStore.js +1 -2
  90. package/dist/test/happydom.d.ts +1 -0
  91. package/dist/translations/en.js +1 -2
  92. package/dist/utils/formatters.js +1 -2
  93. package/dist/utils/i18n.js +1 -2
  94. package/dist/utils/invitationDisplay.js +1 -2
  95. package/dist/utils/nativeBridge.js +1 -2
  96. package/dist/utils/pinnedRequest.js +2 -3
  97. package/dist/utils/projectTags.js +2 -3
  98. package/dist/utils/slug.js +1 -2
  99. package/dist/utils/telemetryError.js +13 -16
  100. package/dist/utils/tokenHelpers.js +1 -2
  101. package/dist/utils/workspaceBulkInviteCsv.js +3 -8
  102. package/package.json +72 -55
@@ -1,25 +1,25 @@
1
- import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
- import { useWorkspacesEventEmitter as t } from "./useWorkspacesEventEmitter.js";
3
- import { captureRequestActor as n, pinnedFetch as r } from "../utils/pinnedRequest.js";
4
- import { safeTelemetryError as i } from "../utils/telemetryError.js";
1
+ import { captureRequestActor as e, pinnedFetch as t } from "../utils/pinnedRequest.js";
2
+ import { useWorkspacesContext as n } from "../providers/WorkspacesProvider.js";
3
+ import { safeTelemetryError as r } from "../utils/telemetryError.js";
4
+ import { useWorkspacesEventEmitter as i } from "./useWorkspacesEventEmitter.js";
5
5
  import { useMutation as a, useQueryClient as o } from "@tanstack/react-query";
6
- //#region src/hooks/useProjectMemberMutations.ts
6
+ // src/hooks/useProjectMemberMutations.ts
7
7
  var s = "\n mutation AddProjectMember($input: AddProjectMemberInput!) {\n addProjectMember(input: $input) {\n id\n projectId\n userId\n createdAt\n updatedAt\n deletedAt\n }\n }\n", c = "\n mutation RemoveProjectMember($input: RemoveProjectMemberInput!) {\n removeProjectMember(input: $input)\n }\n", l = (c) => {
8
- let { authToken: l, currentUser: u, workspaceId: d } = e(), f = o(), { emit: p } = t(), m = c || d;
8
+ let { authToken: l, currentUser: u, workspaceId: d } = n(), f = o(), { emit: p } = i(), m = c || d;
9
9
  return a({
10
- mutationFn: async (e) => {
11
- let t = await r(n({
10
+ mutationFn: async (n) => {
11
+ let r = e({
12
12
  authToken: l,
13
13
  currentUser: u
14
- }), {
14
+ }), i = await t(r, {
15
15
  gateway: "workspace",
16
16
  query: s,
17
- variables: { input: e },
17
+ variables: { input: n },
18
18
  workspaceId: m || void 0
19
19
  });
20
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
21
- if (!t.data?.addProjectMember) throw Error("No data returned from addProjectMember mutation");
22
- return t.data.addProjectMember;
20
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
21
+ if (!i.data?.addProjectMember) throw Error("No data returned from addProjectMember mutation");
22
+ return i.data.addProjectMember;
23
23
  },
24
24
  onSuccess: (e, t) => {
25
25
  f.invalidateQueries({ queryKey: [
@@ -48,26 +48,26 @@ var s = "\n mutation AddProjectMember($input: AddProjectMemberInput!) {\n ad
48
48
  userId: t?.userId,
49
49
  workspaceId: m || void 0,
50
50
  source: "microfe-workspaces",
51
- errorMessage: i(e)
51
+ errorMessage: r(e)
52
52
  });
53
53
  }
54
54
  });
55
55
  }, u = (s) => {
56
- let { authToken: l, currentUser: u, workspaceId: d } = e(), f = o(), { emit: p } = t(), m = s || d;
56
+ let { authToken: l, currentUser: u, workspaceId: d } = n(), f = o(), { emit: p } = i(), m = s || d;
57
57
  return a({
58
- mutationFn: async (e) => {
59
- let t = await r(n({
58
+ mutationFn: async (n) => {
59
+ let r = e({
60
60
  authToken: l,
61
61
  currentUser: u
62
- }), {
62
+ }), i = await t(r, {
63
63
  gateway: "workspace",
64
64
  query: c,
65
- variables: { input: e },
65
+ variables: { input: n },
66
66
  workspaceId: m || void 0
67
67
  });
68
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
69
- if (typeof t.data?.removeProjectMember != "boolean") throw Error("No data returned from removeProjectMember mutation");
70
- return t.data.removeProjectMember;
68
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
69
+ if (typeof i.data?.removeProjectMember != "boolean") throw Error("No data returned from removeProjectMember mutation");
70
+ return i.data.removeProjectMember;
71
71
  },
72
72
  onSuccess: (e, t) => {
73
73
  f.invalidateQueries({ queryKey: [
@@ -95,10 +95,9 @@ var s = "\n mutation AddProjectMember($input: AddProjectMemberInput!) {\n ad
95
95
  userId: t?.userId,
96
96
  workspaceId: m || void 0,
97
97
  source: "microfe-workspaces",
98
- errorMessage: i(e)
98
+ errorMessage: r(e)
99
99
  });
100
100
  }
101
101
  });
102
102
  };
103
- //#endregion
104
103
  export { l as useAddProjectMember, u as useRemoveProjectMember };
@@ -1,4 +1,4 @@
1
1
  import { PaginationInput, ProjectMember, ProjectMemberList } from '../types';
2
- export declare const useProjectMembers: (projectId: string, workspaceIdOverride?: string, pagination?: PaginationInput, enabled?: boolean) => import('@tanstack/react-query').UseQueryResult<NoInfer<ProjectMemberList>, Error>;
2
+ export declare const useProjectMembers: (projectId: string, workspaceIdOverride?: string, pagination?: PaginationInput, enabled?: boolean) => import('@tanstack/react-query').UseQueryResult<ProjectMemberList, Error>;
3
3
  export declare const useInfiniteProjectMembers: (projectId: string, workspaceIdOverride?: string, pageSize?: number, enabled?: boolean) => import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<ProjectMemberList, unknown>, Error>;
4
- export declare const useProjectMember: (id: string, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<ProjectMember>, Error>;
4
+ export declare const useProjectMember: (id: string, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<ProjectMember, Error>;
@@ -1,7 +1,7 @@
1
1
  import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
2
  import { useInfiniteQuery as t } from "@tanstack/react-query";
3
3
  import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
4
- //#region src/hooks/useProjectMembers.ts
4
+ // src/hooks/useProjectMembers.ts
5
5
  var r = "\n query GetProjectMembers($projectId: ID!, $pagination: PaginationInput) {\n projectMembers(filter: { projectId: $projectId }, pagination: $pagination) {\n items {\n id\n projectId\n userId\n createdAt\n updatedAt\n deletedAt\n }\n total\n hasMore\n }\n }\n", i = (i, a, o = 100, s = !0) => {
6
6
  let { authToken: c, workspaceId: l } = e(), u = a || l;
7
7
  return t({
@@ -33,8 +33,7 @@ var r = "\n query GetProjectMembers($projectId: ID!, $pagination: PaginationInp
33
33
  },
34
34
  getNextPageParam: (e, t, n) => e.hasMore ? Number(n) + o : void 0,
35
35
  enabled: s && !!i && !!u,
36
- staleTime: 60 * 1e3
36
+ staleTime: 6e4
37
37
  });
38
38
  };
39
- //#endregion
40
39
  export { i as useInfiniteProjectMembers };
@@ -1,28 +1,28 @@
1
- import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
- import { useWorkspacesEventEmitter as t } from "./useWorkspacesEventEmitter.js";
3
- import { captureRequestActor as n, pinnedFetch as r } from "../utils/pinnedRequest.js";
1
+ import { captureRequestActor as e, pinnedFetch as t } from "../utils/pinnedRequest.js";
2
+ import { useWorkspacesContext as n } from "../providers/WorkspacesProvider.js";
3
+ import { useWorkspacesEventEmitter as r } from "./useWorkspacesEventEmitter.js";
4
4
  import { safeTelemetryError as i } from "../utils/telemetryError.js";
5
5
  import { useMutation as a, useQueryClient as o } from "@tanstack/react-query";
6
- //#region src/hooks/useProjectMutations.ts
6
+ // src/hooks/useProjectMutations.ts
7
7
  var s = "\n mutation CreateProject($input: CreateProjectInput!) {\n createProject(input: $input) {\n id\n name\n key\n workspaceId\n creatorId\n status\n tags\n createdAt\n }\n }\n", c = "\n mutation UpdateProject($id: ID!, $input: UpdateProjectInput!) {\n updateProject(id: $id, input: $input) {\n id\n name\n key\n status\n config\n tags\n archived\n updatedAt\n }\n }\n", l = "\n mutation DeleteProject($id: ID!) {\n deleteProject(id: $id)\n }\n", u = "\n mutation ArchiveProject($id: ID!) {\n archiveProject(id: $id) {\n id\n archived\n updatedAt\n }\n }\n", d = "\n mutation UnarchiveProject($id: ID!) {\n unarchiveProject(id: $id) {\n id\n archived\n updatedAt\n }\n }\n", f = "\n mutation AssignProjectTag($input: AssignTagInput!) {\n assignTag(input: $input) {\n id\n tagId\n entityType\n entityId\n source\n assignedById\n createdAt\n validFrom\n validTo\n metadata\n }\n }\n", p = "\n query GetProjectTagAssignments($entityType: String!, $entityId: ID!) {\n getEntityTags(entityType: $entityType, entityId: $entityId) {\n id\n tagId\n }\n }\n", m = "\n mutation RemoveTagAssignment($id: ID!) {\n removeTagAssignment(id: $id)\n }\n";
8
8
  function h(e) {
9
9
  e.invalidateQueries({ queryKey: ["projects"] }), e.invalidateQueries({ queryKey: ["project"] }), e.invalidateQueries({ queryKey: ["myProjects"] }), e.invalidateQueries({ queryKey: ["dashboard", "projects"] });
10
10
  }
11
11
  var g = (c) => {
12
- let { authToken: l, currentUser: u, onProjectCreate: d, workspaceId: f } = e(), p = o(), { emit: m } = t(), g = c || f;
12
+ let { authToken: l, currentUser: u, onProjectCreate: d, workspaceId: f } = n(), p = o(), { emit: m } = r(), g = c || f;
13
13
  return a({
14
- mutationFn: async (e) => {
15
- let t = await r(n({
14
+ mutationFn: async (n) => {
15
+ let r = e({
16
16
  authToken: l,
17
17
  currentUser: u
18
- }), {
18
+ }), i = await t(r, {
19
19
  gateway: "workspace",
20
20
  query: s,
21
- variables: { input: e },
21
+ variables: { input: n },
22
22
  workspaceId: g || void 0
23
23
  });
24
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
25
- return t.data.createProject;
24
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
25
+ return i.data.createProject;
26
26
  },
27
27
  onSuccess: (e) => {
28
28
  h(p), m("project.created", {
@@ -40,23 +40,23 @@ var g = (c) => {
40
40
  }
41
41
  });
42
42
  }, _ = (s) => {
43
- let { authToken: l, currentUser: u, workspaceId: d } = e(), f = o(), { emit: p } = t(), m = s || d;
43
+ let { authToken: l, currentUser: u, workspaceId: d } = n(), f = o(), { emit: p } = r(), m = s || d;
44
44
  return a({
45
- mutationFn: async ({ id: e, input: t }) => {
46
- let i = await r(n({
45
+ mutationFn: async ({ id: n, input: r }) => {
46
+ let i = e({
47
47
  authToken: l,
48
48
  currentUser: u
49
- }), {
49
+ }), a = await t(i, {
50
50
  gateway: "workspace",
51
51
  query: c,
52
52
  variables: {
53
- id: e,
54
- input: t
53
+ id: n,
54
+ input: r
55
55
  },
56
56
  workspaceId: m || void 0
57
57
  });
58
- if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
59
- return i.data.updateProject;
58
+ if (a.errors?.length) throw Error(a.errors[0]?.message || "GraphQL error");
59
+ return a.data.updateProject;
60
60
  },
61
61
  onSuccess: (e) => {
62
62
  h(f), p("project.updated", {
@@ -75,40 +75,40 @@ var g = (c) => {
75
75
  }
76
76
  });
77
77
  }, v = (s) => {
78
- let { authToken: c, currentUser: l, workspaceId: u } = e(), d = o(), { emit: p } = t(), m = s || u;
78
+ let { authToken: c, currentUser: l, workspaceId: u } = n(), d = o(), { emit: p } = r(), m = s || u;
79
79
  return a({
80
- mutationFn: async (e) => {
81
- let t = await r(n({
80
+ mutationFn: async (n) => {
81
+ let r = e({
82
82
  authToken: c,
83
83
  currentUser: l
84
- }), {
84
+ }), i = await t(r, {
85
85
  gateway: "workspace",
86
86
  query: f,
87
87
  variables: { input: {
88
- tagId: e.tagId,
88
+ tagId: n.tagId,
89
89
  entityType: "WORKSPACE_PROJECT",
90
- entityId: e.entityId,
90
+ entityId: n.entityId,
91
91
  source: "MANUAL",
92
92
  context: {
93
93
  workspaceId: m,
94
- projectId: e.entityId
94
+ projectId: n.entityId
95
95
  }
96
96
  } },
97
97
  workspaceId: m || void 0
98
98
  });
99
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
100
- if (!t.data?.assignTag) throw Error("GraphQL error");
99
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
100
+ if (!i.data?.assignTag) throw Error("GraphQL error");
101
101
  return {
102
- id: t.data.assignTag.id,
103
- tagId: t.data.assignTag.tagId,
104
- entityType: t.data.assignTag.entityType,
105
- entityId: t.data.assignTag.entityId,
106
- source: t.data.assignTag.source,
107
- assignedBy: t.data.assignTag.assignedById ?? null,
108
- assignedAt: t.data.assignTag.createdAt ?? null,
109
- validFrom: t.data.assignTag.validFrom ?? null,
110
- validTo: t.data.assignTag.validTo ?? null,
111
- metadata: t.data.assignTag.metadata ?? null,
102
+ id: i.data.assignTag.id,
103
+ tagId: i.data.assignTag.tagId,
104
+ entityType: i.data.assignTag.entityType,
105
+ entityId: i.data.assignTag.entityId,
106
+ source: i.data.assignTag.source,
107
+ assignedBy: i.data.assignTag.assignedById ?? null,
108
+ assignedAt: i.data.assignTag.createdAt ?? null,
109
+ validFrom: i.data.assignTag.validFrom ?? null,
110
+ validTo: i.data.assignTag.validTo ?? null,
111
+ metadata: i.data.assignTag.metadata ?? null,
112
112
  tag: null
113
113
  };
114
114
  },
@@ -129,28 +129,28 @@ var g = (c) => {
129
129
  }
130
130
  });
131
131
  }, y = (s) => {
132
- let { authToken: c, currentUser: l, workspaceId: u } = e(), d = o(), { emit: f } = t(), g = s || u;
132
+ let { authToken: c, currentUser: l, workspaceId: u } = n(), d = o(), { emit: f } = r(), g = s || u;
133
133
  return a({
134
- mutationFn: async (e) => {
135
- let t = n({
134
+ mutationFn: async (n) => {
135
+ let r = e({
136
136
  authToken: c,
137
137
  currentUser: l
138
- }), i = e.assignmentId;
138
+ }), i = n.assignmentId;
139
139
  if (!i) {
140
- let n = await r(t, {
140
+ let e = await t(r, {
141
141
  gateway: "workspace",
142
142
  query: p,
143
143
  variables: {
144
144
  entityType: "WORKSPACE_PROJECT",
145
- entityId: e.entityId
145
+ entityId: n.entityId
146
146
  },
147
147
  workspaceId: g || void 0
148
148
  });
149
- if (n.errors?.length) throw Error(n.errors[0]?.message || "GraphQL error");
150
- i = n.data?.getEntityTags.find((t) => t.tagId === e.tagId)?.id;
149
+ if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
150
+ i = e.data?.getEntityTags.find((e) => e.tagId === n.tagId)?.id;
151
151
  }
152
152
  if (!i) return !1;
153
- let a = await r(t, {
153
+ let a = await t(r, {
154
154
  gateway: "workspace",
155
155
  query: m,
156
156
  variables: { id: i },
@@ -176,20 +176,20 @@ var g = (c) => {
176
176
  }
177
177
  });
178
178
  }, b = (s) => {
179
- let { authToken: c, currentUser: u, workspaceId: d } = e(), f = o(), { emit: p } = t(), m = s || d;
179
+ let { authToken: c, currentUser: u, workspaceId: d } = n(), f = o(), { emit: p } = r(), m = s || d;
180
180
  return a({
181
- mutationFn: async (e) => {
182
- let t = await r(n({
181
+ mutationFn: async (n) => {
182
+ let r = e({
183
183
  authToken: c,
184
184
  currentUser: u
185
- }), {
185
+ }), i = await t(r, {
186
186
  gateway: "workspace",
187
187
  query: l,
188
- variables: { id: e },
188
+ variables: { id: n },
189
189
  workspaceId: m || void 0
190
190
  });
191
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
192
- return t.data.deleteProject;
191
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
192
+ return i.data.deleteProject;
193
193
  },
194
194
  onSuccess: (e, t) => {
195
195
  h(f), p("project.deleted", {
@@ -207,20 +207,20 @@ var g = (c) => {
207
207
  }
208
208
  });
209
209
  }, x = (s) => {
210
- let { authToken: c, currentUser: l, workspaceId: d } = e(), f = o(), { emit: p } = t(), m = s || d;
210
+ let { authToken: c, currentUser: l, workspaceId: d } = n(), f = o(), { emit: p } = r(), m = s || d;
211
211
  return a({
212
- mutationFn: async (e) => {
213
- let t = await r(n({
212
+ mutationFn: async (n) => {
213
+ let r = e({
214
214
  authToken: c,
215
215
  currentUser: l
216
- }), {
216
+ }), i = await t(r, {
217
217
  gateway: "workspace",
218
218
  query: u,
219
- variables: { id: e },
219
+ variables: { id: n },
220
220
  workspaceId: m || void 0
221
221
  });
222
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
223
- return t.data.archiveProject;
222
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
223
+ return i.data.archiveProject;
224
224
  },
225
225
  onSuccess: (e) => {
226
226
  h(f), p("project.archived", {
@@ -239,20 +239,20 @@ var g = (c) => {
239
239
  }
240
240
  });
241
241
  }, S = (s) => {
242
- let { authToken: c, currentUser: l, workspaceId: u } = e(), f = o(), { emit: p } = t(), m = s || u;
242
+ let { authToken: c, currentUser: l, workspaceId: u } = n(), f = o(), { emit: p } = r(), m = s || u;
243
243
  return a({
244
- mutationFn: async (e) => {
245
- let t = await r(n({
244
+ mutationFn: async (n) => {
245
+ let r = e({
246
246
  authToken: c,
247
247
  currentUser: l
248
- }), {
248
+ }), i = await t(r, {
249
249
  gateway: "workspace",
250
250
  query: d,
251
- variables: { id: e },
251
+ variables: { id: n },
252
252
  workspaceId: m || void 0
253
253
  });
254
- if (t.errors?.length) throw Error(t.errors[0]?.message || "GraphQL error");
255
- return t.data.unarchiveProject;
254
+ if (i.errors?.length) throw Error(i.errors[0]?.message || "GraphQL error");
255
+ return i.data.unarchiveProject;
256
256
  },
257
257
  onSuccess: (e) => {
258
258
  h(f), p("project.unarchived", {
@@ -271,5 +271,4 @@ var g = (c) => {
271
271
  }
272
272
  });
273
273
  };
274
- //#endregion
275
274
  export { x as useArchiveProject, g as useCreateProject, b as useDeleteProject, v as useTagProject, S as useUnarchiveProject, y as useUntagProject, _ as useUpdateProject };
@@ -2,13 +2,13 @@ import { ProjectFilters, ProjectList, Project, PaginationInput } from '../types'
2
2
  /**
3
3
  * Hook to fetch all projects with filtering and pagination
4
4
  */
5
- export declare const useProjects: (filters?: ProjectFilters, pagination?: PaginationInput, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<ProjectList>, Error>;
5
+ export declare const useProjects: (filters?: ProjectFilters, pagination?: PaginationInput, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<ProjectList, Error>;
6
6
  /**
7
7
  * Hook to fetch a single project by ID
8
8
  */
9
- export declare const useProject: (id: string, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<Project>, Error>;
9
+ export declare const useProject: (id: string, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<Project, Error>;
10
10
  /**
11
11
  * Hook to fetch current user's projects
12
12
  */
13
- export declare const useMyProjects: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<ProjectList>, Error>;
13
+ export declare const useMyProjects: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<ProjectList, Error>;
14
14
  export declare const useProjectMembersCount: (projectId: string, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<number, Error>;
@@ -1,7 +1,7 @@
1
1
  import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
2
  import { useQuery as t } from "@tanstack/react-query";
3
3
  import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
4
- //#region src/hooks/useProjects.ts
4
+ // src/hooks/useProjects.ts
5
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 tagAssignments {\n id\n tagId\n entityType\n entityId\n source\n assignedBy\n assignedAt\n validFrom\n validTo\n metadata\n tag {\n id\n key\n label\n value\n vocabularyId\n parentId\n hierarchyPath\n color\n icon\n description\n vocabulary {\n key\n }\n }\n }\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 tagAssignments {\n id\n tagId\n entityType\n entityId\n source\n assignedBy\n assignedAt\n validFrom\n validTo\n metadata\n tag {\n id\n key\n label\n value\n vocabularyId\n parentId\n hierarchyPath\n color\n icon\n description\n vocabulary {\n key\n }\n }\n }\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 tagAssignments {\n id\n tagId\n entityType\n entityId\n source\n assignedBy\n assignedAt\n validFrom\n validTo\n metadata\n tag {\n id\n key\n label\n value\n vocabularyId\n parentId\n hierarchyPath\n color\n icon\n description\n vocabulary {\n key\n }\n }\n }\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
6
  let { authToken: s, workspaceId: c } = e(), l = i?.workspaceId || o || c;
7
7
  return t({
@@ -30,7 +30,7 @@ var r = "\n query GetProjects($filter: ProjectFilterInput, $pagination: Paginat
30
30
  return e.data.projects;
31
31
  },
32
32
  enabled: !!l,
33
- staleTime: 300 * 1e3
33
+ staleTime: 3e5
34
34
  });
35
35
  }, c = (r, a) => {
36
36
  let { authToken: o, workspaceId: s } = e(), c = a || s;
@@ -53,7 +53,7 @@ var r = "\n query GetProjects($filter: ProjectFilterInput, $pagination: Paginat
53
53
  return e.data.project;
54
54
  },
55
55
  enabled: !!r,
56
- staleTime: 300 * 1e3
56
+ staleTime: 3e5
57
57
  });
58
58
  }, l = (r) => {
59
59
  let { authToken: i, workspaceId: o } = e();
@@ -75,7 +75,7 @@ var r = "\n query GetProjects($filter: ProjectFilterInput, $pagination: Paginat
75
75
  if (e.errors?.length) throw Error(e.errors[0]?.message || "GraphQL error");
76
76
  return e.data.myProjects;
77
77
  },
78
- staleTime: 300 * 1e3
78
+ staleTime: 3e5
79
79
  });
80
80
  }, u = (r, i) => {
81
81
  let { authToken: a, workspaceId: s } = e(), c = i || s;
@@ -98,8 +98,7 @@ var r = "\n query GetProjects($filter: ProjectFilterInput, $pagination: Paginat
98
98
  return e.data?.projectMembers.total ?? 0;
99
99
  },
100
100
  enabled: !!r && !!c,
101
- staleTime: 60 * 1e3
101
+ staleTime: 6e4
102
102
  });
103
103
  };
104
- //#endregion
105
104
  export { l as useMyProjects, c as useProject, u as useProjectMembersCount, s as useProjects };
@@ -1,9 +1,8 @@
1
1
  import { useCallback as e } from "react";
2
2
  import { useLocation as t } from "react-router";
3
- //#region src/hooks/useScopedNavigation.ts
3
+ // src/hooks/useScopedNavigation.ts
4
4
  function n() {
5
5
  let n = t();
6
6
  return { withCurrentSearch: e((e) => `${e}${n.search || ""}`, [n.search]) };
7
7
  }
8
- //#endregion
9
8
  export { n as useScopedNavigation };
@@ -3,9 +3,9 @@ import { TenantList, OrganizationList, PaginationInput } from '../types';
3
3
  * Hook to fetch tenants accessible to the current user
4
4
  * Uses the global gateway (tenant supergraph) to query myTenants
5
5
  */
6
- export declare const useMyTenants: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TenantList>, Error>;
6
+ export declare const useMyTenants: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<TenantList, Error>;
7
7
  /**
8
8
  * Hook to fetch organizations accessible to the current user
9
9
  * Uses the global gateway to query myOrganizations
10
10
  */
11
- export declare const useMyOrganizations: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<OrganizationList>, Error>;
11
+ export declare const useMyOrganizations: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<OrganizationList, Error>;
@@ -1,7 +1,7 @@
1
1
  import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
2
  import { useQuery as t } from "@tanstack/react-query";
3
3
  import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
4
- //#region src/hooks/useTenants.ts
4
+ // src/hooks/useTenants.ts
5
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
6
  let { authToken: a } = e();
7
7
  return t({
@@ -19,7 +19,7 @@ var r = "\n query GetMyTenants($limit: Int, $offset: Int) {\n myTenants(limi
19
19
  if (e.errors?.length) throw Error(e.errors[0]?.message || "Failed to fetch tenants");
20
20
  return e.data.myTenants;
21
21
  },
22
- staleTime: 300 * 1e3
22
+ staleTime: 3e5
23
23
  });
24
24
  }, o = (r) => {
25
25
  let { authToken: a } = e();
@@ -38,8 +38,7 @@ var r = "\n query GetMyTenants($limit: Int, $offset: Int) {\n myTenants(limi
38
38
  if (e.errors?.length) throw Error(e.errors[0]?.message || "Failed to fetch organizations");
39
39
  return e.data.myOrganizations;
40
40
  },
41
- staleTime: 300 * 1e3
41
+ staleTime: 3e5
42
42
  });
43
43
  };
44
- //#endregion
45
44
  export { o as useMyOrganizations, a as useMyTenants };
@@ -1,6 +1,6 @@
1
1
  import { useCallback as e } from "react";
2
2
  import { useI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
3
- //#region src/hooks/useTr.ts
3
+ // src/hooks/useTr.ts
4
4
  function n() {
5
5
  let { t: n } = t();
6
6
  return e((e, t, r) => {
@@ -8,5 +8,4 @@ function n() {
8
8
  return r ? Object.entries(r).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${t}\\}\\}`, "g"), String(n)), a) : a;
9
9
  }, [n]);
10
10
  }
11
- //#endregion
12
11
  export { n as useTr };
@@ -8,4 +8,4 @@ export interface WorkspaceActivityItem {
8
8
  details?: Record<string, unknown> | null;
9
9
  timestamp: string;
10
10
  }
11
- export declare const useWorkspaceActivity: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceActivityItem[]>, Error>;
11
+ export declare const useWorkspaceActivity: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<WorkspaceActivityItem[], Error>;
@@ -1,7 +1,7 @@
1
1
  import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
2
  import { useQuery as t } from "@tanstack/react-query";
3
3
  import { graphqlFetch as n } from "@burdenoff/fe-libs/shared/graphql";
4
- //#region src/hooks/useWorkspaceActivity.ts
4
+ // src/hooks/useWorkspaceActivity.ts
5
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
6
  let { authToken: a, workspaceId: o } = e(), s = i || o;
7
7
  return t({
@@ -22,8 +22,7 @@ var r = "\n query GetRecentWorkspaceActivities($workspaceId: ID, $limit: Int) {
22
22
  return e.data?.getRecentActivities ?? [];
23
23
  },
24
24
  enabled: !!s,
25
- staleTime: 60 * 1e3
25
+ staleTime: 6e4
26
26
  });
27
27
  };
28
- //#endregion
29
28
  export { i as useWorkspaceActivity };
@@ -2,24 +2,24 @@ import { MemberList, WorkspaceMember, WorkspaceInvitation, InvitationList, Pagin
2
2
  /**
3
3
  * Hook to fetch all members of the current workspace
4
4
  */
5
- export declare const useWorkspaceMembers: (workspaceId: string, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<MemberList>, Error>;
5
+ export declare const useWorkspaceMembers: (workspaceId: string, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<MemberList, Error>;
6
6
  export declare const useInfiniteWorkspaceMembers: (workspaceId: string, pageSize?: number, enabled?: boolean) => import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<MemberList, unknown>, Error>;
7
7
  /**
8
8
  * Hook to fetch a single workspace member by ID
9
9
  */
10
- export declare const useWorkspaceMember: (id: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceMember>, Error>;
10
+ export declare const useWorkspaceMember: (id: string) => import('@tanstack/react-query').UseQueryResult<WorkspaceMember, Error>;
11
11
  /**
12
12
  * Hook to fetch all workspaces a user is a member of
13
13
  */
14
- export declare const useUserWorkspaces: (userId: string, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<MemberList>, Error>;
14
+ export declare const useUserWorkspaces: (userId: string, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<MemberList, Error>;
15
15
  /**
16
16
  * Hook to fetch workspace invitations
17
17
  * Requires x-workspace-id header for workspace context
18
18
  */
19
19
  export declare const useWorkspaceInvitations: (workspaceId: string, status?: InvitationStatus, pagination?: PaginationInput, options?: {
20
20
  retry?: boolean | number;
21
- }) => import('@tanstack/react-query').UseQueryResult<NoInfer<InvitationList>, Error>;
21
+ }) => import('@tanstack/react-query').UseQueryResult<InvitationList, Error>;
22
22
  /**
23
23
  * Hook to get a single invitation by ID (for acceptance page)
24
24
  */
25
- export declare const useInvitation: (id: string, enabled?: boolean) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceInvitation>, Error>;
25
+ export declare const useInvitation: (id: string, enabled?: boolean) => import('@tanstack/react-query').UseQueryResult<WorkspaceInvitation, Error>;
@@ -3,7 +3,7 @@ import { GetInvitationDocument as t, GetUserWorkspacesDocument as n, GetWorkspac
3
3
  import { useInfiniteQuery as o, useQuery as s } from "@tanstack/react-query";
4
4
  import { print as c } from "graphql";
5
5
  import { graphqlFetch as l } from "@burdenoff/fe-libs/shared/graphql";
6
- //#region src/hooks/useWorkspaceMembers.ts
6
+ // src/hooks/useWorkspaceMembers.ts
7
7
  var u = (t, n) => {
8
8
  let { authToken: r } = e();
9
9
  return s({
@@ -29,7 +29,7 @@ var u = (t, n) => {
29
29
  return e.data.workspaceMembers;
30
30
  },
31
31
  enabled: !!t,
32
- staleTime: 300 * 1e3
32
+ staleTime: 3e5
33
33
  });
34
34
  }, d = (t, n = 100, r = !0) => {
35
35
  let { authToken: i } = e();
@@ -61,7 +61,7 @@ var u = (t, n) => {
61
61
  },
62
62
  getNextPageParam: (e, t, r) => e.hasMore ? Number(r) + n : void 0,
63
63
  enabled: r && !!t,
64
- staleTime: 300 * 1e3
64
+ staleTime: 3e5
65
65
  });
66
66
  }, f = (t) => {
67
67
  let { authToken: n, workspaceId: r } = e();
@@ -85,7 +85,7 @@ var u = (t, n) => {
85
85
  return e.data.workspaceMember;
86
86
  },
87
87
  enabled: !!t,
88
- staleTime: 300 * 1e3
88
+ staleTime: 3e5
89
89
  });
90
90
  }, p = (t, r) => {
91
91
  let { authToken: i, workspaceId: a } = e();
@@ -112,7 +112,7 @@ var u = (t, n) => {
112
112
  return e.data.userWorkspaces;
113
113
  },
114
114
  enabled: !!t,
115
- staleTime: 300 * 1e3
115
+ staleTime: 3e5
116
116
  });
117
117
  }, m = (t, n, i, a) => {
118
118
  let { authToken: o } = e();
@@ -141,7 +141,7 @@ var u = (t, n) => {
141
141
  },
142
142
  enabled: !!t,
143
143
  retry: a?.retry,
144
- staleTime: 300 * 1e3
144
+ staleTime: 3e5
145
145
  });
146
146
  }, h = (n, r = !0) => {
147
147
  let { authToken: i } = e();
@@ -160,8 +160,7 @@ var u = (t, n) => {
160
160
  },
161
161
  enabled: !!n && r,
162
162
  retry: 1,
163
- staleTime: 300 * 1e3
163
+ staleTime: 3e5
164
164
  });
165
165
  };
166
- //#endregion
167
166
  export { d as useInfiniteWorkspaceMembers, h as useInvitation, p as useUserWorkspaces, m as useWorkspaceInvitations, f as useWorkspaceMember, u as useWorkspaceMembers };