prostgles-client 4.0.152 → 4.0.153

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
@@ -5,6 +5,12 @@ type Args = {
5
5
  onReload: VoidFunction | undefined;
6
6
  };
7
7
  type WithProviderLogin = Partial<Record<IdentityProvider, VoidFunction>>;
8
+ type SignupResult = {
9
+ success: true;
10
+ } | {
11
+ success: false;
12
+ error: string;
13
+ };
8
14
  type EmailAuth = {
9
15
  withPassword?: (params: {
10
16
  username: string;
@@ -12,13 +18,13 @@ type EmailAuth = {
12
18
  remember_me?: boolean;
13
19
  totp_token?: string;
14
20
  totp_recovery_code?: string;
15
- }) => Promise<any>;
21
+ }) => Promise<SignupResult>;
16
22
  withMagicLink?: undefined;
17
23
  } | {
18
24
  withPassword?: undefined;
19
25
  withMagicLink?: (params: {
20
26
  username: string;
21
- }) => Promise<any>;
27
+ }) => Promise<SignupResult>;
22
28
  };
23
29
  type LoginSignupOptions = {
24
30
  prefferedLogin: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../lib/Auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAA0D,KAAK,gBAAgB,EAAY,KAAK,gBAAgB,EAA+B,MAAM,iBAAiB,CAAC;AAG9L,KAAK,IAAI,GAAG;IACV,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;CACpC,CAAA;AAED,KAAK,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;AAEzE,KAAK,SAAS,GACZ;IACA,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,E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AC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG,kBAAkB,GAAG;IAC5C,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GACrB,kBAAkB,GAClB,iBAAiB,CAAC;AAEpB,eAAO,MAAM,SAAS,+CAAgD,IAAI,KAAG,WAoE5E,CAAA;AAED,eAAO,MAAM,IAAI,SAAgB,MAAM,QAAQ,MAAM,sBAgBpD,CAAA"}
package/lib/Auth.ts CHANGED
@@ -9,14 +9,18 @@ type Args = {
9
9
 
10
10
  type WithProviderLogin = Partial<Record<IdentityProvider, VoidFunction>>;
11
11
 
12
+ type SignupResult =
13
+ | { success: true; }
14
+ | { success: false; error: string; }
15
+
12
16
  type EmailAuth =
13
17
  | {
14
- withPassword?: (params: { username: string; password: string; remember_me?: boolean; totp_token?: string; totp_recovery_code?: string; }) => Promise<any>;
18
+ withPassword?: (params: { username: string; password: string; remember_me?: boolean; totp_token?: string; totp_recovery_code?: string; }) => Promise<SignupResult>;
15
19
  withMagicLink?: undefined;
16
20
  }
17
21
  | {
18
22
  withPassword?: undefined;
19
- withMagicLink?: (params: { username: string; }) => Promise<any>;
23
+ withMagicLink?: (params: { username: string; }) => Promise<SignupResult>;
20
24
  }
21
25
 
22
26
  type LoginSignupOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prostgles-client",
3
- "version": "4.0.152",
3
+ "version": "4.0.153",
4
4
  "description": "Reactive client for Postgres",
5
5
  "main": "dist/prostgles-full.js",
6
6
  "types": "dist/prostgles-full.d.ts",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "..": {
19
19
  "name": "prostgles-client",
20
- "version": "4.0.151",
20
+ "version": "4.0.152",
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "prostgles-types": "^4.0.107"