@oxyhq/core 1.0.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 +50 -0
- package/dist/cjs/AuthManager.js +361 -0
- package/dist/cjs/CrossDomainAuth.js +258 -0
- package/dist/cjs/HttpService.js +618 -0
- package/dist/cjs/OxyServices.base.js +263 -0
- package/dist/cjs/OxyServices.errors.js +22 -0
- package/dist/cjs/OxyServices.js +63 -0
- package/dist/cjs/constants/version.js +16 -0
- package/dist/cjs/crypto/index.js +20 -0
- package/dist/cjs/crypto/keyManager.js +887 -0
- package/dist/cjs/crypto/polyfill.js +64 -0
- package/dist/cjs/crypto/recoveryPhrase.js +169 -0
- package/dist/cjs/crypto/signatureService.js +296 -0
- package/dist/cjs/i18n/index.js +73 -0
- package/dist/cjs/i18n/locales/ar-SA.json +120 -0
- package/dist/cjs/i18n/locales/ca-ES.json +120 -0
- package/dist/cjs/i18n/locales/de-DE.json +120 -0
- package/dist/cjs/i18n/locales/en-US.json +956 -0
- package/dist/cjs/i18n/locales/es-ES.json +944 -0
- package/dist/cjs/i18n/locales/fr-FR.json +120 -0
- package/dist/cjs/i18n/locales/it-IT.json +120 -0
- package/dist/cjs/i18n/locales/ja-JP.json +119 -0
- package/dist/cjs/i18n/locales/ko-KR.json +120 -0
- package/dist/cjs/i18n/locales/locales/ar-SA.json +120 -0
- package/dist/cjs/i18n/locales/locales/ca-ES.json +120 -0
- package/dist/cjs/i18n/locales/locales/de-DE.json +120 -0
- package/dist/cjs/i18n/locales/locales/en-US.json +956 -0
- package/dist/cjs/i18n/locales/locales/es-ES.json +944 -0
- package/dist/cjs/i18n/locales/locales/fr-FR.json +120 -0
- package/dist/cjs/i18n/locales/locales/it-IT.json +120 -0
- package/dist/cjs/i18n/locales/locales/ja-JP.json +119 -0
- package/dist/cjs/i18n/locales/locales/ko-KR.json +120 -0
- package/dist/cjs/i18n/locales/locales/pt-PT.json +120 -0
- package/dist/cjs/i18n/locales/locales/zh-CN.json +120 -0
- package/dist/cjs/i18n/locales/pt-PT.json +120 -0
- package/dist/cjs/i18n/locales/zh-CN.json +120 -0
- package/dist/cjs/index.js +153 -0
- package/dist/cjs/mixins/OxyServices.analytics.js +49 -0
- package/dist/cjs/mixins/OxyServices.assets.js +380 -0
- package/dist/cjs/mixins/OxyServices.auth.js +259 -0
- package/dist/cjs/mixins/OxyServices.developer.js +97 -0
- package/dist/cjs/mixins/OxyServices.devices.js +116 -0
- package/dist/cjs/mixins/OxyServices.features.js +309 -0
- package/dist/cjs/mixins/OxyServices.fedcm.js +435 -0
- package/dist/cjs/mixins/OxyServices.karma.js +108 -0
- package/dist/cjs/mixins/OxyServices.language.js +154 -0
- package/dist/cjs/mixins/OxyServices.location.js +43 -0
- package/dist/cjs/mixins/OxyServices.payment.js +158 -0
- package/dist/cjs/mixins/OxyServices.popup.js +371 -0
- package/dist/cjs/mixins/OxyServices.privacy.js +162 -0
- package/dist/cjs/mixins/OxyServices.redirect.js +345 -0
- package/dist/cjs/mixins/OxyServices.security.js +81 -0
- package/dist/cjs/mixins/OxyServices.user.js +355 -0
- package/dist/cjs/mixins/OxyServices.utility.js +156 -0
- package/dist/cjs/mixins/index.js +79 -0
- package/dist/cjs/mixins/mixinHelpers.js +53 -0
- package/dist/cjs/models/interfaces.js +20 -0
- package/dist/cjs/models/session.js +2 -0
- package/dist/cjs/shared/index.js +70 -0
- package/dist/cjs/shared/utils/colorUtils.js +153 -0
- package/dist/cjs/shared/utils/debugUtils.js +73 -0
- package/dist/cjs/shared/utils/errorUtils.js +183 -0
- package/dist/cjs/shared/utils/index.js +49 -0
- package/dist/cjs/shared/utils/networkUtils.js +183 -0
- package/dist/cjs/shared/utils/themeUtils.js +106 -0
- package/dist/cjs/utils/apiUtils.js +61 -0
- package/dist/cjs/utils/asyncUtils.js +194 -0
- package/dist/cjs/utils/cache.js +226 -0
- package/dist/cjs/utils/deviceManager.js +205 -0
- package/dist/cjs/utils/errorUtils.js +154 -0
- package/dist/cjs/utils/index.js +26 -0
- package/dist/cjs/utils/languageUtils.js +165 -0
- package/dist/cjs/utils/loggerUtils.js +126 -0
- package/dist/cjs/utils/platform.js +144 -0
- package/dist/cjs/utils/requestUtils.js +209 -0
- package/dist/cjs/utils/sessionUtils.js +181 -0
- package/dist/cjs/utils/validationUtils.js +173 -0
- package/dist/esm/AuthManager.js +356 -0
- package/dist/esm/CrossDomainAuth.js +253 -0
- package/dist/esm/HttpService.js +614 -0
- package/dist/esm/OxyServices.base.js +259 -0
- package/dist/esm/OxyServices.errors.js +17 -0
- package/dist/esm/OxyServices.js +59 -0
- package/dist/esm/constants/version.js +13 -0
- package/dist/esm/crypto/index.js +13 -0
- package/dist/esm/crypto/keyManager.js +850 -0
- package/dist/esm/crypto/polyfill.js +61 -0
- package/dist/esm/crypto/recoveryPhrase.js +132 -0
- package/dist/esm/crypto/signatureService.js +259 -0
- package/dist/esm/i18n/index.js +69 -0
- package/dist/esm/i18n/locales/ar-SA.json +120 -0
- package/dist/esm/i18n/locales/ca-ES.json +120 -0
- package/dist/esm/i18n/locales/de-DE.json +120 -0
- package/dist/esm/i18n/locales/en-US.json +956 -0
- package/dist/esm/i18n/locales/es-ES.json +944 -0
- package/dist/esm/i18n/locales/fr-FR.json +120 -0
- package/dist/esm/i18n/locales/it-IT.json +120 -0
- package/dist/esm/i18n/locales/ja-JP.json +119 -0
- package/dist/esm/i18n/locales/ko-KR.json +120 -0
- package/dist/esm/i18n/locales/locales/ar-SA.json +120 -0
- package/dist/esm/i18n/locales/locales/ca-ES.json +120 -0
- package/dist/esm/i18n/locales/locales/de-DE.json +120 -0
- package/dist/esm/i18n/locales/locales/en-US.json +956 -0
- package/dist/esm/i18n/locales/locales/es-ES.json +944 -0
- package/dist/esm/i18n/locales/locales/fr-FR.json +120 -0
- package/dist/esm/i18n/locales/locales/it-IT.json +120 -0
- package/dist/esm/i18n/locales/locales/ja-JP.json +119 -0
- package/dist/esm/i18n/locales/locales/ko-KR.json +120 -0
- package/dist/esm/i18n/locales/locales/pt-PT.json +120 -0
- package/dist/esm/i18n/locales/locales/zh-CN.json +120 -0
- package/dist/esm/i18n/locales/pt-PT.json +120 -0
- package/dist/esm/i18n/locales/zh-CN.json +120 -0
- package/dist/esm/index.js +55 -0
- package/dist/esm/mixins/OxyServices.analytics.js +46 -0
- package/dist/esm/mixins/OxyServices.assets.js +377 -0
- package/dist/esm/mixins/OxyServices.auth.js +256 -0
- package/dist/esm/mixins/OxyServices.developer.js +94 -0
- package/dist/esm/mixins/OxyServices.devices.js +113 -0
- package/dist/esm/mixins/OxyServices.features.js +306 -0
- package/dist/esm/mixins/OxyServices.fedcm.js +433 -0
- package/dist/esm/mixins/OxyServices.karma.js +105 -0
- package/dist/esm/mixins/OxyServices.language.js +118 -0
- package/dist/esm/mixins/OxyServices.location.js +40 -0
- package/dist/esm/mixins/OxyServices.payment.js +155 -0
- package/dist/esm/mixins/OxyServices.popup.js +369 -0
- package/dist/esm/mixins/OxyServices.privacy.js +159 -0
- package/dist/esm/mixins/OxyServices.redirect.js +343 -0
- package/dist/esm/mixins/OxyServices.security.js +78 -0
- package/dist/esm/mixins/OxyServices.user.js +352 -0
- package/dist/esm/mixins/OxyServices.utility.js +153 -0
- package/dist/esm/mixins/index.js +76 -0
- package/dist/esm/mixins/mixinHelpers.js +48 -0
- package/dist/esm/models/interfaces.js +17 -0
- package/dist/esm/models/session.js +1 -0
- package/dist/esm/shared/index.js +31 -0
- package/dist/esm/shared/utils/colorUtils.js +143 -0
- package/dist/esm/shared/utils/debugUtils.js +65 -0
- package/dist/esm/shared/utils/errorUtils.js +170 -0
- package/dist/esm/shared/utils/index.js +15 -0
- package/dist/esm/shared/utils/networkUtils.js +173 -0
- package/dist/esm/shared/utils/themeUtils.js +98 -0
- package/dist/esm/utils/apiUtils.js +55 -0
- package/dist/esm/utils/asyncUtils.js +179 -0
- package/dist/esm/utils/cache.js +218 -0
- package/dist/esm/utils/deviceManager.js +168 -0
- package/dist/esm/utils/errorUtils.js +146 -0
- package/dist/esm/utils/index.js +7 -0
- package/dist/esm/utils/languageUtils.js +158 -0
- package/dist/esm/utils/loggerUtils.js +115 -0
- package/dist/esm/utils/platform.js +102 -0
- package/dist/esm/utils/requestUtils.js +203 -0
- package/dist/esm/utils/sessionUtils.js +171 -0
- package/dist/esm/utils/validationUtils.js +153 -0
- package/dist/types/AuthManager.d.ts +143 -0
- package/dist/types/CrossDomainAuth.d.ts +160 -0
- package/dist/types/HttpService.d.ts +163 -0
- package/dist/types/OxyServices.base.d.ts +126 -0
- package/dist/types/OxyServices.d.ts +81 -0
- package/dist/types/OxyServices.errors.d.ts +11 -0
- package/dist/types/constants/version.d.ts +13 -0
- package/dist/types/crypto/index.d.ts +11 -0
- package/dist/types/crypto/keyManager.d.ts +189 -0
- package/dist/types/crypto/polyfill.d.ts +11 -0
- package/dist/types/crypto/recoveryPhrase.d.ts +58 -0
- package/dist/types/crypto/signatureService.d.ts +86 -0
- package/dist/types/i18n/index.d.ts +3 -0
- package/dist/types/index.d.ts +50 -0
- package/dist/types/mixins/OxyServices.analytics.d.ts +66 -0
- package/dist/types/mixins/OxyServices.assets.d.ts +135 -0
- package/dist/types/mixins/OxyServices.auth.d.ts +186 -0
- package/dist/types/mixins/OxyServices.developer.d.ts +99 -0
- package/dist/types/mixins/OxyServices.devices.d.ts +96 -0
- package/dist/types/mixins/OxyServices.features.d.ts +228 -0
- package/dist/types/mixins/OxyServices.fedcm.d.ts +200 -0
- package/dist/types/mixins/OxyServices.karma.d.ts +85 -0
- package/dist/types/mixins/OxyServices.language.d.ts +81 -0
- package/dist/types/mixins/OxyServices.location.d.ts +64 -0
- package/dist/types/mixins/OxyServices.payment.d.ts +111 -0
- package/dist/types/mixins/OxyServices.popup.d.ts +205 -0
- package/dist/types/mixins/OxyServices.privacy.d.ts +122 -0
- package/dist/types/mixins/OxyServices.redirect.d.ts +245 -0
- package/dist/types/mixins/OxyServices.security.d.ts +78 -0
- package/dist/types/mixins/OxyServices.user.d.ts +182 -0
- package/dist/types/mixins/OxyServices.utility.d.ts +93 -0
- package/dist/types/mixins/index.d.ts +30 -0
- package/dist/types/mixins/mixinHelpers.d.ts +31 -0
- package/dist/types/models/interfaces.d.ts +415 -0
- package/dist/types/models/session.d.ts +27 -0
- package/dist/types/shared/index.d.ts +28 -0
- package/dist/types/shared/utils/colorUtils.d.ts +104 -0
- package/dist/types/shared/utils/debugUtils.d.ts +48 -0
- package/dist/types/shared/utils/errorUtils.d.ts +97 -0
- package/dist/types/shared/utils/index.d.ts +13 -0
- package/dist/types/shared/utils/networkUtils.d.ts +139 -0
- package/dist/types/shared/utils/themeUtils.d.ts +90 -0
- package/dist/types/utils/apiUtils.d.ts +53 -0
- package/dist/types/utils/asyncUtils.d.ts +58 -0
- package/dist/types/utils/cache.d.ts +127 -0
- package/dist/types/utils/deviceManager.d.ts +65 -0
- package/dist/types/utils/errorUtils.d.ts +46 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/languageUtils.d.ts +37 -0
- package/dist/types/utils/loggerUtils.d.ts +48 -0
- package/dist/types/utils/platform.d.ts +40 -0
- package/dist/types/utils/requestUtils.d.ts +123 -0
- package/dist/types/utils/sessionUtils.d.ts +54 -0
- package/dist/types/utils/validationUtils.d.ts +85 -0
- package/package.json +84 -0
- package/src/AuthManager.ts +436 -0
- package/src/CrossDomainAuth.ts +307 -0
- package/src/HttpService.ts +752 -0
- package/src/OxyServices.base.ts +334 -0
- package/src/OxyServices.errors.ts +26 -0
- package/src/OxyServices.ts +129 -0
- package/src/constants/version.ts +15 -0
- package/src/crypto/index.ts +25 -0
- package/src/crypto/keyManager.ts +962 -0
- package/src/crypto/polyfill.ts +70 -0
- package/src/crypto/recoveryPhrase.ts +166 -0
- package/src/crypto/signatureService.ts +323 -0
- package/src/i18n/index.ts +75 -0
- package/src/i18n/locales/ar-SA.json +120 -0
- package/src/i18n/locales/ca-ES.json +120 -0
- package/src/i18n/locales/de-DE.json +120 -0
- package/src/i18n/locales/en-US.json +956 -0
- package/src/i18n/locales/es-ES.json +944 -0
- package/src/i18n/locales/fr-FR.json +120 -0
- package/src/i18n/locales/it-IT.json +120 -0
- package/src/i18n/locales/ja-JP.json +119 -0
- package/src/i18n/locales/ko-KR.json +120 -0
- package/src/i18n/locales/pt-PT.json +120 -0
- package/src/i18n/locales/zh-CN.json +120 -0
- package/src/index.ts +153 -0
- package/src/mixins/OxyServices.analytics.ts +53 -0
- package/src/mixins/OxyServices.assets.ts +412 -0
- package/src/mixins/OxyServices.auth.ts +358 -0
- package/src/mixins/OxyServices.developer.ts +114 -0
- package/src/mixins/OxyServices.devices.ts +119 -0
- package/src/mixins/OxyServices.features.ts +428 -0
- package/src/mixins/OxyServices.fedcm.ts +494 -0
- package/src/mixins/OxyServices.karma.ts +111 -0
- package/src/mixins/OxyServices.language.ts +127 -0
- package/src/mixins/OxyServices.location.ts +46 -0
- package/src/mixins/OxyServices.payment.ts +163 -0
- package/src/mixins/OxyServices.popup.ts +443 -0
- package/src/mixins/OxyServices.privacy.ts +182 -0
- package/src/mixins/OxyServices.redirect.ts +397 -0
- package/src/mixins/OxyServices.security.ts +103 -0
- package/src/mixins/OxyServices.user.ts +392 -0
- package/src/mixins/OxyServices.utility.ts +191 -0
- package/src/mixins/index.ts +91 -0
- package/src/mixins/mixinHelpers.ts +69 -0
- package/src/models/interfaces.ts +511 -0
- package/src/models/session.ts +30 -0
- package/src/shared/index.ts +82 -0
- package/src/shared/utils/colorUtils.ts +155 -0
- package/src/shared/utils/debugUtils.ts +73 -0
- package/src/shared/utils/errorUtils.ts +181 -0
- package/src/shared/utils/index.ts +59 -0
- package/src/shared/utils/networkUtils.ts +248 -0
- package/src/shared/utils/themeUtils.ts +115 -0
- package/src/types/bip39.d.ts +32 -0
- package/src/types/buffer.d.ts +97 -0
- package/src/types/color.d.ts +20 -0
- package/src/types/elliptic.d.ts +62 -0
- package/src/utils/apiUtils.ts +88 -0
- package/src/utils/asyncUtils.ts +252 -0
- package/src/utils/cache.ts +264 -0
- package/src/utils/deviceManager.ts +198 -0
- package/src/utils/errorUtils.ts +216 -0
- package/src/utils/index.ts +21 -0
- package/src/utils/languageUtils.ts +174 -0
- package/src/utils/loggerUtils.ts +153 -0
- package/src/utils/platform.ts +117 -0
- package/src/utils/requestUtils.ts +237 -0
- package/src/utils/sessionUtils.ts +206 -0
- package/src/utils/validationUtils.ts +174 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"signin": {
|
|
3
|
+
"title": "登录",
|
|
4
|
+
"subtitle": "登录以继续",
|
|
5
|
+
"addAccountTitle": "添加另一个账户",
|
|
6
|
+
"addAccountSubtitle": "使用另一个账户登录",
|
|
7
|
+
"username": {
|
|
8
|
+
"label": "用户名",
|
|
9
|
+
"placeholder": "输入您的用户名",
|
|
10
|
+
"helper": "3-30个字符,仅字母和数字",
|
|
11
|
+
"required": "请输入您的用户名。",
|
|
12
|
+
"minLength": "用户名必须至少包含3个字符。"
|
|
13
|
+
},
|
|
14
|
+
"password": {
|
|
15
|
+
"label": "密码",
|
|
16
|
+
"placeholder": "输入您的密码",
|
|
17
|
+
"required": "请输入您的密码。",
|
|
18
|
+
"hint": "输入您的密码以登录"
|
|
19
|
+
},
|
|
20
|
+
"actions": {
|
|
21
|
+
"continue": "继续",
|
|
22
|
+
"back": "返回",
|
|
23
|
+
"signIn": "登录",
|
|
24
|
+
"verify": "验证",
|
|
25
|
+
"openAccountSwitcher": "切换到另一个账户",
|
|
26
|
+
"openAccountSwitcherSubtitle": "{{count}}个其他账户可用",
|
|
27
|
+
"openAccountSwitcherSubtitle_singular": "1个其他账户可用",
|
|
28
|
+
"openAccountSwitcherSubtitle_zero": "查看您保存的账户",
|
|
29
|
+
"manageAccounts": "管理保存的账户",
|
|
30
|
+
"manageAccountsSubtitle": "查看会话、删除或登出",
|
|
31
|
+
"loadingOtherAccounts": "加载其他账户中…",
|
|
32
|
+
"switchAccountFailed": "无法切换账户。请重试。"
|
|
33
|
+
},
|
|
34
|
+
"forgotPrompt": "忘记密码?",
|
|
35
|
+
"security": {
|
|
36
|
+
"dataSecure": "您的数据已加密且安全"
|
|
37
|
+
},
|
|
38
|
+
"currentlySignedInAs": "当前登录为",
|
|
39
|
+
"alreadySignedInWith": "已登录",
|
|
40
|
+
"alreadySignedIn": "已登录",
|
|
41
|
+
"alreadySignedInMessage": "此账户已登录。继续使用此账户?",
|
|
42
|
+
"continueWithAccount": "继续",
|
|
43
|
+
"currentAccount": "当前",
|
|
44
|
+
"or": "或",
|
|
45
|
+
"viewAllAccounts": "查看更多{{count}}个",
|
|
46
|
+
"status": {
|
|
47
|
+
"accountSwitched": "正在使用{{name}}"
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
"signup": {
|
|
51
|
+
"welcome": {
|
|
52
|
+
"title": "欢迎使用Oxy!",
|
|
53
|
+
"subtitle": "只需几步即可创建您的账户",
|
|
54
|
+
"haveAccount": "已有账户?",
|
|
55
|
+
"signInCta": "登录"
|
|
56
|
+
},
|
|
57
|
+
"identity": {
|
|
58
|
+
"title": "您是谁?",
|
|
59
|
+
"subtitle": "选择您的用户名并输入您的电子邮件"
|
|
60
|
+
},
|
|
61
|
+
"username": {
|
|
62
|
+
"helper": "3-30个字符,仅字母和数字",
|
|
63
|
+
"required": "请输入用户名",
|
|
64
|
+
"minLength": "用户名必须至少包含3个字符"
|
|
65
|
+
},
|
|
66
|
+
"email": {
|
|
67
|
+
"required": "请输入电子邮件地址",
|
|
68
|
+
"invalid": "请输入有效的电子邮件地址",
|
|
69
|
+
"helper": "我们绝不会分享您的电子邮件"
|
|
70
|
+
},
|
|
71
|
+
"security": {
|
|
72
|
+
"title": "保护您的账户",
|
|
73
|
+
"subtitle": "创建强密码以保护您的账户"
|
|
74
|
+
},
|
|
75
|
+
"password": {
|
|
76
|
+
"helper": "至少8个字符",
|
|
77
|
+
"required": "请输入密码",
|
|
78
|
+
"minLength": "密码必须至少包含8个字符",
|
|
79
|
+
"confirmRequired": "请确认您的密码",
|
|
80
|
+
"mismatch": "密码不匹配",
|
|
81
|
+
"confirmHint": "重新输入您的密码以确认"
|
|
82
|
+
},
|
|
83
|
+
"summary": {
|
|
84
|
+
"title": "快完成了!",
|
|
85
|
+
"subtitle": "查看您的信息并创建账户",
|
|
86
|
+
"sectionTitle": "账户信息",
|
|
87
|
+
"fields": {
|
|
88
|
+
"username": "用户名",
|
|
89
|
+
"email": "电子邮件",
|
|
90
|
+
"password": "密码"
|
|
91
|
+
},
|
|
92
|
+
"notSet": "未设置",
|
|
93
|
+
"securityTip": "为了更强的安全性,创建账户后,请在账户设置中启用生物识别身份验证。",
|
|
94
|
+
"legalReminder": "创建账户即表示您同意我们的服务条款和隐私政策。"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"common": {
|
|
98
|
+
"actions": {
|
|
99
|
+
"back": "返回",
|
|
100
|
+
"continue": "继续",
|
|
101
|
+
"next": "下一步",
|
|
102
|
+
"getStarted": "开始",
|
|
103
|
+
"createAccount": "创建账户",
|
|
104
|
+
"signIn": "登录",
|
|
105
|
+
"verify": "验证",
|
|
106
|
+
"resetPassword": "重置密码"
|
|
107
|
+
},
|
|
108
|
+
"links": {
|
|
109
|
+
"recoverAccount": "恢复您的账户",
|
|
110
|
+
"signUp": "注册"
|
|
111
|
+
},
|
|
112
|
+
"labels": {
|
|
113
|
+
"username": "用户名",
|
|
114
|
+
"email": "电子邮件",
|
|
115
|
+
"password": "密码",
|
|
116
|
+
"confirmPassword": "确认密码"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"signin": {
|
|
3
|
+
"title": "Iniciar sessão",
|
|
4
|
+
"subtitle": "Inicie sessão para continuar",
|
|
5
|
+
"addAccountTitle": "Adicionar outra conta",
|
|
6
|
+
"addAccountSubtitle": "Iniciar sessão com outra conta",
|
|
7
|
+
"username": {
|
|
8
|
+
"label": "Nome de utilizador",
|
|
9
|
+
"placeholder": "Introduza o seu nome de utilizador",
|
|
10
|
+
"helper": "3-30 caracteres, apenas letras e números",
|
|
11
|
+
"required": "Por favor, introduza o seu nome de utilizador.",
|
|
12
|
+
"minLength": "O nome de utilizador deve ter pelo menos 3 caracteres."
|
|
13
|
+
},
|
|
14
|
+
"password": {
|
|
15
|
+
"label": "Palavra-passe",
|
|
16
|
+
"placeholder": "Introduza a sua palavra-passe",
|
|
17
|
+
"required": "Por favor, introduza a sua palavra-passe.",
|
|
18
|
+
"hint": "Introduza a sua palavra-passe para iniciar sessão"
|
|
19
|
+
},
|
|
20
|
+
"actions": {
|
|
21
|
+
"continue": "Continuar",
|
|
22
|
+
"back": "Voltar",
|
|
23
|
+
"signIn": "Iniciar sessão",
|
|
24
|
+
"verify": "Verificar",
|
|
25
|
+
"openAccountSwitcher": "Mudar para outra conta",
|
|
26
|
+
"openAccountSwitcherSubtitle": "{{count}} outras contas disponíveis",
|
|
27
|
+
"openAccountSwitcherSubtitle_singular": "1 outra conta disponível",
|
|
28
|
+
"openAccountSwitcherSubtitle_zero": "Revise as suas contas guardadas",
|
|
29
|
+
"manageAccounts": "Gerir contas guardadas",
|
|
30
|
+
"manageAccountsSubtitle": "Rever sessões, remover ou terminar sessão",
|
|
31
|
+
"loadingOtherAccounts": "A carregar outras contas…",
|
|
32
|
+
"switchAccountFailed": "Não foi possível mudar de conta. Por favor, tente novamente."
|
|
33
|
+
},
|
|
34
|
+
"forgotPrompt": "Esqueceu-se da palavra-passe?",
|
|
35
|
+
"security": {
|
|
36
|
+
"dataSecure": "Os seus dados estão encriptados e seguros"
|
|
37
|
+
},
|
|
38
|
+
"currentlySignedInAs": "Atualmente com sessão iniciada como",
|
|
39
|
+
"alreadySignedInWith": "Já tem sessão iniciada com",
|
|
40
|
+
"alreadySignedIn": "Já tem sessão iniciada",
|
|
41
|
+
"alreadySignedInMessage": "Esta conta já tem sessão iniciada. Continuar com esta conta?",
|
|
42
|
+
"continueWithAccount": "Continuar",
|
|
43
|
+
"currentAccount": "Atual",
|
|
44
|
+
"or": "ou",
|
|
45
|
+
"viewAllAccounts": "Ver mais {{count}}",
|
|
46
|
+
"status": {
|
|
47
|
+
"accountSwitched": "Agora a usar {{name}}"
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
"signup": {
|
|
51
|
+
"welcome": {
|
|
52
|
+
"title": "Bem-vindo ao Oxy!",
|
|
53
|
+
"subtitle": "Crie a sua conta em poucos passos",
|
|
54
|
+
"haveAccount": "Já tem uma conta?",
|
|
55
|
+
"signInCta": "Iniciar sessão"
|
|
56
|
+
},
|
|
57
|
+
"identity": {
|
|
58
|
+
"title": "Quem é?",
|
|
59
|
+
"subtitle": "Escolha o seu nome de utilizador e introduza o seu email"
|
|
60
|
+
},
|
|
61
|
+
"username": {
|
|
62
|
+
"helper": "3-30 caracteres, apenas letras e números",
|
|
63
|
+
"required": "Por favor, introduza um nome de utilizador",
|
|
64
|
+
"minLength": "O nome de utilizador deve ter pelo menos 3 caracteres"
|
|
65
|
+
},
|
|
66
|
+
"email": {
|
|
67
|
+
"required": "Por favor, introduza um endereço de email",
|
|
68
|
+
"invalid": "Por favor, introduza um endereço de email válido",
|
|
69
|
+
"helper": "Nunca partilharemos o seu email"
|
|
70
|
+
},
|
|
71
|
+
"security": {
|
|
72
|
+
"title": "Proteja a sua conta",
|
|
73
|
+
"subtitle": "Crie uma palavra-passe forte para proteger a sua conta"
|
|
74
|
+
},
|
|
75
|
+
"password": {
|
|
76
|
+
"helper": "Pelo menos 8 caracteres",
|
|
77
|
+
"required": "Por favor, introduza uma palavra-passe",
|
|
78
|
+
"minLength": "A palavra-passe deve ter pelo menos 8 caracteres",
|
|
79
|
+
"confirmRequired": "Por favor, confirme a sua palavra-passe",
|
|
80
|
+
"mismatch": "As palavras-passe não coincidem",
|
|
81
|
+
"confirmHint": "Reintroduza a sua palavra-passe para confirmar"
|
|
82
|
+
},
|
|
83
|
+
"summary": {
|
|
84
|
+
"title": "Quase lá!",
|
|
85
|
+
"subtitle": "Revise as suas informações e crie a sua conta",
|
|
86
|
+
"sectionTitle": "Informações da conta",
|
|
87
|
+
"fields": {
|
|
88
|
+
"username": "Nome de utilizador",
|
|
89
|
+
"email": "Email",
|
|
90
|
+
"password": "Palavra-passe"
|
|
91
|
+
},
|
|
92
|
+
"notSet": "Não definido",
|
|
93
|
+
"securityTip": "Para maior segurança, ative a autenticação biométrica nas Definições da conta após criar a sua conta.",
|
|
94
|
+
"legalReminder": "Ao criar uma conta, concorda com os nossos Termos de Serviço e Política de Privacidade."
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"common": {
|
|
98
|
+
"actions": {
|
|
99
|
+
"back": "Voltar",
|
|
100
|
+
"continue": "Continuar",
|
|
101
|
+
"next": "Seguinte",
|
|
102
|
+
"getStarted": "Começar",
|
|
103
|
+
"createAccount": "Criar conta",
|
|
104
|
+
"signIn": "Iniciar sessão",
|
|
105
|
+
"verify": "Verificar",
|
|
106
|
+
"resetPassword": "Repor palavra-passe"
|
|
107
|
+
},
|
|
108
|
+
"links": {
|
|
109
|
+
"recoverAccount": "Recuperar a sua conta",
|
|
110
|
+
"signUp": "Registar-se"
|
|
111
|
+
},
|
|
112
|
+
"labels": {
|
|
113
|
+
"username": "Nome de utilizador",
|
|
114
|
+
"email": "Email",
|
|
115
|
+
"password": "Palavra-passe",
|
|
116
|
+
"confirmPassword": "Confirmar palavra-passe"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"signin": {
|
|
3
|
+
"title": "登录",
|
|
4
|
+
"subtitle": "登录以继续",
|
|
5
|
+
"addAccountTitle": "添加另一个账户",
|
|
6
|
+
"addAccountSubtitle": "使用另一个账户登录",
|
|
7
|
+
"username": {
|
|
8
|
+
"label": "用户名",
|
|
9
|
+
"placeholder": "输入您的用户名",
|
|
10
|
+
"helper": "3-30个字符,仅字母和数字",
|
|
11
|
+
"required": "请输入您的用户名。",
|
|
12
|
+
"minLength": "用户名必须至少包含3个字符。"
|
|
13
|
+
},
|
|
14
|
+
"password": {
|
|
15
|
+
"label": "密码",
|
|
16
|
+
"placeholder": "输入您的密码",
|
|
17
|
+
"required": "请输入您的密码。",
|
|
18
|
+
"hint": "输入您的密码以登录"
|
|
19
|
+
},
|
|
20
|
+
"actions": {
|
|
21
|
+
"continue": "继续",
|
|
22
|
+
"back": "返回",
|
|
23
|
+
"signIn": "登录",
|
|
24
|
+
"verify": "验证",
|
|
25
|
+
"openAccountSwitcher": "切换到另一个账户",
|
|
26
|
+
"openAccountSwitcherSubtitle": "{{count}}个其他账户可用",
|
|
27
|
+
"openAccountSwitcherSubtitle_singular": "1个其他账户可用",
|
|
28
|
+
"openAccountSwitcherSubtitle_zero": "查看您保存的账户",
|
|
29
|
+
"manageAccounts": "管理保存的账户",
|
|
30
|
+
"manageAccountsSubtitle": "查看会话、删除或登出",
|
|
31
|
+
"loadingOtherAccounts": "加载其他账户中…",
|
|
32
|
+
"switchAccountFailed": "无法切换账户。请重试。"
|
|
33
|
+
},
|
|
34
|
+
"forgotPrompt": "忘记密码?",
|
|
35
|
+
"security": {
|
|
36
|
+
"dataSecure": "您的数据已加密且安全"
|
|
37
|
+
},
|
|
38
|
+
"currentlySignedInAs": "当前登录为",
|
|
39
|
+
"alreadySignedInWith": "已登录",
|
|
40
|
+
"alreadySignedIn": "已登录",
|
|
41
|
+
"alreadySignedInMessage": "此账户已登录。继续使用此账户?",
|
|
42
|
+
"continueWithAccount": "继续",
|
|
43
|
+
"currentAccount": "当前",
|
|
44
|
+
"or": "或",
|
|
45
|
+
"viewAllAccounts": "查看更多{{count}}个",
|
|
46
|
+
"status": {
|
|
47
|
+
"accountSwitched": "正在使用{{name}}"
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
"signup": {
|
|
51
|
+
"welcome": {
|
|
52
|
+
"title": "欢迎使用Oxy!",
|
|
53
|
+
"subtitle": "只需几步即可创建您的账户",
|
|
54
|
+
"haveAccount": "已有账户?",
|
|
55
|
+
"signInCta": "登录"
|
|
56
|
+
},
|
|
57
|
+
"identity": {
|
|
58
|
+
"title": "您是谁?",
|
|
59
|
+
"subtitle": "选择您的用户名并输入您的电子邮件"
|
|
60
|
+
},
|
|
61
|
+
"username": {
|
|
62
|
+
"helper": "3-30个字符,仅字母和数字",
|
|
63
|
+
"required": "请输入用户名",
|
|
64
|
+
"minLength": "用户名必须至少包含3个字符"
|
|
65
|
+
},
|
|
66
|
+
"email": {
|
|
67
|
+
"required": "请输入电子邮件地址",
|
|
68
|
+
"invalid": "请输入有效的电子邮件地址",
|
|
69
|
+
"helper": "我们绝不会分享您的电子邮件"
|
|
70
|
+
},
|
|
71
|
+
"security": {
|
|
72
|
+
"title": "保护您的账户",
|
|
73
|
+
"subtitle": "创建强密码以保护您的账户"
|
|
74
|
+
},
|
|
75
|
+
"password": {
|
|
76
|
+
"helper": "至少8个字符",
|
|
77
|
+
"required": "请输入密码",
|
|
78
|
+
"minLength": "密码必须至少包含8个字符",
|
|
79
|
+
"confirmRequired": "请确认您的密码",
|
|
80
|
+
"mismatch": "密码不匹配",
|
|
81
|
+
"confirmHint": "重新输入您的密码以确认"
|
|
82
|
+
},
|
|
83
|
+
"summary": {
|
|
84
|
+
"title": "快完成了!",
|
|
85
|
+
"subtitle": "查看您的信息并创建账户",
|
|
86
|
+
"sectionTitle": "账户信息",
|
|
87
|
+
"fields": {
|
|
88
|
+
"username": "用户名",
|
|
89
|
+
"email": "电子邮件",
|
|
90
|
+
"password": "密码"
|
|
91
|
+
},
|
|
92
|
+
"notSet": "未设置",
|
|
93
|
+
"securityTip": "为了更强的安全性,创建账户后,请在账户设置中启用生物识别身份验证。",
|
|
94
|
+
"legalReminder": "创建账户即表示您同意我们的服务条款和隐私政策。"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"common": {
|
|
98
|
+
"actions": {
|
|
99
|
+
"back": "返回",
|
|
100
|
+
"continue": "继续",
|
|
101
|
+
"next": "下一步",
|
|
102
|
+
"getStarted": "开始",
|
|
103
|
+
"createAccount": "创建账户",
|
|
104
|
+
"signIn": "登录",
|
|
105
|
+
"verify": "验证",
|
|
106
|
+
"resetPassword": "重置密码"
|
|
107
|
+
},
|
|
108
|
+
"links": {
|
|
109
|
+
"recoverAccount": "恢复您的账户",
|
|
110
|
+
"signUp": "注册"
|
|
111
|
+
},
|
|
112
|
+
"labels": {
|
|
113
|
+
"username": "用户名",
|
|
114
|
+
"email": "电子邮件",
|
|
115
|
+
"password": "密码",
|
|
116
|
+
"confirmPassword": "确认密码"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @oxyhq/core — OxyHQ SDK Foundation
|
|
4
|
+
*
|
|
5
|
+
* Platform-agnostic core providing API client, authentication,
|
|
6
|
+
* cryptographic identity, and shared utilities.
|
|
7
|
+
*
|
|
8
|
+
* Works in Node.js, Browser, and React Native.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { OxyServices, oxyClient } from '@oxyhq/core';
|
|
13
|
+
*
|
|
14
|
+
* const user = await oxyClient.signIn(publicKey);
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
29
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
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 = exports.initPlatformFromReactNative = exports.isAndroid = exports.isIOS = exports.isNative = exports.isWeb = exports.setPlatformOS = exports.getPlatformOS = exports.normalizeLanguageCode = exports.getNativeLanguageName = exports.getLanguageName = exports.getLanguageMetadata = exports.SUPPORTED_LANGUAGES = exports.DeviceManager = exports.RecoveryPhraseService = exports.SignatureService = exports.KeyManager = exports.createCrossDomainAuth = exports.CrossDomainAuth = exports.createAuthManager = exports.AuthManager = exports.oxyClient = exports.OXY_CLOUD_URL = exports.OxyAuthenticationTimeoutError = exports.OxyAuthenticationError = exports.OxyServices = void 0;
|
|
33
|
+
exports.logPerformance = exports.logPayment = exports.logDevice = exports.logUser = exports.logSession = exports.logApi = exports.logAuth = exports.LogLevel = exports.logger = exports.retryAsync = exports.validateRequiredFields = exports.handleHttpError = exports.createApiError = exports.ErrorCodes = exports.packageInfo = exports.sessionsArraysEqual = exports.normalizeAndSortSessions = exports.mergeSessions = exports.translate = exports.createDebugLogger = exports.debugError = exports.debugWarn = exports.debugLog = exports.isDev = exports.withRetry = exports.delay = exports.shouldAllowRequest = exports.recordSuccess = exports.recordFailure = exports.calculateBackoffInterval = void 0;
|
|
34
|
+
// Ensure crypto polyfills are loaded before anything else
|
|
35
|
+
require("./crypto/polyfill");
|
|
36
|
+
// --- Core API Client ---
|
|
37
|
+
var OxyServices_1 = require("./OxyServices");
|
|
38
|
+
Object.defineProperty(exports, "OxyServices", { enumerable: true, get: function () { return OxyServices_1.OxyServices; } });
|
|
39
|
+
Object.defineProperty(exports, "OxyAuthenticationError", { enumerable: true, get: function () { return OxyServices_1.OxyAuthenticationError; } });
|
|
40
|
+
Object.defineProperty(exports, "OxyAuthenticationTimeoutError", { enumerable: true, get: function () { return OxyServices_1.OxyAuthenticationTimeoutError; } });
|
|
41
|
+
var OxyServices_2 = require("./OxyServices");
|
|
42
|
+
Object.defineProperty(exports, "OXY_CLOUD_URL", { enumerable: true, get: function () { return OxyServices_2.OXY_CLOUD_URL; } });
|
|
43
|
+
Object.defineProperty(exports, "oxyClient", { enumerable: true, get: function () { return OxyServices_2.oxyClient; } });
|
|
44
|
+
// --- Authentication ---
|
|
45
|
+
var AuthManager_1 = require("./AuthManager");
|
|
46
|
+
Object.defineProperty(exports, "AuthManager", { enumerable: true, get: function () { return AuthManager_1.AuthManager; } });
|
|
47
|
+
Object.defineProperty(exports, "createAuthManager", { enumerable: true, get: function () { return AuthManager_1.createAuthManager; } });
|
|
48
|
+
var CrossDomainAuth_1 = require("./CrossDomainAuth");
|
|
49
|
+
Object.defineProperty(exports, "CrossDomainAuth", { enumerable: true, get: function () { return CrossDomainAuth_1.CrossDomainAuth; } });
|
|
50
|
+
Object.defineProperty(exports, "createCrossDomainAuth", { enumerable: true, get: function () { return CrossDomainAuth_1.createCrossDomainAuth; } });
|
|
51
|
+
// --- Crypto / Identity ---
|
|
52
|
+
var crypto_1 = require("./crypto");
|
|
53
|
+
Object.defineProperty(exports, "KeyManager", { enumerable: true, get: function () { return crypto_1.KeyManager; } });
|
|
54
|
+
Object.defineProperty(exports, "SignatureService", { enumerable: true, get: function () { return crypto_1.SignatureService; } });
|
|
55
|
+
Object.defineProperty(exports, "RecoveryPhraseService", { enumerable: true, get: function () { return crypto_1.RecoveryPhraseService; } });
|
|
56
|
+
// --- Models & Types ---
|
|
57
|
+
__exportStar(require("./models/interfaces"), exports);
|
|
58
|
+
__exportStar(require("./models/session"), exports);
|
|
59
|
+
// --- Device Management ---
|
|
60
|
+
var deviceManager_1 = require("./utils/deviceManager");
|
|
61
|
+
Object.defineProperty(exports, "DeviceManager", { enumerable: true, get: function () { return deviceManager_1.DeviceManager; } });
|
|
62
|
+
// --- Language Utilities ---
|
|
63
|
+
var languageUtils_1 = require("./utils/languageUtils");
|
|
64
|
+
Object.defineProperty(exports, "SUPPORTED_LANGUAGES", { enumerable: true, get: function () { return languageUtils_1.SUPPORTED_LANGUAGES; } });
|
|
65
|
+
Object.defineProperty(exports, "getLanguageMetadata", { enumerable: true, get: function () { return languageUtils_1.getLanguageMetadata; } });
|
|
66
|
+
Object.defineProperty(exports, "getLanguageName", { enumerable: true, get: function () { return languageUtils_1.getLanguageName; } });
|
|
67
|
+
Object.defineProperty(exports, "getNativeLanguageName", { enumerable: true, get: function () { return languageUtils_1.getNativeLanguageName; } });
|
|
68
|
+
Object.defineProperty(exports, "normalizeLanguageCode", { enumerable: true, get: function () { return languageUtils_1.normalizeLanguageCode; } });
|
|
69
|
+
// --- Platform Detection ---
|
|
70
|
+
var platform_1 = require("./utils/platform");
|
|
71
|
+
Object.defineProperty(exports, "getPlatformOS", { enumerable: true, get: function () { return platform_1.getPlatformOS; } });
|
|
72
|
+
Object.defineProperty(exports, "setPlatformOS", { enumerable: true, get: function () { return platform_1.setPlatformOS; } });
|
|
73
|
+
Object.defineProperty(exports, "isWeb", { enumerable: true, get: function () { return platform_1.isWeb; } });
|
|
74
|
+
Object.defineProperty(exports, "isNative", { enumerable: true, get: function () { return platform_1.isNative; } });
|
|
75
|
+
Object.defineProperty(exports, "isIOS", { enumerable: true, get: function () { return platform_1.isIOS; } });
|
|
76
|
+
Object.defineProperty(exports, "isAndroid", { enumerable: true, get: function () { return platform_1.isAndroid; } });
|
|
77
|
+
Object.defineProperty(exports, "initPlatformFromReactNative", { enumerable: true, get: function () { return platform_1.initPlatformFromReactNative; } });
|
|
78
|
+
// --- Shared Utilities ---
|
|
79
|
+
var colorUtils_1 = require("./shared/utils/colorUtils");
|
|
80
|
+
Object.defineProperty(exports, "darkenColor", { enumerable: true, get: function () { return colorUtils_1.darkenColor; } });
|
|
81
|
+
Object.defineProperty(exports, "lightenColor", { enumerable: true, get: function () { return colorUtils_1.lightenColor; } });
|
|
82
|
+
Object.defineProperty(exports, "hexToRgb", { enumerable: true, get: function () { return colorUtils_1.hexToRgb; } });
|
|
83
|
+
Object.defineProperty(exports, "rgbToHex", { enumerable: true, get: function () { return colorUtils_1.rgbToHex; } });
|
|
84
|
+
Object.defineProperty(exports, "withOpacity", { enumerable: true, get: function () { return colorUtils_1.withOpacity; } });
|
|
85
|
+
Object.defineProperty(exports, "isLightColor", { enumerable: true, get: function () { return colorUtils_1.isLightColor; } });
|
|
86
|
+
Object.defineProperty(exports, "getContrastTextColor", { enumerable: true, get: function () { return colorUtils_1.getContrastTextColor; } });
|
|
87
|
+
var themeUtils_1 = require("./shared/utils/themeUtils");
|
|
88
|
+
Object.defineProperty(exports, "normalizeTheme", { enumerable: true, get: function () { return themeUtils_1.normalizeTheme; } });
|
|
89
|
+
Object.defineProperty(exports, "normalizeColorScheme", { enumerable: true, get: function () { return themeUtils_1.normalizeColorScheme; } });
|
|
90
|
+
Object.defineProperty(exports, "getOppositeTheme", { enumerable: true, get: function () { return themeUtils_1.getOppositeTheme; } });
|
|
91
|
+
Object.defineProperty(exports, "systemPrefersDarkMode", { enumerable: true, get: function () { return themeUtils_1.systemPrefersDarkMode; } });
|
|
92
|
+
Object.defineProperty(exports, "getSystemColorScheme", { enumerable: true, get: function () { return themeUtils_1.getSystemColorScheme; } });
|
|
93
|
+
var errorUtils_1 = require("./shared/utils/errorUtils");
|
|
94
|
+
Object.defineProperty(exports, "HttpStatus", { enumerable: true, get: function () { return errorUtils_1.HttpStatus; } });
|
|
95
|
+
Object.defineProperty(exports, "getErrorStatus", { enumerable: true, get: function () { return errorUtils_1.getErrorStatus; } });
|
|
96
|
+
Object.defineProperty(exports, "getErrorMessage", { enumerable: true, get: function () { return errorUtils_1.getErrorMessage; } });
|
|
97
|
+
Object.defineProperty(exports, "isAlreadyRegisteredError", { enumerable: true, get: function () { return errorUtils_1.isAlreadyRegisteredError; } });
|
|
98
|
+
Object.defineProperty(exports, "isUnauthorizedError", { enumerable: true, get: function () { return errorUtils_1.isUnauthorizedError; } });
|
|
99
|
+
Object.defineProperty(exports, "isForbiddenError", { enumerable: true, get: function () { return errorUtils_1.isForbiddenError; } });
|
|
100
|
+
Object.defineProperty(exports, "isNotFoundError", { enumerable: true, get: function () { return errorUtils_1.isNotFoundError; } });
|
|
101
|
+
Object.defineProperty(exports, "isRateLimitError", { enumerable: true, get: function () { return errorUtils_1.isRateLimitError; } });
|
|
102
|
+
Object.defineProperty(exports, "isServerError", { enumerable: true, get: function () { return errorUtils_1.isServerError; } });
|
|
103
|
+
Object.defineProperty(exports, "isNetworkError", { enumerable: true, get: function () { return errorUtils_1.isNetworkError; } });
|
|
104
|
+
Object.defineProperty(exports, "isRetryableError", { enumerable: true, get: function () { return errorUtils_1.isRetryableError; } });
|
|
105
|
+
var networkUtils_1 = require("./shared/utils/networkUtils");
|
|
106
|
+
Object.defineProperty(exports, "DEFAULT_CIRCUIT_BREAKER_CONFIG", { enumerable: true, get: function () { return networkUtils_1.DEFAULT_CIRCUIT_BREAKER_CONFIG; } });
|
|
107
|
+
Object.defineProperty(exports, "createCircuitBreakerState", { enumerable: true, get: function () { return networkUtils_1.createCircuitBreakerState; } });
|
|
108
|
+
Object.defineProperty(exports, "calculateBackoffInterval", { enumerable: true, get: function () { return networkUtils_1.calculateBackoffInterval; } });
|
|
109
|
+
Object.defineProperty(exports, "recordFailure", { enumerable: true, get: function () { return networkUtils_1.recordFailure; } });
|
|
110
|
+
Object.defineProperty(exports, "recordSuccess", { enumerable: true, get: function () { return networkUtils_1.recordSuccess; } });
|
|
111
|
+
Object.defineProperty(exports, "shouldAllowRequest", { enumerable: true, get: function () { return networkUtils_1.shouldAllowRequest; } });
|
|
112
|
+
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return networkUtils_1.delay; } });
|
|
113
|
+
Object.defineProperty(exports, "withRetry", { enumerable: true, get: function () { return networkUtils_1.withRetry; } });
|
|
114
|
+
var debugUtils_1 = require("./shared/utils/debugUtils");
|
|
115
|
+
Object.defineProperty(exports, "isDev", { enumerable: true, get: function () { return debugUtils_1.isDev; } });
|
|
116
|
+
Object.defineProperty(exports, "debugLog", { enumerable: true, get: function () { return debugUtils_1.debugLog; } });
|
|
117
|
+
Object.defineProperty(exports, "debugWarn", { enumerable: true, get: function () { return debugUtils_1.debugWarn; } });
|
|
118
|
+
Object.defineProperty(exports, "debugError", { enumerable: true, get: function () { return debugUtils_1.debugError; } });
|
|
119
|
+
Object.defineProperty(exports, "createDebugLogger", { enumerable: true, get: function () { return debugUtils_1.createDebugLogger; } });
|
|
120
|
+
// --- i18n ---
|
|
121
|
+
var i18n_1 = require("./i18n");
|
|
122
|
+
Object.defineProperty(exports, "translate", { enumerable: true, get: function () { return i18n_1.translate; } });
|
|
123
|
+
// --- Session Utilities ---
|
|
124
|
+
var sessionUtils_1 = require("./utils/sessionUtils");
|
|
125
|
+
Object.defineProperty(exports, "mergeSessions", { enumerable: true, get: function () { return sessionUtils_1.mergeSessions; } });
|
|
126
|
+
Object.defineProperty(exports, "normalizeAndSortSessions", { enumerable: true, get: function () { return sessionUtils_1.normalizeAndSortSessions; } });
|
|
127
|
+
Object.defineProperty(exports, "sessionsArraysEqual", { enumerable: true, get: function () { return sessionUtils_1.sessionsArraysEqual; } });
|
|
128
|
+
// --- Constants ---
|
|
129
|
+
var version_1 = require("./constants/version");
|
|
130
|
+
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return version_1.packageInfo; } });
|
|
131
|
+
// --- API & Error Utilities ---
|
|
132
|
+
__exportStar(require("./utils/apiUtils"), exports);
|
|
133
|
+
var errorUtils_2 = require("./utils/errorUtils");
|
|
134
|
+
Object.defineProperty(exports, "ErrorCodes", { enumerable: true, get: function () { return errorUtils_2.ErrorCodes; } });
|
|
135
|
+
Object.defineProperty(exports, "createApiError", { enumerable: true, get: function () { return errorUtils_2.createApiError; } });
|
|
136
|
+
Object.defineProperty(exports, "handleHttpError", { enumerable: true, get: function () { return errorUtils_2.handleHttpError; } });
|
|
137
|
+
Object.defineProperty(exports, "validateRequiredFields", { enumerable: true, get: function () { return errorUtils_2.validateRequiredFields; } });
|
|
138
|
+
var asyncUtils_1 = require("./utils/asyncUtils");
|
|
139
|
+
Object.defineProperty(exports, "retryAsync", { enumerable: true, get: function () { return asyncUtils_1.retryAsync; } });
|
|
140
|
+
__exportStar(require("./utils/validationUtils"), exports);
|
|
141
|
+
var loggerUtils_1 = require("./utils/loggerUtils");
|
|
142
|
+
Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return loggerUtils_1.logger; } });
|
|
143
|
+
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return loggerUtils_1.LogLevel; } });
|
|
144
|
+
Object.defineProperty(exports, "logAuth", { enumerable: true, get: function () { return loggerUtils_1.logAuth; } });
|
|
145
|
+
Object.defineProperty(exports, "logApi", { enumerable: true, get: function () { return loggerUtils_1.logApi; } });
|
|
146
|
+
Object.defineProperty(exports, "logSession", { enumerable: true, get: function () { return loggerUtils_1.logSession; } });
|
|
147
|
+
Object.defineProperty(exports, "logUser", { enumerable: true, get: function () { return loggerUtils_1.logUser; } });
|
|
148
|
+
Object.defineProperty(exports, "logDevice", { enumerable: true, get: function () { return loggerUtils_1.logDevice; } });
|
|
149
|
+
Object.defineProperty(exports, "logPayment", { enumerable: true, get: function () { return loggerUtils_1.logPayment; } });
|
|
150
|
+
Object.defineProperty(exports, "logPerformance", { enumerable: true, get: function () { return loggerUtils_1.logPerformance; } });
|
|
151
|
+
// Default export
|
|
152
|
+
const OxyServices_3 = require("./OxyServices");
|
|
153
|
+
exports.default = OxyServices_3.OxyServices;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OxyServicesAnalyticsMixin = OxyServicesAnalyticsMixin;
|
|
4
|
+
const mixinHelpers_1 = require("./mixinHelpers");
|
|
5
|
+
function OxyServicesAnalyticsMixin(Base) {
|
|
6
|
+
return class extends Base {
|
|
7
|
+
constructor(...args) {
|
|
8
|
+
super(...args);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Track an analytics event
|
|
12
|
+
* @param eventName - Name of the event to track
|
|
13
|
+
* @param properties - Optional event properties
|
|
14
|
+
*/
|
|
15
|
+
async trackEvent(eventName, properties) {
|
|
16
|
+
try {
|
|
17
|
+
await this.makeRequest('POST', '/api/analytics/events', {
|
|
18
|
+
event: eventName,
|
|
19
|
+
properties
|
|
20
|
+
}, { cache: false, retry: false }); // Don't retry analytics events
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
throw this.handleError(error);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get analytics data for a date range
|
|
28
|
+
* @param startDate - Optional start date (ISO string)
|
|
29
|
+
* @param endDate - Optional end date (ISO string)
|
|
30
|
+
* @returns Analytics data
|
|
31
|
+
*/
|
|
32
|
+
async getAnalytics(startDate, endDate) {
|
|
33
|
+
try {
|
|
34
|
+
const params = {};
|
|
35
|
+
if (startDate)
|
|
36
|
+
params.startDate = startDate;
|
|
37
|
+
if (endDate)
|
|
38
|
+
params.endDate = endDate;
|
|
39
|
+
return await this.makeRequest('GET', '/api/analytics', params, {
|
|
40
|
+
cache: true,
|
|
41
|
+
cacheTTL: mixinHelpers_1.CACHE_TIMES.LONG,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
throw this.handleError(error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|