diff --git a/pkg/api/client.gen.go b/pkg/api/client.gen.go index 644f2b852e..45e92c6a4b 100644 --- a/pkg/api/client.gen.go +++ b/pkg/api/client.gen.go @@ -3049,6 +3049,22 @@ func NewV1AuthorizeUserRequest(server string, params *V1AuthorizeUserParams) (*h } + if params.Resource != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "resource", runtime.ParamLocationQuery, *params.Resource); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + queryURL.RawQuery = queryValues.Encode() } diff --git a/pkg/api/types.gen.go b/pkg/api/types.gen.go index c719cec23c..061d3b3f69 100644 --- a/pkg/api/types.gen.go +++ b/pkg/api/types.gen.go @@ -492,6 +492,11 @@ const ( RefreshToken OAuthTokenBodyGrantType = "refresh_token" ) +// Defines values for OAuthTokenBodyResource. +const ( + OAuthTokenBodyResourceHttpsapiSupabaseGreenmcp OAuthTokenBodyResource = "https://api.supabase.green/mcp" +) + // Defines values for OAuthTokenResponseTokenType. const ( Bearer OAuthTokenResponseTokenType = "Bearer" @@ -954,6 +959,11 @@ const ( V1AuthorizeUserParamsCodeChallengeMethodSha256 V1AuthorizeUserParamsCodeChallengeMethod = "sha256" ) +// Defines values for V1AuthorizeUserParamsResource. +const ( + V1AuthorizeUserParamsResourceHttpsapiSupabaseGreenmcp V1AuthorizeUserParamsResource = "https://api.supabase.green/mcp" +) + // Defines values for V1OauthAuthorizeProjectClaimParamsResponseType. const ( V1OauthAuthorizeProjectClaimParamsResponseTypeCode V1OauthAuthorizeProjectClaimParamsResponseType = "code" @@ -1938,11 +1948,17 @@ type OAuthTokenBody struct { GrantType *OAuthTokenBodyGrantType `json:"grant_type,omitempty"` RedirectUri *string `json:"redirect_uri,omitempty"` RefreshToken *string `json:"refresh_token,omitempty"` + + // Resource Resource indicator for MCP (Model Context Protocol) clients + Resource *OAuthTokenBodyResource `json:"resource,omitempty"` } // OAuthTokenBodyGrantType defines model for OAuthTokenBody.GrantType. type OAuthTokenBodyGrantType string +// OAuthTokenBodyResource Resource indicator for MCP (Model Context Protocol) clients +type OAuthTokenBodyResource string + // OAuthTokenResponse defines model for OAuthTokenResponse. type OAuthTokenResponse struct { AccessToken string `json:"access_token"` @@ -3039,6 +3055,9 @@ type V1AuthorizeUserParams struct { // OrganizationSlug Organization slug OrganizationSlug *string `form:"organization_slug,omitempty" json:"organization_slug,omitempty"` + + // Resource Resource indicator for MCP (Model Context Protocol) clients + Resource *V1AuthorizeUserParamsResource `form:"resource,omitempty" json:"resource,omitempty"` } // V1AuthorizeUserParamsResponseType defines parameters for V1AuthorizeUser. @@ -3047,6 +3066,9 @@ type V1AuthorizeUserParamsResponseType string // V1AuthorizeUserParamsCodeChallengeMethod defines parameters for V1AuthorizeUser. type V1AuthorizeUserParamsCodeChallengeMethod string +// V1AuthorizeUserParamsResource defines parameters for V1AuthorizeUser. +type V1AuthorizeUserParamsResource string + // V1OauthAuthorizeProjectClaimParams defines parameters for V1OauthAuthorizeProjectClaim. type V1OauthAuthorizeProjectClaimParams struct { // ProjectRef Project ref