prostgles-types 4.0.94 → 4.0.96
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/auth.d.ts +10 -3
- package/dist/auth.d.ts.map +1 -1
- package/lib/auth.ts +4 -5
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -4,14 +4,21 @@ export type UserLike = {
|
|
|
4
4
|
type: string;
|
|
5
5
|
[key: string]: any;
|
|
6
6
|
};
|
|
7
|
-
export type EmailAuthType = "withPassword" | "
|
|
7
|
+
export type EmailAuthType = "withPassword" | "withMagicLink";
|
|
8
|
+
export type EmailSignupType = "withPassword" | "withMagicLink";
|
|
8
9
|
export type AuthSocketSchema = {
|
|
9
10
|
user: UserLike | undefined;
|
|
10
11
|
providers: Partial<Record<IdentityProvider, {
|
|
11
12
|
url: string;
|
|
12
13
|
}>>;
|
|
13
|
-
login:
|
|
14
|
-
|
|
14
|
+
login: {
|
|
15
|
+
type: EmailAuthType;
|
|
16
|
+
url: string;
|
|
17
|
+
} | undefined;
|
|
18
|
+
register: {
|
|
19
|
+
type: EmailSignupType;
|
|
20
|
+
url: string;
|
|
21
|
+
} | undefined;
|
|
15
22
|
pathGuard?: boolean;
|
|
16
23
|
};
|
|
17
24
|
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../lib/auth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../lib/auth.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAC1B,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,OAAO,GACP,UAAU,GACV,SAAS,GACT,UAAU,CACX;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,eAAe,CAAC;AAC7D,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,eAAe,CAAC;AAK/D,MAAM,MAAM,gBAAgB,GAAG;IAM7B,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAM3B,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;KAAE,CAAC,CAAC,CAAC;IAK/D,KAAK,EAAE;QAAE,IAAI,EAAE,aAAa,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;KAAE,GAAG,SAAS,CAAC;IAKzD,QAAQ,EAAE;QAAE,IAAI,EAAE,eAAe,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;KAAE,GAAG,SAAS,CAAC;IAM9D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
package/lib/auth.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { AnyObject } from "./filters";
|
|
2
|
-
|
|
3
1
|
export type IdentityProvider =
|
|
4
2
|
| "google"
|
|
5
3
|
| "microsoft"
|
|
@@ -16,7 +14,8 @@ export type UserLike = {
|
|
|
16
14
|
[key: string]: any;
|
|
17
15
|
};
|
|
18
16
|
|
|
19
|
-
export type EmailAuthType = "withPassword" | "magicLink";
|
|
17
|
+
export type EmailAuthType = "withPassword" | "withMagicLink"; // TODO: | "magicLink";
|
|
18
|
+
export type EmailSignupType = "withPassword" | "withMagicLink";
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
21
|
* Auth object sent from server to client
|
|
@@ -38,12 +37,12 @@ export type AuthSocketSchema = {
|
|
|
38
37
|
/**
|
|
39
38
|
* Email login methods enabled on the server
|
|
40
39
|
*/
|
|
41
|
-
login: EmailAuthType | undefined;
|
|
40
|
+
login: { type: EmailAuthType; url: string; } | undefined;
|
|
42
41
|
|
|
43
42
|
/**
|
|
44
43
|
* Email registration methods enabled on the server
|
|
45
44
|
*/
|
|
46
|
-
register:
|
|
45
|
+
register: { type: EmailSignupType; url: string; } | undefined;
|
|
47
46
|
|
|
48
47
|
/**
|
|
49
48
|
* If server auth publicRoutes is set up and AuthGuard is not explicitly disabled ( disableSocketAuthGuard: true ):
|