@fonderie/client 0.21.0 → 0.22.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 +1 -0
- package/dist/index.cjs +15 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -105,6 +105,10 @@ interface ITokens {
|
|
|
105
105
|
access: string;
|
|
106
106
|
refresh: string;
|
|
107
107
|
}
|
|
108
|
+
/** What GET /auth/providers answers: the sign-in methods this API can honour. */
|
|
109
|
+
interface IAuthProvidersResult {
|
|
110
|
+
providers: string[];
|
|
111
|
+
}
|
|
108
112
|
interface IRegisterResult {
|
|
109
113
|
tokens: ITokens;
|
|
110
114
|
user: IUserDTO;
|
|
@@ -745,6 +749,16 @@ declare class AuthClient {
|
|
|
745
749
|
readonly mfa: MfaClient;
|
|
746
750
|
constructor(http: HttpClient, tokens: TokenStore);
|
|
747
751
|
setAccessToken(token: string | undefined): void;
|
|
752
|
+
/**
|
|
753
|
+
* Which sign-in methods this deployment can actually honour.
|
|
754
|
+
*
|
|
755
|
+
* Public — the login screen needs it before anyone has signed in. Ask the
|
|
756
|
+
* server rather than shipping a build-time flag: the flag stores the same
|
|
757
|
+
* fact twice and lets the two disagree, and the symptom is a user clicking
|
|
758
|
+
* a provider the server cannot complete and landing on the provider's own
|
|
759
|
+
* error page, which the app cannot explain.
|
|
760
|
+
*/
|
|
761
|
+
providers(): Promise<IApiResponse<IAuthProvidersResult>>;
|
|
748
762
|
register(input: IRegisterInput): Promise<IApiResponse<IRegisterResult>>;
|
|
749
763
|
login(input: ILoginInput): Promise<IApiResponse<ILoginResult | IMfaRequiredResult>>;
|
|
750
764
|
appleNative(input: IAppleNativeInput): Promise<IApiResponse<ILoginResult>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -105,6 +105,10 @@ interface ITokens {
|
|
|
105
105
|
access: string;
|
|
106
106
|
refresh: string;
|
|
107
107
|
}
|
|
108
|
+
/** What GET /auth/providers answers: the sign-in methods this API can honour. */
|
|
109
|
+
interface IAuthProvidersResult {
|
|
110
|
+
providers: string[];
|
|
111
|
+
}
|
|
108
112
|
interface IRegisterResult {
|
|
109
113
|
tokens: ITokens;
|
|
110
114
|
user: IUserDTO;
|
|
@@ -745,6 +749,16 @@ declare class AuthClient {
|
|
|
745
749
|
readonly mfa: MfaClient;
|
|
746
750
|
constructor(http: HttpClient, tokens: TokenStore);
|
|
747
751
|
setAccessToken(token: string | undefined): void;
|
|
752
|
+
/**
|
|
753
|
+
* Which sign-in methods this deployment can actually honour.
|
|
754
|
+
*
|
|
755
|
+
* Public — the login screen needs it before anyone has signed in. Ask the
|
|
756
|
+
* server rather than shipping a build-time flag: the flag stores the same
|
|
757
|
+
* fact twice and lets the two disagree, and the symptom is a user clicking
|
|
758
|
+
* a provider the server cannot complete and landing on the provider's own
|
|
759
|
+
* error page, which the app cannot explain.
|
|
760
|
+
*/
|
|
761
|
+
providers(): Promise<IApiResponse<IAuthProvidersResult>>;
|
|
748
762
|
register(input: IRegisterInput): Promise<IApiResponse<IRegisterResult>>;
|
|
749
763
|
login(input: ILoginInput): Promise<IApiResponse<ILoginResult | IMfaRequiredResult>>;
|
|
750
764
|
appleNative(input: IAppleNativeInput): Promise<IApiResponse<ILoginResult>>;
|
package/dist/index.js
CHANGED
|
@@ -242,6 +242,21 @@ var AuthClient = class {
|
|
|
242
242
|
if (!token) this.http.clearCache();
|
|
243
243
|
}
|
|
244
244
|
// ── Public ─────────────────────────────────────────────────────────────────
|
|
245
|
+
/**
|
|
246
|
+
* Which sign-in methods this deployment can actually honour.
|
|
247
|
+
*
|
|
248
|
+
* Public — the login screen needs it before anyone has signed in. Ask the
|
|
249
|
+
* server rather than shipping a build-time flag: the flag stores the same
|
|
250
|
+
* fact twice and lets the two disagree, and the symptom is a user clicking
|
|
251
|
+
* a provider the server cannot complete and landing on the provider's own
|
|
252
|
+
* error page, which the app cannot explain.
|
|
253
|
+
*/
|
|
254
|
+
providers() {
|
|
255
|
+
return this.http.request({
|
|
256
|
+
method: "GET",
|
|
257
|
+
path: "/auth/providers"
|
|
258
|
+
});
|
|
259
|
+
}
|
|
245
260
|
register(input) {
|
|
246
261
|
return this.http.request({
|
|
247
262
|
method: "POST",
|