import { ServiceType } from "@protobuf-ts/runtime-rpc"; import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { UserIdentifier } from "../common/offline_user_data"; import { ConversionAdjustmentTypeEnum_ConversionAdjustmentType } from "../enums/conversion_adjustment_type"; import { Status } from "../../google/rpc/status"; /** * Request message for * [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v11.services.ConversionAdjustmentUploadService.UploadConversionAdjustments]. * * @generated from protobuf message google.ads.googleads.v11.services.UploadConversionAdjustmentsRequest */ export interface UploadConversionAdjustmentsRequest { /** * Required. The ID of the customer performing the upload. * * @generated from protobuf field: string customer_id = 1; */ customerId: string; /** * Required. The conversion adjustments that are being uploaded. * * @generated from protobuf field: repeated google.ads.googleads.v11.services.ConversionAdjustment conversion_adjustments = 2; */ conversionAdjustments: ConversionAdjustment[]; /** * Required. If true, successful operations will be carried out and invalid * operations will return errors. If false, all operations will be carried out * in one transaction if and only if they are all valid. This should always be * set to true. * See * https://developers.google.com/google-ads/api/docs/best-practices/partial-failures * for more information about partial failure. * * @generated from protobuf field: bool partial_failure = 3; */ partialFailure: boolean; /** * If true, the request is validated but not executed. Only errors are * returned, not results. * * @generated from protobuf field: bool validate_only = 4; */ validateOnly: boolean; } /** * Response message for * [ConversionAdjustmentUploadService.UploadConversionAdjustments][google.ads.googleads.v11.services.ConversionAdjustmentUploadService.UploadConversionAdjustments]. * * @generated from protobuf message google.ads.googleads.v11.services.UploadConversionAdjustmentsResponse */ export interface UploadConversionAdjustmentsResponse { /** * Errors that pertain to conversion adjustment failures in the partial * failure mode. Returned when all errors occur inside the adjustments. If any * errors occur outside the adjustments (for example, auth errors), we return * an RPC level error. See * https://developers.google.com/google-ads/api/docs/best-practices/partial-failures * for more information about partial failure. * * @generated from protobuf field: google.rpc.Status partial_failure_error = 1; */ partialFailureError?: Status; /** * Returned for successfully processed conversion adjustments. Proto will be * empty for rows that received an error. Results are not returned when * validate_only is true. * * @generated from protobuf field: repeated google.ads.googleads.v11.services.ConversionAdjustmentResult results = 2; */ results: ConversionAdjustmentResult[]; } /** * A conversion adjustment. * * @generated from protobuf message google.ads.googleads.v11.services.ConversionAdjustment */ export interface ConversionAdjustment { /** * For adjustments, uniquely identifies a conversion that was reported * without an order ID specified. If the adjustment_type is ENHANCEMENT, this * value is optional but may be set in addition to the order_id. * * @generated from protobuf field: google.ads.googleads.v11.services.GclidDateTimePair gclid_date_time_pair = 12; */ gclidDateTimePair?: GclidDateTimePair; /** * The order ID of the conversion to be adjusted. If the conversion was * reported with an order ID specified, that order ID must be used as the * identifier here. The order ID is required for enhancements. * * @generated from protobuf field: optional string order_id = 13; */ orderId?: string; /** * Resource name of the conversion action associated with this conversion * adjustment. Note: Although this resource name consists of a customer id and * a conversion action id, validation will ignore the customer id and use the * conversion action id as the sole identifier of the conversion action. * * @generated from protobuf field: optional string conversion_action = 8; */ conversionAction?: string; /** * The date time at which the adjustment occurred. Must be after the * conversion_date_time. The timezone must be specified. The format is * "yyyy-mm-dd hh:mm:ss+|-hh:mm", for example, "2019-01-01 12:32:45-08:00". * * @generated from protobuf field: optional string adjustment_date_time = 9; */ adjustmentDateTime?: string; /** * The adjustment type. * * @generated from protobuf field: google.ads.googleads.v11.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5; */ adjustmentType: ConversionAdjustmentTypeEnum_ConversionAdjustmentType; /** * Information needed to restate the conversion's value. * Required for restatements. Should not be supplied for retractions. An error * will be returned if provided for a retraction. * NOTE: If you want to upload a second restatement with a different adjusted * value, it must have a new, more recent, adjustment occurrence time. * Otherwise, it will be treated as a duplicate of the previous restatement * and ignored. * * @generated from protobuf field: google.ads.googleads.v11.services.RestatementValue restatement_value = 6; */ restatementValue?: RestatementValue; /** * The user identifiers to enhance the original conversion. * ConversionAdjustmentUploadService only accepts user identifiers in * enhancements. The maximum number of user identifiers for each * enhancement is 5. * * @generated from protobuf field: repeated google.ads.googleads.v11.common.UserIdentifier user_identifiers = 10; */ userIdentifiers: UserIdentifier[]; /** * The user agent to enhance the original conversion. This can be found in * your user's HTTP request header when they convert on your web page. * Example, "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X)". User * agent can only be specified in enhancements with user identifiers. This * should match the user agent of the request that sent the original * conversion so the conversion and its enhancement are either both attributed * as same-device or both attributed as cross-device. * * @generated from protobuf field: optional string user_agent = 11; */ userAgent?: string; } /** * Contains information needed to restate a conversion's value. * * @generated from protobuf message google.ads.googleads.v11.services.RestatementValue */ export interface RestatementValue { /** * The restated conversion value. This is the value of the conversion after * restatement. For example, to change the value of a conversion from 100 to * 70, an adjusted value of 70 should be reported. * NOTE: If you want to upload a second restatement with a different adjusted * value, it must have a new, more recent, adjustment occurrence time. * Otherwise, it will be treated as a duplicate of the previous restatement * and ignored. * * @generated from protobuf field: optional double adjusted_value = 3; */ adjustedValue?: number; /** * The currency of the restated value. If not provided, then the default * currency from the conversion action is used, and if that is not set then * the account currency is used. This is the ISO 4217 3-character currency * code for example, USD or EUR. * * @generated from protobuf field: optional string currency_code = 4; */ currencyCode?: string; } /** * Uniquely identifies a conversion that was reported without an order ID * specified. * * @generated from protobuf message google.ads.googleads.v11.services.GclidDateTimePair */ export interface GclidDateTimePair { /** * Google click ID (gclid) associated with the original conversion for this * adjustment. * * @generated from protobuf field: optional string gclid = 3; */ gclid?: string; /** * The date time at which the original conversion for this adjustment * occurred. The timezone must be specified. The format is "yyyy-mm-dd * hh:mm:ss+|-hh:mm", for example, "2019-01-01 12:32:45-08:00". * * @generated from protobuf field: optional string conversion_date_time = 4; */ conversionDateTime?: string; } /** * Information identifying a successfully processed ConversionAdjustment. * * @generated from protobuf message google.ads.googleads.v11.services.ConversionAdjustmentResult */ export interface ConversionAdjustmentResult { /** * The gclid and conversion date time of the conversion. * * @generated from protobuf field: google.ads.googleads.v11.services.GclidDateTimePair gclid_date_time_pair = 9; */ gclidDateTimePair?: GclidDateTimePair; /** * The order ID of the conversion to be adjusted. * * @generated from protobuf field: string order_id = 10; */ orderId: string; /** * Resource name of the conversion action associated with this conversion * adjustment. * * @generated from protobuf field: optional string conversion_action = 7; */ conversionAction?: string; /** * The date time at which the adjustment occurred. The format is * "yyyy-mm-dd hh:mm:ss+|-hh:mm", for example, "2019-01-01 12:32:45-08:00". * * @generated from protobuf field: optional string adjustment_date_time = 8; */ adjustmentDateTime?: string; /** * The adjustment type. * * @generated from protobuf field: google.ads.googleads.v11.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType adjustment_type = 5; */ adjustmentType: ConversionAdjustmentTypeEnum_ConversionAdjustmentType; } declare class UploadConversionAdjustmentsRequest$Type extends MessageType { constructor(); create(value?: PartialMessage): UploadConversionAdjustmentsRequest; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadConversionAdjustmentsRequest): UploadConversionAdjustmentsRequest; internalBinaryWrite(message: UploadConversionAdjustmentsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.services.UploadConversionAdjustmentsRequest */ export declare const UploadConversionAdjustmentsRequest: UploadConversionAdjustmentsRequest$Type; declare class UploadConversionAdjustmentsResponse$Type extends MessageType { constructor(); create(value?: PartialMessage): UploadConversionAdjustmentsResponse; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadConversionAdjustmentsResponse): UploadConversionAdjustmentsResponse; internalBinaryWrite(message: UploadConversionAdjustmentsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.services.UploadConversionAdjustmentsResponse */ export declare const UploadConversionAdjustmentsResponse: UploadConversionAdjustmentsResponse$Type; declare class ConversionAdjustment$Type extends MessageType { constructor(); create(value?: PartialMessage): ConversionAdjustment; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConversionAdjustment): ConversionAdjustment; internalBinaryWrite(message: ConversionAdjustment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.services.ConversionAdjustment */ export declare const ConversionAdjustment: ConversionAdjustment$Type; declare class RestatementValue$Type extends MessageType { constructor(); create(value?: PartialMessage): RestatementValue; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RestatementValue): RestatementValue; internalBinaryWrite(message: RestatementValue, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.services.RestatementValue */ export declare const RestatementValue: RestatementValue$Type; declare class GclidDateTimePair$Type extends MessageType { constructor(); create(value?: PartialMessage): GclidDateTimePair; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GclidDateTimePair): GclidDateTimePair; internalBinaryWrite(message: GclidDateTimePair, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.services.GclidDateTimePair */ export declare const GclidDateTimePair: GclidDateTimePair$Type; declare class ConversionAdjustmentResult$Type extends MessageType { constructor(); create(value?: PartialMessage): ConversionAdjustmentResult; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConversionAdjustmentResult): ConversionAdjustmentResult; internalBinaryWrite(message: ConversionAdjustmentResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message google.ads.googleads.v11.services.ConversionAdjustmentResult */ export declare const ConversionAdjustmentResult: ConversionAdjustmentResult$Type; /** * @generated ServiceType for protobuf service google.ads.googleads.v11.services.ConversionAdjustmentUploadService */ export declare const ConversionAdjustmentUploadService: ServiceType; export {};