zitejs 0.9.80 → 0.9.81
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/cjs/auth/index.d.ts +19 -0
- package/dist/cjs/auth/index.js +4 -0
- package/dist/cjs/sync/lib.js +1 -0
- package/dist/esm/auth/index.d.ts +19 -0
- package/dist/esm/auth/index.js +3 -0
- package/dist/esm/sync/lib.js +1 -0
- package/package.json +1 -1
package/dist/cjs/auth/index.d.ts
CHANGED
|
@@ -247,6 +247,25 @@ export declare function loginWithRedirect(opts?: {
|
|
|
247
247
|
export declare function logout(opts?: {
|
|
248
248
|
returnTo?: string;
|
|
249
249
|
}): void;
|
|
250
|
+
export declare function updateProfile(data: {
|
|
251
|
+
name?: string;
|
|
252
|
+
firstName?: string;
|
|
253
|
+
lastName?: string;
|
|
254
|
+
image?: string;
|
|
255
|
+
}): Promise<{
|
|
256
|
+
data: {
|
|
257
|
+
status: boolean;
|
|
258
|
+
};
|
|
259
|
+
error: null;
|
|
260
|
+
} | {
|
|
261
|
+
data: null;
|
|
262
|
+
error: {
|
|
263
|
+
code?: string | undefined | undefined;
|
|
264
|
+
message?: string | undefined | undefined;
|
|
265
|
+
status: number;
|
|
266
|
+
statusText: string;
|
|
267
|
+
};
|
|
268
|
+
}>;
|
|
250
269
|
export type User = {
|
|
251
270
|
id: string;
|
|
252
271
|
name: string;
|
package/dist/cjs/auth/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.signUp = exports.signOut = exports.signIn = exports.useSession = void 0;
|
|
4
4
|
exports.loginWithRedirect = loginWithRedirect;
|
|
5
5
|
exports.logout = logout;
|
|
6
|
+
exports.updateProfile = updateProfile;
|
|
6
7
|
const react_1 = require("better-auth/react");
|
|
7
8
|
const plugins_1 = require("better-auth/client/plugins");
|
|
8
9
|
const authClient = (0, react_1.createAuthClient)({
|
|
@@ -26,3 +27,6 @@ function logout(opts) {
|
|
|
26
27
|
window.location.href = opts?.returnTo || '/';
|
|
27
28
|
});
|
|
28
29
|
}
|
|
30
|
+
function updateProfile(data) {
|
|
31
|
+
return authClient.updateUser(data);
|
|
32
|
+
}
|
package/dist/cjs/sync/lib.js
CHANGED
package/dist/esm/auth/index.d.ts
CHANGED
|
@@ -247,6 +247,25 @@ export declare function loginWithRedirect(opts?: {
|
|
|
247
247
|
export declare function logout(opts?: {
|
|
248
248
|
returnTo?: string;
|
|
249
249
|
}): void;
|
|
250
|
+
export declare function updateProfile(data: {
|
|
251
|
+
name?: string;
|
|
252
|
+
firstName?: string;
|
|
253
|
+
lastName?: string;
|
|
254
|
+
image?: string;
|
|
255
|
+
}): Promise<{
|
|
256
|
+
data: {
|
|
257
|
+
status: boolean;
|
|
258
|
+
};
|
|
259
|
+
error: null;
|
|
260
|
+
} | {
|
|
261
|
+
data: null;
|
|
262
|
+
error: {
|
|
263
|
+
code?: string | undefined | undefined;
|
|
264
|
+
message?: string | undefined | undefined;
|
|
265
|
+
status: number;
|
|
266
|
+
statusText: string;
|
|
267
|
+
};
|
|
268
|
+
}>;
|
|
250
269
|
export type User = {
|
|
251
270
|
id: string;
|
|
252
271
|
name: string;
|
package/dist/esm/auth/index.js
CHANGED
package/dist/esm/sync/lib.js
CHANGED