@oxyhq/services 5.13.3 → 5.13.10

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 (156) hide show
  1. package/lib/commonjs/core/HttpClient.js +1 -1
  2. package/lib/commonjs/core/HttpClient.js.map +1 -1
  3. package/lib/commonjs/core/OxyServices.js +82 -8
  4. package/lib/commonjs/core/OxyServices.js.map +1 -1
  5. package/lib/commonjs/i18n/locales/en-US.json +222 -6
  6. package/lib/commonjs/lib/sonner.js.map +1 -1
  7. package/lib/commonjs/ui/components/GroupedItem.js +24 -22
  8. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  9. package/lib/commonjs/ui/components/OxyProvider.js +35 -14
  10. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  11. package/lib/commonjs/ui/navigation/routes.js +36 -1
  12. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  13. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +150 -5
  14. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  15. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +475 -319
  16. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  17. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +217 -0
  18. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -0
  19. package/lib/commonjs/ui/screens/FileManagementScreen.js +911 -213
  20. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  21. package/lib/commonjs/ui/screens/HelpSupportScreen.js +131 -0
  22. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -0
  23. package/lib/commonjs/ui/screens/HistoryViewScreen.js +258 -0
  24. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -0
  25. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +211 -0
  26. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -0
  27. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +0 -1
  28. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +307 -0
  30. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -0
  31. package/lib/commonjs/ui/screens/ProfileScreen.js +1 -7
  32. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +205 -0
  34. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -0
  35. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +239 -0
  36. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -0
  37. package/lib/commonjs/ui/screens/SignInScreen.js +14 -29
  38. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  39. package/lib/commonjs/utils/asyncUtils.js +1 -0
  40. package/lib/commonjs/utils/asyncUtils.js.map +1 -1
  41. package/lib/commonjs/utils/cache.js +4 -4
  42. package/lib/commonjs/utils/cache.js.map +1 -1
  43. package/lib/commonjs/utils/index.js +0 -6
  44. package/lib/commonjs/utils/index.js.map +1 -1
  45. package/lib/module/core/HttpClient.js +1 -1
  46. package/lib/module/core/HttpClient.js.map +1 -1
  47. package/lib/module/core/OxyServices.js +82 -8
  48. package/lib/module/core/OxyServices.js.map +1 -1
  49. package/lib/module/i18n/locales/en-US.json +222 -6
  50. package/lib/module/lib/sonner.js.map +1 -1
  51. package/lib/module/ui/components/GroupedItem.js +24 -22
  52. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  53. package/lib/module/ui/components/OxyProvider.js +40 -17
  54. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  55. package/lib/module/ui/navigation/routes.js +36 -1
  56. package/lib/module/ui/navigation/routes.js.map +1 -1
  57. package/lib/module/ui/screens/AccountOverviewScreen.js +151 -6
  58. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  59. package/lib/module/ui/screens/AccountSettingsScreen.js +475 -319
  60. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  61. package/lib/module/ui/screens/AccountVerificationScreen.js +212 -0
  62. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -0
  63. package/lib/module/ui/screens/FileManagementScreen.js +913 -212
  64. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  65. package/lib/module/ui/screens/HelpSupportScreen.js +126 -0
  66. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -0
  67. package/lib/module/ui/screens/HistoryViewScreen.js +253 -0
  68. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -0
  69. package/lib/module/ui/screens/LegalDocumentsScreen.js +206 -0
  70. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -0
  71. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +0 -1
  72. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  73. package/lib/module/ui/screens/PrivacySettingsScreen.js +302 -0
  74. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -0
  75. package/lib/module/ui/screens/ProfileScreen.js +1 -7
  76. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  77. package/lib/module/ui/screens/SavesCollectionsScreen.js +200 -0
  78. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -0
  79. package/lib/module/ui/screens/SearchSettingsScreen.js +234 -0
  80. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -0
  81. package/lib/module/ui/screens/SignInScreen.js +14 -29
  82. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  83. package/lib/module/utils/asyncUtils.js +1 -0
  84. package/lib/module/utils/asyncUtils.js.map +1 -1
  85. package/lib/module/utils/cache.js +3 -3
  86. package/lib/module/utils/cache.js.map +1 -1
  87. package/lib/module/utils/index.js +1 -1
  88. package/lib/module/utils/index.js.map +1 -1
  89. package/lib/typescript/core/OxyServices.d.ts +30 -6
  90. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  91. package/lib/typescript/lib/sonner.d.ts +1 -0
  92. package/lib/typescript/lib/sonner.d.ts.map +1 -1
  93. package/lib/typescript/types/expo-document-picker.d.ts +36 -0
  94. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  95. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  96. package/lib/typescript/ui/navigation/routes.d.ts +1 -1
  97. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
  98. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  99. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  100. package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts +5 -0
  101. package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts.map +1 -0
  102. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  103. package/lib/typescript/ui/screens/HelpSupportScreen.d.ts +5 -0
  104. package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -0
  105. package/lib/typescript/ui/screens/HistoryViewScreen.d.ts +5 -0
  106. package/lib/typescript/ui/screens/HistoryViewScreen.d.ts.map +1 -0
  107. package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts +5 -0
  108. package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts.map +1 -0
  109. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  110. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts +5 -0
  111. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -0
  112. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  113. package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts +5 -0
  114. package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -0
  115. package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts +5 -0
  116. package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts.map +1 -0
  117. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  118. package/lib/typescript/utils/asyncUtils.d.ts.map +1 -1
  119. package/lib/typescript/utils/cache.d.ts +3 -3
  120. package/lib/typescript/utils/cache.d.ts.map +1 -1
  121. package/lib/typescript/utils/index.d.ts +1 -1
  122. package/lib/typescript/utils/index.d.ts.map +1 -1
  123. package/package.json +1 -1
  124. package/src/core/HttpClient.ts +1 -1
  125. package/src/core/OxyServices.ts +80 -8
  126. package/src/i18n/locales/en-US.json +222 -6
  127. package/src/lib/sonner.ts +1 -0
  128. package/src/types/expo-document-picker.d.ts +36 -0
  129. package/src/ui/components/GroupedItem.tsx +23 -21
  130. package/src/ui/components/OxyProvider.tsx +33 -11
  131. package/src/ui/navigation/routes.ts +42 -0
  132. package/src/ui/screens/AccountOverviewScreen.tsx +175 -5
  133. package/src/ui/screens/AccountSettingsScreen.tsx +521 -360
  134. package/src/ui/screens/AccountVerificationScreen.tsx +235 -0
  135. package/src/ui/screens/FileManagementScreen.tsx +934 -208
  136. package/src/ui/screens/HelpSupportScreen.tsx +143 -0
  137. package/src/ui/screens/HistoryViewScreen.tsx +280 -0
  138. package/src/ui/screens/LegalDocumentsScreen.tsx +220 -0
  139. package/src/ui/screens/PremiumSubscriptionScreen.tsx +0 -1
  140. package/src/ui/screens/PrivacySettingsScreen.tsx +332 -0
  141. package/src/ui/screens/ProfileScreen.tsx +1 -8
  142. package/src/ui/screens/SavesCollectionsScreen.tsx +222 -0
  143. package/src/ui/screens/SearchSettingsScreen.tsx +219 -0
  144. package/src/ui/screens/SignInScreen.tsx +19 -35
  145. package/src/utils/asyncUtils.ts +1 -0
  146. package/src/utils/cache.ts +3 -3
  147. package/src/utils/index.ts +1 -1
  148. package/lib/commonjs/ui/components/StepBasedScreen.README.md +0 -337
  149. package/lib/commonjs/ui/components/internal/TextField.md +0 -436
  150. package/lib/commonjs/ui/styles/FONTS.md +0 -126
  151. package/lib/module/ui/components/StepBasedScreen.README.md +0 -337
  152. package/lib/module/ui/components/internal/TextField.md +0 -436
  153. package/lib/module/ui/styles/FONTS.md +0 -126
  154. package/src/ui/components/StepBasedScreen.README.md +0 -337
  155. package/src/ui/components/internal/TextField.md +0 -436
  156. package/src/ui/styles/FONTS.md +0 -126
