@huyooo/ui 0.8.5 → 0.9.3

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 (46) hide show
  1. package/dist/{AuthkitAuthModal-DPf1AlaQ.js → AuthkitAuthModal-DTp9ezGF.js} +6 -6
  2. package/dist/{AuthkitSignInPhone-CWzkKKL0.js → AuthkitSignInPhone-BtF8EKsU.js} +3 -3
  3. package/dist/{Clipboard-D9v7JOBm.js → Clipboard-0N-MKzqm.js} +1 -1
  4. package/dist/{Contact-ytZiAQRw.js → Contact-D6GPPI8o.js} +2 -2
  5. package/dist/{FeedbackItem-i0oANWbH.js → FeedbackItem-Btw2or6g.js} +3 -3
  6. package/dist/{FeedbackModal-DHWN4Jhy.js → FeedbackModal-CVQQ2O8N.js} +4 -4
  7. package/dist/Menu-DBM4qGP_.js +167 -0
  8. package/dist/{MessageHandle-42tZkEyh.js → MessageHandle-DpBexctb.js} +3 -3
  9. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-Dt5A9Six.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-DsBT6Bms.js} +2 -2
  10. package/dist/{PaySubscriptions-CX3DhX82.js → PaySubscriptions-BnV62kZT.js} +2 -2
  11. package/dist/{ReferrerReferees-CdAsYLZl.js → ReferrerReferees-B2rVAc7y.js} +4 -4
  12. package/dist/{Upload.vue_vue_type_script_setup_true_lang-7AFuqo0A.js → Upload.vue_vue_type_script_setup_true_lang-CzOKd9iz.js} +1 -1
  13. package/dist/{UserAccountMenu-DBVdpUn8.js → UserAccountMenu-CAG_zxWb.js} +7 -7
  14. package/dist/{WidthContainer-CFNPAWZ8.js → WidthContainer-_vCYXka6.js} +8 -8
  15. package/dist/apiClients-B0ARoiN3.js +191 -0
  16. package/dist/authkit.js +6 -6
  17. package/dist/common/globalConfig.d.ts +15 -3
  18. package/dist/common.js +2 -2
  19. package/dist/composables.js +9 -9
  20. package/dist/feedback.js +3 -3
  21. package/dist/index.js +25 -25
  22. package/dist/message.js +3 -3
  23. package/dist/pay.js +1 -1
  24. package/dist/privateCom.js +1 -1
  25. package/dist/referrer.js +1 -1
  26. package/dist/style.css +1 -1
  27. package/dist/types/api/ai.generated.d.ts +1843 -0
  28. package/dist/types/api/auth.generated.d.ts +134 -117
  29. package/dist/types/api/billing.generated.d.ts +37 -0
  30. package/dist/types/api/log.generated.d.ts +1017 -0
  31. package/dist/types/api/ones.generated.d.ts +741 -3730
  32. package/dist/types/api/webhook.generated.d.ts +321 -0
  33. package/dist/upload.js +2 -2
  34. package/dist/{useAuthkitAppsAuthPageInfo-Bb7RIaTy.js → useAuthkitAppsAuthPageInfo-DZ53lPr0.js} +1 -1
  35. package/dist/{useAuthkitCreateAndUpdate-DXdMyzQQ.js → useAuthkitCreateAndUpdate-C7NaHnDj.js} +1 -1
  36. package/dist/{useAuthkitUsersProfile-4plbUlY5.js → useAuthkitUsersProfile-DkDg2EYG.js} +1 -1
  37. package/dist/{useDownloads-gcrEJA6i.js → useDownloads-CvcHx4gM.js} +1 -1
  38. package/dist/{useMessageNotifications-Bph752i8.js → useMessageNotifications-BhTNNEib.js} +1 -1
  39. package/dist/{useSEO-D1NT53Rv.js → useSEO-DxAohN0h.js} +2 -2
  40. package/dist/{useTableHandle-DrYIPjL5.js → useTableHandle-DkqiT-qL.js} +1 -1
  41. package/dist/{useUploadCos-F3oBTo2B.js → useUploadCos-D51-yXoX.js} +1 -1
  42. package/dist/user.js +1 -1
  43. package/dist/utils/apiClients.d.ts +8 -2
  44. package/package.json +7 -4
  45. package/dist/Menu-H-LxepvQ.js +0 -166
  46. package/dist/apiClients-myKy30Xh.js +0 -167
