@burdenoff/microfe-auth 2026.524.1 → 2026.525.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.
Files changed (149) hide show
  1. package/package.json +1 -1
  2. package/dist/auth/AuthRoot.d.ts +0 -30
  3. package/dist/auth/AuthRoot.d.ts.map +0 -1
  4. package/dist/auth/AuthRoutes.d.ts +0 -30
  5. package/dist/auth/AuthRoutes.d.ts.map +0 -1
  6. package/dist/auth/components/AuthIcons.d.ts +0 -17
  7. package/dist/auth/components/AuthIcons.d.ts.map +0 -1
  8. package/dist/auth/components/AuthLayout.d.ts +0 -17
  9. package/dist/auth/components/AuthLayout.d.ts.map +0 -1
  10. package/dist/auth/components/CaptchaV2.d.ts +0 -16
  11. package/dist/auth/components/CaptchaV2.d.ts.map +0 -1
  12. package/dist/auth/components/ConfirmActionDialog.d.ts +0 -16
  13. package/dist/auth/components/ConfirmActionDialog.d.ts.map +0 -1
  14. package/dist/auth/components/index.d.ts +0 -4
  15. package/dist/auth/components/index.d.ts.map +0 -1
  16. package/dist/auth/components/profile/UserProfileMenu.d.ts +0 -42
  17. package/dist/auth/components/profile/UserProfileMenu.d.ts.map +0 -1
  18. package/dist/auth/components/workspace/WorkspaceSelector.d.ts +0 -76
  19. package/dist/auth/components/workspace/WorkspaceSelector.d.ts.map +0 -1
  20. package/dist/auth/constants/permissions.d.ts +0 -30
  21. package/dist/auth/constants/permissions.d.ts.map +0 -1
  22. package/dist/auth/constants/sessionKeys.d.ts +0 -18
  23. package/dist/auth/constants/sessionKeys.d.ts.map +0 -1
  24. package/dist/auth/hooks/index.d.ts +0 -18
  25. package/dist/auth/hooks/index.d.ts.map +0 -1
  26. package/dist/auth/hooks/useAccountOperations.d.ts +0 -19
  27. package/dist/auth/hooks/useAccountOperations.d.ts.map +0 -1
  28. package/dist/auth/hooks/useApiKeyOperations.d.ts +0 -26
  29. package/dist/auth/hooks/useApiKeyOperations.d.ts.map +0 -1
  30. package/dist/auth/hooks/useAppOperations.d.ts +0 -30
  31. package/dist/auth/hooks/useAppOperations.d.ts.map +0 -1
  32. package/dist/auth/hooks/useAuthOperations.d.ts +0 -57
  33. package/dist/auth/hooks/useAuthOperations.d.ts.map +0 -1
  34. package/dist/auth/hooks/useAuthPermissions.d.ts +0 -20
  35. package/dist/auth/hooks/useAuthPermissions.d.ts.map +0 -1
  36. package/dist/auth/hooks/useCaptchaV3.d.ts +0 -13
  37. package/dist/auth/hooks/useCaptchaV3.d.ts.map +0 -1
  38. package/dist/auth/hooks/useContextSwitcherData.d.ts +0 -106
  39. package/dist/auth/hooks/useContextSwitcherData.d.ts.map +0 -1
  40. package/dist/auth/hooks/useDelegationOperations.d.ts +0 -33
  41. package/dist/auth/hooks/useDelegationOperations.d.ts.map +0 -1
  42. package/dist/auth/hooks/useMfaOperations.d.ts +0 -18
  43. package/dist/auth/hooks/useMfaOperations.d.ts.map +0 -1
  44. package/dist/auth/hooks/useMyWorkspaces.d.ts +0 -45
  45. package/dist/auth/hooks/useMyWorkspaces.d.ts.map +0 -1
  46. package/dist/auth/hooks/useOAuthOperations.d.ts +0 -19
  47. package/dist/auth/hooks/useOAuthOperations.d.ts.map +0 -1
  48. package/dist/auth/hooks/usePasswordOperations.d.ts +0 -13
  49. package/dist/auth/hooks/usePasswordOperations.d.ts.map +0 -1
  50. package/dist/auth/hooks/useSessionOperations.d.ts +0 -52
  51. package/dist/auth/hooks/useSessionOperations.d.ts.map +0 -1
  52. package/dist/auth/hooks/useSsoOperations.d.ts +0 -65
  53. package/dist/auth/hooks/useSsoOperations.d.ts.map +0 -1
  54. package/dist/auth/hooks/useTokenRefresh.d.ts +0 -56
  55. package/dist/auth/hooks/useTokenRefresh.d.ts.map +0 -1
  56. package/dist/auth/hooks/useUserOperations.d.ts +0 -33
  57. package/dist/auth/hooks/useUserOperations.d.ts.map +0 -1
  58. package/dist/auth/hooks/useWorkspaceOperations.d.ts +0 -35
  59. package/dist/auth/hooks/useWorkspaceOperations.d.ts.map +0 -1
  60. package/dist/auth/hooks/useWorkspaceToken.d.ts +0 -56
  61. package/dist/auth/hooks/useWorkspaceToken.d.ts.map +0 -1
  62. package/dist/auth/index.d.ts +0 -63
  63. package/dist/auth/index.d.ts.map +0 -1
  64. package/dist/auth/pages/AuditLogPage.d.ts +0 -12
  65. package/dist/auth/pages/AuditLogPage.d.ts.map +0 -1
  66. package/dist/auth/pages/EmailVerifyPage.d.ts +0 -5
  67. package/dist/auth/pages/EmailVerifyPage.d.ts.map +0 -1
  68. package/dist/auth/pages/LoginPage.d.ts +0 -6
  69. package/dist/auth/pages/LoginPage.d.ts.map +0 -1
  70. package/dist/auth/pages/MagicLinkPage.d.ts +0 -6
  71. package/dist/auth/pages/MagicLinkPage.d.ts.map +0 -1
  72. package/dist/auth/pages/MfaSetupPage.d.ts +0 -5
  73. package/dist/auth/pages/MfaSetupPage.d.ts.map +0 -1
  74. package/dist/auth/pages/MfaVerifyPage.d.ts +0 -7
  75. package/dist/auth/pages/MfaVerifyPage.d.ts.map +0 -1
  76. package/dist/auth/pages/OAuthCallbackPage.d.ts +0 -7
  77. package/dist/auth/pages/OAuthCallbackPage.d.ts.map +0 -1
  78. package/dist/auth/pages/PasswordResetPage.d.ts +0 -6
  79. package/dist/auth/pages/PasswordResetPage.d.ts.map +0 -1
  80. package/dist/auth/pages/ReactivatePage.d.ts +0 -6
  81. package/dist/auth/pages/ReactivatePage.d.ts.map +0 -1
  82. package/dist/auth/pages/RegisterPage.d.ts +0 -5
  83. package/dist/auth/pages/RegisterPage.d.ts.map +0 -1
  84. package/dist/auth/pages/SSOClearPage.d.ts +0 -22
  85. package/dist/auth/pages/SSOClearPage.d.ts.map +0 -1
  86. package/dist/auth/pages/SSODepositPage.d.ts +0 -24
  87. package/dist/auth/pages/SSODepositPage.d.ts.map +0 -1
  88. package/dist/auth/pages/SSORelayCallbackPage.d.ts +0 -8
  89. package/dist/auth/pages/SSORelayCallbackPage.d.ts.map +0 -1
  90. package/dist/auth/pages/SSORelayPage.d.ts +0 -18
  91. package/dist/auth/pages/SSORelayPage.d.ts.map +0 -1
  92. package/dist/auth/pages/SecurityPage.d.ts +0 -5
  93. package/dist/auth/pages/SecurityPage.d.ts.map +0 -1
  94. package/dist/auth/pages/SessionBridgePage.d.ts +0 -14
  95. package/dist/auth/pages/SessionBridgePage.d.ts.map +0 -1
  96. package/dist/auth/pages/SessionsPage.d.ts +0 -8
  97. package/dist/auth/pages/SessionsPage.d.ts.map +0 -1
  98. package/dist/auth/pages/SsoCallbackPage.d.ts +0 -8
  99. package/dist/auth/pages/SsoCallbackPage.d.ts.map +0 -1
  100. package/dist/auth/pages/SsoConfigPage.d.ts +0 -13
  101. package/dist/auth/pages/SsoConfigPage.d.ts.map +0 -1
  102. package/dist/auth/pages/SsoLoginPage.d.ts +0 -7
  103. package/dist/auth/pages/SsoLoginPage.d.ts.map +0 -1
  104. package/dist/auth/pages/UserDetailsPage.d.ts +0 -11
  105. package/dist/auth/pages/UserDetailsPage.d.ts.map +0 -1
  106. package/dist/auth/pages/UserProfilePage.d.ts +0 -5
  107. package/dist/auth/pages/UserProfilePage.d.ts.map +0 -1
  108. package/dist/auth/pages/UsersPage.d.ts +0 -5
  109. package/dist/auth/pages/UsersPage.d.ts.map +0 -1
  110. package/dist/auth/providers/AuthProvider.d.ts +0 -18
  111. package/dist/auth/providers/AuthProvider.d.ts.map +0 -1
  112. package/dist/auth/providers/CaptchaProvider.d.ts +0 -13
  113. package/dist/auth/providers/CaptchaProvider.d.ts.map +0 -1
  114. package/dist/auth/store/authStore.d.ts +0 -111
  115. package/dist/auth/store/authStore.d.ts.map +0 -1
  116. package/dist/auth/types/index.d.ts +0 -643
  117. package/dist/auth/types/index.d.ts.map +0 -1
  118. package/dist/auth/utils/captchaConfig.d.ts +0 -4
  119. package/dist/auth/utils/captchaConfig.d.ts.map +0 -1
  120. package/dist/auth/utils/formatters.d.ts +0 -37
  121. package/dist/auth/utils/formatters.d.ts.map +0 -1
  122. package/dist/auth/utils/gatewayBaseUrls.d.ts +0 -6
  123. package/dist/auth/utils/gatewayBaseUrls.d.ts.map +0 -1
  124. package/dist/auth/utils/index.d.ts +0 -3
  125. package/dist/auth/utils/index.d.ts.map +0 -1
  126. package/dist/auth/utils/validation.d.ts +0 -30
  127. package/dist/auth/utils/validation.d.ts.map +0 -1
  128. package/dist/dev/main.d.ts +0 -2
  129. package/dist/dev/main.d.ts.map +0 -1
  130. package/dist/generated/global-operations.d.ts +0 -3096
  131. package/dist/generated/global-operations.d.ts.map +0 -1
  132. package/dist/generated/global-types.d.ts +0 -23529
  133. package/dist/generated/global-types.d.ts.map +0 -1
  134. package/dist/generated/wspace-operations.d.ts +0 -124
  135. package/dist/generated/wspace-operations.d.ts.map +0 -1
  136. package/dist/generated/wspace-types.d.ts +0 -57851
  137. package/dist/generated/wspace-types.d.ts.map +0 -1
  138. package/dist/index.d.ts +0 -4
  139. package/dist/index.d.ts.map +0 -1
  140. package/dist/shared/hooks/index.d.ts +0 -7
  141. package/dist/shared/hooks/index.d.ts.map +0 -1
  142. package/dist/shared/index.d.ts +0 -6
  143. package/dist/shared/index.d.ts.map +0 -1
  144. package/dist/shared/types/index.d.ts +0 -109
  145. package/dist/shared/types/index.d.ts.map +0 -1
  146. package/dist/translations/en.d.ts +0 -321
  147. package/dist/translations/en.d.ts.map +0 -1
  148. package/dist/utils/nativeBridge.d.ts +0 -3
  149. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,106 +0,0 @@
