UNPKG

@guardian/google-admanager-api

Version:

Google Ad Manager API Client Library for NodeJs

296 lines 13.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CreativeTargetingStruct = exports.TargetingStruct = exports.RequestPlatformTargetingStruct = exports.InventoryUrlTargetingStruct = exports.InventoryUrlStruct = exports.BuyerUserListTargetingStruct = exports.MobileApplicationTargetingStruct = exports.ContentTargetingStruct = exports.UserDomainTargetingStruct = exports.DateTimeRangeTargetingStruct = exports.TechnologyTargetingStruct = exports.OperatingSystemVersionTargetingStruct = exports.OperatingSystemVersionStruct = exports.OperatingSystemTargetingStruct = exports.MobileDeviceSubmodelTargetingStruct = exports.MobileDeviceSubmodelStruct = exports.MobileDeviceTargetingStruct = exports.MobileDeviceStruct = exports.MobileCarrierTargetingStruct = exports.DeviceManufacturerTargetingStruct = exports.DeviceCategoryTargetingStruct = exports.DeviceCapabilityTargetingStruct = exports.BrowserLanguageTargetingStruct = exports.BrowserTargetingStruct = exports.BrowserStruct = exports.BandwidthGroupTargetingStruct = exports.TechnologyStruct = exports.TechnologyAttributesValuesEnum = exports.DayPartTargetingStruct = exports.DayPartStruct = exports.InventoryTargetingStruct = exports.AdUnitTargetingStruct = exports.GeoTargetingStruct = exports.LocationStruct = void 0; const superstruct_1 = require("superstruct"); const enums_1 = require("../../../common/enums"); const types_1 = require("../../../common/types"); const enums_2 = require("../enums"); const customCriteria_type_1 = require("./customCriteria.type"); const videoPosition_type_1 = require("./videoPosition.type"); /** * Represents a Location struct. */ exports.LocationStruct = (0, superstruct_1.object)({ id: (0, superstruct_1.number)(), type: (0, superstruct_1.string)(), canonicalParentId: (0, superstruct_1.optional)((0, superstruct_1.number)()), displayName: (0, superstruct_1.string)(), }); /** * Represents a GeoTargeting struct. */ exports.GeoTargetingStruct = (0, superstruct_1.object)({ targetedLocations: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.LocationStruct)), excludedLocations: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.LocationStruct)), }); /** * Represents an AdUnitTargeting struct. */ exports.AdUnitTargetingStruct = (0, superstruct_1.object)({ adUnitId: (0, superstruct_1.string)(), includeDescendants: (0, superstruct_1.boolean)(), }); /** * Represents an InventoryTargeting struct. */ exports.InventoryTargetingStruct = (0, superstruct_1.object)({ targetedAdUnits: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.AdUnitTargetingStruct)), excludedAdUnits: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.AdUnitTargetingStruct)), targetedPlacementIds: (0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.number)())), }); /** * Represents a DayPart struct. */ exports.DayPartStruct = (0, superstruct_1.object)({ dayOfWeek: enums_1.DayOfWeekEnum, startTime: types_1.TimeOfDayStruct, endTime: types_1.TimeOfDayStruct, }); /** * Represents a DayPartTargeting struct. */ exports.DayPartTargetingStruct = (0, superstruct_1.object)({ dayParts: (0, superstruct_1.array)(exports.DayPartStruct), timeZone: enums_2.DeliveryTimeZoneEnum, }); /** * Represents an TechnologyAttributesValues enum in superstruct format. */ exports.TechnologyAttributesValuesEnum = (0, superstruct_1.enums)([ "DeviceCapability", "BandwidthGroup", "BrowserLanguage", "DeviceCategory", "DeviceManufacturer", "MobileCarrier", "OperatingSystem", ]); /** * Represents a Technology struct. */ exports.TechnologyStruct = (0, superstruct_1.object)({ attributes: (0, superstruct_1.object)({ "xsi:type": exports.TechnologyAttributesValuesEnum, }), id: (0, superstruct_1.number)(), name: (0, superstruct_1.string)(), }); /** * Represents a BandwidthGroupTargeting struct. */ exports.BandwidthGroupTargetingStruct = (0, superstruct_1.object)({ isTargeted: (0, superstruct_1.boolean)(), bandwidthGroups: (0, superstruct_1.array)(exports.TechnologyStruct), }); /** * Represents a Browser struct. */ exports.BrowserStruct = (0, superstruct_1.object)({ attributes: (0, superstruct_1.object)({ "xsi:type": (0, superstruct_1.literal)("Browser"), }), id: (0, superstruct_1.number)(), name: (0, superstruct_1.string)(), majorVersion: (0, superstruct_1.string)(), minorVersion: (0, superstruct_1.string)(), }); /** * Represents a BrowserTargeting struct. */ exports.BrowserTargetingStruct = (0, superstruct_1.object)({ isTargeted: (0, superstruct_1.boolean)(), browsers: (0, superstruct_1.array)(exports.BrowserStruct), }); /** * Represents a BrowserLanguageTargeting struct. */ exports.BrowserLanguageTargetingStruct = (0, superstruct_1.object)({ isTargeted: (0, superstruct_1.boolean)(), browserLanguages: (0, superstruct_1.array)(exports.TechnologyStruct), }); /** * Represents a DeviceCapabilityTargeting struct. */ exports.DeviceCapabilityTargetingStruct = (0, superstruct_1.object)({ targetedDeviceCapabilities: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.TechnologyStruct)), excludedDeviceCapabilities: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.TechnologyStruct)), }); /** * Represents a DeviceCategoryTargeting struct. */ exports.DeviceCategoryTargetingStruct = (0, superstruct_1.object)({ targetedDeviceCategories: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.TechnologyStruct)), excludedDeviceCategories: (0, superstruct_1.optional)((0, superstruct_1.array)(exports.TechnologyStruct)), }); /** * Represents a DeviceManufacturerTargeting struct. */ exports.DeviceManufacturerTargetingStruct = (0, superstruct_1.object)({ isTargeted: (0, superstruct_1.boolean)(), deviceManufacturers: (0, superstruct_1.array)(exports.TechnologyStruct), }); /** * Represents a MobileCarrierTargeting struct. */ exports.MobileCarrierTargetingStruct = (0, superstruct_1.object)({ isTargeted: (0, superstruct_1.boolean)(), mobileCarriers: (0, superstruct_1.array)(exports.TechnologyStruct), }); /** * Represents a MobileDevice struct. */ exports.MobileDeviceStruct = (0, superstruct_1.object)({ attributes: (0, superstruct_1.object)({ "xsi:type": (0, superstruct_1.literal)("MobileDevice"), }), id: (0, superstruct_1.number)(), name: (0, superstruct_1.string)(), manufacturerCriterionId: (0, superstruct_1.number)(), }); /** * Represents a MobileDeviceTargeting struct. */ exports.MobileDeviceTargetingStruct = (0, superstruct_1.object)({ targetedMobileDevices: (0, superstruct_1.array)(exports.MobileDeviceStruct), excludedMobileDevices: (0, superstruct_1.array)(exports.MobileDeviceStruct), }); /** * Represents a MobileDeviceSubmodel struct. */ exports.MobileDeviceSubmodelStruct = (0, superstruct_1.object)({ attributes: (0, superstruct_1.object)({ "xsi:type": (0, superstruct_1.literal)("MobileDeviceSubmodel"), }), id: (0, superstruct_1.number)(), name: (0, superstruct_1.string)(), mobileDeviceCriterionId: (0, superstruct_1.number)(), deviceManufacturerCriterionId: (0, superstruct_1.number)(), }); /** * Represents a */ exports.MobileDeviceSubmodelTargetingStruct = (0, superstruct_1.object)({ targetedMobileDeviceSubmodels: (0, superstruct_1.array)(exports.MobileDeviceSubmodelStruct), excludedMobileDeviceSubmodels: (0, superstruct_1.array)(exports.MobileDeviceSubmodelStruct), }); /** * Represents a OperatingSystemTargeting struct. */ exports.OperatingSystemTargetingStruct = (0, superstruct_1.object)({ isTargeted: (0, superstruct_1.boolean)(), operatingSystems: (0, superstruct_1.array)(exports.TechnologyStruct), }); /** * Represents an OperatingSystemVersion struct. */ exports.OperatingSystemVersionStruct = (0, superstruct_1.object)({ attributes: (0, superstruct_1.object)({ "xsi:type": (0, superstruct_1.literal)("OperatingSystemVersion"), }), id: (0, superstruct_1.number)(), name: (0, superstruct_1.string)(), majorVersion: (0, superstruct_1.string)(), minorVersion: (0, superstruct_1.string)(), microVersion: (0, superstruct_1.string)(), }); /** * Represents an OperatingSystemVersionTargeting struct. */ exports.OperatingSystemVersionTargetingStruct = (0, superstruct_1.object)({ targetedOperatingSystemVersions: (0, superstruct_1.array)(exports.OperatingSystemVersionStruct), excludedOperatingSystemVersions: (0, superstruct_1.array)(exports.OperatingSystemVersionStruct), }); /** * Represents a TechnologyTargeting struct. */ exports.TechnologyTargetingStruct = (0, superstruct_1.object)({ bandwidthGroupTargeting: (0, superstruct_1.optional)(exports.BandwidthGroupTargetingStruct), browserTargeting: (0, superstruct_1.optional)(exports.BrowserTargetingStruct), browserLanguageTargeting: (0, superstruct_1.optional)(exports.BrowserLanguageTargetingStruct), deviceCapabilityTargeting: (0, superstruct_1.optional)(exports.DeviceCapabilityTargetingStruct), deviceCategoryTargeting: (0, superstruct_1.optional)(exports.DeviceCategoryTargetingStruct), deviceManufacturerTargeting: (0, superstruct_1.optional)(exports.DeviceManufacturerTargetingStruct), mobileCarrierTargeting: (0, superstruct_1.optional)(exports.MobileCarrierTargetingStruct), mobileDeviceTargeting: (0, superstruct_1.optional)(exports.MobileDeviceTargetingStruct), mobileDeviceSubmodelTargeting: (0, superstruct_1.optional)(exports.MobileDeviceSubmodelTargetingStruct), operatingSystemTargeting: (0, superstruct_1.optional)(exports.OperatingSystemTargetingStruct), operatingSystemVersionTargeting: (0, superstruct_1.optional)(exports.OperatingSystemVersionTargetingStruct), }); /** * Represents a DateTimeRangeTargeting struct. */ exports.DateTimeRangeTargetingStruct = (0, superstruct_1.object)({ targetedDateTimeRanges: (0, superstruct_1.array)(types_1.DateTimeRangeStruct), }); /** * Represents a UserDomainTargeting struct. */ exports.UserDomainTargetingStruct = (0, superstruct_1.object)({ domains: (0, superstruct_1.array)((0, superstruct_1.string)()), targeted: (0, superstruct_1.boolean)(), }); /** * Represents a ContentTargeting struct. */ exports.ContentTargetingStruct = (0, superstruct_1.object)({ targetedContentIds: (0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.number)())), excludedContentIds: (0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.number)())), targetedVideoContentBundleIds: (0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.number)())), excludedVideoContentBundleIds: (0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.number)())), }); /** * Represents a MobileApplicationTargeting struct. */ exports.MobileApplicationTargetingStruct = (0, superstruct_1.object)({ mobileApplicationIds: (0, superstruct_1.array)((0, superstruct_1.number)()), isTargeted: (0, superstruct_1.boolean)(), }); /** * Represents a BuyerUserListTargeting struct. */ exports.BuyerUserListTargetingStruct = (0, superstruct_1.object)({ hasBuyerUserListTargeting: (0, superstruct_1.boolean)() }); /** * Represents an InventoryUrl */ exports.InventoryUrlStruct = (0, superstruct_1.object)({ id: (0, superstruct_1.number)(), }); /** * Represents an InventoryUrlTargeting struct. */ exports.InventoryUrlTargetingStruct = (0, superstruct_1.object)({ targetedUrls: (0, superstruct_1.array)(exports.InventoryUrlStruct), excludedUrls: (0, superstruct_1.array)(exports.InventoryUrlStruct), }); /** * Represents a RequestPlatformTargeting struct. */ exports.RequestPlatformTargetingStruct = (0, superstruct_1.object)({ targetedRequestPlatforms: (0, superstruct_1.array)(enums_2.RequestPlatformEnum), }); /** * Represents a Targeting struct. */ exports.TargetingStruct = (0, superstruct_1.object)({ geoTargeting: (0, superstruct_1.optional)(exports.GeoTargetingStruct), inventoryTargeting: (0, superstruct_1.optional)(exports.InventoryTargetingStruct), dayPartTargeting: (0, superstruct_1.optional)(exports.DayPartTargetingStruct), dateTimeRangeTargeting: (0, superstruct_1.optional)(exports.DateTimeRangeTargetingStruct), technologyTargeting: (0, superstruct_1.optional)(exports.TechnologyTargetingStruct), customTargeting: (0, superstruct_1.optional)(customCriteria_type_1.CustomCriteriaSetStruct), userDomainTargeting: (0, superstruct_1.optional)(exports.UserDomainTargetingStruct), contentTargeting: (0, superstruct_1.optional)(exports.ContentTargetingStruct), videoPositionTargeting: (0, superstruct_1.optional)(videoPosition_type_1.VideoPositionTargetingStruct), mobileApplicationTargeting: (0, superstruct_1.optional)(exports.MobileApplicationTargetingStruct), buyerUserListTargeting: (0, superstruct_1.optional)(exports.BuyerUserListTargetingStruct), inventoryUrlTargeting: (0, superstruct_1.optional)(exports.InventoryUrlTargetingStruct), requestPlatformTargeting: (0, superstruct_1.optional)((0, superstruct_1.nullable)(exports.RequestPlatformTargetingStruct)), }); /** * Represents a CreativeTargeting struct. */ exports.CreativeTargetingStruct = (0, superstruct_1.object)({ name: (0, superstruct_1.string)(), targeting: exports.TargetingStruct, }); //# sourceMappingURL=targeting.type.js.map