prostgles-types 4.0.93 → 4.0.95

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 CHANGED
@@ -4,14 +4,21 @@ export type UserLike = {
4
4
  type: string;
5
5
  [key: string]: any;
6
6
  };
7
- export type EmailAuthType = "withPassword" | "magicLink";
7
+ export type EmailAuthType = "withPassword" | "withPasswordAndTOTP";
8
+ export type EmailSignupType = "withPassword" | "magicLink";
8
9
  export type AuthSocketSchema = {
9
10
  user: UserLike | undefined;
10
11
  providers: Partial<Record<IdentityProvider, {
11
12
  url: string;
12
13
  }>>;
13
- login: EmailAuthType | undefined;
14
- register: EmailAuthType | undefined;
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
@@ -1 +1 @@
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"}
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,qBAAqB,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG,WAAW,CAAC;AAK3D,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
@@ -16,7 +16,8 @@ export type UserLike = {
16
16
  [key: string]: any;
17
17
  };
18
18
 
19
- export type EmailAuthType = "withPassword" | "magicLink";
19
+ export type EmailAuthType = "withPassword" | "withPasswordAndTOTP"; // TODO: | "magicLink";
20
+ export type EmailSignupType = "withPassword" | "magicLink";
20
21
 
21
22
  /**
22
23
  * Auth object sent from server to client
@@ -38,12 +39,12 @@ export type AuthSocketSchema = {
38
39
  /**
39
40
  * Email login methods enabled on the server
40
41
  */
41
- login: EmailAuthType | undefined;
42
+ login: { type: EmailAuthType; url: string; } | undefined;
42
43
 
43
44
  /**
44
45
  * Email registration methods enabled on the server
45
46
  */
46
- register: EmailAuthType | undefined;
47
+ register: { type: EmailSignupType; url: string; } | undefined;
47
48
 
48
49
  /**
49
50
  * If server auth publicRoutes is set up and AuthGuard is not explicitly disabled ( disableSocketAuthGuard: true ):
package/lib/index.ts CHANGED
@@ -1112,4 +1112,4 @@ export * from "./filters";
1112
1112
  export * from "./jsonb";
1113
1113
  export type { ClientExpressData, ClientSyncHandles, ClientSyncInfo, ClientSyncPullResponse, SyncBatchParams, SyncConfig, onUpdatesParams } from "./replication";
1114
1114
  export * from "./util";
1115
- export * from "./auth";
1115
+ export * from "./auth";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prostgles-types",
3
- "version": "4.0.93",
3
+ "version": "4.0.95",
4
4
  "description": "",
5
5
  "main": "dist/index_umd.js",
6
6
  "types": "dist/index.d.ts",