@@ -121,8 +121,8 @@ export declare function registerCacheForCleanup(cache: TTLCache<any>): void;
121
121
  */
122
122
  export declare function unregisterCacheFromCleanup(cache: TTLCache<any>): void;
123
123
  /**
124
- * Stop all cache cleanup intervals
125
- * Useful for tests to prevent Jest from hanging
124
+ * Stop all cleanup intervals (useful for testing)
125
+ * This will clear the interval and unregister all caches
126
126
  */
127
- export declare function stopAllCacheCleanup(): void;
127
+ export declare function stopAllCleanupIntervals(): void;
128
128
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/utils/cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,QAAQ,CAAC,CAAC;IACrB,OAAO,CAAC,KAAK,CAAoC;IACjD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,MAAM,CAAK;IAEnB;;;OAGG;gBACS,UAAU,GAAE,MAAsB;IAI9C;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAkB1B;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IAM7C;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAYzB;;;OAGG;IACH,IAAI,IAAI,MAAM,EAAE;IAehB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAcjB;;OAEG;IACH,IAAI,IAAI,MAAM;IAId;;OAEG;IACH,QAAQ,IAAI,UAAU;IAUtB;;OAEG;IACH,UAAU,IAAI,IAAI;CAInB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,GAAE,MAAsB,GAAG,QAAQ,CAAC,CAAC,CAAC,CAEvE;AASD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAWlE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAQrE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/utils/cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,QAAQ,CAAC,CAAC;IACrB,OAAO,CAAC,KAAK,CAAoC;IACjD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,MAAM,CAAK;IAEnB;;;OAGG;gBACS,UAAU,GAAE,MAAsB;IAI9C;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI;IAkB1B;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IAM7C;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI5B;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAYzB;;;OAGG;IACH,IAAI,IAAI,MAAM,EAAE;IAehB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAcjB;;OAEG;IACH,IAAI,IAAI,MAAM;IAId;;OAEG;IACH,QAAQ,IAAI,UAAU;IAUtB;;OAEG;IACH,UAAU,IAAI,IAAI;CAInB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,GAAE,MAAsB,GAAG,QAAQ,CAAC,CAAC,CAAC,CAEvE;AASD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAWlE;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI,CAQrE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAM9C"}
@@ -1,7 +1,7 @@
1
1
  export { DeviceManager } from './deviceManager';
