@motherbase/client 1.3.1 → 1.4.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.
Files changed (57) hide show
  1. package/README.md +284 -265
  2. package/dist/auth.d.ts +143 -14
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js +317 -14
  5. package/dist/auth.js.map +1 -1
  6. package/dist/channel.d.ts +15 -12
  7. package/dist/channel.d.ts.map +1 -1
  8. package/dist/channel.js.map +1 -1
  9. package/dist/compat.d.ts +40 -0
  10. package/dist/compat.d.ts.map +1 -0
  11. package/dist/compat.js +98 -0
  12. package/dist/compat.js.map +1 -0
  13. package/dist/cookie.d.ts +10 -2
  14. package/dist/cookie.d.ts.map +1 -1
  15. package/dist/cookie.js +13 -5
  16. package/dist/cookie.js.map +1 -1
  17. package/dist/database.d.ts +20 -1
  18. package/dist/database.d.ts.map +1 -1
  19. package/dist/functions.d.ts +36 -0
  20. package/dist/functions.d.ts.map +1 -1
  21. package/dist/functions.js +56 -5
  22. package/dist/functions.js.map +1 -1
  23. package/dist/http.d.ts +27 -0
  24. package/dist/http.d.ts.map +1 -1
  25. package/dist/http.js +57 -9
  26. package/dist/http.js.map +1 -1
  27. package/dist/index.d.ts +72 -5
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +163 -12
  30. package/dist/index.js.map +1 -1
  31. package/dist/postgrest.d.ts +88 -1
  32. package/dist/postgrest.d.ts.map +1 -1
  33. package/dist/postgrest.js +179 -17
  34. package/dist/postgrest.js.map +1 -1
  35. package/dist/query.d.ts +97 -0
  36. package/dist/query.d.ts.map +1 -0
  37. package/dist/query.js +94 -0
  38. package/dist/query.js.map +1 -0
  39. package/dist/session.d.ts +12 -1
  40. package/dist/session.d.ts.map +1 -1
  41. package/dist/session.js +49 -3
  42. package/dist/session.js.map +1 -1
  43. package/dist/storage.d.ts +172 -5
  44. package/dist/storage.d.ts.map +1 -1
  45. package/dist/storage.js +249 -6
  46. package/dist/storage.js.map +1 -1
  47. package/dist/testing.d.ts +38 -0
  48. package/dist/testing.d.ts.map +1 -0
  49. package/dist/testing.js +50 -0
  50. package/dist/testing.js.map +1 -0
  51. package/dist/types.d.ts +257 -20
  52. package/dist/types.d.ts.map +1 -1
  53. package/dist/warn.d.ts +4 -0
  54. package/dist/warn.d.ts.map +1 -0
  55. package/dist/warn.js +27 -0
  56. package/dist/warn.js.map +1 -0
  57. package/package.json +10 -2
package/dist/auth.d.ts CHANGED
@@ -2,7 +2,7 @@ import { MfaClient } from './mfa.js';
2
2
  import { AuthAdminClient } from './admin.js';
3
3
  import type { HttpClient } from './http.js';
4
4
  import type { SessionStore } from './session.js';
