diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86937e48a..00473f313 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,9 +2,9 @@ ## Release process -We release to stable channel every two weeks. +We release to stable channel every two weeks via `main` branch. -We release to beta channel on merge to `main` branch. +We release to beta channel on merge to `develop` branch. Hotfixes are released manually. Follow these steps: diff --git a/internal/db/start/start.go b/internal/db/start/start.go index 322406557..7febc9294 100644 --- a/internal/db/start/start.go +++ b/internal/db/start/start.go @@ -317,7 +317,6 @@ func initStorageJob(host string) utils.DockerJob { // TODO: https://github.com/supabase/storage-api/issues/55 "REGION=stub", "GLOBAL_S3_BUCKET=stub", - "SIGNED_UPLOAD_URL_EXPIRATION_TIME=7200", }, Cmd: []string{"node", "dist/scripts/migrate-call.js"}, } diff --git a/internal/debug/postgres.go b/internal/debug/postgres.go index 9bc275b02..6e0929e23 100644 --- a/internal/debug/postgres.go +++ b/internal/debug/postgres.go @@ -59,8 +59,12 @@ func (p *Proxy) DialFunc(ctx context.Context, network, addr string) (net.Conn, e go frontend.forward(backend, p.errChan) for { - // Since pgx closes connection first, every EOF is seen as unexpected - if err := <-p.errChan; err != nil && !errors.Is(err, io.ErrUnexpectedEOF) { + if err := <-p.errChan; err != nil && + // Since pgx closes connection first, every EOF is seen as unexpected + !errors.Is(err, io.ErrUnexpectedEOF) && + // Frontend might receive a reply after pgx closes the connection, in + // which case the backend will write to a closed pipe. So ignore. + !errors.Is(err, io.ErrClosedPipe) { panic(err) } } diff --git a/internal/start/start.go b/internal/start/start.go index 15b3209f3..f0fa76e75 100644 --- a/internal/start/start.go +++ b/internal/start/start.go @@ -79,6 +79,7 @@ type kongConfig struct { RestId string RealtimeId string StorageId string + StudioId string PgmetaId string EdgeRuntimeId string LogflareId string @@ -340,6 +341,7 @@ EOF RestId: utils.RestId, RealtimeId: utils.Config.Realtime.TenantId, StorageId: utils.StorageId, + StudioId: utils.StudioId, PgmetaId: utils.PgmetaId, EdgeRuntimeId: utils.EdgeRuntimeId, LogflareId: utils.LogflareId, @@ -347,9 +349,14 @@ EOF ApiHost: utils.Config.Hostname, ApiPort: utils.Config.Api.Port, BearerToken: fmt.Sprintf( - // Pass down apikey as Authorization header for backwards compatibility with legacy JWT. - // If Authorization header is already set, Kong simply skips evaluating this Lua script. - `$((function() return (headers.apikey == '%s' and 'Bearer %s') or (headers.apikey == '%s' and 'Bearer %s') or headers.apikey end)())`, + // If Authorization header is set to a self-minted JWT, we want to pass it down. + // Legacy supabase-js may set Authorization header to Bearer . We must remove it + // to avoid failing JWT validation. + // If Authorization header is missing, we want to match against apikey header to set the + // default JWT for downstream services. + // Finally, the apikey header may be set to a legacy JWT. In that case, we want to copy + // it to Authorization header for backwards compatibility. + `$((function() return (headers.authorization ~= nil and headers.authorization:sub(1, 10) ~= 'Bearer sb_' and headers.authorization) or (headers.apikey == '%s' and 'Bearer %s') or (headers.apikey == '%s' and 'Bearer %s') or headers.apikey end)())`, utils.Config.Auth.SecretKey.Value, utils.Config.Auth.ServiceRoleKey.Value, utils.Config.Auth.PublishableKey.Value, @@ -692,6 +699,15 @@ EOF } env = append(env, fmt.Sprintf("GOTRUE_EXTERNAL_WEB3_SOLANA_ENABLED=%v", utils.Config.Auth.Web3.Solana.Enabled)) + // OAuth server configuration + if utils.Config.Auth.OAuthServer.Enabled { + env = append(env, + fmt.Sprintf("GOTRUE_OAUTH_SERVER_ENABLED=%v", utils.Config.Auth.OAuthServer.Enabled), + "GOTRUE_OAUTH_SERVER_AUTHORIZATION_PATH="+utils.Config.Auth.OAuthServer.AuthorizationUrlPath, + fmt.Sprintf("GOTRUE_OAUTH_SERVER_ALLOW_DYNAMIC_REGISTRATION=%v", utils.Config.Auth.OAuthServer.AllowDynamicRegistration), + ) + } + if _, err := utils.DockerStart( ctx, container.Config{ @@ -883,6 +899,7 @@ EOF "S3_PROTOCOL_PREFIX=/storage/v1", "UPLOAD_FILE_SIZE_LIMIT=52428800000", "UPLOAD_FILE_SIZE_LIMIT_STANDARD=5242880000", + "SIGNED_UPLOAD_URL_EXPIRATION_TIME=7200", }, Healthcheck: &container.HealthConfig{ // For some reason, localhost resolves to IPv6 address on GitPod which breaks healthcheck. diff --git a/internal/start/templates/kong.yml b/internal/start/templates/kong.yml index fc9525f8f..d722139af 100644 --- a/internal/start/templates/kong.yml +++ b/internal/start/templates/kong.yml @@ -12,7 +12,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: auth-v1-open-callback @@ -27,7 +27,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: auth-v1-open-authorize @@ -42,7 +42,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: auth-v1 @@ -57,7 +57,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: rest-v1 @@ -72,7 +72,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: rest-admin-v1 @@ -87,7 +87,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: graphql-v1 @@ -105,6 +105,8 @@ services: add: headers: - "Content-Profile: graphql_public" + replace: + headers: - "Authorization: {{ .BearerToken }}" - name: realtime-v1-ws _comment: "Realtime: /realtime/v1/* -> ws://realtime:4000/socket/websocket" @@ -119,7 +121,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: realtime-v1-longpoll @@ -135,7 +137,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: realtime-v1-rest @@ -151,7 +153,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: storage-v1 @@ -166,7 +168,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: pg-meta @@ -192,7 +194,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: analytics-v1 @@ -207,7 +209,7 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" - name: pooler-v2-ws @@ -223,6 +225,16 @@ services: - name: cors - name: request-transformer config: - add: + replace: headers: - "Authorization: {{ .BearerToken }}" + - name: mcp + _comment: "MCP: /mcp -> http://studio:3000/api/mcp" + url: http://{{ .StudioId }}:3000/api/mcp + routes: + - name: mcp + strip_path: true + paths: + - /mcp + plugins: + - name: cors diff --git a/internal/status/status.go b/internal/status/status.go index cb648b2c3..4ed7afde2 100644 --- a/internal/status/status.go +++ b/internal/status/status.go @@ -28,6 +28,7 @@ type CustomName struct { ApiURL string `env:"api.url,default=API_URL"` GraphqlURL string `env:"api.graphql_url,default=GRAPHQL_URL"` StorageS3URL string `env:"api.storage_s3_url,default=STORAGE_S3_URL"` + McpURL string `env:"api.mcp_url,default=MCP_URL"` DbURL string `env:"db.url,default=DB_URL"` StudioURL string `env:"studio.url,default=STUDIO_URL"` InbucketURL string `env:"inbucket.url,default=INBUCKET_URL,deprecated"` @@ -46,25 +47,35 @@ func (c *CustomName) toValues(exclude ...string) map[string]string { values := map[string]string{ c.DbURL: fmt.Sprintf("postgresql://%s@%s:%d/postgres", url.UserPassword("postgres", utils.Config.Db.Password), utils.Config.Hostname, utils.Config.Db.Port), } - if utils.Config.Api.Enabled && !utils.SliceContains(exclude, utils.RestId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Api.Image)) { + + apiEnabled := utils.Config.Api.Enabled && !utils.SliceContains(exclude, utils.RestId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Api.Image)) + studioEnabled := utils.Config.Studio.Enabled && !utils.SliceContains(exclude, utils.StudioId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Studio.Image)) + authEnabled := utils.Config.Auth.Enabled && !utils.SliceContains(exclude, utils.GotrueId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Auth.Image)) + inbucketEnabled := utils.Config.Inbucket.Enabled && !utils.SliceContains(exclude, utils.InbucketId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Inbucket.Image)) + storageEnabled := utils.Config.Storage.Enabled && !utils.SliceContains(exclude, utils.StorageId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Storage.Image)) + + if apiEnabled { values[c.ApiURL] = utils.Config.Api.ExternalUrl values[c.GraphqlURL] = utils.GetApiUrl("/graphql/v1") + if studioEnabled { + values[c.McpURL] = utils.GetApiUrl("/mcp") + } } - if utils.Config.Studio.Enabled && !utils.SliceContains(exclude, utils.StudioId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Studio.Image)) { + if studioEnabled { values[c.StudioURL] = fmt.Sprintf("http://%s:%d", utils.Config.Hostname, utils.Config.Studio.Port) } - if utils.Config.Auth.Enabled && !utils.SliceContains(exclude, utils.GotrueId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Auth.Image)) { + if authEnabled { values[c.PublishableKey] = utils.Config.Auth.PublishableKey.Value values[c.SecretKey] = utils.Config.Auth.SecretKey.Value values[c.JWTSecret] = utils.Config.Auth.JwtSecret.Value values[c.AnonKey] = utils.Config.Auth.AnonKey.Value values[c.ServiceRoleKey] = utils.Config.Auth.ServiceRoleKey.Value } - if utils.Config.Inbucket.Enabled && !utils.SliceContains(exclude, utils.InbucketId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Inbucket.Image)) { + if inbucketEnabled { values[c.MailpitURL] = fmt.Sprintf("http://%s:%d", utils.Config.Hostname, utils.Config.Inbucket.Port) values[c.InbucketURL] = fmt.Sprintf("http://%s:%d", utils.Config.Hostname, utils.Config.Inbucket.Port) } - if utils.Config.Storage.Enabled && !utils.SliceContains(exclude, utils.StorageId) && !utils.SliceContains(exclude, utils.ShortContainerImageName(utils.Config.Storage.Image)) { + if storageEnabled { values[c.StorageS3URL] = utils.GetApiUrl("/storage/v1/s3") values[c.StorageS3AccessKeyId] = utils.Config.Storage.S3Credentials.AccessKeyId values[c.StorageS3SecretAccessKey] = utils.Config.Storage.S3Credentials.SecretAccessKey @@ -202,6 +213,7 @@ func PrettyPrint(w io.Writer, exclude ...string) { ApiURL: " " + utils.Aqua("API URL"), GraphqlURL: " " + utils.Aqua("GraphQL URL"), StorageS3URL: " " + utils.Aqua("S3 Storage URL"), + McpURL: " " + utils.Aqua("MCP URL"), DbURL: " " + utils.Aqua("Database URL"), StudioURL: " " + utils.Aqua("Studio URL"), InbucketURL: " " + utils.Aqua("Inbucket URL"), diff --git a/package.json b/package.json index 39f6500c4..283515106 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "bin-links": "^5.0.0", "https-proxy-agent": "^7.0.2", "node-fetch": "^3.3.2", - "tar": "7.4.4" + "tar": "7.5.1" }, "release": { "branches": [ diff --git a/pkg/api/client.gen.go b/pkg/api/client.gen.go index 816164f50..704a94372 100644 --- a/pkg/api/client.gen.go +++ b/pkg/api/client.gen.go @@ -169,6 +169,23 @@ type ClientInterface interface { // V1GetProject request V1GetProject(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) + // V1ListActionRuns request + V1ListActionRuns(ctx context.Context, ref string, params *V1ListActionRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // V1CountActionRuns request + V1CountActionRuns(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // V1GetActionRun request + V1GetActionRun(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // V1GetActionRunLogs request + V1GetActionRunLogs(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // V1UpdateActionRunStatusWithBody request with any body + V1UpdateActionRunStatusWithBody(ctx context.Context, ref string, runId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + V1UpdateActionRunStatus(ctx context.Context, ref string, runId string, body V1UpdateActionRunStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // V1GetPerformanceAdvisors request V1GetPerformanceAdvisors(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -940,6 +957,78 @@ func (c *Client) V1GetProject(ctx context.Context, ref string, reqEditors ...Req return c.Client.Do(req) } +func (c *Client) V1ListActionRuns(ctx context.Context, ref string, params *V1ListActionRunsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1ListActionRunsRequest(c.Server, ref, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) V1CountActionRuns(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1CountActionRunsRequest(c.Server, ref) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) V1GetActionRun(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetActionRunRequest(c.Server, ref, runId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) V1GetActionRunLogs(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1GetActionRunLogsRequest(c.Server, ref, runId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) V1UpdateActionRunStatusWithBody(ctx context.Context, ref string, runId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1UpdateActionRunStatusRequestWithBody(c.Server, ref, runId, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) V1UpdateActionRunStatus(ctx context.Context, ref string, runId string, body V1UpdateActionRunStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewV1UpdateActionRunStatusRequest(c.Server, ref, runId, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + func (c *Client) V1GetPerformanceAdvisors(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewV1GetPerformanceAdvisorsRequest(c.Server, ref) if err != nil { @@ -3848,6 +3937,248 @@ func NewV1GetProjectRequest(server string, ref string) (*http.Request, error) { return req, nil } +// NewV1ListActionRunsRequest generates requests for V1ListActionRuns +func NewV1ListActionRunsRequest(server string, ref string, params *V1ListActionRunsParams) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects/%s/actions", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Offset != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "offset", runtime.ParamLocationQuery, *params.Offset); 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) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "limit", runtime.ParamLocationQuery, *params.Limit); 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() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewV1CountActionRunsRequest generates requests for V1CountActionRuns +func NewV1CountActionRunsRequest(server string, ref string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects/%s/actions", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("HEAD", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewV1GetActionRunRequest generates requests for V1GetActionRun +func NewV1GetActionRunRequest(server string, ref string, runId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "run_id", runtime.ParamLocationPath, runId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects/%s/actions/%s", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewV1GetActionRunLogsRequest generates requests for V1GetActionRunLogs +func NewV1GetActionRunLogsRequest(server string, ref string, runId string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "run_id", runtime.ParamLocationPath, runId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects/%s/actions/%s/logs", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewV1UpdateActionRunStatusRequest calls the generic V1UpdateActionRunStatus builder with application/json body +func NewV1UpdateActionRunStatusRequest(server string, ref string, runId string, body V1UpdateActionRunStatusJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewV1UpdateActionRunStatusRequestWithBody(server, ref, runId, "application/json", bodyReader) +} + +// NewV1UpdateActionRunStatusRequestWithBody generates requests for V1UpdateActionRunStatus with any type of body +func NewV1UpdateActionRunStatusRequestWithBody(server string, ref string, runId string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithLocation("simple", false, "ref", runtime.ParamLocationPath, ref) + if err != nil { + return nil, err + } + + var pathParam1 string + + pathParam1, err = runtime.StyleParamWithLocation("simple", false, "run_id", runtime.ParamLocationPath, runId) + if err != nil { + return nil, err + } + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/v1/projects/%s/actions/%s/status", pathParam0, pathParam1) + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + // NewV1GetPerformanceAdvisorsRequest generates requests for V1GetPerformanceAdvisors func NewV1GetPerformanceAdvisorsRequest(server string, ref string) (*http.Request, error) { var err error @@ -9254,6 +9585,23 @@ type ClientWithResponsesInterface interface { // V1GetProjectWithResponse request V1GetProjectWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetProjectResponse, error) + // V1ListActionRunsWithResponse request + V1ListActionRunsWithResponse(ctx context.Context, ref string, params *V1ListActionRunsParams, reqEditors ...RequestEditorFn) (*V1ListActionRunsResponse, error) + + // V1CountActionRunsWithResponse request + V1CountActionRunsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CountActionRunsResponse, error) + + // V1GetActionRunWithResponse request + V1GetActionRunWithResponse(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*V1GetActionRunResponse, error) + + // V1GetActionRunLogsWithResponse request + V1GetActionRunLogsWithResponse(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*V1GetActionRunLogsResponse, error) + + // V1UpdateActionRunStatusWithBodyWithResponse request with any body + V1UpdateActionRunStatusWithBodyWithResponse(ctx context.Context, ref string, runId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateActionRunStatusResponse, error) + + V1UpdateActionRunStatusWithResponse(ctx context.Context, ref string, runId string, body V1UpdateActionRunStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateActionRunStatusResponse, error) + // V1GetPerformanceAdvisorsWithResponse request V1GetPerformanceAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPerformanceAdvisorsResponse, error) @@ -10134,6 +10482,114 @@ func (r V1GetProjectResponse) StatusCode() int { return 0 } +type V1ListActionRunsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ListActionRunResponse +} + +// Status returns HTTPResponse.Status +func (r V1ListActionRunsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r V1ListActionRunsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type V1CountActionRunsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r V1CountActionRunsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r V1CountActionRunsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type V1GetActionRunResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActionRunResponse +} + +// Status returns HTTPResponse.Status +func (r V1GetActionRunResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r V1GetActionRunResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type V1GetActionRunLogsResponse struct { + Body []byte + HTTPResponse *http.Response +} + +// Status returns HTTPResponse.Status +func (r V1GetActionRunLogsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r V1GetActionRunLogsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type V1UpdateActionRunStatusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *ActionRunResponse +} + +// Status returns HTTPResponse.Status +func (r V1UpdateActionRunStatusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r V1UpdateActionRunStatusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + type V1GetPerformanceAdvisorsResponse struct { Body []byte HTTPResponse *http.Response @@ -12871,6 +13327,59 @@ func (c *ClientWithResponses) V1GetProjectWithResponse(ctx context.Context, ref return ParseV1GetProjectResponse(rsp) } +// V1ListActionRunsWithResponse request returning *V1ListActionRunsResponse +func (c *ClientWithResponses) V1ListActionRunsWithResponse(ctx context.Context, ref string, params *V1ListActionRunsParams, reqEditors ...RequestEditorFn) (*V1ListActionRunsResponse, error) { + rsp, err := c.V1ListActionRuns(ctx, ref, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseV1ListActionRunsResponse(rsp) +} + +// V1CountActionRunsWithResponse request returning *V1CountActionRunsResponse +func (c *ClientWithResponses) V1CountActionRunsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1CountActionRunsResponse, error) { + rsp, err := c.V1CountActionRuns(ctx, ref, reqEditors...) + if err != nil { + return nil, err + } + return ParseV1CountActionRunsResponse(rsp) +} + +// V1GetActionRunWithResponse request returning *V1GetActionRunResponse +func (c *ClientWithResponses) V1GetActionRunWithResponse(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*V1GetActionRunResponse, error) { + rsp, err := c.V1GetActionRun(ctx, ref, runId, reqEditors...) + if err != nil { + return nil, err + } + return ParseV1GetActionRunResponse(rsp) +} + +// V1GetActionRunLogsWithResponse request returning *V1GetActionRunLogsResponse +func (c *ClientWithResponses) V1GetActionRunLogsWithResponse(ctx context.Context, ref string, runId string, reqEditors ...RequestEditorFn) (*V1GetActionRunLogsResponse, error) { + rsp, err := c.V1GetActionRunLogs(ctx, ref, runId, reqEditors...) + if err != nil { + return nil, err + } + return ParseV1GetActionRunLogsResponse(rsp) +} + +// V1UpdateActionRunStatusWithBodyWithResponse request with arbitrary body returning *V1UpdateActionRunStatusResponse +func (c *ClientWithResponses) V1UpdateActionRunStatusWithBodyWithResponse(ctx context.Context, ref string, runId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*V1UpdateActionRunStatusResponse, error) { + rsp, err := c.V1UpdateActionRunStatusWithBody(ctx, ref, runId, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseV1UpdateActionRunStatusResponse(rsp) +} + +func (c *ClientWithResponses) V1UpdateActionRunStatusWithResponse(ctx context.Context, ref string, runId string, body V1UpdateActionRunStatusJSONRequestBody, reqEditors ...RequestEditorFn) (*V1UpdateActionRunStatusResponse, error) { + rsp, err := c.V1UpdateActionRunStatus(ctx, ref, runId, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseV1UpdateActionRunStatusResponse(rsp) +} + // V1GetPerformanceAdvisorsWithResponse request returning *V1GetPerformanceAdvisorsResponse func (c *ClientWithResponses) V1GetPerformanceAdvisorsWithResponse(ctx context.Context, ref string, reqEditors ...RequestEditorFn) (*V1GetPerformanceAdvisorsResponse, error) { rsp, err := c.V1GetPerformanceAdvisors(ctx, ref, reqEditors...) @@ -14707,6 +15216,116 @@ func ParseV1GetProjectResponse(rsp *http.Response) (*V1GetProjectResponse, error return response, nil } +// ParseV1ListActionRunsResponse parses an HTTP response from a V1ListActionRunsWithResponse call +func ParseV1ListActionRunsResponse(rsp *http.Response) (*V1ListActionRunsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &V1ListActionRunsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ListActionRunResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseV1CountActionRunsResponse parses an HTTP response from a V1CountActionRunsWithResponse call +func ParseV1CountActionRunsResponse(rsp *http.Response) (*V1CountActionRunsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &V1CountActionRunsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseV1GetActionRunResponse parses an HTTP response from a V1GetActionRunWithResponse call +func ParseV1GetActionRunResponse(rsp *http.Response) (*V1GetActionRunResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &V1GetActionRunResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ActionRunResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + +// ParseV1GetActionRunLogsResponse parses an HTTP response from a V1GetActionRunLogsWithResponse call +func ParseV1GetActionRunLogsResponse(rsp *http.Response) (*V1GetActionRunLogsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &V1GetActionRunLogsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + return response, nil +} + +// ParseV1UpdateActionRunStatusResponse parses an HTTP response from a V1UpdateActionRunStatusWithResponse call +func ParseV1UpdateActionRunStatusResponse(rsp *http.Response) (*V1UpdateActionRunStatusResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &V1UpdateActionRunStatusResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ActionRunResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + } + + return response, nil +} + // ParseV1GetPerformanceAdvisorsResponse parses an HTTP response from a V1GetPerformanceAdvisorsWithResponse call func ParseV1GetPerformanceAdvisorsResponse(rsp *http.Response) (*V1GetPerformanceAdvisorsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/pkg/api/types.gen.go b/pkg/api/types.gen.go index 2b018cec1..b7c573829 100644 --- a/pkg/api/types.gen.go +++ b/pkg/api/types.gen.go @@ -18,6 +18,28 @@ const ( Oauth2Scopes = "oauth2.Scopes" ) +// Defines values for ActionRunResponseRunStepsName. +const ( + ActionRunResponseRunStepsNameClone ActionRunResponseRunStepsName = "clone" + ActionRunResponseRunStepsNameConfigure ActionRunResponseRunStepsName = "configure" + ActionRunResponseRunStepsNameDeploy ActionRunResponseRunStepsName = "deploy" + ActionRunResponseRunStepsNameHealth ActionRunResponseRunStepsName = "health" + ActionRunResponseRunStepsNameMigrate ActionRunResponseRunStepsName = "migrate" + ActionRunResponseRunStepsNamePull ActionRunResponseRunStepsName = "pull" + ActionRunResponseRunStepsNameSeed ActionRunResponseRunStepsName = "seed" +) + +// Defines values for ActionRunResponseRunStepsStatus. +const ( + ActionRunResponseRunStepsStatusCREATED ActionRunResponseRunStepsStatus = "CREATED" + ActionRunResponseRunStepsStatusDEAD ActionRunResponseRunStepsStatus = "DEAD" + ActionRunResponseRunStepsStatusEXITED ActionRunResponseRunStepsStatus = "EXITED" + ActionRunResponseRunStepsStatusPAUSED ActionRunResponseRunStepsStatus = "PAUSED" + ActionRunResponseRunStepsStatusREMOVING ActionRunResponseRunStepsStatus = "REMOVING" + ActionRunResponseRunStepsStatusRESTARTING ActionRunResponseRunStepsStatus = "RESTARTING" + ActionRunResponseRunStepsStatusRUNNING ActionRunResponseRunStepsStatus = "RUNNING" +) + // Defines values for ApiKeyResponseType. const ( ApiKeyResponseTypeLegacy ApiKeyResponseType = "legacy" @@ -417,6 +439,28 @@ const ( GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannelWithdrawn GetProjectAvailableRestoreVersionsResponseAvailableVersionsReleaseChannel = "withdrawn" ) +// Defines values for ListActionRunResponseRunStepsName. +const ( + ListActionRunResponseRunStepsNameClone ListActionRunResponseRunStepsName = "clone" + ListActionRunResponseRunStepsNameConfigure ListActionRunResponseRunStepsName = "configure" + ListActionRunResponseRunStepsNameDeploy ListActionRunResponseRunStepsName = "deploy" + ListActionRunResponseRunStepsNameHealth ListActionRunResponseRunStepsName = "health" + ListActionRunResponseRunStepsNameMigrate ListActionRunResponseRunStepsName = "migrate" + ListActionRunResponseRunStepsNamePull ListActionRunResponseRunStepsName = "pull" + ListActionRunResponseRunStepsNameSeed ListActionRunResponseRunStepsName = "seed" +) + +// Defines values for ListActionRunResponseRunStepsStatus. +const ( + ListActionRunResponseRunStepsStatusCREATED ListActionRunResponseRunStepsStatus = "CREATED" + ListActionRunResponseRunStepsStatusDEAD ListActionRunResponseRunStepsStatus = "DEAD" + ListActionRunResponseRunStepsStatusEXITED ListActionRunResponseRunStepsStatus = "EXITED" + ListActionRunResponseRunStepsStatusPAUSED ListActionRunResponseRunStepsStatus = "PAUSED" + ListActionRunResponseRunStepsStatusREMOVING ListActionRunResponseRunStepsStatus = "REMOVING" + ListActionRunResponseRunStepsStatusRESTARTING ListActionRunResponseRunStepsStatus = "RESTARTING" + ListActionRunResponseRunStepsStatusRUNNING ListActionRunResponseRunStepsStatus = "RUNNING" +) + // Defines values for ListProjectAddonsResponseAvailableAddonsType. const ( ListProjectAddonsResponseAvailableAddonsTypeAuthMfaPhone ListProjectAddonsResponseAvailableAddonsType = "auth_mfa_phone" @@ -831,6 +875,83 @@ const ( UpdateProviderBodyNameIdFormatUrnOasisNamesTcSAML20NameidFormatTransient UpdateProviderBodyNameIdFormat = "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" ) +// Defines values for UpdateRunStatusBodyClone. +const ( + UpdateRunStatusBodyCloneCREATED UpdateRunStatusBodyClone = "CREATED" + UpdateRunStatusBodyCloneDEAD UpdateRunStatusBodyClone = "DEAD" + UpdateRunStatusBodyCloneEXITED UpdateRunStatusBodyClone = "EXITED" + UpdateRunStatusBodyClonePAUSED UpdateRunStatusBodyClone = "PAUSED" + UpdateRunStatusBodyCloneREMOVING UpdateRunStatusBodyClone = "REMOVING" + UpdateRunStatusBodyCloneRESTARTING UpdateRunStatusBodyClone = "RESTARTING" + UpdateRunStatusBodyCloneRUNNING UpdateRunStatusBodyClone = "RUNNING" +) + +// Defines values for UpdateRunStatusBodyConfigure. +const ( + UpdateRunStatusBodyConfigureCREATED UpdateRunStatusBodyConfigure = "CREATED" + UpdateRunStatusBodyConfigureDEAD UpdateRunStatusBodyConfigure = "DEAD" + UpdateRunStatusBodyConfigureEXITED UpdateRunStatusBodyConfigure = "EXITED" + UpdateRunStatusBodyConfigurePAUSED UpdateRunStatusBodyConfigure = "PAUSED" + UpdateRunStatusBodyConfigureREMOVING UpdateRunStatusBodyConfigure = "REMOVING" + UpdateRunStatusBodyConfigureRESTARTING UpdateRunStatusBodyConfigure = "RESTARTING" + UpdateRunStatusBodyConfigureRUNNING UpdateRunStatusBodyConfigure = "RUNNING" +) + +// Defines values for UpdateRunStatusBodyDeploy. +const ( + UpdateRunStatusBodyDeployCREATED UpdateRunStatusBodyDeploy = "CREATED" + UpdateRunStatusBodyDeployDEAD UpdateRunStatusBodyDeploy = "DEAD" + UpdateRunStatusBodyDeployEXITED UpdateRunStatusBodyDeploy = "EXITED" + UpdateRunStatusBodyDeployPAUSED UpdateRunStatusBodyDeploy = "PAUSED" + UpdateRunStatusBodyDeployREMOVING UpdateRunStatusBodyDeploy = "REMOVING" + UpdateRunStatusBodyDeployRESTARTING UpdateRunStatusBodyDeploy = "RESTARTING" + UpdateRunStatusBodyDeployRUNNING UpdateRunStatusBodyDeploy = "RUNNING" +) + +// Defines values for UpdateRunStatusBodyHealth. +const ( + UpdateRunStatusBodyHealthCREATED UpdateRunStatusBodyHealth = "CREATED" + UpdateRunStatusBodyHealthDEAD UpdateRunStatusBodyHealth = "DEAD" + UpdateRunStatusBodyHealthEXITED UpdateRunStatusBodyHealth = "EXITED" + UpdateRunStatusBodyHealthPAUSED UpdateRunStatusBodyHealth = "PAUSED" + UpdateRunStatusBodyHealthREMOVING UpdateRunStatusBodyHealth = "REMOVING" + UpdateRunStatusBodyHealthRESTARTING UpdateRunStatusBodyHealth = "RESTARTING" + UpdateRunStatusBodyHealthRUNNING UpdateRunStatusBodyHealth = "RUNNING" +) + +// Defines values for UpdateRunStatusBodyMigrate. +const ( + UpdateRunStatusBodyMigrateCREATED UpdateRunStatusBodyMigrate = "CREATED" + UpdateRunStatusBodyMigrateDEAD UpdateRunStatusBodyMigrate = "DEAD" + UpdateRunStatusBodyMigrateEXITED UpdateRunStatusBodyMigrate = "EXITED" + UpdateRunStatusBodyMigratePAUSED UpdateRunStatusBodyMigrate = "PAUSED" + UpdateRunStatusBodyMigrateREMOVING UpdateRunStatusBodyMigrate = "REMOVING" + UpdateRunStatusBodyMigrateRESTARTING UpdateRunStatusBodyMigrate = "RESTARTING" + UpdateRunStatusBodyMigrateRUNNING UpdateRunStatusBodyMigrate = "RUNNING" +) + +// Defines values for UpdateRunStatusBodyPull. +const ( + UpdateRunStatusBodyPullCREATED UpdateRunStatusBodyPull = "CREATED" + UpdateRunStatusBodyPullDEAD UpdateRunStatusBodyPull = "DEAD" + UpdateRunStatusBodyPullEXITED UpdateRunStatusBodyPull = "EXITED" + UpdateRunStatusBodyPullPAUSED UpdateRunStatusBodyPull = "PAUSED" + UpdateRunStatusBodyPullREMOVING UpdateRunStatusBodyPull = "REMOVING" + UpdateRunStatusBodyPullRESTARTING UpdateRunStatusBodyPull = "RESTARTING" + UpdateRunStatusBodyPullRUNNING UpdateRunStatusBodyPull = "RUNNING" +) + +// Defines values for UpdateRunStatusBodySeed. +const ( + UpdateRunStatusBodySeedCREATED UpdateRunStatusBodySeed = "CREATED" + UpdateRunStatusBodySeedDEAD UpdateRunStatusBodySeed = "DEAD" + UpdateRunStatusBodySeedEXITED UpdateRunStatusBodySeed = "EXITED" + UpdateRunStatusBodySeedPAUSED UpdateRunStatusBodySeed = "PAUSED" + UpdateRunStatusBodySeedREMOVING UpdateRunStatusBodySeed = "REMOVING" + UpdateRunStatusBodySeedRESTARTING UpdateRunStatusBodySeed = "RESTARTING" + UpdateRunStatusBodySeedRUNNING UpdateRunStatusBodySeed = "RUNNING" +) + // Defines values for UpdateSigningKeyBodyStatus. const ( UpdateSigningKeyBodyStatusInUse UpdateSigningKeyBodyStatus = "in_use" @@ -1056,9 +1177,9 @@ const ( // Defines values for V1RestorePointResponseStatus. const ( - V1RestorePointResponseStatusAVAILABLE V1RestorePointResponseStatus = "AVAILABLE" - V1RestorePointResponseStatusPENDING V1RestorePointResponseStatus = "PENDING" - V1RestorePointResponseStatusREMOVED V1RestorePointResponseStatus = "REMOVED" + AVAILABLE V1RestorePointResponseStatus = "AVAILABLE" + PENDING V1RestorePointResponseStatus = "PENDING" + REMOVED V1RestorePointResponseStatus = "REMOVED" ) // Defines values for V1ServiceHealthResponseInfo0Name. @@ -1213,6 +1334,29 @@ const ( Desc V1ListAllSnippetsParamsSortOrder = "desc" ) +// ActionRunResponse defines model for ActionRunResponse. +type ActionRunResponse struct { + BranchId string `json:"branch_id"` + CheckRunId nullable.Nullable[float32] `json:"check_run_id"` + CreatedAt string `json:"created_at"` + GitConfig nullable.Nullable[interface{}] `json:"git_config,omitempty"` + Id string `json:"id"` + RunSteps []struct { + CreatedAt string `json:"created_at"` + Name ActionRunResponseRunStepsName `json:"name"` + Status ActionRunResponseRunStepsStatus `json:"status"` + UpdatedAt string `json:"updated_at"` + } `json:"run_steps"` + UpdatedAt string `json:"updated_at"` + Workdir nullable.Nullable[string] `json:"workdir"` +} + +// ActionRunResponseRunStepsName defines model for ActionRunResponse.RunSteps.Name. +type ActionRunResponseRunStepsName string + +// ActionRunResponseRunStepsStatus defines model for ActionRunResponse.RunSteps.Status. +type ActionRunResponseRunStepsStatus string + // ActivateVanitySubdomainResponse defines model for ActivateVanitySubdomainResponse. type ActivateVanitySubdomainResponse struct { CustomDomain string `json:"custom_domain"` @@ -1297,64 +1441,82 @@ type AuthConfigResponse struct { ExternalAnonymousUsersEnabled nullable.Nullable[bool] `json:"external_anonymous_users_enabled"` ExternalAppleAdditionalClientIds nullable.Nullable[string] `json:"external_apple_additional_client_ids"` ExternalAppleClientId nullable.Nullable[string] `json:"external_apple_client_id"` + ExternalAppleEmailOptional nullable.Nullable[bool] `json:"external_apple_email_optional"` ExternalAppleEnabled nullable.Nullable[bool] `json:"external_apple_enabled"` ExternalAppleSecret nullable.Nullable[string] `json:"external_apple_secret"` ExternalAzureClientId nullable.Nullable[string] `json:"external_azure_client_id"` + ExternalAzureEmailOptional nullable.Nullable[bool] `json:"external_azure_email_optional"` ExternalAzureEnabled nullable.Nullable[bool] `json:"external_azure_enabled"` ExternalAzureSecret nullable.Nullable[string] `json:"external_azure_secret"` ExternalAzureUrl nullable.Nullable[string] `json:"external_azure_url"` ExternalBitbucketClientId nullable.Nullable[string] `json:"external_bitbucket_client_id"` + ExternalBitbucketEmailOptional nullable.Nullable[bool] `json:"external_bitbucket_email_optional"` ExternalBitbucketEnabled nullable.Nullable[bool] `json:"external_bitbucket_enabled"` ExternalBitbucketSecret nullable.Nullable[string] `json:"external_bitbucket_secret"` ExternalDiscordClientId nullable.Nullable[string] `json:"external_discord_client_id"` + ExternalDiscordEmailOptional nullable.Nullable[bool] `json:"external_discord_email_optional"` ExternalDiscordEnabled nullable.Nullable[bool] `json:"external_discord_enabled"` ExternalDiscordSecret nullable.Nullable[string] `json:"external_discord_secret"` ExternalEmailEnabled nullable.Nullable[bool] `json:"external_email_enabled"` ExternalFacebookClientId nullable.Nullable[string] `json:"external_facebook_client_id"` + ExternalFacebookEmailOptional nullable.Nullable[bool] `json:"external_facebook_email_optional"` ExternalFacebookEnabled nullable.Nullable[bool] `json:"external_facebook_enabled"` ExternalFacebookSecret nullable.Nullable[string] `json:"external_facebook_secret"` ExternalFigmaClientId nullable.Nullable[string] `json:"external_figma_client_id"` + ExternalFigmaEmailOptional nullable.Nullable[bool] `json:"external_figma_email_optional"` ExternalFigmaEnabled nullable.Nullable[bool] `json:"external_figma_enabled"` ExternalFigmaSecret nullable.Nullable[string] `json:"external_figma_secret"` ExternalGithubClientId nullable.Nullable[string] `json:"external_github_client_id"` + ExternalGithubEmailOptional nullable.Nullable[bool] `json:"external_github_email_optional"` ExternalGithubEnabled nullable.Nullable[bool] `json:"external_github_enabled"` ExternalGithubSecret nullable.Nullable[string] `json:"external_github_secret"` ExternalGitlabClientId nullable.Nullable[string] `json:"external_gitlab_client_id"` + ExternalGitlabEmailOptional nullable.Nullable[bool] `json:"external_gitlab_email_optional"` ExternalGitlabEnabled nullable.Nullable[bool] `json:"external_gitlab_enabled"` ExternalGitlabSecret nullable.Nullable[string] `json:"external_gitlab_secret"` ExternalGitlabUrl nullable.Nullable[string] `json:"external_gitlab_url"` ExternalGoogleAdditionalClientIds nullable.Nullable[string] `json:"external_google_additional_client_ids"` ExternalGoogleClientId nullable.Nullable[string] `json:"external_google_client_id"` + ExternalGoogleEmailOptional nullable.Nullable[bool] `json:"external_google_email_optional"` ExternalGoogleEnabled nullable.Nullable[bool] `json:"external_google_enabled"` ExternalGoogleSecret nullable.Nullable[string] `json:"external_google_secret"` ExternalGoogleSkipNonceCheck nullable.Nullable[bool] `json:"external_google_skip_nonce_check"` ExternalKakaoClientId nullable.Nullable[string] `json:"external_kakao_client_id"` + ExternalKakaoEmailOptional nullable.Nullable[bool] `json:"external_kakao_email_optional"` ExternalKakaoEnabled nullable.Nullable[bool] `json:"external_kakao_enabled"` ExternalKakaoSecret nullable.Nullable[string] `json:"external_kakao_secret"` ExternalKeycloakClientId nullable.Nullable[string] `json:"external_keycloak_client_id"` + ExternalKeycloakEmailOptional nullable.Nullable[bool] `json:"external_keycloak_email_optional"` ExternalKeycloakEnabled nullable.Nullable[bool] `json:"external_keycloak_enabled"` ExternalKeycloakSecret nullable.Nullable[string] `json:"external_keycloak_secret"` ExternalKeycloakUrl nullable.Nullable[string] `json:"external_keycloak_url"` ExternalLinkedinOidcClientId nullable.Nullable[string] `json:"external_linkedin_oidc_client_id"` + ExternalLinkedinOidcEmailOptional nullable.Nullable[bool] `json:"external_linkedin_oidc_email_optional"` ExternalLinkedinOidcEnabled nullable.Nullable[bool] `json:"external_linkedin_oidc_enabled"` ExternalLinkedinOidcSecret nullable.Nullable[string] `json:"external_linkedin_oidc_secret"` ExternalNotionClientId nullable.Nullable[string] `json:"external_notion_client_id"` + ExternalNotionEmailOptional nullable.Nullable[bool] `json:"external_notion_email_optional"` ExternalNotionEnabled nullable.Nullable[bool] `json:"external_notion_enabled"` ExternalNotionSecret nullable.Nullable[string] `json:"external_notion_secret"` ExternalPhoneEnabled nullable.Nullable[bool] `json:"external_phone_enabled"` ExternalSlackClientId nullable.Nullable[string] `json:"external_slack_client_id"` + ExternalSlackEmailOptional nullable.Nullable[bool] `json:"external_slack_email_optional"` ExternalSlackEnabled nullable.Nullable[bool] `json:"external_slack_enabled"` ExternalSlackOidcClientId nullable.Nullable[string] `json:"external_slack_oidc_client_id"` + ExternalSlackOidcEmailOptional nullable.Nullable[bool] `json:"external_slack_oidc_email_optional"` ExternalSlackOidcEnabled nullable.Nullable[bool] `json:"external_slack_oidc_enabled"` ExternalSlackOidcSecret nullable.Nullable[string] `json:"external_slack_oidc_secret"` ExternalSlackSecret nullable.Nullable[string] `json:"external_slack_secret"` ExternalSpotifyClientId nullable.Nullable[string] `json:"external_spotify_client_id"` + ExternalSpotifyEmailOptional nullable.Nullable[bool] `json:"external_spotify_email_optional"` ExternalSpotifyEnabled nullable.Nullable[bool] `json:"external_spotify_enabled"` ExternalSpotifySecret nullable.Nullable[string] `json:"external_spotify_secret"` ExternalTwitchClientId nullable.Nullable[string] `json:"external_twitch_client_id"` + ExternalTwitchEmailOptional nullable.Nullable[bool] `json:"external_twitch_email_optional"` ExternalTwitchEnabled nullable.Nullable[bool] `json:"external_twitch_enabled"` ExternalTwitchSecret nullable.Nullable[string] `json:"external_twitch_secret"` ExternalTwitterClientId nullable.Nullable[string] `json:"external_twitter_client_id"` + ExternalTwitterEmailOptional nullable.Nullable[bool] `json:"external_twitter_email_optional"` ExternalTwitterEnabled nullable.Nullable[bool] `json:"external_twitter_enabled"` ExternalTwitterSecret nullable.Nullable[string] `json:"external_twitter_secret"` ExternalWeb3EthereumEnabled nullable.Nullable[bool] `json:"external_web3_ethereum_enabled"` @@ -1364,6 +1526,7 @@ type AuthConfigResponse struct { ExternalWorkosSecret nullable.Nullable[string] `json:"external_workos_secret"` ExternalWorkosUrl nullable.Nullable[string] `json:"external_workos_url"` ExternalZoomClientId nullable.Nullable[string] `json:"external_zoom_client_id"` + ExternalZoomEmailOptional nullable.Nullable[bool] `json:"external_zoom_email_optional"` ExternalZoomEnabled nullable.Nullable[bool] `json:"external_zoom_enabled"` ExternalZoomSecret nullable.Nullable[string] `json:"external_zoom_secret"` HookBeforeUserCreatedEnabled nullable.Nullable[bool] `json:"hook_before_user_created_enabled"` @@ -1414,6 +1577,7 @@ type AuthConfigResponse struct { MfaWebAuthnVerifyEnabled nullable.Nullable[bool] `json:"mfa_web_authn_verify_enabled"` NimbusOauthClientId nullable.Nullable[string] `json:"nimbus_oauth_client_id"` NimbusOauthClientSecret nullable.Nullable[string] `json:"nimbus_oauth_client_secret"` + NimbusOauthEmailOptional nullable.Nullable[bool] `json:"nimbus_oauth_email_optional"` PasswordHibpEnabled nullable.Nullable[bool] `json:"password_hibp_enabled"` PasswordMinLength nullable.Nullable[int] `json:"password_min_length"` PasswordRequiredCharacters nullable.Nullable[AuthConfigResponsePasswordRequiredCharacters] `json:"password_required_characters"` @@ -2104,6 +2268,29 @@ type LegacyApiKeysResponse struct { Enabled bool `json:"enabled"` } +// ListActionRunResponse defines model for ListActionRunResponse. +type ListActionRunResponse = []struct { + BranchId string `json:"branch_id"` + CheckRunId nullable.Nullable[float32] `json:"check_run_id"` + CreatedAt string `json:"created_at"` + GitConfig nullable.Nullable[interface{}] `json:"git_config,omitempty"` + Id string `json:"id"` + RunSteps []struct { + CreatedAt string `json:"created_at"` + Name ListActionRunResponseRunStepsName `json:"name"` + Status ListActionRunResponseRunStepsStatus `json:"status"` + UpdatedAt string `json:"updated_at"` + } `json:"run_steps"` + UpdatedAt string `json:"updated_at"` + Workdir nullable.Nullable[string] `json:"workdir"` +} + +// ListActionRunResponseRunStepsName defines model for ListActionRunResponse.RunSteps.Name. +type ListActionRunResponseRunStepsName string + +// ListActionRunResponseRunStepsStatus defines model for ListActionRunResponse.RunSteps.Status. +type ListActionRunResponseRunStepsStatus string + // ListProjectAddonsResponse defines model for ListProjectAddonsResponse. type ListProjectAddonsResponse struct { AvailableAddons []struct { @@ -2751,64 +2938,82 @@ type UpdateAuthConfigBody struct { ExternalAnonymousUsersEnabled nullable.Nullable[bool] `json:"external_anonymous_users_enabled,omitempty"` ExternalAppleAdditionalClientIds nullable.Nullable[string] `json:"external_apple_additional_client_ids,omitempty"` ExternalAppleClientId nullable.Nullable[string] `json:"external_apple_client_id,omitempty"` + ExternalAppleEmailOptional nullable.Nullable[bool] `json:"external_apple_email_optional,omitempty"` ExternalAppleEnabled nullable.Nullable[bool] `json:"external_apple_enabled,omitempty"` ExternalAppleSecret nullable.Nullable[string] `json:"external_apple_secret,omitempty"` ExternalAzureClientId nullable.Nullable[string] `json:"external_azure_client_id,omitempty"` + ExternalAzureEmailOptional nullable.Nullable[bool] `json:"external_azure_email_optional,omitempty"` ExternalAzureEnabled nullable.Nullable[bool] `json:"external_azure_enabled,omitempty"` ExternalAzureSecret nullable.Nullable[string] `json:"external_azure_secret,omitempty"` ExternalAzureUrl nullable.Nullable[string] `json:"external_azure_url,omitempty"` ExternalBitbucketClientId nullable.Nullable[string] `json:"external_bitbucket_client_id,omitempty"` + ExternalBitbucketEmailOptional nullable.Nullable[bool] `json:"external_bitbucket_email_optional,omitempty"` ExternalBitbucketEnabled nullable.Nullable[bool] `json:"external_bitbucket_enabled,omitempty"` ExternalBitbucketSecret nullable.Nullable[string] `json:"external_bitbucket_secret,omitempty"` ExternalDiscordClientId nullable.Nullable[string] `json:"external_discord_client_id,omitempty"` + ExternalDiscordEmailOptional nullable.Nullable[bool] `json:"external_discord_email_optional,omitempty"` ExternalDiscordEnabled nullable.Nullable[bool] `json:"external_discord_enabled,omitempty"` ExternalDiscordSecret nullable.Nullable[string] `json:"external_discord_secret,omitempty"` ExternalEmailEnabled nullable.Nullable[bool] `json:"external_email_enabled,omitempty"` ExternalFacebookClientId nullable.Nullable[string] `json:"external_facebook_client_id,omitempty"` + ExternalFacebookEmailOptional nullable.Nullable[bool] `json:"external_facebook_email_optional,omitempty"` ExternalFacebookEnabled nullable.Nullable[bool] `json:"external_facebook_enabled,omitempty"` ExternalFacebookSecret nullable.Nullable[string] `json:"external_facebook_secret,omitempty"` ExternalFigmaClientId nullable.Nullable[string] `json:"external_figma_client_id,omitempty"` + ExternalFigmaEmailOptional nullable.Nullable[bool] `json:"external_figma_email_optional,omitempty"` ExternalFigmaEnabled nullable.Nullable[bool] `json:"external_figma_enabled,omitempty"` ExternalFigmaSecret nullable.Nullable[string] `json:"external_figma_secret,omitempty"` ExternalGithubClientId nullable.Nullable[string] `json:"external_github_client_id,omitempty"` + ExternalGithubEmailOptional nullable.Nullable[bool] `json:"external_github_email_optional,omitempty"` ExternalGithubEnabled nullable.Nullable[bool] `json:"external_github_enabled,omitempty"` ExternalGithubSecret nullable.Nullable[string] `json:"external_github_secret,omitempty"` ExternalGitlabClientId nullable.Nullable[string] `json:"external_gitlab_client_id,omitempty"` + ExternalGitlabEmailOptional nullable.Nullable[bool] `json:"external_gitlab_email_optional,omitempty"` ExternalGitlabEnabled nullable.Nullable[bool] `json:"external_gitlab_enabled,omitempty"` ExternalGitlabSecret nullable.Nullable[string] `json:"external_gitlab_secret,omitempty"` ExternalGitlabUrl nullable.Nullable[string] `json:"external_gitlab_url,omitempty"` ExternalGoogleAdditionalClientIds nullable.Nullable[string] `json:"external_google_additional_client_ids,omitempty"` ExternalGoogleClientId nullable.Nullable[string] `json:"external_google_client_id,omitempty"` + ExternalGoogleEmailOptional nullable.Nullable[bool] `json:"external_google_email_optional,omitempty"` ExternalGoogleEnabled nullable.Nullable[bool] `json:"external_google_enabled,omitempty"` ExternalGoogleSecret nullable.Nullable[string] `json:"external_google_secret,omitempty"` ExternalGoogleSkipNonceCheck nullable.Nullable[bool] `json:"external_google_skip_nonce_check,omitempty"` ExternalKakaoClientId nullable.Nullable[string] `json:"external_kakao_client_id,omitempty"` + ExternalKakaoEmailOptional nullable.Nullable[bool] `json:"external_kakao_email_optional,omitempty"` ExternalKakaoEnabled nullable.Nullable[bool] `json:"external_kakao_enabled,omitempty"` ExternalKakaoSecret nullable.Nullable[string] `json:"external_kakao_secret,omitempty"` ExternalKeycloakClientId nullable.Nullable[string] `json:"external_keycloak_client_id,omitempty"` + ExternalKeycloakEmailOptional nullable.Nullable[bool] `json:"external_keycloak_email_optional,omitempty"` ExternalKeycloakEnabled nullable.Nullable[bool] `json:"external_keycloak_enabled,omitempty"` ExternalKeycloakSecret nullable.Nullable[string] `json:"external_keycloak_secret,omitempty"` ExternalKeycloakUrl nullable.Nullable[string] `json:"external_keycloak_url,omitempty"` ExternalLinkedinOidcClientId nullable.Nullable[string] `json:"external_linkedin_oidc_client_id,omitempty"` + ExternalLinkedinOidcEmailOptional nullable.Nullable[bool] `json:"external_linkedin_oidc_email_optional,omitempty"` ExternalLinkedinOidcEnabled nullable.Nullable[bool] `json:"external_linkedin_oidc_enabled,omitempty"` ExternalLinkedinOidcSecret nullable.Nullable[string] `json:"external_linkedin_oidc_secret,omitempty"` ExternalNotionClientId nullable.Nullable[string] `json:"external_notion_client_id,omitempty"` + ExternalNotionEmailOptional nullable.Nullable[bool] `json:"external_notion_email_optional,omitempty"` ExternalNotionEnabled nullable.Nullable[bool] `json:"external_notion_enabled,omitempty"` ExternalNotionSecret nullable.Nullable[string] `json:"external_notion_secret,omitempty"` ExternalPhoneEnabled nullable.Nullable[bool] `json:"external_phone_enabled,omitempty"` ExternalSlackClientId nullable.Nullable[string] `json:"external_slack_client_id,omitempty"` + ExternalSlackEmailOptional nullable.Nullable[bool] `json:"external_slack_email_optional,omitempty"` ExternalSlackEnabled nullable.Nullable[bool] `json:"external_slack_enabled,omitempty"` ExternalSlackOidcClientId nullable.Nullable[string] `json:"external_slack_oidc_client_id,omitempty"` + ExternalSlackOidcEmailOptional nullable.Nullable[bool] `json:"external_slack_oidc_email_optional,omitempty"` ExternalSlackOidcEnabled nullable.Nullable[bool] `json:"external_slack_oidc_enabled,omitempty"` ExternalSlackOidcSecret nullable.Nullable[string] `json:"external_slack_oidc_secret,omitempty"` ExternalSlackSecret nullable.Nullable[string] `json:"external_slack_secret,omitempty"` ExternalSpotifyClientId nullable.Nullable[string] `json:"external_spotify_client_id,omitempty"` + ExternalSpotifyEmailOptional nullable.Nullable[bool] `json:"external_spotify_email_optional,omitempty"` ExternalSpotifyEnabled nullable.Nullable[bool] `json:"external_spotify_enabled,omitempty"` ExternalSpotifySecret nullable.Nullable[string] `json:"external_spotify_secret,omitempty"` ExternalTwitchClientId nullable.Nullable[string] `json:"external_twitch_client_id,omitempty"` + ExternalTwitchEmailOptional nullable.Nullable[bool] `json:"external_twitch_email_optional,omitempty"` ExternalTwitchEnabled nullable.Nullable[bool] `json:"external_twitch_enabled,omitempty"` ExternalTwitchSecret nullable.Nullable[string] `json:"external_twitch_secret,omitempty"` ExternalTwitterClientId nullable.Nullable[string] `json:"external_twitter_client_id,omitempty"` + ExternalTwitterEmailOptional nullable.Nullable[bool] `json:"external_twitter_email_optional,omitempty"` ExternalTwitterEnabled nullable.Nullable[bool] `json:"external_twitter_enabled,omitempty"` ExternalTwitterSecret nullable.Nullable[string] `json:"external_twitter_secret,omitempty"` ExternalWeb3EthereumEnabled nullable.Nullable[bool] `json:"external_web3_ethereum_enabled,omitempty"` @@ -2818,6 +3023,7 @@ type UpdateAuthConfigBody struct { ExternalWorkosSecret nullable.Nullable[string] `json:"external_workos_secret,omitempty"` ExternalWorkosUrl nullable.Nullable[string] `json:"external_workos_url,omitempty"` ExternalZoomClientId nullable.Nullable[string] `json:"external_zoom_client_id,omitempty"` + ExternalZoomEmailOptional nullable.Nullable[bool] `json:"external_zoom_email_optional,omitempty"` ExternalZoomEnabled nullable.Nullable[bool] `json:"external_zoom_enabled,omitempty"` ExternalZoomSecret nullable.Nullable[string] `json:"external_zoom_secret,omitempty"` HookBeforeUserCreatedEnabled nullable.Nullable[bool] `json:"hook_before_user_created_enabled,omitempty"` @@ -3090,6 +3296,38 @@ type UpdateProviderResponse struct { UpdatedAt *string `json:"updated_at,omitempty"` } +// UpdateRunStatusBody defines model for UpdateRunStatusBody. +type UpdateRunStatusBody struct { + Clone *UpdateRunStatusBodyClone `json:"clone,omitempty"` + Configure *UpdateRunStatusBodyConfigure `json:"configure,omitempty"` + Deploy *UpdateRunStatusBodyDeploy `json:"deploy,omitempty"` + Health *UpdateRunStatusBodyHealth `json:"health,omitempty"` + Migrate *UpdateRunStatusBodyMigrate `json:"migrate,omitempty"` + Pull *UpdateRunStatusBodyPull `json:"pull,omitempty"` + Seed *UpdateRunStatusBodySeed `json:"seed,omitempty"` +} + +// UpdateRunStatusBodyClone defines model for UpdateRunStatusBody.Clone. +type UpdateRunStatusBodyClone string + +// UpdateRunStatusBodyConfigure defines model for UpdateRunStatusBody.Configure. +type UpdateRunStatusBodyConfigure string + +// UpdateRunStatusBodyDeploy defines model for UpdateRunStatusBody.Deploy. +type UpdateRunStatusBodyDeploy string + +// UpdateRunStatusBodyHealth defines model for UpdateRunStatusBody.Health. +type UpdateRunStatusBodyHealth string + +// UpdateRunStatusBodyMigrate defines model for UpdateRunStatusBody.Migrate. +type UpdateRunStatusBodyMigrate string + +// UpdateRunStatusBodyPull defines model for UpdateRunStatusBody.Pull. +type UpdateRunStatusBodyPull string + +// UpdateRunStatusBodySeed defines model for UpdateRunStatusBody.Seed. +type UpdateRunStatusBodySeed string + // UpdateSigningKeyBody defines model for UpdateSigningKeyBody. type UpdateSigningKeyBody struct { Status UpdateSigningKeyBodyStatus `json:"status"` @@ -3603,6 +3841,12 @@ type V1OauthAuthorizeProjectClaimParamsResponseType string // V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod defines parameters for V1OauthAuthorizeProjectClaim. type V1OauthAuthorizeProjectClaimParamsCodeChallengeMethod string +// V1ListActionRunsParams defines parameters for V1ListActionRuns. +type V1ListActionRunsParams struct { + Offset *float32 `form:"offset,omitempty" json:"offset,omitempty"` + Limit *float32 `form:"limit,omitempty" json:"limit,omitempty"` +} + // V1GetSecurityAdvisorsParams defines parameters for V1GetSecurityAdvisors. type V1GetSecurityAdvisorsParams struct { LintType *V1GetSecurityAdvisorsParamsLintType `form:"lint_type,omitempty" json:"lint_type,omitempty"` @@ -3804,6 +4048,9 @@ type V1CreateAnOrganizationJSONRequestBody = CreateOrganizationV1 // V1CreateAProjectJSONRequestBody defines body for V1CreateAProject for application/json ContentType. type V1CreateAProjectJSONRequestBody = V1CreateProjectBody +// V1UpdateActionRunStatusJSONRequestBody defines body for V1UpdateActionRunStatus for application/json ContentType. +type V1UpdateActionRunStatusJSONRequestBody = UpdateRunStatusBody + // V1CreateProjectApiKeyJSONRequestBody defines body for V1CreateProjectApiKey for application/json ContentType. type V1CreateProjectApiKeyJSONRequestBody = CreateApiKeyBody diff --git a/pkg/config/auth.go b/pkg/config/auth.go index fbc918a24..b25c7db78 100644 --- a/pkg/config/auth.go +++ b/pkg/config/auth.go @@ -162,15 +162,16 @@ type ( SigningKeysPath string `toml:"signing_keys_path"` SigningKeys []JWK `toml:"-"` - RateLimit rateLimit `toml:"rate_limit"` - Captcha *captcha `toml:"captcha"` - Hook hook `toml:"hook"` - MFA mfa `toml:"mfa"` - Sessions sessions `toml:"sessions"` - Email email `toml:"email"` - Sms sms `toml:"sms"` - External external `toml:"external"` - Web3 web3 `toml:"web3"` + RateLimit rateLimit `toml:"rate_limit"` + Captcha *captcha `toml:"captcha"` + Hook hook `toml:"hook"` + MFA mfa `toml:"mfa"` + Sessions sessions `toml:"sessions"` + Email email `toml:"email"` + Sms sms `toml:"sms"` + External external `toml:"external"` + Web3 web3 `toml:"web3"` + OAuthServer OAuthServer `toml:"oauth_server"` // Custom secrets can be injected from .env file PublishableKey Secret `toml:"publishable_key"` @@ -368,6 +369,12 @@ type ( Solana solana `toml:"solana"` Ethereum ethereum `toml:"ethereum"` } + + OAuthServer struct { + Enabled bool `toml:"enabled"` + AllowDynamicRegistration bool `toml:"allow_dynamic_registration"` + AuthorizationUrlPath string `toml:"authorization_url_path"` + } ) func (a *auth) ToUpdateAuthConfigBody() v1API.UpdateAuthConfigBody { @@ -399,6 +406,7 @@ func (a *auth) ToUpdateAuthConfigBody() v1API.UpdateAuthConfigBody { a.Sms.toAuthConfigBody(&body) a.External.toAuthConfigBody(&body) a.Web3.toAuthConfigBody(&body) + a.OAuthServer.toAuthConfigBody(&body) return body } @@ -426,6 +434,7 @@ func (a *auth) FromRemoteAuthConfig(remoteConfig v1API.AuthConfigResponse) { a.Sms.fromAuthConfig(remoteConfig) a.External.fromAuthConfig(remoteConfig) a.Web3.fromAuthConfig(remoteConfig) + a.OAuthServer.fromAuthConfig(remoteConfig) } func (r rateLimit) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) { @@ -1338,6 +1347,18 @@ func (w *web3) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) { } } +func (o OAuthServer) toAuthConfigBody(body *v1API.UpdateAuthConfigBody) { + // TODO(cemal) :: implement me + // OAuth server configuration is behind a feature flag in the remote API + // Will be implemented when the feature reaches GA +} + +func (o *OAuthServer) fromAuthConfig(remoteConfig v1API.AuthConfigResponse) { + // TODO(cemal) :: implement me + // OAuth server configuration is behind a feature flag in the remote API + // Will be implemented when the feature reaches GA +} + func (a *auth) DiffWithRemote(remoteConfig v1API.AuthConfigResponse, filter ...func(string) bool) ([]byte, error) { copy := a.Clone() copy.FromRemoteAuthConfig(remoteConfig) diff --git a/pkg/config/templates/Dockerfile b/pkg/config/templates/Dockerfile index 5ab422cca..5876fc0d4 100644 --- a/pkg/config/templates/Dockerfile +++ b/pkg/config/templates/Dockerfile @@ -1,18 +1,18 @@ # Exposed for updates by .github/dependabot.yml -FROM supabase/postgres:17.6.1.005 AS pg +FROM supabase/postgres:17.6.1.010 AS pg # Append to ServiceImages when adding new dependencies below FROM library/kong:2.8.1 AS kong FROM axllent/mailpit:v1.22.3 AS mailpit FROM postgrest/postgrest:v13.0.7 AS postgrest FROM supabase/postgres-meta:v0.91.6 AS pgmeta -FROM supabase/studio:2025.09.22-sha-7b3007d AS studio +FROM supabase/studio:2025.09.23-sha-081a753 AS studio FROM darthsim/imgproxy:v3.8.0 AS imgproxy FROM supabase/edge-runtime:v1.69.12 AS edgeruntime FROM timberio/vector:0.28.1-alpine AS vector FROM supabase/supavisor:2.7.0 AS supavisor -FROM supabase/gotrue:v2.179.0 AS gotrue +FROM supabase/gotrue:v2.180.0 AS gotrue FROM supabase/realtime:v2.51.3 AS realtime -FROM supabase/storage-api:v1.27.4 AS storage +FROM supabase/storage-api:v1.27.6 AS storage FROM supabase/logflare:1.22.3 AS logflare # Append to JobImages when adding new dependencies below FROM supabase/pgadmin-schema-diff:cli-0.0.5 AS differ diff --git a/pkg/config/templates/config.toml b/pkg/config/templates/config.toml index 334ef1ce7..5be2af89a 100644 --- a/pkg/config/templates/config.toml +++ b/pkg/config/templates/config.toml @@ -304,6 +304,15 @@ enabled = false # Obtain from https://clerk.com/setup/supabase # domain = "example.clerk.accounts.dev" +# OAuth server configuration +[auth.oauth_server] +# Enable OAuth server functionality +enabled = false +# Path for OAuth consent flow UI +authorization_url_path = "/oauth/consent" +# Allow dynamic client registration +allow_dynamic_registration = false + [edge_runtime] enabled = true # Supported request policies: `oneshot`, `per_worker`. diff --git a/pkg/config/testdata/config.toml b/pkg/config/testdata/config.toml index 11c328d21..10d439399 100644 --- a/pkg/config/testdata/config.toml +++ b/pkg/config/testdata/config.toml @@ -144,6 +144,15 @@ minimum_password_length = 6 # are: `letters_digits`, `lower_upper_letters_digits`, `lower_upper_letters_digits_symbols` password_requirements = "" +# OAuth server configuration +[auth.oauth_server] +# Enable OAuth server functionality +enabled = true +# Path for OAuth consent flow UI +authorization_url_path = "/oauth/consent" +# Allow dynamic client registration +allow_dynamic_registration = true + [auth.rate_limit] # Number of emails that can be sent per hour. Requires auth.email.smtp to be enabled. email_sent = 2