2
2
  export type { DeviceFingerprint, StoredDeviceInfo } from './deviceManager';
3
3
  export { RequestDeduplicator, RequestQueue, SimpleLogger } from './requestUtils';
4
- export { TTLCache, createCache, registerCacheForCleanup, unregisterCacheFromCleanup, stopAllCacheCleanup } from './cache';
4
+ export { TTLCache, createCache, registerCacheForCleanup, unregisterCacheFromCleanup } from './cache';
5
5
  export type { CacheStats } from './cache';
6
6
  export { normalizeSession, sortSessions, deduplicateSessions, deduplicateSessionsByUserId, normalizeAndSortSessions, mergeSessions, sessionsEqual, sessionsArraysEqual } from './sessionUtils';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGjF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC1H,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,mBAAmB,EACpB,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGjF,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACrG,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,mBAAmB,EACnB,2BAA2B,EAC3B,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,mBAAmB,EACpB,MAAM,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "5.13.3",
3
+ "version": "5.13.10",
4
4
  "description": "Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -221,7 +221,7 @@ export class HttpClient {
221
221
  }
222
222
 
223
223
  // Handle regular success responses: { data: ... }
224
- if (responseData && typeof responseData === 'object' && 'data' in responseData) {
224
+ if (responseData && typeof responseData === 'object' && 'data' in responseData && !Array.isArray(responseData)) {
225
225
  return responseData.data as T;
226
226
  }
227
227
 
@@ -214,14 +214,6 @@ export class OxyServices {
214
214
  return this.cloudURL;
215
215
  }
216
216
 
217
- /**
218
- * Get the underlying HTTP client instance
219
- * Useful for advanced use cases that need direct access to the HttpClient
220
- */
221
- public getClient(): HttpClient {
222
- return this.httpClient;
223
- }
224
-
225
217
  /**
226
218
  * Set authentication tokens
227
219
  */
@@ -806,6 +798,86 @@ export class OxyServices {
806
798
  }
807
799
  }
