import { services, fields } from "./protos"; export interface CustomerOptions { customer_id: string; refresh_token: string; login_customer_id?: string; linked_customer_id?: string; } export type CustomerCredentials = Pick; export interface ReportOptions extends RequestOptions { entity: fields.Resource; attributes?: fields.Attributes; metrics?: fields.Metrics; segments?: fields.Segments; constraints?: Constraints; parameters?: string; limit?: number; order?: Order[]; /** * @deprecated `order_by` will be removed in a future version. Migration to the `order` report option key is advised. */ order_by?: ConstraintKey | ConstraintKey[]; /** * @deprecated `sort_order` will be removed in a future version. Migration to the `order` report option key is advised. */ sort_order?: SortOrder; date_constant?: DateConstant; from_date?: string; to_date?: string; } /** * Add back optional return_total_results_count as it is still a valid request option */ type SearchSettingsWithOptionalTotalCount = { search_settings?: Pick; }; /** * Request Options with optional total count in search_settings */ export type RequestOptionsWithTotalResults = Omit & SearchSettingsWithOptionalTotalCount; /** * Report Options with optional total count in search_settings */ export type ReportOptionsWithTotalResults = Omit & SearchSettingsWithOptionalTotalCount; export type DateConstant = "TODAY" | "YESTERDAY" | "LAST_7_DAYS" | "LAST_BUSINESS_WEEK" | "THIS_MONTH" | "LAST_MONTH" | "LAST_14_DAYS" | "LAST_30_DAYS" | "THIS_WEEK_SUN_TODAY" | "THIS_WEEK_MON_TODAY" | "LAST_WEEK_SUN_SAT" | "LAST_WEEK_MON_SUN"; export declare const dateConstants: DateConstant[]; export type SortOrder = "ASC" | "DESC"; export interface Order { field: ConstraintKey; sort_order?: SortOrder; } export type ConstraintKey = fields.Attribute | fields.Metric | fields.Segment; export type ConstraintValue = number | string | boolean | (number | string)[]; export type ConstraintOperation = "=" | "!=" | ">" | ">=" | "<" | "<=" | "IN" | "NOT IN" | "LIKE" | "NOT LIKE" | "CONTAINS ANY" | "CONTAINS ALL" | "CONTAINS NONE" | "IS NULL" | "IS NOT NULL" | "DURING" | "BETWEEN" | "REGEXP_MATCH" | "NOT REGEXP_MATCH"; export type ConstraintType1 = { key: ConstraintKey; op: ConstraintOperation; val: ConstraintValue; }; export type ConstraintType2 = { [C in ConstraintKey]?: ConstraintValue; }; export type Constraint = string | ConstraintType1 | ConstraintType2; export type Constraints = Constraint[] | ConstraintType2; export type RequestOptions = Omit & { search_settings?: Omit; }; export type MutateOptions = Omit; export type MutateOperation = { resource: T; entity: fields.Resource; operation?: "create" | "update" | "remove"; exempt_policy_violation_keys?: services.AdGroupCriterionOperation["exempt_policy_violation_keys"]; } & Partial>; export type PageToken = services.ISearchGoogleAdsResponse["next_page_token"]; export {};