UNPKG

@mediarithmics/plugins-nodejs-sdk

Version:

This is the mediarithmics nodejs to help plugin developers bootstrapping their plugin without having to deal with most of the plugin boilerplate

60 lines 3.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MissingRealmError = exports.FileDownloadError = exports.InvalidPropertyValueError = exports.MandatoryPropertyValueError = exports.MissingConfigurationPropertyError = exports.AudienceFeedInstanceContextError = void 0; const UserAgentIdentifierRealmSelectionInterface_1 = require("../../core/webdomain/UserAgentIdentifierRealmSelectionInterface"); class AudienceFeedInstanceContextError extends Error { constructor(message) { super(); this.message = message; this.visibility = 'PUBLIC'; } } exports.AudienceFeedInstanceContextError = AudienceFeedInstanceContextError; class MissingConfigurationPropertyError extends AudienceFeedInstanceContextError { constructor(feed_id, property_name) { super('Invalid technical configuration - It seems your audience feed has not been configured correctly. Please contact your support with the provided error id.'); this.feed_id = feed_id; this.property_name = property_name; this.log = `Missing configuration property: ${property_name}`; } } exports.MissingConfigurationPropertyError = MissingConfigurationPropertyError; class MandatoryPropertyValueError extends AudienceFeedInstanceContextError { constructor(feed_id, property_name) { super(`${property_name} is a mandatory property. Please provide it when creating the feed.`); this.feed_id = feed_id; this.property_name = property_name; this.log = `Mandatory property: ${property_name}`; } } exports.MandatoryPropertyValueError = MandatoryPropertyValueError; class InvalidPropertyValueError extends AudienceFeedInstanceContextError { constructor(feed_id, property_name, property_value, allowed) { super(`${property_value} is an invalid value for ${property_name} property. Only one of the following can be used: ${allowed.join(',')}. Please select a valid value when creating the feed.`); this.feed_id = feed_id; this.property_name = property_name; this.property_value = property_value; this.allowed = allowed; this.log = `Invalid value ${property_value} for ${property_name} property `; } } exports.InvalidPropertyValueError = InvalidPropertyValueError; class FileDownloadError extends AudienceFeedInstanceContextError { constructor(feed_id, file_name) { super('Error downloading configuration file, please contact your support with the provided error id.'); this.feed_id = feed_id; this.file_name = file_name; this.log = `Error while fetching file: ${file_name}`; } } exports.FileDownloadError = FileDownloadError; class MissingRealmError extends AudienceFeedInstanceContextError { constructor(datamart_id, realmFilter) { super('Invalid technical configuration - It seems your audience feed has not been configured correctly. Please contact your support with the provided error id.'); this.datamart_id = datamart_id; this.realmFilter = realmFilter; this.log = `No user agent identifier realm selection of type ${realmFilter.realmType}${(0, UserAgentIdentifierRealmSelectionInterface_1.isWebDomainRealmFilter)(realmFilter) ? ` with sld_name ${realmFilter.sld_name} ` : ' '}was found in datamart ${datamart_id}`; } } exports.MissingRealmError = MissingRealmError; //# sourceMappingURL=AudienceFeedConnectorPluginResponseInterface.js.map