@oxyhq/services 5.18.2 → 5.18.4
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.
- package/lib/commonjs/core/mixins/index.js +36 -13
- package/lib/commonjs/core/mixins/index.js.map +1 -1
- package/lib/commonjs/index.js +16 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js +177 -0
- package/lib/commonjs/ui/client.js.map +1 -0
- package/lib/commonjs/ui/components/WebOxyProvider.js +98 -0
- package/lib/commonjs/ui/components/WebOxyProvider.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditFieldModal.js +412 -0
- package/lib/commonjs/ui/components/profile/EditFieldModal.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +63 -1
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +115 -0
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSettingToggle.js +7 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js +75 -0
- package/lib/commonjs/ui/hooks/useWebSSO.js.map +1 -0
- package/lib/commonjs/ui/index.js +17 -2
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +59 -65
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +38 -58
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +105 -0
- package/lib/commonjs/ui/server.js.map +1 -0
- package/lib/commonjs/ui/utils/iconNames.js +133 -0
- package/lib/commonjs/ui/utils/iconNames.js.map +1 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js +7 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/utils/requestUtils.js +4 -3
- package/lib/commonjs/utils/requestUtils.js.map +1 -1
- package/lib/module/core/mixins/index.js +36 -13
- package/lib/module/core/mixins/index.js.map +1 -1
- package/lib/module/index.js +5 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js +48 -0
- package/lib/module/ui/client.js.map +1 -0
- package/lib/module/ui/components/WebOxyProvider.js +94 -0
- package/lib/module/ui/components/WebOxyProvider.js.map +1 -0
- package/lib/module/ui/components/profile/EditFieldModal.js +406 -0
- package/lib/module/ui/components/profile/EditFieldModal.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +63 -1
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +106 -0
- package/lib/module/ui/hooks/useAuth.js.map +1 -0
- package/lib/module/ui/hooks/useSettingToggle.js +7 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/hooks/useWebSSO.js +71 -0
- package/lib/module/ui/hooks/useWebSSO.js.map +1 -0
- package/lib/module/ui/index.js +17 -3
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +59 -65
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +39 -59
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/server.js +65 -0
- package/lib/module/ui/server.js.map +1 -0
- package/lib/module/ui/utils/iconNames.js +124 -0
- package/lib/module/ui/utils/iconNames.js.map +1 -0
- package/lib/module/ui/utils/sessionHelpers.js +7 -0
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/utils/requestUtils.js +4 -2
- package/lib/module/utils/requestUtils.js.map +1 -1
- package/lib/typescript/commonjs/core/mixins/index.d.ts +18 -1115
- package/lib/typescript/commonjs/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +34 -0
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/WebOxyProvider.d.ts +44 -0
- package/lib/typescript/commonjs/ui/components/WebOxyProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts +110 -0
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +3 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +3 -3
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +6 -10
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +3 -5
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +69 -0
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSettingToggle.d.ts +4 -2
- package/lib/typescript/commonjs/ui/hooks/useSettingToggle.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +34 -0
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/index.d.ts +2 -2
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +43 -0
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/iconNames.d.ts +112 -0
- package/lib/typescript/commonjs/ui/utils/iconNames.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts +8 -3
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/requestUtils.d.ts +3 -1
- package/lib/typescript/commonjs/utils/requestUtils.d.ts.map +1 -1
- package/lib/typescript/module/core/mixins/index.d.ts +18 -1115
- package/lib/typescript/module/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +34 -0
- package/lib/typescript/module/ui/client.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/WebOxyProvider.d.ts +44 -0
- package/lib/typescript/module/ui/components/WebOxyProvider.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts +110 -0
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts +3 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +3 -3
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +6 -10
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +3 -5
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +69 -0
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSettingToggle.d.ts +4 -2
- package/lib/typescript/module/ui/hooks/useSettingToggle.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +34 -0
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts.map +1 -0
- package/lib/typescript/module/ui/index.d.ts +2 -2
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +43 -0
- package/lib/typescript/module/ui/server.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/iconNames.d.ts +112 -0
- package/lib/typescript/module/ui/utils/iconNames.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts +8 -3
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/module/utils/requestUtils.d.ts +3 -1
- package/lib/typescript/module/utils/requestUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/mixins/index.ts +57 -43
- package/src/index.ts +6 -1
- package/src/ui/client.ts +56 -0
- package/src/ui/components/WebOxyProvider.tsx +109 -0
- package/src/ui/components/profile/EditFieldModal.tsx +465 -0
- package/src/ui/context/OxyContext.tsx +69 -0
- package/src/ui/hooks/useAuth.ts +159 -0
- package/src/ui/hooks/useSettingToggle.ts +7 -3
- package/src/ui/hooks/useWebSSO.ts +93 -0
- package/src/ui/index.ts +17 -2
- package/src/ui/screens/PrivacySettingsScreen.tsx +54 -63
- package/src/ui/screens/SearchSettingsScreen.tsx +42 -64
- package/src/ui/server.ts +70 -0
- package/src/ui/utils/iconNames.ts +136 -0
- package/src/ui/utils/sessionHelpers.ts +10 -3
- package/src/utils/requestUtils.ts +10 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/mixins/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/core/mixins/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsBH,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,cAAc,EAAE,aAAa,EA8BlC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,QAKjC;AAGD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -13,7 +13,10 @@ export { CrossDomainAuth, createCrossDomainAuth } from './core';
|
|
|
13
13
|
export type { CrossDomainAuthOptions } from './core';
|
|
14
14
|
export type { KeyPair, SignedMessage, AuthChallenge, RecoveryPhraseResult } from './crypto';
|
|
15
15
|
export { useOxy } from './ui/context/OxyContext';
|
|
16
|
+
export { useAuth } from './ui/hooks/useAuth';
|
|
17
|
+
export type { AuthState, AuthActions, UseAuthReturn } from './ui/hooks/useAuth';
|
|
16
18
|
export { default as OxyProvider } from './ui/components/OxyProvider';
|
|
19
|
+
export { default as WebOxyProvider } from './ui/components/WebOxyProvider';
|
|
17
20
|
export { DeviceManager } from './utils/deviceManager';
|
|
18
21
|
export type { DeviceFingerprint, StoredDeviceInfo } from './utils/deviceManager';
|
|
19
22
|
export { SUPPORTED_LANGUAGES, getLanguageMetadata, getLanguageName, getNativeLanguageName, normalizeLanguageCode } from './utils/languageUtils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,mBAAmB,CAAC;AAG3B,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,W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3
|
+
*
|
|
4
|
+
* Import from this module for client-side bundles where tree-shaking is important.
|
|
5
|
+
* These are direct exports without runtime detection overhead.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* import { OxyProvider, useOxy, Avatar } from '@oxyhq/services/ui/client';
|
|
9
|
+
*/
|
|
10
|
+
export { default as OxyProvider } from './components/OxyProvider';
|
|
11
|
+
export { default as WebOxyProvider } from './components/WebOxyProvider';
|
|
12
|
+
export { default as OxySignInButton } from './components/OxySignInButton';
|
|
13
|
+
export { default as OxyLogo } from './components/OxyLogo';
|
|
14
|
+
export { default as Avatar } from './components/Avatar';
|
|
15
|
+
export { default as FollowButton } from './components/FollowButton';
|
|
16
|
+
export { default as OxyPayButton } from './components/OxyPayButton';
|
|
17
|
+
export { FontLoader, setupFonts } from './components/FontLoader';
|
|
18
|
+
export { OxyIcon } from './components/icon';
|
|
19
|
+
export { useOxy } from './context/OxyContext';
|
|
20
|
+
export { useAuth } from './hooks/useAuth';
|
|
21
|
+
export type { AuthState, AuthActions, UseAuthReturn } from './hooks/useAuth';
|
|
22
|
+
export { useFollow } from './hooks';
|
|
23
|
+
export { useStorage } from './hooks/useStorage';
|
|
24
|
+
export type { UseStorageOptions, UseStorageResult } from './hooks/useStorage';
|
|
25
|
+
export { default as ProfileScreen } from './screens/ProfileScreen';
|
|
26
|
+
export { useAuthStore } from './stores/authStore';
|
|
27
|
+
export { useAccountStore } from './stores/accountStore';
|
|
28
|
+
export { fontFamilies, fontStyles } from './styles/fonts';
|
|
29
|
+
export { toast } from '../lib/sonner';
|
|
30
|
+
export { OxyServices } from '../core';
|
|
31
|
+
export type { User, LoginResponse, ApiError } from '../models/interfaces';
|
|
32
|
+
export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extractErrorMessage, } from './utils/errorHandlers';
|
|
33
|
+
export type { HandleAuthErrorOptions } from './utils/errorHandlers';
|
|
34
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|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,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EACH,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebOxyProvider - OxyProvider for web apps (Next.js, React)
|
|
3
|
+
*
|
|
4
|
+
* This provider is specifically for web environments and doesn't include
|
|
5
|
+
* React Native-specific dependencies. It provides:
|
|
6
|
+
* - Automatic cross-domain SSO via hidden iframe
|
|
7
|
+
* - Session management
|
|
8
|
+
* - All useOxy/useAuth functionality
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { WebOxyProvider, useAuth } from '@oxyhq/services';
|
|
13
|
+
*
|
|
14
|
+
* function App() {
|
|
15
|
+
* return (
|
|
16
|
+
* <WebOxyProvider baseURL="https://api.oxy.so">
|
|
17
|
+
* <YourApp />
|
|
18
|
+
* </WebOxyProvider>
|
|
19
|
+
* );
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
import { type FC, type ReactNode } from 'react';
|
|
24
|
+
import { createQueryClient } from '../hooks/queryClient';
|
|
25
|
+
export interface WebOxyProviderProps {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
baseURL: string;
|
|
28
|
+
authWebUrl?: string;
|
|
29
|
+
onAuthStateChange?: (user: any) => void;
|
|
30
|
+
storageKeyPrefix?: string;
|
|
31
|
+
queryClient?: ReturnType<typeof createQueryClient>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* OxyProvider for web applications
|
|
35
|
+
*
|
|
36
|
+
* Features:
|
|
37
|
+
* - Automatic cross-domain SSO (checks auth.oxy.so/auth/silent on mount)
|
|
38
|
+
* - Session persistence in localStorage
|
|
39
|
+
* - TanStack Query for data fetching
|
|
40
|
+
* - No React Native dependencies
|
|
41
|
+
*/
|
|
42
|
+
declare const WebOxyProvider: FC<WebOxyProviderProps>;
|
|
43
|
+
export default WebOxyProvider;
|
|
44
|
+
//# sourceMappingURL=WebOxyProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebOxyProvider.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/WebOxyProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAA+B,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACxC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;CACpD;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA2D3C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextInputProps } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Field configuration for single/multi field variants
|
|
5
|
+
*/
|
|
6
|
+
export interface FieldConfig {
|
|
7
|
+
/** Unique key for the field */
|
|
8
|
+
key: string;
|
|
9
|
+
/** Label displayed above the input */
|
|
10
|
+
label: string;
|
|
11
|
+
/** Initial value for the field */
|
|
12
|
+
initialValue: string;
|
|
13
|
+
/** Placeholder text */
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
/** Validation function - returns error message or undefined */
|
|
16
|
+
validation?: (value: string) => string | undefined;
|
|
17
|
+
/** Additional TextInput props (multiline, keyboardType, etc.) */
|
|
18
|
+
inputProps?: Partial<TextInputProps>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* List item for list variant
|
|
22
|
+
*/
|
|
23
|
+
export interface ListItem {
|
|
24
|
+
id: string;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Configuration for list variant
|
|
29
|
+
*/
|
|
30
|
+
export interface ListConfig<T extends ListItem> {
|
|
31
|
+
/** Initial items */
|
|
32
|
+
items: T[];
|
|
33
|
+
/** Render function for each item */
|
|
34
|
+
renderItem: (item: T, onRemove: () => void, colors: Record<string, string>) => React.ReactNode;
|
|
35
|
+
/** Placeholder for add input */
|
|
36
|
+
addItemPlaceholder: string;
|
|
37
|
+
/** Label for add input section */
|
|
38
|
+
addItemLabel?: string;
|
|
39
|
+
/** Function to create a new item from input value */
|
|
40
|
+
createItem: (value: string) => T;
|
|
41
|
+
/** List title shown above items */
|
|
42
|
+
listTitle?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Props for EditFieldModal
|
|
46
|
+
*/
|
|
47
|
+
export interface EditFieldModalProps<T extends ListItem = ListItem> {
|
|
48
|
+
/** Whether the modal is visible */
|
|
49
|
+
visible: boolean;
|
|
50
|
+
/** Close handler */
|
|
51
|
+
onClose: () => void;
|
|
52
|
+
/** Modal title */
|
|
53
|
+
title: string;
|
|
54
|
+
/** Theme override */
|
|
55
|
+
theme?: 'light' | 'dark';
|
|
56
|
+
/** Called after successful save */
|
|
57
|
+
onSave?: () => void;
|
|
58
|
+
/** Modal variant: single input, multiple inputs, or list management */
|
|
59
|
+
variant: 'single' | 'multi' | 'list';
|
|
60
|
+
/** Field configuration for single/multi variants */
|
|
61
|
+
fields?: FieldConfig[];
|
|
62
|
+
/** List configuration for list variant */
|
|
63
|
+
listConfig?: ListConfig<T>;
|
|
64
|
+
/** Custom submit handler - receives field values or list items */
|
|
65
|
+
onSubmit: (data: Record<string, unknown>) => Promise<boolean>;
|
|
66
|
+
/** Whether save button should be disabled */
|
|
67
|
+
saveDisabled?: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Generic modal component for editing profile fields.
|
|
71
|
+
*
|
|
72
|
+
* Supports three variants:
|
|
73
|
+
* - single: Single text input (username, email, bio)
|
|
74
|
+
* - multi: Multiple text inputs (display name with first/last)
|
|
75
|
+
* - list: Add/remove list items (links, locations)
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* // Single field (bio)
|
|
79
|
+
* <EditFieldModal
|
|
80
|
+
* visible={showBioModal}
|
|
81
|
+
* onClose={() => setShowBioModal(false)}
|
|
82
|
+
* title="Bio"
|
|
83
|
+
* variant="single"
|
|
84
|
+
* fields={[{
|
|
85
|
+
* key: 'bio',
|
|
86
|
+
* label: 'Bio',
|
|
87
|
+
* initialValue: user.bio,
|
|
88
|
+
* placeholder: 'Tell people about yourself...',
|
|
89
|
+
* inputProps: { multiline: true, numberOfLines: 6 }
|
|
90
|
+
* }]}
|
|
91
|
+
* onSubmit={async (data) => updateField('bio', data.bio)}
|
|
92
|
+
* />
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* // Multi field (display name)
|
|
96
|
+
* <EditFieldModal
|
|
97
|
+
* visible={showNameModal}
|
|
98
|
+
* onClose={() => setShowNameModal(false)}
|
|
99
|
+
* title="Display Name"
|
|
100
|
+
* variant="multi"
|
|
101
|
+
* fields={[
|
|
102
|
+
* { key: 'firstName', label: 'First Name', initialValue: user.name?.first },
|
|
103
|
+
* { key: 'lastName', label: 'Last Name', initialValue: user.name?.last }
|
|
104
|
+
* ]}
|
|
105
|
+
* onSubmit={async (data) => saveProfile({ displayName: data.firstName, lastName: data.lastName })}
|
|
106
|
+
* />
|
|
107
|
+
*/
|
|
108
|
+
export declare function EditFieldModal<T extends ListItem = ListItem>({ visible, onClose, title, theme, onSave, variant, fields, listConfig, onSubmit, saveDisabled, }: EditFieldModalProps<T>): React.ReactElement;
|
|
109
|
+
export default EditFieldModal;
|
|
110
|
+
//# sourceMappingURL=EditFieldModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditFieldModal.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/components/profile/EditFieldModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,EASH,cAAc,EACjB,MAAM,cAAc,CAAC;AAQtB;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,+BAA+B;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACnD,iEAAiE;IACjE,UAAU,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,QAAQ;IAC1C,oBAAoB;IACpB,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,oCAAoC;IACpC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAA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,GACvB,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CA6N7C;AAmGD,eAAe,cAAc,CAAC"}
|
|
@@ -13,11 +13,14 @@ export interface OxyContextState {
|
|
|
13
13
|
isAuthenticated: boolean;
|
|
14
14
|
isLoading: boolean;
|
|
15
15
|
isTokenReady: boolean;
|
|
16
|
+
isStorageReady: boolean;
|
|
16
17
|
error: string | null;
|
|
17
18
|
currentLanguage: string;
|
|
18
19
|
currentLanguageMetadata: ReturnType<typeof useLanguageManagement>['metadata'];
|
|
19
20
|
currentLanguageName: string;
|
|
20
21
|
currentNativeLanguageName: string;
|
|
22
|
+
hasIdentity: () => Promise<boolean>;
|
|
23
|
+
getPublicKey: () => Promise<string | null>;
|
|
21
24
|
signIn: (publicKey: string, deviceName?: string) => Promise<User>;
|
|
22
25
|
logout: (targetSessionId?: string) => Promise<void>;
|
|
23
26
|
logoutAll: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OA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AAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AAgCD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAkfzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -2,13 +2,13 @@ import type { User } from '../../../models/interfaces';
|
|
|
2
2
|
/**
|
|
3
3
|
* Update user profile with optimistic updates and offline queue support
|
|
4
4
|
*/
|
|
5
|
-
export declare const useUpdateProfile: () => import("@tanstack/react-query").UseMutationResult<
|
|
5
|
+
export declare const useUpdateProfile: () => import("@tanstack/react-query").UseMutationResult<any, Error, Partial<User>, {
|
|
6
6
|
previousUser: User | undefined;
|
|
7
7
|
}>;
|
|
8
8
|
/**
|
|
9
9
|
* Upload avatar with progress tracking and offline queue support
|
|
10
10
|
*/
|
|
11
|
-
export declare const useUploadAvatar: () => import("@tanstack/react-query").UseMutationResult<
|
|
11
|
+
export declare const useUploadAvatar: () => import("@tanstack/react-query").UseMutationResult<any, Error, {
|
|
12
12
|
uri: string;
|
|
13
13
|
type?: string;
|
|
14
14
|
name?: string;
|
|
@@ -19,7 +19,7 @@ export declare const useUploadAvatar: () => import("@tanstack/react-query").UseM
|
|
|
19
19
|
/**
|
|
20
20
|
* Update account settings
|
|
21
21
|
*/
|
|
22
|
-
export declare const useUpdateAccountSettings: () => import("@tanstack/react-query").UseMutationResult<
|
|
22
|
+
export declare const useUpdateAccountSettings: () => import("@tanstack/react-query").UseMutationResult<any, Error, Record<string, any>, {
|
|
23
23
|
previousUser: User | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
/**
|
|
@@ -1,43 +1,39 @@
|
|
|
1
|
-
import type { User } from '../../../models/interfaces';
|
|
2
1
|
/**
|
|
3
2
|
* Get user profile by session ID
|
|
4
3
|
*/
|
|
5
4
|
export declare const useUserProfile: (sessionId: string | null, options?: {
|
|
6
5
|
enabled?: boolean;
|
|
7
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
6
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
8
7
|
/**
|
|
9
8
|
* Get multiple user profiles by session IDs (batch query)
|
|
10
9
|
*/
|
|
11
10
|
export declare const useUserProfiles: (sessionIds: string[], options?: {
|
|
12
11
|
enabled?: boolean;
|
|
13
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
12
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>[];
|
|
14
13
|
/**
|
|
15
14
|
* Get current authenticated user
|
|
16
15
|
*/
|
|
17
16
|
export declare const useCurrentUser: (options?: {
|
|
18
17
|
enabled?: boolean;
|
|
19
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
18
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
20
19
|
/**
|
|
21
20
|
* Get user by ID
|
|
22
21
|
*/
|
|
23
22
|
export declare const useUserById: (userId: string | null, options?: {
|
|
24
23
|
enabled?: boolean;
|
|
25
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
24
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
26
25
|
/**
|
|
27
26
|
* Get user profile by username
|
|
28
27
|
*/
|
|
29
28
|
export declare const useUserByUsername: (username: string | null, options?: {
|
|
30
29
|
enabled?: boolean;
|
|
31
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
30
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
32
31
|
/**
|
|
33
32
|
* Batch get users by session IDs (optimized single API call)
|
|
34
33
|
*/
|
|
35
34
|
export declare const useUsersBySessions: (sessionIds: string[], options?: {
|
|
36
35
|
enabled?: boolean;
|
|
37
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
38
|
-
sessionId: string;
|
|
39
|
-
user: User | null;
|
|
40
|
-
}[], Error>;
|
|
36
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
41
37
|
/**
|
|
42
38
|
* Get privacy settings for a user
|
|
43
39
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useAccountQueries.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAccountQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useAccountQueries.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,WAAW,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAevF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,iEAepF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAe7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAejF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAezF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,EAAE,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAevF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAgDlF,CAAC"}
|
|
@@ -7,7 +7,7 @@ export declare const useSecurityActivity: (options?: {
|
|
|
7
7
|
offset?: number;
|
|
8
8
|
eventType?: SecurityEventType;
|
|
9
9
|
enabled?: boolean;
|
|
10
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
10
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
11
11
|
/**
|
|
12
12
|
* Get recent security activity (convenience hook)
|
|
13
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSecurityQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useSecurityQueries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEtF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"useSecurityQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useSecurityQueries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEtF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU;IACR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,+DA2BF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,QAAO,MAAW,8EAgB3D,CAAC"}
|
|
@@ -16,19 +16,17 @@ export declare const useSession: (sessionId: string | null, options?: {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const useDeviceSessions: (options?: {
|
|
18
18
|
enabled?: boolean;
|
|
19
|
-
}) => import("@tanstack/react-query").UseQueryResult<any
|
|
19
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
20
20
|
/**
|
|
21
21
|
* Get user devices
|
|
22
22
|
*/
|
|
23
23
|
export declare const useUserDevices: (options?: {
|
|
24
24
|
enabled?: boolean;
|
|
25
|
-
}) => import("@tanstack/react-query").UseQueryResult<any
|
|
25
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
26
26
|
/**
|
|
27
27
|
* Get security information
|
|
28
28
|
*/
|
|
29
29
|
export declare const useSecurityInfo: (options?: {
|
|
30
30
|
enabled?: boolean;
|
|
31
|
-
}) => import("@tanstack/react-query").UseQueryResult<
|
|
32
|
-
recoveryEmail: string | null;
|
|
33
|
-
}, Error>;
|
|
31
|
+
}) => import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
34
32
|
//# sourceMappingURL=useServicesQueries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useServicesQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useServicesQueries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2EAqB3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEA6BnF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"useServicesQueries.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useServicesQueries.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2EAqB3E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,WAAW,MAAM,GAAG,IAAI,EAAE,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,yEA6BnF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAgBhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DA2C7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,+DAY9D,CAAC"}
|
|
@@ -24,7 +24,7 @@ export declare const useAssets: () => {
|
|
|
24
24
|
getAsset: (assetId: string) => Promise<Asset>;
|
|
25
25
|
deleteAsset: (assetId: string, force?: boolean) => Promise<void>;
|
|
26
26
|
restore: (assetId: string) => Promise<void>;
|
|
27
|
-
getVariants: (assetId: string) => Promise<
|
|
27
|
+
getVariants: (assetId: string) => Promise<any>;
|
|
28
28
|
getAssetsByApp: (app: string) => Asset[];
|
|
29
29
|
getAssetsByEntity: (app: string, entityType: string, entityId: string) => Asset[];
|
|
30
30
|
getAssetUsageCount: (assetId: string) => number;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Auth Hook
|
|
3
|
+
*
|
|
4
|
+
* Provides a clean, standard interface for authentication across all platforms.
|
|
5
|
+
* This is the recommended way to access auth state in Oxy apps.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import { useAuth } from '@oxyhq/services';
|
|
10
|
+
*
|
|
11
|
+
* function MyComponent() {
|
|
12
|
+
* const { user, isAuthenticated, isLoading, signIn, signOut } = useAuth();
|
|
13
|
+
*
|
|
14
|
+
* if (isLoading) return <Loading />;
|
|
15
|
+
* if (!isAuthenticated) return <SignInButton onClick={() => signIn()} />;
|
|
16
|
+
* return <Welcome user={user} />;
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
import { useOxy } from '../context/OxyContext';
|
|
21
|
+
import type { User } from '../../models/interfaces';
|
|
22
|
+
export interface AuthState {
|
|
23
|
+
/** Current authenticated user, null if not authenticated */
|
|
24
|
+
user: User | null;
|
|
25
|
+
/** Whether user is authenticated */
|
|
26
|
+
isAuthenticated: boolean;
|
|
27
|
+
/** Whether auth state is being determined (initial load) */
|
|
28
|
+
isLoading: boolean;
|
|
29
|
+
/** Whether the auth token is ready for API calls */
|
|
30
|
+
isReady: boolean;
|
|
31
|
+
/** Current error message, if any */
|
|
32
|
+
error: string | null;
|
|
33
|
+
}
|
|
34
|
+
export interface AuthActions {
|
|
35
|
+
/**
|
|
36
|
+
* Sign in with cryptographic identity
|
|
37
|
+
* On native: Uses device keychain
|
|
38
|
+
* On web: Opens auth popup/redirect
|
|
39
|
+
*/
|
|
40
|
+
signIn: (publicKey?: string) => Promise<User>;
|
|
41
|
+
/**
|
|
42
|
+
* Sign out current session
|
|
43
|
+
*/
|
|
44
|
+
signOut: () => Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Sign out all sessions across all devices
|
|
47
|
+
*/
|
|
48
|
+
signOutAll: () => Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Refresh auth state (re-check session validity)
|
|
51
|
+
*/
|
|
52
|
+
refresh: () => Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export interface UseAuthReturn extends AuthState, AuthActions {
|
|
55
|
+
/** Access to full OxyServices instance for advanced usage */
|
|
56
|
+
oxyServices: ReturnType<typeof useOxy>['oxyServices'];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Unified auth hook for all Oxy apps
|
|
60
|
+
*
|
|
61
|
+
* Features:
|
|
62
|
+
* - Zero config: Just wrap with OxyProvider and use
|
|
63
|
+
* - Cross-platform: Same API on native and web
|
|
64
|
+
* - Auto SSO: Web apps automatically check for cross-domain sessions
|
|
65
|
+
* - Type-safe: Full TypeScript support
|
|
66
|
+
*/
|
|
67
|
+
export declare function useAuth(): UseAuthReturn;
|
|
68
|
+
export { useOxy } from '../context/OxyContext';
|
|
69
|
+
//# sourceMappingURL=useAuth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useAuth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAElB,oCAAoC;IACpC,eAAe,EAAE,OAAO,CAAC;IAEzB,4DAA4D;IAC5D,SAAS,EAAE,OAAO,CAAC;IAEnB,oDAAoD;IACpD,OAAO,EAAE,OAAO,CAAC;IAEjB,oCAAoC;IACpC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B;;;;OAIG;IACH,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9C;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhC;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,EAAE,WAAW;IAC3D,6DAA6D;IAC7D,WAAW,EAAE,UAAU,CAAC,OAAO,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;CACvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,IAAI,aAAa,CA4EvC;AAGD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -40,7 +40,9 @@ export declare function useSettingToggle(options: UseSettingToggleOptions): UseS
|
|
|
40
40
|
* Hook for managing multiple toggle settings at once.
|
|
41
41
|
* Useful when you have several related boolean settings.
|
|
42
42
|
*/
|
|
43
|
-
export declare function useSettingToggles<T extends
|
|
43
|
+
export declare function useSettingToggles<T extends {
|
|
44
|
+
[K in keyof T]: boolean;
|
|
45
|
+
}>(options: {
|
|
44
46
|
initialValues: T;
|
|
45
47
|
onSave: (key: keyof T, value: boolean) => Promise<void>;
|
|
46
48
|
errorMessage?: string | ((key: keyof T) => string);
|
|
@@ -49,7 +51,7 @@ export declare function useSettingToggles<T extends Record<string, boolean>>(opt
|
|
|
49
51
|
values: T;
|
|
50
52
|
savingKeys: Set<keyof T>;
|
|
51
53
|
toggle: (key: keyof T) => Promise<void>;
|
|
52
|
-
setValues: (values: T) => void;
|
|
54
|
+
setValues: (values: Partial<T>) => void;
|
|
53
55
|
};
|
|
54
56
|
export default useSettingToggle;
|
|
55
57
|
//# sourceMappingURL=useSettingToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSettingToggle.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useSettingToggle.ts"],"names":[],"mappings":"AAGA,UAAU,uBAAuB;IAC7B,mCAAmC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,iDAAiD;IACjD,MAAM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O,CAAC;IACf,yCAAyC;IACzC,QAAQ,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,6BAA6B;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,sBAAsB,CA6CzF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,OAAO;CAAE,EAAE,OAAO,EAAE;IAC9E,aAAa,EAAE,CAAC,CAAC;IACjB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC;IACnD,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG;IACA,MAAM,EAAE,CAAC,CAAC;IACV,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC3C,CA6CA;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web SSO Hook
|
|
3
|
+
*
|
|
4
|
+
* Automatically handles cross-domain SSO for web apps.
|
|
5
|
+
* Uses the OxyServices.silentSignIn() method which loads a hidden iframe
|
|
6
|
+
* to check for existing session at auth.oxy.so.
|
|
7
|
+
*
|
|
8
|
+
* This is called automatically by OxyContext on web platforms.
|
|
9
|
+
*/
|
|
10
|
+
import type { OxyServices } from '../../core/OxyServices';
|
|
11
|
+
import type { SessionLoginResponse } from '../../models/session';
|
|
12
|
+
interface UseWebSSOOptions {
|
|
13
|
+
oxyServices: OxyServices;
|
|
14
|
+
onSessionFound: (session: SessionLoginResponse) => Promise<void>;
|
|
15
|
+
onError?: (error: Error) => void;
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface UseWebSSOResult {
|
|
19
|
+
checkSSO: () => Promise<SessionLoginResponse | null>;
|
|
20
|
+
isChecking: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Check if we're running in a web browser environment (not React Native)
|
|
24
|
+
*/
|
|
25
|
+
declare function isWebBrowser(): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Hook for automatic web SSO
|
|
28
|
+
*
|
|
29
|
+
* Automatically checks for existing cross-domain session on mount.
|
|
30
|
+
* Only runs on web platforms. Uses OxyServices.silentSignIn() internally.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useWebSSO({ oxyServices, onSessionFound, onError, enabled, }: UseWebSSOOptions): UseWebSSOResult;
|
|
33
|
+
export { isWebBrowser };
|
|
34
|
+
//# sourceMappingURL=useWebSSO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWebSSO.d.ts","sourceRoot":"","sources":["../../../../../src/ui/hooks/useWebSSO.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,UAAU,gBAAgB;IACxB,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,eAAe;IACvB,QAAQ,EAAE,MAAM,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IACrD,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,iBAAS,YAAY,IAAI,OAAO,CAK/B;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,WAAW,EACX,cAAc,EACd,OAAO,EACP,OAAc,GACf,EAAE,gBAAgB,GAAG,eAAe,CA2CpC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare let OxyProvider: any, OxySignInButton: any, OxyLogo: any, Avatar: any, FollowButton: any, OxyPayButton: any, FontLoader: any, setupFonts: any, OxyIcon: any, useOxy: any, useFollow: any, ProfileScreen: any, useAuthStore: any, useAccountStore: any, fontFamilies: any, fontStyles: any, toast: any, useStorage: any;
|
|
2
|
-
export { OxyProvider, OxySignInButton, OxyLogo, Avatar, FollowButton, OxyPayButton, FontLoader, setupFonts, OxyIcon, useOxy, useFollow, ProfileScreen, useAuthStore, useAccountStore, fontFamilies, fontStyles, toast, useStorage, };
|
|
1
|
+
declare let OxyProvider: any, OxySignInButton: any, OxyLogo: any, Avatar: any, FollowButton: any, OxyPayButton: any, FontLoader: any, setupFonts: any, OxyIcon: any, useOxy: any, useAuth: any, useFollow: any, ProfileScreen: any, useAuthStore: any, useAccountStore: any, fontFamilies: any, fontStyles: any, toast: any, useStorage: any;
|
|
2
|
+
export { OxyProvider, OxySignInButton, OxyLogo, Avatar, FollowButton, OxyPayButton, FontLoader, setupFonts, OxyIcon, useOxy, useAuth, useFollow, ProfileScreen, useAuthStore, useAccountStore, fontFamilies, fontStyles, toast, useStorage, };
|
|
3
3
|
export { OxyServices } from '../core';
|
|
4
4
|
export type { User, LoginResponse, ApiError } from '../models/interfaces';
|
|
5
5
|
export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extractErrorMessage, } from './utils/errorHandlers';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"AAqBA,QAAA,IAAI,WAAW,KAAA,EAAE,eAAe,KAAA,EAAE,OAAO,KAAA,EAAE,MAAM,KAAA,EAAE,YAAY,KAAA,EAAE,YAAY,KAAA,EAAE,UAAU,KAAA,EAAE,UAAU,KAAA,EAAE,OAAO,KAAA,EAAE,MAAM,KAAA,EAAE,OAAO,KAAA,EAAE,SAAS,KAAA,EAAE,aAAa,KAAA,EAAE,YAAY,KAAA,EAAE,eAAe,KAAA,EAAE,YAAY,KAAA,EAAE,UAAU,KAAA,EAAE,KAAK,KAAA,EAAE,UAAU,KAAA,CAAC;AAiDtO,OAAO,EACL,WAAW,EACX,eAAe,EACf,OAAO,EACP,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,OAAO,EACP,MAAM,EACN,OAAO,EACP,SAAS,EACT,aAAa,EACb,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,UAAU,EACV,KAAK,EACL,UAAU,GACX,CAAC;AAGF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAGpE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivacySettingsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/PrivacySettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PrivacySettingsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/PrivacySettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAQzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAqf3D,wBAAiD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchSettingsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/SearchSettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SearchSettingsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/SearchSettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AA2I3D,wBAAgD"}
|