@qaecy/cue-sdk 0.0.55 → 0.0.58
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/index.d.ts +1 -0
- package/index.js +1 -1
- package/lib/auth.d.ts +33 -3
- package/lib/models.d.ts +7 -0
- package/lib/profile.d.ts +6 -1
- package/{models-DytxsTwc.js → models-DCFnaBFw.js} +724 -656
- package/node.js +2 -2
- package/package.json +1 -1
- package/variables.d.ts +2 -0
- package/browser.js +0 -40356
package/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { CueStorage } from './lib/storage';
|
|
|
4
4
|
export type { StorageBucket } from './lib/storage';
|
|
5
5
|
export type { GisBBox, GisCategoryDescriptor, GisFeature, GisFeaturesMap, FeatureCategory } from './lib/gis';
|
|
6
6
|
export { CueAuth, CueAuthError } from './lib/auth';
|
|
7
|
+
export type { CueActionCodeInfo, CueActionOperation } from './lib/auth';
|
|
7
8
|
export { CueSignUp, CueRequestError } from './lib/signup';
|
|
8
9
|
export type { OrgSignUpPayload, OrgSignUpPlan } from './lib/signup';
|
|
9
10
|
export { CueApi } from './lib/api';
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as C, C as u, a as i, b as r, c as o, d as t, e as n, f as S, g as c, h as E, i as m, j as p, k as A, l, m as P, n as R, o as _, p as d, q as I, r as g, s as T, t as D, u as O, v as N, w as U, x as h, y as G, z as f, A as j, D as v, E as x, F as M, G as y, H as B, I as F, J as L, K as H, L as b, M as K, N as q, O as w, P as Q, Q as V, R as W, S as X, T as Y, U as k, V as z, W as J, X as Z, Y as $, Z as aa, _ as ea, $ as sa, a0 as Ca, a1 as ua, a2 as ia, a3 as ra, a4 as oa, a5 as ta, a6 as na } from "./models-
|
|
1
|
+
import { B as C, C as u, a as i, b as r, c as o, d as t, e as n, f as S, g as c, h as E, i as m, j as p, k as A, l, m as P, n as R, o as _, p as d, q as I, r as g, s as T, t as D, u as O, v as N, w as U, x as h, y as G, z as f, A as j, D as v, E as x, F as M, G as y, H as B, I as F, J as L, K as H, L as b, M as K, N as q, O as w, P as Q, Q as V, R as W, S as X, T as Y, U as k, V as z, W as J, X as Z, Y as $, Z as aa, _ as ea, $ as sa, a0 as Ca, a1 as ua, a2 as ia, a3 as ra, a4 as oa, a5 as ta, a6 as na } from "./models-DCFnaBFw.js";
|
|
2
2
|
import "uuid";
|
|
3
3
|
export {
|
|
4
4
|
C as BASE_CURRENCY,
|
package/lib/auth.d.ts
CHANGED
|
@@ -2,6 +2,15 @@ import { Auth, User } from 'firebase/auth';
|
|
|
2
2
|
import { FirebaseApp } from 'firebase/app';
|
|
3
3
|
import { CueEndpoints, PasswordCredentials, SsoProvider } from './models';
|
|
4
4
|
import { ReadonlySignal } from './signal';
|
|
5
|
+
/** What an email action link (`/auth/action?mode=…&oobCode=…`) does. */
|
|
6
|
+
export type CueActionOperation = 'resetPassword' | 'verifyEmail' | 'changeEmail' | 'recoverEmail' | 'other';
|
|
7
|
+
export interface CueActionCodeInfo {
|
|
8
|
+
operation: CueActionOperation;
|
|
9
|
+
/** The account's address — for `changeEmail` the NEW one, for `recoverEmail` the restored one. */
|
|
10
|
+
email: string;
|
|
11
|
+
/** For `changeEmail` and `recoverEmail`: the address being replaced. */
|
|
12
|
+
previousEmail?: string;
|
|
13
|
+
}
|
|
5
14
|
export type AuthStateListener = (user: User | null) => void;
|
|
6
15
|
export type Unsubscribe = () => void;
|
|
7
16
|
/**
|
|
@@ -41,6 +50,15 @@ export declare class CueAuth {
|
|
|
41
50
|
signIn(provider: SsoProvider): Promise<User>;
|
|
42
51
|
/** Sign in with email and password */
|
|
43
52
|
signIn(provider: 'password', credentials: PasswordCredentials): Promise<User>;
|
|
53
|
+
/**
|
|
54
|
+
* Sign in with Google tokens obtained outside Firebase's popup, e.g. by the desktop app
|
|
55
|
+
* through the gateway's OAuth pages in the system browser (Google refuses OAuth inside
|
|
56
|
+
* embedded webviews). Same checks as the popup: the backend confirms the SSO sign-in.
|
|
57
|
+
*/
|
|
58
|
+
signInWithGoogleTokens(tokens: {
|
|
59
|
+
idToken?: string;
|
|
60
|
+
accessToken?: string;
|
|
61
|
+
}): Promise<User>;
|
|
44
62
|
/**
|
|
45
63
|
* Initiate a redirect-based sign-in (mobile / iframe contexts where popups
|
|
46
64
|
* are blocked). Call `checkRedirectResult()` on the next page load to
|
|
@@ -81,11 +99,23 @@ export declare class CueAuth {
|
|
|
81
99
|
*/
|
|
82
100
|
mintAppSessionToken(): Promise<string>;
|
|
83
101
|
/**
|
|
84
|
-
* Send a password-reset email
|
|
85
|
-
*
|
|
86
|
-
* confirmation as "if an account exists…".
|
|
102
|
+
* Send a password-reset email (through the Cue backend, in the Cue layout).
|
|
103
|
+
* The backend answers the same for unknown addresses, so callers should word
|
|
104
|
+
* their confirmation as "if an account exists…".
|
|
87
105
|
*/
|
|
88
106
|
resetPassword(email: string): Promise<void>;
|
|
107
|
+
/** Reads an email action link's code without using it up. */
|
|
108
|
+
inspectActionCode(code: string): Promise<CueActionCodeInfo>;
|
|
109
|
+
/** Uses a verify-email, change-email or recover-email code. */
|
|
110
|
+
applyActionCode(code: string): Promise<void>;
|
|
111
|
+
/** Sets a new password with a reset code from a password-reset email. */
|
|
112
|
+
confirmPasswordReset(code: string, newPassword: string): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* Re-reads the signed-in user from Firebase and refreshes the token, e.g. so
|
|
115
|
+
* `emailVerified` is current after a verification link was used. Resolves to
|
|
116
|
+
* the fresh `emailVerified`, or false when signed out.
|
|
117
|
+
*/
|
|
118
|
+
refreshUser(): Promise<boolean>;
|
|
89
119
|
/** Sign out the current user */
|
|
90
120
|
signOut(): Promise<void>;
|
|
91
121
|
/** Currently signed-in user, or null if not authenticated */
|
package/lib/models.d.ts
CHANGED
|
@@ -21,6 +21,13 @@ export interface CueSdkConfig {
|
|
|
21
21
|
appId?: string;
|
|
22
22
|
/** Firebase Measurement ID. Defaults to the QAECY demo app if omitted. */
|
|
23
23
|
measurementId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Host serving Firebase's sign-in handler (`/__/auth/*`). Google and
|
|
26
|
+
* Microsoft show it on their sign-in screens, so an app that proxies the
|
|
27
|
+
* handler on its own domain passes that domain here. Defaults to
|
|
28
|
+
* `<project>.firebaseapp.com`.
|
|
29
|
+
*/
|
|
30
|
+
authDomain?: string;
|
|
24
31
|
/** Target environment. Defaults to 'production'. */
|
|
25
32
|
environment?: CueEnvironment;
|
|
26
33
|
/** Override individual endpoint URLs. Takes precedence over environment. */
|
package/lib/profile.d.ts
CHANGED
|
@@ -37,7 +37,12 @@ export declare class CueProfile {
|
|
|
37
37
|
updatePassword(currentPassword: string, newPassword: string): Promise<void>;
|
|
38
38
|
/** Adds (sets) a password for an account that currently only uses SSO. */
|
|
39
39
|
addPassword(password: string): Promise<void>;
|
|
40
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Requests an e-mail change. The backend checks `password` and sends a
|
|
42
|
+
* confirmation link to the new address; the change happens when it's
|
|
43
|
+
* followed. Throws `CueRequestError` with `code` 'wrongPassword' |
|
|
44
|
+
* 'emailExists' | 'sameEmail' | 'noEmail' | 'tooManyAttempts'.
|
|
45
|
+
*/
|
|
41
46
|
updateEmail(newEmail: string, password: string): Promise<void>;
|
|
42
47
|
/** Creates a new API key for the current user. */
|
|
43
48
|
createAPIKey(expiration: string): Promise<APIKeyDoc>;
|