@oxyhq/core 1.11.24 → 2.1.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.
- package/README.md +5 -6
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/AuthManager.js +678 -4
- package/dist/cjs/AuthManagerTypes.js +13 -0
- package/dist/cjs/CrossDomainAuth.js +45 -3
- package/dist/cjs/OxyServices.base.js +16 -0
- package/dist/cjs/i18n/locales/ar-SA.json +83 -0
- package/dist/cjs/i18n/locales/ca-ES.json +83 -0
- package/dist/cjs/i18n/locales/de-DE.json +83 -0
- package/dist/cjs/i18n/locales/en-US.json +83 -0
- package/dist/cjs/i18n/locales/es-ES.json +99 -4
- package/dist/cjs/i18n/locales/fr-FR.json +83 -0
- package/dist/cjs/i18n/locales/it-IT.json +83 -0
- package/dist/cjs/i18n/locales/ja-JP.json +83 -0
- package/dist/cjs/i18n/locales/ko-KR.json +83 -0
- package/dist/cjs/i18n/locales/locales/ar-SA.json +83 -1
- package/dist/cjs/i18n/locales/locales/ca-ES.json +83 -1
- package/dist/cjs/i18n/locales/locales/de-DE.json +83 -1
- package/dist/cjs/i18n/locales/locales/en-US.json +83 -0
- package/dist/cjs/i18n/locales/locales/es-ES.json +99 -4
- package/dist/cjs/i18n/locales/locales/fr-FR.json +83 -1
- package/dist/cjs/i18n/locales/locales/it-IT.json +83 -1
- package/dist/cjs/i18n/locales/locales/ja-JP.json +200 -117
- package/dist/cjs/i18n/locales/locales/ko-KR.json +83 -1
- package/dist/cjs/i18n/locales/locales/pt-PT.json +83 -1
- package/dist/cjs/i18n/locales/locales/zh-CN.json +83 -1
- package/dist/cjs/i18n/locales/pt-PT.json +83 -0
- package/dist/cjs/i18n/locales/zh-CN.json +83 -0
- package/dist/cjs/index.js +121 -57
- package/dist/cjs/mixins/OxyServices.auth.js +235 -0
- package/dist/cjs/mixins/OxyServices.fedcm.js +36 -0
- package/dist/cjs/mixins/OxyServices.popup.js +61 -1
- package/dist/cjs/mixins/OxyServices.user.js +18 -0
- package/dist/cjs/utils/accountUtils.js +64 -1
- package/dist/cjs/utils/coldBoot.js +71 -0
- package/dist/cjs/utils/fapiAutoDetect.js +88 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/AuthManager.js +678 -4
- package/dist/esm/AuthManagerTypes.js +12 -0
- package/dist/esm/CrossDomainAuth.js +45 -3
- package/dist/esm/OxyServices.base.js +16 -0
- package/dist/esm/i18n/locales/ar-SA.json +83 -0
- package/dist/esm/i18n/locales/ca-ES.json +83 -0
- package/dist/esm/i18n/locales/de-DE.json +83 -0
- package/dist/esm/i18n/locales/en-US.json +83 -0
- package/dist/esm/i18n/locales/es-ES.json +99 -4
- package/dist/esm/i18n/locales/fr-FR.json +83 -0
- package/dist/esm/i18n/locales/it-IT.json +83 -0
- package/dist/esm/i18n/locales/ja-JP.json +83 -0
- package/dist/esm/i18n/locales/ko-KR.json +83 -0
- package/dist/esm/i18n/locales/locales/ar-SA.json +83 -1
- package/dist/esm/i18n/locales/locales/ca-ES.json +83 -1
- package/dist/esm/i18n/locales/locales/de-DE.json +83 -1
- package/dist/esm/i18n/locales/locales/en-US.json +83 -0
- package/dist/esm/i18n/locales/locales/es-ES.json +99 -4
- package/dist/esm/i18n/locales/locales/fr-FR.json +83 -1
- package/dist/esm/i18n/locales/locales/it-IT.json +83 -1
- package/dist/esm/i18n/locales/locales/ja-JP.json +200 -117
- package/dist/esm/i18n/locales/locales/ko-KR.json +83 -1
- package/dist/esm/i18n/locales/locales/pt-PT.json +83 -1
- package/dist/esm/i18n/locales/locales/zh-CN.json +83 -1
- package/dist/esm/i18n/locales/pt-PT.json +83 -0
- package/dist/esm/i18n/locales/zh-CN.json +83 -0
- package/dist/esm/index.js +74 -26
- package/dist/esm/mixins/OxyServices.auth.js +235 -0
- package/dist/esm/mixins/OxyServices.fedcm.js +36 -0
- package/dist/esm/mixins/OxyServices.popup.js +61 -1
- package/dist/esm/mixins/OxyServices.user.js +18 -0
- package/dist/esm/utils/accountUtils.js +61 -0
- package/dist/esm/utils/coldBoot.js +68 -0
- package/dist/esm/utils/fapiAutoDetect.js +85 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/AuthManager.d.ts +243 -3
- package/dist/types/AuthManagerTypes.d.ts +68 -0
- package/dist/types/CrossDomainAuth.d.ts +23 -0
- package/dist/types/OxyServices.base.d.ts +14 -0
- package/dist/types/OxyServices.d.ts +7 -0
- package/dist/types/index.d.ts +31 -17
- package/dist/types/mixins/OxyServices.analytics.d.ts +1 -0
- package/dist/types/mixins/OxyServices.appData.d.ts +1 -0
- package/dist/types/mixins/OxyServices.assets.d.ts +4 -1
- package/dist/types/mixins/OxyServices.auth.d.ts +73 -1
- package/dist/types/mixins/OxyServices.contacts.d.ts +1 -0
- package/dist/types/mixins/OxyServices.developer.d.ts +1 -0
- package/dist/types/mixins/OxyServices.devices.d.ts +1 -0
- package/dist/types/mixins/OxyServices.features.d.ts +2 -5
- package/dist/types/mixins/OxyServices.fedcm.d.ts +34 -0
- package/dist/types/mixins/OxyServices.karma.d.ts +1 -0
- package/dist/types/mixins/OxyServices.language.d.ts +1 -0
- package/dist/types/mixins/OxyServices.location.d.ts +1 -0
- package/dist/types/mixins/OxyServices.managedAccounts.d.ts +1 -0
- package/dist/types/mixins/OxyServices.payment.d.ts +1 -0
- package/dist/types/mixins/OxyServices.popup.d.ts +40 -0
- package/dist/types/mixins/OxyServices.privacy.d.ts +1 -0
- package/dist/types/mixins/OxyServices.redirect.d.ts +1 -0
- package/dist/types/mixins/OxyServices.security.d.ts +1 -0
- package/dist/types/mixins/OxyServices.topics.d.ts +1 -0
- package/dist/types/mixins/OxyServices.user.d.ts +16 -1
- package/dist/types/mixins/OxyServices.utility.d.ts +1 -0
- package/dist/types/models/interfaces.d.ts +98 -0
- package/dist/types/models/session.d.ts +8 -0
- package/dist/types/utils/accountUtils.d.ts +33 -0
- package/dist/types/utils/coldBoot.d.ts +102 -0
- package/dist/types/utils/fapiAutoDetect.d.ts +37 -0
- package/package.json +9 -18
- package/src/AuthManager.ts +776 -7
- package/src/AuthManagerTypes.ts +72 -0
- package/src/CrossDomainAuth.ts +54 -3
- package/src/OxyServices.base.ts +17 -0
- package/src/OxyServices.ts +7 -0
- package/src/__tests__/authManager.cookiePath.test.ts +339 -0
- package/src/__tests__/authManager.security.test.ts +342 -0
- package/src/__tests__/crossDomainAuth.test.ts +191 -0
- package/src/i18n/locales/ar-SA.json +83 -1
- package/src/i18n/locales/ca-ES.json +83 -1
- package/src/i18n/locales/de-DE.json +83 -1
- package/src/i18n/locales/en-US.json +83 -0
- package/src/i18n/locales/es-ES.json +99 -4
- package/src/i18n/locales/fr-FR.json +83 -1
- package/src/i18n/locales/it-IT.json +83 -1
- package/src/i18n/locales/ja-JP.json +200 -117
- package/src/i18n/locales/ko-KR.json +83 -1
- package/src/i18n/locales/pt-PT.json +83 -1
- package/src/i18n/locales/zh-CN.json +83 -1
- package/src/index.ts +309 -112
- package/src/mixins/OxyServices.auth.ts +268 -1
- package/src/mixins/OxyServices.fedcm.ts +63 -0
- package/src/mixins/OxyServices.popup.ts +79 -1
- package/src/mixins/OxyServices.user.ts +33 -1
- package/src/mixins/__tests__/popup.test.ts +307 -0
- package/src/mixins/__tests__/sessionBaseUrl.test.ts +61 -0
- package/src/models/interfaces.ts +116 -0
- package/src/models/session.ts +8 -0
- package/src/utils/__tests__/coldBoot.test.ts +226 -0
- package/src/utils/__tests__/fapiAutoDetect.test.ts +93 -0
- package/src/utils/accountUtils.ts +84 -0
- package/src/utils/coldBoot.ts +136 -0
- package/src/utils/fapiAutoDetect.ts +82 -0
- package/dist/cjs/crypto/index.js +0 -22
- package/dist/cjs/shared/index.js +0 -70
- package/dist/cjs/utils/index.js +0 -26
- package/dist/esm/crypto/index.js +0 -13
- package/dist/esm/shared/index.js +0 -31
- package/dist/esm/utils/index.js +0 -7
- package/dist/types/crypto/index.d.ts +0 -11
- package/dist/types/shared/index.d.ts +0 -28
- package/dist/types/utils/index.d.ts +0 -6
- package/src/crypto/index.ts +0 -30
- package/src/shared/index.ts +0 -82
- package/src/utils/index.ts +0 -21
package/dist/cjs/shared/index.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* OxyServices Shared Module
|
|
4
|
-
*
|
|
5
|
-
* Platform-agnostic utilities and helpers that work everywhere:
|
|
6
|
-
* - Browser (Web, Expo Web)
|
|
7
|
-
* - React Native (iOS, Android)
|
|
8
|
-
* - Node.js (Backend)
|
|
9
|
-
*
|
|
10
|
-
* This module contains NO React Native or browser-specific dependencies.
|
|
11
|
-
*
|
|
12
|
-
* @module shared
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* import { darkenColor, normalizeTheme, withRetry } from '@oxyhq/services/shared';
|
|
17
|
-
*
|
|
18
|
-
* const darkBlue = darkenColor('#0066FF', 0.3);
|
|
19
|
-
* const theme = normalizeTheme(userPreference);
|
|
20
|
-
* const data = await withRetry(() => fetchData(), { maxRetries: 3 });
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.createDebugLogger = exports.debugError = exports.debugWarn = exports.debugLog = exports.isDev = exports.withRetry = exports.delay = exports.shouldAllowRequest = exports.recordSuccess = exports.recordFailure = exports.calculateBackoffInterval = exports.createCircuitBreakerState = exports.DEFAULT_CIRCUIT_BREAKER_CONFIG = exports.isRetryableError = exports.isNetworkError = exports.isServerError = exports.isRateLimitError = exports.isNotFoundError = exports.isForbiddenError = exports.isUnauthorizedError = exports.isAlreadyRegisteredError = exports.getErrorMessage = exports.getErrorStatus = exports.HttpStatus = exports.getSystemColorScheme = exports.systemPrefersDarkMode = exports.getOppositeTheme = exports.normalizeColorScheme = exports.normalizeTheme = exports.getContrastTextColor = exports.isLightColor = exports.withOpacity = exports.rgbToHex = exports.hexToRgb = exports.lightenColor = exports.darkenColor = void 0;
|
|
25
|
-
// Color utilities
|
|
26
|
-
var colorUtils_1 = require("./utils/colorUtils");
|
|
27
|
-
Object.defineProperty(exports, "darkenColor", { enumerable: true, get: function () { return colorUtils_1.darkenColor; } });
|
|
28
|
-
Object.defineProperty(exports, "lightenColor", { enumerable: true, get: function () { return colorUtils_1.lightenColor; } });
|
|
29
|
-
Object.defineProperty(exports, "hexToRgb", { enumerable: true, get: function () { return colorUtils_1.hexToRgb; } });
|
|
30
|
-
Object.defineProperty(exports, "rgbToHex", { enumerable: true, get: function () { return colorUtils_1.rgbToHex; } });
|
|
31
|
-
Object.defineProperty(exports, "withOpacity", { enumerable: true, get: function () { return colorUtils_1.withOpacity; } });
|
|
32
|
-
Object.defineProperty(exports, "isLightColor", { enumerable: true, get: function () { return colorUtils_1.isLightColor; } });
|
|
33
|
-
Object.defineProperty(exports, "getContrastTextColor", { enumerable: true, get: function () { return colorUtils_1.getContrastTextColor; } });
|
|
34
|
-
// Theme utilities
|
|
35
|
-
var themeUtils_1 = require("./utils/themeUtils");
|
|
36
|
-
Object.defineProperty(exports, "normalizeTheme", { enumerable: true, get: function () { return themeUtils_1.normalizeTheme; } });
|
|
37
|
-
Object.defineProperty(exports, "normalizeColorScheme", { enumerable: true, get: function () { return themeUtils_1.normalizeColorScheme; } });
|
|
38
|
-
Object.defineProperty(exports, "getOppositeTheme", { enumerable: true, get: function () { return themeUtils_1.getOppositeTheme; } });
|
|
39
|
-
Object.defineProperty(exports, "systemPrefersDarkMode", { enumerable: true, get: function () { return themeUtils_1.systemPrefersDarkMode; } });
|
|
40
|
-
Object.defineProperty(exports, "getSystemColorScheme", { enumerable: true, get: function () { return themeUtils_1.getSystemColorScheme; } });
|
|
41
|
-
// Error utilities
|
|
42
|
-
var errorUtils_1 = require("./utils/errorUtils");
|
|
43
|
-
Object.defineProperty(exports, "HttpStatus", { enumerable: true, get: function () { return errorUtils_1.HttpStatus; } });
|
|
44
|
-
Object.defineProperty(exports, "getErrorStatus", { enumerable: true, get: function () { return errorUtils_1.getErrorStatus; } });
|
|
45
|
-
Object.defineProperty(exports, "getErrorMessage", { enumerable: true, get: function () { return errorUtils_1.getErrorMessage; } });
|
|
46
|
-
Object.defineProperty(exports, "isAlreadyRegisteredError", { enumerable: true, get: function () { return errorUtils_1.isAlreadyRegisteredError; } });
|
|
47
|
-
Object.defineProperty(exports, "isUnauthorizedError", { enumerable: true, get: function () { return errorUtils_1.isUnauthorizedError; } });
|
|
48
|
-
Object.defineProperty(exports, "isForbiddenError", { enumerable: true, get: function () { return errorUtils_1.isForbiddenError; } });
|
|
49
|
-
Object.defineProperty(exports, "isNotFoundError", { enumerable: true, get: function () { return errorUtils_1.isNotFoundError; } });
|
|
50
|
-
Object.defineProperty(exports, "isRateLimitError", { enumerable: true, get: function () { return errorUtils_1.isRateLimitError; } });
|
|
51
|
-
Object.defineProperty(exports, "isServerError", { enumerable: true, get: function () { return errorUtils_1.isServerError; } });
|
|
52
|
-
Object.defineProperty(exports, "isNetworkError", { enumerable: true, get: function () { return errorUtils_1.isNetworkError; } });
|
|
53
|
-
Object.defineProperty(exports, "isRetryableError", { enumerable: true, get: function () { return errorUtils_1.isRetryableError; } });
|
|
54
|
-
// Network utilities
|
|
55
|
-
var networkUtils_1 = require("./utils/networkUtils");
|
|
56
|
-
Object.defineProperty(exports, "DEFAULT_CIRCUIT_BREAKER_CONFIG", { enumerable: true, get: function () { return networkUtils_1.DEFAULT_CIRCUIT_BREAKER_CONFIG; } });
|
|
57
|
-
Object.defineProperty(exports, "createCircuitBreakerState", { enumerable: true, get: function () { return networkUtils_1.createCircuitBreakerState; } });
|
|
58
|
-
Object.defineProperty(exports, "calculateBackoffInterval", { enumerable: true, get: function () { return networkUtils_1.calculateBackoffInterval; } });
|
|
59
|
-
Object.defineProperty(exports, "recordFailure", { enumerable: true, get: function () { return networkUtils_1.recordFailure; } });
|
|
60
|
-
Object.defineProperty(exports, "recordSuccess", { enumerable: true, get: function () { return networkUtils_1.recordSuccess; } });
|
|
61
|
-
Object.defineProperty(exports, "shouldAllowRequest", { enumerable: true, get: function () { return networkUtils_1.shouldAllowRequest; } });
|
|
62
|
-
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return networkUtils_1.delay; } });
|
|
63
|
-
Object.defineProperty(exports, "withRetry", { enumerable: true, get: function () { return networkUtils_1.withRetry; } });
|
|
64
|
-
// Debug utilities
|
|
65
|
-
var debugUtils_1 = require("./utils/debugUtils");
|
|
66
|
-
Object.defineProperty(exports, "isDev", { enumerable: true, get: function () { return debugUtils_1.isDev; } });
|
|
67
|
-
Object.defineProperty(exports, "debugLog", { enumerable: true, get: function () { return debugUtils_1.debugLog; } });
|
|
68
|
-
Object.defineProperty(exports, "debugWarn", { enumerable: true, get: function () { return debugUtils_1.debugWarn; } });
|
|
69
|
-
Object.defineProperty(exports, "debugError", { enumerable: true, get: function () { return debugUtils_1.debugError; } });
|
|
70
|
-
Object.defineProperty(exports, "createDebugLogger", { enumerable: true, get: function () { return debugUtils_1.createDebugLogger; } });
|
package/dist/cjs/utils/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sessionsArraysEqual = exports.sessionsEqual = exports.mergeSessions = exports.normalizeAndSortSessions = exports.deduplicateSessionsByUserId = exports.deduplicateSessions = exports.sortSessions = exports.normalizeSession = exports.unregisterCacheFromCleanup = exports.registerCacheForCleanup = exports.createCache = exports.TTLCache = exports.SimpleLogger = exports.RequestQueue = exports.RequestDeduplicator = exports.DeviceManager = void 0;
|
|
4
|
-
var deviceManager_1 = require("./deviceManager");
|
|
5
|
-
Object.defineProperty(exports, "DeviceManager", { enumerable: true, get: function () { return deviceManager_1.DeviceManager; } });
|
|
6
|
-
// Request utilities
|
|
7
|
-
var requestUtils_1 = require("./requestUtils");
|
|
8
|
-
Object.defineProperty(exports, "RequestDeduplicator", { enumerable: true, get: function () { return requestUtils_1.RequestDeduplicator; } });
|
|
9
|
-
Object.defineProperty(exports, "RequestQueue", { enumerable: true, get: function () { return requestUtils_1.RequestQueue; } });
|
|
10
|
-
Object.defineProperty(exports, "SimpleLogger", { enumerable: true, get: function () { return requestUtils_1.SimpleLogger; } });
|
|
11
|
-
// Cache utilities
|
|
12
|
-
var cache_1 = require("./cache");
|
|
13
|
-
Object.defineProperty(exports, "TTLCache", { enumerable: true, get: function () { return cache_1.TTLCache; } });
|
|
14
|
-
Object.defineProperty(exports, "createCache", { enumerable: true, get: function () { return cache_1.createCache; } });
|
|
15
|
-
Object.defineProperty(exports, "registerCacheForCleanup", { enumerable: true, get: function () { return cache_1.registerCacheForCleanup; } });
|
|
16
|
-
Object.defineProperty(exports, "unregisterCacheFromCleanup", { enumerable: true, get: function () { return cache_1.unregisterCacheFromCleanup; } });
|
|
17
|
-
// Session utilities
|
|
18
|
-
var sessionUtils_1 = require("./sessionUtils");
|
|
19
|
-
Object.defineProperty(exports, "normalizeSession", { enumerable: true, get: function () { return sessionUtils_1.normalizeSession; } });
|
|
20
|
-
Object.defineProperty(exports, "sortSessions", { enumerable: true, get: function () { return sessionUtils_1.sortSessions; } });
|
|
21
|
-
Object.defineProperty(exports, "deduplicateSessions", { enumerable: true, get: function () { return sessionUtils_1.deduplicateSessions; } });
|
|
22
|
-
Object.defineProperty(exports, "deduplicateSessionsByUserId", { enumerable: true, get: function () { return sessionUtils_1.deduplicateSessionsByUserId; } });
|
|
23
|
-
Object.defineProperty(exports, "normalizeAndSortSessions", { enumerable: true, get: function () { return sessionUtils_1.normalizeAndSortSessions; } });
|
|
24
|
-
Object.defineProperty(exports, "mergeSessions", { enumerable: true, get: function () { return sessionUtils_1.mergeSessions; } });
|
|
25
|
-
Object.defineProperty(exports, "sessionsEqual", { enumerable: true, get: function () { return sessionUtils_1.sessionsEqual; } });
|
|
26
|
-
Object.defineProperty(exports, "sessionsArraysEqual", { enumerable: true, get: function () { return sessionUtils_1.sessionsArraysEqual; } });
|
package/dist/esm/crypto/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Oxy Crypto Module
|
|
3
|
-
*
|
|
4
|
-
* Provides cryptographic identity management for the Oxy ecosystem.
|
|
5
|
-
* Handles key generation, secure storage, digital signatures, and recovery phrases.
|
|
6
|
-
*/
|
|
7
|
-
// Import polyfills first - this ensures Buffer is available for bip39 and other libraries
|
|
8
|
-
import './polyfill.js';
|
|
9
|
-
export { KeyManager, IdentityAlreadyExistsError, IdentityPersistError, } from './keyManager.js';
|
|
10
|
-
export { SignatureService } from './signatureService.js';
|
|
11
|
-
export { RecoveryPhraseService } from './recoveryPhrase.js';
|
|
12
|
-
// Re-export for convenience
|
|
13
|
-
export { KeyManager as default } from './keyManager.js';
|
package/dist/esm/shared/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OxyServices Shared Module
|
|
3
|
-
*
|
|
4
|
-
* Platform-agnostic utilities and helpers that work everywhere:
|
|
5
|
-
* - Browser (Web, Expo Web)
|
|
6
|
-
* - React Native (iOS, Android)
|
|
7
|
-
* - Node.js (Backend)
|
|
8
|
-
*
|
|
9
|
-
* This module contains NO React Native or browser-specific dependencies.
|
|
10
|
-
*
|
|
11
|
-
* @module shared
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { darkenColor, normalizeTheme, withRetry } from '@oxyhq/services/shared';
|
|
16
|
-
*
|
|
17
|
-
* const darkBlue = darkenColor('#0066FF', 0.3);
|
|
18
|
-
* const theme = normalizeTheme(userPreference);
|
|
19
|
-
* const data = await withRetry(() => fetchData(), { maxRetries: 3 });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
// Color utilities
|
|
23
|
-
export { darkenColor, lightenColor, hexToRgb, rgbToHex, withOpacity, isLightColor, getContrastTextColor, } from './utils/colorUtils.js';
|
|
24
|
-
// Theme utilities
|
|
25
|
-
export { normalizeTheme, normalizeColorScheme, getOppositeTheme, systemPrefersDarkMode, getSystemColorScheme, } from './utils/themeUtils.js';
|
|
26
|
-
// Error utilities
|
|
27
|
-
export { HttpStatus, getErrorStatus, getErrorMessage, isAlreadyRegisteredError, isUnauthorizedError, isForbiddenError, isNotFoundError, isRateLimitError, isServerError, isNetworkError, isRetryableError, } from './utils/errorUtils.js';
|
|
28
|
-
// Network utilities
|
|
29
|
-
export { DEFAULT_CIRCUIT_BREAKER_CONFIG, createCircuitBreakerState, calculateBackoffInterval, recordFailure, recordSuccess, shouldAllowRequest, delay, withRetry, } from './utils/networkUtils.js';
|
|
30
|
-
// Debug utilities
|
|
31
|
-
export { isDev, debugLog, debugWarn, debugError, createDebugLogger, } from './utils/debugUtils.js';
|
package/dist/esm/utils/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { DeviceManager } from './deviceManager.js';
|
|
2
|
-
// Request utilities
|
|
3
|
-
export { RequestDeduplicator, RequestQueue, SimpleLogger } from './requestUtils.js';
|
|
4
|
-
// Cache utilities
|
|
5
|
-
export { TTLCache, createCache, registerCacheForCleanup, unregisterCacheFromCleanup } from './cache.js';
|
|
6
|
-
// Session utilities
|
|
7
|
-
export { normalizeSession, sortSessions, deduplicateSessions, deduplicateSessionsByUserId, normalizeAndSortSessions, mergeSessions, sessionsEqual, sessionsArraysEqual } from './sessionUtils.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Oxy Crypto Module
|
|
3
|
-
*
|
|
4
|
-
* Provides cryptographic identity management for the Oxy ecosystem.
|
|
5
|
-
* Handles key generation, secure storage, digital signatures, and recovery phrases.
|
|
6
|
-
*/
|
|
7
|
-
import './polyfill';
|
|
8
|
-
export { KeyManager, IdentityAlreadyExistsError, IdentityPersistError, type KeyPair, } from './keyManager';
|
|
9
|
-
export { SignatureService, type SignedMessage, type AuthChallenge } from './signatureService';
|
|
10
|
-
export { RecoveryPhraseService, type RecoveryPhraseResult } from './recoveryPhrase';
|
|
11
|
-
export { KeyManager as default } from './keyManager';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OxyServices Shared Module
|
|
3
|
-
*
|
|
4
|
-
* Platform-agnostic utilities and helpers that work everywhere:
|
|
5
|
-
* - Browser (Web, Expo Web)
|
|
6
|
-
* - React Native (iOS, Android)
|
|
7
|
-
* - Node.js (Backend)
|
|
8
|
-
*
|
|
9
|
-
* This module contains NO React Native or browser-specific dependencies.
|
|
10
|
-
*
|
|
11
|
-
* @module shared
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { darkenColor, normalizeTheme, withRetry } from '@oxyhq/services/shared';
|
|
16
|
-
*
|
|
17
|
-
* const darkBlue = darkenColor('#0066FF', 0.3);
|
|
18
|
-
* const theme = normalizeTheme(userPreference);
|
|
19
|
-
* const data = await withRetry(() => fetchData(), { maxRetries: 3 });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export { darkenColor, lightenColor, hexToRgb, rgbToHex, withOpacity, isLightColor, getContrastTextColor, } from './utils/colorUtils';
|
|
23
|
-
export { normalizeTheme, normalizeColorScheme, getOppositeTheme, systemPrefersDarkMode, getSystemColorScheme, } from './utils/themeUtils';
|
|
24
|
-
export type { ThemeValue } from './utils/themeUtils';
|
|
25
|
-
export { HttpStatus, getErrorStatus, getErrorMessage, isAlreadyRegisteredError, isUnauthorizedError, isForbiddenError, isNotFoundError, isRateLimitError, isServerError, isNetworkError, isRetryableError, } from './utils/errorUtils';
|
|
26
|
-
export { DEFAULT_CIRCUIT_BREAKER_CONFIG, createCircuitBreakerState, calculateBackoffInterval, recordFailure, recordSuccess, shouldAllowRequest, delay, withRetry, } from './utils/networkUtils';
|
|
27
|
-
export type { CircuitBreakerState, CircuitBreakerConfig, } from './utils/networkUtils';
|
|
28
|
-
export { isDev, debugLog, debugWarn, debugError, createDebugLogger, } from './utils/debugUtils';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { DeviceManager } from './deviceManager';
|
|
2
|
-
export type { DeviceFingerprint, StoredDeviceInfo } from './deviceManager';
|
|
3
|
-
export { RequestDeduplicator, RequestQueue, SimpleLogger } from './requestUtils';
|
|
4
|
-
export { TTLCache, createCache, registerCacheForCleanup, unregisterCacheFromCleanup } from './cache';
|
|
5
|
-
export type { CacheStats } from './cache';
|
|
6
|
-
export { normalizeSession, sortSessions, deduplicateSessions, deduplicateSessionsByUserId, normalizeAndSortSessions, mergeSessions, sessionsEqual, sessionsArraysEqual } from './sessionUtils';
|
package/src/crypto/index.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Oxy Crypto Module
|
|
3
|
-
*
|
|
4
|
-
* Provides cryptographic identity management for the Oxy ecosystem.
|
|
5
|
-
* Handles key generation, secure storage, digital signatures, and recovery phrases.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Import polyfills first - this ensures Buffer is available for bip39 and other libraries
|
|
9
|
-
import './polyfill';
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
KeyManager,
|
|
13
|
-
IdentityAlreadyExistsError,
|
|
14
|
-
IdentityPersistError,
|
|
15
|
-
type KeyPair,
|
|
16
|
-
} from './keyManager';
|
|
17
|
-
export {
|
|
18
|
-
SignatureService,
|
|
19
|
-
type SignedMessage,
|
|
20
|
-
type AuthChallenge
|
|
21
|
-
} from './signatureService';
|
|
22
|
-
export {
|
|
23
|
-
RecoveryPhraseService,
|
|
24
|
-
type RecoveryPhraseResult
|
|
25
|
-
} from './recoveryPhrase';
|
|
26
|
-
|
|
27
|
-
// Re-export for convenience
|
|
28
|
-
export { KeyManager as default } from './keyManager';
|
|
29
|
-
|
|
30
|
-
|
package/src/shared/index.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OxyServices Shared Module
|
|
3
|
-
*
|
|
4
|
-
* Platform-agnostic utilities and helpers that work everywhere:
|
|
5
|
-
* - Browser (Web, Expo Web)
|
|
6
|
-
* - React Native (iOS, Android)
|
|
7
|
-
* - Node.js (Backend)
|
|
8
|
-
*
|
|
9
|
-
* This module contains NO React Native or browser-specific dependencies.
|
|
10
|
-
*
|
|
11
|
-
* @module shared
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { darkenColor, normalizeTheme, withRetry } from '@oxyhq/services/shared';
|
|
16
|
-
*
|
|
17
|
-
* const darkBlue = darkenColor('#0066FF', 0.3);
|
|
18
|
-
* const theme = normalizeTheme(userPreference);
|
|
19
|
-
* const data = await withRetry(() => fetchData(), { maxRetries: 3 });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
// Color utilities
|
|
24
|
-
export {
|
|
25
|
-
darkenColor,
|
|
26
|
-
lightenColor,
|
|
27
|
-
hexToRgb,
|
|
28
|
-
rgbToHex,
|
|
29
|
-
withOpacity,
|
|
30
|
-
isLightColor,
|
|
31
|
-
getContrastTextColor,
|
|
32
|
-
} from './utils/colorUtils';
|
|
33
|
-
|
|
34
|
-
// Theme utilities
|
|
35
|
-
export {
|
|
36
|
-
normalizeTheme,
|
|
37
|
-
normalizeColorScheme,
|
|
38
|
-
getOppositeTheme,
|
|
39
|
-
systemPrefersDarkMode,
|
|
40
|
-
getSystemColorScheme,
|
|
41
|
-
} from './utils/themeUtils';
|
|
42
|
-
export type { ThemeValue } from './utils/themeUtils';
|
|
43
|
-
|
|
44
|
-
// Error utilities
|
|
45
|
-
export {
|
|
46
|
-
HttpStatus,
|
|
47
|
-
getErrorStatus,
|
|
48
|
-
getErrorMessage,
|
|
49
|
-
isAlreadyRegisteredError,
|
|
50
|
-
isUnauthorizedError,
|
|
51
|
-
isForbiddenError,
|
|
52
|
-
isNotFoundError,
|
|
53
|
-
isRateLimitError,
|
|
54
|
-
isServerError,
|
|
55
|
-
isNetworkError,
|
|
56
|
-
isRetryableError,
|
|
57
|
-
} from './utils/errorUtils';
|
|
58
|
-
|
|
59
|
-
// Network utilities
|
|
60
|
-
export {
|
|
61
|
-
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
62
|
-
createCircuitBreakerState,
|
|
63
|
-
calculateBackoffInterval,
|
|
64
|
-
recordFailure,
|
|
65
|
-
recordSuccess,
|
|
66
|
-
shouldAllowRequest,
|
|
67
|
-
delay,
|
|
68
|
-
withRetry,
|
|
69
|
-
} from './utils/networkUtils';
|
|
70
|
-
export type {
|
|
71
|
-
CircuitBreakerState,
|
|
72
|
-
CircuitBreakerConfig,
|
|
73
|
-
} from './utils/networkUtils';
|
|
74
|
-
|
|
75
|
-
// Debug utilities
|
|
76
|
-
export {
|
|
77
|
-
isDev,
|
|
78
|
-
debugLog,
|
|
79
|
-
debugWarn,
|
|
80
|
-
debugError,
|
|
81
|
-
createDebugLogger,
|
|
82
|
-
} from './utils/debugUtils';
|
package/src/utils/index.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export { DeviceManager } from './deviceManager';
|
|
2
|
-
export type { DeviceFingerprint, StoredDeviceInfo } from './deviceManager';
|
|
3
|
-
|
|
4
|
-
// Request utilities
|
|
5
|
-
export { RequestDeduplicator, RequestQueue, SimpleLogger } from './requestUtils';
|
|
6
|
-
|
|
7
|
-
// Cache utilities
|
|
8
|
-
export { TTLCache, createCache, registerCacheForCleanup, unregisterCacheFromCleanup } from './cache';
|
|
9
|
-
export type { CacheStats } from './cache';
|
|
10
|
-
|
|
11
|
-
// Session utilities
|
|
12
|
-
export {
|
|
13
|
-
normalizeSession,
|
|
14
|
-
sortSessions,
|
|
15
|
-
deduplicateSessions,
|
|
16
|
-
deduplicateSessionsByUserId,
|
|
17
|
-
normalizeAndSortSessions,
|
|
18
|
-
mergeSessions,
|
|
19
|
-
sessionsEqual,
|
|
20
|
-
sessionsArraysEqual
|
|
21
|
-
} from './sessionUtils';
|