prostgles-types 4.0.90 → 4.0.92
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 +9 -3
- package/dist/auth.d.ts.map +1 -1
- package/lib/auth.ts +8 -2
- package/package.json +1 -1
package/dist/auth.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { AnyObject } from "./filters";
|
|
2
1
|
export type IdentityProvider = "google" | "microsoft" | "github" | "apple" | "facebook" | "twitter" | "linkedin";
|
|
2
|
+
export type UserLike = {
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
3
7
|
export type EmailAuthType = "withPassword" | "magicLink";
|
|
4
8
|
export type AuthSocketSchema = {
|
|
5
|
-
user:
|
|
6
|
-
providers: Partial<Record<IdentityProvider,
|
|
9
|
+
user: UserLike | undefined;
|
|
10
|
+
providers: Partial<Record<IdentityProvider, {
|
|
11
|
+
url: string;
|
|
12
|
+
}>>;
|
|
7
13
|
login: EmailAuthType | undefined;
|
|
8
14
|
register: EmailAuthType | undefined;
|
|
9
15
|
pathGuard?: boolean;
|
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":"AAEA,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,WAAW,CAAC;AAKzD,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,aAAa,GAAG,SAAS,CAAC;IAKjC,QAAQ,EAAE,aAAa,GAAG,SAAS,CAAC;IAMpC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
|
package/lib/auth.ts
CHANGED
|
@@ -10,6 +10,12 @@ export type IdentityProvider =
|
|
|
10
10
|
| "linkedin"
|
|
11
11
|
;
|
|
12
12
|
|
|
13
|
+
export type UserLike = {
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
|
|
13
19
|
export type EmailAuthType = "withPassword" | "magicLink";
|
|
14
20
|
|
|
15
21
|
/**
|
|
@@ -21,13 +27,13 @@ export type AuthSocketSchema = {
|
|
|
21
27
|
* User data as returned from server auth.getClientUser
|
|
22
28
|
* if undefined, the client is not logged in
|
|
23
29
|
*/
|
|
24
|
-
user:
|
|
30
|
+
user: UserLike | undefined;
|
|
25
31
|
|
|
26
32
|
/**
|
|
27
33
|
* Identity providers enabled on the server
|
|
28
34
|
* if undefined, the server does not support social login
|
|
29
35
|
*/
|
|
30
|
-
providers: Partial<Record<IdentityProvider,
|
|
36
|
+
providers: Partial<Record<IdentityProvider, { url: string; }>>;
|
|
31
37
|
|
|
32
38
|
/**
|
|
33
39
|
* Email login methods enabled on the server
|