@neuctra/authix 1.0.19 → 1.0.20
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/dist/neuctra-authix.es.js +115 -124
- package/dist/neuctra-authix.umd.js +1 -1
- package/dist/src/sdk/index.d.ts +17 -77
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import At, { forwardRef as zt, createElement as Ge, useState as O, useEffect as ie, useRef as dt } from "react";
|
|
2
2
|
function _t(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
@@ -16,7 +16,7 @@ function ur(e) {
|
|
|
16
16
|
let t;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && $t(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const pr = Me("string"), te = Me("function"), Ut = Me("number"), Te = (e) => e !== null && typeof e == "object", fr = (e) => e === !0 || e === !1,
|
|
19
|
+
const pr = Me("string"), te = Me("function"), Ut = Me("number"), Te = (e) => e !== null && typeof e == "object", fr = (e) => e === !0 || e === !1, ze = (e) => {
|
|
20
20
|
if (Le(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const t = st(e);
|
|
@@ -65,7 +65,7 @@ const pe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
65
65
|
function Ze() {
|
|
66
66
|
const { caseless: e, skipUndefined: t } = Ft(this) && this || {}, r = {}, s = (o, i) => {
|
|
67
67
|
const a = e && Dt(r, i) || i;
|
|
68
|
-
|
|
68
|
+
ze(r[a]) && ze(o) ? r[a] = Ze(r[a], o) : ze(o) ? r[a] = Ze({}, o) : we(o) ? r[a] = o.slice() : (!t || !ye(o)) && (r[a] = o);
|
|
69
69
|
};
|
|
70
70
|
for (let o = 0, i = arguments.length; o < i; o++)
|
|
71
71
|
arguments[o] && Re(arguments[o], s);
|
|
@@ -91,7 +91,7 @@ const Tr = (e, t, r, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
91
91
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
92
92
|
const s = e.indexOf(t, r);
|
|
93
93
|
return s !== -1 && s === r;
|
|
94
|
-
},
|
|
94
|
+
}, Ar = (e) => {
|
|
95
95
|
if (!e) return null;
|
|
96
96
|
if (we(e)) return e;
|
|
97
97
|
let t = e.length;
|
|
@@ -100,7 +100,7 @@ const Tr = (e, t, r, { allOwnKeys: s } = {}) => (Re(t, (o, i) => {
|
|
|
100
100
|
for (; t-- > 0; )
|
|
101
101
|
r[t] = e[t];
|
|
102
102
|
return r;
|
|
103
|
-
},
|
|
103
|
+
}, zr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && st(Uint8Array)), _r = (e, t) => {
|
|
104
104
|
const s = (e && e[Fe]).call(e);
|
|
105
105
|
let o;
|
|
106
106
|
for (; (o = s.next()) && !o.done; ) {
|
|
@@ -187,7 +187,7 @@ const qr = (e) => {
|
|
|
187
187
|
isNumber: Ut,
|
|
188
188
|
isBoolean: fr,
|
|
189
189
|
isObject: Te,
|
|
190
|
-
isPlainObject:
|
|
190
|
+
isPlainObject: ze,
|
|
191
191
|
isEmptyObject: xr,
|
|
192
192
|
isReadableStream: vr,
|
|
193
193
|
isRequest: Sr,
|
|
@@ -201,7 +201,7 @@ const qr = (e) => {
|
|
|
201
201
|
isFunction: te,
|
|
202
202
|
isStream: br,
|
|
203
203
|
isURLSearchParams: jr,
|
|
204
|
-
isTypedArray:
|
|
204
|
+
isTypedArray: zr,
|
|
205
205
|
isFileList: yr,
|
|
206
206
|
forEach: Re,
|
|
207
207
|
merge: Ze,
|
|
@@ -213,7 +213,7 @@ const qr = (e) => {
|
|
|
213
213
|
kindOf: Le,
|
|
214
214
|
kindOfTest: oe,
|
|
215
215
|
endsWith: Or,
|
|
216
|
-
toArray:
|
|
216
|
+
toArray: Ar,
|
|
217
217
|
forEachEntry: _r,
|
|
218
218
|
matchAll: Nr,
|
|
219
219
|
isHTMLForm: $r,
|
|
@@ -336,11 +336,11 @@ function Be(e, t, r) {
|
|
|
336
336
|
if (p.endsWith(b, "{}"))
|
|
337
337
|
b = s ? b : b.slice(0, -2), d = JSON.stringify(d);
|
|
338
338
|
else if (p.isArray(d) && Xr(d) || (p.isFileList(d) || p.endsWith(b, "[]")) && (L = p.toArray(d)))
|
|
339
|
-
return b = qt(b), L.forEach(function(
|
|
340
|
-
!(p.isUndefined(
|
|
339
|
+
return b = qt(b), L.forEach(function(A, k) {
|
|
340
|
+
!(p.isUndefined(A) || A === null) && t.append(
|
|
341
341
|
// eslint-disable-next-line no-nested-ternary
|
|
342
342
|
a === !0 ? pt([b], k, i) : a === null ? b : b + "[]",
|
|
343
|
-
c(
|
|
343
|
+
c(A)
|
|
344
344
|
);
|
|
345
345
|
}), !1;
|
|
346
346
|
}
|
|
@@ -1034,13 +1034,13 @@ const Zt = (e) => {
|
|
|
1034
1034
|
function L() {
|
|
1035
1035
|
if (!g)
|
|
1036
1036
|
return;
|
|
1037
|
-
const
|
|
1037
|
+
const A = re.from(
|
|
1038
1038
|
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
1039
1039
|
), M = {
|
|
1040
1040
|
data: !l || l === "text" || l === "json" ? g.responseText : g.response,
|
|
1041
1041
|
status: g.status,
|
|
1042
1042
|
statusText: g.statusText,
|
|
1043
|
-
headers:
|
|
1043
|
+
headers: A,
|
|
1044
1044
|
config: e,
|
|
1045
1045
|
request: g
|
|
1046
1046
|
};
|
|
@@ -1068,8 +1068,8 @@ const Zt = (e) => {
|
|
|
1068
1068
|
)), g = null;
|
|
1069
1069
|
}, i === void 0 && a.setContentType(null), "setRequestHeader" in g && p.forEach(a.toJSON(), function(k, M) {
|
|
1070
1070
|
g.setRequestHeader(M, k);
|
|
1071
|
-
}), p.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), c && ([T, d] = De(c, !0), g.addEventListener("progress", T)), h && g.upload && ([y, S] = De(h), g.upload.addEventListener("progress", y), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (u = (
|
|
1072
|
-
g && (s(!
|
|
1071
|
+
}), p.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), c && ([T, d] = De(c, !0), g.addEventListener("progress", T)), h && g.upload && ([y, S] = De(h), g.upload.addEventListener("progress", y), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (u = (A) => {
|
|
1072
|
+
g && (s(!A || A.type ? new je(null, e, g) : A), g.abort(), g = null);
|
|
1073
1073
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1074
1074
|
const $ = yn(o.url);
|
|
1075
1075
|
if ($ && ee.protocols.indexOf($) === -1) {
|
|
@@ -1170,7 +1170,7 @@ const Zt = (e) => {
|
|
|
1170
1170
|
} catch {
|
|
1171
1171
|
return !1;
|
|
1172
1172
|
}
|
|
1173
|
-
},
|
|
1173
|
+
}, An = (e) => {
|
|
1174
1174
|
e = p.merge.call({
|
|
1175
1175
|
skipUndefined: !0
|
|
1176
1176
|
}, On, e);
|
|
@@ -1222,7 +1222,7 @@ const Zt = (e) => {
|
|
|
1222
1222
|
method: g,
|
|
1223
1223
|
data: L,
|
|
1224
1224
|
signal: $,
|
|
1225
|
-
cancelToken:
|
|
1225
|
+
cancelToken: A,
|
|
1226
1226
|
timeout: k,
|
|
1227
1227
|
onDownloadProgress: M,
|
|
1228
1228
|
onUploadProgress: m,
|
|
@@ -1232,7 +1232,7 @@ const Zt = (e) => {
|
|
|
1232
1232
|
fetchOptions: K
|
|
1233
1233
|
} = Zt(d), F = t || fetch;
|
|
1234
1234
|
N = N ? (N + "").toLowerCase() : "text";
|
|
1235
|
-
let V = Tn([$,
|
|
1235
|
+
let V = Tn([$, A && A.toAbortSignal()], k), Z = null;
|
|
1236
1236
|
const E = V && V.unsubscribe && (() => {
|
|
1237
1237
|
V.unsubscribe();
|
|
1238
1238
|
});
|
|
@@ -1253,7 +1253,7 @@ const Zt = (e) => {
|
|
|
1253
1253
|
}
|
|
1254
1254
|
}
|
|
1255
1255
|
p.isString(D) || (D = D ? "include" : "omit");
|
|
1256
|
-
const q = i && "credentials" in r.prototype,
|
|
1256
|
+
const q = i && "credentials" in r.prototype, z = {
|
|
1257
1257
|
...K,
|
|
1258
1258
|
signal: V,
|
|
1259
1259
|
method: g.toUpperCase(),
|
|
@@ -1262,8 +1262,8 @@ const Zt = (e) => {
|
|
|
1262
1262
|
duplex: "half",
|
|
1263
1263
|
credentials: q ? D : void 0
|
|
1264
1264
|
};
|
|
1265
|
-
Z = i && new r(b,
|
|
1266
|
-
let R = await (i ? F(Z, K) : F(b,
|
|
1265
|
+
Z = i && new r(b, z);
|
|
1266
|
+
let R = await (i ? F(Z, K) : F(b, z));
|
|
1267
1267
|
const Y = u && (N === "stream" || N === "response");
|
|
1268
1268
|
if (u && (M || Y && E)) {
|
|
1269
1269
|
const C = {};
|
|
@@ -1302,16 +1302,16 @@ const Zt = (e) => {
|
|
|
1302
1302
|
) : U.from(q, q && q.code, d, Z);
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
|
-
},
|
|
1305
|
+
}, zn = /* @__PURE__ */ new Map(), Qt = (e) => {
|
|
1306
1306
|
let t = e ? e.env : {};
|
|
1307
1307
|
const { fetch: r, Request: s, Response: o } = t, i = [
|
|
1308
1308
|
s,
|
|
1309
1309
|
o,
|
|
1310
1310
|
r
|
|
1311
1311
|
];
|
|
1312
|
-
let a = i.length, l = a, h, c, u =
|
|
1312
|
+
let a = i.length, l = a, h, c, u = zn;
|
|
1313
1313
|
for (; l--; )
|
|
1314
|
-
h = i[l], c = u.get(h), c === void 0 && u.set(h, c = l ? /* @__PURE__ */ new Map() :
|
|
1314
|
+
h = i[l], c = u.get(h), c === void 0 && u.set(h, c = l ? /* @__PURE__ */ new Map() : An(t)), u = c;
|
|
1315
1315
|
return c;
|
|
1316
1316
|
};
|
|
1317
1317
|
Qt();
|
|
@@ -1776,38 +1776,29 @@ class co {
|
|
|
1776
1776
|
* 🌐 Universal request helper with structured responses and error handling
|
|
1777
1777
|
* @param method HTTP method (GET, POST, PUT, DELETE)
|
|
1778
1778
|
* @param path API endpoint path
|
|
1779
|
-
* @param data
|
|
1780
|
-
* @param extraHeaders
|
|
1779
|
+
* @param data Optional request body
|
|
1780
|
+
* @param extraHeaders Optional custom headers
|
|
1781
1781
|
*/
|
|
1782
1782
|
async request(t, r, s, o = {}) {
|
|
1783
|
-
if (!t)
|
|
1784
|
-
if (!r)
|
|
1783
|
+
if (!t) throw new Error("HTTP method is required");
|
|
1784
|
+
if (!r) throw new Error("Request path is required");
|
|
1785
1785
|
try {
|
|
1786
1786
|
const i = {
|
|
1787
1787
|
...this.appId ? { appId: this.appId } : {},
|
|
1788
1788
|
...s || {}
|
|
1789
1789
|
};
|
|
1790
|
-
return {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
headers: o
|
|
1797
|
-
})).data,
|
|
1798
|
-
message: "Request completed successfully"
|
|
1799
|
-
};
|
|
1790
|
+
return (await this.client.request({
|
|
1791
|
+
url: r,
|
|
1792
|
+
method: t,
|
|
1793
|
+
data: i,
|
|
1794
|
+
headers: o
|
|
1795
|
+
})).data;
|
|
1800
1796
|
} catch (i) {
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
message: `Request failed: ${i.response.data?.message || i.response.statusText || "Server returned an error"}`
|
|
1807
|
-
} : {
|
|
1808
|
-
success: !1,
|
|
1809
|
-
message: `Unexpected error: ${i.message || "Something went wrong"}`
|
|
1810
|
-
};
|
|
1797
|
+
if (console.error("❌ [Request Error]:", i), i.isAxiosError) {
|
|
1798
|
+
const a = i.response?.status || 0, l = i.response?.data?.message || i.message || "Unknown Axios error occurred";
|
|
1799
|
+
throw new Error(`Request failed (${a}): ${l}`);
|
|
1800
|
+
}
|
|
1801
|
+
throw new Error(`Unexpected error: ${i.message || "Unknown failure"}`);
|
|
1811
1802
|
}
|
|
1812
1803
|
}
|
|
1813
1804
|
// ================= USERS =================
|
|
@@ -2000,7 +1991,7 @@ class co {
|
|
|
2000
1991
|
return this.request("DELETE", `/users/${r}/data/${s}`);
|
|
2001
1992
|
}
|
|
2002
1993
|
}
|
|
2003
|
-
var
|
|
1994
|
+
var Ae = { exports: {} }, ke = {};
|
|
2004
1995
|
/**
|
|
2005
1996
|
* @license React
|
|
2006
1997
|
* react-jsx-runtime.production.js
|
|
@@ -2070,7 +2061,7 @@ function Ln() {
|
|
|
2070
2061
|
), f.$$typeof) {
|
|
2071
2062
|
case d:
|
|
2072
2063
|
return "Portal";
|
|
2073
|
-
case
|
|
2064
|
+
case A:
|
|
2074
2065
|
return (f.displayName || "Context") + ".Provider";
|
|
2075
2066
|
case $:
|
|
2076
2067
|
return (f._context.displayName || "Context") + ".Consumer";
|
|
@@ -2236,7 +2227,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2236
2227
|
function y(f) {
|
|
2237
2228
|
typeof f == "object" && f !== null && f.$$typeof === S && f._store && (f._store.validated = 1);
|
|
2238
2229
|
}
|
|
2239
|
-
var T =
|
|
2230
|
+
var T = At, S = Symbol.for("react.transitional.element"), d = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), $ = Symbol.for("react.consumer"), A = Symbol.for("react.context"), k = Symbol.for("react.forward_ref"), M = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), N = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), F = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, Z = Array.isArray, E = console.createTask ? console.createTask : function() {
|
|
2240
2231
|
return null;
|
|
2241
2232
|
};
|
|
2242
2233
|
T = {
|
|
@@ -2244,7 +2235,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2244
2235
|
return f();
|
|
2245
2236
|
}
|
|
2246
2237
|
};
|
|
2247
|
-
var J, q = {},
|
|
2238
|
+
var J, q = {}, z = T.react_stack_bottom_frame.bind(
|
|
2248
2239
|
T,
|
|
2249
2240
|
i
|
|
2250
2241
|
)(), R = E(s(i)), Y = {};
|
|
@@ -2257,7 +2248,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2257
2248
|
!1,
|
|
2258
2249
|
P,
|
|
2259
2250
|
x,
|
|
2260
|
-
j ? Error("react-stack-top-frame") :
|
|
2251
|
+
j ? Error("react-stack-top-frame") : z,
|
|
2261
2252
|
j ? E(s(f)) : R
|
|
2262
2253
|
);
|
|
2263
2254
|
}, Ee.jsxs = function(f, C, _, P, x) {
|
|
@@ -2269,7 +2260,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2269
2260
|
!0,
|
|
2270
2261
|
P,
|
|
2271
2262
|
x,
|
|
2272
|
-
j ? Error("react-stack-top-frame") :
|
|
2263
|
+
j ? Error("react-stack-top-frame") : z,
|
|
2273
2264
|
j ? E(s(f)) : R
|
|
2274
2265
|
);
|
|
2275
2266
|
};
|
|
@@ -2277,7 +2268,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
2277
2268
|
}
|
|
2278
2269
|
var It;
|
|
2279
2270
|
function Mn() {
|
|
2280
|
-
return It || (It = 1, process.env.NODE_ENV === "production" ?
|
|
2271
|
+
return It || (It = 1, process.env.NODE_ENV === "production" ? Ae.exports = Fn() : Ae.exports = Ln()), Ae.exports;
|
|
2281
2272
|
}
|
|
2282
2273
|
var n = Mn();
|
|
2283
2274
|
const Bn = async (e, t) => {
|
|
@@ -2375,7 +2366,7 @@ var Vn = {
|
|
|
2375
2366
|
* This source code is licensed under the ISC license.
|
|
2376
2367
|
* See the LICENSE file in the root directory of this source tree.
|
|
2377
2368
|
*/
|
|
2378
|
-
const Yn =
|
|
2369
|
+
const Yn = zt(
|
|
2379
2370
|
({
|
|
2380
2371
|
color: e = "currentColor",
|
|
2381
2372
|
size: t = 24,
|
|
@@ -2411,7 +2402,7 @@ const Yn = At(
|
|
|
2411
2402
|
* See the LICENSE file in the root directory of this source tree.
|
|
2412
2403
|
*/
|
|
2413
2404
|
const W = (e, t) => {
|
|
2414
|
-
const r =
|
|
2405
|
+
const r = zt(
|
|
2415
2406
|
({ className: s, ...o }, i) => Ge(Yn, {
|
|
2416
2407
|
ref: i,
|
|
2417
2408
|
iconNode: t,
|
|
@@ -2790,7 +2781,7 @@ const Os = [
|
|
|
2790
2781
|
* This source code is licensed under the ISC license.
|
|
2791
2782
|
* See the LICENSE file in the root directory of this source tree.
|
|
2792
2783
|
*/
|
|
2793
|
-
const
|
|
2784
|
+
const As = [
|
|
2794
2785
|
[
|
|
2795
2786
|
"path",
|
|
2796
2787
|
{
|
|
@@ -2800,19 +2791,19 @@ const zs = [
|
|
|
2800
2791
|
],
|
|
2801
2792
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
2802
2793
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2803
|
-
], Ot = W("triangle-alert",
|
|
2794
|
+
], Ot = W("triangle-alert", As);
|
|
2804
2795
|
/**
|
|
2805
2796
|
* @license lucide-react v0.544.0 - ISC
|
|
2806
2797
|
*
|
|
2807
2798
|
* This source code is licensed under the ISC license.
|
|
2808
2799
|
* See the LICENSE file in the root directory of this source tree.
|
|
2809
2800
|
*/
|
|
2810
|
-
const
|
|
2801
|
+
const zs = [
|
|
2811
2802
|
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
2812
2803
|
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
2813
2804
|
["line", { x1: "17", x2: "22", y1: "8", y2: "13", key: "3nzzx3" }],
|
|
2814
2805
|
["line", { x1: "22", x2: "17", y1: "8", y2: "13", key: "1swrse" }]
|
|
2815
|
-
], _s = W("user-x",
|
|
2806
|
+
], _s = W("user-x", zs);
|
|
2816
2807
|
/**
|
|
2817
2808
|
* @license lucide-react v0.544.0 - ISC
|
|
2818
2809
|
*
|
|
@@ -2860,13 +2851,13 @@ const $s = [
|
|
|
2860
2851
|
email: "",
|
|
2861
2852
|
password: "",
|
|
2862
2853
|
...h && { avatarUrl: "" }
|
|
2863
|
-
}, [g, L] = O(b), [$,
|
|
2854
|
+
}, [g, L] = O(b), [$, A] = O(!1), [k, M] = O(!1), [m, N] = O(null), [w, D] = O({}), K = typeof window < "u" ? window.innerWidth < 768 : !1, F = l ? "#ffffff" : "#111827", V = l ? "#a1a1aa" : "#6b7280", Z = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", E = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", J = (Y) => {
|
|
2864
2855
|
const { name: f, value: C } = Y.target;
|
|
2865
2856
|
L((_) => ({ ..._, [f]: C })), w[f] && D((_) => ({ ..._, [f]: void 0 }));
|
|
2866
2857
|
}, q = () => {
|
|
2867
2858
|
const Y = {};
|
|
2868
2859
|
return g.name.trim() || (Y.name = "Name is required"), g.email.trim() ? /\S+@\S+\.\S+/.test(g.email) || (Y.email = "Invalid email address") : Y.email = "Email is required", g.password ? g.password.length < 6 && (Y.password = "Password must be at least 6 characters") : Y.password = "Password is required", D(Y), Object.keys(Y).length === 0;
|
|
2869
|
-
},
|
|
2860
|
+
}, z = async (Y) => {
|
|
2870
2861
|
if (Y.preventDefault(), !!q()) {
|
|
2871
2862
|
M(!0), N(null);
|
|
2872
2863
|
try {
|
|
@@ -2999,7 +2990,7 @@ const $s = [
|
|
|
2999
2990
|
/* @__PURE__ */ n.jsxs(
|
|
3000
2991
|
"form",
|
|
3001
2992
|
{
|
|
3002
|
-
onSubmit:
|
|
2993
|
+
onSubmit: z,
|
|
3003
2994
|
style: { display: "flex", flexDirection: "column", gap: "14px" },
|
|
3004
2995
|
children: [
|
|
3005
2996
|
/* @__PURE__ */ n.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
@@ -3158,7 +3149,7 @@ const $s = [
|
|
|
3158
3149
|
"button",
|
|
3159
3150
|
{
|
|
3160
3151
|
type: "button",
|
|
3161
|
-
onClick: () =>
|
|
3152
|
+
onClick: () => A(!$),
|
|
3162
3153
|
style: {
|
|
3163
3154
|
position: "absolute",
|
|
3164
3155
|
right: "14px",
|
|
@@ -3376,12 +3367,12 @@ const $s = [
|
|
|
3376
3367
|
onSuccess: c,
|
|
3377
3368
|
onError: u
|
|
3378
3369
|
}) => {
|
|
3379
|
-
const { baseUrl: y, apiKey: T, appId: S } = ve(), [d, b] = O("login"), [g, L] = O(1), [$,
|
|
3370
|
+
const { baseUrl: y, apiKey: T, appId: S } = ve(), [d, b] = O("login"), [g, L] = O(1), [$, A] = O(!1), [k, M] = O(!1), [m, N] = O(null), [w, D] = O(""), [K, F] = O(""), [V, Z] = O({
|
|
3380
3371
|
email: "",
|
|
3381
3372
|
otp: "",
|
|
3382
3373
|
newPassword: "",
|
|
3383
3374
|
appId: S
|
|
3384
|
-
}), E = window.innerWidth < 768, J = l ? "#ffffff" : "#111827", q = l ? "#a1a1aa" : "#6b7280",
|
|
3375
|
+
}), E = window.innerWidth < 768, J = l ? "#ffffff" : "#111827", q = l ? "#a1a1aa" : "#6b7280", z = l ? "rgba(255,255,255,0.05)" : "rgba(0,0,0,0.02)", R = l ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.1)", Y = async (x) => {
|
|
3385
3376
|
x.preventDefault(), M(!0), N(null);
|
|
3386
3377
|
try {
|
|
3387
3378
|
const j = await Us(
|
|
@@ -3440,7 +3431,7 @@ const $s = [
|
|
|
3440
3431
|
}, P = {
|
|
3441
3432
|
width: "100%",
|
|
3442
3433
|
padding: E ? "10px 14px 10px 44px" : "10px 16px 10px 44px",
|
|
3443
|
-
backgroundColor:
|
|
3434
|
+
backgroundColor: z,
|
|
3444
3435
|
border: `1px solid ${R}`,
|
|
3445
3436
|
borderRadius: "10px",
|
|
3446
3437
|
color: J,
|
|
@@ -3619,7 +3610,7 @@ const $s = [
|
|
|
3619
3610
|
"button",
|
|
3620
3611
|
{
|
|
3621
3612
|
type: "button",
|
|
3622
|
-
onClick: () =>
|
|
3613
|
+
onClick: () => A(!$),
|
|
3623
3614
|
style: {
|
|
3624
3615
|
position: "absolute",
|
|
3625
3616
|
right: "14px",
|
|
@@ -4011,7 +4002,7 @@ const $s = [
|
|
|
4011
4002
|
} finally {
|
|
4012
4003
|
y(!1);
|
|
4013
4004
|
}
|
|
4014
|
-
},
|
|
4005
|
+
}, A = T.toLowerCase() === "delete my account", k = (m) => {
|
|
4015
4006
|
m.target === m.currentTarget && d !== "processing" && d !== "success" && t();
|
|
4016
4007
|
}, M = () => {
|
|
4017
4008
|
switch (d) {
|
|
@@ -4335,7 +4326,7 @@ const $s = [
|
|
|
4335
4326
|
width: "100%",
|
|
4336
4327
|
padding: "14px 16px",
|
|
4337
4328
|
borderRadius: "10px",
|
|
4338
|
-
border: `2px solid ${
|
|
4329
|
+
border: `2px solid ${A ? a.success : a.error}`,
|
|
4339
4330
|
backgroundColor: "transparent",
|
|
4340
4331
|
color: a.textPrimary,
|
|
4341
4332
|
fontSize: "15px",
|
|
@@ -4352,7 +4343,7 @@ const $s = [
|
|
|
4352
4343
|
autoFocus: !0
|
|
4353
4344
|
}
|
|
4354
4345
|
),
|
|
4355
|
-
|
|
4346
|
+
A && /* @__PURE__ */ n.jsxs(
|
|
4356
4347
|
"div",
|
|
4357
4348
|
{
|
|
4358
4349
|
style: {
|
|
@@ -4414,7 +4405,7 @@ const $s = [
|
|
|
4414
4405
|
"button",
|
|
4415
4406
|
{
|
|
4416
4407
|
onClick: $,
|
|
4417
|
-
disabled: !
|
|
4408
|
+
disabled: !A || u,
|
|
4418
4409
|
style: {
|
|
4419
4410
|
padding: "10px 24px",
|
|
4420
4411
|
borderRadius: "10px",
|
|
@@ -4423,22 +4414,22 @@ const $s = [
|
|
|
4423
4414
|
color: "white",
|
|
4424
4415
|
fontSize: "14px",
|
|
4425
4416
|
fontWeight: 600,
|
|
4426
|
-
cursor: !
|
|
4417
|
+
cursor: !A || u ? "not-allowed" : "pointer",
|
|
4427
4418
|
flex: g ? "none" : 1,
|
|
4428
4419
|
minWidth: g ? "100%" : "140px",
|
|
4429
|
-
opacity: !
|
|
4420
|
+
opacity: !A || u ? 0.6 : 1,
|
|
4430
4421
|
display: "flex",
|
|
4431
4422
|
alignItems: "center",
|
|
4432
4423
|
justifyContent: "center",
|
|
4433
4424
|
gap: "8px",
|
|
4434
4425
|
transition: "all 0.2s ease",
|
|
4435
|
-
boxShadow: !
|
|
4426
|
+
boxShadow: !A || u ? "none" : "0 4px 12px rgba(239, 68, 68, 0.4)"
|
|
4436
4427
|
},
|
|
4437
4428
|
onMouseOver: (m) => {
|
|
4438
|
-
|
|
4429
|
+
A && !u && (m.currentTarget.style.transform = "translateY(-1px)", m.currentTarget.style.boxShadow = "0 6px 20px rgba(239, 68, 68, 0.5)");
|
|
4439
4430
|
},
|
|
4440
4431
|
onMouseOut: (m) => {
|
|
4441
|
-
|
|
4432
|
+
A && !u && (m.currentTarget.style.transform = "translateY(0)", m.currentTarget.style.boxShadow = "0 4px 12px rgba(239, 68, 68, 0.4)");
|
|
4442
4433
|
},
|
|
4443
4434
|
children: [
|
|
4444
4435
|
/* @__PURE__ */ n.jsx($e, { size: 16 }),
|
|
@@ -5300,13 +5291,13 @@ const $s = [
|
|
|
5300
5291
|
newPassword: !1,
|
|
5301
5292
|
confirmPassword: !1
|
|
5302
5293
|
}), [L, $] = O(!1);
|
|
5303
|
-
if (
|
|
5294
|
+
if (At.useEffect(() => {
|
|
5304
5295
|
const w = () => {
|
|
5305
5296
|
$(window.innerWidth < 640);
|
|
5306
5297
|
};
|
|
5307
5298
|
return w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
|
|
5308
5299
|
}, []), !e) return null;
|
|
5309
|
-
const
|
|
5300
|
+
const A = (w) => {
|
|
5310
5301
|
const { name: D, value: K } = w.target;
|
|
5311
5302
|
u((F) => ({ ...F, [D]: K })), y[D] && T((F) => ({ ...F, [D]: "" }));
|
|
5312
5303
|
}, k = (w) => {
|
|
@@ -5521,7 +5512,7 @@ const $s = [
|
|
|
5521
5512
|
name: w,
|
|
5522
5513
|
placeholder: `Enter ${D.toLowerCase()}`,
|
|
5523
5514
|
value: c[w],
|
|
5524
|
-
onChange:
|
|
5515
|
+
onChange: A,
|
|
5525
5516
|
style: {
|
|
5526
5517
|
width: "100%",
|
|
5527
5518
|
padding: "14px 48px 14px 44px",
|
|
@@ -6018,7 +6009,7 @@ const $s = [
|
|
|
6018
6009
|
onLogout: o,
|
|
6019
6010
|
primaryColor: i = "#00C212"
|
|
6020
6011
|
}) => {
|
|
6021
|
-
const { baseUrl: a, apiKey: l, appId: h } = ve(), [c, u] = O(t), [y, T] = O(!0), [S, d] = O(!1), [b, g] = O(!1), [L, $] = O(!1), [
|
|
6012
|
+
const { baseUrl: a, apiKey: l, appId: h } = ve(), [c, u] = O(t), [y, T] = O(!0), [S, d] = O(!1), [b, g] = O(!1), [L, $] = O(!1), [A, k] = O(!1), [M, m] = O(!1), [N, w] = O(!1), [D, K] = O(!1), [F, V] = O(!1), [Z, E] = O(null), [J, q] = O(!1), [z, R] = O({
|
|
6022
6013
|
email: "",
|
|
6023
6014
|
otp: "",
|
|
6024
6015
|
appId: h
|
|
@@ -6041,7 +6032,7 @@ const $s = [
|
|
|
6041
6032
|
};
|
|
6042
6033
|
}, [D]);
|
|
6043
6034
|
const j = async () => {
|
|
6044
|
-
if (!
|
|
6035
|
+
if (!z.email || !/\S+@\S+\.\S+/.test(z.email)) {
|
|
6045
6036
|
P("error", "Please enter a valid email");
|
|
6046
6037
|
return;
|
|
6047
6038
|
}
|
|
@@ -6049,7 +6040,7 @@ const $s = [
|
|
|
6049
6040
|
_(!0);
|
|
6050
6041
|
const v = await B.post(
|
|
6051
6042
|
`${a}/users/send-verify-otp/${c?.id}`,
|
|
6052
|
-
{ email:
|
|
6043
|
+
{ email: z.email },
|
|
6053
6044
|
{
|
|
6054
6045
|
headers: { "x-api-key": l, "x-app-id": h }
|
|
6055
6046
|
}
|
|
@@ -6061,7 +6052,7 @@ const $s = [
|
|
|
6061
6052
|
_(!1);
|
|
6062
6053
|
}
|
|
6063
6054
|
}, X = async (v) => {
|
|
6064
|
-
if (v.preventDefault(), !
|
|
6055
|
+
if (v.preventDefault(), !z.email || !z.otp) {
|
|
6065
6056
|
P("error", "Please fill in all fields");
|
|
6066
6057
|
return;
|
|
6067
6058
|
}
|
|
@@ -6069,7 +6060,7 @@ const $s = [
|
|
|
6069
6060
|
_(!0);
|
|
6070
6061
|
const H = await B.post(
|
|
6071
6062
|
`${a}/users/verify-email`,
|
|
6072
|
-
|
|
6063
|
+
z
|
|
6073
6064
|
);
|
|
6074
6065
|
if (H.data.success) {
|
|
6075
6066
|
if (P("success", H.data.message || "Email verified!"), c) {
|
|
@@ -7089,7 +7080,7 @@ const $s = [
|
|
|
7089
7080
|
apiKey: l,
|
|
7090
7081
|
appId: h,
|
|
7091
7082
|
userId: c.id,
|
|
7092
|
-
isOpen:
|
|
7083
|
+
isOpen: A,
|
|
7093
7084
|
onClose: () => k(!1),
|
|
7094
7085
|
onSuccess: (v) => P("success", v),
|
|
7095
7086
|
onError: (v) => P("error", v),
|
|
@@ -7120,7 +7111,7 @@ const $s = [
|
|
|
7120
7111
|
},
|
|
7121
7112
|
onVerify: X,
|
|
7122
7113
|
onSendOTP: j,
|
|
7123
|
-
verifyFormData:
|
|
7114
|
+
verifyFormData: z,
|
|
7124
7115
|
setVerifyFormData: R,
|
|
7125
7116
|
otpSent: Y,
|
|
7126
7117
|
verifying: C,
|
|
@@ -7241,7 +7232,7 @@ const $s = [
|
|
|
7241
7232
|
viewProfileLabel: S = "View Profile",
|
|
7242
7233
|
logoutLabel: d = "Sign Out"
|
|
7243
7234
|
}) => {
|
|
7244
|
-
const { baseUrl: b, apiKey: g, appId: L } = ve(), [$,
|
|
7235
|
+
const { baseUrl: b, apiKey: g, appId: L } = ve(), [$, A] = O(!1), [k, M] = O(null), [m, N] = O(!0), [w, D] = O(null), K = dt(null), F = dt(null), [V, Z] = O(!1), [E, J] = O(!1);
|
|
7245
7236
|
ie(() => {
|
|
7246
7237
|
const x = () => {
|
|
7247
7238
|
J(window.innerWidth < 768);
|
|
@@ -7302,17 +7293,17 @@ const $s = [
|
|
|
7302
7293
|
return x(), window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
7303
7294
|
}, [$]), ie(() => {
|
|
7304
7295
|
const x = (ne) => {
|
|
7305
|
-
K.current && !K.current.contains(ne.target) && !F.current?.contains(ne.target) &&
|
|
7296
|
+
K.current && !K.current.contains(ne.target) && !F.current?.contains(ne.target) && A(!1);
|
|
7306
7297
|
}, j = (ne) => {
|
|
7307
|
-
ne.key === "Escape" &&
|
|
7298
|
+
ne.key === "Escape" && A(!1);
|
|
7308
7299
|
}, X = () => {
|
|
7309
|
-
$ &&
|
|
7300
|
+
$ && A(!1);
|
|
7310
7301
|
};
|
|
7311
7302
|
return $ && (document.addEventListener("mousedown", x), document.addEventListener("keydown", j), window.addEventListener("scroll", X, { passive: !0 })), () => {
|
|
7312
7303
|
document.removeEventListener("mousedown", x), document.removeEventListener("keydown", j), window.removeEventListener("scroll", X);
|
|
7313
7304
|
};
|
|
7314
7305
|
}, [$]);
|
|
7315
|
-
const
|
|
7306
|
+
const z = e ? {
|
|
7316
7307
|
surface: "#000000",
|
|
7317
7308
|
surfaceElevated: "#000000",
|
|
7318
7309
|
surfaceHover: "#262626",
|
|
@@ -7347,7 +7338,7 @@ const $s = [
|
|
|
7347
7338
|
gap: E ? "6px" : "8px",
|
|
7348
7339
|
padding: E ? "6px 10px 6px 6px" : "8px 12px 8px 8px",
|
|
7349
7340
|
borderRadius: "24px",
|
|
7350
|
-
backgroundColor:
|
|
7341
|
+
backgroundColor: z.surface,
|
|
7351
7342
|
cursor: "pointer",
|
|
7352
7343
|
transition: "all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
7353
7344
|
minWidth: E ? "auto" : "140px",
|
|
@@ -7359,7 +7350,7 @@ const $s = [
|
|
|
7359
7350
|
height: E ? "28px" : "32px",
|
|
7360
7351
|
borderRadius: "50%",
|
|
7361
7352
|
objectFit: "cover",
|
|
7362
|
-
border: `2px solid ${
|
|
7353
|
+
border: `2px solid ${z.borderLight}`,
|
|
7363
7354
|
flexShrink: 0
|
|
7364
7355
|
},
|
|
7365
7356
|
userInfo: {
|
|
@@ -7373,7 +7364,7 @@ const $s = [
|
|
|
7373
7364
|
userName: {
|
|
7374
7365
|
fontSize: E ? "13px" : "14px",
|
|
7375
7366
|
fontWeight: 600,
|
|
7376
|
-
color:
|
|
7367
|
+
color: z.textPrimary,
|
|
7377
7368
|
lineHeight: "1.2",
|
|
7378
7369
|
whiteSpace: "nowrap",
|
|
7379
7370
|
overflow: "hidden",
|
|
@@ -7382,7 +7373,7 @@ const $s = [
|
|
|
7382
7373
|
},
|
|
7383
7374
|
userEmail: {
|
|
7384
7375
|
fontSize: E ? "11px" : "12px",
|
|
7385
|
-
color:
|
|
7376
|
+
color: z.textTertiary,
|
|
7386
7377
|
lineHeight: "1.2",
|
|
7387
7378
|
whiteSpace: "nowrap",
|
|
7388
7379
|
overflow: "hidden",
|
|
@@ -7392,7 +7383,7 @@ const $s = [
|
|
|
7392
7383
|
chevron: {
|
|
7393
7384
|
transition: "transform 0.2s ease",
|
|
7394
7385
|
transform: $ ? "rotate(180deg)" : "rotate(0deg)",
|
|
7395
|
-
color:
|
|
7386
|
+
color: z.textTertiary,
|
|
7396
7387
|
flexShrink: 0
|
|
7397
7388
|
},
|
|
7398
7389
|
dropdown: {
|
|
@@ -7400,8 +7391,8 @@ const $s = [
|
|
|
7400
7391
|
top: "100%",
|
|
7401
7392
|
marginTop: "8px",
|
|
7402
7393
|
[V ? "left" : "right"]: "0",
|
|
7403
|
-
backgroundColor:
|
|
7404
|
-
border: `1px solid ${
|
|
7394
|
+
backgroundColor: z.surfaceElevated,
|
|
7395
|
+
border: `1px solid ${z.border}`,
|
|
7405
7396
|
borderRadius: "12px",
|
|
7406
7397
|
boxShadow: "0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1)",
|
|
7407
7398
|
width: "min(280px, 90vw)",
|
|
@@ -7432,7 +7423,7 @@ const $s = [
|
|
|
7432
7423
|
height: E ? "40px" : "48px",
|
|
7433
7424
|
borderRadius: "50%",
|
|
7434
7425
|
objectFit: "cover",
|
|
7435
|
-
border: `2px solid ${
|
|
7426
|
+
border: `2px solid ${z.borderLight}`,
|
|
7436
7427
|
flexShrink: 0
|
|
7437
7428
|
},
|
|
7438
7429
|
dropdownUserInfo: {
|
|
@@ -7444,7 +7435,7 @@ const $s = [
|
|
|
7444
7435
|
dropdownUserName: {
|
|
7445
7436
|
fontSize: E ? "15px" : "16px",
|
|
7446
7437
|
fontWeight: 600,
|
|
7447
|
-
color:
|
|
7438
|
+
color: z.textPrimary,
|
|
7448
7439
|
lineHeight: "1.2",
|
|
7449
7440
|
marginBottom: "2px",
|
|
7450
7441
|
overflow: "hidden",
|
|
@@ -7452,7 +7443,7 @@ const $s = [
|
|
|
7452
7443
|
},
|
|
7453
7444
|
dropdownUserEmail: {
|
|
7454
7445
|
fontSize: E ? "13px" : "14px",
|
|
7455
|
-
color:
|
|
7446
|
+
color: z.textSecondary,
|
|
7456
7447
|
lineHeight: "1.2",
|
|
7457
7448
|
overflow: "hidden",
|
|
7458
7449
|
textOverflow: "ellipsis"
|
|
@@ -7465,7 +7456,7 @@ const $s = [
|
|
|
7465
7456
|
borderRadius: "8px",
|
|
7466
7457
|
cursor: "pointer",
|
|
7467
7458
|
transition: "all 0.15s ease",
|
|
7468
|
-
color:
|
|
7459
|
+
color: z.textPrimary,
|
|
7469
7460
|
textDecoration: "none",
|
|
7470
7461
|
border: "none",
|
|
7471
7462
|
background: "none",
|
|
@@ -7480,7 +7471,7 @@ const $s = [
|
|
|
7480
7471
|
icon: {
|
|
7481
7472
|
width: E ? "16px" : "18px",
|
|
7482
7473
|
height: E ? "16px" : "18px",
|
|
7483
|
-
color:
|
|
7474
|
+
color: z.textSecondary,
|
|
7484
7475
|
flexShrink: 0
|
|
7485
7476
|
},
|
|
7486
7477
|
logoutButton: {
|
|
@@ -7495,20 +7486,20 @@ const $s = [
|
|
|
7495
7486
|
border: "none",
|
|
7496
7487
|
width: "100%",
|
|
7497
7488
|
fontSize: E ? "13px" : "14px",
|
|
7498
|
-
color:
|
|
7489
|
+
color: z.error,
|
|
7499
7490
|
textAlign: "left",
|
|
7500
7491
|
outline: "none"
|
|
7501
7492
|
},
|
|
7502
7493
|
loadingText: {
|
|
7503
7494
|
padding: E ? "16px 12px" : "20px 16px",
|
|
7504
7495
|
textAlign: "center",
|
|
7505
|
-
color:
|
|
7496
|
+
color: z.textSecondary,
|
|
7506
7497
|
fontSize: E ? "13px" : "14px"
|
|
7507
7498
|
},
|
|
7508
7499
|
errorState: {
|
|
7509
7500
|
padding: E ? "16px 12px" : "20px 16px",
|
|
7510
7501
|
textAlign: "center",
|
|
7511
|
-
color:
|
|
7502
|
+
color: z.textSecondary,
|
|
7512
7503
|
fontSize: E ? "13px" : "14px",
|
|
7513
7504
|
display: "flex",
|
|
7514
7505
|
alignItems: "center",
|
|
@@ -7519,7 +7510,7 @@ const $s = [
|
|
|
7519
7510
|
retryButton: {
|
|
7520
7511
|
marginTop: "8px",
|
|
7521
7512
|
padding: "8px 16px",
|
|
7522
|
-
backgroundColor:
|
|
7513
|
+
backgroundColor: z.accent,
|
|
7523
7514
|
color: "#ffffff",
|
|
7524
7515
|
border: "none",
|
|
7525
7516
|
borderRadius: "6px",
|
|
@@ -7560,8 +7551,8 @@ const $s = [
|
|
|
7560
7551
|
"div",
|
|
7561
7552
|
{
|
|
7562
7553
|
ref: F,
|
|
7563
|
-
onClick: () =>
|
|
7564
|
-
onKeyDown: (x) => f(x, () =>
|
|
7554
|
+
onClick: () => A((x) => !x),
|
|
7555
|
+
onKeyDown: (x) => f(x, () => A((j) => !j)),
|
|
7565
7556
|
tabIndex: 0,
|
|
7566
7557
|
role: "button",
|
|
7567
7558
|
"aria-haspopup": "true",
|
|
@@ -7577,7 +7568,7 @@ const $s = [
|
|
|
7577
7568
|
height: E ? "34px" : "40px",
|
|
7578
7569
|
borderRadius: "50%",
|
|
7579
7570
|
objectFit: "cover",
|
|
7580
|
-
border: `2px solid ${
|
|
7571
|
+
border: `2px solid ${z.borderLight}`,
|
|
7581
7572
|
flexShrink: 0
|
|
7582
7573
|
},
|
|
7583
7574
|
loading: "lazy",
|
|
@@ -7600,7 +7591,7 @@ const $s = [
|
|
|
7600
7591
|
height: E ? "34px" : "40px",
|
|
7601
7592
|
borderRadius: "50%",
|
|
7602
7593
|
objectFit: "cover",
|
|
7603
|
-
border: `2px solid ${
|
|
7594
|
+
border: `2px solid ${z.borderLight}`,
|
|
7604
7595
|
flexShrink: 0
|
|
7605
7596
|
},
|
|
7606
7597
|
loading: "lazy"
|
|
@@ -7612,18 +7603,18 @@ const $s = [
|
|
|
7612
7603
|
{
|
|
7613
7604
|
ref: F,
|
|
7614
7605
|
style: R.avatarButton,
|
|
7615
|
-
onClick: () =>
|
|
7616
|
-
onKeyDown: (x) => f(x, () =>
|
|
7606
|
+
onClick: () => A((x) => !x),
|
|
7607
|
+
onKeyDown: (x) => f(x, () => A((j) => !j)),
|
|
7617
7608
|
tabIndex: 0,
|
|
7618
7609
|
role: "button",
|
|
7619
7610
|
"aria-haspopup": "true",
|
|
7620
7611
|
"aria-expanded": $,
|
|
7621
7612
|
"aria-label": "Toggle user menu",
|
|
7622
7613
|
onMouseOver: (x) => {
|
|
7623
|
-
x.currentTarget.style.backgroundColor =
|
|
7614
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover, x.currentTarget.style.boxShadow = "0 4px 12px rgba(0,0,0,0.15)";
|
|
7624
7615
|
},
|
|
7625
7616
|
onMouseOut: (x) => {
|
|
7626
|
-
x.currentTarget.style.backgroundColor =
|
|
7617
|
+
x.currentTarget.style.backgroundColor = z.surface, x.currentTarget.style.boxShadow = "none";
|
|
7627
7618
|
},
|
|
7628
7619
|
onBlur: (x) => {
|
|
7629
7620
|
x.currentTarget.style.outline = "none";
|
|
@@ -7700,7 +7691,7 @@ const $s = [
|
|
|
7700
7691
|
style: R.menuItem,
|
|
7701
7692
|
onClick: _,
|
|
7702
7693
|
onMouseOver: (x) => {
|
|
7703
|
-
x.currentTarget.style.backgroundColor =
|
|
7694
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7704
7695
|
},
|
|
7705
7696
|
onMouseOut: (x) => {
|
|
7706
7697
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7720,7 +7711,7 @@ const $s = [
|
|
|
7720
7711
|
style: R.menuItem,
|
|
7721
7712
|
onClick: P,
|
|
7722
7713
|
onMouseOver: (x) => {
|
|
7723
|
-
x.currentTarget.style.backgroundColor =
|
|
7714
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7724
7715
|
},
|
|
7725
7716
|
onMouseOut: (x) => {
|
|
7726
7717
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7742,7 +7733,7 @@ const $s = [
|
|
|
7742
7733
|
rel: "noopener noreferrer",
|
|
7743
7734
|
style: R.menuItem,
|
|
7744
7735
|
onMouseOver: (x) => {
|
|
7745
|
-
x.currentTarget.style.backgroundColor =
|
|
7736
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7746
7737
|
},
|
|
7747
7738
|
onMouseOut: (x) => {
|
|
7748
7739
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7762,7 +7753,7 @@ const $s = [
|
|
|
7762
7753
|
style: R.logoutButton,
|
|
7763
7754
|
onClick: r,
|
|
7764
7755
|
onMouseOver: (x) => {
|
|
7765
|
-
x.currentTarget.style.backgroundColor =
|
|
7756
|
+
x.currentTarget.style.backgroundColor = z.surfaceHover;
|
|
7766
7757
|
},
|
|
7767
7758
|
onMouseOut: (x) => {
|
|
7768
7759
|
x.currentTarget.style.backgroundColor = "transparent";
|
|
@@ -7774,7 +7765,7 @@ const $s = [
|
|
|
7774
7765
|
/* @__PURE__ */ n.jsx(
|
|
7775
7766
|
ct,
|
|
7776
7767
|
{
|
|
7777
|
-
style: { ...R.icon, color:
|
|
7768
|
+
style: { ...R.icon, color: z.error },
|
|
7778
7769
|
"aria-hidden": "true"
|
|
7779
7770
|
}
|
|
7780
7771
|
),
|
|
@@ -7799,10 +7790,10 @@ const $s = [
|
|
|
7799
7790
|
style: R.retryButton,
|
|
7800
7791
|
onClick: Y,
|
|
7801
7792
|
onMouseOver: (x) => {
|
|
7802
|
-
x.currentTarget.style.backgroundColor =
|
|
7793
|
+
x.currentTarget.style.backgroundColor = z.accentHover;
|
|
7803
7794
|
},
|
|
7804
7795
|
onMouseOut: (x) => {
|
|
7805
|
-
x.currentTarget.style.backgroundColor =
|
|
7796
|
+
x.currentTarget.style.backgroundColor = z.accent;
|
|
7806
7797
|
},
|
|
7807
7798
|
children: "Try Again"
|
|
7808
7799
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[Rt]=this[Rt]={accessors:{}}).accessors,o=this.prototype;function i(a){const l=Te(a);s[l]||(ln(o,a),s[l]=!0)}return p.isArray(t)?t.forEach(i):i(t),this}};ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),p.reduceDescriptors(ne.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}}),p.freezeMethods(ne);function Ge(e,t){const r=this||Ce,s=t||r,o=ne.from(s.headers);let i=s.data;return p.forEach(e,function(l){i=l.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function It(e){return!!(e&&e.__CANCEL__)}function we(e,t,r){U.call(this,e??"canceled",U.ERR_CANCELED,t,r),this.name="CanceledError"}p.inherits(we,U,{__CANCEL__:!0});function Pt(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new U("Request failed with status code "+r.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function cn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dn(e,t){e=e||10;const r=new Array(e),s=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(h){const c=Date.now(),u=s[i];a||(a=c),r[o]=h,s[o]=c;let y=i,R=0;for(;y!==o;)R+=r[y++],y=y%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a<t)return;const k=u&&c-u;return k?Math.round(R*1e3/k):void 0}}function un(e,t){let r=0,s=1e3/t,o,i;const a=(c,u=Date.now())=>{r=u,o=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const u=Date.now(),y=u-r;y>=s?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},s-y)))},()=>o&&a(o)]}const De=(e,t,r=3)=>{let s=0;const o=dn(50,250);return un(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,h=a-s,c=o(h),u=a<=l;s=a;const y={loaded:a,total:l,progress:l?a/l:void 0,bytes:h,rate:c||void 0,estimated:c&&l&&u?(l-a)/c:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(y)},r)},Ot=(e,t)=>{const r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},_t=e=>(...t)=>p.asap(()=>e(...t)),pn=ee.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ee.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ee.origin),ee.navigator&&/(msie|trident)/i.test(ee.navigator.userAgent)):()=>!0,fn=ee.hasStandardBrowserEnv?{write(e,t,r,s,o,i){const a=[e+"="+encodeURIComponent(t)];p.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),p.isString(s)&&a.push("path="+s),p.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function At(e,t,r){let s=!xn(t);return e&&(s||r==!1)?hn(e,t):t}const zt=e=>e instanceof ne?{...e}:e;function pe(e,t){t=t||{};const r={};function s(c,u,y,R){return p.isPlainObject(c)&&p.isPlainObject(u)?p.merge.call({caseless:R},c,u):p.isPlainObject(u)?p.merge({},u):p.isArray(u)?u.slice():u}function o(c,u,y,R){if(p.isUndefined(u)){if(!p.isUndefined(c))return s(void 0,c,y,R)}else return s(c,u,y,R)}function i(c,u){if(!p.isUndefined(u))return s(void 0,u)}function a(c,u){if(p.isUndefined(u)){if(!p.isUndefined(c))return s(void 0,c)}else return s(void 0,u)}function l(c,u,y){if(y in t)return s(c,u);if(y in e)return s(void 0,c)}const h={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(c,u,y)=>o(zt(c),zt(u),y,!0)};return p.forEach(Object.keys({...e,...t}),function(u){const y=h[u]||o,R=y(e[u],t[u],u);p.isUndefined(R)&&y!==l||(r[u]=R)}),r}const Nt=e=>{const t=pe({},e);let{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:l}=t;if(t.headers=a=ne.from(a),t.url=kt(At(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),p.isFormData(r)){if(ee.hasStandardBrowserEnv||ee.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(p.isFunction(r.getHeaders)){const h=r.getHeaders(),c=["content-type","content-length"];Object.entries(h).forEach(([u,y])=>{c.includes(u.toLowerCase())&&a.set(u,y)})}}if(ee.hasStandardBrowserEnv&&(s&&p.isFunction(s)&&(s=s(t)),s||s!==!1&&pn(t.url))){const h=o&&i&&fn.read(i);h&&a.set(o,h)}return t},gn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,s){const o=Nt(e);let i=o.data;const a=ne.from(o.headers).normalize();let{responseType:l,onUploadProgress:h,onDownloadProgress:c}=o,u,y,R,k,d;function b(){k&&k(),d&&d(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function M(){if(!g)return;const _=ne.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),B={data:!l||l==="text"||l==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:_,config:e,request:g};Pt(function(N){r(N),b()},function(N){s(N),b()},B),g=null}"onloadend"in g?g.onloadend=M:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(M)},g.onabort=function(){g&&(s(new U("Request aborted",U.ECONNABORTED,e,g)),g=null)},g.onerror=function(E){const B=E&&E.message?E.message:"Network Error",m=new U(B,U.ERR_NETWORK,e,g);m.event=E||null,s(m),g=null},g.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const B=o.transitional||Ct;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),s(new U(E,B.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,g)),g=null},i===void 0&&a.setContentType(null),"setRequestHeader"in g&&p.forEach(a.toJSON(),function(E,B){g.setRequestHeader(B,E)}),p.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),l&&l!=="json"&&(g.responseType=o.responseType),c&&([R,d]=De(c,!0),g.addEventListener("progress",R)),h&&g.upload&&([y,k]=De(h),g.upload.addEventListener("progress",y),g.upload.addEventListener("loadend",k)),(o.cancelToken||o.signal)&&(u=_=>{g&&(s(!_||_.type?new we(null,e,g):_),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const D=cn(o.url);if(D&&ee.protocols.indexOf(D)===-1){s(new U("Unsupported protocol "+D+":",U.ERR_BAD_REQUEST,e));return}g.send(i||null)})},mn=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,o;const i=function(c){if(!o){o=!0,l();const u=c instanceof Error?c:this.reason;s.abort(u instanceof U?u:new we(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new U(`timeout ${t} of ms exceeded`,U.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:h}=s;return h.unsubscribe=()=>p.asap(l),h}},yn=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let s=0,o;for(;s<r;)o=s+t,yield e.slice(s,o),s=o},bn=async function*(e,t){for await(const r of wn(e))yield*yn(r,t)},wn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:s}=await t.read();if(r)break;yield s}}finally{await t.cancel()}},Ut=(e,t,r,s)=>{const o=bn(e,t);let i=0,a,l=h=>{a||(a=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:c,value:u}=await o.next();if(c){l(),h.close();return}let y=u.byteLength;if(r){let R=i+=y;r(R)}h.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(h){return l(h),o.return()}},{highWaterMark:2})},Dt=64*1024,{isFunction:Fe}=p,Sn=(({Request:e,Response:t})=>({Request:e,Response:t}))(p.global),{ReadableStream:Ft,TextEncoder:Lt}=p.global,Mt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},jn=e=>{e=p.merge.call({skipUndefined:!0},Sn,e);const{fetch:t,Request:r,Response:s}=e,o=t?Fe(t):typeof fetch=="function",i=Fe(r),a=Fe(s);if(!o)return!1;const l=o&&Fe(Ft),h=o&&(typeof Lt=="function"?(d=>b=>d.encode(b))(new Lt):async d=>new Uint8Array(await new r(d).arrayBuffer())),c=i&&l&&Mt(()=>{let d=!1;const b=new r(ee.origin,{body:new Ft,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!b}),u=a&&l&&Mt(()=>p.isReadableStream(new s("").body)),y={stream:u&&(d=>d.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!y[d]&&(y[d]=(b,g)=>{let M=b&&b[d];if(M)return M.call(b);throw new U(`Response type '${d}' is not supported`,U.ERR_NOT_SUPPORT,g)})});const R=async d=>{if(d==null)return 0;if(p.isBlob(d))return d.size;if(p.isSpecCompliantForm(d))return(await new r(ee.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(p.isArrayBufferView(d)||p.isArrayBuffer(d))return d.byteLength;if(p.isURLSearchParams(d)&&(d=d+""),p.isString(d))return(await h(d)).byteLength},k=async(d,b)=>{const g=p.toFiniteNumber(d.getContentLength());return g??R(b)};return async d=>{let{url:b,method:g,data:M,signal:D,cancelToken:_,timeout:E,onDownloadProgress:B,onUploadProgress:m,responseType:N,headers:w,withCredentials:F="same-origin",fetchOptions:K}=Nt(d),L=t||fetch;N=N?(N+"").toLowerCase():"text";let Y=mn([D,_&&_.toAbortSignal()],E),Z=null;const C=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let J;try{if(m&&c&&g!=="get"&&g!=="head"&&(J=await k(w,M))!==0){let T=new r(b,{method:"POST",body:M,duplex:"half"}),z;if(p.isFormData(M)&&(z=T.headers.get("content-type"))&&w.setContentType(z),T.body){const[O,x]=Ot(J,De(_t(m)));M=Ut(T.body,Dt,O,x)}}p.isString(F)||(F=F?"include":"omit");const H=i&&"credentials"in r.prototype,A={...K,signal:Y,method:g.toUpperCase(),headers:w.normalize().toJSON(),body:M,duplex:"half",credentials:H?F:void 0};Z=i&&new r(b,A);let I=await(i?L(Z,K):L(b,A));const q=u&&(N==="stream"||N==="response");if(u&&(B||q&&C)){const T={};["status","statusText","headers"].forEach(j=>{T[j]=I[j]});const z=p.toFiniteNumber(I.headers.get("content-length")),[O,x]=B&&Ot(z,De(_t(B),!0))||[];I=new s(Ut(I.body,Dt,O,()=>{x&&x(),C&&C()}),T)}N=N||"text";let f=await y[p.findKey(y,N)||"text"](I,d);return!q&&C&&C(),await new Promise((T,z)=>{Pt(T,z,{data:f,headers:ne.from(I.headers),status:I.status,statusText:I.statusText,config:d,request:Z})})}catch(H){throw C&&C(),H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)?Object.assign(new U("Network Error",U.ERR_NETWORK,d,Z),{cause:H.cause||H}):U.from(H,H&&H.code,d,Z)}}},vn=new Map,Bt=e=>{let t=e?e.env:{};const{fetch:r,Request:s,Response:o}=t,i=[s,o,r];let a=i.length,l=a,h,c,u=vn;for(;l--;)h=i[l],c=u.get(h),c===void 0&&u.set(h,c=l?new Map:jn(t)),u=c;return c};Bt();const Ze={http:Hr,xhr:gn,fetch:{get:Bt}};p.forEach(Ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Wt=e=>`- ${e}`,kn=e=>p.isFunction(e)||e===null||e===!1,$t={getAdapter:(e,t)=>{e=p.isArray(e)?e:[e];const{length:r}=e;let s,o;const i={};for(let a=0;a<r;a++){s=e[a];let l;if(o=s,!kn(s)&&(o=Ze[(l=String(s)).toLowerCase()],o===void 0))throw new U(`Unknown adapter '${l}'`);if(o&&(p.isFunction(o)||(o=o.get(t))))break;i[l||"#"+a]=o}if(!o){const a=Object.entries(i).map(([h,c])=>`adapter ${h} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=r?a.length>1?`since :
|
|
4
4
|
`+a.map(Wt).join(`
|
|
5
5
|
`):" "+Wt(a[0]):"as no adapter specified";throw new U("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return o},adapters:Ze};function Qe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new we(null,e)}function Ht(e){return Qe(e),e.headers=ne.from(e.headers),e.data=Ge.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),$t.getAdapter(e.adapter||Ce.adapter,e)(e).then(function(s){return Qe(e),s.data=Ge.call(e,e.transformResponse,s),s.headers=ne.from(s.headers),s},function(s){return It(s)||(Qe(e),s&&s.response&&(s.response.data=Ge.call(e,e.transformResponse,s.response),s.response.headers=ne.from(s.response.headers))),Promise.reject(s)})}const Vt="1.12.2",Le={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Le[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Yt={};Le.transitional=function(t,r,s){function o(i,a){return"[Axios v"+Vt+"] Transitional option '"+i+"'"+a+(s?". "+s:"")}return(i,a,l)=>{if(t===!1)throw new U(o(a," has been removed"+(r?" in "+r:"")),U.ERR_DEPRECATED);return r&&!Yt[a]&&(Yt[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,l):!0}},Le.spelling=function(t){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function En(e,t,r){if(typeof e!="object")throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let o=s.length;for(;o-- >0;){const i=s[o],a=t[i];if(a){const l=e[i],h=l===void 0||a(l,i,e);if(h!==!0)throw new U("option "+i+" must be "+h,U.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new U("Unknown option "+i,U.ERR_BAD_OPTION)}}const Me={assertOptions:En,validators:Le},ie=Me.validators;let fe=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Et,response:new Et}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
|
6
|
-
`+i):s.stack=i}catch{}}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=pe(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:i}=r;s!==void 0&&Me.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),o!=null&&(p.isFunction(o)?r.paramsSerializer={serialize:o}:Me.assertOptions(o,{encode:ie.function,serialize:ie.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Me.assertOptions(r,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&p.merge(i.common,i[r.method]);i&&p.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=ne.concat(a,i);const l=[];let h=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(h=h&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let u,y=0,R;if(!h){const d=[Ht.bind(this),void 0];for(d.unshift(...l),d.push(...c),R=d.length,u=Promise.resolve(r);y<R;)u=u.then(d[y++],d[y++]);return u}R=l.length;let k=r;for(;y<R;){const d=l[y++],b=l[y++];try{k=d(k)}catch(g){b.call(this,g);break}}try{u=Ht.call(this,k)}catch(d){return Promise.reject(d)}for(y=0,R=c.length;y<R;)u=u.then(c[y++],c[y++]);return u}getUri(t){t=pe(this.defaults,t);const r=At(t.baseURL,t.url,t.allowAbsoluteUrls);return kt(r,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){fe.prototype[t]=function(r,s){return this.request(pe(s||{},{method:t,url:r,data:(s||{}).data}))}}),p.forEach(["post","put","patch"],function(t){function r(s){return function(i,a,l){return this.request(pe(l||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}fe.prototype[t]=r(),fe.prototype[t+"Form"]=r(!0)});let Cn=class or{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const s=this;this.promise.then(o=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](o);s._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{s.subscribe(l),i=l}).then(o);return a.cancel=function(){s.unsubscribe(i)},a},t(function(i,a,l){s.reason||(s.reason=new we(i,a,l),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=s=>{t.abort(s)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new or(function(o){t=o}),cancel:t}}};function Tn(e){return function(r){return e.apply(null,r)}}function Rn(e){return p.isObject(e)&&e.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([e,t])=>{et[t]=e});function qt(e){const t=new fe(e),r=ct(fe.prototype.request,t);return p.extend(r,fe.prototype,t,{allOwnKeys:!0}),p.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return qt(pe(e,o))},r}const W=qt(Ce);W.Axios=fe,W.CanceledError=we,W.CancelToken=Cn,W.isCancel=It,W.VERSION=Vt,W.toFormData=Ne,W.AxiosError=U,W.Cancel=W.CanceledError,W.all=function(t){return Promise.all(t)},W.spread=Tn,W.isAxiosError=Rn,W.mergeConfig=pe,W.AxiosHeaders=ne,W.formToJSON=e=>Tt(p.isHTMLForm(e)?new FormData(e):e),W.getAdapter=$t.getAdapter,W.HttpStatusCode=et,W.default=W;const{Axios:ms,AxiosError:ys,CanceledError:bs,isCancel:ws,CancelToken:Ss,VERSION:js,all:vs,Cancel:ks,isAxiosError:Es,spread:Cs,toFormData:Ts,AxiosHeaders:Rs,HttpStatusCode:Is,formToJSON:Ps,getAdapter:Os,mergeConfig:_s}=W;class In{baseUrl;apiKey;appId;client;constructor(t){if(!t||!t.baseUrl)throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");this.baseUrl=t.baseUrl.replace(/\/$/,""),this.apiKey=t.apiKey||null,this.appId=t.appId||null,this.client=W.create({baseURL:this.baseUrl,headers:{"Content-Type":"application/json",...this.apiKey?{"x-api-key":this.apiKey}:{}},timeout:1e4})}async request(t,r,s,o={}){if(!t)
|
|
6
|
+
`+i):s.stack=i}catch{}}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=pe(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:i}=r;s!==void 0&&Me.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),o!=null&&(p.isFunction(o)?r.paramsSerializer={serialize:o}:Me.assertOptions(o,{encode:ie.function,serialize:ie.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Me.assertOptions(r,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&p.merge(i.common,i[r.method]);i&&p.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),r.headers=ne.concat(a,i);const l=[];let h=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(h=h&&b.synchronous,l.unshift(b.fulfilled,b.rejected))});const c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let u,y=0,R;if(!h){const d=[Ht.bind(this),void 0];for(d.unshift(...l),d.push(...c),R=d.length,u=Promise.resolve(r);y<R;)u=u.then(d[y++],d[y++]);return u}R=l.length;let k=r;for(;y<R;){const d=l[y++],b=l[y++];try{k=d(k)}catch(g){b.call(this,g);break}}try{u=Ht.call(this,k)}catch(d){return Promise.reject(d)}for(y=0,R=c.length;y<R;)u=u.then(c[y++],c[y++]);return u}getUri(t){t=pe(this.defaults,t);const r=At(t.baseURL,t.url,t.allowAbsoluteUrls);return kt(r,t.params,t.paramsSerializer)}};p.forEach(["delete","get","head","options"],function(t){fe.prototype[t]=function(r,s){return this.request(pe(s||{},{method:t,url:r,data:(s||{}).data}))}}),p.forEach(["post","put","patch"],function(t){function r(s){return function(i,a,l){return this.request(pe(l||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}fe.prototype[t]=r(),fe.prototype[t+"Form"]=r(!0)});let Cn=class or{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const s=this;this.promise.then(o=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](o);s._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{s.subscribe(l),i=l}).then(o);return a.cancel=function(){s.unsubscribe(i)},a},t(function(i,a,l){s.reason||(s.reason=new we(i,a,l),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=s=>{t.abort(s)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new or(function(o){t=o}),cancel:t}}};function Tn(e){return function(r){return e.apply(null,r)}}function Rn(e){return p.isObject(e)&&e.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([e,t])=>{et[t]=e});function qt(e){const t=new fe(e),r=ct(fe.prototype.request,t);return p.extend(r,fe.prototype,t,{allOwnKeys:!0}),p.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return qt(pe(e,o))},r}const W=qt(Ce);W.Axios=fe,W.CanceledError=we,W.CancelToken=Cn,W.isCancel=It,W.VERSION=Vt,W.toFormData=Ne,W.AxiosError=U,W.Cancel=W.CanceledError,W.all=function(t){return Promise.all(t)},W.spread=Tn,W.isAxiosError=Rn,W.mergeConfig=pe,W.AxiosHeaders=ne,W.formToJSON=e=>Tt(p.isHTMLForm(e)?new FormData(e):e),W.getAdapter=$t.getAdapter,W.HttpStatusCode=et,W.default=W;const{Axios:ms,AxiosError:ys,CanceledError:bs,isCancel:ws,CancelToken:Ss,VERSION:js,all:vs,Cancel:ks,isAxiosError:Es,spread:Cs,toFormData:Ts,AxiosHeaders:Rs,HttpStatusCode:Is,formToJSON:Ps,getAdapter:Os,mergeConfig:_s}=W;class In{baseUrl;apiKey;appId;client;constructor(t){if(!t||!t.baseUrl)throw new Error("NeuctraAuthixClient: 'baseUrl' is required in config");this.baseUrl=t.baseUrl.replace(/\/$/,""),this.apiKey=t.apiKey||null,this.appId=t.appId||null,this.client=W.create({baseURL:this.baseUrl,headers:{"Content-Type":"application/json",...this.apiKey?{"x-api-key":this.apiKey}:{}},timeout:1e4})}async request(t,r,s,o={}){if(!t)throw new Error("HTTP method is required");if(!r)throw new Error("Request path is required");try{const i={...this.appId?{appId:this.appId}:{},...s||{}};return(await this.client.request({url:r,method:t,data:i,headers:o})).data}catch(i){if(console.error("❌ [Request Error]:",i),i.isAxiosError){const a=i.response?.status||0,l=i.response?.data?.message||i.message||"Unknown Axios error occurred";throw new Error(`Request failed (${a}): ${l}`)}throw new Error(`Unexpected error: ${i.message||"Unknown failure"}`)}}async signup(t){const{name:r,email:s,password:o}=t;if(!r||!s||!o)throw new Error("signup: 'name', 'email', and 'password' are required");return this.request("POST","/users/signup",t)}async login(t){const{email:r,password:s,appId:o}=t;if(!r||!s)throw new Error("login: 'email' and 'password' are required");return this.request("POST","/users/login",{email:r,password:s,appId:o||this.appId})}async updateUser(t){const{userId:r,appId:s}=t;if(!r)throw new Error("updateUser: 'userId' is required");return this.request("PUT",`/users/update/${r}`,{...t,appId:s||this.appId})}async changePassword(t){const{userId:r,currentPassword:s,newPassword:o,appId:i}=t;if(!r)throw new Error("changePassword: 'userId' is required");if(!s||!o)throw new Error("changePassword: both 'currentPassword' and 'newPassword' are required");return this.request("PUT",`/users/change-password/${r}`,{currentPassword:s,newPassword:o,appId:i||this.appId})}async deleteUser(t){const{userId:r,appId:s}=t;if(!r)throw new Error("deleteUser: 'userId' is required");return this.request("DELETE",`/users/delete/${r}`,{appId:s||this.appId})}async getProfile(t){const{token:r}=t;if(!r)throw new Error("getProfile: 'token' is required");return this.request("GET","/users/profile",{},{Authorization:`Bearer ${r}`})}async sendVerifyOTP(t){const{token:r,appId:s}=t;if(!r)throw new Error("sendVerifyOTP: 'token' is required");return this.request("POST","/users/send-verify-otp",{appId:s||this.appId},{Authorization:`Bearer ${r}`})}async verifyEmail(t){const{token:r,otp:s,appId:o}=t;if(!r)throw new Error("verifyEmail: 'token' is required");if(!s)throw new Error("verifyEmail: 'otp' is required");return this.request("POST","/users/verify-email",{otp:s,appId:o||this.appId},{Authorization:`Bearer ${r}`})}async forgotPassword(t){const{email:r,appId:s}=t;if(!r)throw new Error("forgotPassword: 'email' is required");return this.request("POST","/users/forgot-password",{email:r,appId:s||this.appId})}async resetPassword(t){const{email:r,otp:s,newPassword:o,appId:i}=t;if(!r||!s||!o)throw new Error("resetPassword: 'email', 'otp' and 'newPassword' are required");return this.request("POST","/users/reset-password",{email:r,otp:s,newPassword:o,appId:i||this.appId})}async getUserData(t){const{userId:r}=t;if(!r)throw new Error("getUserData: 'userId' is required");return this.request("GET",`/users/${r}/data`)}async getSingleUserData(t){const{userId:r,dataId:s}=t;if(!r||!s)throw new Error("getSingleUserData: 'userId' and 'dataId' are required");return this.request("GET",`/users/${r}/data/${s}`)}async addUserData(t){const{userId:r,data:s}=t;if(!r)throw new Error("addUserData: 'userId' is required");if(!s)throw new Error("addUserData: 'data' is required");return this.request("POST",`/users/${r}/data`,s)}async updateUserData(t){const{userId:r,dataId:s,data:o}=t;if(!r||!s)throw new Error("updateUserData: 'userId' and 'dataId' are required");if(!o)throw new Error("updateUserData: 'data' is required");return this.request("PUT",`/users/${r}/data/${s}`,o)}async deleteUserData(t){const{userId:r,dataId:s}=t;if(!r||!s)throw new Error("deleteUserData: 'userId' and 'dataId' are required");return this.request("DELETE",`/users/${r}/data/${s}`)}}var Be={exports:{}},Re={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-jsx-runtime.production.js
|
|
9
9
|
*
|
package/dist/src/sdk/index.d.ts
CHANGED
|
@@ -123,64 +123,40 @@ export declare class NeuctraAuthix {
|
|
|
123
123
|
* 🌐 Universal request helper with structured responses and error handling
|
|
124
124
|
* @param method HTTP method (GET, POST, PUT, DELETE)
|
|
125
125
|
* @param path API endpoint path
|
|
126
|
-
* @param data
|
|
127
|
-
* @param extraHeaders
|
|
126
|
+
* @param data Optional request body
|
|
127
|
+
* @param extraHeaders Optional custom headers
|
|
128
128
|
*/
|
|
129
129
|
private request;
|
|
130
130
|
/**
|
|
131
131
|
* Register a new user
|
|
132
132
|
* @param params user details
|
|
133
133
|
*/
|
|
134
|
-
signup(params: SignupParams): Promise<
|
|
135
|
-
success: boolean;
|
|
136
|
-
data?: any;
|
|
137
|
-
message: string;
|
|
138
|
-
}>;
|
|
134
|
+
signup(params: SignupParams): Promise<any>;
|
|
139
135
|
/**
|
|
140
136
|
* Login a user
|
|
141
137
|
* @param params login details
|
|
142
138
|
*/
|
|
143
|
-
login(params: LoginParams): Promise<
|
|
144
|
-
success: boolean;
|
|
145
|
-
data?: any;
|
|
146
|
-
message: string;
|
|
147
|
-
}>;
|
|
139
|
+
login(params: LoginParams): Promise<any>;
|
|
148
140
|
/**
|
|
149
141
|
* Update an existing user
|
|
150
142
|
* @param params fields to update
|
|
151
143
|
*/
|
|
152
|
-
updateUser(params: UpdateUserParams): Promise<
|
|
153
|
-
success: boolean;
|
|
154
|
-
data?: any;
|
|
155
|
-
message: string;
|
|
156
|
-
}>;
|
|
144
|
+
updateUser(params: UpdateUserParams): Promise<any>;
|
|
157
145
|
/**
|
|
158
146
|
* Change a user's password (Admin only)
|
|
159
147
|
* @param params requires userId, currentPassword, newPassword
|
|
160
148
|
*/
|
|
161
|
-
changePassword(params: ChangePasswordParams): Promise<
|
|
162
|
-
success: boolean;
|
|
163
|
-
data?: any;
|
|
164
|
-
message: string;
|
|
165
|
-
}>;
|
|
149
|
+
changePassword(params: ChangePasswordParams): Promise<any>;
|
|
166
150
|
/**
|
|
167
151
|
* Delete a user
|
|
168
152
|
* @param params requires userId and optionally appId
|
|
169
153
|
*/
|
|
170
|
-
deleteUser(params: DeleteUserParams): Promise<
|
|
171
|
-
success: boolean;
|
|
172
|
-
data?: any;
|
|
173
|
-
message: string;
|
|
174
|
-
}>;
|
|
154
|
+
deleteUser(params: DeleteUserParams): Promise<any>;
|
|
175
155
|
/**
|
|
176
156
|
* Get the profile of the authenticated user
|
|
177
157
|
* @param params requires JWT token
|
|
178
158
|
*/
|
|
179
|
-
getProfile(params: GetProfileParams): Promise<
|
|
180
|
-
success: boolean;
|
|
181
|
-
data?: any;
|
|
182
|
-
message: string;
|
|
183
|
-
}>;
|
|
159
|
+
getProfile(params: GetProfileParams): Promise<any>;
|
|
184
160
|
/**
|
|
185
161
|
* Send verification OTP (requires logged-in user token)
|
|
186
162
|
* @param params requires token
|
|
@@ -188,11 +164,7 @@ export declare class NeuctraAuthix {
|
|
|
188
164
|
sendVerifyOTP(params: {
|
|
189
165
|
token: string;
|
|
190
166
|
appId?: string;
|
|
191
|
-
}): Promise<
|
|
192
|
-
success: boolean;
|
|
193
|
-
data?: any;
|
|
194
|
-
message: string;
|
|
195
|
-
}>;
|
|
167
|
+
}): Promise<any>;
|
|
196
168
|
/**
|
|
197
169
|
* Verify email with OTP (requires logged-in user token)
|
|
198
170
|
* @param params requires token + otp
|
|
@@ -201,11 +173,7 @@ export declare class NeuctraAuthix {
|
|
|
201
173
|
token: string;
|
|
202
174
|
otp: string;
|
|
203
175
|
appId?: string;
|
|
204
|
-
}): Promise<
|
|
205
|
-
success: boolean;
|
|
206
|
-
data?: any;
|
|
207
|
-
message: string;
|
|
208
|
-
}>;
|
|
176
|
+
}): Promise<any>;
|
|
209
177
|
/**
|
|
210
178
|
* Forgot password (public route)
|
|
211
179
|
* @param params requires email
|
|
@@ -213,11 +181,7 @@ export declare class NeuctraAuthix {
|
|
|
213
181
|
forgotPassword(params: {
|
|
214
182
|
email: string;
|
|
215
183
|
appId?: string;
|
|
216
|
-
}): Promise<
|
|
217
|
-
success: boolean;
|
|
218
|
-
data?: any;
|
|
219
|
-
message: string;
|
|
220
|
-
}>;
|
|
184
|
+
}): Promise<any>;
|
|
221
185
|
/**
|
|
222
186
|
* Reset password (public route)
|
|
223
187
|
* @param params requires email, otp, newPassword
|
|
@@ -227,55 +191,31 @@ export declare class NeuctraAuthix {
|
|
|
227
191
|
otp: string;
|
|
228
192
|
newPassword: string;
|
|
229
193
|
appId?: string;
|
|
230
|
-
}): Promise<
|
|
231
|
-
success: boolean;
|
|
232
|
-
data?: any;
|
|
233
|
-
message: string;
|
|
234
|
-
}>;
|
|
194
|
+
}): Promise<any>;
|
|
235
195
|
/**
|
|
236
196
|
* Get all data objects for a user
|
|
237
197
|
* @param params requires userId
|
|
238
198
|
*/
|
|
239
|
-
getUserData(params: GetUserDataParams): Promise<
|
|
240
|
-
success: boolean;
|
|
241
|
-
data?: any;
|
|
242
|
-
message: string;
|
|
243
|
-
}>;
|
|
199
|
+
getUserData(params: GetUserDataParams): Promise<any>;
|
|
244
200
|
/**
|
|
245
201
|
* Get a single data object for a user
|
|
246
202
|
* @param params requires userId and dataId
|
|
247
203
|
*/
|
|
248
|
-
getSingleUserData(params: GetSingleUserDataParams): Promise<
|
|
249
|
-
success: boolean;
|
|
250
|
-
data?: any;
|
|
251
|
-
message: string;
|
|
252
|
-
}>;
|
|
204
|
+
getSingleUserData(params: GetSingleUserDataParams): Promise<any>;
|
|
253
205
|
/**
|
|
254
206
|
* Add a new data object to a user
|
|
255
207
|
* @param params requires userId and data object
|
|
256
208
|
*/
|
|
257
|
-
addUserData(params: AddUserDataParams): Promise<
|
|
258
|
-
success: boolean;
|
|
259
|
-
data?: any;
|
|
260
|
-
message: string;
|
|
261
|
-
}>;
|
|
209
|
+
addUserData(params: AddUserDataParams): Promise<any>;
|
|
262
210
|
/**
|
|
263
211
|
* Update a data object by its id
|
|
264
212
|
* @param params requires userId, dataId, and updated fields
|
|
265
213
|
*/
|
|
266
|
-
updateUserData(params: UpdateUserDataParams): Promise<
|
|
267
|
-
success: boolean;
|
|
268
|
-
data?: any;
|
|
269
|
-
message: string;
|
|
270
|
-
}>;
|
|
214
|
+
updateUserData(params: UpdateUserDataParams): Promise<any>;
|
|
271
215
|
/**
|
|
272
216
|
* Delete a data object by its id
|
|
273
217
|
* @param params requires userId and dataId
|
|
274
218
|
*/
|
|
275
|
-
deleteUserData(params: DeleteUserDataParams): Promise<
|
|
276
|
-
success: boolean;
|
|
277
|
-
data?: any;
|
|
278
|
-
message: string;
|
|
279
|
-
}>;
|
|
219
|
+
deleteUserData(params: DeleteUserDataParams): Promise<any>;
|
|
280
220
|
}
|
|
281
221
|
export {};
|