@robosystems/core 0.3.0

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 (249) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +252 -0
  3. package/actions/entity-actions.d.ts +8 -0
  4. package/actions/entity-actions.js +16 -0
  5. package/actions/graph-actions.d.ts +3 -0
  6. package/actions/graph-actions.js +13 -0
  7. package/auth-components/AppSwitcher.d.ts +6 -0
  8. package/auth-components/AppSwitcher.js +28 -0
  9. package/auth-components/AuthGuard.d.ts +7 -0
  10. package/auth-components/AuthGuard.js +31 -0
  11. package/auth-components/AuthProvider.d.ts +9 -0
  12. package/auth-components/AuthProvider.js +565 -0
  13. package/auth-components/SessionWarningDialog.d.ts +1 -0
  14. package/auth-components/SessionWarningDialog.js +51 -0
  15. package/auth-components/SignInForm.d.ts +20 -0
  16. package/auth-components/SignInForm.js +139 -0
  17. package/auth-components/SignUpForm.d.ts +15 -0
  18. package/auth-components/SignUpForm.js +167 -0
  19. package/auth-components/TurnstileWidget.d.ts +99 -0
  20. package/auth-components/TurnstileWidget.js +224 -0
  21. package/auth-components/index.d.ts +6 -0
  22. package/auth-components/index.js +6 -0
  23. package/auth-core/cleanup.d.ts +44 -0
  24. package/auth-core/cleanup.js +157 -0
  25. package/auth-core/client.d.ts +121 -0
  26. package/auth-core/client.js +767 -0
  27. package/auth-core/config.d.ts +19 -0
  28. package/auth-core/config.js +56 -0
  29. package/auth-core/hooks.d.ts +19 -0
  30. package/auth-core/hooks.js +63 -0
  31. package/auth-core/index.d.ts +6 -0
  32. package/auth-core/index.js +6 -0
  33. package/auth-core/sso.d.ts +42 -0
  34. package/auth-core/sso.js +281 -0
  35. package/auth-core/token-storage.d.ts +58 -0
  36. package/auth-core/token-storage.js +177 -0
  37. package/auth-core/types.d.ts +145 -0
  38. package/auth-core/types.js +1 -0
  39. package/components/EntitySelector.d.ts +44 -0
  40. package/components/EntitySelector.js +64 -0
  41. package/components/EntitySelectorCore.d.ts +45 -0
  42. package/components/EntitySelectorCore.js +67 -0
  43. package/components/GraphSelectorCore.d.ts +21 -0
  44. package/components/GraphSelectorCore.js +39 -0
  45. package/components/PageLayout.d.ts +8 -0
  46. package/components/PageLayout.js +5 -0
  47. package/components/RepositoryGuard.d.ts +68 -0
  48. package/components/RepositoryGuard.js +91 -0
  49. package/components/console/ConsoleContent.d.ts +4 -0
  50. package/components/console/ConsoleContent.js +612 -0
  51. package/components/console/ConsoleMarkdown.d.ts +11 -0
  52. package/components/console/ConsoleMarkdown.js +49 -0
  53. package/components/console/ProgressiveText.d.ts +6 -0
  54. package/components/console/ProgressiveText.js +21 -0
  55. package/components/console/graphAwareConfig.d.ts +70 -0
  56. package/components/console/graphAwareConfig.js +411 -0
  57. package/components/console/index.d.ts +6 -0
  58. package/components/console/index.js +4 -0
  59. package/components/console/types.d.ts +84 -0
  60. package/components/console/types.js +1 -0
  61. package/components/graph-filters.d.ts +75 -0
  62. package/components/graph-filters.js +111 -0
  63. package/components/index.d.ts +10 -0
  64. package/components/index.js +9 -0
  65. package/components/repositories/ActiveSubscriptions.d.ts +26 -0
  66. package/components/repositories/ActiveSubscriptions.js +103 -0
  67. package/components/repositories/BrowseRepositories.d.ts +11 -0
  68. package/components/repositories/BrowseRepositories.js +184 -0
  69. package/components/repositories/index.d.ts +2 -0
  70. package/components/repositories/index.js +2 -0
  71. package/components/search/SearchContent.d.ts +4 -0
  72. package/components/search/SearchContent.js +168 -0
  73. package/components/search/index.d.ts +2 -0
  74. package/components/search/index.js +1 -0
  75. package/components/search/types.d.ts +15 -0
  76. package/components/search/types.js +1 -0
  77. package/contexts/entity-context.d.ts +28 -0
  78. package/contexts/entity-context.js +89 -0
  79. package/contexts/graph-context.d.ts +27 -0
  80. package/contexts/graph-context.js +128 -0
  81. package/contexts/index.d.ts +5 -0
  82. package/contexts/index.js +5 -0
  83. package/contexts/org-context.d.ts +25 -0
  84. package/contexts/org-context.js +64 -0
  85. package/contexts/service-offerings-context.d.ts +45 -0
  86. package/contexts/service-offerings-context.js +98 -0
  87. package/contexts/sidebar-context.d.ts +18 -0
  88. package/contexts/sidebar-context.js +44 -0
  89. package/hooks/index.d.ts +6 -0
  90. package/hooks/index.js +6 -0
  91. package/hooks/use-api-error.d.ts +3 -0
  92. package/hooks/use-api-error.js +24 -0
  93. package/hooks/use-media-query.d.ts +1 -0
  94. package/hooks/use-media-query.js +21 -0
  95. package/hooks/use-streaming-query.d.ts +22 -0
  96. package/hooks/use-streaming-query.js +142 -0
  97. package/hooks/use-toast.d.ts +37 -0
  98. package/hooks/use-toast.js +117 -0
  99. package/hooks/use-user-limits.d.ts +12 -0
  100. package/hooks/use-user-limits.js +73 -0
  101. package/hooks/use-user.d.ts +11 -0
  102. package/hooks/use-user.js +39 -0
  103. package/index.d.ts +29 -0
  104. package/index.js +77 -0
  105. package/lib/entity-cookie.d.ts +10 -0
  106. package/lib/entity-cookie.js +38 -0
  107. package/lib/graph-cookie.d.ts +11 -0
  108. package/lib/graph-cookie.js +62 -0
  109. package/lib/graph-tiers.d.ts +41 -0
  110. package/lib/graph-tiers.js +107 -0
  111. package/lib/index.d.ts +3 -0
  112. package/lib/index.js +3 -0
  113. package/lib/sidebar-cookie.d.ts +11 -0
  114. package/lib/sidebar-cookie.js +42 -0
  115. package/library/colors.d.ts +4 -0
  116. package/library/colors.js +41 -0
  117. package/library/components/ClassificationPicker.d.ts +8 -0
  118. package/library/components/ClassificationPicker.js +55 -0
  119. package/library/components/ElementBrowser.d.ts +11 -0
  120. package/library/components/ElementBrowser.js +106 -0
  121. package/library/components/ElementDetail.d.ts +7 -0
  122. package/library/components/ElementDetail.js +97 -0
  123. package/library/components/LibraryHierarchy.d.ts +13 -0
  124. package/library/components/LibraryHierarchy.js +380 -0
  125. package/library/components/TaxonomySidebar.d.ts +6 -0
  126. package/library/components/TaxonomySidebar.js +45 -0
  127. package/library/index.d.ts +8 -0
  128. package/library/index.js +7 -0
  129. package/package.json +37 -0
  130. package/research/CoverageCard.d.ts +12 -0
  131. package/research/CoverageCard.js +15 -0
  132. package/research/CoverageGrid.d.ts +6 -0
  133. package/research/CoverageGrid.js +9 -0
  134. package/research/CoverageHistory.d.ts +5 -0
  135. package/research/CoverageHistory.js +7 -0
  136. package/research/ResearchArticle.d.ts +15 -0
  137. package/research/ResearchArticle.js +26 -0
  138. package/research/catalog.d.ts +14 -0
  139. package/research/catalog.js +42 -0
  140. package/research/index.d.ts +6 -0
  141. package/research/index.js +9 -0
  142. package/research/types.d.ts +38 -0
  143. package/research/types.js +4 -0
  144. package/task-monitoring/hooks.d.ts +26 -0
  145. package/task-monitoring/hooks.js +126 -0
  146. package/task-monitoring/index.d.ts +5 -0
  147. package/task-monitoring/index.js +7 -0
  148. package/task-monitoring/operationErrors.d.ts +82 -0
  149. package/task-monitoring/operationErrors.js +251 -0
  150. package/task-monitoring/operationHooks.d.ts +117 -0
  151. package/task-monitoring/operationHooks.js +536 -0
  152. package/task-monitoring/operationMonitor.d.ts +78 -0
  153. package/task-monitoring/operationMonitor.js +200 -0
  154. package/task-monitoring/operationTypes.d.ts +236 -0
  155. package/task-monitoring/operationTypes.js +60 -0
  156. package/task-monitoring/taskMonitor.d.ts +14 -0
  157. package/task-monitoring/taskMonitor.js +132 -0
  158. package/task-monitoring/types.d.ts +31 -0
  159. package/task-monitoring/types.js +1 -0
  160. package/theme/flowbite-theme.d.ts +758 -0
  161. package/theme/flowbite-theme.js +765 -0
  162. package/theme/index.d.ts +1 -0
  163. package/theme/index.js +1 -0
  164. package/types/entity.d.ts +19 -0
  165. package/types/index.d.ts +2 -0
  166. package/types/index.js +1 -0
  167. package/types/user.d.ts +6 -0
  168. package/ui-components/ConfirmModal.d.ts +41 -0
  169. package/ui-components/ConfirmModal.js +19 -0
  170. package/ui-components/EmptyState.d.ts +22 -0
  171. package/ui-components/EmptyState.js +10 -0
  172. package/ui-components/LoadingState.d.ts +27 -0
  173. package/ui-components/LoadingState.js +12 -0
  174. package/ui-components/Logo.d.ts +28 -0
  175. package/ui-components/Logo.js +95 -0
  176. package/ui-components/Spinner.d.ts +37 -0
  177. package/ui-components/Spinner.js +48 -0
  178. package/ui-components/StatCard.d.ts +21 -0
  179. package/ui-components/StatCard.js +10 -0
  180. package/ui-components/api-keys/ApiKeyDisplay.d.ts +13 -0
  181. package/ui-components/api-keys/ApiKeyDisplay.js +7 -0
  182. package/ui-components/api-keys/ApiKeyTable.d.ts +9 -0
  183. package/ui-components/api-keys/ApiKeyTable.js +17 -0
  184. package/ui-components/api-keys/ApiKeysCard.d.ts +6 -0
  185. package/ui-components/api-keys/ApiKeysCard.js +97 -0
  186. package/ui-components/api-keys/CreateApiKeyModal.d.ts +11 -0
  187. package/ui-components/api-keys/CreateApiKeyModal.js +47 -0
  188. package/ui-components/api-keys/SecureApiKeyField.d.ts +13 -0
  189. package/ui-components/api-keys/SecureApiKeyField.js +64 -0
  190. package/ui-components/api-keys/index.d.ts +5 -0
  191. package/ui-components/api-keys/index.js +5 -0
  192. package/ui-components/chat/ChatHeader.d.ts +12 -0
  193. package/ui-components/chat/ChatHeader.js +5 -0
  194. package/ui-components/chat/ChatInputArea.d.ts +16 -0
  195. package/ui-components/chat/ChatInputArea.js +9 -0
  196. package/ui-components/chat/ChatMessage.d.ts +7 -0
  197. package/ui-components/chat/ChatMessage.js +24 -0
  198. package/ui-components/chat/DeepResearchToggle.d.ts +8 -0
  199. package/ui-components/chat/DeepResearchToggle.js +13 -0
  200. package/ui-components/chat/index.d.ts +9 -0
  201. package/ui-components/chat/index.js +8 -0
  202. package/ui-components/chat/types.d.ts +23 -0
  203. package/ui-components/chat/types.js +51 -0
  204. package/ui-components/forms/PasswordRequirements.d.ts +10 -0
  205. package/ui-components/forms/PasswordRequirements.js +15 -0
  206. package/ui-components/forms/SettingsCard.d.ts +11 -0
  207. package/ui-components/forms/SettingsCard.js +5 -0
  208. package/ui-components/forms/SettingsFormField.d.ts +18 -0
  209. package/ui-components/forms/SettingsFormField.js +17 -0
  210. package/ui-components/forms/StatusAlert.d.ts +8 -0
  211. package/ui-components/forms/StatusAlert.js +7 -0
  212. package/ui-components/forms/index.d.ts +4 -0
  213. package/ui-components/forms/index.js +4 -0
  214. package/ui-components/index.d.ts +13 -0
  215. package/ui-components/index.js +18 -0
  216. package/ui-components/layout/CoreNavbar.d.ts +14 -0
  217. package/ui-components/layout/CoreNavbar.js +53 -0
  218. package/ui-components/layout/CoreSidebar.d.ts +28 -0
  219. package/ui-components/layout/CoreSidebar.js +62 -0
  220. package/ui-components/layout/LandingFooter.d.ts +28 -0
  221. package/ui-components/layout/LandingFooter.js +34 -0
  222. package/ui-components/layout/PageContainer.d.ts +8 -0
  223. package/ui-components/layout/PageContainer.js +17 -0
  224. package/ui-components/layout/PageHeader.d.ts +23 -0
  225. package/ui-components/layout/PageHeader.js +12 -0
  226. package/ui-components/layout/SettingsContainer.d.ts +10 -0
  227. package/ui-components/layout/SettingsContainer.js +9 -0
  228. package/ui-components/layout/ThemeToggle.d.ts +4 -0
  229. package/ui-components/layout/ThemeToggle.js +6 -0
  230. package/ui-components/layout/index.d.ts +7 -0
  231. package/ui-components/layout/index.js +7 -0
  232. package/ui-components/settings/GeneralInformationCard.d.ts +12 -0
  233. package/ui-components/settings/GeneralInformationCard.js +72 -0
  234. package/ui-components/settings/PasswordInformationCard.d.ts +10 -0
  235. package/ui-components/settings/PasswordInformationCard.js +167 -0
  236. package/ui-components/settings/SettingsPageHeader.d.ts +7 -0
  237. package/ui-components/settings/SettingsPageHeader.js +6 -0
  238. package/ui-components/settings/index.d.ts +3 -0
  239. package/ui-components/settings/index.js +3 -0
  240. package/ui-components/support/SupportModal.d.ts +15 -0
  241. package/ui-components/support/SupportModal.js +74 -0
  242. package/ui-components/support/index.d.ts +2 -0
  243. package/ui-components/support/index.js +1 -0
  244. package/ui-components/types/index.d.ts +39 -0
  245. package/ui-components/types/index.js +1 -0
  246. package/utils/index.d.ts +31 -0
  247. package/utils/index.js +38 -0
  248. package/utils/turnstile-config.d.ts +11 -0
  249. package/utils/turnstile-config.js +19 -0
