From 739990e5fd2228c015c58654dcaf359bc4d47c30 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 22:48:12 +0000 Subject: [PATCH] Release 0.0.22 --- alert_rule.go | 2 +- api_error_response.go | 6 ++--- api_key_integration_configs.go | 4 ++-- attached_integration_to_source.go | 2 +- basic_auth_integration_configs.go | 4 ++-- batch_operation.go | 10 ++++---- bookmark.go | 14 ++++++------ connection.go | 10 ++++---- console_line.go | 2 +- core/client_option.go | 2 +- core/core.go | 28 ++++++++++++++--------- create_bookmark_request.go | 6 ++--- create_connection_request.go | 2 +- create_connection_request_destination.go | 2 +- create_connection_request_ruleset.go | 2 +- create_connection_request_source.go | 2 +- create_destination_request.go | 2 +- create_integration_request.go | 2 +- create_ruleset_request.go | 2 +- create_source_request.go | 2 +- create_transformation_request.go | 4 ++-- delay_rule.go | 4 ++-- deleted_bookmark_response.go | 2 +- deleted_integration.go | 2 +- deleted_issue_trigger_response.go | 2 +- delivery_issue.go | 16 ++++++------- delivery_issue_reference.go | 4 ++-- delivery_issue_with_data.go | 16 ++++++------- destination.go | 10 ++++---- event.go | 20 ++++++++-------- event_attempt.go | 10 ++++---- event_data.go | 2 +- filter_rule.go | 2 +- handled_hmac_configs.go | 2 +- hmac_integration_configs.go | 4 ++-- ignored_event.go | 12 +++++----- integration.go | 10 ++++---- issue_count.go | 2 +- issue_trigger.go | 6 ++--- issue_trigger_backpressure_configs.go | 2 +- issue_trigger_slack_channel.go | 2 +- raw_body.go | 2 +- request.go | 10 ++++---- request_data.go | 2 +- retry_rule.go | 2 +- ruleset.go | 12 +++++----- shopify_integration_configs.go | 2 +- short_event_data.go | 2 +- source.go | 12 +++++----- source_integration.go | 4 ++-- toggle_webhook_notifications.go | 4 ++-- transform_full.go | 2 +- transform_full_transformation.go | 4 ++-- transform_reference.go | 4 ++-- transformation.go | 12 +++++----- transformation_execution.go | 16 ++++++------- transformation_executor_output_request.go | 2 +- transformation_failed_meta.go | 2 +- transformation_issue.go | 16 ++++++------- transformation_issue_reference.go | 2 +- transformation_issue_with_data.go | 16 ++++++------- update_connection_request_ruleset.go | 2 +- update_destination_request.go | 2 +- upsert_connection_request.go | 2 +- upsert_connection_request_destination.go | 2 +- upsert_connection_request_ruleset.go | 2 +- upsert_connection_request_source.go | 2 +- upsert_destination_request.go | 2 +- upsert_issue_trigger_request.go | 2 +- upsert_ruleset_request.go | 2 +- upsert_source_request.go | 2 +- upsert_transformation_request.go | 4 ++-- 72 files changed, 199 insertions(+), 193 deletions(-) diff --git a/alert_rule.go b/alert_rule.go index 48bb6c8..458f5a4 100644 --- a/alert_rule.go +++ b/alert_rule.go @@ -30,7 +30,7 @@ func (a *AlertRule) MarshalJSON() ([]byte, error) { type embed AlertRule var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*a), Type: "alert", diff --git a/api_error_response.go b/api_error_response.go index 0f8bebb..5a3d771 100644 --- a/api_error_response.go +++ b/api_error_response.go @@ -5,10 +5,10 @@ package api // Error response model type ApiErrorResponse struct { // Error code - Code string `json:"code,omitempty"` + Code string `json:"code"` // Status code - Status float64 `json:"status,omitempty"` + Status float64 `json:"status"` // Error description - Message string `json:"message,omitempty"` + Message string `json:"message"` Data *ApiErrorResponseData `json:"data,omitempty"` } diff --git a/api_key_integration_configs.go b/api_key_integration_configs.go index a36cf0d..52ee542 100644 --- a/api_key_integration_configs.go +++ b/api_key_integration_configs.go @@ -3,6 +3,6 @@ package api type ApiKeyIntegrationConfigs struct { - HeaderKey string `json:"header_key,omitempty"` - ApiKey string `json:"api_key,omitempty"` + HeaderKey string `json:"header_key"` + ApiKey string `json:"api_key"` } diff --git a/attached_integration_to_source.go b/attached_integration_to_source.go index 4bf99d0..cfad144 100644 --- a/attached_integration_to_source.go +++ b/attached_integration_to_source.go @@ -3,5 +3,5 @@ package api type AttachedIntegrationToSource struct { - Success bool `json:"success,omitempty"` + Success bool `json:"success"` } diff --git a/basic_auth_integration_configs.go b/basic_auth_integration_configs.go index 6295c06..c7539e5 100644 --- a/basic_auth_integration_configs.go +++ b/basic_auth_integration_configs.go @@ -3,6 +3,6 @@ package api type BasicAuthIntegrationConfigs struct { - Name string `json:"name,omitempty"` - Password string `json:"password,omitempty"` + Name string `json:"name"` + Password string `json:"password"` } diff --git a/batch_operation.go b/batch_operation.go index b32b68f..db184fd 100644 --- a/batch_operation.go +++ b/batch_operation.go @@ -4,15 +4,15 @@ package api type BatchOperation struct { // ID of the bulk retry - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // Query object to filter records Query *BatchOperationQuery `json:"query,omitempty"` // Date the bulk retry was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` // Last time the bulk retry was updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the bulk retry was cancelled CancelledAt *string `json:"cancelled_at,omitempty"` // Date the bulk retry was completed @@ -26,7 +26,7 @@ type BatchOperation struct { // Number of events that were successfully delivered CompletedCount *int `json:"completed_count,omitempty"` // Indicates if the bulk retry is currently in progress - InProgress bool `json:"in_progress,omitempty"` + InProgress bool `json:"in_progress"` // Progression of the batch operations, values 0 - 1 Progress *float64 `json:"progress,omitempty"` // Number of events that failed to be delivered diff --git a/bookmark.go b/bookmark.go index e7fdb06..87abaa4 100644 --- a/bookmark.go +++ b/bookmark.go @@ -4,22 +4,22 @@ package api type Bookmark struct { // ID of the bookmark - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // ID of the associated connection - WebhookId string `json:"webhook_id,omitempty"` + WebhookId string `json:"webhook_id"` // ID of the bookmarked event data - EventDataId string `json:"event_data_id,omitempty"` + EventDataId string `json:"event_data_id"` // Descriptive name of the bookmark - Label string `json:"label,omitempty"` + Label string `json:"label"` // Alternate alias for the bookmark Alias *string `json:"alias,omitempty"` Data *ShortEventData `json:"data,omitempty"` // Date the bookmark was last manually triggered LastUsedAt *string `json:"last_used_at,omitempty"` // Date the bookmark was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the bookmark was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/connection.go b/connection.go index 750a65d..0fe2bdc 100644 --- a/connection.go +++ b/connection.go @@ -4,11 +4,11 @@ package api type Connection struct { // ID of the connection - Id string `json:"id,omitempty"` + Id string `json:"id"` // Unique name of the connection for this source - Name string `json:"name,omitempty"` + Name string `json:"name"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` Destination *Destination `json:"destination,omitempty"` Source *Source `json:"source,omitempty"` Ruleset *Ruleset `json:"ruleset,omitempty"` @@ -21,7 +21,7 @@ type Connection struct { // Date the connection was paused PausedAt *string `json:"paused_at,omitempty"` // Date the connection was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the connection was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/console_line.go b/console_line.go index 961b389..5d5861e 100644 --- a/console_line.go +++ b/console_line.go @@ -4,5 +4,5 @@ package api type ConsoleLine struct { Type ConsoleLineType `json:"type,omitempty"` - Message string `json:"message,omitempty"` + Message string `json:"message"` } diff --git a/core/client_option.go b/core/client_option.go index 18a8426..485cf93 100644 --- a/core/client_option.go +++ b/core/client_option.go @@ -32,7 +32,7 @@ func NewClientOptions() *ClientOptions { // ToHeader maps the configured client options into a http.Header issued // on every request. func (c *ClientOptions) ToHeader() http.Header { - header := c.HTTPHeader + header := c.HTTPHeader.Clone() if c.Bearer != "" { header.Set("Authorization", "Bearer "+c.Bearer) } diff --git a/core/core.go b/core/core.go index c19dd44..aab1edd 100644 --- a/core/core.go +++ b/core/core.go @@ -11,9 +11,6 @@ import ( ) const ( - // acceptHeader is the Accept header. - acceptHeader = "Accept" - // contentType specifies the JSON Content-Type header value. contentType = "application/json" contentTypeHeader = "Content-Type" @@ -34,7 +31,6 @@ const ( // fernHeaders specifies all of the standard Fern headers in // a set so that they're easier to access and reference. var fernHeaders = map[string]string{ - acceptHeader: contentType, contentTypeHeader: contentType, fernLanguageHeader: fernLanguage, fernSDKNameHeader: fernSDKName, @@ -98,11 +94,15 @@ func DoRequest( ) error { var requestBody io.Reader if request != nil { - requestBytes, err := json.Marshal(request) - if err != nil { - return err + if body, ok := request.(io.Reader); ok { + requestBody = body + } else { + requestBytes, err := json.Marshal(request) + if err != nil { + return err + } + requestBody = bytes.NewReader(requestBytes) } - requestBody = bytes.NewReader(requestBytes) } req, err := newRequest(ctx, url, method, endpointHeaders, requestBody) if err != nil { @@ -146,9 +146,15 @@ func DoRequest( // Mutate the response parameter in-place. if response != nil { - decoder := json.NewDecoder(resp.Body) - if err := decoder.Decode(response); err != nil { - return err + if writer, ok := response.(io.Writer); ok { + if _, err := io.Copy(writer, resp.Body); err != nil { + return err + } + } else { + decoder := json.NewDecoder(resp.Body) + if err := decoder.Decode(response); err != nil { + return err + } } } diff --git a/create_bookmark_request.go b/create_bookmark_request.go index 95ed2e3..2aa6284 100644 --- a/create_bookmark_request.go +++ b/create_bookmark_request.go @@ -5,11 +5,11 @@ package api // CreateBookmarkRequest is an in-lined request used by the CreateBookmark endpoint. type CreateBookmarkRequest struct { // ID of the event data to bookmark `<= 255 characters` - EventDataId string `json:"event_data_id,omitempty"` + EventDataId string `json:"event_data_id"` // ID of the associated connection `<= 255 characters` - WebhookId string `json:"webhook_id,omitempty"` + WebhookId string `json:"webhook_id"` // Descriptive name of the bookmark `<= 255 characters` - Label string `json:"label,omitempty"` + Label string `json:"label"` // A unique, human-friendly name for the bookmark `<= 155 characters` Name *string `json:"name,omitempty"` } diff --git a/create_connection_request.go b/create_connection_request.go index 274eb46..cf48b2b 100644 --- a/create_connection_request.go +++ b/create_connection_request.go @@ -5,7 +5,7 @@ package api // CreateConnectionRequest is an in-lined request used by the CreateConnection endpoint. type CreateConnectionRequest struct { // A unique name of the connection for the source `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // ID of a destination to bind to the connection DestinationId *string `json:"destination_id,omitempty"` // ID of a source to bind to the connection diff --git a/create_connection_request_destination.go b/create_connection_request_destination.go index 47520c2..27d706d 100644 --- a/create_connection_request_destination.go +++ b/create_connection_request_destination.go @@ -5,7 +5,7 @@ package api // Destination input object type CreateConnectionRequestDestination struct { // Name for the destination `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Endpoint of the destination Url *string `json:"url,omitempty"` // Path for the CLI destination diff --git a/create_connection_request_ruleset.go b/create_connection_request_ruleset.go index 60d60b0..1762a83 100644 --- a/create_connection_request_ruleset.go +++ b/create_connection_request_ruleset.go @@ -5,7 +5,7 @@ package api // Ruleset input object type CreateConnectionRequestRuleset struct { // Name for the ruleset `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Array of rules to apply Rules *[]*Rule `json:"rules,omitempty"` IsTeamDefault *bool `json:"is_team_default,omitempty"` diff --git a/create_connection_request_source.go b/create_connection_request_source.go index 11e5e0a..3f30035 100644 --- a/create_connection_request_source.go +++ b/create_connection_request_source.go @@ -5,5 +5,5 @@ package api // Source input object type CreateConnectionRequestSource struct { // A unique name for the source `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` } diff --git a/create_destination_request.go b/create_destination_request.go index 8647ee0..927089c 100644 --- a/create_destination_request.go +++ b/create_destination_request.go @@ -5,7 +5,7 @@ package api // CreateDestinationRequest is an in-lined request used by the CreateDestination endpoint. type CreateDestinationRequest struct { // Name for the destination `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Endpoint of the destination Url *string `json:"url,omitempty"` // Path for the CLI destination diff --git a/create_integration_request.go b/create_integration_request.go index cfa6cb9..9be2e5e 100644 --- a/create_integration_request.go +++ b/create_integration_request.go @@ -5,7 +5,7 @@ package api // CreateIntegrationRequest is an in-lined request used by the CreateIntegration endpoint. type CreateIntegrationRequest struct { // Label of the integration - Label string `json:"label,omitempty"` + Label string `json:"label"` // Decrypted Key/Value object of the associated configuration for that provider Configs *CreateIntegrationRequestConfigs `json:"configs,omitempty"` Provider IntegrationProvider `json:"provider,omitempty"` diff --git a/create_ruleset_request.go b/create_ruleset_request.go index 1b86417..81d0e36 100644 --- a/create_ruleset_request.go +++ b/create_ruleset_request.go @@ -5,7 +5,7 @@ package api // CreateRulesetRequest is an in-lined request used by the CreateRuleset endpoint. type CreateRulesetRequest struct { // Name for the ruleset `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Array of rules to apply Rules *[]*Rule `json:"rules,omitempty"` IsTeamDefault *bool `json:"is_team_default,omitempty"` diff --git a/create_source_request.go b/create_source_request.go index 803db7f..8cef0e4 100644 --- a/create_source_request.go +++ b/create_source_request.go @@ -5,5 +5,5 @@ package api // CreateSourceRequest is an in-lined request used by the CreateSource endpoint. type CreateSourceRequest struct { // A unique name for the source `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` } diff --git a/create_transformation_request.go b/create_transformation_request.go index 0578d1d..9fd68f9 100644 --- a/create_transformation_request.go +++ b/create_transformation_request.go @@ -5,9 +5,9 @@ package api // CreateTransformationRequest is an in-lined request used by the CreateTransformation endpoint. type CreateTransformationRequest struct { // A unique, human-friendly name for the transformation `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // JavaScript code to be executed - Code string `json:"code,omitempty"` + Code string `json:"code"` // Key-value environment variables to be passed to the transformation Env *map[string]*CreateTransformationRequestEnvValue `json:"env,omitempty"` } diff --git a/delay_rule.go b/delay_rule.go index 7a5ce00..e409542 100644 --- a/delay_rule.go +++ b/delay_rule.go @@ -8,7 +8,7 @@ import ( type DelayRule struct { // Delay to introduce in MS - Delay int `json:"delay,omitempty"` + Delay int `json:"delay"` type_ string } @@ -31,7 +31,7 @@ func (d *DelayRule) MarshalJSON() ([]byte, error) { type embed DelayRule var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*d), Type: "delay", diff --git a/deleted_bookmark_response.go b/deleted_bookmark_response.go index 7ea2e79..1c98a51 100644 --- a/deleted_bookmark_response.go +++ b/deleted_bookmark_response.go @@ -4,5 +4,5 @@ package api type DeletedBookmarkResponse struct { // Bookmark ID - Id string `json:"id,omitempty"` + Id string `json:"id"` } diff --git a/deleted_integration.go b/deleted_integration.go index 2a4c70e..71fa90b 100644 --- a/deleted_integration.go +++ b/deleted_integration.go @@ -3,5 +3,5 @@ package api type DeletedIntegration struct { - Id string `json:"id,omitempty"` + Id string `json:"id"` } diff --git a/deleted_issue_trigger_response.go b/deleted_issue_trigger_response.go index 9562ea4..939c122 100644 --- a/deleted_issue_trigger_response.go +++ b/deleted_issue_trigger_response.go @@ -3,5 +3,5 @@ package api type DeletedIssueTriggerResponse struct { - Id string `json:"id,omitempty"` + Id string `json:"id"` } diff --git a/delivery_issue.go b/delivery_issue.go index 06653fd..ec0c470 100644 --- a/delivery_issue.go +++ b/delivery_issue.go @@ -9,16 +9,16 @@ import ( // Delivery issue type DeliveryIssue struct { // Issue ID - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` Status IssueStatus `json:"status,omitempty"` // ISO timestamp for when the issue was last opened - OpenedAt string `json:"opened_at,omitempty"` + OpenedAt string `json:"opened_at"` // ISO timestamp for when the issue was first opened - FirstSeenAt string `json:"first_seen_at,omitempty"` + FirstSeenAt string `json:"first_seen_at"` // ISO timestamp for when the issue last occured - LastSeenAt string `json:"last_seen_at,omitempty"` + LastSeenAt string `json:"last_seen_at"` // ID of the team member who last updated the issue status LastUpdatedBy *string `json:"last_updated_by,omitempty"` // ISO timestamp for when the issue was dismissed @@ -26,9 +26,9 @@ type DeliveryIssue struct { AutoResolvedAt *string `json:"auto_resolved_at,omitempty"` MergedWith *string `json:"merged_with,omitempty"` // ISO timestamp for when the issue was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // ISO timestamp for when the issue was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` AggregationKeys *DeliveryIssueAggregationKeys `json:"aggregation_keys,omitempty"` Reference *DeliveryIssueReference `json:"reference,omitempty"` type_ string @@ -53,7 +53,7 @@ func (d *DeliveryIssue) MarshalJSON() ([]byte, error) { type embed DeliveryIssue var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*d), Type: "delivery", diff --git a/delivery_issue_reference.go b/delivery_issue_reference.go index 8d64399..f8a0d55 100644 --- a/delivery_issue_reference.go +++ b/delivery_issue_reference.go @@ -4,6 +4,6 @@ package api // Reference to the event and attempt an issue is being created for. type DeliveryIssueReference struct { - EventId string `json:"event_id,omitempty"` - AttemptId string `json:"attempt_id,omitempty"` + EventId string `json:"event_id"` + AttemptId string `json:"attempt_id"` } diff --git a/delivery_issue_with_data.go b/delivery_issue_with_data.go index 315e2b5..11f81a1 100644 --- a/delivery_issue_with_data.go +++ b/delivery_issue_with_data.go @@ -9,16 +9,16 @@ import ( // Delivery issue type DeliveryIssueWithData struct { // Issue ID - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` Status IssueStatus `json:"status,omitempty"` // ISO timestamp for when the issue was last opened - OpenedAt string `json:"opened_at,omitempty"` + OpenedAt string `json:"opened_at"` // ISO timestamp for when the issue was first opened - FirstSeenAt string `json:"first_seen_at,omitempty"` + FirstSeenAt string `json:"first_seen_at"` // ISO timestamp for when the issue last occured - LastSeenAt string `json:"last_seen_at,omitempty"` + LastSeenAt string `json:"last_seen_at"` // ID of the team member who last updated the issue status LastUpdatedBy *string `json:"last_updated_by,omitempty"` // ISO timestamp for when the issue was dismissed @@ -26,9 +26,9 @@ type DeliveryIssueWithData struct { AutoResolvedAt *string `json:"auto_resolved_at,omitempty"` MergedWith *string `json:"merged_with,omitempty"` // ISO timestamp for when the issue was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // ISO timestamp for when the issue was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` AggregationKeys *DeliveryIssueAggregationKeys `json:"aggregation_keys,omitempty"` Reference *DeliveryIssueReference `json:"reference,omitempty"` Data *DeliveryIssueData `json:"data,omitempty"` @@ -54,7 +54,7 @@ func (d *DeliveryIssueWithData) MarshalJSON() ([]byte, error) { type embed DeliveryIssueWithData var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*d), Type: "delivery", diff --git a/destination.go b/destination.go index 7a08625..4478c9e 100644 --- a/destination.go +++ b/destination.go @@ -5,11 +5,11 @@ package api // Associated [Destination](#destination-object) object type Destination struct { // ID of the destination - Id string `json:"id,omitempty"` + Id string `json:"id"` // A unique, human-friendly name for the destination - Name string `json:"name,omitempty"` + Name string `json:"name"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` PathForwardingDisabled *bool `json:"path_forwarding_disabled,omitempty"` // HTTP endpoint of the destination Url *string `json:"url,omitempty"` @@ -21,7 +21,7 @@ type Destination struct { // Date the destination was archived ArchivedAt *string `json:"archived_at,omitempty"` // Date the destination was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the destination was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/event.go b/event.go index 05a4871..bf480aa 100644 --- a/event.go +++ b/event.go @@ -4,21 +4,21 @@ package api type Event struct { // ID of the event - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // ID of the associated connection - WebhookId string `json:"webhook_id,omitempty"` + WebhookId string `json:"webhook_id"` // ID of the associated source - SourceId string `json:"source_id,omitempty"` + SourceId string `json:"source_id"` // ID of the associated destination - DestinationId string `json:"destination_id,omitempty"` + DestinationId string `json:"destination_id"` // ID of the request data - EventDataId string `json:"event_data_id,omitempty"` + EventDataId string `json:"event_data_id"` // ID of the request that created the event - RequestId string `json:"request_id,omitempty"` + RequestId string `json:"request_id"` // Number of delivery attempts made - Attempts int `json:"attempts,omitempty"` + Attempts int `json:"attempts"` Data *EventData `json:"data,omitempty"` // Date of the most recently attempted retry LastAttemptAt *string `json:"last_attempt_at,omitempty"` @@ -32,9 +32,9 @@ type Event struct { // ID of the CLI the event is sent to CliId *string `json:"cli_id,omitempty"` // Date the event was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the event was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` CreatedAtId *string `json:"created_at_id,omitempty"` LastAttemptAtId *string `json:"last_attempt_at_id,omitempty"` } diff --git a/event_attempt.go b/event_attempt.go index 9a5ce8b..3f2788e 100644 --- a/event_attempt.go +++ b/event_attempt.go @@ -4,11 +4,11 @@ package api type EventAttempt struct { // Attempt ID - Id string `json:"id,omitempty"` + Id string `json:"id"` // Team ID - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // Event ID - EventId string `json:"event_id,omitempty"` + EventId string `json:"event_id"` // Attempt's HTTP response code ResponseStatus *int `json:"response_status,omitempty"` // Sequential number of attempts (up to and including this one) made for the associated event @@ -33,9 +33,9 @@ type EventAttempt struct { // Time elapsed between attempt initiation and a response from the destination (in ms) ResponseLatency *int `json:"response_latency,omitempty"` // Date the attempt was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the attempt was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` State *AttemptState `json:"state,omitempty"` // Date the attempt was archived ArchivedAt *string `json:"archived_at,omitempty"` diff --git a/event_data.go b/event_data.go index 742581a..52b6c73 100644 --- a/event_data.go +++ b/event_data.go @@ -3,7 +3,7 @@ package api type EventData struct { - Path string `json:"path,omitempty"` + Path string `json:"path"` Query *string `json:"query,omitempty"` ParsedQuery *EventDataParsedQuery `json:"parsed_query,omitempty"` Headers *EventDataHeaders `json:"headers,omitempty"` diff --git a/filter_rule.go b/filter_rule.go index 76f9c75..71dd3ec 100644 --- a/filter_rule.go +++ b/filter_rule.go @@ -33,7 +33,7 @@ func (f *FilterRule) MarshalJSON() ([]byte, error) { type embed FilterRule var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*f), Type: "filter", diff --git a/handled_hmac_configs.go b/handled_hmac_configs.go index c74ac83..51b9419 100644 --- a/handled_hmac_configs.go +++ b/handled_hmac_configs.go @@ -3,5 +3,5 @@ package api type HandledHmacConfigs struct { - WebhookSecretKey string `json:"webhook_secret_key,omitempty"` + WebhookSecretKey string `json:"webhook_secret_key"` } diff --git a/hmac_integration_configs.go b/hmac_integration_configs.go index fc4a567..a2fcd8b 100644 --- a/hmac_integration_configs.go +++ b/hmac_integration_configs.go @@ -3,8 +3,8 @@ package api type HmacIntegrationConfigs struct { - WebhookSecretKey string `json:"webhook_secret_key,omitempty"` + WebhookSecretKey string `json:"webhook_secret_key"` Algorithm HmacAlgorithms `json:"algorithm,omitempty"` - HeaderKey string `json:"header_key,omitempty"` + HeaderKey string `json:"header_key"` Encoding HmacIntegrationConfigsEncoding `json:"encoding,omitempty"` } diff --git a/ignored_event.go b/ignored_event.go index ce6e12b..feb393f 100644 --- a/ignored_event.go +++ b/ignored_event.go @@ -3,12 +3,12 @@ package api type IgnoredEvent struct { - Id string `json:"id,omitempty"` - TeamId string `json:"team_id,omitempty"` - WebhookId string `json:"webhook_id,omitempty"` + Id string `json:"id"` + TeamId string `json:"team_id"` + WebhookId string `json:"webhook_id"` Cause IgnoredEventCause `json:"cause,omitempty"` - RequestId string `json:"request_id,omitempty"` + RequestId string `json:"request_id"` Meta *IgnoredEventMeta `json:"meta,omitempty"` - UpdatedAt string `json:"updated_at,omitempty"` - CreatedAt string `json:"created_at,omitempty"` + UpdatedAt string `json:"updated_at"` + CreatedAt string `json:"created_at"` } diff --git a/integration.go b/integration.go index 358a432..f2172a1 100644 --- a/integration.go +++ b/integration.go @@ -4,11 +4,11 @@ package api type Integration struct { // ID of the integration - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // Label of the integration - Label string `json:"label,omitempty"` + Label string `json:"label"` Provider IntegrationProvider `json:"provider,omitempty"` // List of features to enable (see features list below) Features []IntegrationFeature `json:"features,omitempty"` @@ -17,7 +17,7 @@ type Integration struct { // List of source IDs the integration is attached to Sources []string `json:"sources,omitempty"` // Date the integration was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the integration was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/issue_count.go b/issue_count.go index 97a1b39..bd47335 100644 --- a/issue_count.go +++ b/issue_count.go @@ -4,5 +4,5 @@ package api type IssueCount struct { // Number of issues - Count int `json:"count,omitempty"` + Count int `json:"count"` } diff --git a/issue_trigger.go b/issue_trigger.go index d0c20c9..14a272d 100644 --- a/issue_trigger.go +++ b/issue_trigger.go @@ -4,7 +4,7 @@ package api type IssueTrigger struct { // ID of the issue trigger - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace TeamId *string `json:"team_id,omitempty"` // Optional unique name to use as reference when using the API @@ -15,9 +15,9 @@ type IssueTrigger struct { // ISO timestamp for when the issue trigger was disabled DisabledAt *string `json:"disabled_at,omitempty"` // ISO timestamp for when the issue trigger was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // ISO timestamp for when the issue trigger was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` // ISO timestamp for when the issue trigger was deleted DeletedAt *string `json:"deleted_at,omitempty"` } diff --git a/issue_trigger_backpressure_configs.go b/issue_trigger_backpressure_configs.go index 617728a..d51348e 100644 --- a/issue_trigger_backpressure_configs.go +++ b/issue_trigger_backpressure_configs.go @@ -4,7 +4,7 @@ package api // Configurations for a 'Backpressure' issue trigger type IssueTriggerBackpressureConfigs struct { - Delay IssueTriggerBackpressureDelay `json:"delay,omitempty"` + Delay IssueTriggerBackpressureDelay `json:"delay"` // A pattern to match on the destination name or array of destination IDs. Use `*` as wildcard. Destinations *IssueTriggerBackpressureConfigsDestinations `json:"destinations,omitempty"` } diff --git a/issue_trigger_slack_channel.go b/issue_trigger_slack_channel.go index c2fd7d7..290161b 100644 --- a/issue_trigger_slack_channel.go +++ b/issue_trigger_slack_channel.go @@ -5,5 +5,5 @@ package api // Slack channel for an issue trigger type IssueTriggerSlackChannel struct { // Channel name - ChannelName string `json:"channel_name,omitempty"` + ChannelName string `json:"channel_name"` } diff --git a/raw_body.go b/raw_body.go index bc61ddd..76514fe 100644 --- a/raw_body.go +++ b/raw_body.go @@ -3,5 +3,5 @@ package api type RawBody struct { - Body string `json:"body,omitempty"` + Body string `json:"body"` } diff --git a/request.go b/request.go index 1425cfc..3b09856 100644 --- a/request.go +++ b/request.go @@ -4,9 +4,9 @@ package api type Request struct { // ID of the request - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // Whether or not the request was verified when received Verified *bool `json:"verified,omitempty"` // ID of the request data @@ -22,7 +22,7 @@ type Request struct { IngestedAt *string `json:"ingested_at,omitempty"` IngestedAtId *string `json:"ingested_at_id,omitempty"` // ID of the associated source - SourceId string `json:"source_id,omitempty"` + SourceId string `json:"source_id"` // The count of events created from this request (CLI events not included) EventsCount *int `json:"events_count,omitempty"` // The count of CLI events created from this request @@ -30,7 +30,7 @@ type Request struct { IgnoredCount *int `json:"ignored_count,omitempty"` Data *RequestData `json:"data,omitempty"` // Date the event was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the event was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/request_data.go b/request_data.go index 9deeccc..121f348 100644 --- a/request_data.go +++ b/request_data.go @@ -3,7 +3,7 @@ package api type RequestData struct { - Path string `json:"path,omitempty"` + Path string `json:"path"` Query *string `json:"query,omitempty"` ParsedQuery *RequestDataParsedQuery `json:"parsed_query,omitempty"` Headers *RequestDataHeaders `json:"headers,omitempty"` diff --git a/retry_rule.go b/retry_rule.go index bb8c2d6..effb0d4 100644 --- a/retry_rule.go +++ b/retry_rule.go @@ -34,7 +34,7 @@ func (r *RetryRule) MarshalJSON() ([]byte, error) { type embed RetryRule var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*r), Type: "retry", diff --git a/ruleset.go b/ruleset.go index 4a967af..6badb05 100644 --- a/ruleset.go +++ b/ruleset.go @@ -5,19 +5,19 @@ package api // Associated [Ruleset](#ruleset-object) object type Ruleset struct { // ID of the ruleset - Id string `json:"id,omitempty"` + Id string `json:"id"` // A unique name for the ruleset - Name string `json:"name,omitempty"` + Name string `json:"name"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // Array of rules to apply Rules []*Rule `json:"rules,omitempty"` // Default ruleset of Workspace - IsTeamDefault bool `json:"is_team_default,omitempty"` + IsTeamDefault bool `json:"is_team_default"` // Date the ruleset was archived ArchivedAt *string `json:"archived_at,omitempty"` // Date the ruleset was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the ruleset was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/shopify_integration_configs.go b/shopify_integration_configs.go index d0ee9c7..7174277 100644 --- a/shopify_integration_configs.go +++ b/shopify_integration_configs.go @@ -3,7 +3,7 @@ package api type ShopifyIntegrationConfigs struct { - WebhookSecretKey string `json:"webhook_secret_key,omitempty"` + WebhookSecretKey string `json:"webhook_secret_key"` RateLimitPeriod *ShopifyIntegrationConfigsRateLimitPeriod `json:"rate_limit_period,omitempty"` RateLimit *float64 `json:"rate_limit,omitempty"` ApiKey *string `json:"api_key,omitempty"` diff --git a/short_event_data.go b/short_event_data.go index a9361e3..0d1002b 100644 --- a/short_event_data.go +++ b/short_event_data.go @@ -3,7 +3,7 @@ package api type ShortEventData struct { - Path string `json:"path,omitempty"` + Path string `json:"path"` Query *string `json:"query,omitempty"` ParsedQuery *ShortEventDataParsedQuery `json:"parsed_query,omitempty"` Headers *ShortEventDataHeaders `json:"headers,omitempty"` diff --git a/source.go b/source.go index fb1db26..0515084 100644 --- a/source.go +++ b/source.go @@ -5,13 +5,13 @@ package api // Associated [Source](#source-object) object type Source struct { // ID of the source - Id string `json:"id,omitempty"` + Id string `json:"id"` // Name for the source - Name string `json:"name,omitempty"` + Name string `json:"name"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // A unique URL that must be supplied to your webhook's provider - Url string `json:"url,omitempty"` + Url string `json:"url"` // ID of the integration IntegrationId *string `json:"integration_id,omitempty"` // Integration object @@ -19,7 +19,7 @@ type Source struct { // Date the source was archived ArchivedAt *string `json:"archived_at,omitempty"` // Date the source was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the source was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/source_integration.go b/source_integration.go index b0a8501..f125d47 100644 --- a/source_integration.go +++ b/source_integration.go @@ -5,9 +5,9 @@ package api // Integration object type SourceIntegration struct { // ID of the integration - Id string `json:"id,omitempty"` + Id string `json:"id"` // Label of the integration - Label string `json:"label,omitempty"` + Label string `json:"label"` Provider IntegrationProvider `json:"provider,omitempty"` // List of enabled features Features []IntegrationFeature `json:"features,omitempty"` diff --git a/toggle_webhook_notifications.go b/toggle_webhook_notifications.go index d3529c1..82daf4d 100644 --- a/toggle_webhook_notifications.go +++ b/toggle_webhook_notifications.go @@ -3,7 +3,7 @@ package api type ToggleWebhookNotifications struct { - Enabled bool `json:"enabled,omitempty"` + Enabled bool `json:"enabled"` Topics *[]TopicsValue `json:"topics,omitempty"` - SourceId string `json:"source_id,omitempty"` + SourceId string `json:"source_id"` } diff --git a/transform_full.go b/transform_full.go index 26895e6..783d041 100644 --- a/transform_full.go +++ b/transform_full.go @@ -33,7 +33,7 @@ func (t *TransformFull) MarshalJSON() ([]byte, error) { type embed TransformFull var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*t), Type: "transform", diff --git a/transform_full_transformation.go b/transform_full_transformation.go index 5d2d6f4..b20c639 100644 --- a/transform_full_transformation.go +++ b/transform_full_transformation.go @@ -5,9 +5,9 @@ package api // You can optionally define a new transformation while creating a transform rule type TransformFullTransformation struct { // The unique name of the transformation - Name string `json:"name,omitempty"` + Name string `json:"name"` // A string representation of your JavaScript (ES6) code to run - Code string `json:"code,omitempty"` + Code string `json:"code"` // A key-value object of environment variables to encrypt and expose to your transformation code Env *map[string]*string `json:"env,omitempty"` } diff --git a/transform_reference.go b/transform_reference.go index 498bfc0..402cfb8 100644 --- a/transform_reference.go +++ b/transform_reference.go @@ -8,7 +8,7 @@ import ( type TransformReference struct { // ID of the attached transformation object. Optional input, always set once the rule is defined - TransformationId string `json:"transformation_id,omitempty"` + TransformationId string `json:"transformation_id"` type_ string } @@ -31,7 +31,7 @@ func (t *TransformReference) MarshalJSON() ([]byte, error) { type embed TransformReference var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*t), Type: "transform", diff --git a/transformation.go b/transformation.go index efbc1ba..19c4e1a 100644 --- a/transformation.go +++ b/transformation.go @@ -4,19 +4,19 @@ package api type Transformation struct { // ID of the transformation - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` // A unique, human-friendly name for the transformation - Name string `json:"name,omitempty"` + Name string `json:"name"` // JavaScript code to be executed - Code string `json:"code,omitempty"` + Code string `json:"code"` EncryptedEnv *string `json:"encrypted_env,omitempty"` Iv *string `json:"iv,omitempty"` // Key-value environment variables to be passed to the transformation Env *map[string]*string `json:"env,omitempty"` // Date the transformation was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // Date the transformation was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` } diff --git a/transformation_execution.go b/transformation_execution.go index 3aff416..d186e05 100644 --- a/transformation_execution.go +++ b/transformation_execution.go @@ -3,16 +3,16 @@ package api type TransformationExecution struct { - Id string `json:"id,omitempty"` - TransformedEventDataId string `json:"transformed_event_data_id,omitempty"` - OriginalEventDataId string `json:"original_event_data_id,omitempty"` - TransformationId string `json:"transformation_id,omitempty"` - TeamId string `json:"team_id,omitempty"` - WebhookId string `json:"webhook_id,omitempty"` + Id string `json:"id"` + TransformedEventDataId string `json:"transformed_event_data_id"` + OriginalEventDataId string `json:"original_event_data_id"` + TransformationId string `json:"transformation_id"` + TeamId string `json:"team_id"` + WebhookId string `json:"webhook_id"` LogLevel TransformationExecutionLogLevel `json:"log_level,omitempty"` Logs []*ConsoleLine `json:"logs,omitempty"` - UpdatedAt string `json:"updated_at,omitempty"` - CreatedAt string `json:"created_at,omitempty"` + UpdatedAt string `json:"updated_at"` + CreatedAt string `json:"created_at"` OriginalEventData *ShortEventData `json:"original_event_data,omitempty"` TransformedEventData *ShortEventData `json:"transformed_event_data,omitempty"` IssueId *string `json:"issue_id,omitempty"` diff --git a/transformation_executor_output_request.go b/transformation_executor_output_request.go index 1b0b534..bdb3b20 100644 --- a/transformation_executor_output_request.go +++ b/transformation_executor_output_request.go @@ -4,7 +4,7 @@ package api type TransformationExecutorOutputRequest struct { Headers *TransformationExecutorOutputRequestHeaders `json:"headers,omitempty"` - Path string `json:"path,omitempty"` + Path string `json:"path"` Query *TransformationExecutorOutputRequestQuery `json:"query,omitempty"` ParsedQuery *TransformationExecutorOutputRequestParsedQuery `json:"parsed_query,omitempty"` Body *TransformationExecutorOutputRequestBody `json:"body,omitempty"` diff --git a/transformation_failed_meta.go b/transformation_failed_meta.go index c3568c4..2cf89d0 100644 --- a/transformation_failed_meta.go +++ b/transformation_failed_meta.go @@ -3,5 +3,5 @@ package api type TransformationFailedMeta struct { - TransformationId string `json:"transformation_id,omitempty"` + TransformationId string `json:"transformation_id"` } diff --git a/transformation_issue.go b/transformation_issue.go index a476fe6..6d96f7a 100644 --- a/transformation_issue.go +++ b/transformation_issue.go @@ -9,16 +9,16 @@ import ( // Transformation issue type TransformationIssue struct { // Issue ID - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` Status IssueStatus `json:"status,omitempty"` // ISO timestamp for when the issue was last opened - OpenedAt string `json:"opened_at,omitempty"` + OpenedAt string `json:"opened_at"` // ISO timestamp for when the issue was first opened - FirstSeenAt string `json:"first_seen_at,omitempty"` + FirstSeenAt string `json:"first_seen_at"` // ISO timestamp for when the issue last occured - LastSeenAt string `json:"last_seen_at,omitempty"` + LastSeenAt string `json:"last_seen_at"` // ID of the team member who last updated the issue status LastUpdatedBy *string `json:"last_updated_by,omitempty"` // ISO timestamp for when the issue was dismissed @@ -26,9 +26,9 @@ type TransformationIssue struct { AutoResolvedAt *string `json:"auto_resolved_at,omitempty"` MergedWith *string `json:"merged_with,omitempty"` // ISO timestamp for when the issue was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // ISO timestamp for when the issue was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` AggregationKeys *TransformationIssueAggregationKeys `json:"aggregation_keys,omitempty"` Reference *TransformationIssueReference `json:"reference,omitempty"` type_ string @@ -53,7 +53,7 @@ func (t *TransformationIssue) MarshalJSON() ([]byte, error) { type embed TransformationIssue var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*t), Type: "transformation", diff --git a/transformation_issue_reference.go b/transformation_issue_reference.go index 27c70fd..872d7e4 100644 --- a/transformation_issue_reference.go +++ b/transformation_issue_reference.go @@ -4,7 +4,7 @@ package api // Reference to the event request transformation an issue is being created for. type TransformationIssueReference struct { - TransformationExecutionId string `json:"transformation_execution_id,omitempty"` + TransformationExecutionId string `json:"transformation_execution_id"` // Deprecated but still found on historical issues TriggerEventRequestTransformationId *string `json:"trigger_event_request_transformation_id,omitempty"` } diff --git a/transformation_issue_with_data.go b/transformation_issue_with_data.go index 684560e..e3cb4f7 100644 --- a/transformation_issue_with_data.go +++ b/transformation_issue_with_data.go @@ -9,16 +9,16 @@ import ( // Transformation issue type TransformationIssueWithData struct { // Issue ID - Id string `json:"id,omitempty"` + Id string `json:"id"` // ID of the workspace - TeamId string `json:"team_id,omitempty"` + TeamId string `json:"team_id"` Status IssueStatus `json:"status,omitempty"` // ISO timestamp for when the issue was last opened - OpenedAt string `json:"opened_at,omitempty"` + OpenedAt string `json:"opened_at"` // ISO timestamp for when the issue was first opened - FirstSeenAt string `json:"first_seen_at,omitempty"` + FirstSeenAt string `json:"first_seen_at"` // ISO timestamp for when the issue last occured - LastSeenAt string `json:"last_seen_at,omitempty"` + LastSeenAt string `json:"last_seen_at"` // ID of the team member who last updated the issue status LastUpdatedBy *string `json:"last_updated_by,omitempty"` // ISO timestamp for when the issue was dismissed @@ -26,9 +26,9 @@ type TransformationIssueWithData struct { AutoResolvedAt *string `json:"auto_resolved_at,omitempty"` MergedWith *string `json:"merged_with,omitempty"` // ISO timestamp for when the issue was last updated - UpdatedAt string `json:"updated_at,omitempty"` + UpdatedAt string `json:"updated_at"` // ISO timestamp for when the issue was created - CreatedAt string `json:"created_at,omitempty"` + CreatedAt string `json:"created_at"` AggregationKeys *TransformationIssueAggregationKeys `json:"aggregation_keys,omitempty"` Reference *TransformationIssueReference `json:"reference,omitempty"` Data *TransformationIssueData `json:"data,omitempty"` @@ -54,7 +54,7 @@ func (t *TransformationIssueWithData) MarshalJSON() ([]byte, error) { type embed TransformationIssueWithData var marshaler = struct { embed - Type string `json:"type,omitempty"` + Type string `json:"type"` }{ embed: embed(*t), Type: "transformation", diff --git a/update_connection_request_ruleset.go b/update_connection_request_ruleset.go index 6b23b87..3771d72 100644 --- a/update_connection_request_ruleset.go +++ b/update_connection_request_ruleset.go @@ -5,7 +5,7 @@ package api // Ruleset input object type UpdateConnectionRequestRuleset struct { // Name for the ruleset `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Array of rules to apply Rules *[]*Rule `json:"rules,omitempty"` IsTeamDefault *bool `json:"is_team_default,omitempty"` diff --git a/update_destination_request.go b/update_destination_request.go index 2e0c15c..f296a54 100644 --- a/update_destination_request.go +++ b/update_destination_request.go @@ -5,7 +5,7 @@ package api // UpdateDestinationRequest is an in-lined request used by the UpdateDestination endpoint. type UpdateDestinationRequest struct { // Name for the destination `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Endpoint of the destination Url *string `json:"url,omitempty"` // Path for the CLI destination diff --git a/upsert_connection_request.go b/upsert_connection_request.go index cc8b238..3649e2c 100644 --- a/upsert_connection_request.go +++ b/upsert_connection_request.go @@ -5,7 +5,7 @@ package api // UpsertConnectionRequest is an in-lined request used by the UpsertConnection endpoint. type UpsertConnectionRequest struct { // A unique name of the connection for the source `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // ID of a destination to bind to the connection DestinationId *string `json:"destination_id,omitempty"` // ID of a source to bind to the connection diff --git a/upsert_connection_request_destination.go b/upsert_connection_request_destination.go index f0e2566..e863d68 100644 --- a/upsert_connection_request_destination.go +++ b/upsert_connection_request_destination.go @@ -5,7 +5,7 @@ package api // Destination input object type UpsertConnectionRequestDestination struct { // Name for the destination `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Endpoint of the destination Url *string `json:"url,omitempty"` // Path for the CLI destination diff --git a/upsert_connection_request_ruleset.go b/upsert_connection_request_ruleset.go index 62c4b31..4142773 100644 --- a/upsert_connection_request_ruleset.go +++ b/upsert_connection_request_ruleset.go @@ -5,7 +5,7 @@ package api // Ruleset input object type UpsertConnectionRequestRuleset struct { // Name for the ruleset `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Array of rules to apply Rules *[]*Rule `json:"rules,omitempty"` IsTeamDefault *bool `json:"is_team_default,omitempty"` diff --git a/upsert_connection_request_source.go b/upsert_connection_request_source.go index 54fa642..b425d77 100644 --- a/upsert_connection_request_source.go +++ b/upsert_connection_request_source.go @@ -5,5 +5,5 @@ package api // Source input object type UpsertConnectionRequestSource struct { // A unique name for the source `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` } diff --git a/upsert_destination_request.go b/upsert_destination_request.go index 959921a..cbc47ba 100644 --- a/upsert_destination_request.go +++ b/upsert_destination_request.go @@ -5,7 +5,7 @@ package api // UpsertDestinationRequest is an in-lined request used by the UpsertDestination endpoint. type UpsertDestinationRequest struct { // Name for the destination `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Endpoint of the destination Url *string `json:"url,omitempty"` // Path for the CLI destination diff --git a/upsert_issue_trigger_request.go b/upsert_issue_trigger_request.go index 6d779ea..012bbee 100644 --- a/upsert_issue_trigger_request.go +++ b/upsert_issue_trigger_request.go @@ -9,5 +9,5 @@ type UpsertIssueTriggerRequest struct { Configs *UpsertIssueTriggerRequestConfigs `json:"configs,omitempty"` Channels *IssueTriggerChannels `json:"channels,omitempty"` // Required unique name to use as reference when using the API `<= 255 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` } diff --git a/upsert_ruleset_request.go b/upsert_ruleset_request.go index b543ff3..0de9cbb 100644 --- a/upsert_ruleset_request.go +++ b/upsert_ruleset_request.go @@ -5,7 +5,7 @@ package api // UpsertRulesetRequest is an in-lined request used by the UpsertRuleset endpoint. type UpsertRulesetRequest struct { // Name for the ruleset `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // Array of rules to apply Rules *[]*Rule `json:"rules,omitempty"` IsTeamDefault *bool `json:"is_team_default,omitempty"` diff --git a/upsert_source_request.go b/upsert_source_request.go index 89edf9d..9a7ed63 100644 --- a/upsert_source_request.go +++ b/upsert_source_request.go @@ -5,5 +5,5 @@ package api // UpsertSourceRequest is an in-lined request used by the UpsertSource endpoint. type UpsertSourceRequest struct { // A unique name for the source `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` } diff --git a/upsert_transformation_request.go b/upsert_transformation_request.go index 8260c4f..9603d98 100644 --- a/upsert_transformation_request.go +++ b/upsert_transformation_request.go @@ -5,9 +5,9 @@ package api // UpsertTransformationRequest is an in-lined request used by the UpsertTransformation endpoint. type UpsertTransformationRequest struct { // A unique, human-friendly name for the transformation `<= 155 characters` - Name string `json:"name,omitempty"` + Name string `json:"name"` // JavaScript code to be executed - Code string `json:"code,omitempty"` + Code string `json:"code"` // Key-value environment variables to be passed to the transformation Env *map[string]*UpsertTransformationRequestEnvValue `json:"env,omitempty"` }