1
- import { Organization, Workspace, Project } from '../types';
2
-
3
- export interface UseContextSwitcherDataOptions {
4
- /**
5
- * Optional Global API Gateway base URL override.
6
- * If not provided, uses GATEWAYS config from fe-libs.
7
- */
8
- globalBaseUrl?: string;
9
- /**
10
- * Optional Workspaces API Gateway base URL override.
11
- * If not provided, uses GATEWAYS config from fe-libs.
12
- */
13
- workspaceBaseUrl?: string;
14
- /** Disable initial organization/workspace bootstrap fetches */
15
- disableBootstrap?: boolean;
16
- /** Disable the workspace sync effect */
17
- disableWorkspaceSync?: boolean;
18
- /** Disable the project sync effect */
19
- disableProjectSync?: boolean;
20
- /** Only hydrate the workspace token; do not eagerly fetch projects */
21
- skipProjectFetch?: boolean;
22
- }
23
- /**
24
- * Hook for managing the context switcher data (organizations, workspaces, projects)
25
- *
26
- * Data flow:
27
- * 1. fetchOrganizations() - Get all orgs user has access to (Global Gateway)
28
- * 2. selectOrganization(org) - Set current org & fetch workspaces for that org
29
- * 3. selectWorkspace(ws) - Issue workspace token & fetch projects
30
- * 4. selectProject(proj) - Set current project
31
- *
32
- * All GraphQL calls go through graphqlFetch from fe-libs which automatically
33
- * resolves gateway URLs and injects auth + locale headers.
34
- *
35
- * @param options - Optional configuration (gateway base URL overrides)
36
- */
37
- export declare function useContextSwitcherData(options?: UseContextSwitcherDataOptions): {
38
- organizations: Organization[];
39
- workspaces: Workspace[];
40
- projects: Project[];
41
- currentOrganizationId: string | null;
42
- currentWorkspaceId: string | null;
43
- currentProjectId: string | null;
44
- currentOrganization: Organization | undefined;
45
- currentWorkspace: Workspace | undefined;
46
- currentProject: Project | undefined;
47
- workspaceToken: string | null;
48
- isLoadingOrganizations: boolean;
49
- isLoadingWorkspaces: boolean;
50
- isLoadingProjects: boolean;
51
- isLoading: boolean;
52
- error: string | null;
53
- fetchOrganizations: () => Promise<Organization[]>;
54
- fetchWorkspacesForOrg: (organizationId: string) => Promise<Workspace[]>;
55
- issueWorkspaceToken: (organizationId: string, workspaceId?: string) => Promise<{
56
- success: boolean;
57
- token?: string;
58
- resolvedWorkspaceId?: string;
59
- error?: string;
60
- }>;
61
- fetchProjects: () => Promise<Project[]>;
62
- selectOrganization: (org: Organization) => Promise<Workspace[]>;
63
- selectWorkspace: (workspace: Workspace) => Promise<{
64
- success: boolean;
65
- projects?: Project[];
66
- error?: string;
67
- }>;
68
- selectProject: (project: Project) => void;
69
- };
70
- /**
71
- * Hook to reactively ensure workspaces are synced with the current organization.
72
- *
73
- * This handles edge cases where the organization changes but workspaces
74
- * from a different org are still in the store (e.g., stale data, race conditions).
75
- *
76
- * Usage:
77
- * ```tsx
78
- * import { useWorkspaceSyncEffect } from '@burdenoff/microfe-auth';
79
- *
80
- * function MyComponent() {
81
- * useWorkspaceSyncEffect(); // Ensures workspaces stay in sync
82
- * // ...
83
- * }
84
- * ```
85
- */
86
- export declare function useWorkspaceSyncEffect(options?: UseContextSwitcherDataOptions): void;
87
- /**
88
- * Hook to reactively ensure projects are loaded when a workspace is selected.
89
- *
90
- * This handles the case where a workspace is auto-selected (from URL/localStorage)
91
- * but projects haven't been fetched yet. It will:
92
- * 1. Issue a workspace token if not present
93
- * 2. Fetch projects for the selected workspace
94
- *
95
- * Usage:
96
- * ```tsx
97
- * import { useProjectSyncEffect } from '@burdenoff/microfe-auth';
98
- *
99
- * function MyComponent() {
100
- * useProjectSyncEffect(); // Ensures projects are loaded for selected workspace
101
- * // ...
102
- * }
103
- * ```
104
- */
105
- export declare function useProjectSyncEffect(options?: UseContextSwitcherDataOptions): void;
106
- //# sourceMappingURL=useContextSwitcherData.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useContextSwitcherData.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useContextSwitcherData.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAOjE,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,sCAAsC;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAiWD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,6BAA6B;;;;;;;;;;;;;;;;8BA4IU,OAAO,CAAC,YAAY,EAAE,CAAC;4CAmT/C,MAAM,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;0CAoElC,MAAM,gBACR,MAAM,KACnB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;yBAuEwC,OAAO,CAAC,OAAO,EAAE,CAAC;8BA8DhD,YAAY,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;iCAiBlC,SAAS,KACnB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;6BAiDwC,OAAO,KAAG,IAAI;EAqD3D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,6BAA6B,QA4DxC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,6BAA6B,QAoR3E"}
@@ -1,33 +0,0 @@
1
- import { AppUserDelegation, GrantDelegationInput } from '../types';
2
-
3
- interface CurrentUserDelegationsResponse {
4
- currentUserDelegations: {
5
- delegations: AppUserDelegation[];
6
- hasMore: boolean;
7
- totalCount: number;
8
- };
9
- }
10
- interface CurrentUserGrantedDelegationsResponse {
11
- currentUserGrantedDelegations: {
12
- delegations: AppUserDelegation[];
13
- hasMore: boolean;
14
- totalCount: number;
15
- };
16
- }
17
- /**
18
- * Hook for app-user delegation operations
19
- */
20
- export declare function useDelegationOperations(): {
21
- grantDelegation: (input: GrantDelegationInput) => Promise<AppUserDelegation>;
22
- revokeDelegation: (id: string, reason?: string) => Promise<boolean>;
23
- getDelegationsForApp: (appId: string) => AppUserDelegation[];
24
- hasWorkspaceDelegation: (appId: string, workspaceId: string) => boolean;
25
- refetchDelegations: (variables?: Partial<import('@apollo/client').OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloClient.QueryResult<CurrentUserDelegationsResponse>>;
26
- refetchGrantedDelegations: (variables?: Partial<import('@apollo/client').OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloClient.QueryResult<CurrentUserGrantedDelegationsResponse>>;
27
- delegations: AppUserDelegation[];
28
- grantedDelegations: AppUserDelegation[];
29
- isLoading: boolean;
30
- error: string | null;
31
- };
32
- export {};
33
- //# sourceMappingURL=useDelegationOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDelegationOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useDelegationOperations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAYxE,UAAU,8BAA8B;IACtC,sBAAsB,EAAE;QACtB,WAAW,EAAE,iBAAiB,EAAE,CAAC;QACjC,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,UAAU,qCAAqC;IAC7C,6BAA6B,EAAE;QAC7B,WAAW,EAAE,iBAAiB,EAAE,CAAC;QACjC,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAuBD;;GAEG;AACH,wBAAgB,uBAAuB;6BAsF5B,oBAAoB,KAC1B,OAAO,CAAC,iBAAiB,CAAC;2BA0BvB,MAAM,WACD,MAAM,KACd,OAAO,CAAC,OAAO,CAAC;kCAsBkB,MAAM,KAAG,iBAAiB,EAAE;oCAUxD,MAAM,eACA,MAAM,KAClB,OAAO;;;;;;;EAgCX"}
@@ -1,18 +0,0 @@
1
- import { MFAMethod, MFASetupResult, MFAVerifyInput, AuthResult } from '../types';
2
-
3
- /**
4
- * Hook for MFA operations
5
- */
6
- export declare function useMfaOperations(): {
7
- setupMFA: (method: MFAMethod) => Promise<MFASetupResult>;
8
- enableMFA: (code: string) => Promise<boolean>;
9
- verifyMFA: (input: MFAVerifyInput) => Promise<AuthResult>;
10
- disableMFA: () => Promise<boolean>;
11
- enableMfa: (code: string) => Promise<boolean>;
12
- verifyMfa: (input: MFAVerifyInput) => Promise<AuthResult>;
13
- disableMfa: () => Promise<boolean>;
14
- mfaRequired: boolean;
15
- mfaChallengeId: string | null;
16
- isLoading: boolean;
17
- };
18
- //# sourceMappingURL=useMfaOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMfaOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useMfaOperations.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,UAAU,EAEX,MAAM,UAAU,CAAC;AA2DlB;;GAEG;AACH,wBAAgB,gBAAgB;uBAqBE,SAAS,KAAG,OAAO,CAAC,cAAc,CAAC;sBAsBpC,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;uBA0BxB,cAAc,KAAG,OAAO,CAAC,UAAU,CAAC;sBAgEvC,OAAO,CAAC,OAAO,CAAC;sBA1Fd,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;uBA0BxB,cAAc,KAAG,OAAO,CAAC,UAAU,CAAC;sBAgEvC,OAAO,CAAC,OAAO,CAAC;;;;EAwC9C"}
@@ -1,45 +0,0 @@
1
- import { Workspace } from '../types';
2
-
3
- interface MyWorkspacesResponse {
4
- myWorkspaces: {
5
- total: number;
6
- items: Workspace[];
7
- };
8
- }
9
- /**
10
- * Hook for fetching user's workspaces and issuing workspace tokens
11
- *
12
- * This hook provides:
13
- * - Fetch workspaces: Query to get all workspaces the user has access to
14
- * - Issue workspace token: Get a workspace-scoped token for API access
15
- * - Complete auth flow: Fetch workspaces + auto-select + issue token
16
- *
17
- * Uses the shell's Apollo client (via GatewayRoute) for useQuery, and
18
- * graphqlFetch from fe-libs for imperative calls that need explicit tokens.
19
- */
20
- export declare function useMyWorkspaces(): {
21
- workspaces: Workspace[];
22
- totalWorkspaces: number;
23
- currentWorkspaceId: string | null;
24
- workspaceToken: string | null;
25
- isLoading: boolean;
26
- error: string | null;
27
- fetchWorkspaces: (accessToken?: string) => Promise<Workspace[]>;
28
- issueWorkspaceToken: (workspaceId: string, organizationId: string, accessToken?: string) => Promise<{
29
- success: boolean;
30
- token?: string;
31
- error?: string;
32
- }>;
33
- selectWorkspace: (workspace: Workspace) => Promise<{
34
- success: boolean;
35
- error?: string;
36
- }>;
37
- completeAuthFlow: (accessToken?: string) => Promise<{
38
- success: boolean;
39
- workspace?: Workspace;
40
- error?: string;
41
- }>;
42
- refetch: (variables?: Partial<import('@apollo/client').OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloClient.QueryResult<MyWorkspacesResponse>>;
43
- };
44
- export {};
45
- //# sourceMappingURL=useMyWorkspaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMyWorkspaces.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useMyWorkspaces.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAM1C,UAAU,oBAAoB;IAC5B,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,SAAS,EAAE,CAAC;KACpB,CAAC;CACH;AAoDD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe;;;;;;;oCAoEN,MAAM,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;uCA8CnC,MAAM,kBACH,MAAM,gBACR,MAAM,KACnB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;iCAkEnD,SAAS,KACnB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;qCAchC,MAAM,KACnB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;;EAoGL"}
@@ -1,19 +0,0 @@
1
- import { AuthResult } from '../types';
2
-
3
- /**
4
- * Supported OAuth providers
5
- */
6
- export type OAuthProvider = "google" | "github" | "microsoft";
7
- /**
8
- * Hook for OAuth authentication operations
9
- */
10
- export declare function useOAuthOperations(): {
11
- initiateOAuth: (provider: OAuthProvider) => void;
12
- completeOAuth: (code: string, state: string) => Promise<AuthResult>;
13
- initiateGoogleOAuth: () => void;
14
- initiateGitHubOAuth: () => void;
15
- initiateMicrosoftOAuth: () => void;
16
- isProviderConfigured: (provider: OAuthProvider) => boolean;
17
- isLoading: boolean;
18
- };
19
- //# sourceMappingURL=useOAuthOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOAuthOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useOAuthOperations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,UAAU,CAAC;AAgBvD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AA0G9D;;GAEG;AACH,wBAAgB,kBAAkB;8BAWC,aAAa;0BA+DtC,MAAM,SACL,MAAM,KACZ,OAAO,CAAC,UAAU,CAAC;;;;qCAmGkB,aAAa,KAAG,OAAO;;EAoBhE"}
@@ -1,13 +0,0 @@
1
- import { ChangePasswordInput, PasswordResetRequestResult } from '../types';
2
-
3
- /**
4
- * Hook for password management operations
5
- * Uses Zustand v5 pattern: selectors for state, getState() for actions
6
- */
7
- export declare function usePasswordOperations(): {
8
- changePassword: (input: ChangePasswordInput) => Promise<boolean>;
9
- requestPasswordReset: (email: string, recaptchaToken?: string) => Promise<PasswordResetRequestResult>;
10
- resetPassword: (token: string, newPassword: string) => Promise<boolean>;
11
- isLoading: boolean;
12
- };
13
- //# sourceMappingURL=usePasswordOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePasswordOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/usePasswordOperations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAoChF;;;GAGG;AACH,wBAAgB,qBAAqB;4BAqB1B,mBAAmB,KACzB,OAAO,CAAC,OAAO,CAAC;kCAsBV,MAAM,mBACI,MAAM,KACtB,OAAO,CAAC,0BAA0B,CAAC;2BAsB7B,MAAM,eACA,MAAM,KAClB,OAAO,CAAC,OAAO,CAAC;;EA2DpB"}
@@ -1,52 +0,0 @@
1
- import { ActiveSessionsQuery } from '../../generated/global-operations';
2
- import { TokenValidationResponse, ValidateTokensInput } from '../types';
3
-
4
- interface TokenInfoQueryResponse {
5
- tokenInfo: TokenValidationResponse;
6
- }
7
- interface UseSessionOperationsOptions {
8
- disableTokenInfoQuery?: boolean;
9
- /** Number of sessions to load per page (default: 10) */
10
- pageSize?: number;
11
- }
12
- /**
13
- * Hook for session/token management operations
14
- */
15
- export declare function useSessionOperations(options?: UseSessionOperationsOptions): {
16
- validateTokens: (input: ValidateTokensInput) => Promise<TokenValidationResponse>;
17
- isTokenExpired: () => boolean;
18
- getTokenRemainingTime: () => number;
19
- tokenInfo: TokenValidationResponse | undefined;
20
- revokeSession: (sessionId: string) => Promise<boolean>;
21
- revokeAllSessions: () => Promise<{
22
- success: boolean;
23
- revokedCount: number;
24
- }>;
25
- activeSessions: {
26
- __typename?: "Session";
27
- id: string;
28
- status: import('../../generated/global-types').SessionStatus;
29
- ipAddress?: string | null;
30
- userAgent?: string | null;
31
- location?: string | null;
32
- lastActivityAt: string;
33
- expiresAt: string;
34
- createdAt: string;
35
- isCurrent: boolean;
36
- }[];
37
- sessionsLoading: boolean;
38
- refetchSessions: (variables?: Partial<import('../../generated/global-types').Exact<{
39
- pagination?: import('../../generated/global-types').InputMaybe<import('../../generated/global-types').PaginationInput>;
40
- }>> | undefined) => Promise<import("@apollo/client").ApolloClient.QueryResult<ActiveSessionsQuery>>;
41
- page: number;
42
- pageSize: number;
43
- totalCount: number;
44
- totalPages: number;
45
- hasMore: boolean;
46
- goToNextPage: () => void;
47
- goToPrevPage: () => void;
48
- isLoading: boolean;
49
- refetch: (variables?: Partial<import('@apollo/client').OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloClient.QueryResult<TokenInfoQueryResponse>>;
50
- };
51
- export {};
52
- //# sourceMappingURL=useSessionOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSessionOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useSessionOperations.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,mBAAmB,EAMpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAM7E,UAAU,sBAAsB;IAC9B,SAAS,EAAE,uBAAuB,CAAC;CACpC;AAUD,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,GAAE,2BAAgC;4BAsEhC,mBAAmB,KACzB,OAAO,CAAC,uBAAuB,CAAC;0BAaR,OAAO;iCAQA,MAAM;;+BASA,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;6BAmB7B,OAAO,CAAC;QAC1C,OAAO,EAAE,OAAO,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDH"}
@@ -1,65 +0,0 @@
1
- import { AuthResult, SSOConfig } from '../types';
2
-
3
- interface GetSSOConfigResponse {
4
- getSSOConfig: SSOConfig | null;
5
- }
6
- interface GetSSOConfigVariables {
7
- tenantId: string;
8
- }
9
- export interface SSOConfigInput {
10
- entityId: string;
11
- ssoUrl: string;
12
- sloUrl?: string;
13
- certificate: string;
14
- enabled?: boolean;
15
- metadata?: Record<string, unknown>;
16
- }
17
- export interface SAMLRequestResult {
18
- requestId: string;
19
- ssoUrl: string;
20
- samlRequest: string;
21
- }
22
- export interface ExternalOIDCAuthUrlResult {
23
- authUrl: string;
24
- state: string;
25
- nonce: string;
26
- codeVerifier: string;
27
- relayState?: string;
28
- }
29
- export interface OIDCConfig {
30
- issuer: string;
31
- authorizationEndpoint: string;
32
- tokenEndpoint: string;
33
- userinfoEndpoint: string;
34
- jwksUri: string;
35
- registrationEndpoint?: string;
36
- scopesSupported: string[];
37
- responseTypesSupported: string[];
38
- grantTypesSupported: string[];
39
- }
40
- /**
41
- * Hook for SSO/SAML operations
42
- */
43
- export declare function useSsoOperations(tenantId?: string): {
44
- initiateSsoLogin: (targetTenantId: string, relayState?: string) => Promise<void>;
45
- handleSamlCallback: (samlResponse: string, relayState?: string) => Promise<AuthResult>;
46
- saveSsoConfig: (configOrTenantId: SSOConfigInput | string, config?: SSOConfigInput) => Promise<SSOConfig>;
47
- deleteSsoConfig: (targetTenantId?: string) => Promise<boolean>;
48
- getOidcAuthUrl: (clientId: string, redirectUri: string, scopes?: string[]) => Promise<string>;
49
- exchangeOidcCode: (code: string, clientId: string, redirectUri: string) => Promise<AuthResult>;
50
- validateOidcState: (state: string) => boolean;
51
- initiateExternalOidcLogin: (targetTenantId: string, redirectPath?: string) => Promise<void>;
52
- handleExternalOidcCallback: (code: string, state: string) => Promise<AuthResult>;
53
- isExternalOidcCallback: () => boolean;
54
- ssoConfig: SSOConfig | undefined;
55
- oidcConfig: OIDCConfig | undefined;
56
- isLoading: boolean;
57
- isGeneratingRequest: boolean;
58
- isAuthenticating: boolean;
59
- isSaving: boolean;
60
- isDeleting: boolean;
61
- isGeneratingOidcUrl: boolean;
62
- refetchConfig: (variables?: Partial<GetSSOConfigVariables> | undefined) => Promise<import("@apollo/client").ApolloClient.QueryResult<GetSSOConfigResponse>>;
63
- };
64
- export {};
65
- //# sourceMappingURL=useSsoOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSsoOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useSsoOperations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAQ,MAAM,UAAU,CAAC;AAwB5D,UAAU,oBAAoB;IAC5B,YAAY,EAAE,SAAS,GAAG,IAAI,CAAC;CAChC;AAED,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAkFD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AAiCD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM;uCAkD9B,MAAM,eACT,MAAM,KAClB,OAAO,CAAC,IAAI,CAAC;uCA0CA,MAAM,eACP,MAAM,KAClB,OAAO,CAAC,UAAU,CAAC;sCAwNF,cAAc,GAAG,MAAM,WAChC,cAAc,KACtB,OAAO,CAAC,SAAS,CAAC;uCAyB2B,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;+BAsB7D,MAAM,eACH,MAAM,WACX,MAAM,EAAE,KACf,OAAO,CAAC,MAAM,CAAC;6BAgCV,MAAM,YACF,MAAM,eACH,MAAM,KAClB,OAAO,CAAC,UAAU,CAAC;+BAoGY,MAAM,KAAG,OAAO;gDAhWhC,MAAM,iBACP,MAAM,KACpB,OAAO,CAAC,IAAI,CAAC;uCA8CR,MAAM,SACL,MAAM,KACZ,OAAO,CAAC,UAAU,CAAC;kCAsGa,OAAO;;;;;;;;;;EAqP3C"}
@@ -1,56 +0,0 @@
1
- /**
2
- * Automatic workspace token refresh hook
3
- *
4
- * Monitors the workspace token and automatically refreshes it
5
- * 5 minutes before expiry. This ensures uninterrupted access to
6
- * workspace resources.
7
- *
8
- * Usage:
9
- * ```tsx
10
- * // In your root App component
11
- * function App() {
12
- * useTokenRefresh({
13
- * workspaceAuthServiceUrl: 'http://localhost:3730/graphql',
14
- * refreshBeforeExpiry: 5 * 60 * 1000, // 5 minutes
15
- * });
16
- *
17
- * return <AppContent />;
18
- * }
19
- * ```
20
- */
21
- export interface UseTokenRefreshOptions {
22
- /**
23
- * URL of workspace auth service GraphQL endpoint
24
- * Default: http://localhost:3730/graphql
25
- */
26
- workspaceAuthServiceUrl?: string;
27
- /**
28
- * Time before expiry to refresh token (in milliseconds)
29
- * Default: 5 minutes (300000ms)
30
- */
31
- refreshBeforeExpiry?: number;
32
- /**
33
- * Enable/disable auto-refresh
34
- * Default: true
35
- */
36
- enabled?: boolean;
37
- /**
38
- * Callback when token refresh succeeds
39
- */
40
- onRefreshSuccess?: (token: string) => void;
41
- /**
42
- * Callback when token refresh fails
43
- */
44
- onRefreshError?: (error: Error) => void;
45
- }
46
- export declare function useTokenRefresh(options?: UseTokenRefreshOptions): {
47
- /**
48
- * Manually trigger a token refresh
49
- */
50
- manualRefresh: () => Promise<string>;
51
- /**
52
- * Check if auto-refresh is currently scheduled
53
- */
54
- isScheduled: boolean;
55
- };
56
- //# sourceMappingURL=useTokenRefresh.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useTokenRefresh.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useTokenRefresh.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAE3C;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACzC;AAED,wBAAgB,eAAe,CAAC,OAAO,GAAE,sBAA2B;IAyGhE;;OAEG;;IAGH;;OAEG;;EAGN"}
@@ -1,33 +0,0 @@
1
- import { User, UserConnection, UserFilterInput, PaginationInput, DeleteUserResult } from '../types';
2
-
3
- interface UpdateUserProfileInput {
4
- avatar?: string;
5
- username?: string;
6
- firstName?: string;
7
- lastName?: string;
8
- name?: string;
9
- phoneNumber?: string;
10
- defaultWorkspaceId?: string;
11
- language?: string;
12
- timezone?: string;
13
- }
14
- interface AdminUpdateUserInput extends UpdateUserProfileInput {
15
- role?: string;
16
- status?: string;
17
- emailVerified?: boolean;
18
- }
19
- /**
20
- * Hook for user management operations
21
- */
22
- export declare function useUserOperations(): {
23
- getUser: (id: string) => Promise<User | null>;
24
- listUsers: (filter?: UserFilterInput, pagination?: PaginationInput) => Promise<UserConnection>;
25
- updateCurrentUserProfile: (input: UpdateUserProfileInput) => Promise<User>;
26
- updateUser: (id: string, input: AdminUpdateUserInput) => Promise<User>;
27
- deleteUser: (id: string) => Promise<DeleteUserResult>;
28
- hardDeleteUser: (id: string) => Promise<DeleteUserResult>;
29
- currentUser: User | null;
30
- isLoading: boolean;
31
- };
32
- export {};
33
- //# sourceMappingURL=useUserOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUserOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useUserOperations.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EACV,IAAI,EACJ,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EACjB,MAAM,UAAU,CAAC;AA2DlB,UAAU,sBAAsB;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,oBAAqB,SAAQ,sBAAsB;IAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,iBAAiB;kBAuClB,MAAM,KAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;yBAsB7B,eAAe,eACX,eAAe,KAC3B,OAAO,CAAC,cAAc,CAAC;sCAyBZ,sBAAsB,KAAG,OAAO,CAAC,IAAI,CAAC;qBAgCzC,MAAM,SAAS,oBAAoB,KAAG,OAAO,CAAC,IAAI,CAAC;qBA0BnD,MAAM,KAAG,OAAO,CAAC,gBAAgB,CAAC;yBA0BlC,MAAM,KAAG,OAAO,CAAC,gBAAgB,CAAC;;;EAiChD"}
@@ -1,35 +0,0 @@
1
- import { useMutation } from '@apollo/client/react';
2
- import { WorkspaceTokenResponse, SecretRotationResponse, RotateWorkspaceSecretInput } from '../types';
3
-
4
- /**
5
- * Hook for workspace token and secret operations
6
- */
7
- export declare function useWorkspaceOperations(): {
8
- generateWorkspaceToken: (_workspaceId: string) => Promise<WorkspaceTokenResponse>;
9
- switchWorkspace: (workspaceId: string) => Promise<WorkspaceTokenResponse>;
10
- createWorkspaceSecret: (_workspaceId: string) => Promise<boolean>;
11
- rotateWorkspaceSecret: (_input: RotateWorkspaceSecretInput) => Promise<SecretRotationResponse>;
12
- revokeWorkspaceSecret: (_workspaceId: string) => Promise<boolean>;
13
- revokeWorkspaceToken: (_token: string, _reason?: string) => Promise<boolean>;
14
- revokeAllMyWorkspaceTokens: (_reason?: string) => Promise<number>;
15
- clearWorkspace: () => void;
16
- createWorkspaceMutation: useMutation.MutationFunction<unknown, {
17
- [x: string]: any;
18
- }, import('@apollo/client').ApolloCache>;
19
- updateWorkspaceMutation: useMutation.MutationFunction<unknown, {
20
- [x: string]: any;
21
- }, import('@apollo/client').ApolloCache>;
22
- addWorkspaceMemberMutation: useMutation.MutationFunction<unknown, {
23
- [x: string]: any;
24
- }, import('@apollo/client').ApolloCache>;
25
- updateWorkspaceMemberMutation: useMutation.MutationFunction<unknown, {
26
- [x: string]: any;
27
- }, import('@apollo/client').ApolloCache>;
28
- removeWorkspaceMemberMutation: useMutation.MutationFunction<unknown, {
29
- [x: string]: any;
30
- }, import('@apollo/client').ApolloCache>;
31
- currentWorkspaceId: string | null;
32
- workspaceToken: string | null;
33
- isLoading: boolean;
34
- };
35
- //# sourceMappingURL=useWorkspaceOperations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWorkspaceOperations.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useWorkspaceOperations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AASnD,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAalB;;GAEG;AACH,wBAAgB,sBAAsB;2CAqBpB,MAAM,KACnB,OAAO,CAAC,sBAAsB,CAAC;mCAcnB,MAAM,KAClB,OAAO,CAAC,sBAAsB,CAAC;0CAalB,MAAM,KACnB,OAAO,CAAC,OAAO,CAAC;oCAYT,0BAA0B,KACjC,OAAO,CAAC,sBAAsB,CAAC;0CAclB,MAAM,KACnB,OAAO,CAAC,OAAO,CAAC;mCAYT,MAAM,YACJ,MAAM,KACf,OAAO,CAAC,OAAO,CAAC;2CAYP,MAAM,KACf,OAAO,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;EAmCnB"}
@@ -1,56 +0,0 @@
1
- /**
2
- * Workspace token management hook
3
- *
4
- * Provides functions to issue, refresh, and verify workspace tokens.
5
- * Automatically updates the auth store with new tokens.
6
- *
7
- * API Flow:
8
- * - Calls workspace gateway (https://gw-wspace.local.burdenoff.com/workspaces/graphql)
9
- * - Gateway federates wspace-auth-svc which handles token operations
10
- * - Auth token (from global-auth-svc) goes in Authorization header
11
- *
12
- * Usage:
13
- * ```tsx
14
- * const { issueToken, refreshToken, verifyToken, isLoading, error } = useWorkspaceToken({
15
- * workspaceGatewayUrl: 'https://gw-wspace.local.burdenoff.com/workspaces/graphql'
16
- * });
17
- *
18
- * // After login and organization/workspace selection
19
- * await issueToken(organizationId, workspaceId);
20
- *
21
- * // Refresh token before expiry (uses stored org/workspace IDs)
22
- * await refreshToken();
23
- * ```
24
- */
25
- export interface UseWorkspaceTokenOptions {
26
- /**
27
- * URL of workspace gateway GraphQL endpoint
28
- * Default: https://gw-wspace.local.burdenoff.com/workspaces/graphql
29
- *
30
- * Note: This should point to the workspace gateway, NOT directly to wspace-auth-svc.
31
- * The gateway federates wspace-auth-svc and handles routing.
32
- */
33
- workspaceGatewayUrl?: string;
34
- }
35
- export interface WorkspaceTokenPayload {
36
- sub: string;
37
- workspaceId: string;
38
- tenantId?: string;
39
- email?: string;
40
- username?: string;
41
- role?: string;
42
- scopes: string[];
43
- iat: number;
44
- exp: number;
45
- }
46
- export declare function useWorkspaceToken(options?: UseWorkspaceTokenOptions): {
47
- issueToken: (organizationId: string, workspaceId?: string, projectId?: string, scopes?: string[]) => Promise<string>;
48
- refreshToken: () => Promise<string>;
49
- verifyToken: (token?: string) => Promise<WorkspaceTokenPayload>;
50
- decodeToken: (token: string) => WorkspaceTokenPayload;
51
- isTokenExpired: (token?: string) => boolean;
52
- getTimeUntilExpiry: (token?: string) => number;
53
- isLoading: boolean;
54
- error: string | null;
55
- };
56
- //# sourceMappingURL=useWorkspaceToken.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useWorkspaceToken.d.ts","sourceRoot":"","sources":["../../../src/auth/hooks/useWorkspaceToken.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,iBAAiB,CAAC,OAAO,GAAE,wBAA6B;iCAkBlD,MAAM,gBACR,MAAM,cACR,MAAM,WACT,MAAM,EAAE,KAChB,OAAO,CAAC,MAAM,CAAC;wBAoKuB,OAAO,CAAC,MAAM,CAAC;0BA7EzC,MAAM,KAAG,OAAO,CAAC,qBAAqB,CAAC;yBAyFhB,MAAM,KAAG,qBAAqB;6BAoB3D,MAAM,KAAG,OAAO;iCAsBhB,MAAM,KAAG,MAAM;;;EA6B3B"}