@supabase/gotrue-js 2.79.1-canary.0 → 2.79.1-canary.2

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
@@ -1448,3 +1448,145 @@ export interface JWK {
1448
1448
 
1449
1449
  export const SIGN_OUT_SCOPES = ['global', 'local', 'others'] as const
1450
1450
  export type SignOutScope = (typeof SIGN_OUT_SCOPES)[number]
1451
+
1452
+ /**
1453
+ * OAuth client grant types supported by the OAuth 2.1 server.
1454
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1455
+ */
1456
+ export type OAuthClientGrantType = 'authorization_code' | 'refresh_token'
1457
+
1458
+ /**
1459
+ * OAuth client response types supported by the OAuth 2.1 server.
1460
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1461
+ */
1462
+ export type OAuthClientResponseType = 'code'
1463
+
1464
+ /**
1465
+ * OAuth client type indicating whether the client can keep credentials confidential.
1466
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1467
+ */
1468
+ export type OAuthClientType = 'public' | 'confidential'
1469
+
1470
+ /**
1471
+ * OAuth client registration type.
1472
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1473
+ */
1474
+ export type OAuthClientRegistrationType = 'dynamic' | 'manual'
1475
+
1476
+ /**
1477
+ * OAuth client object returned from the OAuth 2.1 server.
1478
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1479
+ */
1480
+ export type OAuthClient = {
1481
+ /** Unique identifier for the OAuth client */
1482
+ client_id: string
1483
+ /** Human-readable name of the OAuth client */
1484
+ client_name: string
1485
+ /** Client secret (only returned on registration and regeneration) */
1486
+ client_secret?: string
1487
+ /** Type of OAuth client */
1488
+ client_type: OAuthClientType
1489
+ /** Token endpoint authentication method */
1490
+ token_endpoint_auth_method: string
1491
+ /** Registration type of the client */
1492
+ registration_type: OAuthClientRegistrationType
1493
+ /** URI of the OAuth client */
1494
+ client_uri?: string
1495
+ /** Array of allowed redirect URIs */
1496
+ redirect_uris: string[]
1497
+ /** Array of allowed grant types */
1498
+ grant_types: OAuthClientGrantType[]
1499
+ /** Array of allowed response types */
1500
+ response_types: OAuthClientResponseType[]
1501
+ /** Scope of the OAuth client */
1502
+ scope?: string
1503
+ /** Timestamp when the client was created */
1504
+ created_at: string
1505
+ /** Timestamp when the client was last updated */
1506
+ updated_at: string
1507
+ }
1508
+
1509
+ /**
1510
+ * Parameters for creating a new OAuth client.
1511
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1512
+ */
1513
+ export type CreateOAuthClientParams = {
1514
+ /** Human-readable name of the OAuth client */
1515
+ client_name: string
1516
+ /** URI of the OAuth client */
1517
+ client_uri?: string
1518
+ /** Array of allowed redirect URIs */
1519
+ redirect_uris: string[]
1520
+ /** Array of allowed grant types (optional, defaults to authorization_code and refresh_token) */
1521
+ grant_types?: OAuthClientGrantType[]
1522
+ /** Array of allowed response types (optional, defaults to code) */
1523
+ response_types?: OAuthClientResponseType[]
1524
+ /** Scope of the OAuth client */
1525
+ scope?: string
1526
+ }
1527
+
1528
+ /**
1529
+ * Response type for OAuth client operations.
1530
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1531
+ */
1532
+ export type OAuthClientResponse = RequestResult<OAuthClient>
1533
+
1534
+ /**
1535
+ * Response type for listing OAuth clients.
1536
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1537
+ */
1538
+ export type OAuthClientListResponse =
1539
+ | {
1540
+ data: { clients: OAuthClient[]; aud: string } & Pagination
1541
+ error: null
1542
+ }
1543
+ | {
1544
+ data: { clients: [] }
1545
+ error: AuthError
1546
+ }
1547
+
1548
+ /**
1549
+ * Contains all OAuth client administration methods.
1550
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1551
+ */
1552
+ export interface GoTrueAdminOAuthApi {
1553
+ /**
1554
+ * Lists all OAuth clients with optional pagination.
1555
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1556
+ *
1557
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1558
+ */
1559
+ listClients(params?: PageParams): Promise<OAuthClientListResponse>
1560
+
1561
+ /**
1562
+ * Creates a new OAuth client.
1563
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1564
+ *
1565
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1566
+ */
1567
+ createClient(params: CreateOAuthClientParams): Promise<OAuthClientResponse>
1568
+
1569
+ /**
1570
+ * Gets details of a specific OAuth client.
1571
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1572
+ *
1573
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1574
+ */
1575
+ getClient(clientId: string): Promise<OAuthClientResponse>
1576
+
1577
+ /**
1578
+ * Deletes an OAuth client.
1579
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1580
+ *
1581
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1582
+ */
1583
+ deleteClient(clientId: string): Promise<OAuthClientResponse>
1584
+
1585
+ /**
1586
+ * Regenerates the secret for an OAuth client.
1587
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
1588
+ *
1589
+ * This function should only be called on a server. Never expose your `service_role` key in the browser.
1590
+ */
1591
+ regenerateClientSecret(clientId: string): Promise<OAuthClientResponse>
1592
+ }
@@ -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 = '2.79.1-canary.0'
7
+ export const version = '2.79.1-canary.2'