@supabase/gotrue-js 3.0.0-next.21 → 3.0.0-next.23

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/src/lib/types.ts CHANGED
@@ -1286,6 +1286,7 @@ export interface GoTrueMFAApi {
1286
1286
  * Upon verifying a factor, all other sessions are logged out and the current session's authenticator level is promoted to `aal2`.
1287
1287
  *
1288
1288
  * @category Auth
1289
+ * @subcategory Auth MFA
1289
1290
  *
1290
1291
  * @remarks
1291
1292
  * - Use `totp` or `phone` as the `factorType` and use the returned `id` to create a challenge.
@@ -1366,6 +1367,7 @@ export interface GoTrueMFAApi {
1366
1367
  * factor.
1367
1368
  *
1368
1369
  * @category Auth
1370
+ * @subcategory Auth MFA
1369
1371
  *
1370
1372
  * @remarks
1371
1373
  * - An [enrolled factor](/docs/reference/javascript/auth-mfa-enroll) is required before creating a challenge.
@@ -1439,6 +1441,7 @@ export interface GoTrueMFAApi {
1439
1441
  * provided by the user by entering a code seen in their authenticator app.
1440
1442
  *
1441
1443
  * @category Auth
1444
+ * @subcategory Auth MFA
1442
1445
  *
1443
1446
  * @remarks
1444
1447
  * - To verify a challenge, please [create a challenge](/docs/reference/javascript/auth-mfa-challenge) first.
@@ -1522,6 +1525,7 @@ export interface GoTrueMFAApi {
1522
1525
  * A user has to have an `aal2` authenticator level in order to unenroll a `verified` factor.
1523
1526
  *
1524
1527
  * @category Auth
1528
+ * @subcategory Auth MFA
1525
1529
  *
1526
1530
  * @example Unenroll a factor
1527
1531
  * ```js
@@ -1547,6 +1551,7 @@ export interface GoTrueMFAApi {
1547
1551
  * provided by the user by entering a code seen in their authenticator app.
1548
1552
  *
1549
1553
  * @category Auth
1554
+ * @subcategory Auth MFA
1550
1555
  *
1551
1556
  * @remarks
1552
1557
  * - Intended for use with only TOTP factors.
@@ -1632,6 +1637,7 @@ export interface GoTrueMFAApi {
1632
1637
  *
1633
1638
  *
1634
1639
  * @category Auth
1640
+ * @subcategory Auth MFA
1635
1641
  */
1636
1642
  listFactors(): Promise<AuthMFAListFactorsResponse>
1637
1643
 
@@ -1651,6 +1657,7 @@ export interface GoTrueMFAApi {
1651
1657
  * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
1652
1658
  *
1653
1659
  * @category Auth
1660
+ * @subcategory Auth MFA
1654
1661
  *
1655
1662
  * @remarks
1656
1663
  * - Authenticator Assurance Level (AAL) is the measure of the strength of an authentication mechanism.
@@ -1739,6 +1746,7 @@ export interface GoTrueAdminMFAApi {
1739
1746
  *
1740
1747
  *
1741
1748
  * @category Auth
1749
+ * @subcategory Auth Admin
1742
1750
  *
1743
1751
  * @example List all factors for a user
1744
1752
  * ```js
@@ -1775,6 +1783,7 @@ export interface GoTrueAdminMFAApi {
1775
1783
  * @expermental
1776
1784
  *
1777
1785
  * @category Auth
1786
+ * @subcategory Auth Admin
1778
1787
  *
1779
1788
  * @example Delete a factor for a user
1780
1789
  * ```js
@@ -2141,6 +2150,7 @@ export interface GoTrueAdminOAuthApi {
2141
2150
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2142
2151
  *
2143
2152
  * @category Auth
2153
+ * @subcategory OAuth Admin
2144
2154
  */
2145
2155
  listClients(params?: PageParams): Promise<OAuthClientListResponse>
2146
2156
 
@@ -2151,6 +2161,7 @@ export interface GoTrueAdminOAuthApi {
2151
2161
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2152
2162
  *
2153
2163
  * @category Auth
2164
+ * @subcategory OAuth Admin
2154
2165
  */
2155
2166
  createClient(params: CreateOAuthClientParams): Promise<OAuthClientResponse>
2156
2167
 
@@ -2161,6 +2172,7 @@ export interface GoTrueAdminOAuthApi {
2161
2172
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2162
2173
  *
2163
2174
  * @category Auth
2175
+ * @subcategory OAuth Admin
2164
2176
  */
2165
2177
  getClient(clientId: string): Promise<OAuthClientResponse>
2166
2178
 
@@ -2171,6 +2183,7 @@ export interface GoTrueAdminOAuthApi {
2171
2183
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2172
2184
  *
2173
2185
  * @category Auth
2186
+ * @subcategory OAuth Admin
2174
2187
  */
2175
2188
  updateClient(clientId: string, params: UpdateOAuthClientParams): Promise<OAuthClientResponse>
2176
2189
 
@@ -2181,6 +2194,7 @@ export interface GoTrueAdminOAuthApi {
2181
2194
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2182
2195
  *
2183
2196
  * @category Auth
2197
+ * @subcategory OAuth Admin
2184
2198
  */
2185
2199
  deleteClient(clientId: string): Promise<{ data: null; error: AuthError | null }>
2186
2200
 
@@ -2191,6 +2205,7 @@ export interface GoTrueAdminOAuthApi {
2191
2205
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2192
2206
  *
2193
2207
  * @category Auth
2208
+ * @subcategory OAuth Admin
2194
2209
  */
2195
2210
  regenerateClientSecret(clientId: string): Promise<OAuthClientResponse>
2196
2211
  }
@@ -2398,6 +2413,9 @@ export interface GoTrueAdminCustomProvidersApi {
2398
2413
  * Lists all custom providers with optional type filter.
2399
2414
  *
2400
2415
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2416
+ *
2417
+ * @category Auth
2418
+ * @subcategory Auth Admin
2401
2419
  */
2402
2420
  listProviders(params?: ListCustomProvidersParams): Promise<CustomProviderListResponse>
2403
2421
 
@@ -2411,6 +2429,9 @@ export interface GoTrueAdminCustomProvidersApi {
2411
2429
  * in the document does not match the expected issuer.
2412
2430
  *
2413
2431
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2432
+ *
2433
+ * @category Auth
2434
+ * @subcategory Auth Admin
2414
2435
  */
2415
2436
  createProvider(params: CreateCustomProviderParams): Promise<CustomProviderResponse>
2416
2437
 
@@ -2418,6 +2439,9 @@ export interface GoTrueAdminCustomProvidersApi {
2418
2439
  * Gets details of a specific custom provider by identifier.
2419
2440
  *
2420
2441
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2442
+ *
2443
+ * @category Auth
2444
+ * @subcategory Auth Admin
2421
2445
  */
2422
2446
  getProvider(identifier: string): Promise<CustomProviderResponse>
2423
2447
 
@@ -2430,6 +2454,9 @@ export interface GoTrueAdminCustomProvidersApi {
2430
2454
  * the issuer does not match.
2431
2455
  *
2432
2456
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2457
+ *
2458
+ * @category Auth
2459
+ * @subcategory Auth Admin
2433
2460
  */
2434
2461
  updateProvider(
2435
2462
  identifier: string,
@@ -2440,6 +2467,9 @@ export interface GoTrueAdminCustomProvidersApi {
2440
2467
  * Deletes a custom provider.
2441
2468
  *
2442
2469
  * This function should only be called on a server. Never expose your `service_role` key in the browser.
2470
+ *
2471
+ * @category Auth
2472
+ * @subcategory Auth Admin
2443
2473
  */
2444
2474
  deleteProvider(identifier: string): Promise<{ data: null; error: AuthError | null }>
2445
2475
  }
@@ -2592,6 +2622,7 @@ export interface AuthOAuthServerApi {
2592
2622
  * @returns Authorization details or redirect URL depending on consent status
2593
2623
  *
2594
2624
  * @category Auth
2625
+ * @subcategory OAuth Server
2595
2626
  */
2596
2627
  getAuthorizationDetails(authorizationId: string): Promise<AuthOAuthAuthorizationDetailsResponse>
2597
2628
 
@@ -2608,6 +2639,7 @@ export interface AuthOAuthServerApi {
2608
2639
  * @returns Redirect URL to send the user back to the OAuth client with authorization code
2609
2640
  *
2610
2641
  * @category Auth
2642
+ * @subcategory OAuth Server
2611
2643
  */
2612
2644
  approveAuthorization(
2613
2645
  authorizationId: string,
@@ -2627,6 +2659,7 @@ export interface AuthOAuthServerApi {
2627
2659
  * @returns Redirect URL to send the user back to the OAuth client with error information
2628
2660
  *
2629
2661
  * @category Auth
2662
+ * @subcategory OAuth Server
2630
2663
  */
2631
2664
  denyAuthorization(
2632
2665
  authorizationId: string,
@@ -2640,6 +2673,7 @@ export interface AuthOAuthServerApi {
2640
2673
  * @returns Response with array of OAuth grants with client information and granted scopes
2641
2674
  *
2642
2675
  * @category Auth
2676
+ * @subcategory OAuth Server
2643
2677
  */
2644
2678
  listGrants(): Promise<AuthOAuthGrantsResponse>
2645
2679
 
@@ -2655,6 +2689,7 @@ export interface AuthOAuthServerApi {
2655
2689
  * @returns Empty response on successful revocation
2656
2690
  *
2657
2691
  * @category Auth
2692
+ * @subcategory OAuth Server
2658
2693
  */
2659
2694
  revokeGrant(options: { clientId: string }): Promise<AuthOAuthRevokeGrantResponse>
2660
2695
  }
@@ -2786,26 +2821,97 @@ export type AuthPasskeyAdminDeleteParams = {
2786
2821
  */
2787
2822
  export interface AuthPasskeyApi {
2788
2823
  // Two-step registration
2824
+ /**
2825
+ * Starts the passkey registration ceremony. Fetches a registration challenge
2826
+ * and credential creation options from the server. Used as the first step of
2827
+ * a two-step registration flow when the caller wants to handle
2828
+ * `navigator.credentials.create()` themselves.
2829
+ *
2830
+ * @category Auth
2831
+ * @subcategory Auth Passkey
2832
+ */
2789
2833
  startRegistration(): Promise<AuthPasskeyRegistrationOptionsResponse>
2834
+
2835
+ /**
2836
+ * Verifies a passkey registration credential against a previously issued
2837
+ * challenge. Used as the second step of a two-step registration flow.
2838
+ *
2839
+ * @category Auth
2840
+ * @subcategory Auth Passkey
2841
+ */
2790
2842
  verifyRegistration(
2791
2843
  params: VerifyPasskeyRegistrationParams
2792
2844
  ): Promise<AuthPasskeyRegistrationVerifyResponse>
2793
2845
 
2794
2846
  // Two-step authentication
2847
+ /**
2848
+ * Starts the passkey authentication ceremony. Fetches an authentication
2849
+ * challenge and credential request options from the server. Used as the
2850
+ * first step of a two-step sign-in flow when the caller wants to handle
2851
+ * `navigator.credentials.get()` themselves.
2852
+ *
2853
+ * @category Auth
2854
+ * @subcategory Auth Passkey
2855
+ */
2795
2856
  startAuthentication(
2796
2857
  params?: StartPasskeyAuthenticationParams
2797
2858
  ): Promise<AuthPasskeyAuthenticationOptionsResponse>
2859
+
2860
+ /**
2861
+ * Verifies a passkey authentication credential against a previously issued
2862
+ * challenge. Used as the second step of a two-step sign-in flow.
2863
+ *
2864
+ * @category Auth
2865
+ * @subcategory Auth Passkey
2866
+ */
2798
2867
  verifyAuthentication(
2799
2868
  params: VerifyPasskeyAuthenticationParams
2800
2869
  ): Promise<AuthPasskeyAuthenticationVerifyResponse>
2801
2870
 
2802
2871
  // Management
2872
+ /**
2873
+ * Lists all passkeys registered for the currently signed-in user.
2874
+ *
2875
+ * @category Auth
2876
+ * @subcategory Auth Passkey
2877
+ */
2803
2878
  list(): Promise<AuthPasskeyListResponse>
2879
+
2880
+ /**
2881
+ * Updates a passkey's friendly name.
2882
+ *
2883
+ * @category Auth
2884
+ * @subcategory Auth Passkey
2885
+ */
2804
2886
  update(params: PasskeyUpdateParams): Promise<AuthPasskeyUpdateResponse>
2887
+
2888
+ /**
2889
+ * Deletes a passkey for the currently signed-in user.
2890
+ *
2891
+ * @category Auth
2892
+ * @subcategory Auth Passkey
2893
+ */
2805
2894
  delete(params: PasskeyDeleteParams): Promise<AuthPasskeyDeleteResponse>
2806
2895
  }
2807
2896
 
2808
2897
  export interface GoTrueAdminPasskeyApi {
2898
+ /**
2899
+ * Lists all passkeys registered for a specific user.
2900
+ *
2901
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
2902
+ *
2903
+ * @category Auth
2904
+ * @subcategory Passkey Admin
2905
+ */
2809
2906
  listPasskeys(params: AuthPasskeyAdminListParams): Promise<AuthPasskeyListResponse>
2907
+
2908
+ /**
2909
+ * Deletes a specific passkey for a specific user.
2910
+ *
2911
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
2912
+ *
2913
+ * @category Auth
2914
+ * @subcategory Passkey Admin
2915
+ */
2810
2916
  deletePasskey(params: AuthPasskeyAdminDeleteParams): Promise<AuthPasskeyDeleteResponse>
2811
2917
  }
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '3.0.0-next.21'
7
+ export const version = '3.0.0-next.23'