diff --git a/client.gen.go b/client.gen.go index b83ec3c..f4c350f 100644 --- a/client.gen.go +++ b/client.gen.go @@ -519,11 +519,6 @@ type ClientInterface interface { CreateSync(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateSyncTestConnectionWithBody request with any body - UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - UpdateSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetTestConnectionConnectorCredentials request GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -2494,30 +2489,6 @@ func (c *Client) CreateSync(ctx context.Context, teamName TeamName, body CreateS return c.Client.Do(req) } -func (c *Client) UpdateSyncTestConnectionWithBody(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionRequestWithBody(c.Server, teamName, syncTestConnectionId, 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) UpdateSyncTestConnection(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateSyncTestConnectionRequest(c.Server, teamName, syncTestConnectionId, 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) GetTestConnectionConnectorCredentials(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*http.Response, error) { req, err := NewGetTestConnectionConnectorCredentialsRequest(c.Server, teamName, syncTestConnectionId, connectorID) if err != nil { @@ -9270,60 +9241,6 @@ func NewCreateSyncRequestWithBody(server string, teamName TeamName, contentType return req, nil } -// NewUpdateSyncTestConnectionRequest calls the generic UpdateSyncTestConnection builder with application/json body -func NewUpdateSyncTestConnectionRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpdateSyncTestConnectionRequestWithBody(server, teamName, syncTestConnectionId, "application/json", bodyReader) -} - -// NewUpdateSyncTestConnectionRequestWithBody generates requests for UpdateSyncTestConnection with any type of body -func NewUpdateSyncTestConnectionRequestWithBody(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithLocation("simple", false, "team_name", runtime.ParamLocationPath, teamName) - if err != nil { - return nil, err - } - - var pathParam1 string - - pathParam1, err = runtime.StyleParamWithLocation("simple", false, "sync_test_connection_id", runtime.ParamLocationPath, syncTestConnectionId) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/teams/%s/syncs/test-connections/%s", 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 -} - // NewGetTestConnectionConnectorCredentialsRequest generates requests for GetTestConnectionConnectorCredentials func NewGetTestConnectionConnectorCredentialsRequest(server string, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID) (*http.Request, error) { var err error @@ -11207,11 +11124,6 @@ type ClientWithResponsesInterface interface { CreateSyncWithResponse(ctx context.Context, teamName TeamName, body CreateSyncJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateSyncResponse, error) - // UpdateSyncTestConnectionWithBodyWithResponse request with any body - UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) - - UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) - // GetTestConnectionConnectorCredentialsWithResponse request GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) @@ -14217,33 +14129,6 @@ func (r CreateSyncResponse) StatusCode() int { return 0 } -type UpdateSyncTestConnectionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SyncTestConnection - JSON400 *BadRequest - JSON403 *Forbidden - JSON404 *NotFound - JSON422 *UnprocessableEntity - JSON500 *InternalError -} - -// Status returns HTTPResponse.Status -func (r UpdateSyncTestConnectionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateSyncTestConnectionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - type GetTestConnectionConnectorCredentialsResponse struct { Body []byte HTTPResponse *http.Response @@ -16266,23 +16151,6 @@ func (c *ClientWithResponses) CreateSyncWithResponse(ctx context.Context, teamNa return ParseCreateSyncResponse(rsp) } -// UpdateSyncTestConnectionWithBodyWithResponse request with arbitrary body returning *UpdateSyncTestConnectionResponse -func (c *ClientWithResponses) UpdateSyncTestConnectionWithBodyWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { - rsp, err := c.UpdateSyncTestConnectionWithBody(ctx, teamName, syncTestConnectionId, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionResponse(rsp) -} - -func (c *ClientWithResponses) UpdateSyncTestConnectionWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, body UpdateSyncTestConnectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSyncTestConnectionResponse, error) { - rsp, err := c.UpdateSyncTestConnection(ctx, teamName, syncTestConnectionId, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseUpdateSyncTestConnectionResponse(rsp) -} - // GetTestConnectionConnectorCredentialsWithResponse request returning *GetTestConnectionConnectorCredentialsResponse func (c *ClientWithResponses) GetTestConnectionConnectorCredentialsWithResponse(ctx context.Context, teamName TeamName, syncTestConnectionId SyncTestConnectionId, connectorID ConnectorID, reqEditors ...RequestEditorFn) (*GetTestConnectionConnectorCredentialsResponse, error) { rsp, err := c.GetTestConnectionConnectorCredentials(ctx, teamName, syncTestConnectionId, connectorID, reqEditors...) @@ -22639,67 +22507,6 @@ func ParseCreateSyncResponse(rsp *http.Response) (*CreateSyncResponse, error) { return response, nil } -// ParseUpdateSyncTestConnectionResponse parses an HTTP response from a UpdateSyncTestConnectionWithResponse call -func ParseUpdateSyncTestConnectionResponse(rsp *http.Response) (*UpdateSyncTestConnectionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &UpdateSyncTestConnectionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SyncTestConnection - 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 { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest Forbidden - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NotFound - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest UnprocessableEntity - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: - var dest InternalError - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON500 = &dest - - } - - return response, nil -} - // ParseGetTestConnectionConnectorCredentialsResponse parses an HTTP response from a GetTestConnectionConnectorCredentialsWithResponse call func ParseGetTestConnectionConnectorCredentialsResponse(rsp *http.Response) (*GetTestConnectionConnectorCredentialsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) diff --git a/models.gen.go b/models.gen.go index ee33e24..f58ab56 100644 --- a/models.gen.go +++ b/models.gen.go @@ -605,9 +605,6 @@ type ConnectorAuthFinishRequestOAuth struct { // ConnectorAuthRequestAWS AWS connector authentication request to start the authentication process type ConnectorAuthRequestAWS struct { - // AccountIDs List of AWS account IDs to authenticate - AccountIDs *[]string `json:"account_ids,omitempty"` - // PluginKind Kind of the plugin PluginKind string `json:"plugin_kind"` @@ -689,9 +686,6 @@ type ConnectorID = openapi_types.UUID // ConnectorIdentityResponseAWS AWS connector identity response type ConnectorIdentityResponseAWS struct { - // AccountIDs List of AWS account IDs - AccountIDs []string `json:"account_ids"` - // RoleARN Role ARN to assume RoleARN string `json:"role_arn"` } @@ -3270,9 +3264,6 @@ type UpdateSyncSourceJSONRequestBody = SyncSourceUpdate // CreateSyncJSONRequestBody defines body for CreateSync for application/json ContentType. type CreateSyncJSONRequestBody = SyncCreate -// UpdateSyncTestConnectionJSONRequestBody defines body for UpdateSyncTestConnection for application/json ContentType. -type UpdateSyncTestConnectionJSONRequestBody = UpdateSyncTestConnectionForSyncSourceRequest - // UpdateSyncJSONRequestBody defines body for UpdateSync for application/json ContentType. type UpdateSyncJSONRequestBody = SyncUpdate diff --git a/spec.json b/spec.json index f517b89..c25e278 100644 --- a/spec.json +++ b/spec.json @@ -5144,55 +5144,6 @@ "x-internal" : true } }, - "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}" : { - "patch" : { - "deprecated" : true, - "description" : "DEPRECATED. Update a Sync Test Connection. Use UpdateSyncTestConnectionForSyncSource or UpdateSyncTestConnectionForSyncDestination instead.", - "operationId" : "UpdateSyncTestConnection", - "parameters" : [ { - "$ref" : "#/components/parameters/team_name" - }, { - "$ref" : "#/components/parameters/sync_test_connection_id" - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/UpdateSyncTestConnectionForSyncSource_request" - } - } - } - }, - "responses" : { - "200" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/SyncTestConnection" - } - } - }, - "description" : "Updated" - }, - "400" : { - "$ref" : "#/components/responses/BadRequest" - }, - "403" : { - "$ref" : "#/components/responses/Forbidden" - }, - "404" : { - "$ref" : "#/components/responses/NotFound" - }, - "422" : { - "$ref" : "#/components/responses/UnprocessableEntity" - }, - "500" : { - "$ref" : "#/components/responses/InternalError" - } - }, - "tags" : [ "syncs" ] - } - }, "/teams/{team_name}/syncs/test-connections/{sync_test_connection_id}/connector/{connector_id}/identity" : { "get" : { "description" : "Get connector identity for a test connection.", @@ -9165,17 +9116,9 @@ "description" : "Role ARN to assume", "type" : "string", "x-go-name" : "RoleARN" - }, - "account_ids" : { - "description" : "List of AWS account IDs", - "items" : { - "type" : "string" - }, - "type" : "array", - "x-go-name" : "AccountIDs" } }, - "required" : [ "account_ids", "role_arn" ] + "required" : [ "role_arn" ] }, "ConnectorCredentialsResponseAWS" : { "additionalProperties" : false, @@ -9337,15 +9280,6 @@ "description" : "Name of the plugin", "example" : "aws", "type" : "string" - }, - "account_ids" : { - "description" : "List of AWS account IDs to authenticate", - "example" : [ "123456789012" ], - "items" : { - "type" : "string" - }, - "type" : "array", - "x-go-name" : "AccountIDs" } }, "required" : [ "plugin_kind", "plugin_name", "plugin_team" ]