@@ -1,167 +0,0 @@
1
- import { eden as u, defineMiddleware as i, createClient as f } from "@vafast/api-client";
2
- /* empty css */
3
- import { Message as m } from "@arco-design/web-vue";
4
- import { ref as w } from "vue";
5
- function P(e) {
6
- return u(e);
7
- }
8
- function A(e) {
9
- return u(e);
10
- }
11
- function U(e) {
12
- return u(e);
13
- }
14
- let o = {
15
- appId: "",
16
- onesPrefixUrl: "/restfulApi",
17
- authPrefixUrl: "",
18
- billingPrefixUrl: "/billingRestfulApi",
19
- oauthCallbackUrl: "",
20
- avatarBucketId: "68350c206888f565dc7d09e9",
21
- feedbackBucketId: "6826e4db6888f565dc775dce",
22
- bucket: "ones-1358549778",
23
- region: "ap-beijing",
24
- web3formsAccessKey: "72604aac-d55e-4df0-9bcf-31b2206b3753"
25
- }, y = {};
26
- function z(e) {
27
- Object.assign(y, e);
28
- }
29
- function X(e) {
30
- o.appId = e.appId, o.authPrefixUrl = e.authPrefixUrl || "/authRestfulApi", e.onesPrefixUrl !== void 0 && (o.onesPrefixUrl = e.onesPrefixUrl), e.billingPrefixUrl !== void 0 && (o.billingPrefixUrl = e.billingPrefixUrl), e.oauthCallbackUrl !== void 0 ? o.oauthCallbackUrl = e.oauthCallbackUrl : typeof window < "u" && (o.oauthCallbackUrl = `${window.location.origin}/auth/callback`), e.avatarBucketId !== void 0 && (o.avatarBucketId = e.avatarBucketId), e.feedbackBucketId !== void 0 && (o.feedbackBucketId = e.feedbackBucketId), e.bucket !== void 0 && (o.bucket = e.bucket), e.region !== void 0 && (o.region = e.region), e.web3formsAccessKey !== void 0 && (o.web3formsAccessKey = e.web3formsAccessKey);
31
- }
32
- function q(e, t = 3) {
33
- const r = e.indexOf("@");
34
- if (r > 1) {
35
- const s = e.slice(0, t), a = e.slice(r);
36
- return s + "***" + a;
37
- }
38
- return e;
39
- }
40
- function E() {
41
- try {
42
- localStorage.removeItem("jwtToken"), localStorage.removeItem("refreshToken");
43
- } catch (e) {
44
- console.warn("Failed to clear localStorage:", e);
45
- }
46
- }
47
- function R() {
48
- try {
49
- return localStorage.getItem("refreshToken");
50
- } catch (e) {
51
- return console.warn("Failed to get refreshToken from localStorage:", e), null;
52
- }
53
- }
54
- function v(e) {
55
- try {
56
- localStorage.setItem("jwtToken", e);
57
- } catch (t) {
58
- console.warn("Failed to update jwtToken in localStorage:", t);
59
- }
60
- }
61
- const S = w(!1);
62
- function x() {
63
- return {
64
- show: S
65
- };
66
- }
67
- const I = 40101, j = {
68
- LOGIN_EXPIRED: "登录已过期,请重新登录"
69
- };
70
- let l = !1, c = [];
71
- function b(e, t = null) {
72
- c.forEach(({
73
- resolve: r,
74
- reject: s
75
- }) => {
76
- e ? s(e) : t && r(t);
77
- }), c = [];
78
- }
79
- async function B() {
80
- const e = R();
81
- if (!e)
82
- throw new Error("No refresh token available");
83
- try {
84
- const r = await (await fetch(`${o.authPrefixUrl}/auth/refresh`, {
85
- method: "POST",
86
- headers: {
87
- "Content-Type": "application/json",
88
- "app-id": o.appId
89
- },
90
- body: JSON.stringify({
91
- refreshToken: e
92
- })
93
- })).json();
94
- if (r.jwtToken)
95
- return v(r.jwtToken), r.refreshToken && localStorage.setItem("refreshToken", r.refreshToken), r.jwtToken;
96
- throw new Error(r.message || "Token refresh failed");
97
- } catch (t) {
98
- throw console.error("Token refresh failed:", t), t;
99
- }
100
- }
101
- const d = i(async (e, t) => (e.headers.set("app-id", o.appId), t()), {
102
- name: "app-id"
103
- }), h = i(async (e, t) => {
104
- const r = localStorage.getItem("jwtToken");
105
- return r && e.headers.set("authorization", `Bearer ${r}`), t();
106
- }, {
107
- name: "token"
108
- }), k = i(async (e, t) => {
109
- var s;
110
- const r = await t();
111
- if (((s = r.error) == null ? void 0 : s.code) === I) {
112
- if (l)
113
- return new Promise((a, n) => {
114
- c.push({
115
- resolve: async (g) => {
116
- e.headers.set("authorization", `Bearer ${g}`);
117
- const T = await t();
118
- a(T);
119
- },
120
- reject: () => {
121
- n(r);
122
- }
123
- });
124
- });
125
- l = !0;
126
- try {
127
- const a = await B();
128
- return b(null, a), e.headers.set("authorization", `Bearer ${a}`), await t();
129
- } catch (a) {
130
- b(a, null), E();
131
- const {
132
- show: n
133
- } = x();
134
- return n.value = !0, m.error(j.LOGIN_EXPIRED), r;
135
- } finally {
136
- l = !1;
137
- }
138
- }
139
- return r;
140
- }, {
141
- name: "token-refresh"
142
- }), p = i(async (e, t) => {
143
- const r = await t();
144
- return r.error && r.error.code !== I && m.error(r.error.message || "请求失败"), r;
145
- }, {
146
- name: "error-message"
147
- }), O = {
148
- baseURL: "/billingRestfulApi",
149
- timeout: 3e4
150
- }, _ = {
151
- baseURL: "/restfulApi",
152
- timeout: 3e4
153
- }, M = {
154
- baseURL: "/authRestfulApi",
155
- timeout: 3e4
156
- }, L = f(O).use(d).use(h).use(k).use(p), N = f(_).use(d).use(h).use(k).use(p), $ = f(M).use(d).use(h).use(k).use(p), J = A(L), C = U(N), H = P($);
157
- export {
158
- y as a,
159
- z as b,
160
- H as c,
161
- J as d,
162
- o as g,
163
- q as h,
164
- C as o,
165
- X as s,
166
- x as u
167
- };