/**
 * Google Analytics Node - Version 1
 * Discriminator: resource=report, operation=get
 */


interface Credentials {
  googleAnalyticsOAuth2: CredentialReference;
}

/** Return the analytics data */
export type GoogleAnalyticsV1ReportGetParams = {
  resource: 'report';
  operation: 'get';
/**
 * The View ID of Google Analytics. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
 */
    viewId?: string | Expression<string>;
/**
 * Whether to return all results or only up to a given limit
 * @default false
 */
    returnAll?: boolean | Expression<boolean>;
/**
 * Max number of results to return
 * @displayOptions.show { returnAll: [false] }
 * @default 1000
 */
    limit?: number | Expression<number>;
/**
 * Whether to return a simplified version of the response instead of the raw data
 * @default true
 */
    simple?: boolean | Expression<boolean>;
/**
 * Additional Fields
 * @default {}
 */
    additionalFields?: {
    /** Date ranges in the request
     * @default {}
     */
    dateRangesUi?: {
        /** Date Range
     */
    dateRanges?: {
      /** Start Date
       */
      startDate?: string | Expression<string>;
      /** End Date
       */
      endDate?: string | Expression<string>;
    };
  };
    /** Dimensions are attributes of your data. For example, the dimension ga:city indicates the city, for example, "Paris" or "New York", from which a session originates.
     * @default {}
     */
    dimensionUi?: {
        /** Dimension
     */
    dimensionValues?: Array<{
      /** Name of the dimension to fetch, for example ga:browser. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
       */
      name?: string | Expression<string>;
    }>;
  };
    /** Dimension Filters in the request
     * @default {}
     */
    dimensionFiltersUi?: {
        /** Filters
     */
    filterValues?: Array<{
      /** Name of the dimension to filter by. Choose from the list, or specify an ID using an &lt;a href="https://docs.n8n.io/code/expressions/"&gt;expression&lt;/a&gt;.
       */
      dimensionName?: string | Expression<string>;
      /** Operator to use in combination with value
       * @default EXACT
       */
      operator?: 'BEGINS_WITH' | 'ENDS_WITH' | 'NUMERIC_EQUAL' | 'EXACT' | 'NUMERIC_GREATER_THAN' | 'NUMERIC_LESS_THAN' | 'PARTIAL' | 'REGEXP' | Expression<string>;
      /** String or &lt;a href="https://support.google.com/analytics/answer/1034324?hl=en"&gt;regular expression&lt;/a&gt; to match against
       */
      expressions?: string | Expression<string> | PlaceholderValue;
    }>;
  };
    /** Whether to hide the total of all metrics for all the matching rows, for every date range
     * @default false
     */
    hideTotals?: boolean | Expression<boolean>;
    /** Whether to hide the minimum and maximum across all matching rows
     * @default false
     */
    hideValueRanges?: boolean | Expression<boolean>;
    /** Whether the response exclude rows if all the retrieved metrics are equal to zero
     * @default false
     */
    includeEmptyRows?: boolean | Expression<boolean>;
    /** Metrics in the request
     * @default {}
     */
    metricsUi?: {
        /** Metric
     */
    metricValues?: Array<{
      /** An alias for the metric expression is an alternate name for the expression. The alias can be used for filtering and sorting.
       */
      alias?: string | Expression<string> | PlaceholderValue;
      /** &lt;p&gt;A metric expression in the request. An expression is constructed from one or more metrics and numbers.&lt;/p&gt;&lt;p&gt;Accepted operators include: Plus (+), Minus (-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis, Positive cardinal numbers (0-9), can include decimals and is limited to 1024 characters.&lt;/p&gt;&lt;p&gt;Example ga:totalRefunds/ga:users, in most cases the metric expression is just a single metric name like ga:users.&lt;/p&gt;&lt;p&gt;Adding mixed MetricType (E.g., CURRENCY + PERCENTAGE) metrics will result in unexpected results.&lt;/p&gt;.
       * @default ga:newUsers
       */
      expression?: string | Expression<string> | PlaceholderValue;
      /** Specifies how the metric expression should be formatted
       * @default INTEGER
       */
      formattingType?: 'CURRENCY' | 'FLOAT' | 'INTEGER' | 'PERCENT' | 'TIME' | Expression<string>;
    }>;
  };
    /** Whether to enable resource based quotas
     * @default false
     */
    useResourceQuotas?: boolean | Expression<boolean>;
  };
};

export type GoogleAnalyticsV1ReportGetNode = {
  type: 'n8n-nodes-base.googleAnalytics';
  version: 1;
  credentials?: Credentials;
  config: NodeConfig<GoogleAnalyticsV1ReportGetParams>;
};