@fabriktor/fx 0.0.49 → 0.0.51
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/src/auth/auth.d.ts
CHANGED
|
@@ -2,14 +2,12 @@ export type AuthEmailOptions = {
|
|
|
2
2
|
email: string;
|
|
3
3
|
password: string;
|
|
4
4
|
};
|
|
5
|
-
export type UpdateAuthEmailOptions = Pick<AuthEmailOptions, "email">;
|
|
6
5
|
export type AuthSession = {
|
|
7
6
|
token: string;
|
|
8
7
|
};
|
|
9
8
|
export interface AuthOperator {
|
|
10
9
|
signUp(opts: AuthEmailOptions): Promise<AuthSession>;
|
|
11
10
|
signIn(opts: AuthEmailOptions): Promise<AuthSession>;
|
|
12
|
-
updateEmail(opts: UpdateAuthEmailOptions): Promise<void>;
|
|
13
11
|
getToken(): Promise<string>;
|
|
14
12
|
refreshToken(): Promise<string>;
|
|
15
13
|
emailVerified(): boolean;
|
|
@@ -4,7 +4,6 @@ import type { UsersFXOperator } from "../users/users.js";
|
|
|
4
4
|
type ConnectionInsert = Parameters<ConnectionsOperator["insertOneConnection"]>[0]["in"];
|
|
5
5
|
type BootstrapInput = Parameters<UsersOperator["bootstrap"]>[0]["in"];
|
|
6
6
|
type BootstrapResult = Awaited<ReturnType<UsersOperator["bootstrap"]>>;
|
|
7
|
-
type UpdateEmailOptions = Parameters<AuthOperator["updateEmail"]>[0];
|
|
8
7
|
export declare const SignInMode: {
|
|
9
8
|
readonly Email: "email";
|
|
10
9
|
readonly Username: "username";
|
|
@@ -32,7 +31,6 @@ export interface SessionFXOperator {
|
|
|
32
31
|
signUpAndBootstrap(opts: SignUpAndBootstrapOptions): Promise<BootstrapResult>;
|
|
33
32
|
signIn(opts: SignInOptions): Promise<void>;
|
|
34
33
|
signInWithEmail(opts: SignInWithEmailOptions): Promise<void>;
|
|
35
|
-
updateEmail(opts: UpdateEmailOptions): Promise<void>;
|
|
36
34
|
checkEmailVerification(): Promise<boolean>;
|
|
37
35
|
}
|
|
38
36
|
export declare class SessionFX implements SessionFXOperator {
|
|
@@ -44,7 +42,6 @@ export declare class SessionFX implements SessionFXOperator {
|
|
|
44
42
|
signUpAndBootstrap(opts: SignUpAndBootstrapOptions): Promise<BootstrapResult>;
|
|
45
43
|
signIn(opts: SignInOptions): Promise<void>;
|
|
46
44
|
signInWithEmail(opts: SignInWithEmailOptions): Promise<void>;
|
|
47
|
-
updateEmail(opts: UpdateEmailOptions): Promise<void>;
|
|
48
45
|
checkEmailVerification(): Promise<boolean>;
|
|
49
46
|
}
|
|
50
47
|
export declare function newSessionFX(opts: SessionFXOptions): SessionFX;
|
|
@@ -49,12 +49,6 @@ export class SessionFX {
|
|
|
49
49
|
});
|
|
50
50
|
await this.users.sync();
|
|
51
51
|
}
|
|
52
|
-
async updateEmail(opts) {
|
|
53
|
-
await this.auth.updateEmail(opts);
|
|
54
|
-
await this.auth.reloadUser();
|
|
55
|
-
await this.auth.refreshToken();
|
|
56
|
-
await this.users.sync();
|
|
57
|
-
}
|
|
58
52
|
async checkEmailVerification() {
|
|
59
53
|
await this.auth.reloadUser();
|
|
60
54
|
if (!this.auth.emailVerified()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabriktor/fx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.51",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"typescript": "^6.0.3"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@fabriktor/client": "0.0.
|
|
21
|
-
"@fabriktor/schema": "0.0.
|
|
20
|
+
"@fabriktor/client": "0.0.51",
|
|
21
|
+
"@fabriktor/schema": "0.0.34"
|
|
22
22
|
}
|
|
23
23
|
}
|