diff --git a/pkg/accountmanagement/accountmanagement_api.go b/pkg/accountmanagement/accountmanagement_api.go index 09bef5ab1..ff32089d9 100644 --- a/pkg/accountmanagement/accountmanagement_api.go +++ b/pkg/accountmanagement/accountmanagement_api.go @@ -45,6 +45,7 @@ const AccountManagementCreateAccountMutation = `mutation( ) { managedAccount { id + isCanceled name regionCode } @@ -88,23 +89,31 @@ const AccountManagementUpdateAccountMutation = `mutation( ) { managedAccount { id + isCanceled name regionCode } } }` // Admin-level info about the accounts in an organization. -func (a *Accountmanagement) GetManagedAccounts() (*[]AccountManagementManagedAccount, error) { - return a.GetManagedAccountsWithContext(context.Background()) +func (a *Accountmanagement) GetManagedAccounts( + isCanceled bool, +) (*[]AccountManagementManagedAccount, error) { + return a.GetManagedAccountsWithContext(context.Background(), + isCanceled, + ) } // Admin-level info about the accounts in an organization. func (a *Accountmanagement) GetManagedAccountsWithContext( ctx context.Context, + isCanceled bool, ) (*[]AccountManagementManagedAccount, error) { resp := managedAccountsResponse{} - vars := map[string]interface{}{} + vars := map[string]interface{}{ + "isCanceled": isCanceled, + } if err := a.client.NerdGraphQueryWithContext(ctx, getManagedAccountsQuery, vars, &resp); err != nil { return nil, err @@ -119,6 +128,7 @@ func (a *Accountmanagement) GetManagedAccountsWithContext( const getManagedAccountsQuery = `query { actor { organization { accountManagement { managedAccounts { id + isCanceled name regionCode } } } } }` diff --git a/pkg/accountmanagement/types.go b/pkg/accountmanagement/types.go index eb38b21c7..824ea366b 100644 --- a/pkg/accountmanagement/types.go +++ b/pkg/accountmanagement/types.go @@ -5,6 +5,8 @@ package accountmanagement type AccountManagementCreateInput struct { // The name of the account. Name string `json:"name"` + // The id of the managed organization where the account will be created. + OrganizationId int `json:"organizationId,omitempty"` // The data center region for the account RegionCode string `json:"regionCode,omitempty"` } @@ -19,6 +21,8 @@ type AccountManagementCreateResponse struct { type AccountManagementManagedAccount struct { // The account ID. ID int `json:"id"` + // True if account is canceled + IsCanceled bool `json:"isCanceled"` // The name of the account. Name string `json:"name"` // The data center region for the account (US or EU). @@ -57,6 +61,8 @@ type Organization struct { AccountManagement AccountManagementOrganizationStitchedFields `json:"accountManagement,omitempty"` // The customer id for the organization. CustomerId string `json:"customerId,omitempty"` + // The ID of the organization. + ID int `json:"id,omitempty"` // The name of the organization. Name string `json:"name,omitempty"` // The telemetry id for the organization @@ -66,3 +72,10 @@ type Organization struct { type managedAccountsResponse struct { Actor Actor `json:"actor"` } + +// ID - The `ID` scalar type represents a unique identifier, often used to +// refetch an object or as key for a cache. The ID type appears in a JSON +// response as a String; however, it is not intended to be human-readable. +// When expected as an input type, any string (such as `"4"`) or integer +// (such as `4`) input value will be accepted as an ID. +type ID string diff --git a/pkg/accounts/types.go b/pkg/accounts/types.go index 91eb94b50..addaf951e 100644 --- a/pkg/accounts/types.go +++ b/pkg/accounts/types.go @@ -1,7 +1,6 @@ // Code generated by tutone: DO NOT EDIT package accounts -// RegionScope - type RegionScope string var RegionScopeTypes = struct { @@ -18,9 +17,7 @@ var RegionScopeTypes = struct { // AccountOutline - The `AccountOutline` object provides basic data about an account. type AccountOutline struct { - // - ID int `json:"id,omitempty"` - // + ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` // Returns event types that are currently reporting in the account. ReportingEventTypes []string `json:"reportingEventTypes,omitempty"` @@ -28,8 +25,6 @@ type AccountOutline struct { // AccountReference - The `AccountReference` object provides basic identifying information about the account. type AccountReference struct { - // - ID int `json:"id,omitempty"` - // + ID int `json:"id,omitempty"` Name string `json:"name,omitempty"` } diff --git a/pkg/agentapplications/agentapplications_api.go b/pkg/agentapplications/agentapplications_api.go index b7fe703b0..745ee0e7d 100644 --- a/pkg/agentapplications/agentapplications_api.go +++ b/pkg/agentapplications/agentapplications_api.go @@ -198,10 +198,12 @@ const AgentApplicationSettingsUpdateMutation = `mutation( ) { alias apmSettings { + alias apmConfig { apdexTarget useServerSideConfig } + captureMemcacheKeys errorCollector { enabled expectedErrorClasses @@ -234,6 +236,8 @@ const AgentApplicationSettingsUpdateMutation = `mutation( } } browserProperties { + jsConfig + jsConfigScript jsLoaderScript } browserSettings { @@ -253,6 +257,7 @@ const AgentApplicationSettingsUpdateMutation = `mutation( excludeNewrelicHeader } loader + pinnedVersion privacy { cookiesEnabled } diff --git a/pkg/agentapplications/types.go b/pkg/agentapplications/types.go index c90f50da1..82fea1c24 100644 --- a/pkg/agentapplications/types.go +++ b/pkg/agentapplications/types.go @@ -33,7 +33,7 @@ var AgentApplicationBrowserLoaderTypes = struct { SPA: "SPA", } -// AgentApplicationSettingsBrowserLoader - Determines which browser loader will be configured. Some allowed return values are specified for backwards-compatibility and do not represent currently allowed values for new applications. +// AgentApplicationSettingsBrowserLoader - Determines which browser loader will be configured. Some allowed return values are specified for backwards-compatability and do not represent currently allowed values for new applications. // See [documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent/#agent-types) for further information. type AgentApplicationSettingsBrowserLoader string @@ -50,7 +50,7 @@ var AgentApplicationSettingsBrowserLoaderTypes = struct { RUM AgentApplicationSettingsBrowserLoader // Pro+SPA: This is the default installed agent when you enable browser monitoring. Gives you access to all of the Browser Pro features and to Single Page App (SPA) monitoring. Provides detailed page timing data and the most up-to-date New Relic features, including distributed tracing, for all types of applications. SPA AgentApplicationSettingsBrowserLoader - // This value is specified for backwards-compatibility. + // This value is specified for backwards-compatability. XHR AgentApplicationSettingsBrowserLoader }{ // Use PRO instead @@ -266,6 +266,8 @@ type AgentApplicationSettingsApmBase struct { Alias string `json:"alias,omitempty"` // Access general settings for the application. ApmConfig AgentApplicationSettingsApmConfig `json:"apmConfig"` + // Enable or disable the capture of memcache keys. + CaptureMemcacheKeys bool `json:"captureMemcacheKeys,omitempty"` // Access error collector settings for the application. The error collector captures information about uncaught exceptions and sends them to New Relic for viewing. ErrorCollector AgentApplicationSettingsErrorCollector `json:"errorCollector,omitempty"` // Access enabled state for the Java Flight Recorder. This is available only for the Java language agent version 8.0.0 or later. @@ -298,7 +300,7 @@ type AgentApplicationSettingsApmConfigInput struct { UseServerSideConfig bool `json:"useServerSideConfig,omitempty"` } -// AgentApplicationSettingsBrowserAjax - Browser Ajax. +// AgentApplicationSettingsBrowserAjax - Enables ajax traces in the browser app. type AgentApplicationSettingsBrowserAjax struct { // List of domains excluded from Ajax traces by the browser agent. DenyList []string `json:"denyList"` @@ -349,7 +351,7 @@ type AgentApplicationSettingsBrowserDistributedTracing struct { // AgentApplicationSettingsBrowserDistributedTracingInput - Configure distributed traces from within browser apps. type AgentApplicationSettingsBrowserDistributedTracingInput struct { // Supplies allowed origins for distributed tracing in browser. - AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` + AllowedOrigins []string `json:"allowedOrigins"` // Enables CORS for distributed tracing in browser. CorsEnabled bool `json:"corsEnabled,omitempty"` // Enables the use of the `newrelic` header for CORS requests with distributed tracing. [See Docs](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-pro-features/browser-data-distributed-tracing/#cors) for more information. @@ -357,31 +359,35 @@ type AgentApplicationSettingsBrowserDistributedTracingInput struct { // Enables CORS to use tracecontext headers for distributed tracing in browser. CorsUseTracecontextHeaders bool `json:"corsUseTracecontextHeaders,omitempty"` // Enables distributed tracing in browser. - Enabled bool `json:"enabled"` + Enabled bool `json:"enabled,omitempty"` // Enables the `newrelic` header to be excluded in distributed tracing in browser. ExcludeNewrelicHeader bool `json:"excludeNewrelicHeader,omitempty"` } -// AgentApplicationSettingsBrowserMonitoring - Browser monitoring. +// AgentApplicationSettingsBrowserMonitoring - Provides fields to set browser monitoring application settings. type AgentApplicationSettingsBrowserMonitoring struct { // Enables ajax traces in the browser app. Ajax AgentApplicationSettingsBrowserAjax `json:"ajax,omitempty"` - // Configure distributed tracing in browser apps. + // Distributed tracing type. See [documentation](https://docs.newrelic.com/docs/browser/new-relic-browser/browser-pro-features/browser-data-distributed-tracing/) for further information. DistributedTracing AgentApplicationSettingsBrowserDistributedTracing `json:"distributedTracing"` // The type of browser agent that will be loaded. Loader AgentApplicationSettingsBrowserLoader `json:"loader"` - // Browser monitoring's page load timing feature can track sessions by using cookies that contain a simple session identifier. + // Specify the semantic version of the browser agent that you would like your app to use. Leave this blank to use the most recent version. Use 'x' in place of a numeric digit to represent the latest release within the version range. For example, '1.x.x' + PinnedVersion string `json:"pinnedVersion,omitempty"` + // Browser privacy. See [documentation](https://docs.newrelic.com/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking/) for further information. Privacy AgentApplicationSettingsBrowserPrivacy `json:"privacy"` } // AgentApplicationSettingsBrowserMonitoringInput - Set browser monitoring application settings. type AgentApplicationSettingsBrowserMonitoringInput struct { - // Browser monitoring's page load Ajax requests. + // Configuration settings related to how a browser agent handles Ajax requests. Ajax *AgentApplicationSettingsBrowserAjaxInput `json:"ajax,omitempty"` - // If you use browser to monitor end-user browser activity, you can now see end-user-originating browser-side traces in distributed tracing. + // Configure distributed traces from within browser apps. DistributedTracing *AgentApplicationSettingsBrowserDistributedTracingInput `json:"distributedTracing,omitempty"` // Determines which browser loader will be configured. Loader *AgentApplicationSettingsBrowserLoaderInput `json:"loader,omitempty"` + // Specify the semantic version of the browser agent that you would like your app to use. Leave this blank to use the most recent version. Use 'x' in place of a numeric digit to represent the latest release within the version range. For example, '1.x.x' + PinnedVersion string `json:"pinnedVersion,omitempty"` // Browser monitoring's page load timing feature can track sessions by using cookies that contain a simple session identifier. Privacy *AgentApplicationSettingsBrowserPrivacyInput `json:"privacy,omitempty"` } @@ -400,6 +406,10 @@ type AgentApplicationSettingsBrowserPrivacyInput struct { // AgentApplicationSettingsBrowserProperties - General Properties related to browser applications. type AgentApplicationSettingsBrowserProperties struct { + // The configuration required to run the npm version of the JS agent. This is the "pure" JSON configuration block without surrounding HTML