@burdenoff/microfe-organization 2026.528.2 → 2026.529.1

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.
@@ -11,11 +11,11 @@ function c(e, t = 20, n = 0) {
11
11
  nextFetchPolicy: "cache-first"
12
12
  });
13
13
  return {
14
- workspaces: r?.workspaces?.items || [],
15
- total: r?.workspaces?.total || 0,
16
- limit: r?.workspaces?.limit || t,
17
- offset: r?.workspaces?.offset || n,
18
- hasMore: r?.workspaces?.hasMore || !1,
14
+ workspaces: r?.allWorkspaces?.items || [],
15
+ total: r?.allWorkspaces?.total || 0,
16
+ limit: r?.allWorkspaces?.limit || t,
17
+ offset: r?.allWorkspaces?.offset || n,
18
+ hasMore: r?.allWorkspaces?.hasMore || !1,
19
19
  loading: i,
20
20
  error: o,
21
21
  refetch: s,
@@ -48,9 +48,9 @@ function u(e, t = 20, n = 0) {
48
48
  nextFetchPolicy: "cache-first"
49
49
  });
50
50
  return {
51
- workspaces: r?.workspaces?.items || [],
52
- total: r?.workspaces?.total || 0,
53
- hasMore: r?.workspaces?.hasMore || !1,
51
+ workspaces: r?.allWorkspaces?.items || [],
52
+ total: r?.allWorkspaces?.total || 0,
53
+ hasMore: r?.allWorkspaces?.hasMore || !1,
54
54
  loading: a,
55
55
  error: o,
56
56
  refetch: s,
@@ -1 +1 @@
1
- {"version":3,"file":"useWorkspaces.js","names":[],"sources":["../../../../../src/organization-management/modules/workspaces/hooks/useWorkspaces.ts"],"sourcesContent":["import {\n useGetWorkspacesQuery,\n useGetWorkspaceQuery,\n useGetWorkspacesByOrganizationQuery,\n useGetTenantsQuery,\n useCreateWorkspaceMutation,\n useUpdateWorkspaceMutation,\n useSuspendWorkspaceMutation,\n GetWorkspacesDocument,\n} from '../../../../generated/global-operations';\nimport type {\n Workspace,\n WorkspaceFilterInput,\n CreateWorkspaceInput,\n UpdateWorkspaceInput,\n} from '../types';\n\n/**\n * Hook to fetch workspaces with filtering and pagination\n * Updated to use offset-based pagination (limit/offset) instead of cursor-based\n */\nexport function useWorkspaces(\n filter?: WorkspaceFilterInput,\n limit: number = 20,\n offset: number = 0\n) {\n const { data, loading, error, refetch, fetchMore } = useGetWorkspacesQuery({\n variables: { filter, limit, offset },\n fetchPolicy: 'cache-first',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n workspaces: (data?.workspaces?.items as Workspace[]) || [],\n total: data?.workspaces?.total || 0,\n limit: data?.workspaces?.limit || limit,\n offset: data?.workspaces?.offset || offset,\n hasMore: data?.workspaces?.hasMore || false,\n loading,\n error,\n refetch,\n fetchMore,\n };\n}\n\n/**\n * Hook to fetch a single workspace by ID\n */\nexport function useWorkspace(id: string) {\n const { data, loading, error, refetch } = useGetWorkspaceQuery({\n variables: { id },\n skip: !id,\n fetchPolicy: 'cache-and-network',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n workspace: data?.workspace as Workspace | undefined,\n loading,\n error,\n refetch,\n };\n}\n\n/**\n * Hook to fetch workspaces by organization ID\n */\nexport function useWorkspacesByOrganization(\n organizationId: string,\n limit: number = 20,\n offset: number = 0\n) {\n const { data, loading, error, refetch, fetchMore } = useGetWorkspacesByOrganizationQuery({\n variables: { organizationId, limit, offset },\n skip: !organizationId,\n fetchPolicy: 'cache-and-network',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n workspaces: (data?.workspaces?.items as Workspace[]) || [],\n total: data?.workspaces?.total || 0,\n hasMore: data?.workspaces?.hasMore || false,\n loading,\n error,\n refetch,\n fetchMore,\n };\n}\n\n/**\n * Hook to create a new workspace\n */\nexport function useCreateWorkspace() {\n const [createWorkspace, { data, loading, error }] = useCreateWorkspaceMutation({\n refetchQueries: [GetWorkspacesDocument],\n });\n\n return {\n createWorkspace: (input: CreateWorkspaceInput) => createWorkspace({ variables: { input } }),\n data,\n loading,\n error,\n };\n}\n\n/**\n * Hook to update a workspace\n */\nexport function useUpdateWorkspace() {\n const [updateWorkspace, { data, loading, error }] = useUpdateWorkspaceMutation();\n\n return {\n updateWorkspace: (id: string, input: UpdateWorkspaceInput) =>\n updateWorkspace({ variables: { id, input } }),\n data,\n loading,\n error,\n };\n}\n\n/**\n * Hook to delete (suspend) a workspace\n * Note: Backend doesn't have deleteWorkspace, using suspendWorkspace instead\n */\nexport function useDeleteWorkspace() {\n const [deleteWorkspace, { data, loading, error }] = useSuspendWorkspaceMutation({\n refetchQueries: [GetWorkspacesDocument],\n });\n\n return {\n deleteWorkspace: (id: string) => deleteWorkspace({ variables: { id } }),\n data,\n loading,\n error,\n };\n}\n\n/**\n * Tenant type for the tenants query\n */\ninterface Tenant {\n id: string;\n name: string;\n slug: string;\n status: string;\n}\n\n/**\n * Hook to fetch tenants available to the current actor for workspace creation\n */\nexport function useTenants(limit: number = 100, offset: number = 0, enabled: boolean = true) {\n const { data, loading, error, refetch } = useGetTenantsQuery({\n variables: { limit, offset },\n skip: !enabled,\n fetchPolicy: 'cache-first',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n tenants: (data?.myTenants?.items as Tenant[]) || [],\n total: data?.myTenants?.total || 0,\n loading,\n error,\n refetch,\n };\n}\n"],"mappings":";;AAqBA,SAAgB,EACd,GACA,IAAgB,IAChB,IAAiB,GACjB;CACA,IAAM,EAAE,SAAM,YAAS,UAAO,YAAS,iBAAc,EAAsB;EACzE,WAAW;GAAE;GAAQ;GAAO;GAAQ;EACpC,aAAa;EACb,iBAAiB;EAClB,CAAC;AAEF,QAAO;EACL,YAAa,GAAM,YAAY,SAAyB,EAAE;EAC1D,OAAO,GAAM,YAAY,SAAS;EAClC,OAAO,GAAM,YAAY,SAAS;EAClC,QAAQ,GAAM,YAAY,UAAU;EACpC,SAAS,GAAM,YAAY,WAAW;EACtC;EACA;EACA;EACA;EACD;;AAMH,SAAgB,EAAa,GAAY;CACvC,IAAM,EAAE,SAAM,YAAS,UAAO,eAAY,EAAqB;EAC7D,WAAW,EAAE,OAAI;EACjB,MAAM,CAAC;EACP,aAAa;EACb,iBAAiB;EACl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U,GAAM,WAAW,SAAsB,EAAE;EACnD,OAAO,GAAM,WAAW,SAAS;EACjC;EACA;EACA;EACD"}
1
+ {"version":3,"file":"useWorkspaces.js","names":[],"sources":["../../../../../src/organization-management/modules/workspaces/hooks/useWorkspaces.ts"],"sourcesContent":["import {\n useGetWorkspacesQuery,\n useGetWorkspaceQuery,\n useGetWorkspacesByOrganizationQuery,\n useGetTenantsQuery,\n useCreateWorkspaceMutation,\n useUpdateWorkspaceMutation,\n useSuspendWorkspaceMutation,\n GetWorkspacesDocument,\n} from '../../../../generated/global-operations';\nimport type {\n Workspace,\n WorkspaceFilterInput,\n CreateWorkspaceInput,\n UpdateWorkspaceInput,\n} from '../types';\n\n/**\n * Hook to fetch workspaces with filtering and pagination\n * Updated to use offset-based pagination (limit/offset) instead of cursor-based\n */\nexport function useWorkspaces(\n filter?: WorkspaceFilterInput,\n limit: number = 20,\n offset: number = 0\n) {\n const { data, loading, error, refetch, fetchMore } = useGetWorkspacesQuery({\n variables: { filter, limit, offset },\n fetchPolicy: 'cache-first',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n workspaces: (data?.allWorkspaces?.items as Workspace[]) || [],\n total: data?.allWorkspaces?.total || 0,\n limit: data?.allWorkspaces?.limit || limit,\n offset: data?.allWorkspaces?.offset || offset,\n hasMore: data?.allWorkspaces?.hasMore || false,\n loading,\n error,\n refetch,\n fetchMore,\n };\n}\n\n/**\n * Hook to fetch a single workspace by ID\n */\nexport function useWorkspace(id: string) {\n const { data, loading, error, refetch } = useGetWorkspaceQuery({\n variables: { id },\n skip: !id,\n fetchPolicy: 'cache-and-network',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n workspace: data?.workspace as Workspace | undefined,\n loading,\n error,\n refetch,\n };\n}\n\n/**\n * Hook to fetch workspaces by organization ID\n */\nexport function useWorkspacesByOrganization(\n organizationId: string,\n limit: number = 20,\n offset: number = 0\n) {\n const { data, loading, error, refetch, fetchMore } = useGetWorkspacesByOrganizationQuery({\n variables: { organizationId, limit, offset },\n skip: !organizationId,\n fetchPolicy: 'cache-and-network',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n workspaces: (data?.allWorkspaces?.items as Workspace[]) || [],\n total: data?.allWorkspaces?.total || 0,\n hasMore: data?.allWorkspaces?.hasMore || false,\n loading,\n error,\n refetch,\n fetchMore,\n };\n}\n\n/**\n * Hook to create a new workspace\n */\nexport function useCreateWorkspace() {\n const [createWorkspace, { data, loading, error }] = useCreateWorkspaceMutation({\n refetchQueries: [GetWorkspacesDocument],\n });\n\n return {\n createWorkspace: (input: CreateWorkspaceInput) => createWorkspace({ variables: { input } }),\n data,\n loading,\n error,\n };\n}\n\n/**\n * Hook to update a workspace\n */\nexport function useUpdateWorkspace() {\n const [updateWorkspace, { data, loading, error }] = useUpdateWorkspaceMutation();\n\n return {\n updateWorkspace: (id: string, input: UpdateWorkspaceInput) =>\n updateWorkspace({ variables: { id, input } }),\n data,\n loading,\n error,\n };\n}\n\n/**\n * Hook to delete (suspend) a workspace\n * Note: Backend doesn't have deleteWorkspace, using suspendWorkspace instead\n */\nexport function useDeleteWorkspace() {\n const [deleteWorkspace, { data, loading, error }] = useSuspendWorkspaceMutation({\n refetchQueries: [GetWorkspacesDocument],\n });\n\n return {\n deleteWorkspace: (id: string) => deleteWorkspace({ variables: { id } }),\n data,\n loading,\n error,\n };\n}\n\n/**\n * Tenant type for the tenants query\n */\ninterface Tenant {\n id: string;\n name: string;\n slug: string;\n status: string;\n}\n\n/**\n * Hook to fetch tenants available to the current actor for workspace creation\n */\nexport function useTenants(limit: number = 100, offset: number = 0, enabled: boolean = true) {\n const { data, loading, error, refetch } = useGetTenantsQuery({\n variables: { limit, offset },\n skip: !enabled,\n fetchPolicy: 'cache-first',\n nextFetchPolicy: 'cache-first',\n });\n\n return {\n tenants: (data?.myTenants?.items as Tenant[]) || [],\n total: data?.myTenants?.total || 0,\n loading,\n error,\n refetch,\n };\n}\n"],"mappings":";;AAqBA,SAAgB,EACd,GACA,IAAgB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E,WAAW;GAAE;GAAI;GAAO,EAAE,CAAC;EAC/C;EACA;EACA;EACD;;AAOH,SAAgB,IAAqB;CACnC,IAAM,CAAC,GAAiB,EAAE,SAAM,YAAS,cAAW,EAA4B,EAC9E,gBAAgB,CAAC,EAAsB,EACxC,CAAC;AAEF,QAAO;EACL,kBAAkB,MAAe,EAAgB,EAAE,WAAW,EAAE,OAAI,EAAE,CAAC;EACvE;EACA;EACA;EACD;;AAgBH,SAAgB,EAAW,IAAgB,KAAK,IAAiB,GAAG,IAAmB,IAAM;CAC3F,IAAM,EAAE,SAAM,YAAS,UAAO,eAAY,EAAmB;EAC3D,WAAW;GAAE;GAAO;GAAQ;EAC5B,MAAM,CAAC;EACP,aAAa;EACb,iBAAiB;EAClB,CAAC;AAEF,QAAO;EACL,SAAU,GAAM,WAAW,SAAsB,EAAE;EACnD,OAAO,GAAM,WAAW,SAAS;EACjC;EACA;EACA;EACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-organization",
3
- "version": "2026.528.2",
3
+ "version": "2026.529.1",
4
4
  "description": "Organization management microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@apollo/client": "^3.12.0",
47
- "@burdenoff/fe-libs": "2026.528.4",
47
+ "@burdenoff/fe-libs": "2026.529.1",
48
48
  "@tanstack/react-query": "^5.90.16",
49
49
  "clsx": "^2.1.1",
50
50
  "graphql": "^16.10.0",