prostgles-client 4.0.201 → 4.0.203
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 +15 -1
- package/dist/Auth.d.ts.map +1 -1
- package/dist/Auth.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.no-sync.js +1 -1
- package/package.json +2 -2
package/dist/Auth.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ type ClientAuthSuccess<T> = T & {
|
|
|
12
12
|
redirect_url?: string;
|
|
13
13
|
};
|
|
14
14
|
export type PasswordLoginResponse = ClientAuthSuccess<AuthResponse.PasswordLoginFailure | AuthResponse.PasswordLoginSuccess | AuthResponse.MagicLinkAuthSuccess | AuthResponse.MagicLinkAuthFailure | AuthResponse.OAuthRegisterSuccess | AuthResponse.OAuthRegisterFailure>;
|
|
15
|
-
export type PasswordRegisterResponse = ClientAuthSuccess<AuthResponse.
|
|
15
|
+
export type PasswordRegisterResponse = ClientAuthSuccess<AuthResponse.PasswordRegisterSuccess | AuthResponse.PasswordRegisterFailure>;
|
|
16
16
|
export type PasswordRegister = (params: AuthRequest.RegisterData) => Promise<PasswordRegisterResponse>;
|
|
17
17
|
export type PasswordLogin = (params: AuthRequest.LoginData) => Promise<PasswordLoginResponse>;
|
|
18
18
|
type LoginSignupOptions = {
|
|
@@ -89,6 +89,20 @@ export declare const authRequest: <T extends (import("prostgles-types").CommonAu
|
|
|
89
89
|
* This is a client-only property that is obtained from server redirect response
|
|
90
90
|
*/
|
|
91
91
|
redirect_url?: string | undefined;
|
|
92
|
+
}) | (AuthResponse.PasswordRegisterSuccess & {
|
|
93
|
+
/**
|
|
94
|
+
* This is a client-only property that is obtained from server redirect response
|
|
95
|
+
*/
|
|
96
|
+
redirect_url?: string | undefined;
|
|
97
|
+
}) | ({
|
|
98
|
+
success: false;
|
|
99
|
+
code: "username-missing" | "password-missing" | "weak-password" | "user-already-registered" | "invalid-email-confirmation-code" | "expired-email-confirmation-code" | "inactive-account";
|
|
100
|
+
message?: string | undefined;
|
|
101
|
+
} & {
|
|
102
|
+
/**
|
|
103
|
+
* This is a client-only property that is obtained from server redirect response
|
|
104
|
+
*/
|
|
105
|
+
redirect_url?: string | undefined;
|
|
92
106
|
})>(path: string, data: object, method?: "GET") => Promise<T>;
|
|
93
107
|
export {};
|
|
94
108
|
//# 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":"AAAA,OAAO,KAAK,EACV,SAAS,EAGT,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACZ,MAAM,iBAAiB,CAAC;AAIzB,KAAK,IAAI,GAAG;IACV,MAAM,EAAE,GAAG,CAAC;IACZ,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,KAAK,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;AAEzE,KAAK,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CACjD,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,oBAAoB,GACjC,YAAY,CAAC,oBAAoB,CACpC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CACtD,YAAY,CAAC,
|
|
1
|
+
{"version":3,"file":"Auth.d.ts","sourceRoot":"","sources":["../lib/Auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAGT,gBAAgB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AAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC1C,CAAC;AAEF,KAAK,kBAAkB,GAAG,kBAAkB,GAAG;IAC7C,UAAU,EAAE,KAAK,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG,kBAAkB,GAAG;IAC5C,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAEjE,eAAO,MAAM,SAAS,+CAAgD,IAAI,KAAG,WAmF5E,CAAC;AAEF,eAAO,MAAM,WAAW;IAjItB;;OAEG;;;;;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;;IAFH;;OAEG;;;;;;;IAFH;;OAEG;;UAgIG,MAAM,QACN,MAAM,WACH,KAAK,eAgCf,CAAC"}
|
package/dist/Auth.js
CHANGED
|
@@ -82,7 +82,7 @@ const authRequest = async (path, data, method) => {
|
|
|
82
82
|
Accept: "application/json",
|
|
83
83
|
"Content-Type": "application/json",
|
|
84
84
|
},
|
|
85
|
-
body: JSON.stringify(data),
|
|
85
|
+
...(method !== "GET" && { body: JSON.stringify(data) }),
|
|
86
86
|
});
|
|
87
87
|
if (!rawResponse.ok) {
|
|
88
88
|
const error = await rawResponse
|