808
800
 
801
+ /**
802
+ * Get privacy settings for a user
803
+ * @param userId - The user ID (defaults to current user)
804
+ */
805
+ async getPrivacySettings(userId?: string): Promise<any> {
806
+ try {
807
+ const id = userId || (await this.getCurrentUser()).id;
808
+ return await this.makeRequest<any>('GET', `/api/privacy/${id}/privacy`, undefined, {
809
+ cache: true,
810
+ cacheTTL: 2 * 60 * 1000, // 2 minutes cache
811
+ });
812
+ } catch (error) {
813
+ throw this.handleError(error);
814
+ }
815
+ }
816
+
817
+ /**
818
+ * Update privacy settings
819
+ * @param settings - Partial privacy settings object
820
+ * @param userId - The user ID (defaults to current user)
821
+ */
822
+ async updatePrivacySettings(settings: Record<string, any>, userId?: string): Promise<any> {
823
+ try {
824
+ const id = userId || (await this.getCurrentUser()).id;
825
+ return await this.makeRequest<any>('PATCH', `/api/privacy/${id}/privacy`, settings, {
826
+ cache: false,
827
+ });
828
+ } catch (error) {
829
+ throw this.handleError(error);
830
+ }
831
+ }
832
+
833
+ /**
834
+ * Request account verification
835
+ */
836
+ async requestAccountVerification(reason: string, evidence?: string): Promise<{ message: string; requestId: string }> {
837
+ try {
838
+ return await this.makeRequest<{ message: string; requestId: string }>('POST', '/api/users/verify/request', {
839
+ reason,
840
+ evidence,
841
+ }, { cache: false });
842
+ } catch (error) {
843
+ throw this.handleError(error);
844
+ }
845
+ }
846
+
847
+ /**
848
+ * Download account data export
849
+ */
850
+ async downloadAccountData(format: 'json' | 'csv' = 'json'): Promise<Blob> {
851
+ try {
852
+ // Use axios instance directly for blob responses since RequestManager doesn't handle blobs
853
+ const axiosInstance = this.httpClient.getAxiosInstance();
854
+
855
+ const response = await axiosInstance.get(`/api/users/me/data?format=${format}`, {
856
+ responseType: 'blob',
857
+ });
858
+
859
+ return response.data as Blob;
860
+ } catch (error) {
861
+ throw this.handleError(error);
862
+ }
863
+ }
864
+
865
+ /**
866
+ * Delete account permanently
867
+ * @param password - User password for confirmation
868
+ * @param confirmText - Confirmation text (usually username)
869
+ */
870
+ async deleteAccount(password: string, confirmText: string): Promise<{ message: string }> {
871
+ try {
872
+ return await this.makeRequest<{ message: string }>('DELETE', '/api/users/me', {
873
+ password,
874
+ confirmText,
875
+ }, { cache: false });
876
+ } catch (error) {
877
+ throw this.handleError(error);
878
+ }
879
+ }
880
+
809
881
  // ============================================================================
810
882
  // LANGUAGE METHODS
811
883
  // ============================================================================
@@ -583,13 +583,11 @@
583
583
  },
584
584
  "privacySettings": {
585
585
  "title": "Privacy Settings",
586
- "subtitle": "Control who can see your profile",
587
- "coming": "Privacy settings coming soon!"
586
+ "subtitle": "Control who can see your profile"
588
587
  },
589
588
  "verifyAccount": {
590
589
  "title": "Verify Account",
591
- "subtitle": "Get a verified badge",
592
- "coming": "Account verification coming soon!"
590
+ "subtitle": "Get a verified badge"
593
591
  },
