@guardian/google-admanager-api
Version:
Google Ad Manager API Client Library for NodeJs
84 lines • 5.04 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LineItemStruct = void 0;
const superstruct_1 = require("superstruct");
const types_1 = require("../../../common/types");
const lineItemSummary_type_1 = require("../../common/types/lineItemSummary.type");
const types_2 = require("../../common/types");
const enums_1 = require("../../common/enums");
const enums_2 = require("../../../common/enums");
/**
* Represents a LineItem struct
* Can be used to validate and parse LineItem objects
*/
exports.LineItemStruct = (0, superstruct_1.object)({
// Line Item Summary
orderId: (0, superstruct_1.number)(),
id: (0, superstruct_1.number)(),
name: (0, superstruct_1.string)(),
externalId: (0, superstruct_1.optional)((0, superstruct_1.string)()),
orderName: (0, superstruct_1.string)(),
startDateTime: types_1.DateTimeStruct,
startDateTimeType: enums_2.StartDateTimeTypeEnum,
endDateTime: (0, superstruct_1.optional)(types_1.DateTimeStruct),
autoExtensionDays: (0, superstruct_1.number)(),
unlimitedEndDateTime: (0, superstruct_1.boolean)(),
creativeRotationType: enums_1.CreativeRotationTypeEnum,
deliveryRateType: enums_1.DeliveryRateTypeEnum,
deliveryForecastSource: enums_1.DeliveryForecastSourceEnum,
customPacingCurve: (0, superstruct_1.optional)(lineItemSummary_type_1.CustomPacingCurveStruct),
roadblockingType: enums_1.RoadblockingTypeEnum,
skippableAdType: enums_1.SkippableAdTypeEnum,
frequencyCaps: (0, superstruct_1.optional)((0, superstruct_1.array)(types_2.FrequencyCapStruct)),
lineItemType: enums_1.LineItemTypeEnum,
priority: (0, superstruct_1.number)(),
costPerUnit: types_2.MoneyStruct,
valueCostPerUnit: types_2.MoneyStruct,
costType: enums_1.CostTypeEnum,
discountType: enums_1.LineItemDiscountTypeEnum,
discount: (0, superstruct_1.number)(),
contractedUnitsBought: (0, superstruct_1.number)(),
creativePlaceholders: (0, superstruct_1.array)(types_2.CreativePlaceholderStruct),
activityAssociations: (0, superstruct_1.optional)((0, superstruct_1.array)(lineItemSummary_type_1.LineItemActivityAssociationStruct)),
environmentType: enums_1.EnvironmentTypeEnum,
allowedFormats: (0, superstruct_1.optional)((0, superstruct_1.array)(enums_1.AllowedFormatsEnum)),
companionDeliveryOption: enums_1.CompanionDeliveryOptionEnum,
allowOverbook: (0, superstruct_1.boolean)(),
skipInventoryCheck: (0, superstruct_1.boolean)(),
skipCrossSellingRuleWarningChecks: (0, superstruct_1.boolean)(),
reserveAtCreation: (0, superstruct_1.boolean)(),
stats: (0, superstruct_1.optional)(types_2.StatsStruct),
deliveryIndicator: (0, superstruct_1.optional)(types_2.DeliveryIndicatorStruct),
deliveryData: (0, superstruct_1.optional)(types_2.DeliveryDataStruct),
budget: types_2.MoneyStruct,
status: enums_1.StatusEnum,
reservationStatus: enums_1.LineItemSummaryReservationStatusEnum,
isArchived: (0, superstruct_1.boolean)(),
webPropertyCode: (0, superstruct_1.string)(),
appliedLabels: (0, superstruct_1.optional)((0, superstruct_1.array)(types_2.AppliedLabelStruct)),
effectiveAppliedLabels: (0, superstruct_1.optional)((0, superstruct_1.array)(types_2.AppliedLabelStruct)),
disableSameAdvertiserCompetitiveExclusion: (0, superstruct_1.boolean)(),
lastModifiedByApp: (0, superstruct_1.string)(),
notes: (0, superstruct_1.optional)((0, superstruct_1.string)()),
competitiveConstraintScope: enums_1.CompetitiveConstraintScopeEnum,
lastModifiedDateTime: types_1.DateTimeStruct,
creationDateTime: types_1.DateTimeStruct,
customFieldValues: (0, superstruct_1.optional)((0, superstruct_1.array)(types_2.BaseCustomFieldValueStruct)),
isMissingCreatives: (0, superstruct_1.boolean)(),
youtubeKidsRestricted: (0, superstruct_1.optional)((0, superstruct_1.boolean)()),
programmaticCreativeSource: (0, superstruct_1.optional)(enums_1.ProgrammaticCreativeSourceEnum),
thirdPartyMeasurementSettings: (0, superstruct_1.optional)(types_2.ThirdPartyMeasurementSettingsStruct),
videoMaxDuration: (0, superstruct_1.number)(),
primaryGoal: types_2.GoalStruct,
secondaryGoals: (0, superstruct_1.optional)((0, superstruct_1.array)(types_2.GoalStruct)),
grpSettings: (0, superstruct_1.optional)(types_2.GrpSettingsStruct),
dealInfo: (0, superstruct_1.optional)(lineItemSummary_type_1.LineItemDealInfoDtoStruct),
viewabilityProviderCompanyIds: (0, superstruct_1.optional)((0, superstruct_1.array)((0, superstruct_1.number)())),
childContentEligibility: (0, superstruct_1.optional)(enums_1.ChildContentEligibilityEnum),
customVastExtension: (0, superstruct_1.optional)((0, superstruct_1.string)()),
repeatedCreativeServingEnabled: (0, superstruct_1.boolean)(),
// Line Item
targeting: types_2.TargetingStruct,
creativeTargetings: (0, superstruct_1.optional)((0, superstruct_1.array)(types_2.CreativeTargetingStruct)),
});
//# sourceMappingURL=lineItem.struct.js.map