@@ -0,0 +1,6 @@
1
+ export { AppSwitcher } from './AppSwitcher';
2
+ export { AuthGuard } from './AuthGuard';
3
+ export { AuthProvider, useAuth } from './AuthProvider';
4
+ export { SignInForm } from './SignInForm';
5
+ export { SignUpForm } from './SignUpForm';
6
+ export { TurnstileWidget, useTurnstile } from './TurnstileWidget';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Logout cleanup utilities
3
+ *
4
+ * Provides comprehensive cleanup of user-specific data on logout
5
+ * including cookies, localStorage, and sessionStorage.
6
+ */
7
+ /**
8
+ * Clear all user-specific cookies on logout
9
+ */
10
+ export declare function clearUserCookies(): void;
11
+ /**
12
+ * Clear user-specific localStorage items
13
+ */
14
+ export declare function clearUserLocalStorage(): void;
15
+ /**
16
+ * Clear user-specific sessionStorage items
17
+ */
18
+ export declare function clearUserSessionStorage(): void;
19
+ /**
20
+ * Comprehensive logout cleanup
21
+ *
22
+ * Clears all user-specific data from the browser including:
23
+ * - User-specific cookies (graph selection, preferences, etc.)
24
+ * - User-specific localStorage items (saved queries, etc.)
25
+ * - User-specific sessionStorage items (auth cache, etc.)
26
+ */
27
+ export declare function performLogoutCleanup(): void;
28
+ /**
29
+ * Reset UI state that should not persist between users
30
+ *
31
+ * This can be called to reset UI state that might confuse
32
+ * users when switching accounts (like showing graph tabs
33
+ * for a user who doesn't have any graphs).
34
+ */
35
+ export declare function resetUIState(): void;
36
+ /**
37
+ * Diagnostic function to list all cookies and storage items
38
+ * Useful for development and debugging
39
+ */
40
+ export declare function listUserData(): {
41
+ cookies: string[];
42
+ localStorage: string[];
43
+ sessionStorage: string[];
44
+ };
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Logout cleanup utilities
3
+ *
4
+ * Provides comprehensive cleanup of user-specific data on logout
5
+ * including cookies, localStorage, and sessionStorage.
6
+ */
7
+ /**
8
+ * Clear all user-specific cookies on logout
9
+ */
10
+ export function clearUserCookies() {
11
+ if (typeof document === 'undefined')
12
+ return;
13
+ // List of user-specific cookies to clear
14
+ const userCookies = [
15
+ 'selected-graph', // Graph selection state
16
+ 'selected-entity', // Entity selection state
17
+ 'credit-visibility', // UI preferences
18
+ // Note: auth-token is cleared by the backend
19
+ // Note: sidebar-collapsed is kept as it's a UI preference that can persist
20
+ ];
21
+ userCookies.forEach((cookieName) => {
22
+ // Set cookie to expired date to delete it
23
+ document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${window.location.hostname}`;
24
+ // Also try without domain for localhost/development
25
+ document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;
26
+ });
27
+ }
28
+ /**
29
+ * Clear user-specific localStorage items
30
+ */
31
+ export function clearUserLocalStorage() {
32
+ if (typeof localStorage === 'undefined')
33
+ return;
34
+ try {
35
+ // Get all localStorage keys
36
+ const keys = Object.keys(localStorage);
37
+ // Patterns of user-specific localStorage items to clear
38
+ const userDataPatterns = [
39
+ /^saved_queries_/, // Saved queries per graph: saved_queries_${graphId}
40
+ /^query_history_/, // Query history per graph: query_history_${graphId}
41
+ /^graph_/, // Any graph-specific data
42
+ /^user_/, // Any user-specific data
43
+ /^auth_/, // Auth-related data (though we handle auth_user_cache separately)
44
+ ];
45
+ // Clear matching items
46
+ keys.forEach((key) => {
47
+ if (userDataPatterns.some((pattern) => pattern.test(key))) {
48
+ try {
49
+ localStorage.removeItem(key);
50
+ }
51
+ catch (error) {
52
+ console.warn(`Failed to remove localStorage item: ${key}`, error);
53
+ }
54
+ }
55
+ });
56
+ }
57
+ catch (error) {
58
+ console.warn('Failed to access localStorage for cleanup', error);
59
+ }
60
+ }
61
+ /**
62
+ * Clear user-specific sessionStorage items
63
+ */
64
+ export function clearUserSessionStorage() {
65
+ if (typeof sessionStorage === 'undefined')
66
+ return;
67
+ try {
68
+ // Get all sessionStorage keys
69
+ const keys = Object.keys(sessionStorage);
70
+ // Patterns of user-specific sessionStorage items to clear
71
+ const userDataPatterns = [
72
+ /^auth_/, // Auth cache and related data
73
+ /^user_/, // User-specific session data
74
+ /^graph_/, // Graph-specific session data
75
+ /^temp_/, // Temporary user data
76
+ ];
77
+ // Clear matching items
78
+ keys.forEach((key) => {
79
+ if (userDataPatterns.some((pattern) => pattern.test(key))) {
80
+ try {
81
+ sessionStorage.removeItem(key);
82
+ }
83
+ catch (error) {
84
+ console.warn(`Failed to remove sessionStorage item: ${key}`, error);
85
+ }
86
+ }
87
+ });
88
+ }
89
+ catch (error) {
90
+ console.warn('Failed to access sessionStorage for cleanup', error);
91
+ }
92
+ }
93
+ /**
94
+ * Comprehensive logout cleanup
95
+ *
96
+ * Clears all user-specific data from the browser including:
97
+ * - User-specific cookies (graph selection, preferences, etc.)
98
+ * - User-specific localStorage items (saved queries, etc.)
99
+ * - User-specific sessionStorage items (auth cache, etc.)
100
+ */
101
+ export function performLogoutCleanup() {
102
+ clearUserCookies();
103
+ clearUserLocalStorage();
104
+ clearUserSessionStorage();
105
+ }
106
+ /**
107
+ * Reset UI state that should not persist between users
108
+ *
109
+ * This can be called to reset UI state that might confuse
110
+ * users when switching accounts (like showing graph tabs
111
+ * for a user who doesn't have any graphs).
112
+ */
113
+ export function resetUIState() {
114
+ if (typeof document === 'undefined')
115
+ return;
116
+ // Clear selected graph cookie specifically
117
+ document.cookie = `selected-graph=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`;
118
+ // You could also reset other UI state here, but be careful
119
+ // not to clear preferences that should persist (like theme, language, etc.)
120
+ }
121
+ /**
122
+ * Diagnostic function to list all cookies and storage items
123
+ * Useful for development and debugging
124
+ */
125
+ export function listUserData() {
126
+ const result = {
127
+ cookies: [],
128
+ localStorage: [],
129
+ sessionStorage: [],
130
+ };
131
+ // List cookies
132
+ if (typeof document !== 'undefined') {
133
+ result.cookies = document.cookie
134
+ .split(';')
135
+ .map((c) => c.trim().split('=')[0])
136
+ .filter(Boolean);
137
+ }
138
+ // List localStorage
139
+ if (typeof localStorage !== 'undefined') {
140
+ try {
141
+ result.localStorage = Object.keys(localStorage);
142
+ }
143
+ catch (error) {
144
+ console.warn('Failed to access localStorage', error);
145
+ }
146
+ }
147
+ // List sessionStorage
148
+ if (typeof sessionStorage !== 'undefined') {
149
+ try {
150
+ result.sessionStorage = Object.keys(sessionStorage);
151
+ }
152
+ catch (error) {
153
+ console.warn('Failed to access sessionStorage', error);
154
+ }
155
+ }
156
+ return result;
157
+ }
@@ -0,0 +1,121 @@
1
+ import type { APIKey, AuthResponse, AuthUser, CreateAPIKeyRequest, SSOTokenResponse } from './types';
2
+ export declare class TokenExpiredError extends Error {
3
+ constructor(message?: string);
4
+ }
5
+ export declare class RoboSystemsAuthClient {
6
+ private client;
7
+ private authCheckPromise;
8
+ private lastAuthCheck;
9
+ private lastError;
10
+ private refreshRetryCount;
11
+ private readonly MAX_REFRESH_RETRIES;
12
+ private readonly INITIAL_RETRY_DELAY;
13
+ constructor(baseUrl: string);
14
+ /**
15
+ * Configure the client with JWT authentication for all requests
16
+ */
17
+ private configureClientWithAuth;
18
+ /**
19
+ * Push the latest auth token into the SDK extensions global config.
20
+ *
21
+ * Called from every auth success path (`login` / `register` / SSO
22
+ * token exchange / verify-email) so the SDK extensions singleton
23
+ * stays in sync with the current credential.
24
+ *
25
+ * The GraphQL read path already has refresh via `tokenProvider`
26
+ * (wired in `configureClientWithAuth`) and does not depend on this
27
+ * static field. But the SDK's React hooks (`useQuery`, `useOperation`,
28
+ * `useStreamingQuery`, …) still read `getSDKClientConfig().token`
29
+ * via `extractTokenFromSDKClient` to seed their inner `QueryClient`
30
+ * / `OperationClient` instances. Keeping the static field updated
31
+ * after every auth success keeps those hook-owned clients
32
+ * authenticated across login/register/SSO transitions.
33
+ *
34
+ * No-op when the SDK extensions module isn't installed.
35
+ */
36
+ private syncClientConfigToken;
37
+ login(email: string, password: string): Promise<AuthResponse>;
38
+ register(email: string, password: string, name?: string, captchaToken?: string): Promise<AuthResponse>;
39
+ logout(): Promise<void>;
40
+ getCurrentUser(): Promise<AuthUser>;
41
+ private performAuthCheck;
42
+ refreshSession(): Promise<AuthResponse>;
43
+ /**
44
+ * Refresh session with exponential backoff retry logic
45
+ */
46
+ private refreshSessionWithRetry;
47
+ createAPIKey(request: CreateAPIKeyRequest): Promise<APIKey>;
48
+ getAPIKeys(): Promise<APIKey[]>;
49
+ revokeAPIKey(keyId: string): Promise<void>;
50
+ generateSSOToken(): Promise<SSOTokenResponse>;
51
+ ssoExchange(token: string, targetApp: string): Promise<{
52
+ session_id: string;
53
+ }>;
54
+ ssoComplete(sessionId: string): Promise<AuthResponse>;
55
+ checkAuthentication(): Promise<AuthUser | null>;
56
+ clearAuthCache(): void;
57
+ /**
58
+ * Send password reset email
59
+ */
60
+ forgotPassword(email: string): Promise<{
61
+ success: boolean;
62
+ message?: string;
63
+ }>;
64
+ /**
65
+ * Reset password using token
66
+ */
67
+ resetPassword(token: string, newPassword: string): Promise<{
68
+ success: boolean;
69
+ message?: string;
70
+ }>;
71
+ /**
72
+ * Validate password reset token
73
+ */
74
+ validateResetToken(token: string): Promise<{
75
+ valid: boolean;
76
+ email?: string;
77
+ message?: string;
78
+ }>;
79
+ /**
80
+ * Verify email with token
81
+ */
82
+ verifyEmail(token: string): Promise<{
83
+ success: boolean;
84
+ message?: string;
85
+ user?: AuthUser;
86
+ }>;
87
+ /**
88
+ * Resend verification email
89
+ */
90
+ resendVerificationEmail(email: string): Promise<{
91
+ success: boolean;
92
+ message?: string;
93
+ }>;
94
+ /**
95
+ * Get password policy requirements
96
+ */
97
+ getPasswordPolicy(): Promise<{
98
+ minLength: number;
99
+ requireUppercase: boolean;
100
+ requireLowercase: boolean;
101
+ requireNumbers: boolean;
102
+ requireSpecial: boolean;
103
+ specialCharacters: string;
104
+ }>;
105
+ /**
106
+ * Check password strength
107
+ */
108
+ checkPasswordStrength(password: string, email?: string): Promise<{
109
+ score: number;
110
+ strength: 'very-weak' | 'weak' | 'fair' | 'good' | 'strong';
111
+ errors: string[];
112
+ suggestions: string[];
113
+ is_valid: boolean;
114
+ }>;
115
+ /**
116
+ * Validate and safely cast SDK response data
117
+ */
118
+ private normalizeUser;
119
+ private validateSDKAuthResponse;
120
+ private validateSDKCurrentUserResponse;
121
+ }