@burdenoff/microfe-workspaces 2026.1014.1 → 2026.1016.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 (98) hide show
  1. package/dist/WorkspacesRoot.d.ts +33 -0
  2. package/dist/WorkspacesRoutes.d.ts +9 -0
  3. package/dist/components/CreateProjectDialog.d.ts +5 -0
  4. package/dist/components/CreateWorkspaceDialog.d.ts +1 -0
  5. package/dist/components/InviteMemberDialog.d.ts +6 -0
  6. package/dist/components/MemberListItem.d.ts +9 -0
  7. package/dist/components/ProjectCard.d.ts +13 -0
  8. package/dist/components/ProjectMemberPickerDialog.d.ts +8 -0
  9. package/dist/components/RenameProjectDialog.d.ts +11 -0
  10. package/dist/components/WorkspaceCard.d.ts +6 -0
  11. package/dist/components/WorkspaceContextPathSync.d.ts +23 -0
  12. package/dist/components/WorkspacesErrorBoundary.d.ts +28 -0
  13. package/dist/components/index.d.ts +7 -0
  14. package/dist/components/tags/ProjectTagsWidget.d.ts +21 -0
  15. package/dist/components/tags/ProjectTagsWidget.js +38 -38
  16. package/dist/constants/permissions.d.ts +32 -0
  17. package/dist/generated/global-operations.d.ts +257 -0
  18. package/dist/generated/global-operations.js +844 -152
  19. package/dist/generated/global-types.d.ts +23507 -0
  20. package/dist/generated/wspace-operations.d.ts +1457 -0
  21. package/dist/generated/wspace-operations.js +4277 -626
  22. package/dist/generated/wspace-types.d.ts +57824 -0
  23. package/dist/hooks/index.d.ts +8 -0
  24. package/dist/hooks/useMemberMutations.d.ts +59 -0
  25. package/dist/hooks/useOrgsWithPermission.d.ts +6 -0
  26. package/dist/hooks/usePendingInvitations.d.ts +7 -0
  27. package/dist/hooks/useProjectMemberMutations.d.ts +3 -0
  28. package/dist/hooks/useProjectMembers.d.ts +4 -0
  29. package/dist/hooks/useProjectMutations.d.ts +39 -0
  30. package/dist/hooks/useProjects.d.ts +14 -0
  31. package/dist/hooks/useScopedNavigation.d.ts +3 -0
  32. package/dist/hooks/useTenants.d.ts +11 -0
  33. package/dist/hooks/useTr.d.ts +26 -0
  34. package/dist/hooks/useWorkspaceActivity.d.ts +11 -0
  35. package/dist/hooks/useWorkspaceMembers.d.ts +25 -0
  36. package/dist/hooks/useWorkspaceMutations.d.ts +34 -0
  37. package/dist/hooks/useWorkspacePermissions.d.ts +32 -0
  38. package/dist/hooks/useWorkspaceRoles.d.ts +12 -0
  39. package/dist/hooks/useWorkspaces.d.ts +19 -0
  40. package/dist/hooks/useWorkspacesEventEmitter.d.ts +16 -0
  41. package/dist/hooks/useWorkspacesPageView.d.ts +26 -0
  42. package/dist/index.d.ts +35 -0
  43. package/dist/pages/ActivityListPage.d.ts +1 -0
  44. package/dist/pages/CreateWorkspacePage.d.ts +1 -0
  45. package/dist/pages/InviteAcceptancePage.d.ts +5 -0
  46. package/dist/pages/MembersListPage.d.ts +1 -0
  47. package/dist/pages/PendingInvitesPage.d.ts +1 -0
  48. package/dist/pages/ProjectDetailPage.d.ts +1 -0
  49. package/dist/pages/ProjectMembersPage.d.ts +1 -0
  50. package/dist/pages/ProjectsListPage.d.ts +1 -0
  51. package/dist/pages/WorkspaceDetailPage.d.ts +1 -0
  52. package/dist/pages/WorkspaceInvitePage.d.ts +1 -0
  53. package/dist/pages/WorkspaceSettingsPage.d.ts +1 -0
  54. package/dist/pages/WorkspaceSettingsPage.js +38 -37
  55. package/dist/pages/WorkspacesListPage.d.ts +1 -0
  56. package/dist/pages/dashboard/DashboardCustomizer.d.ts +11 -0
  57. package/dist/pages/dashboard/DashboardGrid.d.ts +6 -0
  58. package/dist/pages/dashboard/DashboardPage.d.ts +19 -0
  59. package/dist/pages/dashboard/WidgetWrapper.d.ts +16 -0
  60. package/dist/pages/dashboard/config.d.ts +27 -0
  61. package/dist/pages/dashboard/hooks/useDashboardData.d.ts +13 -0
  62. package/dist/pages/dashboard/hooks/useDashboardPreferences.d.ts +2 -0
  63. package/dist/pages/dashboard/reorder.d.ts +26 -0
  64. package/dist/pages/dashboard/types.d.ts +197 -0
  65. package/dist/pages/dashboard/widgets/AgentsWidget.d.ts +2 -0
  66. package/dist/pages/dashboard/widgets/GroupsWidget.d.ts +2 -0
  67. package/dist/pages/dashboard/widgets/MembersWidget.d.ts +2 -0
  68. package/dist/pages/dashboard/widgets/ProjectsWidget.d.ts +2 -0
  69. package/dist/pages/dashboard/widgets/QuickActionsWidget.d.ts +2 -0
  70. package/dist/pages/dashboard/widgets/RecentActivityWidget.d.ts +2 -0
  71. package/dist/pages/dashboard/widgets/SessionsWidget.d.ts +2 -0
  72. package/dist/pages/dashboard/widgets/StorageWidget.d.ts +2 -0
  73. package/dist/pages/dashboard/widgets/StorageWidget.js +2 -2
  74. package/dist/pages/dashboard/widgets/TagCloudWidget.d.ts +2 -0
  75. package/dist/pages/dashboard/widgets/TipsWidget.d.ts +2 -0
  76. package/dist/pages/dashboard/widgets/UpcomingEventsWidget.d.ts +2 -0
  77. package/dist/pages/dashboard/widgets/VibesWidget.d.ts +2 -0
  78. package/dist/pages/dashboard/widgets/WelcomeWidget.d.ts +2 -0
  79. package/dist/pages/dashboard/widgets/WorkflowRunsWidget.d.ts +2 -0
  80. package/dist/pages/dashboard/widgets/WorkflowStatsWidget.d.ts +2 -0
  81. package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.d.ts +2 -0
  82. package/dist/pages/dashboard/widgets/WorkspacesWidget.d.ts +2 -0
  83. package/dist/providers/WorkspacesProvider.d.ts +11 -0
  84. package/dist/store/workspacesStore.d.ts +80 -0
  85. package/dist/translations/en.d.ts +921 -0
  86. package/dist/types/index.d.ts +336 -0
  87. package/dist/utils/formatters.d.ts +53 -0
  88. package/dist/utils/formatters.js +1 -1
  89. package/dist/utils/i18n.d.ts +11 -0
  90. package/dist/utils/index.d.ts +2 -0
  91. package/dist/utils/invitationDisplay.d.ts +6 -0
  92. package/dist/utils/nativeBridge.d.ts +2 -0
  93. package/dist/utils/projectTags.d.ts +6 -0
  94. package/dist/utils/slug.d.ts +12 -0
  95. package/dist/utils/telemetryError.d.ts +1 -0
  96. package/dist/utils/tokenHelpers.d.ts +112 -0
  97. package/dist/utils/workspaceBulkInviteCsv.d.ts +9 -0
  98. package/package.json +38 -24