594
592
  "twoFactor": {
595
593
  "title": "Two‑Factor Authentication",
@@ -684,12 +682,24 @@
684
682
  "downloadData": {
685
683
  "title": "Download My Data",
686
684
  "subtitle": "Export your account information",
687
- "coming": "Download account data feature coming soon!"
685
+ "confirmTitle": "Download Account Data",
686
+ "confirmMessage": "Choose the format for your account data export:",
687
+ "downloading": "Preparing download...",
688
+ "success": "Data downloaded successfully",
689
+ "error": "Failed to download data"
688
690
  },
689
691
  "deleteAccount": {
690
692
  "title": "Delete Account",
691
693
  "subtitle": "Permanently delete your account",
692
- "coming": "Delete account feature coming soon!"
694
+ "confirmTitle": "Delete Account",
695
+ "confirmMessage": "This action cannot be undone. This will permanently delete your account and all associated data.\n\nAre you sure you want to delete your account?",
696
+ "finalConfirm": "This is your final warning. Your account will be permanently deleted and cannot be recovered. Type \"{{username}}\" to confirm.",
697
+ "confirm": "Delete Forever",
698
+ "passwordRequired": "Password confirmation required. Please use a modal with password input to complete account deletion.",
699
+ "missingFields": "Password and confirmation required",
700
+ "confirmMismatch": "Confirmation text does not match username",
701
+ "success": "Account deleted successfully",
702
+ "error": "Failed to delete account"
693
703
  },
694
704
  "preferences": {
695
705
  "title": "Account Preferences",
@@ -713,11 +723,217 @@
713
723
  "signOut": {
714
724
  "title": "Sign Out",
715
725
  "subtitle": "Sign out of your current account"
726
+ },
727
+ "history": {
728
+ "title": "History",
729
+ "subtitle": "View and manage your search history"
730
+ },
731
+ "saves": {
732
+ "title": "Saves & Collections",
733
+ "subtitle": "View your saved items and collections"
734
+ },
735
+ "searchSettings": {
736
+ "title": "Search Settings",
737
+ "subtitle": "SafeSearch and personalization"
738
+ },
739
+ "language": {
740
+ "title": "Language",
741
+ "subtitle": "Choose your preferred language"
742
+ },
743
+ "privacyPolicy": {
744
+ "title": "Privacy Policy",
745
+ "subtitle": "How we handle your data"
746
+ },
747
+ "termsOfService": {
748
+ "title": "Terms of Service",
749
+ "subtitle": "Terms and conditions of use"
716
750
  }
717
751
  },
718
752
  "manageComing": "Manage your Oxy Account feature coming soon!",
719
753
  "addAccountComing": "Add another account feature coming soon!"
720
754
  },
