import {z} from 'zod' export type GoogleAdsSearchads360V23CommonAgeRangeInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'AGE_RANGE_18_24' | 'AGE_RANGE_25_34' | 'AGE_RANGE_35_44' | 'AGE_RANGE_45_54' | 'AGE_RANGE_55_64' | 'AGE_RANGE_65_UP' | 'AGE_RANGE_UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonAppPaymentModelInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'PAID') | undefined}; export type GoogleAdsSearchads360V23CommonAudienceInfo = {audience?: string | undefined}; export type GoogleAdsSearchads360V23CommonBrandListInfo = {sharedSet?: string | undefined}; export type GoogleAdsSearchads360V23CommonCombinedAudienceInfo = {combinedAudience?: string | undefined}; export type GoogleAdsSearchads360V23CommonCustomAffinityInfo = {customAffinity?: string | undefined}; export type GoogleAdsSearchads360V23CommonCustomAudienceInfo = {customAudience?: string | undefined}; export type GoogleAdsSearchads360V23CommonCustomIntentInfo = {customIntent?: string | undefined}; export type GoogleAdsSearchads360V23CommonExtendedDemographicInfo = {extendedDemographicId?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonGenderInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'MALE' | 'FEMALE' | 'UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonIncomeRangeInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'INCOME_RANGE_0_50' | 'INCOME_RANGE_50_60' | 'INCOME_RANGE_60_70' | 'INCOME_RANGE_70_80' | 'INCOME_RANGE_80_90' | 'INCOME_RANGE_90_UP' | 'INCOME_RANGE_UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonKeywordInfo = {matchType?: ('UNSPECIFIED' | 'UNKNOWN' | 'EXACT' | 'PHRASE' | 'BROAD') | undefined, text?: string | undefined}; export type GoogleAdsSearchads360V23CommonLanguageInfo = {languageConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonLifeEventInfo = {lifeEventId?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonActivityCityInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonActivityCountryInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonActivityIdInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonActivityRatingInfo = {value?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonActivityStateInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelCityInfo = {cityCriterion?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelClassInfo = {value?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonHotelCountryRegionInfo = {countryRegionCriterion?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelIdInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonHotelStateInfo = {stateCriterion?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductBrandInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductCategoryInfo = {categoryId?: unknown | undefined, level?: ('UNSPECIFIED' | 'UNKNOWN' | 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5') | undefined}; export type GoogleAdsSearchads360V23CommonProductChannelInfo = {channel?: ('UNSPECIFIED' | 'UNKNOWN' | 'ONLINE' | 'LOCAL') | undefined}; export type GoogleAdsSearchads360V23CommonProductChannelExclusivityInfo = {channelExclusivity?: ('UNSPECIFIED' | 'UNKNOWN' | 'SINGLE_CHANNEL' | 'MULTI_CHANNEL') | undefined}; export type GoogleAdsSearchads360V23CommonProductConditionInfo = {condition?: ('UNSPECIFIED' | 'UNKNOWN' | 'NEW' | 'REFURBISHED' | 'USED') | undefined}; export type GoogleAdsSearchads360V23CommonProductCustomAttributeInfo = {index?: ('UNSPECIFIED' | 'UNKNOWN' | 'INDEX0' | 'INDEX1' | 'INDEX2' | 'INDEX3' | 'INDEX4') | undefined, value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductGroupingInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductItemIdInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductLabelsInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductLegacyConditionInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductTypeInfo = {level?: ('UNSPECIFIED' | 'UNKNOWN' | 'LEVEL1' | 'LEVEL2' | 'LEVEL3' | 'LEVEL4' | 'LEVEL5') | undefined, value?: string | undefined}; export type GoogleAdsSearchads360V23CommonProductTypeFullInfo = {value?: string | undefined}; export type GoogleAdsSearchads360V23CommonUnknownListingDimensionInfo = Record; export type GoogleAdsSearchads360V23CommonListingDimensionInfo = {activityCity?: GoogleAdsSearchads360V23CommonActivityCityInfo | undefined, activityCountry?: GoogleAdsSearchads360V23CommonActivityCountryInfo | undefined, activityId?: GoogleAdsSearchads360V23CommonActivityIdInfo | undefined, activityRating?: GoogleAdsSearchads360V23CommonActivityRatingInfo | undefined, activityState?: GoogleAdsSearchads360V23CommonActivityStateInfo | undefined, hotelCity?: GoogleAdsSearchads360V23CommonHotelCityInfo | undefined, hotelClass?: GoogleAdsSearchads360V23CommonHotelClassInfo | undefined, hotelCountryRegion?: GoogleAdsSearchads360V23CommonHotelCountryRegionInfo | undefined, hotelId?: GoogleAdsSearchads360V23CommonHotelIdInfo | undefined, hotelState?: GoogleAdsSearchads360V23CommonHotelStateInfo | undefined, productBrand?: GoogleAdsSearchads360V23CommonProductBrandInfo | undefined, productCategory?: GoogleAdsSearchads360V23CommonProductCategoryInfo | undefined, productChannel?: GoogleAdsSearchads360V23CommonProductChannelInfo | undefined, productChannelExclusivity?: GoogleAdsSearchads360V23CommonProductChannelExclusivityInfo | undefined, productCondition?: GoogleAdsSearchads360V23CommonProductConditionInfo | undefined, productCustomAttribute?: GoogleAdsSearchads360V23CommonProductCustomAttributeInfo | undefined, productGrouping?: GoogleAdsSearchads360V23CommonProductGroupingInfo | undefined, productItemId?: GoogleAdsSearchads360V23CommonProductItemIdInfo | undefined, productLabels?: GoogleAdsSearchads360V23CommonProductLabelsInfo | undefined, productLegacyCondition?: GoogleAdsSearchads360V23CommonProductLegacyConditionInfo | undefined, productType?: GoogleAdsSearchads360V23CommonProductTypeInfo | undefined, productTypeFull?: GoogleAdsSearchads360V23CommonProductTypeFullInfo | undefined, unknownListingDimension?: GoogleAdsSearchads360V23CommonUnknownListingDimensionInfo | undefined}; export type GoogleAdsSearchads360V23CommonListingDimensionPath = {dimensions?: Array | undefined}; export type GoogleAdsSearchads360V23CommonListingGroupInfo = {caseValue?: GoogleAdsSearchads360V23CommonListingDimensionInfo | undefined, parentAdGroupCriterion?: string | undefined, path?: GoogleAdsSearchads360V23CommonListingDimensionPath | undefined, type?: ('UNSPECIFIED' | 'UNKNOWN' | 'SUBDIVISION' | 'UNIT') | undefined}; export type GoogleAdsSearchads360V23CommonLocationInfo = {geoTargetConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonMobileAppCategoryInfo = {mobileAppCategoryConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonMobileApplicationInfo = {appId?: string | undefined, name?: string | undefined}; export type GoogleAdsSearchads360V23CommonParentalStatusInfo = {type?: ('UNSPECIFIED' | 'UNKNOWN' | 'PARENT' | 'NOT_A_PARENT' | 'UNDETERMINED') | undefined}; export type GoogleAdsSearchads360V23CommonPlacementInfo = {url?: string | undefined}; export type GoogleAdsSearchads360V23ResourcesAdGroupCriterionPositionEstimates = {estimatedAddClicksAtFirstPositionCpc?: unknown | undefined, estimatedAddCostAtFirstPositionCpc?: unknown | undefined, firstPageCpcMicros?: unknown | undefined, firstPositionCpcMicros?: unknown | undefined, topOfPageCpcMicros?: unknown | undefined}; export type GoogleAdsSearchads360V23ResourcesAdGroupCriterionQualityInfo = {creativeQualityScore?: ('UNSPECIFIED' | 'UNKNOWN' | 'BELOW_AVERAGE' | 'AVERAGE' | 'ABOVE_AVERAGE') | undefined, postClickQualityScore?: ('UNSPECIFIED' | 'UNKNOWN' | 'BELOW_AVERAGE' | 'AVERAGE' | 'ABOVE_AVERAGE') | undefined, qualityScore?: number | undefined, searchPredictedCtr?: ('UNSPECIFIED' | 'UNKNOWN' | 'BELOW_AVERAGE' | 'AVERAGE' | 'ABOVE_AVERAGE') | undefined}; export type GoogleAdsSearchads360V23CommonTopicInfo = {path?: Array | undefined, topicConstant?: string | undefined}; export type GoogleAdsSearchads360V23CommonCustomParameter = {key?: string | undefined, value?: string | undefined}; export type GoogleAdsSearchads360V23CommonUserInterestInfo = {userInterestCategory?: string | undefined}; export type GoogleAdsSearchads360V23CommonUserListInfo = {userList?: string | undefined}; export type GoogleAdsSearchads360V23CommonVerticalAdsItemGroupRuleListInfo = {sharedSet?: string | undefined}; export type GoogleAdsSearchads360V23CommonVideoLineupInfo = {videoLineupId?: unknown | undefined}; export type GoogleAdsSearchads360V23CommonWebpageConditionInfo = {argument?: string | undefined, operand?: ('UNSPECIFIED' | 'UNKNOWN' | 'URL' | 'CATEGORY' | 'PAGE_TITLE' | 'PAGE_CONTENT' | 'CUSTOM_LABEL') | undefined, operator?: ('UNSPECIFIED' | 'UNKNOWN' | 'EQUALS' | 'CONTAINS') | undefined}; export type GoogleAdsSearchads360V23CommonWebpageSampleInfo = {sampleUrls?: Array | undefined}; export type GoogleAdsSearchads360V23CommonWebpageInfo = {conditions?: Array | undefined, coveragePercentage?: number | undefined, criterionName?: string | undefined, sample?: GoogleAdsSearchads360V23CommonWebpageSampleInfo | undefined}; export type GoogleAdsSearchads360V23CommonYouTubeChannelInfo = {channelId?: string | undefined}; export type GoogleAdsSearchads360V23CommonYouTubeVideoInfo = {videoId?: string | undefined}; export type GoogleAdsSearchads360V23ResourcesAdGroupCriterion = {adGroup?: string | undefined, ageRange?: GoogleAdsSearchads360V23CommonAgeRangeInfo | undefined, appPaymentModel?: GoogleAdsSearchads360V23CommonAppPaymentModelInfo | undefined, approvalStatus?: ('UNSPECIFIED' | 'UNKNOWN' | 'APPROVED' | 'DISAPPROVED' | 'PENDING_REVIEW' | 'UNDER_REVIEW') | undefined, audience?: GoogleAdsSearchads360V23CommonAudienceInfo | undefined, bidModifier?: number | undefined, brandList?: GoogleAdsSearchads360V23CommonBrandListInfo | undefined, combinedAudience?: GoogleAdsSearchads360V23CommonCombinedAudienceInfo | undefined, cpcBidMicros?: unknown | undefined, cpmBidMicros?: unknown | undefined, cpvBidMicros?: unknown | undefined, creationTime?: string | undefined, criterionId?: unknown | undefined, customAffinity?: GoogleAdsSearchads360V23CommonCustomAffinityInfo | undefined, customAudience?: GoogleAdsSearchads360V23CommonCustomAudienceInfo | undefined, customIntent?: GoogleAdsSearchads360V23CommonCustomIntentInfo | undefined, disapprovalReasons?: Array | undefined, displayName?: string | undefined, effectiveCpcBidMicros?: unknown | undefined, effectiveCpcBidSource?: ('UNSPECIFIED' | 'UNKNOWN' | 'CAMPAIGN_BIDDING_STRATEGY' | 'AD_GROUP' | 'AD_GROUP_CRITERION') | undefined, effectiveCpmBidMicros?: unknown | undefined, effectiveCpmBidSource?: ('UNSPECIFIED' | 'UNKNOWN' | 'CAMPAIGN_BIDDING_STRATEGY' | 'AD_GROUP' | 'AD_GROUP_CRITERION') | undefined, effectiveCpvBidMicros?: unknown | undefined, effectiveCpvBidSource?: ('UNSPECIFIED' | 'UNKNOWN' | 'CAMPAIGN_BIDDING_STRATEGY' | 'AD_GROUP' | 'AD_GROUP_CRITERION') | undefined, effectiveLabels?: Array | undefined, effectivePercentCpcBidMicros?: unknown | undefined, effectivePercentCpcBidSource?: ('UNSPECIFIED' | 'UNKNOWN' | 'CAMPAIGN_BIDDING_STRATEGY' | 'AD_GROUP' | 'AD_GROUP_CRITERION') | undefined, engineId?: string | undefined, engineStatus?: ('UNSPECIFIED' | 'UNKNOWN' | 'AD_GROUP_CRITERION_ELIGIBLE' | 'AD_GROUP_CRITERION_INAPPROPRIATE_FOR_CAMPAIGN' | 'AD_GROUP_CRITERION_INVALID_MOBILE_SEARCH' | 'AD_GROUP_CRITERION_INVALID_PC_SEARCH' | 'AD_GROUP_CRITERION_INVALID_SEARCH' | 'AD_GROUP_CRITERION_LOW_SEARCH_VOLUME' | 'AD_GROUP_CRITERION_MOBILE_URL_UNDER_REVIEW' | 'AD_GROUP_CRITERION_PARTIALLY_INVALID' | 'AD_GROUP_CRITERION_TO_BE_ACTIVATED' | 'AD_GROUP_CRITERION_UNDER_REVIEW' | 'AD_GROUP_CRITERION_NOT_REVIEWED' | 'AD_GROUP_CRITERION_ON_HOLD' | 'AD_GROUP_CRITERION_PENDING_REVIEW' | 'AD_GROUP_CRITERION_PAUSED' | 'AD_GROUP_CRITERION_REMOVED' | 'AD_GROUP_CRITERION_APPROVED' | 'AD_GROUP_CRITERION_DISAPPROVED' | 'AD_GROUP_CRITERION_SERVING' | 'AD_GROUP_CRITERION_ACCOUNT_PAUSED') | undefined, extendedDemographic?: GoogleAdsSearchads360V23CommonExtendedDemographicInfo | undefined, finalMobileUrls?: Array | undefined, finalUrlSuffix?: string | undefined, finalUrls?: Array | undefined, gender?: GoogleAdsSearchads360V23CommonGenderInfo | undefined, incomeRange?: GoogleAdsSearchads360V23CommonIncomeRangeInfo | undefined, keyword?: GoogleAdsSearchads360V23CommonKeywordInfo | undefined, labels?: Array | undefined, language?: GoogleAdsSearchads360V23CommonLanguageInfo | undefined, lastModifiedTime?: string | undefined, lifeEvent?: GoogleAdsSearchads360V23CommonLifeEventInfo | undefined, listingGroup?: GoogleAdsSearchads360V23CommonListingGroupInfo | undefined, location?: GoogleAdsSearchads360V23CommonLocationInfo | undefined, mobileAppCategory?: GoogleAdsSearchads360V23CommonMobileAppCategoryInfo | undefined, mobileApplication?: GoogleAdsSearchads360V23CommonMobileApplicationInfo | undefined, negative?: boolean | undefined, parentalStatus?: GoogleAdsSearchads360V23CommonParentalStatusInfo | undefined, percentCpcBidMicros?: unknown | undefined, placement?: GoogleAdsSearchads360V23CommonPlacementInfo | undefined, positionEstimates?: GoogleAdsSearchads360V23ResourcesAdGroupCriterionPositionEstimates | undefined, primaryStatus?: ('UNSPECIFIED' | 'UNKNOWN' | 'ELIGIBLE' | 'PAUSED' | 'REMOVED' | 'PENDING' | 'NOT_ELIGIBLE') | undefined, primaryStatusReasons?: (Array<'UNSPECIFIED' | 'UNKNOWN' | 'CAMPAIGN_PENDING' | 'CAMPAIGN_CRITERION_NEGATIVE' | 'CAMPAIGN_PAUSED' | 'CAMPAIGN_REMOVED' | 'CAMPAIGN_ENDED' | 'AD_GROUP_PAUSED' | 'AD_GROUP_REMOVED' | 'AD_GROUP_CRITERION_DISAPPROVED' | 'AD_GROUP_CRITERION_RARELY_SERVED' | 'AD_GROUP_CRITERION_LOW_QUALITY' | 'AD_GROUP_CRITERION_UNDER_REVIEW' | 'AD_GROUP_CRITERION_PENDING_REVIEW' | 'AD_GROUP_CRITERION_BELOW_FIRST_PAGE_BID' | 'AD_GROUP_CRITERION_NEGATIVE' | 'AD_GROUP_CRITERION_RESTRICTED' | 'AD_GROUP_CRITERION_PAUSED' | 'AD_GROUP_CRITERION_PAUSED_DUE_TO_LOW_ACTIVITY' | 'AD_GROUP_CRITERION_REMOVED'>) | undefined, qualityInfo?: GoogleAdsSearchads360V23ResourcesAdGroupCriterionQualityInfo | undefined, resourceName?: string | undefined, status?: ('UNSPECIFIED' | 'UNKNOWN' | 'ENABLED' | 'PAUSED' | 'REMOVED') | undefined, systemServingStatus?: ('UNSPECIFIED' | 'UNKNOWN' | 'ELIGIBLE' | 'RARELY_SERVED') | undefined, topic?: GoogleAdsSearchads360V23CommonTopicInfo | undefined, trackingUrlTemplate?: string | undefined, type?: ('UNSPECIFIED' | 'UNKNOWN' | 'KEYWORD' | 'PLACEMENT' | 'MOBILE_APP_CATEGORY' | 'MOBILE_APPLICATION' | 'DEVICE' | 'LOCATION' | 'LISTING_GROUP' | 'AD_SCHEDULE' | 'AGE_RANGE' | 'GENDER' | 'INCOME_RANGE' | 'PARENTAL_STATUS' | 'YOUTUBE_VIDEO' | 'YOUTUBE_CHANNEL' | 'USER_LIST' | 'PROXIMITY' | 'TOPIC' | 'LISTING_SCOPE' | 'LANGUAGE' | 'IP_BLOCK' | 'CONTENT_LABEL' | 'CARRIER' | 'USER_INTEREST' | 'WEBPAGE' | 'OPERATING_SYSTEM_VERSION' | 'APP_PAYMENT_MODEL' | 'MOBILE_DEVICE' | 'CUSTOM_AFFINITY' | 'CUSTOM_INTENT' | 'LOCATION_GROUP' | 'CUSTOM_AUDIENCE' | 'COMBINED_AUDIENCE' | 'KEYWORD_THEME' | 'AUDIENCE' | 'NEGATIVE_KEYWORD_LIST' | 'LOCAL_SERVICE_ID' | 'SEARCH_THEME' | 'BRAND' | 'BRAND_LIST' | 'LIFE_EVENT' | 'WEBPAGE_LIST' | 'VIDEO_LINEUP' | 'PLACEMENT_LIST' | 'VERTICAL_ADS_ITEM_GROUP_RULE_LIST' | 'VERTICAL_ADS_ITEM_GROUP_RULE') | undefined, urlCustomParameters?: Array | undefined, userInterest?: GoogleAdsSearchads360V23CommonUserInterestInfo | undefined, userList?: GoogleAdsSearchads360V23CommonUserListInfo | undefined, verticalAdsItemGroupRuleList?: GoogleAdsSearchads360V23CommonVerticalAdsItemGroupRuleListInfo | undefined, videoLineup?: GoogleAdsSearchads360V23CommonVideoLineupInfo | undefined, webpage?: GoogleAdsSearchads360V23CommonWebpageInfo | undefined, youtubeChannel?: GoogleAdsSearchads360V23CommonYouTubeChannelInfo | undefined, youtubeVideo?: GoogleAdsSearchads360V23CommonYouTubeVideoInfo | undefined}; export type GoogleAdsSearchads360V23CommonPolicyViolationKey = {policyName?: string | undefined, violatingText?: string | undefined}; export type GoogleAdsSearchads360V23ServicesAdGroupCriterionOperation = {create?: GoogleAdsSearchads360V23ResourcesAdGroupCriterion | undefined, exemptPolicyViolationKeys?: Array | undefined, remove?: string | undefined, update?: GoogleAdsSearchads360V23ResourcesAdGroupCriterion | undefined, updateMask?: unknown | undefined}; export type GoogleAdsSearchads360V23ServicesMutateAdGroupCriteriaRequest = {operations?: Array | undefined, partialFailure?: boolean | undefined, responseContentType?: ('UNSPECIFIED' | 'RESOURCE_NAME_ONLY' | 'MUTABLE_RESOURCE') | undefined, validateOnly?: boolean | undefined}; export type CreateApiV23CustomersCustomersIdAdGroupCriteriaMutateArgs = {customersId: string, body: GoogleAdsSearchads360V23ServicesMutateAdGroupCriteriaRequest}; export type CreateApiV23CustomersCustomersIdAdGroupCriteriaMutateOptions = {baseUrl?: string | undefined, Oauth2?: string | undefined, Oauth2c?: string | undefined, fetch?: typeof fetch | undefined}; export const googleRpcStatus = z.object({code: z.number().int().optional(), details: z.array(z.record(z.string(), z.unknown())).optional(), message: z.string().optional()}); export const googleAdsSearchads360V23CommonAgeRangeInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "AGE_RANGE_18_24", "AGE_RANGE_25_34", "AGE_RANGE_35_44", "AGE_RANGE_45_54", "AGE_RANGE_55_64", "AGE_RANGE_65_UP", "AGE_RANGE_UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonAppPaymentModelInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "PAID"]).optional()}); export const googleAdsSearchads360V23CommonAudienceInfo = z.object({audience: z.string().optional()}); export const googleAdsSearchads360V23CommonBrandListInfo = z.object({sharedSet: z.string().optional()}); export const googleAdsSearchads360V23CommonCombinedAudienceInfo = z.object({combinedAudience: z.string().optional()}); export const googleAdsSearchads360V23CommonCustomAffinityInfo = z.object({customAffinity: z.string().optional()}); export const googleAdsSearchads360V23CommonCustomAudienceInfo = z.object({customAudience: z.string().optional()}); export const googleAdsSearchads360V23CommonCustomIntentInfo = z.object({customIntent: z.string().optional()}); export const googleAdsSearchads360V23CommonExtendedDemographicInfo = z.object({extendedDemographicId: z.string().optional()}); export const googleAdsSearchads360V23CommonGenderInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "MALE", "FEMALE", "UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonIncomeRangeInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "INCOME_RANGE_0_50", "INCOME_RANGE_50_60", "INCOME_RANGE_60_70", "INCOME_RANGE_70_80", "INCOME_RANGE_80_90", "INCOME_RANGE_90_UP", "INCOME_RANGE_UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonKeywordInfo = z.object({matchType: z.enum(["UNSPECIFIED", "UNKNOWN", "EXACT", "PHRASE", "BROAD"]).optional(), text: z.string().optional()}); export const googleAdsSearchads360V23CommonLanguageInfo = z.object({languageConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonLifeEventInfo = z.object({lifeEventId: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityCityInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityCountryInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityIdInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityRatingInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonActivityStateInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelCityInfo = z.object({cityCriterion: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelClassInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelCountryRegionInfo = z.object({countryRegionCriterion: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelIdInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonHotelStateInfo = z.object({stateCriterion: z.string().optional()}); export const googleAdsSearchads360V23CommonProductBrandInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductCategoryInfo = z.object({categoryId: z.string().optional(), level: z.enum(["UNSPECIFIED", "UNKNOWN", "LEVEL1", "LEVEL2", "LEVEL3", "LEVEL4", "LEVEL5"]).optional()}); export const googleAdsSearchads360V23CommonProductChannelInfo = z.object({channel: z.enum(["UNSPECIFIED", "UNKNOWN", "ONLINE", "LOCAL"]).optional()}); export const googleAdsSearchads360V23CommonProductChannelExclusivityInfo = z.object({channelExclusivity: z.enum(["UNSPECIFIED", "UNKNOWN", "SINGLE_CHANNEL", "MULTI_CHANNEL"]).optional()}); export const googleAdsSearchads360V23CommonProductConditionInfo = z.object({condition: z.enum(["UNSPECIFIED", "UNKNOWN", "NEW", "REFURBISHED", "USED"]).optional()}); export const googleAdsSearchads360V23CommonProductCustomAttributeInfo = z.object({index: z.enum(["UNSPECIFIED", "UNKNOWN", "INDEX0", "INDEX1", "INDEX2", "INDEX3", "INDEX4"]).optional(), value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductGroupingInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductItemIdInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductLabelsInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductLegacyConditionInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductTypeInfo = z.object({level: z.enum(["UNSPECIFIED", "UNKNOWN", "LEVEL1", "LEVEL2", "LEVEL3", "LEVEL4", "LEVEL5"]).optional(), value: z.string().optional()}); export const googleAdsSearchads360V23CommonProductTypeFullInfo = z.object({value: z.string().optional()}); export const googleAdsSearchads360V23CommonUnknownListingDimensionInfo = z.object({}); export const googleAdsSearchads360V23CommonListingDimensionInfo = z.object({activityCity: googleAdsSearchads360V23CommonActivityCityInfo.optional(), activityCountry: googleAdsSearchads360V23CommonActivityCountryInfo.optional(), activityId: googleAdsSearchads360V23CommonActivityIdInfo.optional(), activityRating: googleAdsSearchads360V23CommonActivityRatingInfo.optional(), activityState: googleAdsSearchads360V23CommonActivityStateInfo.optional(), hotelCity: googleAdsSearchads360V23CommonHotelCityInfo.optional(), hotelClass: googleAdsSearchads360V23CommonHotelClassInfo.optional(), hotelCountryRegion: googleAdsSearchads360V23CommonHotelCountryRegionInfo.optional(), hotelId: googleAdsSearchads360V23CommonHotelIdInfo.optional(), hotelState: googleAdsSearchads360V23CommonHotelStateInfo.optional(), productBrand: googleAdsSearchads360V23CommonProductBrandInfo.optional(), productCategory: googleAdsSearchads360V23CommonProductCategoryInfo.optional(), productChannel: googleAdsSearchads360V23CommonProductChannelInfo.optional(), productChannelExclusivity: googleAdsSearchads360V23CommonProductChannelExclusivityInfo.optional(), productCondition: googleAdsSearchads360V23CommonProductConditionInfo.optional(), productCustomAttribute: googleAdsSearchads360V23CommonProductCustomAttributeInfo.optional(), productGrouping: googleAdsSearchads360V23CommonProductGroupingInfo.optional(), productItemId: googleAdsSearchads360V23CommonProductItemIdInfo.optional(), productLabels: googleAdsSearchads360V23CommonProductLabelsInfo.optional(), productLegacyCondition: googleAdsSearchads360V23CommonProductLegacyConditionInfo.optional(), productType: googleAdsSearchads360V23CommonProductTypeInfo.optional(), productTypeFull: googleAdsSearchads360V23CommonProductTypeFullInfo.optional(), unknownListingDimension: googleAdsSearchads360V23CommonUnknownListingDimensionInfo.optional()}); export const googleAdsSearchads360V23CommonListingDimensionPath = z.object({dimensions: z.array(googleAdsSearchads360V23CommonListingDimensionInfo).optional()}); export const googleAdsSearchads360V23CommonListingGroupInfo = z.object({caseValue: googleAdsSearchads360V23CommonListingDimensionInfo.optional(), parentAdGroupCriterion: z.string().optional(), path: googleAdsSearchads360V23CommonListingDimensionPath.optional(), type: z.enum(["UNSPECIFIED", "UNKNOWN", "SUBDIVISION", "UNIT"]).optional()}); export const googleAdsSearchads360V23CommonLocationInfo = z.object({geoTargetConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonMobileAppCategoryInfo = z.object({mobileAppCategoryConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonMobileApplicationInfo = z.object({appId: z.string().optional(), name: z.string().optional()}); export const googleAdsSearchads360V23CommonParentalStatusInfo = z.object({type: z.enum(["UNSPECIFIED", "UNKNOWN", "PARENT", "NOT_A_PARENT", "UNDETERMINED"]).optional()}); export const googleAdsSearchads360V23CommonPlacementInfo = z.object({url: z.string().optional()}); export const googleAdsSearchads360V23ResourcesAdGroupCriterionPositionEstimates = z.object({estimatedAddClicksAtFirstPositionCpc: z.string().optional(), estimatedAddCostAtFirstPositionCpc: z.string().optional(), firstPageCpcMicros: z.string().optional(), firstPositionCpcMicros: z.string().optional(), topOfPageCpcMicros: z.string().optional()}); export const googleAdsSearchads360V23ResourcesAdGroupCriterionQualityInfo = z.object({creativeQualityScore: z.enum(["UNSPECIFIED", "UNKNOWN", "BELOW_AVERAGE", "AVERAGE", "ABOVE_AVERAGE"]).optional(), postClickQualityScore: z.enum(["UNSPECIFIED", "UNKNOWN", "BELOW_AVERAGE", "AVERAGE", "ABOVE_AVERAGE"]).optional(), qualityScore: z.number().int().optional(), searchPredictedCtr: z.enum(["UNSPECIFIED", "UNKNOWN", "BELOW_AVERAGE", "AVERAGE", "ABOVE_AVERAGE"]).optional()}); export const googleAdsSearchads360V23CommonTopicInfo = z.object({path: z.array(z.string()).optional(), topicConstant: z.string().optional()}); export const googleAdsSearchads360V23CommonCustomParameter = z.object({key: z.string().optional(), value: z.string().optional()}); export const googleAdsSearchads360V23CommonUserInterestInfo = z.object({userInterestCategory: z.string().optional()}); export const googleAdsSearchads360V23CommonUserListInfo = z.object({userList: z.string().optional()}); export const googleAdsSearchads360V23CommonVerticalAdsItemGroupRuleListInfo = z.object({sharedSet: z.string().optional()}); export const googleAdsSearchads360V23CommonVideoLineupInfo = z.object({videoLineupId: z.string().optional()}); export const googleAdsSearchads360V23CommonWebpageConditionInfo = z.object({argument: z.string().optional(), operand: z.enum(["UNSPECIFIED", "UNKNOWN", "URL", "CATEGORY", "PAGE_TITLE", "PAGE_CONTENT", "CUSTOM_LABEL"]).optional(), operator: z.enum(["UNSPECIFIED", "UNKNOWN", "EQUALS", "CONTAINS"]).optional()}); export const googleAdsSearchads360V23CommonWebpageSampleInfo = z.object({sampleUrls: z.array(z.string()).optional()}); export const googleAdsSearchads360V23CommonWebpageInfo = z.object({conditions: z.array(googleAdsSearchads360V23CommonWebpageConditionInfo).optional(), coveragePercentage: z.number().optional(), criterionName: z.string().optional(), sample: googleAdsSearchads360V23CommonWebpageSampleInfo.optional()}); export const googleAdsSearchads360V23CommonYouTubeChannelInfo = z.object({channelId: z.string().optional()}); export const googleAdsSearchads360V23CommonYouTubeVideoInfo = z.object({videoId: z.string().optional()}); export const googleAdsSearchads360V23ResourcesAdGroupCriterion = z.object({adGroup: z.string().optional(), ageRange: googleAdsSearchads360V23CommonAgeRangeInfo.optional(), appPaymentModel: googleAdsSearchads360V23CommonAppPaymentModelInfo.optional(), approvalStatus: z.enum(["UNSPECIFIED", "UNKNOWN", "APPROVED", "DISAPPROVED", "PENDING_REVIEW", "UNDER_REVIEW"]).optional(), audience: googleAdsSearchads360V23CommonAudienceInfo.optional(), bidModifier: z.number().optional(), brandList: googleAdsSearchads360V23CommonBrandListInfo.optional(), combinedAudience: googleAdsSearchads360V23CommonCombinedAudienceInfo.optional(), cpcBidMicros: z.string().optional(), cpmBidMicros: z.string().optional(), cpvBidMicros: z.string().optional(), creationTime: z.string().optional(), criterionId: z.string().optional(), customAffinity: googleAdsSearchads360V23CommonCustomAffinityInfo.optional(), customAudience: googleAdsSearchads360V23CommonCustomAudienceInfo.optional(), customIntent: googleAdsSearchads360V23CommonCustomIntentInfo.optional(), disapprovalReasons: z.array(z.string()).optional(), displayName: z.string().optional(), effectiveCpcBidMicros: z.string().optional(), effectiveCpcBidSource: z.enum(["UNSPECIFIED", "UNKNOWN", "CAMPAIGN_BIDDING_STRATEGY", "AD_GROUP", "AD_GROUP_CRITERION"]).optional(), effectiveCpmBidMicros: z.string().optional(), effectiveCpmBidSource: z.enum(["UNSPECIFIED", "UNKNOWN", "CAMPAIGN_BIDDING_STRATEGY", "AD_GROUP", "AD_GROUP_CRITERION"]).optional(), effectiveCpvBidMicros: z.string().optional(), effectiveCpvBidSource: z.enum(["UNSPECIFIED", "UNKNOWN", "CAMPAIGN_BIDDING_STRATEGY", "AD_GROUP", "AD_GROUP_CRITERION"]).optional(), effectiveLabels: z.array(z.string()).optional(), effectivePercentCpcBidMicros: z.string().optional(), effectivePercentCpcBidSource: z.enum(["UNSPECIFIED", "UNKNOWN", "CAMPAIGN_BIDDING_STRATEGY", "AD_GROUP", "AD_GROUP_CRITERION"]).optional(), engineId: z.string().optional(), engineStatus: z.enum(["UNSPECIFIED", "UNKNOWN", "AD_GROUP_CRITERION_ELIGIBLE", "AD_GROUP_CRITERION_INAPPROPRIATE_FOR_CAMPAIGN", "AD_GROUP_CRITERION_INVALID_MOBILE_SEARCH", "AD_GROUP_CRITERION_INVALID_PC_SEARCH", "AD_GROUP_CRITERION_INVALID_SEARCH", "AD_GROUP_CRITERION_LOW_SEARCH_VOLUME", "AD_GROUP_CRITERION_MOBILE_URL_UNDER_REVIEW", "AD_GROUP_CRITERION_PARTIALLY_INVALID", "AD_GROUP_CRITERION_TO_BE_ACTIVATED", "AD_GROUP_CRITERION_UNDER_REVIEW", "AD_GROUP_CRITERION_NOT_REVIEWED", "AD_GROUP_CRITERION_ON_HOLD", "AD_GROUP_CRITERION_PENDING_REVIEW", "AD_GROUP_CRITERION_PAUSED", "AD_GROUP_CRITERION_REMOVED", "AD_GROUP_CRITERION_APPROVED", "AD_GROUP_CRITERION_DISAPPROVED", "AD_GROUP_CRITERION_SERVING", "AD_GROUP_CRITERION_ACCOUNT_PAUSED"]).optional(), extendedDemographic: googleAdsSearchads360V23CommonExtendedDemographicInfo.optional(), finalMobileUrls: z.array(z.string()).optional(), finalUrlSuffix: z.string().optional(), finalUrls: z.array(z.string()).optional(), gender: googleAdsSearchads360V23CommonGenderInfo.optional(), incomeRange: googleAdsSearchads360V23CommonIncomeRangeInfo.optional(), keyword: googleAdsSearchads360V23CommonKeywordInfo.optional(), labels: z.array(z.string()).optional(), language: googleAdsSearchads360V23CommonLanguageInfo.optional(), lastModifiedTime: z.string().optional(), lifeEvent: googleAdsSearchads360V23CommonLifeEventInfo.optional(), listingGroup: googleAdsSearchads360V23CommonListingGroupInfo.optional(), location: googleAdsSearchads360V23CommonLocationInfo.optional(), mobileAppCategory: googleAdsSearchads360V23CommonMobileAppCategoryInfo.optional(), mobileApplication: googleAdsSearchads360V23CommonMobileApplicationInfo.optional(), negative: z.boolean().optional(), parentalStatus: googleAdsSearchads360V23CommonParentalStatusInfo.optional(), percentCpcBidMicros: z.string().optional(), placement: googleAdsSearchads360V23CommonPlacementInfo.optional(), positionEstimates: googleAdsSearchads360V23ResourcesAdGroupCriterionPositionEstimates.optional(), primaryStatus: z.enum(["UNSPECIFIED", "UNKNOWN", "ELIGIBLE", "PAUSED", "REMOVED", "PENDING", "NOT_ELIGIBLE"]).optional(), primaryStatusReasons: z.array(z.enum(["UNSPECIFIED", "UNKNOWN", "CAMPAIGN_PENDING", "CAMPAIGN_CRITERION_NEGATIVE", "CAMPAIGN_PAUSED", "CAMPAIGN_REMOVED", "CAMPAIGN_ENDED", "AD_GROUP_PAUSED", "AD_GROUP_REMOVED", "AD_GROUP_CRITERION_DISAPPROVED", "AD_GROUP_CRITERION_RARELY_SERVED", "AD_GROUP_CRITERION_LOW_QUALITY", "AD_GROUP_CRITERION_UNDER_REVIEW", "AD_GROUP_CRITERION_PENDING_REVIEW", "AD_GROUP_CRITERION_BELOW_FIRST_PAGE_BID", "AD_GROUP_CRITERION_NEGATIVE", "AD_GROUP_CRITERION_RESTRICTED", "AD_GROUP_CRITERION_PAUSED", "AD_GROUP_CRITERION_PAUSED_DUE_TO_LOW_ACTIVITY", "AD_GROUP_CRITERION_REMOVED"])).optional(), qualityInfo: googleAdsSearchads360V23ResourcesAdGroupCriterionQualityInfo.optional(), resourceName: z.string().optional(), status: z.enum(["UNSPECIFIED", "UNKNOWN", "ENABLED", "PAUSED", "REMOVED"]).optional(), systemServingStatus: z.enum(["UNSPECIFIED", "UNKNOWN", "ELIGIBLE", "RARELY_SERVED"]).optional(), topic: googleAdsSearchads360V23CommonTopicInfo.optional(), trackingUrlTemplate: z.string().optional(), type: z.enum(["UNSPECIFIED", "UNKNOWN", "KEYWORD", "PLACEMENT", "MOBILE_APP_CATEGORY", "MOBILE_APPLICATION", "DEVICE", "LOCATION", "LISTING_GROUP", "AD_SCHEDULE", "AGE_RANGE", "GENDER", "INCOME_RANGE", "PARENTAL_STATUS", "YOUTUBE_VIDEO", "YOUTUBE_CHANNEL", "USER_LIST", "PROXIMITY", "TOPIC", "LISTING_SCOPE", "LANGUAGE", "IP_BLOCK", "CONTENT_LABEL", "CARRIER", "USER_INTEREST", "WEBPAGE", "OPERATING_SYSTEM_VERSION", "APP_PAYMENT_MODEL", "MOBILE_DEVICE", "CUSTOM_AFFINITY", "CUSTOM_INTENT", "LOCATION_GROUP", "CUSTOM_AUDIENCE", "COMBINED_AUDIENCE", "KEYWORD_THEME", "AUDIENCE", "NEGATIVE_KEYWORD_LIST", "LOCAL_SERVICE_ID", "SEARCH_THEME", "BRAND", "BRAND_LIST", "LIFE_EVENT", "WEBPAGE_LIST", "VIDEO_LINEUP", "PLACEMENT_LIST", "VERTICAL_ADS_ITEM_GROUP_RULE_LIST", "VERTICAL_ADS_ITEM_GROUP_RULE"]).optional(), urlCustomParameters: z.array(googleAdsSearchads360V23CommonCustomParameter).optional(), userInterest: googleAdsSearchads360V23CommonUserInterestInfo.optional(), userList: googleAdsSearchads360V23CommonUserListInfo.optional(), verticalAdsItemGroupRuleList: googleAdsSearchads360V23CommonVerticalAdsItemGroupRuleListInfo.optional(), videoLineup: googleAdsSearchads360V23CommonVideoLineupInfo.optional(), webpage: googleAdsSearchads360V23CommonWebpageInfo.optional(), youtubeChannel: googleAdsSearchads360V23CommonYouTubeChannelInfo.optional(), youtubeVideo: googleAdsSearchads360V23CommonYouTubeVideoInfo.optional()}); export const googleAdsSearchads360V23ServicesMutateAdGroupCriterionResult = z.object({adGroupCriterion: googleAdsSearchads360V23ResourcesAdGroupCriterion.optional(), resourceName: z.string().optional()}); export const googleAdsSearchads360V23ServicesMutateAdGroupCriteriaResponse = z.object({partialFailureError: googleRpcStatus.optional(), results: z.array(googleAdsSearchads360V23ServicesMutateAdGroupCriterionResult).optional()}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Creates, updates, or removes criteria. Operation statuses are returned. List of thrown errors: [AdGroupCriterionError]() [AdxError]() [AuthenticationError]() [AuthorizationError]() [BiddingError]() [BiddingStrategyError]() [CollectionSizeError]() [ContextError]() [CriterionError]() [DatabaseError]() [DateError]() [DistinctError]() [FieldError]() [FieldMaskError]() [HeaderError]() [IdError]() [InternalError]() [MultiplierError]() [MutateError]() [NewResourceCreationError]() [NotEmptyError]() [NullError]() [OperationAccessDeniedError]() [OperatorError]() [PolicyViolationError]() [QuotaError]() [RangeError]() [RequestError]() [ResourceCountLimitExceededError]() [SizeLimitError]() [StringFormatError]() [StringLengthError]() [UrlFieldError]() * * POST /v23/customers/{customersId}/adGroupCriteria:mutate */ export const createApiV23CustomersCustomersIdAdGroupCriteriaMutate = async (args: CreateApiV23CustomersCustomersIdAdGroupCriteriaMutateArgs, options?: CreateApiV23CustomersCustomersIdAdGroupCriteriaMutateOptions) => { const {baseUrl = "https://searchads360.googleapis.com", fetch: fetchFn = fetch, Oauth2, Oauth2c} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (Oauth2 !== undefined) headers.set('authorization', `Bearer ${Oauth2}`) if (Oauth2c !== undefined) headers.set('authorization', `Bearer ${Oauth2c}`) const url = `${baseUrl.replace(/\/+$/, '')}/v23/customers/${encodeURIComponent(String(args.customersId))}/adGroupCriteria:mutate${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(googleAdsSearchads360V23ServicesMutateAdGroupCriteriaResponse, await res.json()) };