Skip to content

Commit

Permalink
July Merge API Sync (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored Jul 26, 2024
1 parent f4bf3f8 commit e6a7564
Show file tree
Hide file tree
Showing 60 changed files with 1,855 additions and 166 deletions.
1,404 changes: 1,278 additions & 126 deletions ats/applications.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ats/audit_trail.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type AuditTrailListRequest struct {
Cursor *string `json:"-"`
// If included, will only include audit trail events that occurred before this time
EndDate *string `json:"-"`
// If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`
// If included, will only include events with the given event type. Possible values include: `CREATED_REMOTE_PRODUCTION_API_KEY`, `DELETED_REMOTE_PRODUCTION_API_KEY`, `CREATED_TEST_API_KEY`, `DELETED_TEST_API_KEY`, `REGENERATED_PRODUCTION_API_KEY`, `INVITED_USER`, `TWO_FACTOR_AUTH_ENABLED`, `TWO_FACTOR_AUTH_DISABLED`, `DELETED_LINKED_ACCOUNT`, `CREATED_DESTINATION`, `DELETED_DESTINATION`, `CHANGED_DESTINATION`, `CHANGED_SCOPES`, `CHANGED_PERSONAL_INFORMATION`, `CHANGED_ORGANIZATION_SETTINGS`, `ENABLED_INTEGRATION`, `DISABLED_INTEGRATION`, `ENABLED_CATEGORY`, `DISABLED_CATEGORY`, `CHANGED_PASSWORD`, `RESET_PASSWORD`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `ENABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_ORGANIZATION`, `DISABLED_REDACT_UNMAPPED_DATA_FOR_LINKED_ACCOUNT`, `CREATED_INTEGRATION_WIDE_FIELD_MAPPING`, `CREATED_LINKED_ACCOUNT_FIELD_MAPPING`, `CHANGED_INTEGRATION_WIDE_FIELD_MAPPING`, `CHANGED_LINKED_ACCOUNT_FIELD_MAPPING`, `DELETED_INTEGRATION_WIDE_FIELD_MAPPING`, `DELETED_LINKED_ACCOUNT_FIELD_MAPPING`, `FORCED_LINKED_ACCOUNT_RESYNC`, `MUTED_ISSUE`, `GENERATED_MAGIC_LINK`, `ENABLED_MERGE_WEBHOOK`, `DISABLED_MERGE_WEBHOOK`, `MERGE_WEBHOOK_TARGET_CHANGED`, `END_USER_CREDENTIALS_ACCESSED`
EventType *string `json:"-"`
// Number of results to return per page.
PageSize *int `json:"-"`
Expand Down
2 changes: 2 additions & 0 deletions ats/issues.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type IssuesListRequest struct {
LastIncidentTimeAfter *time.Time `json:"-"`
// If provided, will only return issues whose last incident time was before this datetime.
LastIncidentTimeBefore *time.Time `json:"-"`
// If provided, will only include issues pertaining to the linked account passed in.
LinkedAccountId *string `json:"-"`
// Number of results to return per page.
PageSize *int `json:"-"`
// If included, will only include issues whose most recent action occurred after this time
Expand Down
5 changes: 4 additions & 1 deletion ats/issues/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func NewClient(opts ...core.ClientOption) *Client {
}
}

// Gets issues.
// Gets all issues for Organization.
func (c *Client) List(ctx context.Context, request *ats.IssuesListRequest) (*ats.PaginatedIssueList, error) {
baseURL := "https://api.merge.dev/api"
if c.baseURL != "" {
Expand Down Expand Up @@ -69,6 +69,9 @@ func (c *Client) List(ctx context.Context, request *ats.IssuesListRequest) (*ats
if request.LastIncidentTimeBefore != nil {
queryParams.Add("last_incident_time_before", fmt.Sprintf("%v", request.LastIncidentTimeBefore.Format(time.RFC3339)))
}
if request.LinkedAccountId != nil {
queryParams.Add("linked_account_id", fmt.Sprintf("%v", *request.LinkedAccountId))
}
if request.PageSize != nil {
queryParams.Add("page_size", fmt.Sprintf("%v", *request.PageSize))
}
Expand Down
2 changes: 2 additions & 0 deletions ats/link_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ type EndUserDetailsRequest struct {
LinkExpiryMins *int `json:"link_expiry_mins,omitempty"`
// Whether to generate a Magic Link URL. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
ShouldCreateMagicLinkUrl *bool `json:"should_create_magic_link_url,omitempty"`
// Whether to generate a Magic Link URL on the Admin Needed screen during the linking flow. Defaults to false. For more information on Magic Link, see https://merge.dev/blog/integrations-fast-say-hello-to-magic-link.
HideAdminMagicLink *bool `json:"hide_admin_magic_link,omitempty"`
// An array of objects to specify the models and fields that will be disabled for a given Linked Account. Each object uses model_id, enabled_actions, and disabled_fields to specify the model, method, and fields that are scoped for a given Linked Account.
CommonModels []*CommonModelScopesBodyRequest `json:"common_models,omitempty"`
// When creating a Link Token, you can set permissions for Common Models that will apply to the account that is going to be linked. Any model or field not specified in link token payload will default to existing settings.
Expand Down
Loading

0 comments on commit e6a7564

Please sign in to comment.