@@ -0,0 +1,8 @@
1
+ export * from './useWorkspaces';
2
+ export * from './useWorkspaceMutations';
3
+ export * from './useProjects';
4
+ export * from './useProjectMutations';
5
+ export * from './useWorkspaceMembers';
6
+ export * from './usePendingInvitations';
7
+ export * from './useMemberMutations';
8
+ export * from './useTenants';
@@ -0,0 +1,59 @@
1
+ import { WorkspaceMember, WorkspaceInvitation, AddWorkspaceMemberInput, CreateInvitationInput, UpdateInvitationInput } from '../types';
2
+ /**
3
+ * Hook to add a member to a workspace
4
+ * Requires x-workspace-id header for workspace context
5
+ */
6
+ export declare const useAddWorkspaceMember: () => import('@tanstack/react-query').UseMutationResult<WorkspaceMember, Error, AddWorkspaceMemberInput, unknown>;
7
+ /**
8
+ * Hook to remove a member from a workspace by member ID
9
+ */
10
+ export declare const useRemoveWorkspaceMember: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
11
+ /**
12
+ * Hook to remove a user from a workspace
13
+ * Requires x-workspace-id header for workspace context
14
+ */
15
+ export declare const useRemoveUserFromWorkspace: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
16
+ /**
17
+ * NOTE: The updateWorkspaceMemberRoles mutation has been removed from the backend.
18
+ * Role management is now handled via invitations - when creating an invitation,
19
+ * you can specify roleIds that will be assigned when the invitation is accepted.
20
+ *
21
+ * Use CreateInvitationInput.roleIds to assign roles to new members.
22
+ */
23
+ /**
24
+ * Hook to create a workspace invitation
25
+ * Uses x-workspace-id header as fallback when input.workspaceId is not provided
26
+ */
27
+ export declare const useCreateInvitation: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<WorkspaceInvitation, Error, CreateInvitationInput, unknown>;
28
+ /**
29
+ * Hook to update an invitation
30
+ */
31
+ export declare const useUpdateInvitation: () => import('@tanstack/react-query').UseMutationResult<WorkspaceInvitation, Error, {
32
+ id: string;
33
+ input: UpdateInvitationInput;
34
+ }, unknown>;
35
+ /**
36
+ * Hook to accept an invitation
37
+ */
38
+ export declare const useAcceptInvitation: () => import('@tanstack/react-query').UseMutationResult<WorkspaceInvitation, Error, string, unknown>;
39
+ /**
40
+ * Hook to reject an invitation
41
+ */
42
+ export declare const useRejectInvitation: () => import('@tanstack/react-query').UseMutationResult<WorkspaceInvitation, Error, string, unknown>;
43
+ /**
44
+ * Hook to cancel an invitation
45
+ */
46
+ export declare const useCancelInvitation: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<WorkspaceInvitation, Error, string, unknown>;
47
+ /**
48
+ * Hook to resend an invitation
49
+ */
50
+ export declare const useResendInvitation: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<WorkspaceInvitation, Error, string, unknown>;
51
+ /**
52
+ * Hook to delete an invitation
53
+ */
54
+ export declare const useDeleteInvitation: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
55
+ /**
56
+ * Hook to bulk create invitations
57
+ * Uses x-workspace-id header as fallback when inputs[].workspaceId is not provided
58
+ */
59
+ export declare const useBulkCreateInvitations: () => import('@tanstack/react-query').UseMutationResult<WorkspaceInvitation[], Error, CreateInvitationInput[], unknown>;
@@ -0,0 +1,6 @@
1
+ export interface UseOrgsWithPermissionResult {
2
+ allowedIds: Set<string>;
3
+ loading: boolean;
4
+ isError: boolean;
5
+ }
6
+ export declare function useOrgsWithPermission(orgIds: readonly string[], resourceType: string, action: string): UseOrgsWithPermissionResult;
@@ -0,0 +1,7 @@
1
+ import { WorkspaceInvitation } from '../types';
2
+ /**
3
+ * Hook to fetch all pending invitations for the authenticated user's email.
4
+ * Kept in its own module so route-level consumers do not depend on the larger
5
+ * workspace-members hook module just to render the invites surfaces.
6
+ */
7
+ export declare const useMyPendingInvitations: (email?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceInvitation[]>, Error>;
@@ -0,0 +1,3 @@
1
+ import { AddProjectMemberInput, ProjectMember, RemoveProjectMemberInput } from '../types';
2
+ export declare const useAddProjectMember: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<ProjectMember, Error, AddProjectMemberInput, unknown>;
3
+ export declare const useRemoveProjectMember: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<boolean, Error, RemoveProjectMemberInput, unknown>;
@@ -0,0 +1,4 @@
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>;
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>;
@@ -0,0 +1,39 @@
1
+ import { CreateProjectInput, UpdateProjectInput, Project, ProjectTagAssignment } from '../types';
2
+ /**
3
+ * Hook to create a new project
4
+ */
5
+ export declare const useCreateProject: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<Project, Error, CreateProjectInput, unknown>;
6
+ /**
7
+ * Hook to update an existing project
8
+ */
9
+ export declare const useUpdateProject: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<Project, Error, {
10
+ id: string;
11
+ input: UpdateProjectInput;
12
+ }, unknown>;
13
+ /**
14
+ * Hook to assign a structured tag to a project.
15
+ */
16
+ export declare const useTagProject: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<ProjectTagAssignment, Error, {
17
+ entityId: string;
18
+ tagId: string;
19
+ }, unknown>;
20
+ /**
21
+ * Hook to remove a structured tag from a project.
22
+ */
23
+ export declare const useUntagProject: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<boolean, Error, {
24
+ entityId: string;
25
+ tagId: string;
26
+ assignmentId?: string;
27
+ }, unknown>;
28
+ /**
29
+ * Hook to delete a project
30
+ */
31
+ export declare const useDeleteProject: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
32
+ /**
33
+ * Hook to archive a project
34
+ */
35
+ export declare const useArchiveProject: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<Project, Error, string, unknown>;
36
+ /**
37
+ * Hook to unarchive a project
38
+ */
39
+ export declare const useUnarchiveProject: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseMutationResult<Project, Error, string, unknown>;
@@ -0,0 +1,14 @@
1
+ import { ProjectFilters, ProjectList, Project, PaginationInput } from '../types';
2
+ /**
3
+ * Hook to fetch all projects with filtering and pagination
4
+ */
5
+ export declare const useProjects: (filters?: ProjectFilters, pagination?: PaginationInput, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<ProjectList>, Error>;
6
+ /**
7
+ * Hook to fetch a single project by ID
8
+ */
9
+ export declare const useProject: (id: string, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<Project>, Error>;
10
+ /**
11
+ * Hook to fetch current user's projects
12
+ */
13
+ export declare const useMyProjects: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<ProjectList>, Error>;
14
+ export declare const useProjectMembersCount: (projectId: string, workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<number, Error>;
@@ -0,0 +1,3 @@
1
+ export declare function useScopedNavigation(): {
2
+ withCurrentSearch: (path: string) => string;
3
+ };
@@ -0,0 +1,11 @@
1
+ import { TenantList, OrganizationList, PaginationInput } from '../types';
2
+ /**
3
+ * Hook to fetch tenants accessible to the current user
4
+ * Uses the global gateway (tenant supergraph) to query myTenants
5
+ */
6
+ export declare const useMyTenants: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<TenantList>, Error>;
7
+ /**
8
+ * Hook to fetch organizations accessible to the current user
9
+ * Uses the global gateway to query myOrganizations
10
+ */
11
+ export declare const useMyOrganizations: (pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<OrganizationList>, Error>;
@@ -0,0 +1,26 @@
1
+ export type TFunction = (key: string, fallbackOrParams?: string | Record<string, string | number>, params?: Record<string, string | number>) => string;
2
+ export type TrFunction = (key: string, fallback: string, params?: Record<string, string | number>) => string;
3
+ /**
4
+ * Builds a translator function with fallback semantics for the given `t`.
5
+ *
6
+ * When `t(key)` returns the key itself (no translation found), the caller's
7
+ * English `fallback` is used instead. Optional interpolation params use
8
+ * `{{key}}` placeholders in both the translated and fallback strings.
9
+ */
10
+ export declare function createTr(t: TFunction): TrFunction;
11
+ /**
12
+ * useTr — translation hook with fallback semantics.
13
+ *
14
+ * Wraps `useI18n().t()` so that when a key has no translation (i.e. the
15
+ * provider returns the key itself), the caller's English fallback is used
16
+ * instead. This keeps consumer call sites consistent and avoids leaking
17
+ * untranslated keys into the UI.
18
+ *
19
+ * Supports optional interpolation params using `{{key}}` placeholders.
20
+ *
21
+ * @example
22
+ * const tr = useTr();
23
+ * return <h1>{tr('workspaces.dashboard.title', 'Dashboard')}</h1>;
24
+ * return <p>{tr('workspaces.delete.confirm', 'Delete {{count}} items?', { count: 5 })}</p>;
25
+ */
26
+ export declare function useTr(): TrFunction;
@@ -0,0 +1,11 @@
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<NoInfer<WorkspaceActivityItem[]>, Error>;
@@ -0,0 +1,25 @@
1
+ import { MemberList, WorkspaceMember, WorkspaceInvitation, InvitationList, PaginationInput, InvitationStatus } from '../types';
2
+ /**
3
+ * Hook to fetch all members of the current workspace
4
+ */
5
+ export declare const useWorkspaceMembers: (workspaceId: string, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<MemberList>, Error>;
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
+ /**
8
+ * Hook to fetch a single workspace member by ID
9
+ */
10
+ export declare const useWorkspaceMember: (id: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<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<NoInfer<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, options?: {
20
+ retry?: boolean | number;
21
+ }) => import('@tanstack/react-query').UseQueryResult<NoInfer<InvitationList>, Error>;
22
+ /**
23
+ * Hook to get a single invitation by ID (for acceptance page)
24
+ */
25
+ export declare const useInvitation: (id: string, enabled?: boolean) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceInvitation>, Error>;
@@ -0,0 +1,34 @@
1
+ import { CreateWorkspaceInput, UpdateWorkspaceInput, Workspace } from '../types';
2
+ /**
3
+ * Hook to create a new workspace
4
+ *
5
+ * Creates workspace via global-tenant-svc (global gateway), which then
6
+ * automatically syncs to wspace-workspace-svc. This ensures proper
7
+ * tenant/org hierarchy management in the global layer.
8
+ *
9
+ * Required input fields:
10
+ * - tenantId: Select from myTenants query
11
+ * - organizationId: Select from myOrganizations query
12
+ * - name: Display name
13
+ * - slug: URL-friendly identifier (unique within tenant)
14
+ */
15
+ export declare const useCreateWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, CreateWorkspaceInput, unknown>;
16
+ /**
17
+ * Hook to update an existing workspace
18
+ */
19
+ export declare const useUpdateWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, {
20
+ id: string;
21
+ input: UpdateWorkspaceInput;
22
+ }, unknown>;
23
+ /**
24
+ * Hook to delete a workspace
25
+ */
26
+ export declare const useDeleteWorkspace: () => import('@tanstack/react-query').UseMutationResult<boolean, Error, string, unknown>;
27
+ /**
28
+ * Hook to archive a workspace
29
+ */
30
+ export declare const useArchiveWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, string, unknown>;
31
+ /**
32
+ * Hook to reactivate an archived workspace
33
+ */
34
+ export declare const useReactivateWorkspace: () => import('@tanstack/react-query').UseMutationResult<Workspace, Error, string, unknown>;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Workspace MFE - Permission Hook
3
+ *
4
+ * Wraps usePermissions() with typed permission flags for all workspace resources.
5
+ */
6
+ export declare function useWorkspacePermissions(): {
7
+ isLoading: boolean;
8
+ canListWorkspaces: boolean;
9
+ canViewWorkspace: boolean;
10
+ canCreateWorkspace: boolean;
11
+ canUpdateWorkspace: boolean;
12
+ canDeleteWorkspace: boolean;
13
+ canArchiveWorkspace: boolean;
14
+ canListMembers: boolean;
15
+ canViewMember: boolean;
16
+ canInviteMember: boolean;
17
+ canUpdateMember: boolean;
18
+ canRemoveMember: boolean;
19
+ canListProjects: boolean;
20
+ canViewProject: boolean;
21
+ canCreateProject: boolean;
22
+ canUpdateProject: boolean;
23
+ canDeleteProject: boolean;
24
+ canArchiveProject: boolean;
25
+ canListProjectMembers: boolean;
26
+ canViewProjectMember: boolean;
27
+ canAddProjectMember: boolean;
28
+ canRemoveProjectMember: boolean;
29
+ canViewSettings: boolean;
30
+ canUpdateSettings: boolean;
31
+ canViewActivity: boolean;
32
+ };
@@ -0,0 +1,12 @@
1
+ export interface WorkspaceRoleOption {
2
+ id: string;
3
+ name: string;
4
+ description?: string | null;
5
+ isSystem: boolean;
6
+ }
7
+ interface GraphqlErrorLike {
8
+ message?: string | null;
9
+ }
10
+ export declare function isUnsupportedProductRoleFilterError(errors: readonly GraphqlErrorLike[]): boolean;
11
+ export declare const useWorkspaceRoles: (workspaceIdOverride?: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceRoleOption[]>, Error>;
12
+ export {};
@@ -0,0 +1,19 @@
1
+ import { WorkspaceFilters, WorkspaceList, Workspace, PaginationInput } from '../types';
2
+ /**
3
+ * Hook to fetch all workspaces with filtering and pagination
4
+ * Uses workspace token for authorization (x-workspace-id header)
5
+ */
6
+ export declare const useWorkspaces: (filters?: WorkspaceFilters, pagination?: PaginationInput) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceList>, Error>;
7
+ /**
8
+ * Hook to fetch a single workspace by ID
9
+ * Uses workspace token for authorization (x-workspace-id header)
10
+ */
11
+ export declare const useWorkspace: (id: string) => import('@tanstack/react-query').UseQueryResult<NoInfer<Workspace>, Error>;
12
+ /**
13
+ * Hook to fetch current user's workspaces
14
+ * NOTE: Uses global gateway because workspace listing is managed at the global/tenant layer
15
+ */
16
+ export declare const useMyWorkspaces: (pagination?: {
17
+ limit?: number;
18
+ offset?: number;
19
+ }) => import('@tanstack/react-query').UseQueryResult<NoInfer<WorkspaceList>, Error>;
@@ -0,0 +1,16 @@
1
+ export type WorkspacesDomainEvent = 'workspace.created' | 'workspace.updated' | 'workspace.deleted' | 'workspace.archived' | 'workspace.reactivated' | 'project.created' | 'project.updated' | 'project.deleted' | 'project.archived' | 'project.unarchived' | 'project-member.added' | 'project-member.removed' | 'workspace-member.added' | 'workspace-member.removed' | 'workspace-member.role-updated' | 'workspace-invitation.created' | 'workspace-invitation.updated' | 'workspace-invitation.accepted' | 'workspace-invitation.rejected' | 'workspace-invitation.cancelled' | 'workspace-invitation.resent' | 'workspace-invitation.deleted' | 'workspace-activity.appended' | 'workspace.create_failed' | 'workspace.update_failed' | 'workspace.delete_failed' | 'workspace.archive_failed' | 'workspace.reactivate_failed' | 'project.create_failed' | 'project.update_failed' | 'project.delete_failed' | 'project.archive_failed' | 'project.unarchive_failed' | 'project-member.add_failed' | 'project-member.remove_failed' | 'workspace-member.add_failed' | 'workspace-member.remove_failed' | 'workspace-member.role-update_failed' | 'workspace-invitation.create_failed' | 'workspace-invitation.update_failed' | 'workspace-invitation.accept_failed' | 'workspace-invitation.reject_failed' | 'workspace-invitation.cancel_failed' | 'workspace-invitation.resend_failed' | 'workspace-invitation.delete_failed' | 'workspaces.page.viewed';
2
+ export interface WorkspacesEventPayload {
3
+ workspaceId?: string;
4
+ projectId?: string;
5
+ memberId?: string;
6
+ invitationId?: string;
7
+ userId?: string;
8
+ source?: string;
9
+ page?: string;
10
+ durationMs?: number;
11
+ errorCode?: string;
12
+ errorMessage?: string;
13
+ }
14
+ export declare function useWorkspacesEventEmitter(): {
15
+ emit: (event: WorkspacesDomainEvent, payload?: WorkspacesEventPayload) => void;
16
+ };
@@ -0,0 +1,26 @@
1
+ interface PageViewExtra {
2
+ /**
3
+ * Workspace context for the page. `undefined` / `null` / `''` are all
4
+ * treated as "unresolved" when `requireParams` is true so that
5
+ * `useParams()`'s `string | undefined` initial render doesn't fire
6
+ * a phantom event with missing context.
7
+ */
8
+ workspaceId?: string | null;
9
+ projectId?: string | null;
10
+ /**
11
+ * Set to `true` on routes that include `:workspaceId` / `:projectId`
12
+ * in the path. The hook then skips the emit until **every value
13
+ * supplied in `extra`** resolves to a non-empty string. Anything you
14
+ * don't pass to `extra` is treated as "not applicable to this page"
15
+ * — the hook ignores it.
16
+ */
17
+ requireParams?: boolean;
18
+ }
19
+ /**
20
+ * Emit a `workspaces.page.viewed` event when a top-level workspaces page mounts
21
+ * (and again when its `page` / `workspaceId` / `projectId` context changes).
22
+ * The event is forwarded by the shell's bus to OtelBrowserSink / RybbitSink /
23
+ * BackendAuditSink — the MFE never sinks directly.
24
+ */
25
+ export declare function useWorkspacesPageView(page: string, extra?: PageViewExtra): void;
26
+ export {};
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Workspaces Microfrontend
3
+ *
4
+ * Enterprise collaboration platform for managing workspaces,
5
+ * projects, teams, and integrations.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * import { WorkspacesRoot, type WorkspacesRootProps } from '@burdenoff/micro-fe/workspaces';
10
+ *
11
+ * function App() {
12
+ * const props: WorkspacesRootProps = {
13
+ * basePath: '/workspaces',
14
+ * navigate: (path) => router.push(path),
15
+ * currentUser: { id: '1', email: 'user@example.com' },
16
+ * apiGatewayUrl: 'https://api.example.com',
17
+ * authToken: 'token',
18
+ * };
19
+ *
20
+ * return <WorkspacesRoot {...props} />;
21
+ * }
22
+ * ```
23
+ */
24
+ export { WorkspacesRoot } from './WorkspacesRoot';
25
+ export { DashboardPage } from './pages/dashboard/DashboardPage';
26
+ export { InviteAcceptancePage } from './pages/InviteAcceptancePage';
27
+ export { PendingInvitesPage } from './pages/PendingInvitesPage';
28
+ export { WorkspaceInvitePage } from './pages/WorkspaceInvitePage';
29
+ export { WorkspacesProvider, useWorkspacesContext } from './providers/WorkspacesProvider';
30
+ export { useWorkspacesStore } from './store/workspacesStore';
31
+ export * from './hooks';
32
+ export * from './components';
33
+ export * from './utils';
34
+ export { enTranslations } from './translations/en';
35
+ export type { WorkspacesRootProps, Workspace, WorkspaceType, WorkspaceStatus, WorkspaceMember, WorkspaceRole, WorkspaceSettings, WorkspaceFeature, WorkspaceIntegration, Project, ProjectStatus, Activity, ActivityType, WorkspaceFilters, ProjectFilters, ViewMode, SortBy, SortDirection, CreateWorkspaceInput, UpdateWorkspaceInput, CreateProjectInput, UpdateProjectInput, NavItem, FooterItem, } from './types';
@@ -0,0 +1 @@
1
+ export declare function ActivityListPage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CreateWorkspacePage(): import('react').JSX.Element;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Page for accepting or rejecting workspace invitations
3
+ * Accessible via /workspaces/invite/:invitationId
4
+ */
5
+ export declare function InviteAcceptancePage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function MembersListPage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function PendingInvitesPage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ProjectDetailPage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ProjectMembersPage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ProjectsListPage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function WorkspaceDetailPage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function WorkspaceInvitePage(): import('react').JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function WorkspaceSettingsPage(): import('react').JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { useWorkspacesContext as e } from "../providers/WorkspacesProvider.js";
2
- import { useGetWorkspaceTagsQuery as t, useReplaceWorkspaceTagsMutation as n } from "../generated/wspace-operations.js";
2
+ import { GetWorkspaceTagsDocument as t, ReplaceWorkspaceTagsDocument as n } from "../generated/wspace-operations.js";
3
3
  import { useWorkspace as r } from "../hooks/useWorkspaces.js";
4
4
  import { WORKSPACE_PERMISSIONS as i } from "../constants/permissions.js";
5
5
  import { tWithFallback as a } from "../utils/i18n.js";
@@ -14,24 +14,25 @@ import { useNavigate as x, useParams as S } from "react-router";
14
14
  import { AccessDenied as C, PermissionGate as w } from "@burdenoff/fe-libs/shared/components";
15
15
  import { Form as T, FormControl as E, FormField as D, FormItem as O, FormLabel as k, FormMessage as A, Input as j, z as M } from "@burdenoff/fe-libs/form";
16
16
  import { TagsWidget as N } from "@burdenoff/fe-libs/tag";
17
+ import { useMutation as P, useQuery as F } from "@apollo/client/react";
17
18
  //#region src/pages/WorkspaceSettingsPage.tsx
18
- var P = M.object({
19
+ var I = M.object({
19
20
  name: M.string().min(2).max(100),
20
21
  contactEmail: M.string().email().optional().or(M.literal("")),
21
22
  domain: M.string().optional(),
22
23
  website: M.string().url().optional().or(M.literal(""))
23
24
  });
24
- function F() {
25
- let { t: M } = b(), { workspaceId: F } = S();
25
+ function L() {
26
+ let { t: M } = b(), { workspaceId: L } = S();
26
27
  o("workspaces.settings", {
27
- workspaceId: F,
28
+ workspaceId: L,
28
29
  requireParams: !0
29
30
  });
30
- let I = x(), { basePath: L = "/" } = e(), { data: R, isLoading: z } = r(F || ""), { mutate: B, isPending: V } = s(), { data: H, refetch: U } = t({
31
- variables: { input: { workspaceId: F ?? "" } },
32
- skip: !F,
31
+ let R = x(), { basePath: z = "/" } = e(), { data: B, isLoading: V } = r(L || ""), { mutate: H, isPending: U } = s(), { data: W, refetch: G } = F(t, {
32
+ variables: { input: { entityId: L ?? "" } },
33
+ skip: !L,
33
34
  fetchPolicy: "cache-and-network"
34
- }), [W, { loading: G }] = n(), K = c(() => (H?.getWorkspaceTags ?? []).flatMap((e) => e.tag ? [{
35
+ }), [K, { loading: q }] = P(n), J = c(() => (W?.getWorkspaceTags ?? []).flatMap((e) => e.tag ? [{
35
36
  id: e.tagId,
36
37
  key: e.tag.key,
37
38
  label: e.tag.label,
@@ -42,22 +43,22 @@ function F() {
42
43
  color: e.tag.color ?? null,
43
44
  icon: e.tag.icon ?? null,
44
45
  description: e.tag.description ?? null
45
- }] : []), [H?.getWorkspaceTags]), q = async (e) => {
46
- F && (await W({ variables: { input: {
47
- workspaceId: F,
46
+ }] : []), [W?.getWorkspaceTags]), Y = async (e) => {
47
+ L && (await K({ variables: { input: {
48
+ entityId: L,
48
49
  tagIds: e.map((e) => e.id)
49
- } } }), await U());
50
+ } } }), await G());
50
51
  };
51
- return z ? /* @__PURE__ */ d("div", {
52
+ return V ? /* @__PURE__ */ d("div", {
52
53
  className: "p-6",
53
54
  children: a(M, "workspaceSettings.loading", "Loading...")
54
- }) : R ? /* @__PURE__ */ d(w, {
55
+ }) : B ? /* @__PURE__ */ d(w, {
55
56
  permission: i.WORKSPACE_UPDATE,
56
57
  fallback: /* @__PURE__ */ f("div", {
57
58
  className: "p-6",
58
59
  children: [/* @__PURE__ */ f(p, {
59
60
  variant: "ghost",
60
- onClick: () => I(`${L}/${F}`),
61
+ onClick: () => R(`${z}/${L}`),
61
62
  className: "gap-2 mb-6 -ml-2",
62
63
  children: [/* @__PURE__ */ d(l, { size: 20 }), a(M, "workspaceSettings.backToWorkspace", "Back to Workspace")]
63
64
  }), /* @__PURE__ */ d(C, {
@@ -67,7 +68,7 @@ function F() {
67
68
  details: a(M, "workspaceSettings.permissionRequiredDetails", "Required: workspace:update"),
68
69
  primaryAction: {
69
70
  label: a(M, "workspaceSettings.goBack", "Go Back"),
70
- onClick: () => I(`${L}/${F}`)
71
+ onClick: () => R(`${z}/${L}`)
71
72
  }
72
73
  })]
73
74
  }),
@@ -77,7 +78,7 @@ function F() {
77
78
  /* @__PURE__ */ f("div", { children: [
78
79
  /* @__PURE__ */ f(p, {
79
80
  variant: "ghost",
80
- onClick: () => I(`${L}/${F}`),
81
+ onClick: () => R(`${z}/${L}`),
81
82
  className: "gap-2 mb-2 -ml-2",
82
83
  children: [/* @__PURE__ */ d(l, { size: 20 }), a(M, "workspaceSettings.backToWorkspace", "Back to Workspace")]
83
84
  }),
@@ -96,10 +97,10 @@ function F() {
96
97
  glow: !0,
97
98
  className: "border-border-seam",
98
99
  children: [/* @__PURE__ */ d(h, { children: /* @__PURE__ */ d(g, { children: a(M, "workspaceSettings.generalSettings", "General Settings") }) }), /* @__PURE__ */ d(m, { children: /* @__PURE__ */ d(T, {
99
- schema: P,
100
+ schema: I,
100
101
  onSubmit: (e) => {
101
- F && B({
102
- id: F,
102
+ L && H({
103
+ id: L,
103
104
  input: {
104
105
  ...e,
105
106
  contactEmail: e.contactEmail || void 0,
@@ -107,14 +108,14 @@ function F() {
107
108
  website: e.website || void 0
108
109
  }
109
110
  }, { onSuccess: () => {
110
- I(`${L}/${F}`);
111
+ R(`${z}/${L}`);
111
112
  } });
112
113
  },
113
114
  formOptions: { defaultValues: {
114
- name: R?.name || "",
115
- contactEmail: R?.contactEmail || "",
116
- domain: R?.domain || "",
117
- website: R?.website || ""
115
+ name: B?.name || "",
116
+ contactEmail: B?.contactEmail || "",
117
+ domain: B?.domain || "",
118
+ website: B?.website || ""
118
119
  } },
119
120
  children: (e) => /* @__PURE__ */ f("div", {
120
121
  className: "space-y-4",
@@ -168,13 +169,13 @@ function F() {
168
169
  className: "flex gap-2",
169
170
  children: [/* @__PURE__ */ f(p, {
170
171
  type: "submit",
171
- disabled: V,
172
+ disabled: U,
172
173
  className: "gap-2",
173
- children: [/* @__PURE__ */ d(u, { size: 20 }), V ? a(M, "workspaceSettings.saving", "Saving...") : a(M, "workspaceSettings.saveChanges", "Save Changes")]
174
+ children: [/* @__PURE__ */ d(u, { size: 20 }), U ? a(M, "workspaceSettings.saving", "Saving...") : a(M, "workspaceSettings.saveChanges", "Save Changes")]
174
175
  }), /* @__PURE__ */ d(p, {
175
176
  type: "button",
176
177
  variant: "outline",
177
- onClick: () => I(`${L}/${F}`),
178
+ onClick: () => R(`${z}/${L}`),
178
179
  children: a(M, "workspaceSettings.cancel", "Cancel")
179
180
  })]
180
181
  })
@@ -182,7 +183,7 @@ function F() {
182
183
  })
183
184
  }) })]
184
185
  }),
185
- F && /* @__PURE__ */ f(_, {
186
+ L && /* @__PURE__ */ f(_, {
186
187
  treatment: "plain",
187
188
  className: "border-border-seam",
188
189
  children: [/* @__PURE__ */ d(h, { children: /* @__PURE__ */ d(g, { children: a(M, "workspaceSettings.tags", "Tags") }) }), /* @__PURE__ */ f(m, {
@@ -192,13 +193,13 @@ function F() {
192
193
  children: a(M, "workspaceSettings.tagsDescription", "Use universal tags to classify and filter this workspace.")
193
194
  }), /* @__PURE__ */ d(N, {
194
195
  entityType: "Workspace",
195
- entityId: F,
196
- workspaceId: F,
197
- tags: K,
198
- onAdd: (e) => q([...K, e]),
199
- onRemove: (e) => q(K.filter((t) => t.id !== e)),
196
+ entityId: L,
197
+ workspaceId: L,
198
+ tags: J,
199
+ onAdd: (e) => Y([...J, e]),
200
+ onRemove: (e) => Y(J.filter((t) => t.id !== e)),
200
201
  syncGraphNotifications: !1,
201
- className: G ? "pointer-events-none opacity-75" : void 0
202
+ className: q ? "pointer-events-none opacity-75" : void 0
202
203
  })]
203
204
  })]
204
205
  })
@@ -210,4 +211,4 @@ function F() {
210
211
  });
211
212
  }
212
213
  //#endregion
213
- export { F as WorkspaceSettingsPage };
214
+ export { L as WorkspaceSettingsPage };
@@ -0,0 +1 @@
1
+ export declare function WorkspacesListPage(): import('react').JSX.Element;