@fonderie/client 0.22.0 → 0.23.0
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/brain/signatures.md +3 -0
- package/dist/index.cjs +14 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -95,6 +95,8 @@ interface IUserDTO {
|
|
|
95
95
|
isEmailVerified: boolean;
|
|
96
96
|
isPhoneVerified: boolean;
|
|
97
97
|
mfaEnabled: boolean;
|
|
98
|
+
provider: string;
|
|
99
|
+
hasPassword: boolean;
|
|
98
100
|
suspended: boolean;
|
|
99
101
|
whitelist: boolean;
|
|
100
102
|
ipWhitelist: string[];
|
|
@@ -759,6 +761,15 @@ declare class AuthClient {
|
|
|
759
761
|
* error page, which the app cannot explain.
|
|
760
762
|
*/
|
|
761
763
|
providers(): Promise<IApiResponse<IAuthProvidersResult>>;
|
|
764
|
+
/**
|
|
765
|
+
* Disconnect the OAuth provider linked to the signed-in account.
|
|
766
|
+
*
|
|
767
|
+
* Refused with 409 PASSWORD_REQUIRED when the account has no password:
|
|
768
|
+
* removing the only credential is account deletion, not a settings toggle.
|
|
769
|
+
* Check `user.hasPassword` before offering the control so the user is asked
|
|
770
|
+
* to set a password first rather than shown an error they can't act on.
|
|
771
|
+
*/
|
|
772
|
+
unlinkOauth(provider: string): Promise<IApiResponse<null>>;
|
|
762
773
|
register(input: IRegisterInput): Promise<IApiResponse<IRegisterResult>>;
|
|
763
774
|
login(input: ILoginInput): Promise<IApiResponse<ILoginResult | IMfaRequiredResult>>;
|
|
764
775
|
appleNative(input: IAppleNativeInput): Promise<IApiResponse<ILoginResult>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -95,6 +95,8 @@ interface IUserDTO {
|
|
|
95
95
|
isEmailVerified: boolean;
|
|
96
96
|
isPhoneVerified: boolean;
|
|
97
97
|
mfaEnabled: boolean;
|
|
98
|
+
provider: string;
|
|
99
|
+
hasPassword: boolean;
|
|
98
100
|
suspended: boolean;
|
|
99
101
|
whitelist: boolean;
|
|
100
102
|
ipWhitelist: string[];
|
|
@@ -759,6 +761,15 @@ declare class AuthClient {
|
|
|
759
761
|
* error page, which the app cannot explain.
|
|
760
762
|
*/
|
|
761
763
|
providers(): Promise<IApiResponse<IAuthProvidersResult>>;
|
|
764
|
+
/**
|
|
765
|
+
* Disconnect the OAuth provider linked to the signed-in account.
|
|
766
|
+
*
|
|
767
|
+
* Refused with 409 PASSWORD_REQUIRED when the account has no password:
|
|
768
|
+
* removing the only credential is account deletion, not a settings toggle.
|
|
769
|
+
* Check `user.hasPassword` before offering the control so the user is asked
|
|
770
|
+
* to set a password first rather than shown an error they can't act on.
|
|
771
|
+
*/
|
|
772
|
+
unlinkOauth(provider: string): Promise<IApiResponse<null>>;
|
|
762
773
|
register(input: IRegisterInput): Promise<IApiResponse<IRegisterResult>>;
|
|
763
774
|
login(input: ILoginInput): Promise<IApiResponse<ILoginResult | IMfaRequiredResult>>;
|
|
764
775
|
appleNative(input: IAppleNativeInput): Promise<IApiResponse<ILoginResult>>;
|
package/dist/index.js
CHANGED
|
@@ -257,6 +257,20 @@ var AuthClient = class {
|
|
|
257
257
|
path: "/auth/providers"
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Disconnect the OAuth provider linked to the signed-in account.
|
|
262
|
+
*
|
|
263
|
+
* Refused with 409 PASSWORD_REQUIRED when the account has no password:
|
|
264
|
+
* removing the only credential is account deletion, not a settings toggle.
|
|
265
|
+
* Check `user.hasPassword` before offering the control so the user is asked
|
|
266
|
+
* to set a password first rather than shown an error they can't act on.
|
|
267
|
+
*/
|
|
268
|
+
unlinkOauth(provider) {
|
|
269
|
+
return this.http.request({
|
|
270
|
+
method: "DELETE",
|
|
271
|
+
path: `/auth/oauth/${encodeURIComponent(provider)}`
|
|
272
|
+
});
|
|
273
|
+
}
|
|
260
274
|
register(input) {
|
|
261
275
|
return this.http.request({
|
|
262
276
|
method: "POST",
|