UNPKG

@guardian/google-admanager-api

Version:

Google Ad Manager API Client Library for NodeJs

60 lines 2.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseCustomFieldValueStruct = exports.GoalStruct = exports.FrequencyCapStruct = exports.DropDownCustomFieldValueStruct = exports.CustomFieldValueStruct = exports.SizeStruct = exports.MoneyStruct = void 0; const superstruct_1 = require("superstruct"); const enums_1 = require("../../../common/enums"); const types_1 = require("../../../common/types"); const enums_2 = require("../enums"); /** * Represents a Money struct. */ exports.MoneyStruct = (0, superstruct_1.object)({ currencyCode: (0, superstruct_1.string)(), microAmount: (0, superstruct_1.number)(), }); /** * Represents a Size struct. */ exports.SizeStruct = (0, superstruct_1.object)({ width: (0, superstruct_1.number)(), height: (0, superstruct_1.number)(), isAspectRatio: (0, superstruct_1.boolean)(), }); /** * Represents a CustomFieldValue struct. */ exports.CustomFieldValueStruct = (0, superstruct_1.object)({ customFieldId: (0, superstruct_1.number)(), attributes: (0, superstruct_1.object)({ "xsi:type": (0, superstruct_1.literal)("CustomFieldValue") }), value: types_1.ValueStruct, }); /** * Represents a DropDownCustomFieldValue struct. */ exports.DropDownCustomFieldValueStruct = (0, superstruct_1.object)({ customFieldId: (0, superstruct_1.number)(), attributes: (0, superstruct_1.object)({ "xsi:type": (0, superstruct_1.literal)("DropDownCustomFieldValue") }), customFieldOptionId: (0, superstruct_1.number)(), }); /** * Represents a FrequencyCap struct. */ exports.FrequencyCapStruct = (0, superstruct_1.object)({ maxImpressions: (0, superstruct_1.number)(), numTimeUnits: (0, superstruct_1.number)(), timeUnit: enums_1.TimeUnitEnum, }); /** * Represents a Goal struct. */ exports.GoalStruct = (0, superstruct_1.object)({ goalType: enums_2.GoalTypeEnum, unitType: enums_2.UnitTypeEnum, units: (0, superstruct_1.number)(), }); //Superstruct weirdness means we can't use the Describe utility in here. exports.BaseCustomFieldValueStruct = (0, superstruct_1.union)([ exports.CustomFieldValueStruct, exports.DropDownCustomFieldValueStruct, ]); //# sourceMappingURL=general.type.js.map