755
+ "history": {
756
+ "title": "History",
757
+ "actions": "Actions",
758
+ "recent": "Recent History",
759
+ "loading": "Loading history...",
760
+ "empty": "No history yet",
761
+ "justNow": "Just now",
762
+ "minutesAgo": "minutes ago",
763
+ "hoursAgo": "hours ago",
764
+ "daysAgo": "days ago",
765
+ "deleteLast15Minutes": {
766
+ "title": "Delete Last 15 Minutes",
767
+ "subtitle": "Remove recent history entries",
768
+ "confirm": "Delete last 15 minutes of history?",
769
+ "success": "Last 15 minutes deleted",
770
+ "error": "Failed to delete history"
771
+ },
772
+ "clearAll": {
773
+ "title": "Clear All History",
774
+ "subtitle": "Remove all history entries",
775
+ "confirm": "Clear all history? This cannot be undone.",
776
+ "success": "History cleared",
777
+ "error": "Failed to clear history"
778
+ }
779
+ },
780
+ "saves": {
781
+ "title": "Saves & Collections",
782
+ "tabs": {
783
+ "saves": "Saves",
784
+ "collections": "Collections"
785
+ },
786
+ "loading": "Loading...",
787
+ "empty": "No saved items yet",
788
+ "noCollections": "No collections yet",
789
+ "savedItems": "Saved Items",
790
+ "collections": "Collections",
791
+ "loadError": "Failed to load saved items"
792
+ },
793
+ "searchSettings": {
794
+ "title": "Search Settings",
795
+ "safeSearch": {
796
+ "title": "SafeSearch",
797
+ "label": "Enable SafeSearch",
798
+ "description": "Filter out explicit content from search results",
799
+ "updated": "SafeSearch setting updated",
800
+ "error": "Failed to update SafeSearch"
801
+ },
802
+ "personalization": {
803
+ "title": "Search Personalization",
804
+ "label": "Personalized Search",
805
+ "description": "Use your activity to improve search results",
806
+ "updated": "Search personalization updated",
807
+ "error": "Failed to update personalization"
808
+ }
809
+ },
810
+ "privacySettings": {
811
+ "title": "Privacy Settings",
812
+ "loadError": "Failed to load privacy settings",
813
+ "updated": "Privacy settings updated",
814
+ "updateError": "Failed to update privacy setting",
815
+ "sections": {
816
+ "account": "ACCOUNT PRIVACY",
817
+ "interactions": "INTERACTIONS",
818
+ "activity": "ACTIVITY & DATA",
819
+ "content": "CONTENT & SAFETY"
820
+ },
821
+ "isPrivateAccount": "Private Account",
822
+ "isPrivateAccountDesc": "Only approved followers can see your posts",
823
+ "profileVisibility": "Profile Visibility",
824
+ "profileVisibilityDesc": "Control who can view your profile",
825
+ "hideOnlineStatus": "Hide Online Status",
826
+ "hideOnlineStatusDesc": "Don't show when you're online",
827
+ "hideLastSeen": "Hide Last Seen",
828
+ "hideLastSeenDesc": "Don't show when you were last active",
829
+ "allowTagging": "Allow Tagging",
830
+ "allowTaggingDesc": "Let others tag you in posts",
831
+ "allowMentions": "Allow Mentions",
832
+ "allowMentionsDesc": "Let others mention you",
833
+ "allowDirectMessages": "Allow Direct Messages",
834
+ "allowDirectMessagesDesc": "Let others send you direct messages",
835
+ "hideReadReceipts": "Hide Read Receipts",
836
+ "hideReadReceiptsDesc": "Don't show read receipts in messages",
837
+ "showActivity": "Show Activity Status",
838
+ "showActivityDesc": "Display your activity on your profile",
839
+ "dataSharing": "Data Sharing",
840
+ "dataSharingDesc": "Allow sharing data for personalization",
841
+ "locationSharing": "Location Sharing",
842
+ "locationSharingDesc": "Share your location",
843
+ "analyticsSharing": "Analytics Sharing",
844
+ "analyticsSharingDesc": "Allow analytics data collection",
845
+ "sensitiveContent": "Show Sensitive Content",
846
+ "sensitiveContentDesc": "Allow sensitive or explicit content",
847
+ "autoFilter": "Auto Filter",
848
+ "autoFilterDesc": "Automatically filter inappropriate content",
849
+ "muteKeywords": "Mute Keywords",
850
+ "muteKeywordsDesc": "Hide posts containing muted keywords",
851
+ "blockScreenshots": "Block Screenshots",
852
+ "blockScreenshotsDesc": "Prevent screenshots of your content"
853
+ },
854
+ "accountVerification": {
855
+ "title": "Account Verification",
856
+ "description": "Request a verified badge for your account. Verified accounts help establish authenticity and credibility.",
857
+ "sections": {
858
+ "request": "VERIFICATION REQUEST"
859
+ },
860
+ "reasonLabel": "Reason for Verification *",
861
+ "reasonPlaceholder": "Explain why you need a verified badge (e.g., public figure, brand, organization)",
862
+ "reasonRequired": "Please provide a reason for verification",
863
+ "evidenceLabel": "Evidence (Optional)",
864
+ "evidencePlaceholder": "Provide any supporting documentation or links (e.g., official website, social media profiles)",
865
+ "submit": "Submit Request",
866
+ "submitError": "Failed to submit verification request",
867
+ "successTitle": "Request Submitted",
868
+ "successMessage": "Your verification request has been submitted. Request ID: {{requestId}}",
869
+ "ok": "OK",
870
+ "error": "Service not available",
871
+ "note": "Note: Verification requests are reviewed manually and may take several days. We will notify you once your request has been reviewed."
872
+ },
873
+ "help": {
874
+ "title": "Help & Support",
875
+ "options": "Get Help",
876
+ "resources": "Resources",
877
+ "contactError": "Failed to open email client",
878
+ "reportError": "Failed to open email client",
879
+ "linkError": "Failed to open link",
880
+ "faqComing": "FAQ coming soon",
881
+ "faq": {
882
+ "title": "Frequently Asked Questions",
883
+ "subtitle": "Find answers to common questions"
884
+ },
885
+ "contact": {
886
+ "title": "Contact Support",
887
+ "subtitle": "Get help from our support team"
888
+ },
889
+ "reportBug": {
890
+ "title": "Report a Bug",
891
+ "subtitle": "Help us improve by reporting issues"
892
+ },
893
+ "documentation": {
894
+ "title": "Documentation",
895
+ "subtitle": "User guides and tutorials"
896
+ },
897
+ "community": {
898
+ "title": "Community",
899
+ "subtitle": "Join our community"
900
+ }
901
+ },
902
+ "legal": {
903
+ "title": "Legal Documents",
904
+ "documents": "Documents",
905
+ "policies": "Policies & Guidelines",
906
+ "opening": "Opening document...",
907
+ "openError": "Failed to open document",
908
+ "privacyPolicy": {
909
+ "title": "Privacy Policy",
910
+ "subtitle": "How we handle your data"
911
+ },
912
+ "termsOfService": {
913
+ "title": "Terms of Service",
914
+ "subtitle": "Terms and conditions of use"
915
+ },
916
+ "communityGuidelines": {
917
+ "title": "Community Guidelines",
918
+ "subtitle": "Rules and expectations for our community"
919
+ },
920
+ "dataRetention": {
921
+ "title": "Data Retention Policy",
922
+ "subtitle": "How long we keep your data"
923
+ },
924
+ "contentModeration": {
925
+ "title": "Content Moderation Policy",
926
+ "subtitle": "How we moderate content"
927
+ },
928
+ "childSafety": {
929
+ "title": "Child Safety Policy",
930
+ "subtitle": "Protecting minors on our platform"
931
+ },
932
+ "cookiePolicy": {
933
+ "title": "Cookie Policy",
934
+ "subtitle": "How we use cookies and similar technologies"
935
+ }
936
+ },
721
937
  "common": {
722
938
  "errors": {
723
939
  "signOutFailed": "There was a problem signing you out. Please try again."
package/src/lib/sonner.ts CHANGED
@@ -9,6 +9,7 @@ interface ToastFunction {
9
9
  error: (message: string, options?: Record<string, unknown>) => void;
10
10
  info: (message: string, options?: Record<string, unknown>) => void;
11
11
  warning: (message: string, options?: Record<string, unknown>) => void;
12
+ loading: (message: string, options?: Record<string, unknown>) => void;
12
13
  }
13
14
 
14
15
  type ToasterComponent = (props?: Record<string, unknown>) => React.ReactElement | null;
@@ -0,0 +1,36 @@
1
+ declare module 'expo-document-picker' {
2
+ type DocumentPickerInputType = string | string[];
3
+
4
+ export interface DocumentPickerOptions {
5
+ type?: DocumentPickerInputType;
6
+ multiple?: boolean;
7
+ copyToCacheDirectory?: boolean;
8
+ }
9
+
10
+ export interface DocumentPickerAsset {
11
+ name?: string | null;
12
+ size?: number | null;
13
+ mimeType?: string | null;
14
+ uri?: string;
15
+ file?: File | Blob;
16
+ lastModified?: number | null;
17
+ }
18
+
19
+ export interface DocumentPickerSuccessResult {
20
+ canceled: false;
21
+ assets: DocumentPickerAsset[];
22
+ type?: 'success';
23
+ }
24
+
25
+ export interface DocumentPickerCanceledResult {
26
+ canceled: true;
27
+ assets: [];
28
+ type?: 'cancel';
29
+ }
30
+
31
+ export type DocumentPickerResult = DocumentPickerSuccessResult | DocumentPickerCanceledResult;
32
+
33
+ export function getDocumentAsync(options?: DocumentPickerOptions): Promise<DocumentPickerResult>;
34
+ export function isAvailableAsync(): Promise<boolean>;
35
+ }
36
+
@@ -45,7 +45,7 @@ const GroupedItem: React.FC<GroupedItemProps> = ({
45
45
  }) => {
46
46
  const isDarkTheme = theme === 'dark';
47
47
  const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
48
- const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#FFFFFF';
48
+ const secondaryBackgroundColor = isDarkTheme ? '#1C1C1E' : '#FFFFFF';
49
49
  const selectedBackgroundColor = selected ? `${iconColor}15` : secondaryBackgroundColor;
50
50
 
51
51
  const itemStyles = [
@@ -80,7 +80,7 @@ const GroupedItem: React.FC<GroupedItemProps> = ({
80
80
  <View style={[styles.actionTextContainer, multiRow && styles.actionTextContainerMultiRow]}>
81
81
  <Text style={[styles.actionButtonText, { color: textColor }]}>{title}</Text>
82
82
  {subtitle && (
83
- <Text style={[styles.actionButtonSubtext, { color: isDarkTheme ? '#BBBBBB' : '#666666' }]}>
83
+ <Text style={[styles.actionButtonSubtext, { color: isDarkTheme ? '#98989D' : '#8E8E93' }]}>
84
84
  {subtitle}
85
85
  </Text>
86
86
  )}
@@ -90,7 +90,7 @@ const GroupedItem: React.FC<GroupedItemProps> = ({
90
90
  {selected ? (
91
91
  <Ionicons name="checkmark-circle" size={20} color={iconColor || '#007AFF'} />
92
92
  ) : showChevron ? (
93
- <Ionicons name="chevron-forward" size={16} color={isDarkTheme ? '#666666' : '#999999'} />
93
+ <Ionicons name="chevron-forward" size={16} color={isDarkTheme ? '#636366' : '#C7C7CC'} />
94
94
  ) : null}
95
95
  </View>
96
96
  );
@@ -115,56 +115,58 @@ const styles = StyleSheet.create({
115
115
  flexDirection: 'row',
116
116
  alignItems: 'center',
117
117
  justifyContent: 'space-between',
118
- marginBottom: 2,
118
+ marginBottom: StyleSheet.hairlineWidth,
119
119
  overflow: 'hidden',
120
120
  width: '100%',
121
121
  },
122
122
  firstGroupedItem: {
123
- borderTopLeftRadius: 24,
124
- borderTopRightRadius: 24,
123
+ borderTopLeftRadius: 16,
124
+ borderTopRightRadius: 16,
125
125
  },
126
126
  lastGroupedItem: {
127
- borderBottomLeftRadius: 24,
128
- borderBottomRightRadius: 24,
129
- marginBottom: 8,
127
+ borderBottomLeftRadius: 16,
128
+ borderBottomRightRadius: 16,
129
+ marginBottom: 0,
130
130
  },
131
131
  groupedItemContent: {
132
132
  flexDirection: 'row',
133
133
  alignItems: 'center',
134
- paddingVertical: 12,
135
- paddingHorizontal: 12,
134
+ paddingVertical: 14,
135
+ paddingHorizontal: 16,
136
136
  width: '100%',
137
137
  },
138
138
  groupedItemContentDense: {
139
- paddingVertical: 10,
140
- paddingHorizontal: 12,
139
+ paddingVertical: 12,
140
+ paddingHorizontal: 16,
141
141
  },
142
142
  actionIcon: {
143
143
  marginRight: 12,
144
144
  },
145
145
  iconContainer: {
146
- width: 38,
147
- height: 38,
148
- borderRadius: 19,
146
+ width: 32,
147
+ height: 32,
148
+ borderRadius: 12,
149
149
  alignItems: 'center',
150
150
  justifyContent: 'center',
151
151
  marginRight: 12,
152
152
  },
153
153
  actionImage: {
154
154
  marginRight: 12,
155
- borderRadius: 16,
155
+ borderRadius: 12,
156
156
  },
157
157
  actionTextContainer: {
158
158
  flex: 1,
159
159
  },
160
160
  actionButtonText: {
161
- fontSize: 16,
162
- fontWeight: '500',
161
+ fontSize: 17,
162
+ fontWeight: '400',
163
163
  marginBottom: 2,
164
+ letterSpacing: -0.2,
164
165
  },
165
166
  actionButtonSubtext: {
166
- fontSize: 13,
167
- lineHeight: 18,
167
+ fontSize: 15,
168
+ lineHeight: 20,
169
+ marginTop: 1,
168
170
  },
169
171
  groupedItemContentMultiRow: {
170
172
  alignItems: 'flex-start',