5
- import type { AuthChangeListener, MotherbaseResponse, Session, User } from './types.js';
5
+ import type { AuthChangeListener, MotherbaseResponse, Session, User, UserIdentity } from './types.js';
6
6
  export interface SignUpCredentials {
7
7
  email: string;
8
8
  password: string;
@@ -14,14 +14,23 @@ export interface SignInWithPasswordCredentials {
14
14
  password: string;
15
15
  }
16
16
  export interface SignInWithOtpCredentials {
17
- email: string;
17
+ email?: string;
18
+ /** E.164 phone number. Routes to the SMS one-time code flow instead. */
19
+ phone?: string;
18
20
  }
19
21
  export interface VerifyOtpParams {
20
- email: string;
21
- /** The OTP code sent to the email. Named `token` for supabase-js parity. */
22
+ email?: string;
23
+ /** E.164 phone number, when the code was sent by SMS. */
24
+ phone?: string;
25
+ /** The code that was sent. Named `token` for supabase-js parity. */
22
26
  token: string;
23
- /** Accepted for supabase-js signature parity; only the email sign-in OTP flow is supported. */
24
- type?: 'email';
27
+ /**
28
+ * supabase-js verification type. The channel actually follows the identifier
29
+ * you pass; this only disambiguates if both are present. `recovery` and
30
+ * `email_change` are not routed: use `resetPassword` for the first, and
31
+ * email changes are not supported.
32
+ */
33
+ type?: 'email' | 'sms' | 'phone_change' | 'recovery' | 'email_change' | 'signup';
25
34
  }
26
35
  export interface SignInWithOAuthCredentials {
27
36
  /** Social provider id, e.g. 'google' or 'apple'. Must be enabled on the backend. */
@@ -43,7 +52,7 @@ export interface DeleteUserAttributes {
43
52
  callbackURL?: string;
44
53
  }
45
54
  export interface UpdateUserAttributes {
46
- /** New password. Requires `currentPassword` — the backend does not allow a
55
+ /** New password. Requires `currentPassword`. The backend does not allow a
47
56
  * blind password change from an authenticated session. */
48
57
  password?: string;
49
58
  currentPassword?: string;
@@ -84,6 +93,7 @@ export declare class AuthClient {
84
93
  * these with a publishable key is a 401, not a missing method.
85
94
  */
86
95
  readonly admin: AuthAdminClient;
96
+ private autoRefreshTimer;
87
97
  constructor(http: HttpClient, store: SessionStore);
88
98
  signUp(credentials: SignUpCredentials): Promise<MotherbaseResponse<{
89
99
  user: User | null;
@@ -109,12 +119,41 @@ export declare class AuthClient {
109
119
  }): Promise<{
110
120
  error: MotherbaseResponse<null>['error'];
111
121
  }>;
112
- /** Send a one-time sign-in code by email. Pair with `verifyOtp` to complete sign-in. */
122
+ /**
123
+ * Send a one-time sign-in code, by email or by SMS. Pair with `verifyOtp` to
124
+ * complete the sign-in.
125
+ *
126
+ * `{ phone }` routes to the phone-number plugin, which the project has to
127
+ * have enabled with an SMS sender configured; without one the call resolves
128
+ * with the backend's error rather than pretending a code was sent.
129
+ */
113
130
  signInWithOtp(credentials: SignInWithOtpCredentials): Promise<{
114
131
  data: Record<string, never>;
115
132
  error: MotherbaseResponse<null>['error'];
116
133
  }>;
117
- /** Complete a `signInWithOtp` sign-in using the code sent to the user's email. */
134
+ /**
135
+ * Send the one-time code again, supabase-js style.
136
+ *
137
+ * supabase-js names the flows `signup` (confirm a new address), `email_change`
138
+ * and `recovery`; Better Auth names them `email-verification` and
139
+ * `forget-password`. The mapping lives here so ported code keeps working.
140
+ * `sms` and `phone_change` re-send an SMS code through the phone-number flow.
141
+ */
142
+ resend(params: {
143
+ type: 'signup' | 'email_change' | 'recovery' | 'sms' | 'phone_change';
144
+ email?: string;
145
+ phone?: string;
146
+ }): Promise<{
147
+ data: Record<string, never>;
148
+ error: MotherbaseResponse<null>['error'];
149
+ }>;
150
+ /**
151
+ * Complete a `signInWithOtp` sign-in with the code that was sent.
152
+ *
153
+ * The channel follows the identifier, as in supabase-js: `{ phone }` verifies
154
+ * an SMS code, `{ email }` an email one. `type` is accepted for signature
155
+ * parity and only disambiguates when both are somehow present.
156
+ */
118
157
  verifyOtp(params: VerifyOtpParams): Promise<MotherbaseResponse<{
119
158
  user: User | null;
120
159
  session: Session | null;
@@ -152,7 +191,7 @@ export declare class AuthClient {
152
191
  }>>;
153
192
  /**
154
193
  * Update the signed-in user's profile fields and/or password. Password
155
- * changes require `currentPassword` (a Better Auth requirement — there is no
194
+ * changes require `currentPassword` (a Better Auth requirement. There is no
156
195
  * blind password overwrite from an authenticated session).
157
196
  */
158
197
  updateUser(attributes: UpdateUserAttributes): Promise<MotherbaseResponse<{
@@ -160,7 +199,7 @@ export declare class AuthClient {
160
199
  }>>;
161
200
  /**
162
201
  * Permanently delete the signed-in user's account. Not part of the
163
- * supabase-js client surface (there it's admin-only) — kept here because
202
+ * supabase-js client surface (there it's admin-only). Kept here because
164
203
  * self-service account deletion is a real product need. Requires the
165
204
  * backend's `delete-user` flow to be enabled; clears the local session on
166
205
  * success.
@@ -172,7 +211,7 @@ export declare class AuthClient {
172
211
  * Adopt an externally-obtained access token as the current session (e.g. one
173
212
  * captured from an OAuth redirect). Validates it against the server before
174
213
  * persisting. `refresh_token` is accepted for supabase-js signature parity
175
- * and unused — Better Auth bearer sessions have none.
214
+ * and unused: Better Auth bearer sessions have none.
176
215
  */
177
216
  setSession(currentSession: {
178
217
  access_token: string;
@@ -205,19 +244,109 @@ export declare class AuthClient {
205
244
  getUser(): Promise<MotherbaseResponse<{
206
245
  user: User | null;
207
246
  }>>;
208
- /** The locally-held session, if any (no network call). */
247
+ /**
248
+ * NEVER USE FOR AN AUTHORIZATION DECISION. Use {@link getUser} instead.
249
+ *
250
+ * The locally-held session, if any (no network call). It is whatever the
251
+ * caller's cookie or storage said, parsed: unsigned JSON the browser sent,
252
+ * which anyone can set by hand. `session.user.id`, `.email` and `.role` are
253
+ * therefore attacker-controlled, and an admin allowlist checked against
254
+ * them is checked against nothing.
255
+ *
256
+ * Reads and writes through `from()` are unaffected: they carry the access
257
+ * token to the backend, which verifies it under RLS. It is the decisions
258
+ * your own app takes from `session.user` that are forgeable.
259
+ *
260
+ * `getUser()` costs one round trip and returns the user the backend
261
+ * confirms, in the same `{ data, error }` shape. Prefer it everywhere but a
262
+ * cosmetic "am I probably signed in" check.
263
+ */
209
264
  getSession(): Promise<MotherbaseResponse<{
210
265
  session: Session | null;
211
266
  }>>;
212
267
  /**
213
268
  * Revalidate the current session against the server. Better Auth bearer
214
- * sessions have no refresh token — if the session is still valid the user is
269
+ * sessions have no refresh token: if the session is still valid the user is
215
270
  * refreshed; otherwise the local session is cleared.
216
271
  */
217
272
  refreshSession(): Promise<MotherbaseResponse<{
218
273
  user: User | null;
219
274
  session: Session | null;
220
275
  }>>;
276
+ /**
277
+ * Subscribe to auth changes, supabase-js style.
278
+ *
279
+ * The callback fires once with `INITIAL_SESSION` as soon as the stored
280
+ * session has been read, before any later event. That first call is not a
281
+ * nicety: the standard Supabase bootstrap is
282
+ * `if (event === 'INITIAL_SESSION') setLoading(false)`, and without it the
283
+ * app renders its loading state forever for a signed-out visitor, who never
284
+ * produces any other event.
285
+ *
286
+ * It is delivered asynchronously (after hydration), so unsubscribing
287
+ * synchronously suppresses it, exactly as in supabase-js.
288
+ */
289
+ /**
290
+ * The providers linked to the signed-in user, in the supabase-js identity
291
+ * shape. Backed by Better Auth's `list-accounts`, which is why `email` shows
292
+ * up as an identity for a password account: it is a real linked credential,
293
+ * exactly as in Supabase.
294
+ */
295
+ getUserIdentities(): Promise<MotherbaseResponse<{
296
+ identities: UserIdentity[];
297
+ }>>;
298
+ /**
299
+ * Link another provider to the signed-in user. Like `signInWithOAuth`, this
300
+ * only starts the flow: the browser is sent to the provider and comes back
301
+ * through the callback.
302
+ */
303
+ linkIdentity(credentials: SignInWithOAuthCredentials): Promise<MotherbaseResponse<{
304
+ provider: string;
305
+ url: string | null;
306
+ }>>;
307
+ /** Unlink a provider from the signed-in user. */
308
+ unlinkIdentity(identity: {
309
+ provider: string;
310
+ id?: string;
311
+ identity_id?: string;
312
+ }): Promise<MotherbaseResponse<Record<string, never>>>;
313
+ /**
314
+ * Native mobile sign-in with a provider id token (Sign in with Apple, Google
315
+ * One Tap), routed to Better Auth's social sign-in with an `idToken`.
316
+ * The provider must be configured on the backend.
317
+ */
318
+ signInWithIdToken(params: {
319
+ provider: string;
320
+ token: string;
321
+ access_token?: string;
322
+ nonce?: string;
323
+ }): Promise<MotherbaseResponse<{
324
+ user: User | null;
325
+ session: Session | null;
326
+ }>>;
327
+ /**
328
+ * Claims for the current session, as a JWT payload.
329
+ *
330
+ * supabase-js reads them out of the access token, which is itself a JWT.
331
+ * A Better Auth session token is an opaque bearer, so this asks the server's
332
+ * jwt plugin to mint one and decodes it. The decode is NOT a verification:
333
+ * the token came from the authenticated endpoint over TLS, and a client
334
+ * verifying a token it just asked for proves nothing. Verify server side,
335
+ * against `/api/auth/jwks`.
336
+ */
337
+ getClaims(): Promise<MotherbaseResponse<{
338
+ claims: Record<string, unknown>;
339
+ token: string;
340
+ }>>;
341
+ /**
342
+ * Revalidate the session on a timer, the way supabase-js does while the tab
343
+ * is focused. Motherbase refreshes on a 401 already, so this is opt-in: it
344
+ * exists so a ported app that calls it keeps working, and so a long-lived
345
+ * screen notices a revoked session without waiting for its next request.
346
+ */
347
+ startAutoRefresh(intervalMs?: number): void;
348
+ /** Stop the timer started by `startAutoRefresh`. Safe to call when none runs. */
349
+ stopAutoRefresh(): void;
221
350
  onAuthStateChange(callback: AuthChangeListener): {
222
351
  data: {
223
352
  subscription: Subscription;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,eAAe,EAA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