diff --git a/client.gen.go b/client.gen.go index 0e8a595..0f316a5 100644 --- a/client.gen.go +++ b/client.gen.go @@ -14010,6 +14010,7 @@ func (r AuthenticateConnectorFinishGCPResponse) StatusCode() int { type AuthenticateConnectorFinishOAuthResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *ConnectorAuthResponseOAuth JSON400 *BadRequest JSON401 *RequiresAuthentication JSON403 *Forbidden @@ -21675,6 +21676,13 @@ func ParseAuthenticateConnectorFinishOAuthResponse(rsp *http.Response) (*Authent } switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest ConnectorAuthResponseOAuth + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest BadRequest if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/models.gen.go b/models.gen.go index fb6939a..5c64b44 100644 --- a/models.gen.go +++ b/models.gen.go @@ -666,6 +666,9 @@ type ConnectorAuthRequestOAuth struct { // Env Environment variables used in the spec. Env *interface{} `json:"env,omitempty"` + // Flavor Override default flavor + Flavor *interface{} `json:"flavor,omitempty"` + // PluginKind Kind of the plugin PluginKind interface{} `json:"plugin_kind"` @@ -3854,6 +3857,14 @@ func (a *ConnectorAuthRequestOAuth) UnmarshalJSON(b []byte) error { delete(object, "env") } + if raw, found := object["flavor"]; found { + err = json.Unmarshal(raw, &a.Flavor) + if err != nil { + return fmt.Errorf("error reading 'flavor': %w", err) + } + delete(object, "flavor") + } + if raw, found := object["plugin_kind"]; found { err = json.Unmarshal(raw, &a.PluginKind) if err != nil { @@ -3949,6 +3960,13 @@ func (a ConnectorAuthRequestOAuth) MarshalJSON() ([]byte, error) { } } + if a.Flavor != nil { + object["flavor"], err = json.Marshal(a.Flavor) + if err != nil { + return nil, fmt.Errorf("error marshaling 'flavor': %w", err) + } + } + object["plugin_kind"], err = json.Marshal(a.PluginKind) if err != nil { return nil, fmt.Errorf("error marshaling 'plugin_kind': %w", err) diff --git a/spec.json b/spec.json index 8a1ba91..a8d26a9 100644 --- a/spec.json +++ b/spec.json @@ -6294,6 +6294,16 @@ "required" : true }, "responses" : { + "200" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/ConnectorAuthResponseOAuth" + } + } + }, + "description" : "First part of authentication is complete, follow redirect to continue" + }, "204" : { "description" : "Authentication is complete." }, @@ -10080,6 +10090,9 @@ }, "skip_dependent_tables" : { "description" : "Whether to skip dependent tables, setting from the outer spec" + }, + "flavor" : { + "description" : "Override default flavor" } }, "required" : [ "base_url", "plugin_kind", "plugin_name", "plugin_team" ]