fansunited-sdk-esm 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js.map ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../node_modules/axios/lib/helpers/bind.js", "../../node_modules/axios/lib/utils.js", "../../node_modules/axios/lib/helpers/buildURL.js", "../../node_modules/axios/lib/core/InterceptorManager.js", "../../node_modules/axios/lib/helpers/normalizeHeaderName.js", "../../node_modules/axios/lib/core/enhanceError.js", "../../node_modules/axios/lib/core/createError.js", "../../node_modules/axios/lib/core/settle.js", "../../node_modules/axios/lib/helpers/cookies.js", "../../node_modules/axios/lib/helpers/isAbsoluteURL.js", "../../node_modules/axios/lib/helpers/combineURLs.js", "../../node_modules/axios/lib/core/buildFullPath.js", "../../node_modules/axios/lib/helpers/parseHeaders.js", "../../node_modules/axios/lib/helpers/isURLSameOrigin.js", "../../node_modules/axios/lib/cancel/Cancel.js", "../../node_modules/axios/lib/adapters/xhr.js", "../../node_modules/axios/lib/defaults.js", "../../node_modules/axios/lib/core/transformData.js", "../../node_modules/axios/lib/cancel/isCancel.js", "../../node_modules/axios/lib/core/dispatchRequest.js", "../../node_modules/axios/lib/core/mergeConfig.js", "../../node_modules/axios/lib/env/data.js", "../../node_modules/axios/lib/helpers/validator.js", "../../node_modules/axios/lib/core/Axios.js", "../../node_modules/axios/lib/cancel/CancelToken.js", "../../node_modules/axios/lib/helpers/spread.js", "../../node_modules/axios/lib/helpers/isAxiosError.js", "../../node_modules/axios/lib/axios.js", "../../node_modules/axios/index.js", "../../src/Core/Https/ProfileHttps.ts", "../../src/Core/Global/Helper.ts", "../../src/Core/Namespaces/Profile/Models/ProfileModel.ts", "../../src/Core/Namespaces/Profile/Models/Remappers/ProfileRemapper.ts", "../../src/Core/Namespaces/Profile/Models/Following/FollowingModel.ts", "../../src/Core/Namespaces/Profile/Models/Remappers/FollowingRemapper.ts", "../../src/Core/Namespaces/Profile/Models/Followers/FollowersModel.ts", "../../src/Core/Namespaces/Profile/Models/Remappers/FollowersRemapper.ts", "../../src/Core/Namespaces/Profile/Models/Following/FollowModel.ts", "../../src/Core/Namespaces/Profile/Models/FollowFilters.ts", "../../src/Core/Global/Constants/Constants.ts", "../../src/Core/Global/LocalStorage.ts", "../../src/Core/Https/IdMappingHttps.ts", "../../src/Core/IdMapping/IdMappingFacade.ts", "../../src/Core/IdMapping/TraversalHelper.ts", "../../src/Core/IdMapping/TreeTraversalExtract.ts", "../../src/Core/IdMapping/TreeTraversalReplace.ts", "../../src/Core/IdMapping/IdMappingService.ts", "../../src/Core/Namespaces/Profile/Models/FullnessProfile/CompletedModel.ts", "../../src/Core/Namespaces/Profile/Models/FullnessProfile/BreakdownModel.ts", "../../src/Core/Namespaces/Profile/Models/FullnessProfile/FullnessProfile.ts", "../../src/Core/Namespaces/Profile/Facades/ProfileFacade.ts", "../../src/Core/Namespaces/Profile/Models/ProfileCountryModel.ts", "../../src/Core/Namespaces/Football/Facades/CountriesFacade.ts", "../../src/Core/Namespaces/Football/Models/Competition/CompetitionFilters.ts", "../../src/Core/Namespaces/Football/Facades/CompetitionsFacade.ts", "../../src/Core/Namespaces/Football/Models/Team/TeamFilters.ts", "../../src/Core/Namespaces/Football/Facades/TeamsFacade.ts", "../../src/Core/Namespaces/Football/Models/Player/PlayerFilters.ts", "../../src/Core/Namespaces/Football/Facades/PlayerFacade.ts", "../../src/Core/Namespaces/Football/Models/Match/MatchFilters.ts", "../../src/Core/Namespaces/Football/Facades/MatchFacade.ts", "../../src/Core/Namespaces/Football/Models/Search/SearchFilters.ts", "../../src/Core/Namespaces/Football/Facades/SearchFacade.ts", "../../src/Core/Namespaces/Football/Facades/FootballFacade.ts", "../../src/Core/Namespaces/Profile/Interests/InterestsService.ts", "../../src/Core/Namespaces/Profile/Builders/OwnProfileBuilder.ts", "../../src/Core/Namespaces/Profile/Builders/ProfileBuilder.ts", "../../src/Core/Https/FootballHttps.ts", "../../src/Core/Namespaces/Football/Models/Country/FootballCountryModel.ts", "../../src/Core/Namespaces/Football/Models/Country/Remappers/FootballCountryRemapper.ts", "../../src/Core/Namespaces/Football/Models/Competition/CompetitionBasicModel.ts", "../../src/Core/Namespaces/Football/Models/Competition/Remappers/CompetitionBasicRemapper.ts", "../../src/Core/Namespaces/Football/Models/Competition/CompetitionFullModel.ts", "../../src/Core/Namespaces/Football/Models/Team/TeamBasicModel.ts", "../../src/Core/Namespaces/Football/Models/Team/Remappers/TeamBasicRemapper.ts", "../../src/Core/Namespaces/Football/Models/Competition/Remappers/CompetitionFullRemapper.ts", "../../src/Core/Namespaces/Football/Models/Team/TeamFullModel.ts", "../../src/Core/Namespaces/Football/Models/Player/PlayerSquadModel.ts", "../../src/Core/Namespaces/Football/Models/Player/Remappers/PlayerSquadRemapper.ts", "../../src/Core/Namespaces/Football/Models/Team/Remappers/TeamFullRemapper.ts", "../../src/Core/Namespaces/Football/Models/Match/MatchBasicModel.ts", "../../src/Core/Namespaces/Football/Models/Match/Scores/ScoresModel.ts", "../../src/Core/Namespaces/Football/Models/Match/Scores/ScoresRemapper.ts", "../../src/Core/Namespaces/Football/Models/Match/Remappers/MatchBasicRemapper.ts", "../../src/Core/Namespaces/Football/Models/Match/MatchFullModel.ts", "../../src/Core/Namespaces/Football/Models/Match/Stats/StatsModel.ts", "../../src/Core/Namespaces/Football/Models/Match/Stats/StatsRemapper.ts", "../../src/Core/Namespaces/Football/Models/Match/Lineups/LineupsModel.ts", "../../src/Core/Namespaces/Football/Models/Player/PlayerShortModel.ts", "../../src/Core/Namespaces/Football/Models/Player/Remappers/PlayerShortRemapper.ts", "../../src/Core/Namespaces/Football/Models/Match/Lineups/LineupsRemapper.ts", "../../src/Core/Namespaces/Football/Models/Match/Timeline/TimelineModel.ts", "../../src/Core/Namespaces/Football/Models/Match/Timeline/TimelineRemapper.ts", "../../src/Core/Namespaces/Football/Models/Match/Remappers/MatchFullRemapper.ts", "../../src/Core/Namespaces/Football/Models/Player/TopPlayerModel.ts", "../../src/Core/Namespaces/Football/Models/Player/Remappers/TopPlayerRemapper.ts", "../../src/Core/Namespaces/Football/Models/Player/PlayerBasicModel.ts", "../../src/Core/Namespaces/Football/Models/Player/Remappers/PlayerBasicRemapper.ts", "../../src/Core/Namespaces/Football/Models/Player/PlayerFullModel.ts", "../../src/Core/Namespaces/Football/Models/Player/Remappers/PlayerFullRemapper.ts", "../../src/Core/Namespaces/Football/Models/Search/SearchModel.ts", "../../src/Core/Namespaces/Football/Models/Search/SearchRemapper.ts", "../../src/Core/Namespaces/Profile/Profile.ts", "../../src/Core/Configurator/Validators/LangValidator.ts", "../../src/Core/Configurator/Validators/EnvironmentValidator.ts", "../../src/Core/Configurator/Validators/ApiKeyValidator.ts", "../../src/Core/Configurator/Validators/IdSchemaValidator.ts", "../../src/Core/Configurator/Models/AuthProviderConfigModel.ts", "../../src/Core/Configurator/Models/MessageLogModel.ts", "../../src/Core/Configurator/Models/AuthProviderValidationModel.ts", "../../src/Core/Configurator/Validators/AuthProviderValidator.ts", "../../src/Core/Configurator/Models/ValidationItemModel.ts", "../../src/Core/Configurator/Models/ConfigValidationModel.ts", "../../src/Core/Configurator/Validators/ClientIdValidator.ts", "../../src/Core/Configurator/ConfigurationValidator.ts", "../../src/Core/Namespaces/Football/Football.ts", "../../src/Core/Https/PredictorHttps.ts", "../../src/Core/Enums/MarketEnum.ts", "../../src/Core/Namespaces/Predictor/Models/Fixtures/FixturesResponseModel.ts", "../../src/Core/Namespaces/Predictor/Models/Fixtures/ResultModel.ts", "../../src/Core/Namespaces/Predictor/Models/Fixtures/FixturesRemapper.ts", "../../src/Core/Namespaces/Predictor/Models/Predictions/PredictionResponseModel.ts", "../../src/Core/Namespaces/Predictor/Models/Predictions/PredictionsModel.ts", "../../src/Core/Namespaces/Predictor/Models/Predictions/PredictionRemapper.ts", "../../src/Core/Namespaces/Predictor/Models/Summary/MatchSummaryModel.ts", "../../src/Core/Namespaces/Predictor/Models/Summary/MatchSummaryRemapper.ts", "../../src/Core/Namespaces/Predictor/Models/Config/PredictorConfigModel.ts", "../../src/Core/Namespaces/Predictor/Models/Config/PredictorConfigRemapper.ts", "../../src/Core/Namespaces/Predictor/Models/Predictions/PredictionRequestModel.ts", "../../src/Core/Namespaces/Predictor/Service/PredictorService.ts", "../../src/Core/Namespaces/Predictor/Facade/PredictorFacade.ts", "../../src/Core/Https/ClientHttps.ts", "../../src/Core/Namespaces/Predictor/Predictor.ts", "../../src/Core/Namespaces/Loyalty/Models/Badges/BadgesModel.ts", "../../src/Core/Namespaces/Loyalty/Models/LoyaltyModel.ts", "../../src/Core/Namespaces/Loyalty/Models/Points/PointsModel.ts", "../../src/Core/Namespaces/Loyalty/Models/Rewards/RewardsModel.ts", "../../src/Core/Namespaces/Loyalty/Models/LoyaltyRemapper.ts", "../../src/Core/Namespaces/Loyalty/Facade/LoyaltyFacade.ts", "../../src/Core/Namespaces/Loyalty/Loyalty.ts", "../../src/index.ts"],
4
+ "sourcesContent": ["'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n", "'use strict';\n\nvar bind = require('./helpers/bind');\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n", "'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n", "'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n };\n return error;\n};\n", "'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n", "'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n", "'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n", "'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n", "'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n", "'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n", "'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n", "'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n var onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n var transitional = config.transitional || defaults.transitional;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = function(cancel) {\n if (!request) {\n return;\n }\n reject(!cancel || (cancel && cancel.type) ? new Cancel('canceled') : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n", "'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\nvar enhanceError = require('./core/enhanceError');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional || defaults.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n", "'use strict';\n\nvar utils = require('./../utils');\nvar defaults = require('./../defaults');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n", "'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n", "'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar Cancel = require('../cancel/Cancel');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new Cancel('canceled');\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n", "'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n return getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(prop) {\n if (prop in config2) {\n return getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n return getMergedValue(undefined, config1[prop]);\n }\n }\n\n var mergeMap = {\n 'url': valueFromConfig2,\n 'method': valueFromConfig2,\n 'data': valueFromConfig2,\n 'baseURL': defaultToConfig2,\n 'transformRequest': defaultToConfig2,\n 'transformResponse': defaultToConfig2,\n 'paramsSerializer': defaultToConfig2,\n 'timeout': defaultToConfig2,\n 'timeoutMessage': defaultToConfig2,\n 'withCredentials': defaultToConfig2,\n 'adapter': defaultToConfig2,\n 'responseType': defaultToConfig2,\n 'xsrfCookieName': defaultToConfig2,\n 'xsrfHeaderName': defaultToConfig2,\n 'onUploadProgress': defaultToConfig2,\n 'onDownloadProgress': defaultToConfig2,\n 'decompress': defaultToConfig2,\n 'maxContentLength': defaultToConfig2,\n 'maxBodyLength': defaultToConfig2,\n 'transport': defaultToConfig2,\n 'httpAgent': defaultToConfig2,\n 'httpsAgent': defaultToConfig2,\n 'cancelToken': defaultToConfig2,\n 'socketPath': defaultToConfig2,\n 'responseEncoding': defaultToConfig2,\n 'validateStatus': mergeDirectKeys\n };\n\n utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {\n var merge = mergeMap[prop] || mergeDeepProperties;\n var configValue = merge(prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n};\n", "module.exports = {\n \"version\": \"0.24.0\"\n};", "'use strict';\n\nvar VERSION = require('../env/data').version;\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n assertOptions: assertOptions,\n validators: validators\n};\n", "'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\nvar validator = require('../helpers/validator');\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n", "'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(function(cancel) {\n if (!token._listeners) return;\n\n var i;\n var l = token._listeners.length;\n\n for (i = 0; i < l; i++) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = function(onfulfilled) {\n var _resolve;\n // eslint-disable-next-line func-names\n var promise = new Promise(function(resolve) {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Subscribe to the cancel signal\n */\n\nCancelToken.prototype.subscribe = function subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n};\n\n/**\n * Unsubscribe from the cancel signal\n */\n\nCancelToken.prototype.unsubscribe = function unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n var index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n", "'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n", "'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n", "'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\naxios.VERSION = require('./env/data').version;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n", "module.exports = require('./lib/axios');", "import SDKConfiguraitonModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\nimport axios, { AxiosInstance } from \"axios\";\r\nimport { setBaseUrl } from \"../Global/Helper\";\r\nimport ProfileModel from \"../Namespaces/Profile/Models/ProfileModel\";\r\nimport ProfileCountryModel from \"../Namespaces/Profile/Models/ProfileCountryModel\";\r\nimport ProfileRemapper from \"../Namespaces/Profile/Models/Remappers/ProfileRemapper\";\r\nimport FollowingRemapper from \"../Namespaces/Profile/Models/Remappers/FollowingRemapper\";\r\nimport FollowersRemapper from \"../Namespaces/Profile/Models/Remappers/FollowersRemapper\";\r\nimport FollowersModel from \"../Namespaces/Profile/Models/Followers/FollowersModel\";\r\nimport FollowingModel from \"../Namespaces/Profile/Models/Following/FollowingModel\";\r\nimport FollowModel from \"../Namespaces/Profile/Models/Following/FollowModel\";\r\nimport FollowFilters from \"../Namespaces/Profile/Models/FollowFilters\";\r\n\r\nconst COUNTRIES_REQUEST = '/countries';\r\nconst PROFILE_REQUEST = '/profile';\r\nconst PROFILES_REQUEST = '/profiles';\r\n\r\nexport default class ProfileHttps {\r\n private instance: AxiosInstance = null;\r\n readonly apiSignInUrl: string = '';\r\n private profileRemapper: ProfileRemapper = null;\r\n private followingRemapper: FollowingRemapper = null;\r\n private followersRemapper: FollowersRemapper = null;\r\n\r\n constructor(config: SDKConfiguraitonModel) {\r\n const baseUrl = setBaseUrl(config.environment, \"profile\");\r\n this.apiSignInUrl = `?key=${config.apiKey}&client_id=${config.clientId}&lang=${config.lang}`;\r\n\r\n this.instance = axios.create({\r\n baseURL: baseUrl,\r\n headers: {\r\n 'Authorization': `Bearer ${config.authProvider.getIdToken()}`,\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n\r\n this.profileRemapper = new ProfileRemapper();\r\n this.followingRemapper = new FollowingRemapper();\r\n this.followersRemapper = new FollowersRemapper();\r\n }\r\n\r\n public getCountries = async (): Promise<ProfileCountryModel[]> => {\r\n try {\r\n const response = await this.instance.get(`${COUNTRIES_REQUEST}${this.apiSignInUrl}`);\r\n return response.data.data;\r\n } catch (e) {\r\n console.warn('There was a problem fetching the countries:', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getProfile = async (id?: string): Promise<ProfileModel> => {\r\n let url = `${PROFILE_REQUEST}${this.apiSignInUrl}`;\r\n\r\n if (id) {\r\n url = `${PROFILES_REQUEST}/${id}${this.apiSignInUrl}`;\r\n }\r\n\r\n try {\r\n const response = await this.instance.get(url);\r\n return this.profileRemapper.fullProfileFromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn(`There was a problem fetching the following profile: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getProfiles = async (profiles: string[]): Promise<ProfileModel[]> => {\r\n try {\r\n const response = await this.instance.get(`${PROFILES_REQUEST}${this.apiSignInUrl}&profile_ids=${profiles.join(',')}`);\r\n return this.profileRemapper.profilesFromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn(`There was a problem fetching the following profiles: ${profiles.join(\",\")}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getFollowers = async (filters?: FollowFilters, id?: string): Promise<FollowersModel[]> => {\r\n let url = `${PROFILE_REQUEST}/followers${this.apiSignInUrl}`;\r\n\r\n if (filters && !id) {\r\n filters = new FollowFilters(filters);\r\n url = `${PROFILE_REQUEST}/followers${this.apiSignInUrl}${filters.constructFilterUrl()}`;\r\n } else if (filters && id) {\r\n filters = new FollowFilters(filters);\r\n url = `${PROFILE_REQUEST}/${id}/followers${this.apiSignInUrl}${filters.constructFilterUrl()}`;\r\n } else if (!filters && id) {\r\n url = `${PROFILE_REQUEST}/${id}/followers${this.apiSignInUrl}`;\r\n }\r\n\r\n try {\r\n const response = await this.instance.get(url);\r\n return this.followersRemapper.followersFromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn(`There was a problem fetching the followers for profile`, e);\r\n throw e;\r\n }\r\n\r\n };\r\n\r\n public getFollowing = async (filters?: FollowFilters, id?: string): Promise<FollowingModel[]> => {\r\n let url = `${PROFILE_REQUEST}/following${this.apiSignInUrl}`;\r\n\r\n if (filters && !id) {\r\n filters = new FollowFilters(filters);\r\n url = `${PROFILE_REQUEST}/following${this.apiSignInUrl}${filters.constructFilterUrl()}`;\r\n } else if (filters && id) {\r\n filters = new FollowFilters(filters);\r\n url = `${PROFILE_REQUEST}/${id}/following${this.apiSignInUrl}${filters.constructFilterUrl()}`;\r\n } else if (!filters && id) {\r\n url = `${PROFILE_REQUEST}/${id}/following${this.apiSignInUrl}`;\r\n }\r\n\r\n try {\r\n const response = await this.instance.get(url);\r\n return this.followingRemapper.followingFromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn(`There was a problem fetching the followers of the following profile: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public follow = async (profiles: string[]): Promise<FollowingModel[]> => {\r\n const followIds = new FollowModel();\r\n followIds.profile_ids = profiles;\r\n try {\r\n const response = await this.instance.post(`${PROFILE_REQUEST}/follow${this.apiSignInUrl}`, JSON.stringify(followIds));\r\n return this.followingRemapper.followingFromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn(`There was a problem with POST request for profiles: ${profiles.join(\",\")} `, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public unfollow = async (profiles: string[]): Promise<boolean> => {\r\n const unfollowIds = new FollowModel();\r\n unfollowIds.profile_ids = profiles;\r\n try {\r\n await this.instance.delete(`${PROFILE_REQUEST}/follow${this.apiSignInUrl}`, { data: JSON.stringify(unfollowIds) });\r\n return true;\r\n } catch (e) {\r\n console.warn(`There was a problem with DELETE request for profiles: ${profiles.join(\",\")} `, e);\r\n return false;\r\n }\r\n };\r\n\r\n public updateProfile = async (profile: ProfileModel): Promise<ProfileModel> => {\r\n try {\r\n const profileBody = this.profileRemapper.profileToRequest(profile);\r\n const response = await this.instance.patch(`${PROFILE_REQUEST}${this.apiSignInUrl}`, profileBody);\r\n return this.profileRemapper.fullProfileFromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem updating the own profile:', e);\r\n throw e;\r\n }\r\n };\r\n\r\n}\r\n", "export const requestChunkBuild = (ids: string[]) => {\n const chunks: any = [];\n let chunkIndex = 0;\n\n ids.forEach((id: string) => {\n if (chunks[chunkIndex]) {\n if (chunks[chunkIndex].length < 249) {\n chunks[chunkIndex].push(id);\n } else {\n chunkIndex = chunkIndex + 1;\n chunks[chunkIndex] = [id];\n }\n } else {\n chunks[chunkIndex] = [id];\n }\n })\n\n return chunks;\n};\n\nexport const limitIds = (ids: string[]) => {\n let result: any = [];\n const limit:number = 200;\n\n while (ids.length > limit - 1) {\n const maxIds = ids.splice(0, limit - 1);\n result.push(maxIds);\n }\n\n result.push(ids);\n\n return result\n};\n\nexport const setBaseUrl = (environment: string, namespace: string) => {\n let baseUrl = \"\";\n\n const API_URLS = {\n profile: \"https://profile.fansunitedapi.com/v1\",\n football: \"https://football.fansunitedapi.com/v1\",\n idMapping: \"https://id-mapping.fansunitedapi.com/v1\",\n predictor: \"https://prediction.fansunitedapi.com/v1\",\n client: \"https://client.fansunitedapi.com/v1\"\n };\n\n const DEV_API_URLS = {\n profile: \"http://localhost:8010\",\n football: \"http://locahost:8080\",\n idMapping: \"http://localhost:8030\",\n predictor: \"http://localhost:8040\",\n client: \"http://localhost:8080\"\n };\n\n if (environment === \"prod\" || environment === \"sandbox\") {\n //@ts-ignore\n baseUrl = API_URLS[namespace];\n } else {\n //@ts-ignore\n baseUrl = DEV_API_URLS[namespace];\n }\n\n return baseUrl;\n };", "import ProfileCountryModel from \"./ProfileCountryModel\";\r\nimport InterestModel from \"./InterestModel\";\r\n\r\nexport default class ProfileModel {\r\n public id: string = null;\r\n public name: string = null;\r\n public avatar: string = null;\r\n public gender: string = null;\r\n public country: ProfileCountryModel = null;\r\n public birthDate: string = null;\r\n public interests: InterestModel[] = [];\r\n}\r\n", "import ProfileModel from \"../ProfileModel\";\r\nimport ProfileCountryModel from \"../ProfileCountryModel\";\r\n\r\nexport default class ProfileRemapper {\r\n\r\n public profilesFromResponse = (response: any): ProfileModel[] => {\r\n if (response) {\r\n return response.map((profResp: any) => this.fullProfileFromResponse(profResp));\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n public fullProfileFromResponse = (response: any): ProfileModel => {\r\n const model: ProfileModel = new ProfileModel();\r\n model.avatar = response.avatar;\r\n model.birthDate = response.birth_date;\r\n model.country = response.country as ProfileCountryModel;\r\n model.gender = response.gender;\r\n model.id = response.id;\r\n model.interests = response.interests;\r\n model.name = response.name;\r\n return model;\r\n };\r\n\r\n public profileToRequest = (profile: ProfileModel) => {\r\n return {\r\n country_id: profile.country ? profile.country.id : null,\r\n gender: profile.gender,\r\n birth_date: profile.birthDate,\r\n interests: profile.interests,\r\n name: profile.name\r\n }\r\n };\r\n}\r\n", "export default class FollowingModel {\n public avatar: string = null;\n public followingId: string = null;\n public name: string = null;\n public profileId: string = null;\n}", "import FollowingModel from \"../Following/FollowingModel\";\n\nexport default class FollowingRemapper {\n\n public followingFromResponse = (response: any) => {\n return response.map((resp: any) => this.remapResponse(resp));\n }\n\n private remapResponse = (response: any) => {\n const model = new FollowingModel();\n\n model.avatar = response.avatar;\n model.followingId = response.following_id;\n model.name = response.name;\n model.profileId = response.profile_id;\n\n return model;\n };\n}", "export default class FollowersModel {\n public avatar: string = null;\n public followerId: string = null;\n public name: string = null;\n public profileId: string = null;\n}", "import FollowersModel from \"../Followers/FollowersModel\";\n\nexport default class FollowersRemapper {\n public followersFromResponse = (response: any) => {\n return response.map((resp: any) => this.remapResponse(resp));\n }\n\n private remapResponse = (response: any) => {\n const model = new FollowersModel();\n\n model.avatar = response.avatar;\n model.followerId = response.follower_id;\n model.name = response.name;\n model.profileId = response.profile_id;\n\n return model;\n };\n}", "export default class FollowModel {\n public profile_ids: string[] = [];\n}", "export default class FollowFilters {\n public limit: number = 0;\n public startAfter: string = null;\n\n constructor(filters: any) {\n this.limit = filters.limit ? filters.limit : 20;\n this.startAfter = filters.startAfter ? filters.startAfter : null;\n }\n\n public constructFilterUrl = () => {\n let url = '';\n if (this.limit) {\n url = url + '&';\n url = url + `limit=${this.limit}`\n }\n if (this.startAfter) {\n url = url + '&';\n url = url + `start_after=${this.startAfter}`;\n }\n\n return url;\n };\n\n}", "export const ID_TYPES = {\r\n native: 'id',\r\n sportradar: 'sportradar_id',\r\n sportal365: 'sportal365_id',\r\n enetpulse: 'enetpulse_id',\r\n};\r\n", "import SDKConfigurationModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\nimport {ID_TYPES} from \"./Constants/Constants\";\r\nimport ProfileModel from \"../Namespaces/Profile/Models/ProfileModel\";\r\nimport FootballCountryModel from \"../Namespaces/Football/Models/Country/FootballCountryModel\";\r\nimport ProfileCountryModel from \"../Namespaces/Profile/Models/ProfileCountryModel\";\r\nimport CompetitionBasicModel from \"../Namespaces/Football/Models/Competition/CompetitionBasicModel\";\r\nimport CompetitionFilters from \"../Namespaces/Football/Models/Competition/CompetitionFilters\";\r\n\r\nconst NAME = 'FansUnited'\r\nconst FANS_UNITED_INITIAL_SCHEMA_V1: any = {\r\n football: {\r\n ids: [],\r\n countries: [],\r\n competitions: [],\r\n },\r\n profile: {\r\n others: [],\r\n own: {},\r\n countries: [],\r\n expireAt: 0\r\n }\r\n};\r\n\r\nexport default class LocalStorage {\r\n readonly idSchema: string = '';\r\n readonly exparationTimeout: number = 600;\r\n\r\n constructor(configuration: SDKConfigurationModel) {\r\n this.idSchema = configuration.idSchema;\r\n\r\n if (this.getData() === undefined || this.getData() === null) {\r\n this.setData(FANS_UNITED_INITIAL_SCHEMA_V1);\r\n }\r\n }\r\n\r\n public clearData = () => {\r\n this.setData(FANS_UNITED_INITIAL_SCHEMA_V1);\r\n }\r\n\r\n public getEntityById = (type: string = '', id: string = ''): any => {\r\n return this.getData().football.ids.find((idObj: any) => {\r\n //@ts-ignore\r\n const idType = ID_TYPES[this.idSchema];\r\n //@ts-ignore\r\n return idObj && `${idObj[idType]}` === id && idObj.resource === type;\r\n })\r\n };\r\n\r\n public getEntity = (ids: string | string[], type: string, schema: string) => {\r\n if (Array.isArray(ids)) {\r\n return this.getData().football.ids.filter((idObj: any) => {\r\n //@ts-ignore\r\n const idType = ID_TYPES[schema];\r\n //@ts-ignore\r\n return idObj && ids.includes(`${idObj[idType]}`) && idObj.resource === type;\r\n })\r\n } else {\r\n return this.getData().football.ids.find((idObj: any) => {\r\n //@ts-ignore\r\n const idType = ID_TYPES[schema];\r\n //@ts-ignore\r\n return idObj && `${idObj[idType]}` === ids && idObj.resource === type;\r\n })\r\n }\r\n }\r\n\r\n public getEntityByNativeId = (type: string = '', id: string = ''): any => {\r\n return this.getData().football.ids.find((idObj: any) => {\r\n //@ts-ignore\r\n return idObj && `${idObj.id}` === id && idObj.resource === type;\r\n })\r\n };\r\n\r\n /**\r\n * Returns the ids as object {id: <entity id>, exists: true/false};\r\n * @param idsObj\r\n * @param toSchema\r\n */\r\n public checkForExistingIdObjs = (idsObj: any, toSchema: string) => {\r\n //@ts-ignore\r\n const schemaId = ID_TYPES[toSchema];\r\n let idsChecked = {};\r\n\r\n Object.keys(idsObj).forEach((key: string) => {\r\n const idsByResource = idsObj[key];\r\n const foundObjIds = this.getEntity(idsByResource, key, toSchema);\r\n const foundIds = foundObjIds.map((objId: any) => objId[schemaId]);\r\n const missingIds = idsObj[key].filter((id: string) => !foundIds.includes(id));\r\n //@ts-ignore\r\n idsChecked[key] = idsByResource.map((id: string) => !missingIds.includes(id) ? {id: id, exists: true} : {id: id, exists: false})\r\n });\r\n\r\n return idsChecked;\r\n };\r\n\r\n public getIdsByType = (typeIdsObj: any, configSchema: string, toSchema: string) => {\r\n //@ts-ignore\r\n const toSchemaId = ID_TYPES[toSchema];\r\n //@ts-ignore\r\n const configSchemaId = ID_TYPES[configSchema];\r\n let result = {};\r\n\r\n Object.keys(typeIdsObj).forEach((key: string) => {\r\n const objIds = typeIdsObj[key];\r\n const ids: string[] = [];\r\n this.getData().football.ids.forEach((idObj: any) => {\r\n objIds.forEach((id: string, idx: number) => {\r\n if (id === idObj[configSchemaId] && key === idObj.resource) {\r\n ids[idx] = idObj[toSchemaId];\r\n }\r\n });\r\n });\r\n //@ts-ignore\r\n result[key] = ids;\r\n });\r\n return result;\r\n };\r\n\r\n public addIdMapping = (idMapping: any) => {\r\n const fansUnited = this.getData();\r\n fansUnited.football.ids.push(idMapping);\r\n this.setData(fansUnited);\r\n }\r\n\r\n public addIdMappings = (idMappings: any[]) => {\r\n const fansUnited = this.getData();\r\n let ids = fansUnited.football.ids;\r\n ids = [...ids, ...idMappings];\r\n fansUnited.football.ids = ids;\r\n\r\n this.setData(fansUnited);\r\n }\r\n\r\n public setOwnProfile = (profile: ProfileModel) => {\r\n const fansUnited = this.getData();\r\n fansUnited.profile.own = profile;\r\n fansUnited.profile.expireAt = Math.floor(Date.now() / 1000) + this.exparationTimeout;\r\n this.setData(fansUnited);\r\n };\r\n\r\n public addProfiles = (profiles: ProfileModel[]) => {\r\n const fansUnited = this.getData();\r\n const profileIds = profiles.map((profToadd) => `${profToadd.id}`);\r\n const localProfiles = fansUnited.profile.others.filter((prof: ProfileModel) => !profileIds.includes(`${prof.id}`));\r\n\r\n localProfiles.push(...profiles);\r\n fansUnited.profile.others = localProfiles;\r\n\r\n this.setData(fansUnited);\r\n }\r\n\r\n public addProfile = (profile: ProfileModel) => {\r\n const fansUnited = this.getData();\r\n const profiles = fansUnited.profile.others.filter((prof: ProfileModel) => `${prof.id}` !== `${profile.id}`);\r\n\r\n profiles.push(profile);\r\n fansUnited.profile.others = profiles;\r\n\r\n this.setData(fansUnited);\r\n }\r\n\r\n public getOwnProfile = () => {\r\n const fansUnited = this.getData();\r\n return fansUnited.profile.own;\r\n };\r\n\r\n public getProfileCountries = () => {\r\n const fansUnited = this.getData();\r\n return fansUnited.profile.countries;\r\n };\r\n\r\n public setProfileCountries = (countries: ProfileCountryModel[]) => {\r\n const fansUnited = this.getData();\r\n fansUnited.profile.countries = countries;\r\n this.setData(fansUnited);\r\n };\r\n\r\n public getProfilesByIds = (ids: string[]) => {\r\n const fansUnited = this.getData();\r\n const profiles = fansUnited.profile.others;\r\n\r\n return profiles.filter((profile: any) => ids.includes(`${profile.id}`));\r\n };\r\n\r\n public getProfileById = (id: string) => {\r\n const fansUnited = this.getData();\r\n const profiles = fansUnited.profile.others;\r\n\r\n return profiles.find((profile: any) => `${profile.id}` === `${id}`);\r\n };\r\n\r\n public getFootballCountries = () => {\r\n const fansUnited = this.getData();\r\n return fansUnited.football.countries;\r\n };\r\n\r\n public setFootballCountries = (countries: FootballCountryModel[]) => {\r\n const fansUnited = this.getData();\r\n fansUnited.football.countries = countries;\r\n this.setData(fansUnited);\r\n };\r\n\r\n public getCompetitions = (filters?: CompetitionFilters) => {\r\n const fansUnited = this.getData();\r\n\r\n if (filters) {\r\n return filters.competitionSearchFilter(fansUnited.football.competitions);\r\n } else {\r\n return fansUnited.football.competitions;\r\n }\r\n };\r\n\r\n public setCompetitions = (competitions: CompetitionBasicModel[]) => {\r\n const fansUnited = this.getData();\r\n fansUnited.football.competitions.push(...competitions);\r\n this.setData(fansUnited);\r\n };\r\n\r\n public getExparationProfile = (): number => {\r\n const fansUnited = this.getData();\r\n\r\n return fansUnited.profile.expireAt;\r\n };\r\n\r\n private getData = () => {\r\n return JSON.parse(localStorage.getItem(NAME));\r\n };\r\n\r\n private setData = (data: any) => {\r\n localStorage.setItem(NAME, JSON.stringify(data));\r\n };\r\n}\r\n", "import axios, {AxiosInstance, AxiosResponse} from \"axios\";\r\nimport SDKConfiguraitonModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\nimport {requestChunkBuild, setBaseUrl} from \"../Global/Helper\";\r\n\r\nconst types: any = {\r\n player: 'players',\r\n team: 'teams',\r\n homeTeam: 'teams',\r\n awayTeam: 'teams',\r\n country: 'countries',\r\n competition: 'competitions',\r\n match: 'matches'\r\n}\r\n\r\nexport default class IdMappingHttps {\r\n private instance: AxiosInstance = null;\r\n readonly apiSignInUrl: string = '';\r\n\r\n constructor(config: SDKConfiguraitonModel) {\r\n const baseUrl = setBaseUrl(config.environment, \"idMapping\");\r\n this.apiSignInUrl = `?key=${config.apiKey}&client_id=${config.clientId}`;\r\n\r\n this.instance = axios.create({\r\n baseURL: baseUrl\r\n })\r\n }\r\n\r\n getEntityById = (type: string, id: string): AxiosResponse<any> => {\r\n try {\r\n //@ts-ignore\r\n return this.instance.get(`/football${this.apiSignInUrl}&input_provider=${config.idSchema}&${types[type]}=${id}`);\r\n } catch (e) {\r\n console.warn(`There was a problem with id mapping request for the following id:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n\r\n getEntityByIdAndSchema = (type: string, id: string, schemaId: string): AxiosResponse<any> => {\r\n try {\r\n //@ts-ignore\r\n return this.instance.get(`/football${this.apiSignInUrl}&input_provider=${schemaId}&${types[type]}=${id}`);\r\n } catch (e) {\r\n console.warn(`There was a problem with id mapping request for the following id:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n getEntityIdsByIdsAndSchema = (type: string, ids: string[], schemaId: string) => {\r\n try {\r\n return this.instance.get(`/football${this.apiSignInUrl}&input_provider=${schemaId}&${types[type]}=${ids.join(',')}`);\r\n } catch (e) {\r\n console.warn(`There was a problem with id mapping request for the following ids:${ids.join(\",\")}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getEntitiesByIds = (type: string, ids: string[], idSchema: string) => {\r\n ids.sort((a: string, b: string) => a.localeCompare(b));\r\n const requestChunks = requestChunkBuild(ids);\r\n const requests = requestChunks.map((chunk: any[]) => {\r\n try {\r\n //@ts-ignore\r\n return this.instance.get(`/football${this.apiSignInUrl}&input_provider=${idSchema}&${types[type]}=${chunk.join(',')}`);\r\n } catch (e) {\r\n console.warn(`There was a problem with id mapping request for the following ids:${chunk.join(\",\")}`, e);\r\n throw e;\r\n }\r\n });\r\n\r\n return Promise.all(requests).then((responses: any[]) => {\r\n\r\n const result: any[] = [];\r\n\r\n responses.forEach((resp: any) => {\r\n result.push(...resp.data.data);\r\n });\r\n\r\n return result;\r\n })\r\n };\r\n\r\n public getEntitiesByIdObjs = (entityIdsObj: any, schemaId?: string) => {\r\n let requestsToExecute: any[] = [];\r\n\r\n Object.keys(entityIdsObj).forEach((key: string) => {\r\n const requestChunks = requestChunkBuild(entityIdsObj[key]);\r\n const requests = requestChunks.map((chunk: any[]) => {\r\n chunk.sort((a: string, b: string) => a.localeCompare(b));\r\n // console.log(chunk)\r\n try {\r\n //@ts-ignore\r\n return this.instance.get(`/football${this.apiSignInUrl}&input_provider=${schemaId ? schemaId : 'native'}&${types[key]}=${chunk.join(',')}`);\r\n } catch (e) {\r\n console.warn(`There was a problem with id mapping request for the following ids:${chunk.join(\",\")}`, e);\r\n throw e;\r\n }\r\n });\r\n requestsToExecute = [...requestsToExecute, ...requests];\r\n });\r\n return Promise.all(requestsToExecute).then((responses: any[]) => {\r\n\r\n const result: any[] = [];\r\n responses.forEach((resp: any) => {\r\n // console.log(resp.data.data)\r\n result.push(...resp.data.data);\r\n });\r\n\r\n return result;\r\n })\r\n };\r\n\r\n}\r\n", "import LocalStorage from \"../Global/LocalStorage\";\r\nimport SDKConfigurationModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\nimport IdMappingHttps from \"../Https/IdMappingHttps\";\r\nimport {ID_TYPES} from \"../Global/Constants/Constants\";\r\n\r\nexport default class IdMappingFacade {\r\n readonly isBrowser: boolean = false;\r\n readonly localStorage: LocalStorage = null;\r\n readonly https: IdMappingHttps = null;\r\n\r\n constructor(configuration: SDKConfigurationModel) {\r\n this.isBrowser = typeof window !== 'undefined';\r\n this.localStorage = new LocalStorage(configuration);\r\n this.https = new IdMappingHttps(configuration);\r\n }\r\n\r\n getEntitiesByIds = async (idsObj: any, configSchema?: string, toSchema?: string) => {\r\n if (this.isBrowser) {\r\n try {\r\n const checkedIdsObj = this.localStorage.checkForExistingIdObjs(idsObj, configSchema);\r\n const splitIdObjs = this.splitForRequestAndExisting(checkedIdsObj);\r\n const retrievedIdObjs = await this.https.getEntitiesByIdObjs(splitIdObjs.request, configSchema);\r\n this.localStorage.addIdMappings(retrievedIdObjs);\r\n return this.localStorage.getIdsByType(idsObj, configSchema, toSchema);\r\n } catch (e) {\r\n console.warn('There was a problem retrieving the entity ids ', e);\r\n return Promise.resolve([]);\r\n }\r\n } else {\r\n try {\r\n let result = await this.https.getEntitiesByIdObjs(idsObj, configSchema);\r\n Object.keys(idsObj).forEach((key: string) => {\r\n //@ts-ignore\r\n idsObj[key] = result.filter((idObj: any) => idObj.resource === key).map((idObj: any) => idObj[ID_TYPES[toSchema]]);\r\n })\r\n return idsObj;\r\n } catch (e) {\r\n console.warn('There was a problem retrieving the entity ids ', e);\r\n return Promise.resolve([]);\r\n }\r\n }\r\n };\r\n\r\n public getEntityById = async (ids: string | string[], type: string, schemaId: string) => {\r\n if (this.isBrowser) {\r\n const entity = this.localStorage.getEntity(ids, type, schemaId);\r\n if (entity) {\r\n return entity;\r\n } else {\r\n const requestedEntities = await this.requestEntity(ids, type, schemaId);\r\n this.localStorage.addIdMappings(requestedEntities);\r\n return requestedEntities;\r\n }\r\n } else {\r\n return await this.requestEntity(ids, type, schemaId);\r\n }\r\n };\r\n\r\n /**\r\n * Checks ids if they exist in the local storage, this function requires the already checked ids object\r\n * @param checkedIdsObj\r\n */\r\n private splitForRequestAndExisting = (checkedIdsObj: any) => {\r\n let toRequestIdsObj = {};\r\n let existingIdsObj = {};\r\n\r\n Object.keys(checkedIdsObj).forEach((key: string) => {\r\n //@ts-ignore\r\n toRequestIdsObj[key] = checkedIdsObj[key].filter((checkedId: any) => !checkedId.exists).map((checkedId: any) => checkedId.id);\r\n //@ts-ignore\r\n existingIdsObj[key] = checkedIdsObj[key].filter((checkedId: any) => checkedId.exists).map((checkedId: any) => checkedId.id);\r\n });\r\n\r\n return {existing: existingIdsObj, request: toRequestIdsObj};\r\n };\r\n\r\n private requestEntity = async (ids: string | string[], type: string, schemaId: string) => {\r\n try {\r\n ids = Array.isArray(ids) ? ids : [ids];\r\n return await this.https.getEntitiesByIds(type, ids, schemaId);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the requested entity: ${e}`);\r\n return null;\r\n }\r\n };\r\n\r\n}\r\n", "export const typeConvert = (type: string) => {\r\n switch (type) {\r\n case 'competitions':\r\n return 'competition';\r\n case 'players':\r\n case 'relatedPlayer':\r\n case 'squad':\r\n return 'player';\r\n case 'teams':\r\n case 'participants':\r\n case 'homeTeam':\r\n case 'awayTeam':\r\n case 'timeline':\r\n case 'teamId':\r\n return 'team'\r\n default:\r\n return type;\r\n }\r\n};\r\n", "import {typeConvert} from \"./TraversalHelper\";\r\n\r\nexport default class TreeTraversalExtract {\r\n private extractedObjIds: any = {};\r\n\r\n public traverse = (obj: any, type: string) => {\r\n type = typeConvert(type);\r\n if (Array.isArray(obj)) {\r\n this.traverseArrExtract(obj, type);\r\n } else if (obj && typeof obj === 'object') {\r\n this.traverseObjExtract(obj, type);\r\n }\r\n return this.extractedObjIds;\r\n\r\n };\r\n\r\n private traverseArrExtract = (objs: any[], type: string) => {\r\n if (objs && objs.length > 0) {\r\n objs.forEach((obj: any) => {\r\n this.traverseObjExtract(obj, type)\r\n });\r\n }\r\n };\r\n\r\n private traverseObjExtract = (obj: any, type: string) => {\r\n if (obj && Object.keys(obj).length > 0) {\r\n Object.keys(obj).forEach((key: string) => {\r\n const value = obj[key];\r\n if (key === 'id' || key === 'teamId') {\r\n //create object if it doesn't exist\r\n if (!this.extractedObjIds.hasOwnProperty(type)) {\r\n this.extractedObjIds[type] = [];\r\n }\r\n this.extractedObjIds[type].push(value)\r\n } else if (obj[key]) {\r\n this.traverse(obj[key], key);\r\n }\r\n });\r\n }\r\n };\r\n}\r\n", "import {typeConvert} from \"./TraversalHelper\";\r\n\r\nexport default class TreeTraversalReplace {\r\n private replaceObjIdsIndex: any = null;\r\n private remappedIdsObj: any = {};\r\n\r\n public traverse = (obj: any, type: string, remappedIdsObj: any) => {\r\n type = typeConvert(type);\r\n if (this.replaceObjIdsIndex === null) {\r\n this.initReplaceObjIdsIndex(remappedIdsObj);\r\n this.remappedIdsObj = remappedIdsObj;\r\n }\r\n\r\n if (Array.isArray(obj)) {\r\n this.traverseArrReplace(obj, type);\r\n } else if (obj && typeof obj === 'object') {\r\n this.traverseObjReplace(obj, type);\r\n }\r\n\r\n return obj;\r\n };\r\n\r\n private initReplaceObjIdsIndex = (remappedIdsObj: any) => {\r\n this.replaceObjIdsIndex = {};\r\n Object.keys(remappedIdsObj).forEach((key: string) => {\r\n this.replaceObjIdsIndex[key] = 0;\r\n })\r\n };\r\n\r\n private traverseArrReplace = (objs: any[], type: string) => {\r\n if (objs && objs.length > 0) {\r\n objs.forEach((obj: any) => {\r\n this.traverseObjReplace(obj, type)\r\n });\r\n }\r\n };\r\n\r\n private traverseObjReplace = (obj: any, type: string) => {\r\n if (obj && Object.keys(obj).length > 0) {\r\n Object.keys(obj).forEach((key: string) => {\r\n if (key === 'id' || key === 'teamId') {\r\n obj[key] = this.remappedIdsObj[type][this.replaceObjIdsIndex[type]];\r\n this.replaceObjIdsIndex[type] = this.replaceObjIdsIndex[type] + 1;\r\n } else if (obj[key]) {\r\n this.traverse(obj[key], key, this.remappedIdsObj);\r\n }\r\n });\r\n }\r\n };\r\n}\r\n", "import SDKConfigurationModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\nimport IdMappingFacade from \"./IdMappingFacade\";\r\nimport TreeTraversalExtract from \"./TreeTraversalExtract\";\r\nimport TreeTraversalReplace from \"./TreeTraversalReplace\";\r\n\r\nexport default class IdMappingService {\r\n readonly idSchema: string = '';\r\n readonly idMappingFacade: IdMappingFacade = null;\r\n\r\n constructor(configuration: SDKConfigurationModel) {\r\n this.idSchema = configuration.idSchema\r\n this.idMappingFacade = new IdMappingFacade(configuration);\r\n }\r\n\r\n public getEntityIdBySchemaId = (type: string, id: string) => {\r\n return this.idMappingFacade.getEntityById(type, id, this.idSchema);\r\n };\r\n\r\n public remapEntities = async (entities: any, type: string) => {\r\n const entitiesCopy = JSON.parse(JSON.stringify(entities));\r\n try {\r\n const traverserExtract = new TreeTraversalExtract();\r\n const extractedIds = traverserExtract.traverse(entitiesCopy, type);\r\n return this.idMappingFacade.getEntitiesByIds(extractedIds, 'native', this.idSchema).then((localObjIds: any) => {\r\n const traverserReplace = new TreeTraversalReplace();\r\n return traverserReplace.traverse(entitiesCopy, type, localObjIds)\r\n })\r\n } catch (e) {\r\n console.warn(`There was a problem remapping entity: ${type} with inner entity `, e);\r\n return [];\r\n }\r\n };\r\n\r\n public getEntityIdsBySchemaId = async (ids: string[], type: string, toSchema?: string) => {\r\n const idsObj: any = {};\r\n idsObj[type] = ids;\r\n return await this.idMappingFacade.getEntitiesByIds(idsObj, this.idSchema, toSchema);\r\n };\r\n\r\n}\r\n", "export default class CompletedModel {\n public completed: boolean = false;\n public percentage: number;\n\n constructor(percentage: number) {\n this.percentage = percentage;\n }\n\n}\n", "import CompletedModel from \"./CompletedModel\";\n\nexport default class BreakdownModel {\n\n public teamFollowed: CompletedModel = new CompletedModel(10);\n public teamFavourite: CompletedModel = new CompletedModel(15);\n public playerFollowed: CompletedModel = new CompletedModel(10);\n public playerFavourite: CompletedModel = new CompletedModel(10);\n public competitionFollowed: CompletedModel = new CompletedModel(10);\n public competitionFavourite: CompletedModel = new CompletedModel(5);\n public addedBirthdate: CompletedModel = new CompletedModel(10);\n public addedGender: CompletedModel = new CompletedModel(10);\n public addedCountry: CompletedModel = new CompletedModel(10);\n public addedAvatar: CompletedModel = new CompletedModel(10);\n\n}\n", "import BreakdownModel from \"./BreakdownModel\";\n\nexport default class FullnessProfile {\n public totalPercentage: number;\n public breakdown: BreakdownModel = new BreakdownModel();\n}", "import LocalStorage from \"../../../Global/LocalStorage\";\r\nimport ProfileHttps from \"../../../Https/ProfileHttps\";\r\nimport ProfileModel from \"../Models/ProfileModel\";\r\nimport ProfileCountryModel from \"../Models/ProfileCountryModel\";\r\nimport FollowersModel from \"../Models/Followers/FollowersModel\";\r\nimport FollowingModel from \"../Models/Following/FollowingModel\";\r\nimport FullnessProfile from \"../Models/FullnessProfile/FullnessProfile\";\r\nimport InterestModel from \"../Models/InterestModel\";\r\nimport FollowFilters from \"../Models/FollowFilters\";\r\n\r\nexport default class ProfileFacade {\r\n\r\n readonly isBrowser:boolean = false;\r\n readonly localStorage: LocalStorage = {} as LocalStorage;\r\n readonly https: ProfileHttps = null;\r\n\r\n constructor(localStorage: LocalStorage, https: ProfileHttps) {\r\n this.isBrowser = typeof window !== 'undefined';\r\n this.localStorage = localStorage;\r\n this.https = https;\r\n }\r\n\r\n\r\n public getOwn = async (): Promise<ProfileModel> => {\r\n if (this.isBrowser) {\r\n const now = Math.floor(Date.now() / 1000);\r\n const exparationProfile = this.localStorage.getExparationProfile();\r\n let ownProfile: ProfileModel = null;\r\n\r\n if (exparationProfile > now) {\r\n ownProfile = this.localStorage.getOwnProfile();\r\n }\r\n\r\n if (ownProfile) {\r\n return ownProfile;\r\n } else {\r\n try {\r\n const profileResponse = await this.https.getProfile();\r\n this.localStorage.setOwnProfile(profileResponse);\r\n return profileResponse;\r\n } catch (e) {\r\n console.warn('There was a problem retrieving your profile: ', e);\r\n throw e;\r\n }\r\n }\r\n } else {\r\n try {\r\n const profileResponse = await this.https.getProfile();\r\n return profileResponse;\r\n } catch (e) {\r\n console.warn('There was a problem retrieving your profile: ', e);\r\n throw e;\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n public getByIds = async (ids: string[]): Promise<ProfileModel[]> => {\r\n if (this.isBrowser) {\r\n const profiles = this.localStorage.getProfilesByIds(ids);\r\n\r\n if (profiles && profiles.length === ids.length) {\r\n profiles.filter((profile: ProfileModel) => delete profile.interests);\r\n return profiles;\r\n } else {\r\n try {\r\n const profiles = await this.https.getProfiles(ids);\r\n this.localStorage.addProfiles(profiles);\r\n profiles.filter((profile: ProfileModel) => delete profile.interests);\r\n return profiles\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the selected profiles: ${ids.join(\",\")} `, e);\r\n throw e;\r\n }\r\n }\r\n } else {\r\n try {\r\n const profiles = await this.https.getProfiles(ids);\r\n profiles.filter((profile: ProfileModel) => delete profile.interests);\r\n return profiles;\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the selected profiles: ${ids.join(\",\")} `, e);\r\n throw e;\r\n }\r\n }\r\n };\r\n\r\n public getById = async (id: string): Promise<ProfileModel> => {\r\n if (this.isBrowser) {\r\n const profile = this.localStorage.getProfileById(id);\r\n\r\n if (profile) {\r\n return profile;\r\n } else {\r\n try {\r\n const responseProfile = await this.https.getProfile(id);\r\n this.localStorage.addProfile(responseProfile);\r\n return responseProfile\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the selected profile: ${id} `, e);\r\n throw e;\r\n }\r\n }\r\n } else {\r\n try {\r\n return await this.https.getProfile(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the selected profile: ${id} `, e);\r\n throw e;\r\n }\r\n }\r\n };\r\n\r\n public getCountries = async (): Promise<ProfileCountryModel[]> => {\r\n if (this.isBrowser) {\r\n const countries = this.localStorage.getProfileCountries();\r\n\r\n if (countries && countries.length > 0) {\r\n return countries;\r\n } else {\r\n try {\r\n const profileCountries = await this.https.getCountries();\r\n this.localStorage.setProfileCountries(profileCountries);\r\n return profileCountries;\r\n } catch (e) {\r\n console.warn('There was a problem retrieving profile countries: ', e);\r\n throw e;\r\n }\r\n }\r\n } else {\r\n try {\r\n return await this.https.getCountries();\r\n } catch (e) {\r\n console.warn('There was a problem retrieving profile countries: ', e);\r\n throw e;\r\n }\r\n }\r\n };\r\n\r\n public getFollowers = async (filters?: FollowFilters, id?: string): Promise<FollowersModel[]> => {\r\n try {\r\n return await this.https.getFollowers(filters, id);\r\n } catch (e) {\r\n console.warn('There was a problem retrieving your followers: ', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getFollowing = async (filters?: FollowFilters, id?: string): Promise<FollowingModel[]> => {\r\n try {\r\n return await this.https.getFollowing(filters, id);\r\n } catch (e) {\r\n console.warn('There was a problem retrieving your following profiles: ', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public follow = async (ids: string[]) => {\r\n try {\r\n return await this.https.follow(ids);\r\n } catch (e) {\r\n console.warn(`There was a problem following profiles: ${ids.join(\",\")} `, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public unfollow = async (ids: string[]) => {\r\n try {\r\n return await this.https.unfollow(ids);\r\n } catch (e) {\r\n console.warn(`There was a problem unfollowing profiles: ${ids.join(\",\")} `, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public showFullnessProfile = (profile: ProfileModel): FullnessProfile => {\r\n let fullnessProfile = new FullnessProfile();\r\n let totalPercentage: number = 0;\r\n\r\n if (profile.avatar) {\r\n fullnessProfile.breakdown.addedAvatar.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.addedAvatar.percentage;\r\n }\r\n\r\n if (profile.birthDate) {\r\n fullnessProfile.breakdown.addedBirthdate.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.addedBirthdate.percentage;\r\n }\r\n\r\n if (profile.country) {\r\n fullnessProfile.breakdown.addedCountry.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.addedCountry.percentage;\r\n }\r\n\r\n if (profile.gender) {\r\n fullnessProfile.breakdown.addedGender.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.addedGender.percentage;\r\n }\r\n\r\n if (profile.interests && profile.interests.length > 0) {\r\n const favouritedTeam = profile.interests.find((interest: InterestModel) => interest.type === \"team\" && interest.favourite);\r\n if (favouritedTeam) {\r\n fullnessProfile.breakdown.teamFavourite.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.teamFavourite.percentage;\r\n }\r\n\r\n const followedTeam = profile.interests.find((interest: InterestModel) => interest.type === \"team\");\r\n if (followedTeam) {\r\n fullnessProfile.breakdown.teamFollowed.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.teamFollowed.percentage;\r\n }\r\n\r\n const favouritedPlayer = profile.interests.find((interest: InterestModel) => interest.type === \"player\" && interest.favourite);\r\n if (favouritedPlayer) {\r\n fullnessProfile.breakdown.playerFavourite.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.playerFavourite.percentage;\r\n }\r\n\r\n const followedPlayer = profile.interests.find((interest: InterestModel) => interest.type === \"player\");\r\n if (followedPlayer) {\r\n fullnessProfile.breakdown.playerFollowed.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.playerFollowed.percentage;\r\n }\r\n\r\n const favouriteCompetition = profile.interests.find((interest: InterestModel) => interest.type === \"competition\" && interest.favourite);\r\n if (favouriteCompetition) {\r\n fullnessProfile.breakdown.competitionFavourite.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.competitionFavourite.percentage;\r\n }\r\n\r\n const followedCompetition = profile.interests.find((interest: InterestModel) => interest.type === \"competition\");\r\n if (followedCompetition) {\r\n fullnessProfile.breakdown.competitionFollowed.completed = true;\r\n totalPercentage += fullnessProfile.breakdown.competitionFollowed.percentage;\r\n }\r\n\r\n }\r\n\r\n fullnessProfile.totalPercentage = totalPercentage;\r\n\r\n return fullnessProfile;\r\n }\r\n}\r\n", "export default class ProfileCountryModel {\n public id: string = null;\n public name: string = null;\n public assets: {} = null;\n}", "import LocalStorage from \"../../../Global/LocalStorage\";\r\nimport FootballHttps from \"../../../Https/FootballHttps\";\r\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\r\nimport FootballCountryModel from \"../Models/Country/FootballCountryModel\"\r\n\r\nexport default class CountriesFacade {\r\n readonly isBrowser:boolean = false;\r\n readonly localStorage: LocalStorage = {} as LocalStorage;\r\n readonly https: FootballHttps = null;\r\n readonly idMapping: IdMappingService = null;\r\n\r\n constructor(localStorage: LocalStorage, https: FootballHttps, idMapping: IdMappingService) {\r\n this.isBrowser = typeof window !== 'undefined';\r\n this.localStorage = localStorage;\r\n this.idMapping = idMapping;\r\n this.https = https;\r\n }\r\n\r\n public getCountriesWithIdMapping = async (): Promise<FootballCountryModel[]> => {\r\n try {\r\n const countries = await this.getCountries();\r\n return this.idMapping.remapEntities(countries, 'country')\r\n } catch (e) {\r\n console.warn('There was a problem browsing countries as football entities', e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getCountries = async (): Promise<FootballCountryModel[]> => {\r\n if (this.isBrowser) {\r\n const countries = this.localStorage.getFootballCountries();\r\n if (countries && countries.length > 0) {\r\n return countries;\r\n } else {\r\n try {\r\n const footballCountries = await this.https.getCountries();\r\n this.localStorage.setFootballCountries(footballCountries);\r\n return footballCountries;\r\n } catch (e) {\r\n console.warn('There was a problem retrieving countries as football entities', e);\r\n throw e;\r\n }\r\n }\r\n } else {\r\n return this.https.getCountries();\r\n }\r\n };\r\n}\r\n", "import CompetitionBasicModel from \"./CompetitionBasicModel\";\n\nexport default class CompetitionFilters {\n public countryId: string = null;\n public name: string = null;\n public gender: string = null;\n public type: string = null;\n public sortField: string = null;\n public sortOrder: string = null;\n public competitionIds: string[] = null;\n\n constructor(filters: any) {\n this.countryId = filters.countryId ? `${filters.countryId}` : null;\n this.name = filters.name ? filters.name : null;\n this.gender = filters.gender ? filters.gender : null;\n this.type = filters.type ? filters.type : null;\n this.sortField = filters.sortField ? `${filters.sortField}` : null;\n this.sortOrder = filters.sortOrder ? `${filters.sortOrder}` : null;\n this.competitionIds = filters.competitionIds ? filters.competitionIds : null;\n }\n\n public constructFilterUrl = () => {\n let url = '';\n if (this.countryId) {\n url = url + '&';\n url = url + `country_id=${this.countryId}`;\n }\n if (this.gender) {\n url = url + '&';\n url = url + `gender=${this.gender}`;\n }\n if (this.type) {\n url = url + '&';\n url = url + `type=${this.type}`;\n }\n if (this.sortField) {\n url = url + '&';\n url = url + `sort_field=${this.sortField}`;\n }\n if (this.sortOrder) {\n url = url + '&';\n url = url + `sort_order=${this.sortOrder}`;\n }\n if (this.name) {\n url = url + '&';\n url = url + `name=${this.name}`;\n }\n if (this.competitionIds) {\n url = url + '&';\n url = url + `competition_ids=${this.competitionIds.join(\",\")}`;\n }\n\n return url;\n };\n\n public competitionSearchFilter = (competitions: CompetitionBasicModel[]) => {\n try {\n const filteredCompetitions = this.filter(competitions);\n if (this.sortField || this.sortOrder) {\n const sortedCompetitions = this.sort(filteredCompetitions);\n return sortedCompetitions;\n }\n return filteredCompetitions;\n } catch (e) {\n console.warn('There was a problem filtering the local competitions', e);\n return [];\n }\n\n };\n\n private filter = (competitions: CompetitionBasicModel[]) => {\n const entitiesToSearchWith = this.entitiesToSearchWith();\n\n return competitions.filter((competition: CompetitionBasicModel) => {\n let isTruthy = true;\n entitiesToSearchWith.forEach((searchEntity: string) => {\n if (searchEntity !== 'sortOrder' && searchEntity !== 'sortField') {\n if (searchEntity === 'countryId') {\n isTruthy &&= competition.country.id === this[searchEntity];\n } else if (searchEntity === 'name') {\n isTruthy &&= competition.name.toLocaleLowerCase().includes(this[searchEntity].toLocaleLowerCase());\n } else if (searchEntity === \"competitionIds\") {\n isTruthy &&= this[searchEntity].some(id => competition.id === id);\n } else {\n //@ts-ignore\n isTruthy &&= competition[searchEntity].toLocaleLowerCase() === this[searchEntity].toLocaleLowerCase();\n }\n }\n });\n return isTruthy;\n });\n };\n\n private entitiesToSearchWith = () => {\n const entitiesToSearchWith = [];\n\n if (this.countryId) {\n entitiesToSearchWith.push('countryId');\n }\n if (this.name) {\n entitiesToSearchWith.push('name');\n }\n if (this.gender) {\n entitiesToSearchWith.push('gender');\n }\n if (this.type) {\n entitiesToSearchWith.push('type');\n }\n if (this.sortField) {\n entitiesToSearchWith.push(\"sortField\");\n }\n if (this.sortOrder) {\n entitiesToSearchWith.push(\"sortOrder\");\n }\n if (this.competitionIds) {\n entitiesToSearchWith.push(\"competitionIds\")\n }\n \n return entitiesToSearchWith;\n };\n\n private sort = (competitions: CompetitionBasicModel[]) => {\n let sortedCompetitions: any[] = [];\n \n if (this.sortField === \"name\") {\n sortedCompetitions = competitions.sort((a, b) => {\n if (this.sortOrder && this.sortOrder === \"desc\") {\n return b.name.localeCompare(a.name);\n } else {\n return a.name.localeCompare(b.name);\n }\n });\n } else if (this.sortField === \"countryId\") {\n sortedCompetitions = competitions.sort((a, b) => {\n if (this.sortOrder && this.sortOrder === \"desc\") {\n return b.country.id.localeCompare(a.country.id);\n } else {\n return a.country.id.localeCompare(b.country.id);\n }\n });\n } else if (this.sortField === \"scope\") {\n competitions.forEach((competition: CompetitionBasicModel) => {\n return sortedCompetitions[this.competitionIds.indexOf(competition.id)] = competition;\n });\n } else if (!this.sortField && this.sortOrder === \"desc\") {\n sortedCompetitions = competitions.sort((a, b) => {\n return b.id.localeCompare(a.id);\n });\n }\n\n return sortedCompetitions;\n }\n}", "import LocalStorage from \"../../../Global/LocalStorage\";\r\nimport FootballHttps from \"../../../Https/FootballHttps\";\r\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\r\nimport CompetitionBasicModel from \"../Models/Competition/CompetitionBasicModel\";\r\nimport CompetitionFullModel from \"../Models/Competition/CompetitionFullModel\";\r\nimport CompetitionFilters from \"../Models/Competition/CompetitionFilters\";\r\n\r\nexport default class CompetitionsFacade {\r\n readonly isBrowser:boolean = false;\r\n readonly localStorage: LocalStorage = {} as LocalStorage;\r\n readonly https: FootballHttps = null;\r\n readonly idMapping: IdMappingService = null;\r\n\r\n constructor(localStorage: LocalStorage, https: FootballHttps, idMapping: IdMappingService) {\r\n this.isBrowser = typeof window !== 'undefined';\r\n this.localStorage = localStorage;\r\n this.idMapping = idMapping;\r\n this.https = https;\r\n }\r\n\r\n\r\n public getCompetitionsIdMapping = async (filters?: CompetitionFilters): Promise<CompetitionBasicModel[]> => {\r\n try {\r\n let isEmpty = false;\r\n if (filters) {\r\n filters = new CompetitionFilters(filters);\r\n if (filters.countryId) {\r\n const countryId = await this.idMapping.getEntityIdsBySchemaId([`${filters.countryId}`], \"country\", \"native\");\r\n if (countryId.country.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.countryId = countryId.country[0];\r\n }\r\n if (filters.competitionIds) {\r\n const competitionId = await this.idMapping.getEntityIdsBySchemaId(filters.competitionIds, \"competition\", \"native\");\r\n if (competitionId.competition.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.competitionIds = competitionId.competition;\r\n }\r\n if (isEmpty) {\r\n return [];\r\n }\r\n }\r\n\r\n const competitions = await this.getCompetitions(filters);\r\n return await this.idMapping.remapEntities(competitions, 'competition');\r\n } catch (e) {\r\n console.warn('There was a problem browsing all of the competitions', e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getCompetitions = async (filters?: CompetitionFilters): Promise<CompetitionBasicModel[]> => {\r\n if (this.isBrowser) {\r\n const competitions = this.localStorage.getCompetitions(filters);\r\n if (competitions && competitions.length > 0) {\r\n return competitions;\r\n } else {\r\n try {\r\n const competitions = await this.https.getCompetitions(filters);\r\n this.localStorage.setCompetitions(competitions);\r\n return this.localStorage.getCompetitions(filters);\r\n } catch (e: any) {\r\n console.warn('There was a problem retrieving all competitions', e);\r\n throw e;\r\n }\r\n }\r\n } else {\r\n return this.https.getCompetitions(filters);\r\n }\r\n };\r\n\r\n public getCompetitionByIdIdMapping = async (id: string): Promise<CompetitionFullModel> => {\r\n try {\r\n const idObj = await this.idMapping.getEntityIdsBySchemaId([id], \"competition\", \"native\");\r\n const nativeId = idObj.competition[0];\r\n const competition = await this.getCompetitionById(nativeId);\r\n return await this.idMapping.remapEntities(competition, 'competition');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing the following competition:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getCompetitionById = async (id: string): Promise<CompetitionFullModel> => {\r\n try {\r\n return await this.https.getCompetitionById(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the competition with the following id: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTopCompetitionsIdMapping = async (): Promise<CompetitionBasicModel[]> => {\r\n try {\r\n const topCompetitions = await this.getTopCompetitions();\r\n return await this.idMapping.remapEntities(topCompetitions, 'competition');\r\n } catch (e) {\r\n console.warn('There was a problem browsing the top competitions', e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getTopCompetitions = async (): Promise<CompetitionBasicModel[]> => {\r\n try {\r\n return await this.https.getTopCompetitions();\r\n } catch (e) {\r\n console.warn('There was a problem retrieving the top competitions', e);\r\n throw e;\r\n }\r\n };\r\n}\r\n", "export default class TeamFilters {\n public name: string = null;\n public countryId: string = null;\n public national: boolean = false;\n public gender: string = null;\n public limit: number = null;\n public page: number = null;\n public scope: string[] = null;\n public sortField: string = null;\n public sortOrder: string = null;\n public teamIds: string[] = null;\n\n constructor(filters: any) {\n this.name = filters.name ? filters.name : null;\n this.countryId = filters.countryId ? `${filters.countryId}` : null;\n this.national = filters.national ? filters.national : false;\n this.gender = filters.gender ? filters.gender : null;\n this.limit = filters.limit ? filters.limit : null;\n this.page = filters.page ? filters.page : null;\n this.scope = filters.scope ? filters.scope : null;\n this.sortField = filters.sortField ? `${filters.sortField}` : null;\n this.sortOrder = filters.sortOrder ? `${filters.sortOrder}` : null;\n this.teamIds = filters.teamIds ? filters.teamIds : null;\n }\n\n public constructFilterUrl = () => {\n let url = '';\n if (this.name) {\n url = url + '&';\n url = url + `name=${this.name}`;\n }\n if (this.countryId) {\n url = url + '&';\n url = url + `country_id=${this.countryId}`;\n }\n if (this.national) {\n url = url + '&';\n url = url + `national=${this.national}`;\n }\n if (this.gender) {\n url = url + '&';\n url = url + `gender=${this.gender}`;\n }\n if (this.limit) {\n url = url + '&';\n url = url + `limit=${this.limit}`;\n }\n if (this.scope) {\n url = url + '&';\n url = url + `scope=${this.scope.join(\",\")}`;\n }\n if (this.page) {\n url = url + '&';\n url = url + `page=${this.page}`;\n }\n if (this.sortField) {\n url = url + '&';\n url = url + `sort_field=${this.sortField}`;\n }\n if (this.sortOrder) {\n url = url + '&';\n url = url + `sort_order=${this.sortOrder}`;\n }\n if (this.teamIds) {\n url = url + '&';\n url = url + `team_ids=${this.teamIds.join(\",\")}`;\n }\n\n return url;\n };\n\n}", "import FootballHttps from \"../../../Https/FootballHttps\";\r\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\r\nimport TeamBasicModel from \"../Models/Team/TeamBasicModel\";\r\nimport TeamFullModel from \"../Models/Team/TeamFullModel\";\r\nimport MatchFullModel from \"../Models/Match/MatchFullModel\";\r\nimport TeamFilters from \"../Models/Team/TeamFilters\";\r\n\r\nexport default class TeamsFacade {\r\n readonly https: FootballHttps = null;\r\n readonly idMapping: IdMappingService = null;\r\n\r\n constructor(https: FootballHttps, idMapping: IdMappingService) {\r\n this.idMapping = idMapping;\r\n this.https = https;\r\n }\r\n\r\n public getTeamsIdMapping = async (filters?: TeamFilters): Promise<TeamBasicModel[]> => {\r\n try {\r\n let isEmpty = false;\r\n if (filters) {\r\n filters = new TeamFilters(filters);\r\n if (filters.countryId) {\r\n const countryId = await this.idMapping.getEntityIdsBySchemaId([`${filters.countryId}`], \"country\", \"native\");\r\n if (countryId.country.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.countryId = countryId.country[0];\r\n }\r\n if (filters.scope) {\r\n const competitionIds = await this.idMapping.getEntityIdsBySchemaId(filters.scope, \"competition\", \"native\");\r\n if (competitionIds.competition.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.scope = competitionIds.competition;\r\n }\r\n if (filters.teamIds) {\r\n const teamIds = await this.idMapping.getEntityIdsBySchemaId(filters.teamIds, \"team\", \"native\");\r\n if (teamIds.team.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.teamIds = teamIds.team;\r\n }\r\n }\r\n if (isEmpty) {\r\n return [];\r\n }\r\n const teams = await this.getTeams(filters);\r\n return await this.idMapping.remapEntities(teams, 'team');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing all teams`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getTeams = async (filters?: TeamFilters): Promise<TeamBasicModel[]> => {\r\n try {\r\n return await this.https.getTeams(filters);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving all teams`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTeamByIdIdMapping = async (id: string): Promise<TeamFullModel> => {\r\n try {\r\n const nativeId = await this.idMapping.getEntityIdsBySchemaId([id], 'team', 'native');\r\n id = nativeId['team'][0];\r\n const team = await this.getTeamById(id);\r\n return await this.idMapping.remapEntities(team, 'team');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing the following team:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getTeamById = async (id: string): Promise<TeamFullModel> => {\r\n try {\r\n return await this.https.getTeamById(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the following team: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTopTeamsIdMapping = async (): Promise<TeamBasicModel[]> => {\r\n try {\r\n const topTeams = await this.getTopTeams();\r\n return await this.idMapping.remapEntities(topTeams, 'team');\r\n } catch (e) {\r\n console.warn('There was a problem browsing the top teams', e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getTopTeams = async (): Promise<TeamBasicModel[]> => {\r\n try {\r\n return await this.https.getTopTeams();\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the top teams`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getNextMatchForTeamIdMapping = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const nativeId = await this.idMapping.getEntityIdsBySchemaId([id], 'team', 'native');\r\n id = nativeId['team'][0];\r\n const match = await this.getNextMatchForTeam(id);\r\n return await this.idMapping.remapEntities(match, 'match');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing the next match for the following team:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getNextMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n return await this.https.getNextMatchForTeam(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the next match for the following team: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getPrevMatchForTeamIdMapping = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const nativeId = await this.idMapping.getEntityIdsBySchemaId([id], 'team', 'native');\r\n id = nativeId['team'][0];\r\n const match = await this.getPrevMatchForTeam(id);\r\n return await this.idMapping.remapEntities(match, 'match');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing the previous match for the following team:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getPrevMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n return await this.https.getPrevMatchForTeam(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the previous match for the following team: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n}\r\n", "export default class PlayerFilters {\n public countryId: string = null;\n public scope: string[] = null;\n public name: string = null;\n public playerIds: string[] = null;\n public limit: number = null;\n public page: number = null;\n public sortField: string = null;\n public sortOrder: string = null;\n\n constructor(filters: any) {\n this.countryId = filters.countryId ? filters.countryId : null;\n this.scope = filters.scope ? filters.scope : null;\n this.name = filters.name ? filters.name : null;\n this.playerIds = filters.playerIds ? filters.playerIds : null;\n this.limit = filters.limit ? filters.limit : null;\n this.page = filters.page ? filters.page : null;\n this.sortField = filters.sortField ? filters.sortField : null;\n this.sortOrder = filters.sortOrder ? filters.sortOrder : null;\n }\n\n public constructFilterUrl = () => {\n let url = '';\n if (this.countryId) {\n url = url + '&';\n url = url + `country_id=${this.countryId}`;\n }\n if (this.scope) {\n url = url + '&';\n url = url + `scope=${this.scope.join(\",\")}`;\n }\n if (this.name) {\n url = url + '&';\n url = url + `name=${this.name}`;\n }\n if (this.playerIds) {\n url = url + '&';\n url = url + `player_ids=${this.playerIds.join(\",\")}`;\n }\n if (this.limit) {\n url = url + \"&\";\n url = url + `limit=${this.limit}`;\n }\n if (this.page) {\n url = url + \"&\";\n url = url + `page=${this.page}`;\n }\n if (this.sortField) {\n url = url + \"&\";\n url = url + `sort_field=${this.sortField}`;\n }\n if (this.sortOrder) {\n url = url + \"&\";\n url = url + `sort_order=${this.sortOrder}`;\n }\n\n return url;\n };\n\n}", "import FootballHttps from \"../../../Https/FootballHttps\";\r\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\r\nimport TopPlayerModel from \"../Models/Player/TopPlayerModel\";\r\nimport PlayerBasicModel from \"../Models/Player/PlayerBasicModel\";\r\nimport PlayerFullModel from \"../Models/Player/PlayerFullModel\";\r\nimport MatchFullModel from \"../Models/Match/MatchFullModel\";\r\nimport PlayerFilters from \"../Models/Player/PlayerFilters\";\r\n\r\nexport default class PlayerFacade {\r\n readonly https: FootballHttps = null;\r\n readonly idMapping: IdMappingService = null;\r\n\r\n constructor(https: FootballHttps, idMapping: IdMappingService) {\r\n this.idMapping = idMapping;\r\n this.https = https;\r\n }\r\n\r\n public getPlayersIdMapping = async (filters?: PlayerFilters): Promise<PlayerBasicModel[]> => {\r\n try {\r\n let isEmpty = false\r\n if (filters) {\r\n filters = new PlayerFilters(filters);\r\n if (filters.countryId) {\r\n const countryId = await this.idMapping.getEntityIdsBySchemaId([filters.countryId], 'country', 'native');\r\n if (countryId.country.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.countryId = countryId.country[0];\r\n }\r\n if (filters.playerIds) {\r\n const playerIds = await this.idMapping.getEntityIdsBySchemaId(filters.playerIds, 'player', 'native');\r\n if (playerIds.player.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.playerIds = playerIds.player;\r\n }\r\n if (filters.scope) {\r\n const competitionIds = await this.idMapping.getEntityIdsBySchemaId(filters.scope, 'competition', 'native');\r\n if (competitionIds.competition.length === 0) {\r\n isEmpty = true;\r\n }\r\n filters.scope = competitionIds.competition;\r\n }\r\n if (isEmpty) {\r\n return [];\r\n }\r\n }\r\n const players = await this.getPlayers(filters);\r\n return await this.idMapping.remapEntities(players, 'player');\r\n } catch (e) {\r\n console.warn('There was a problem browsing the players', e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getPlayers = async (filters?: PlayerFilters): Promise<PlayerBasicModel[]> => {\r\n try {\r\n return await this.https.getPlayers(filters);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the players`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getPlayerIdMapping = async (id: string): Promise<PlayerFullModel> => {\r\n try {\r\n const nativeId = await this.idMapping.getEntityIdsBySchemaId([id], 'player', 'native');\r\n const player = await this.getPlayerById(nativeId.player[0]);\r\n return await this.idMapping.remapEntities(player, 'player');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing the following player:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getPlayerById = async (id: string): Promise<PlayerFullModel> => {\r\n try {\r\n return await this.https.getPlayerById(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the following player: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTopPlayersIdMapping = async (): Promise<TopPlayerModel[]> => {\r\n try {\r\n const topPlayers = await this.getTopPlayers();\r\n return await this.idMapping.remapEntities(topPlayers, 'player');\r\n } catch (e) {\r\n console.warn('There was a problem browsing the top players', e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getTopPlayers = async (): Promise<TopPlayerModel[]> => {\r\n try {\r\n return await this.https.getTopPlayers();\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the top players`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getNextMatchForPlayerIdMapping = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const nativeId = await this.idMapping.getEntityIdsBySchemaId([id], 'player', 'native');\r\n id = nativeId['player'][0];\r\n const match = await this.getNextMatchForPlayer(id);\r\n return await this.idMapping.remapEntities(match, 'match');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing the next match for player:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getNextMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n return await this.https.getNextMatchForPlayer(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the next match for player: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getPrevMatchForPlayerIdMapping = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const nativeId = await this.idMapping.getEntityIdsBySchemaId([id], 'player', 'native');\r\n id = nativeId['player'][0];\r\n const match = await this.getPrevMatchForPlayer(id);\r\n return await this.idMapping.remapEntities(match, 'match');\r\n } catch (e) {\r\n console.warn(`There was a problem browsing the previous match for player:${id}`, e);\r\n throw e;\r\n }\r\n };\r\n\r\n private getPrevMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n return await this.https.getPrevMatchForPlayer(id);\r\n } catch (e) {\r\n console.warn(`There was a problem retrieving the previous match for player: ${id}`, e);\r\n throw e;\r\n }\r\n };\r\n}", "export default class MatchFilters {\n public countryIds: string[] = null;\n public competitionIds: string[] = null;\n public matchIds: string[] = null;\n public status: string = null;\n public teamIds: string[] = null;\n public fromDate: string = null;\n public toDate: string = null;\n public limit: number = null;\n public page: number = null;\n public sortField: string = null;\n public sortOrder: string = null;\n\n constructor(filters: any) {\n this.countryIds = filters.countryIds ? filters.countryIds : null;\n this.competitionIds = filters.competitionIds ? filters.competitionIds : null;\n this.matchIds = filters.matchIds ? filters.matchIds : null;\n this.status = filters.status ? filters.status : null;\n this.teamIds = filters.teamIds ? filters.teamIds : null;\n this.fromDate = filters.fromDate ? filters.fromDate : null;\n this.toDate = filters.toDate ? filters.toDate : null;\n this.limit = filters.limit ? filters.limit : null;\n this.page = filters.page ? filters.page : null;\n this.sortField = filters.sortField ? filters.sortField : null;\n this.sortOrder = filters.sortOrder ? filters.sortOrder : null;\n }\n\n public constructFilterUrl = () => {\n let url = '';\n if (this.countryIds) {\n url = url + '&';\n url = url + `countries=${this.countryIds.join(\",\")}`;\n }\n if (this.competitionIds) {\n url = url + '&';\n url = url + `competitions=${this.competitionIds.join(\",\")}`;\n }\n if (this.matchIds) {\n url = url + '&';\n url = url + `matches=${this.matchIds.join(\",\")}`;\n }\n if (this.status) {\n url = url + '&';\n url = url + `status=${this.status}`;\n }\n if (this.teamIds) {\n url = url + '&';\n url = url + `teams=${this.teamIds.join(\",\")}`;\n }\n if (this.fromDate) {\n url = url + '&';\n url = url + `from_date=${this.fromDate}`;\n }\n if (this.toDate) {\n url = url + '&';\n url = url + `to_date=${this.toDate}`;\n }\n if (this.limit) {\n url = url + \"&\";\n url = url + `limit=${this.limit}`;\n }\n if (this.page) {\n url = url + \"&\";\n url = url + `page=${this.page}`;\n }\n if (this.sortField) {\n url = url + \"&\";\n url = url + `sort_field=${this.sortField}`;\n }\n if (this.sortOrder) {\n url = url + \"&\";\n url = url + `sort_order=${this.sortOrder}`;\n }\n\n return url;\n };\n\n}", "import FootballHttps from \"../../../Https/FootballHttps\";\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\nimport MatchBasicModel from \"../Models/Match/MatchBasicModel\";\nimport MatchFilters from \"../Models/Match/MatchFilters\";\nimport MatchFullModel from \"../Models/Match/MatchFullModel\";\n\nexport default class MatchFacade {\n readonly https: FootballHttps = null;\n readonly idMapping: IdMappingService = null;\n\n constructor(https: FootballHttps, idMapping: IdMappingService) {\n this.https = https;\n this.idMapping = idMapping;\n };\n\n public getMatchesIdMapping = async (filters?: MatchFilters): Promise<MatchBasicModel[]> => {\n try {\n if (filters) {\n filters = new MatchFilters(filters);\n if (filters.countryIds) {\n const countryIds = await this.idMapping.getEntityIdsBySchemaId(filters.countryIds, \"country\", \"native\");\n filters.countryIds = countryIds.country;\n }\n if (filters.competitionIds) {\n const competitionIds = await this.idMapping.getEntityIdsBySchemaId(filters.competitionIds, \"competition\", \"native\");\n filters.competitionIds = competitionIds.competition;\n }\n if (filters.matchIds) {\n const matchIds = await this.idMapping.getEntityIdsBySchemaId(filters.matchIds, \"match\", \"native\");\n filters.matchIds = matchIds.match;\n }\n if (filters.teamIds) {\n const teamIds = await this.idMapping.getEntityIdsBySchemaId(filters.teamIds, \"team\", \"native\");\n filters.teamIds = teamIds.team;\n }\n }\n const matches = await this.getMatches(filters);\n return await this.idMapping.remapEntities(matches, \"match\");\n } catch (e) {\n console.warn(`There was a problem browsing the matches`, e);\n throw e;\n }\n };\n\n private getMatches = async (filters?: MatchFilters): Promise<MatchBasicModel[]> => {\n try {\n return await this.https.getMatches(filters);\n } catch (e) {\n console.warn(`There was a problem retrieving the matches`, e);\n throw e;\n }\n };\n\n public getMatchIdMapping = async (id: string): Promise<MatchFullModel> => {\n try {\n const nativeId = await this.idMapping.getEntityIdsBySchemaId([id], \"match\", \"native\");\n const match = await this.getMatchById(nativeId.match[0]);\n return await this.idMapping.remapEntities(match, \"match\");\n } catch (e) {\n console.warn(`There was a problem browsing the following match: ${id}`, e);\n throw e;\n }\n };\n\n private getMatchById = async (id: string): Promise<MatchFullModel> => {\n try {\n return await this.https.getMatchById(id);\n } catch (e) {\n console.warn(`There was a problem retrieving the following match: ${id}`, e);\n throw e;\n }\n };\n}", "export default class SearchFilters {\n public entities: string[] = null;\n public query: string = null;\n public scope: string[] = null;\n \n constructor(filters: any) {\n this.entities = filters.entities ? filters.entities : null;\n this.query = filters.query ? filters.query : null;\n this.scope = filters.scope ? filters.scope : null;\n }\n\n public constructFilterUrl = () => {\n let url = '';\n if (this.entities) {\n url = url + '&';\n url = url + `entities=${this.entities.join(\",\")}`;\n }\n if (this.query) {\n url = url + '&';\n url = url + `q=${this.query}`;\n }\n if (this.scope) {\n url = url + '&';\n url = url + `scope=${this.scope.join(\",\")}`;\n }\n\n return url;\n };\n\n}", "import FootballHttps from \"../../../Https/FootballHttps\";\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\nimport SearchModel from \"../Models/Search/SearchModel\";\nimport SearchFilters from \"../Models/Search/SearchFilters\";\n\nexport default class SearchFacade {\n readonly https: FootballHttps = null;\n readonly idMapping: IdMappingService = null;\n\n constructor(https: FootballHttps, idMapping: IdMappingService) {\n this.https = https;\n this.idMapping = idMapping;\n };\n\n public searchIdMapping = async (filters: SearchFilters): Promise<SearchModel> => {\n try {\n filters = new SearchFilters(filters);\n if (filters.scope) {\n const competitionIds = await this.idMapping.getEntityIdsBySchemaId(filters.scope, \"competition\", \"native\");\n filters.scope = competitionIds.competition;\n }\n const searchResult = await this.search(filters);\n if (searchResult.teams && searchResult.teams.length > 0) {\n const teams = await this.idMapping.remapEntities(searchResult.teams, \"team\");\n searchResult.teams = teams;\n }\n if (searchResult.players && searchResult.players.length > 0) {\n const players = await this.idMapping.remapEntities(searchResult.players, \"player\");\n searchResult.players = players;\n }\n if (searchResult.competitions && searchResult.competitions.length > 0) {\n const competitions = await this.idMapping.remapEntities(searchResult.competitions, \"competition\");\n searchResult.competitions = competitions;\n }\n\n return searchResult;\n\n } catch (e) {\n console.warn(`There was a problem with browsing the search result`, e);\n throw e;\n }\n };\n\n private search = async (filters: SearchFilters): Promise<SearchModel> => {\n try {\n return await this.https.search(filters);\n } catch (e) {\n console.warn(`There was a problem retrieving the search response`, e);\n throw e;\n }\n };\n\n}", "import LocalStorage from \"../../../Global/LocalStorage\";\r\nimport FootballHttps from \"../../../Https/FootballHttps\";\r\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\r\nimport CountriesFacade from \"./CountriesFacade\";\r\nimport CompetitionsFacade from \"./CompetitionsFacade\";\r\nimport TeamsFacade from \"./TeamsFacade\";\r\nimport TeamBasicModel from \"../Models/Team/TeamBasicModel\";\r\nimport TeamFullModel from \"../Models/Team/TeamFullModel\";\r\nimport CompetitionBasicModel from \"../Models/Competition/CompetitionBasicModel\";\r\nimport CompetitionFullModel from \"../Models/Competition/CompetitionFullModel\";\r\nimport FootballCountryModel from \"../Models/Country/FootballCountryModel\";\r\nimport MatchBasicModel from \"../Models/Match/MatchBasicModel\";\r\nimport MatchFullModel from \"../Models/Match/MatchFullModel\";\r\nimport PlayerFacade from \"./PlayerFacade\";\r\nimport TopPlayerModel from \"../Models/Player/TopPlayerModel\";\r\nimport PlayerBasicModel from \"../Models/Player/PlayerBasicModel\";\r\nimport PlayerFullModel from \"../Models/Player/PlayerFullModel\";\r\nimport SearchModel from \"../Models/Search/SearchModel\";\r\nimport MatchFacade from \"./MatchFacade\";\r\nimport SearchFacade from \"./SearchFacade\";\r\nimport CompetitionFilters from \"../Models/Competition/CompetitionFilters\";\r\nimport TeamFilters from \"../Models/Team/TeamFilters\";\r\nimport MatchFilters from \"../Models/Match/MatchFilters\";\r\nimport PlayerFilters from \"../Models/Player/PlayerFilters\";\r\nimport SearchFilters from \"../Models/Search/SearchFilters\";\r\n\r\nexport default class FootballFacade {\r\n readonly isBrowser:boolean = false;\r\n readonly localStorage: LocalStorage = {} as LocalStorage;\r\n readonly https: FootballHttps = null;\r\n readonly idMapping: IdMappingService = null;\r\n readonly countriesFacade: CountriesFacade = null;\r\n readonly competitionsFacade: CompetitionsFacade = null;\r\n readonly teamsFacade: TeamsFacade = null;\r\n readonly playerFacade: PlayerFacade = null;\r\n readonly matchFacade: MatchFacade = null;\r\n readonly searchFacade: SearchFacade = null;\r\n\r\n constructor(localStorage: LocalStorage, https: FootballHttps, idMapping: IdMappingService) {\r\n this.isBrowser = typeof window !== 'undefined';\r\n this.localStorage = localStorage;\r\n this.idMapping = idMapping;\r\n this.https = https;\r\n this.countriesFacade = new CountriesFacade(localStorage, https, idMapping);\r\n this.competitionsFacade = new CompetitionsFacade(localStorage, https, idMapping);\r\n this.teamsFacade = new TeamsFacade(https, idMapping);\r\n this.playerFacade = new PlayerFacade(https, idMapping);\r\n this.matchFacade = new MatchFacade(https, idMapping);\r\n this.searchFacade = new SearchFacade(https, idMapping);\r\n }\r\n\r\n public getCountries = async (): Promise<FootballCountryModel[]> => {\r\n return this.countriesFacade.getCountriesWithIdMapping();\r\n };\r\n\r\n public getCompetitions = async (filters?: CompetitionFilters): Promise<CompetitionBasicModel[]> => {\r\n return this.competitionsFacade.getCompetitionsIdMapping(filters);\r\n };\r\n\r\n public getCompetitionById = async (id: string): Promise<CompetitionFullModel> => {\r\n return this.competitionsFacade.getCompetitionByIdIdMapping(id);\r\n };\r\n\r\n public getTopCompetitions = async (): Promise<CompetitionBasicModel[]> => {\r\n return this.competitionsFacade.getTopCompetitionsIdMapping();\r\n };\r\n\r\n public getTeams = async (filters?: TeamFilters): Promise<TeamBasicModel[]> => {\r\n return this.teamsFacade.getTeamsIdMapping(filters);\r\n };\r\n\r\n public getTeamById = async (id: string): Promise<TeamFullModel> => {\r\n return this.teamsFacade.getTeamByIdIdMapping(id);\r\n };\r\n\r\n public getTopTeams = async (): Promise<TeamBasicModel[]> => {\r\n return this.teamsFacade.getTopTeamsIdMapping();\r\n };\r\n\r\n public getNextMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n return this.teamsFacade.getNextMatchForTeamIdMapping(id);\r\n };\r\n\r\n public getPrevMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n return this.teamsFacade.getPrevMatchForTeamIdMapping(id);\r\n };\r\n\r\n public getPlayers = async (filters?: PlayerFilters): Promise<PlayerBasicModel[]> => {\r\n return this.playerFacade.getPlayersIdMapping(filters);\r\n };\r\n\r\n public getPlayerById = async (id: string): Promise<PlayerFullModel> => {\r\n return this.playerFacade.getPlayerIdMapping(id);\r\n };\r\n\r\n public getTopPlayers = async (): Promise<TopPlayerModel[]> => {\r\n return this.playerFacade.getTopPlayersIdMapping();\r\n };\r\n\r\n public getNextMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n return this.playerFacade.getNextMatchForPlayerIdMapping(id);\r\n };\r\n\r\n public getPrevMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n return this.playerFacade.getPrevMatchForPlayerIdMapping(id);\r\n };\r\n\r\n public getMatches = async (filters?: MatchFilters): Promise<MatchBasicModel[]> => {\r\n return this.matchFacade.getMatchesIdMapping(filters);\r\n };\r\n\r\n public getMatchById = async (id: string): Promise<MatchFullModel> => {\r\n return this.matchFacade.getMatchIdMapping(id);\r\n };\r\n\r\n public search = async (filters: SearchFilters): Promise<SearchModel> => {\r\n return this.searchFacade.searchIdMapping(filters);\r\n }\r\n\r\n}\r\n", "import IdMappingService from \"../../../IdMapping/IdMappingService\";\nimport FootballFacade from \"../../Football/Facades/FootballFacade\";\nimport InterestModel from \"../Models/InterestModel\";\n\nexport default class InterestsService {\n readonly idMapping: IdMappingService = null;\n readonly footballFacade: FootballFacade = null;\n\n constructor(idMapping: IdMappingService, footballFacade: FootballFacade) {\n this.idMapping = idMapping;\n this.footballFacade = footballFacade;\n }\n\n /**\n * Initializing object objectIds with key type and value id from interests.\n * Passing that object to function getEntitiesByIds in IdMappingFacade.\n * For replacing the new ids there is a object interestsByType with key type and\n * value interests. The order in interestsByType is same as objectIds.\n * We aren't remapping any custom or native interests.\n * @param interests\n * @returns Remapped interests from native to idSchema.\n */\n\n private remapInterestsToIdSchema = async (interests: InterestModel[]): Promise<InterestModel[]> => {\n const idSchema = this.idMapping.idSchema;\n\n if (idSchema !== \"native\") {\n if (interests.length > 0) {\n let objectIds: any = {};\n let interestsByType: any = {};\n\n //Extracting interests ids -> {type: [ids]}\n interests.forEach((interest: InterestModel) => {\n if (!objectIds.hasOwnProperty(interest.type)) {\n objectIds[interest.type] = [];\n interestsByType[interest.type] = [];\n }\n objectIds[interest.type].push(interest.id);\n interestsByType[interest.type].push(interest);\n });\n\n // remapping ids\n const remappedIds = await this.idMapping.idMappingFacade.getEntitiesByIds(objectIds, \"native\", idSchema);\n\n // replacing new ids\n let remappedInterests: InterestModel[] = [];\n for (const [type, interestsType] of Object.entries(interestsByType)) {\n //@ts-ignore\n interestsType.forEach((interest: InterestModel, idx: number) => {\n interest.id = remappedIds[type][idx];\n remappedInterests.push(interest);\n });\n }\n return remappedInterests;\n } else {\n return interests;\n }\n } else {\n return interests;\n }\n\n };\n\n /**\n * Using id and type from @param interest to initialize object which we are passing\n * to @function getEntitiesByIds in @class IdMappingFacade.\n * We are using this function when we want to add or remove interest from our profile.\n * @param interest\n * @returns Remapped interest from idSchema to native.\n */\n\n public remapInterestToNative = async (interest: InterestModel): Promise<InterestModel> => {\n const idSchema = this.idMapping.idSchema;\n\n if (idSchema !== \"native\") {\n let objectId: any = {};\n let { id, type } = interest;\n\n objectId[type] = [id];\n const remappedIds = await this.idMapping.idMappingFacade.getEntitiesByIds(objectId, idSchema, \"native\");\n interest.id = remappedIds[type][0];\n\n return interest;\n }\n\n return interest;\n };\n\n /**\n * Extracting custom interests from list of interests in profile.\n * We are using this function when we want to show interests from profile.\n * @param interests\n * @returns Utilizing @function remapInterestsToIdSchema for remapping to idSchema.\n */\n\n public inquiryCustomInterests = async (interests: InterestModel[]): Promise<InterestModel[]> => {\n const customInterests = interests.filter((profileInterest: InterestModel) => profileInterest.source === \"custom\");\n\n if (customInterests && customInterests.length > 0) {\n const interestsToRemap = interests.filter((profileInterest: InterestModel) => profileInterest.source !== \"custom\");\n const remappedInterests = await this.remapInterestsToIdSchema(interestsToRemap);\n customInterests.forEach((customInterest: InterestModel) => remappedInterests.push(customInterest));\n\n return remappedInterests;\n }\n\n return await this.remapInterestsToIdSchema(interests);\n };\n\n /**\n * Using FootballFacade to get information for teams, players or competitions with remapped ids.\n * In case we have custom interest we don't remap the id. When the id for the entity is not remaped successfully or\n * is not found in Football API, the model is set to null.\n * @param interests\n * @returns Details for each interest in profile\n */\n\n public showFullInterests = async (interests: InterestModel[]) => {\n let fullInterests: any[] = [];\n\n for (const interest of interests) {\n\n if (interest.source !== \"custom\" && interest.source === \"football\") {\n let filterId: any = {};\n\n if (interest.type === \"team\") {\n filterId.teamIds = [interest.id];\n const team = await this.footballFacade.getTeams(filterId);\n //@ts-ignore\n interest.model = team[0];\n }\n if (interest.type === \"player\") {\n filterId.playerIds = [interest.id];\n const player = await this.footballFacade.getPlayers(filterId);\n //@ts-ignore\n interest.model = player[0];\n }\n if (interest.type === \"competition\") {\n filterId.competitionIds = [interest.id];\n const competition = await this.footballFacade.getCompetitions(filterId);\n //@ts-ignore\n interest.model = competition[0];\n }\n //@ts-ignore\n if (interest.model === undefined) {\n //@ts-ignore\n interest.model = null;\n }\n\n fullInterests.push(interest);\n } else {\n fullInterests.push(interest);\n }\n }\n\n return fullInterests;\n };\n\n}\n", "import LocalStorage from \"../../../Global/LocalStorage\";\nimport ProfileCountryModel from \"../Models/ProfileCountryModel\";\nimport FootballHttps from \"../../../Https/FootballHttps\";\nimport ProfileHttps from \"../../../Https/ProfileHttps\";\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\nimport FootballFacade from \"../../Football/Facades/FootballFacade\";\nimport ProfileFacade from \"../Facades/ProfileFacade\";\nimport InterestsService from \"../Interests/InterestsService\";\nimport FollowersModel from \"../Models/Followers/FollowersModel\";\nimport FollowingModel from \"../Models/Following/FollowingModel\";\nimport InterestModel from \"../Models/InterestModel\";\nimport ProfileModel from \"../Models/ProfileModel\";\nimport FullnessProfile from \"../Models/FullnessProfile/FullnessProfile\";\nimport FollowFilters from \"../Models/FollowFilters\";\n\nexport default class OwnProfileBuilder {\n readonly profileHttps: ProfileHttps = null;\n readonly footballHttps: FootballHttps = null;\n readonly localStorage: LocalStorage = null;\n readonly idMapping: IdMappingService = null;\n readonly profileFacade: ProfileFacade = null;\n readonly footballFacade: FootballFacade = null;\n readonly interestsService: InterestsService = null;\n private ownProfile: ProfileModel = null;\n private modified: boolean = false;\n private expireAt: number = 0;\n private promises: Promise<any>[] = [];\n private isFetching: boolean = false;\n\n constructor(localStorage: LocalStorage, profileHttps: ProfileHttps, idMapping: IdMappingService, footballHttps: FootballHttps) {\n this.localStorage = localStorage;\n this.profileHttps = profileHttps;\n this.footballHttps = footballHttps;\n this.idMapping = idMapping;\n this.footballFacade = new FootballFacade(localStorage, footballHttps, idMapping);\n this.interestsService = new InterestsService(idMapping, this.footballFacade);\n this.profileFacade = new ProfileFacade(localStorage, profileHttps);\n }\n\n private getOwnProfile = async () => {\n while (this.isFetching) {\n console.log(\"Another thread is fetching profile...\");\n await this.delay(100);\n }\n\n if (this.modified && this.ownProfile) {\n console.log(\"Timestamp is less than 10 minutes OR profile is modifying \");\n return this.ownProfile;\n }\n\n const now = Math.floor(Date.now() / 1000);\n\n if (!this.ownProfile || this.expireAt < now) {\n this.isFetching = true;\n this.expireAt = Math.floor(Date.now() / 1000) + 600; // in seconds\n\n const profile = await this.profileFacade.getOwn();\n this.setOwnProfile(profile);\n\n this.modified = false;\n this.isFetching = false;\n\n return this.ownProfile;\n }\n\n return this.ownProfile;\n };\n\n private delay = (milliseconds: number) => {\n return new Promise(resolve => {\n setTimeout(resolve, milliseconds);\n });\n };\n\n private setOwnProfile = (ownProfile: ProfileModel) => {\n this.ownProfile = ownProfile;\n };\n\n public getInfo = async (): Promise<ProfileModel> => {\n const profile = await this.getOwnProfile();\n delete profile.interests;\n\n return profile;\n };\n\n public showInterests = async (): Promise<InterestModel[]> => {\n const profile = await this.getOwnProfile();\n let interests: InterestModel[] = [];\n interests = profile.interests;\n\n return await this.interestsService.inquiryCustomInterests(interests);\n };\n\n public showFullInterests = async () => {\n const profileInterests = await this.showInterests();\n\n return await this.interestsService.showFullInterests(profileInterests);\n };\n\n public getFollowers = async (filters?: FollowFilters): Promise<FollowersModel[]> => {\n return await this.profileFacade.getFollowers(filters);\n };\n\n public getFollowing = async (filters?: FollowFilters): Promise<FollowingModel[]> => {\n return await this.profileFacade.getFollowing(filters);\n };\n\n public follow = async (profiles: string[]): Promise<FollowingModel[]> => {\n return await this.profileFacade.follow(profiles);\n };\n\n public unfollow = async (profiles: string[]): Promise<boolean> => {\n return await this.profileFacade.unfollow(profiles);\n };\n\n private addInterestPromise = async (interest: InterestModel): Promise<OwnProfileBuilder> => {\n this.modified = true;\n await this.getOwnProfile();\n let localInterest: InterestModel = null;\n\n if (interest.source !== \"custom\") {\n localInterest = await this.interestsService.remapInterestToNative(interest);\n } else {\n localInterest = interest;\n }\n\n const newInterests = this.ownProfile.interests.filter((profileInterest: InterestModel) => {\n return (profileInterest.id !== localInterest.id || profileInterest.type !== localInterest.type)\n || profileInterest.source !== localInterest.source;\n });\n\n this.ownProfile.interests = [...newInterests];\n this.ownProfile.interests.push(localInterest);\n\n return this;\n };\n\n public addInterest = (interest: InterestModel): OwnProfileBuilder => {\n this.promises.push(this.addInterestPromise(interest));\n\n return this;\n };\n\n private removeInterestPromise = async (interest: InterestModel): Promise<OwnProfileBuilder> => {\n this.modified = true;\n await this.getOwnProfile();\n let localInterest: InterestModel = null;\n\n if (interest.source !== \"custom\") {\n localInterest = await this.interestsService.remapInterestToNative(interest);\n } else {\n localInterest = interest;\n }\n\n this.ownProfile.interests = this.ownProfile.interests.filter((profileInterest: InterestModel) => {\n return (profileInterest.id !== localInterest.id || profileInterest.type !== localInterest.type)\n || profileInterest.source !== localInterest.source;\n });\n\n return this;\n };\n\n public removeInterest = (interest: InterestModel): OwnProfileBuilder => {\n this.promises.push(this.removeInterestPromise(interest));\n\n return this;\n };\n\n private setBirthdatePromise = async (birthDate?: string): Promise<OwnProfileBuilder> => {\n this.modified = true;\n await this.getOwnProfile();\n\n if (birthDate) {\n this.ownProfile.birthDate = birthDate;\n } else {\n this.ownProfile.birthDate = null;\n }\n\n return this;\n };\n\n public setBirthdate = (birthDate?: string): OwnProfileBuilder => {\n this.promises.push(this.setBirthdatePromise(birthDate));\n\n return this;\n };\n\n private setGenderPromise = async (gender: string): Promise<OwnProfileBuilder> => {\n this.modified = true;\n await this.getOwnProfile();\n\n if (gender === \"male\" || gender === \"female\") {\n this.ownProfile.gender = gender;\n } else {\n this.ownProfile.gender = \"unspecified\";\n }\n\n return this;\n };\n\n public setGender = (gender: string): OwnProfileBuilder => {\n this.promises.push(this.setGenderPromise(gender));\n\n return this;\n };\n\n private setCountryPromise = async (countryId?: string): Promise<OwnProfileBuilder> => {\n this.modified = true;\n await this.getOwnProfile();\n\n if (countryId && !this.ownProfile.country) {\n this.ownProfile.country = new ProfileCountryModel();\n this.ownProfile.country.id = countryId;\n } else if (countryId && this.ownProfile.country) {\n this.ownProfile.country.id = countryId;\n } else {\n this.ownProfile.country = null;\n }\n\n return this;\n };\n\n public setCountry = (countryId?: string): OwnProfileBuilder => {\n this.promises.push(this.setCountryPromise(countryId));\n\n return this;\n };\n\n public showFullnessProfile = async (): Promise<FullnessProfile> => {\n const profile = await this.getOwnProfile();\n\n return this.profileFacade.showFullnessProfile(profile);\n };\n\n public update = async (): Promise<ProfileModel> => {\n if (this.promises.length === 0) {\n return this.ownProfile;\n }\n\n await Promise.all(this.promises);\n const profile = await this.getOwnProfile();\n const patchedProfile = await this.profileHttps.updateProfile(profile);\n\n this.modified = false;\n this.expireAt = 0;\n\n this.localStorage.setOwnProfile(patchedProfile);\n delete patchedProfile.interests;\n\n return patchedProfile;\n };\n}", "import LocalStorage from \"../../../Global/LocalStorage\";\nimport ProfileHttps from \"../../../Https/ProfileHttps\";\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\nimport FootballFacade from \"../../Football/Facades/FootballFacade\";\nimport ProfileFacade from \"../Facades/ProfileFacade\";\nimport InterestsService from \"../Interests/InterestsService\";\nimport FollowersModel from \"../Models/Followers/FollowersModel\";\nimport FollowFilters from \"../Models/FollowFilters\";\nimport FollowingModel from \"../Models/Following/FollowingModel\";\nimport FullnessProfile from \"../Models/FullnessProfile/FullnessProfile\";\nimport InterestModel from \"../Models/InterestModel\";\nimport ProfileModel from \"../Models/ProfileModel\";\n\nexport default class ProfileBuilder {\n readonly profileHttps: ProfileHttps = null;\n readonly footballFacade: FootballFacade = null;\n readonly localStorage: LocalStorage = null;\n readonly idMapping: IdMappingService = null;\n readonly profileFacade: ProfileFacade = null;\n readonly interestsService: InterestsService = null;\n private profileId: string = \"\";\n\n\n constructor(localStorage: LocalStorage, profileHttps: ProfileHttps, idMapping: IdMappingService, footballFacade: FootballFacade) {\n this.localStorage = localStorage;\n this.profileHttps = profileHttps;\n this.footballFacade = footballFacade;\n this.idMapping = idMapping;\n this.interestsService = new InterestsService(idMapping, footballFacade);\n this.profileFacade = new ProfileFacade(localStorage, profileHttps);\n }\n\n public setId = (id: string) => {\n this.profileId = id;\n return this;\n }\n\n private getProfile = async (): Promise<ProfileModel> => {\n return await this.profileFacade.getById(this.profileId);\n\n };\n\n public getInfo = async (): Promise<ProfileModel> => {\n const profile = await this.getProfile();\n delete profile.interests;\n\n return profile;\n };\n\n public showInterests = async (): Promise<InterestModel[]> => {\n const profile = await this.getProfile();\n let interests: InterestModel[] = [];\n interests = profile.interests;\n\n return await this.interestsService.inquiryCustomInterests(interests);\n };\n\n public showFullInterests = async () => {\n const profileInterests = await this.showInterests();\n\n return await this.interestsService.showFullInterests(profileInterests);\n };\n\n public getFollowers = async (filters?: FollowFilters): Promise<FollowersModel[]> => {\n return await this.profileFacade.getFollowers(filters, this.profileId);\n };\n\n public getFollowing = async (filters?: FollowFilters): Promise<FollowingModel[]> => {\n return await this.profileFacade.getFollowing(filters, this.profileId);\n };\n\n public showFullnessProfile = async (): Promise<FullnessProfile> => {\n const profile = await this.getProfile();\n\n return this.profileFacade.showFullnessProfile(profile);\n };\n\n}", "import axios, { AxiosInstance } from \"axios\";\r\nimport { limitIds, setBaseUrl } from \"../Global/Helper\";\r\nimport SDKConfiguraitonModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\nimport FootballCountryModel from \"../Namespaces/Football/Models/Country/FootballCountryModel\";\r\nimport FootballCountryRemapper from \"../Namespaces/Football/Models/Country/Remappers/FootballCountryRemapper\";\r\nimport CompetitionFilters from \"../Namespaces/Football/Models/Competition/CompetitionFilters\";\r\nimport CompetitionBasicModel from \"../Namespaces/Football/Models/Competition/CompetitionBasicModel\";\r\nimport CompetitionFullModel from \"../Namespaces/Football/Models/Competition/CompetitionFullModel\";\r\nimport CompetitionBasicRemapper from \"../Namespaces/Football/Models/Competition/Remappers/CompetitionBasicRemapper\";\r\nimport CompetitionFullRemapper from \"../Namespaces/Football/Models/Competition/Remappers/CompetitionFullRemapper\";\r\nimport TeamBasicModel from \"../Namespaces/Football/Models/Team/TeamBasicModel\";\r\nimport TeamFullModel from \"../Namespaces/Football/Models/Team/TeamFullModel\";\r\nimport TeamBasicRemapper from \"../Namespaces/Football/Models/Team/Remappers/TeamBasicRemapper\";\r\nimport TeamFullRemapper from \"../Namespaces/Football/Models/Team/Remappers/TeamFullRemapper\";\r\nimport MatchBasicModel from \"../Namespaces/Football/Models/Match/MatchBasicModel\";\r\nimport MatchFullModel from \"../Namespaces/Football/Models/Match/MatchFullModel\";\r\nimport MatchBasicRemapper from \"../Namespaces/Football/Models/Match/Remappers/MatchBasicRemapper\";\r\nimport MatchFullRemapper from \"../Namespaces/Football/Models/Match/Remappers/MatchFullRemapper\";\r\nimport TopPlayerModel from \"../Namespaces/Football/Models/Player/TopPlayerModel\";\r\nimport PlayerBasicModel from \"../Namespaces/Football/Models/Player/PlayerBasicModel\";\r\nimport PlayerFullModel from \"../Namespaces/Football/Models/Player/PlayerFullModel\";\r\nimport TopPlayerRemapper from \"../Namespaces/Football/Models/Player/Remappers/TopPlayerRemapper\";\r\nimport PlayerBasicRemapper from \"../Namespaces/Football/Models/Player/Remappers/PlayerBasicRemapper\";\r\nimport PlayerFullRemapper from \"../Namespaces/Football/Models/Player/Remappers/PlayerFullRemapper\";\r\nimport SearchRemapper from \"../Namespaces/Football/Models/Search/SearchRemapper\";\r\nimport TeamFilters from \"../Namespaces/Football/Models/Team/TeamFilters\";\r\nimport MatchFilters from \"../Namespaces/Football/Models/Match/MatchFilters\";\r\nimport PlayerFilters from \"../Namespaces/Football/Models/Player/PlayerFilters\";\r\nimport SearchFilters from \"../Namespaces/Football/Models/Search/SearchFilters\";\r\nimport SearchModel from \"../Namespaces/Football/Models/Search/SearchModel\";\r\n\r\n\r\n\r\nexport default class FootballHttps {\r\n private instance: AxiosInstance = null;\r\n readonly apiSignInUrl: string = '';\r\n readonly idSchema: string = '';\r\n private limitIds: number = 200;\r\n private countryRemapper: FootballCountryRemapper = null;\r\n private competitionBasicRemapper: CompetitionBasicRemapper = null;\r\n private competitionFullRemapper: CompetitionFullRemapper = null;\r\n private teamBasicRemapper: TeamBasicRemapper = null;\r\n private teamFullRemapper: TeamFullRemapper = null;\r\n private matchBasicRemapper: MatchBasicRemapper = null;\r\n private matchFullRemapper: MatchFullRemapper = null;\r\n private playerBasicRemapper: PlayerBasicRemapper = null;\r\n private playerFullRemapper: PlayerFullRemapper = null;\r\n private topPlayerRemapper: TopPlayerRemapper = null;\r\n private searchRemapper: SearchRemapper = null;\r\n\r\n constructor(config: SDKConfiguraitonModel) {\r\n const baseUrl = setBaseUrl(config.environment, \"football\");\r\n this.apiSignInUrl = `?key=${config.apiKey}&lang=${config.lang}&client_id=${config.clientId}`;\r\n this.idSchema = config.idSchema;\r\n\r\n this.instance = axios.create({\r\n baseURL: baseUrl\r\n });\r\n\r\n this.countryRemapper = new FootballCountryRemapper();\r\n this.competitionBasicRemapper = new CompetitionBasicRemapper();\r\n this.competitionFullRemapper = new CompetitionFullRemapper();\r\n this.teamBasicRemapper = new TeamBasicRemapper();\r\n this.teamFullRemapper = new TeamFullRemapper();\r\n this.matchBasicRemapper = new MatchBasicRemapper();\r\n this.matchFullRemapper = new MatchFullRemapper();\r\n this.playerBasicRemapper = new PlayerBasicRemapper();\r\n this.playerFullRemapper = new PlayerFullRemapper();\r\n this.topPlayerRemapper = new TopPlayerRemapper();\r\n this.searchRemapper = new SearchRemapper();\r\n }\r\n\r\n public getCountries = async (): Promise<FootballCountryModel[]> => {\r\n try {\r\n const response = await this.instance.get(`/countries${this.apiSignInUrl}`);\r\n return this.countryRemapper.countriesFromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with the football countries request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n /**\r\n * Makes request for fetching competitions from Football API with set filters. When ids exceed the limit in URL the requests are splited.\r\n * @param filters\r\n * @returns List of competitions with concrete filters. If no filters are passed we retrieve list of competitions sorted by ids.\r\n */\r\n\r\n public getCompetitions = async (filters?: CompetitionFilters): Promise<CompetitionBasicModel[]> => {\r\n try {\r\n let response: any = {};\r\n\r\n if (filters && filters.competitionIds && filters.competitionIds.length > this.limitIds - 1) {\r\n let competitionsArrays: any = [];\r\n const limitedIds = limitIds(filters.competitionIds);\r\n for (const ids of limitedIds) {\r\n filters.competitionIds = ids;\r\n response = await this.instance.get(`/competitions${this.apiSignInUrl}${filters.constructFilterUrl()}`);\r\n competitionsArrays.push(response.data.data.map((competition: any) => this.competitionBasicRemapper.fromResponse(competition)));\r\n }\r\n //Merge an array of arrays\r\n const competitions = Array.prototype.concat.apply([], competitionsArrays);\r\n\r\n return competitions;\r\n } else {\r\n response = filters ? await this.instance.get(`/competitions${this.apiSignInUrl}${filters.constructFilterUrl()}`)\r\n : await this.instance.get(`/competitions${this.apiSignInUrl}`);\r\n return response.data.data.map((competition: any) => this.competitionBasicRemapper.fromResponse(competition));\r\n }\r\n } catch (e) {\r\n console.warn(\"There was a problem with getCompetitions request\", e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getCompetitionById = async (id: string): Promise<CompetitionFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/competitions/${id}${this.apiSignInUrl}`)\r\n return this.competitionFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn(\"There was a problem with getCompetitionById request\", e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTopCompetitions = async (): Promise<CompetitionBasicModel[]> => {\r\n try {\r\n const response = await this.instance.get(`/competitions/top${this.apiSignInUrl}`)\r\n return response.data.data.map((resp: any) => this.competitionBasicRemapper.fromResponse(resp));\r\n } catch (e) {\r\n console.warn(\"There was a problem with getTopCompetitions request\", e);\r\n throw e;\r\n }\r\n };\r\n\r\n /**\r\n * Makes request for fetching teams from Football API with set filters. When ids exceed the limit in URL the requests are splited.\r\n * @param filters\r\n * @returns List of teams with concrete filters. If no filters are passed we retrieve list of teams sorted by ids.\r\n */\r\n\r\n public getTeams = async (filters?: TeamFilters): Promise<TeamBasicModel[]> => {\r\n try {\r\n let response: any = {};\r\n\r\n if (filters.teamIds && filters.teamIds.length > this.limitIds - 1) {\r\n let teamsArrays: any = [];\r\n const limitedIds = limitIds(filters.teamIds);\r\n for (const ids of limitedIds) {\r\n filters.teamIds = ids;\r\n response = await this.instance.get(`/teams${this.apiSignInUrl}${filters.constructFilterUrl()}`);\r\n teamsArrays.push(response.data.data.map((team: any) => this.teamBasicRemapper.fromResponse(team)));\r\n }\r\n //Merge an array of arrays\r\n const teams = Array.prototype.concat.apply([], teamsArrays);\r\n\r\n return teams;\r\n } else {\r\n response = filters ? await this.instance.get(`/teams${this.apiSignInUrl}${filters.constructFilterUrl()}`)\r\n : await this.instance.get(`/teams${this.apiSignInUrl}`);\r\n return response.data.data.map((team: any) => this.teamBasicRemapper.fromResponse(team));\r\n }\r\n } catch (e) {\r\n console.warn(\"There was a problem with getTeams request\", e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTeamById = async (id: string): Promise<TeamFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/teams/${id}${this.apiSignInUrl}`)\r\n return this.teamFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with getTeamById request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTopTeams = async (): Promise<TeamBasicModel[]> => {\r\n try {\r\n const response = await this.instance.get(`/teams/top${this.apiSignInUrl}`)\r\n return response.data.data ? response.data.data.map((team: any) => this.teamBasicRemapper.fromResponse(team)) : [];\r\n } catch (e) {\r\n console.warn('There was a problem with getTopTeams request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getNextMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/teams/${id}/next-match${this.apiSignInUrl}`)\r\n return this.matchFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with getNextMatchForTeam request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getPrevMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/teams/${id}/previous-match${this.apiSignInUrl}`)\r\n return this.matchFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with getPrevMatchForTeam request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n /**\r\n * Makes request for fetching players from Football API with set filters. When ids exceed the limit in URL the requests are splited.\r\n * @param filters\r\n * @returns List of players with concrete filters. If no filters are passed we retrieve list of players sorted by ids.\r\n */\r\n\r\n public getPlayers = async (filters?: PlayerFilters): Promise<PlayerBasicModel[]> => {\r\n try {\r\n let response: any = {};\r\n\r\n if (filters.playerIds && filters.playerIds.length > this.limitIds - 1) {\r\n let playersArrays: any = [];\r\n const limitedIds = limitIds(filters.playerIds);\r\n\r\n for (const ids of limitedIds) {\r\n filters.playerIds = ids;\r\n response = await this.instance.get(`/players${this.apiSignInUrl}${filters.constructFilterUrl()}`);\r\n playersArrays.push(response.data.data.map((resp: any) => this.teamBasicRemapper.fromResponse(resp)));\r\n }\r\n //Merge an array of arrays\r\n const players = Array.prototype.concat.apply([], playersArrays);\r\n\r\n return players;\r\n } else {\r\n const response = filters ? await this.instance.get(`/players${this.apiSignInUrl}${filters.constructFilterUrl()}`)\r\n : await this.instance.get(`/players${this.apiSignInUrl}`);\r\n return response.data.data.map((player: any) => this.playerBasicRemapper.fromResponse(player));\r\n }\r\n } catch (e) {\r\n console.warn('There was a problem with getPlayers request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getPlayerById = async (id: string): Promise<PlayerFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/players/${id}${this.apiSignInUrl}`)\r\n return this.playerFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with getPlayerById request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getTopPlayers = async (): Promise<TopPlayerModel[]> => {\r\n try {\r\n const response = await this.instance.get(`/players/top${this.apiSignInUrl}`)\r\n return response.data.data.map((player: any) => this.topPlayerRemapper.fromResponse(player));\r\n } catch (e) {\r\n console.warn('There was a problem with getTopPlayers request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getNextMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/players/${id}/next-match${this.apiSignInUrl}`)\r\n return this.matchFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with getNextMatchForPlayer request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getPrevMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/players/${id}/previous-match${this.apiSignInUrl}`)\r\n return this.matchFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with getPrevMatchForPlayer request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getMatchById = async (id: string): Promise<MatchFullModel> => {\r\n try {\r\n const response = await this.instance.get(`/matches/${id}${this.apiSignInUrl}`);\r\n return this.matchFullRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn('There was a problem with getMatchById request', e);\r\n throw e;\r\n }\r\n };\r\n\r\n public getMatches = async (filters?: MatchFilters): Promise<MatchBasicModel[]> => {\r\n try {\r\n const response = filters ? await this.instance.get(`/matches${this.apiSignInUrl}${filters.constructFilterUrl()}`)\r\n : await this.instance.get(`/matches${this.apiSignInUrl}`);\r\n return response.data.data.map((match: any) => this.matchBasicRemapper.fromResponse(match));\r\n } catch (e) {\r\n console.warn(\"There was a problem with getMatches request\", e);\r\n throw e;\r\n }\r\n };\r\n\r\n public search = async (filters: SearchFilters): Promise<SearchModel> => {\r\n try {\r\n const response = await this.instance.get(`/search${this.apiSignInUrl}${filters.constructFilterUrl()}`);\r\n return this.searchRemapper.fromResponse(response.data.data);\r\n } catch (e) {\r\n console.warn(\"There was a problem with search request\", e);\r\n throw e;\r\n }\r\n };\r\n}\r\n", "export default class CountryModel {\n id: string = '';\n alias: string = '';\n countryCode = '';\n assets: {} = null;\n name: string = '';\n}\n", "import FootballCountryModel from \"../FootballCountryModel\";\n\nexport default class FootballCountryRemapper {\n\n public countriesFromResponse = (response: any) => {\n if (response) {\n return response.map((countryResp: any) => this.countryFromResponse(countryResp))\n }\n };\n\n public countryFromResponse = (response: any): FootballCountryModel => {\n try {\n if (response) {\n const country = new FootballCountryModel();\n country.id = response.id;\n country.alias = response.alias;\n country.assets = response.assets;\n country.countryCode = response.country_code;\n country.name = response.name;\n return country;\n }\n } catch (e) {\n throw e;\n }\n\n return null;\n };\n}\n", "import FootballCountryModel from \"../Country/FootballCountryModel\";\n\nexport default class CompetitionBasicModel {\n public id: string = '';\n public country: FootballCountryModel = null;\n public gender: string = '';\n public assets: {} = null;\n public type: string = '';\n public name: string = '';\n}\n", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport CompetitionBasicModel from \"../CompetitionBasicModel\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\n\nexport default class CompetitionBasicRemapper implements IRemapper<CompetitionBasicModel> {\n private countryRemapper: FootballCountryRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n }\n\n fromResponse(response: any): CompetitionBasicModel {\n try {\n const model = new CompetitionBasicModel();\n model.id = response.id;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.gender = response.gender;\n model.assets = response.assets;\n model.type = response.type\n model.name = response.name;\n\n return model;\n } catch(e) {\n console.warn(\"There was a problem remapping the competition response\", e);\n throw e;\n }\n };\n\n}", "import FootballCountryModel from \"../Country/FootballCountryModel\";\nimport TeamBasicModel from \"../Team/TeamBasicModel\";\n\nexport default class CompetitionFullModel {\n public id: string = '';\n public country: FootballCountryModel = null;\n public gender: string = '';\n public assets: {} = null;\n public type: string = '';\n public name: string = '';\n public participants: TeamBasicModel[] = [];\n}", "import FootballCountryModel from \"../Country/FootballCountryModel\";\n\nexport default class TeamBasicModel {\n public id: string = '';\n public country: FootballCountryModel = null;\n public gender: string = '';\n public assets: {} = null;\n public name: string = '';\n public code: string = '';\n public national: boolean = false;\n public fullName: string = '';\n public shortName: string = '';\n}\n", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\nimport TeamBasicModel from \"../TeamBasicModel\";\n\nexport default class TeamBasicRemapper implements IRemapper<TeamBasicModel> {\n private countryRemapper: FootballCountryRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n }\n\n fromResponse(response: any): TeamBasicModel {\n try {\n const model = new TeamBasicModel();\n model.id = response.id;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.gender = response.gender;\n model.assets = response.assets;\n model.code = response.code;\n model.national = response.national;\n model.fullName = response.full_name;\n model.shortName = response.short_name;\n model.name = response.name;\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping teams response\", e);\n throw e;\n }\n };\n\n}", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport CompetitionFullModel from \"../CompetitionFullModel\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\nimport TeamBasicModel from \"../../Team/TeamBasicModel\";\nimport TeamBasicRemapper from \"../../Team/Remappers/TeamBasicRemapper\";\n\nexport default class CompetitionFullRemapper implements IRemapper<CompetitionFullModel> {\n\n private countryRemapper: FootballCountryRemapper = null;\n private teamBasicRemapper: TeamBasicRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n this.teamBasicRemapper = new TeamBasicRemapper();\n }\n\n fromResponse(response: any): CompetitionFullModel {\n try {\n const model = new CompetitionFullModel();\n model.id = response.id;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.gender = response.gender;\n model.assets = response.assets;\n model.type = response.type\n model.name = response.name;\n model.participants = response.participants.map((participant: TeamBasicModel) => this.teamBasicRemapper.fromResponse(participant));\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping the competition response\", e);\n throw e;\n }\n };\n\n}", "import FootballCountryModel from \"../Country/FootballCountryModel\"\nimport CompetitionBasicModel from \"../Competition/CompetitionBasicModel\";\nimport PlayerSquadModel from \"../Player/PlayerSquadModel\";\n\nexport default class TeamFullModel {\n public id: string = '';\n public country: FootballCountryModel = null;\n public gender: string = '';\n public assets: {} = null;\n public name: string = '';\n public competitions: CompetitionBasicModel[] = [];\n public code: string = '';\n public national: boolean = false;\n public fullName: string = '';\n public shortName: string = '';\n public squad: PlayerSquadModel[] = [];\n}\n", "import FootballCountryModel from \"../Country/FootballCountryModel\";\n\n\nexport default class PlayerSquadModel {\n public id: string = \"\";\n public startDate: string = \"\";\n public endDate: string = \"\";\n public shirtNumber: number;\n public loan: boolean = false;\n public position: string = \"\";\n public country: FootballCountryModel = null;\n public name: string = \"\";\n public assets: {} = null;\n public birthDate: string = \"\";\n\n}", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\nimport PlayerSquadModel from \"../PlayerSquadModel\";\n\nexport default class PlayerBasicRemapper implements IRemapper<PlayerSquadModel> {\n private countryRemapper: FootballCountryRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n }\n\n fromResponse(response: any): PlayerSquadModel {\n try {\n const model = new PlayerSquadModel();\n model.id = response.id;\n model.startDate = response.start_date;\n model.endDate = response.end_date;\n model.shirtNumber = response.shirt_number;\n model.loan = response.loan;\n model.position = response.position;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.name = response.name;\n model.assets = response.assets;\n model.birthDate = response.birth_date;\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping the player from squad\", e);\n throw e;\n }\n };\n\n}", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\nimport TeamFullModel from \"../TeamFullModel\";\nimport PlayerSquadRemapper from \"../../Player/Remappers/PlayerSquadRemapper\";\nimport CompetitionBasicRemapper from \"../../Competition/Remappers/CompetitionBasicRemapper\";\n\nexport default class TeamFullRemapper implements IRemapper<TeamFullModel> {\n private countryRemapper: FootballCountryRemapper = null;\n private competitionRemapper: CompetitionBasicRemapper = null;\n private playerRemapper: PlayerSquadRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n this.competitionRemapper = new CompetitionBasicRemapper();\n this.playerRemapper = new PlayerSquadRemapper();\n }\n\n fromResponse(response: any): TeamFullModel {\n try {\n const model = new TeamFullModel();\n model.id = response.id;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.gender = response.gender;\n model.assets = response.assets;\n model.code = response.code;\n model.national = response.national;\n model.fullName = response.full_name;\n model.shortName = response.short_name;\n model.name = response.name;\n model.competitions = response.competitions ? response.competitions.map((competition: any) => this.competitionRemapper.fromResponse(competition)) : [];\n model.squad = response.squad ? response.squad.map((team: any) => this.playerRemapper.fromResponse(team)) : [];\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping team response\", e);\n throw e;\n }\n };\n\n}\n", "import TeamBasicModel from \"../Team/TeamBasicModel\";\nimport CompetitionBasicModel from \"../Competition/CompetitionBasicModel\";\n\nexport default class MatchBasicModel {\n public id: string = '';\n public kickoffAt: string = '';\n public finishedAt: string = '';\n public updatedAt: string = '';\n public homeTeam: TeamBasicModel = null;\n public awayTeam: TeamBasicModel = null;\n public lineupsConfirmed: boolean = false;\n public startedAt: string = '';\n public minute: string = '';\n public scores: any = null;\n public context: { competition: CompetitionBasicModel } = { competition: null };\n public status: { type: string, subType: string } = { type: null, subType: null};\n}\n", "import { ScoresType } from \"../StatType\";\n\nexport default class ScoresModel {\n public ftScore: ScoresType = null;\n public htScore: ScoresType = null;\n public aetScore: ScoresType = null;\n public aggScore: ScoresType = null;\n public penScore: ScoresType = null;\n}", "import { IRemapper } from \"../../../../../Global/IRemapper\";\nimport ScoresModel from \"./ScoresModel\";\nimport { ScoresType } from \"../StatType\";\n\nexport default class ScoresRemapper implements IRemapper<ScoresModel> {\n\n fromResponse(response: any): ScoresModel {\n try {\n const model = new ScoresModel();\n model.ftScore = this.statEntityFromResponse(response.ft_score);\n model.htScore = this.statEntityFromResponse(response.ht_score);\n model.aetScore = this.statEntityFromResponse(response.aet_score);\n model.aggScore = this.statEntityFromResponse(response.agg_score);\n model.penScore = this.statEntityFromResponse(response.pen_score);\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping the scores\", e);\n throw e;\n }\n };\n\n private statEntityFromResponse = (entity: any): ScoresType => {\n return { homeGoals: entity.home_goals, awayGoals: entity.away_goals };\n };\n}\n", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport MatchBasicModel from \"../MatchBasicModel\";\nimport TeamBasicRemapper from \"../../Team/Remappers/TeamBasicRemapper\";\nimport CompetitionBasicRemapper from \"../../Competition/Remappers/CompetitionBasicRemapper\";\nimport ScoresRemapper from \"../Scores/ScoresRemapper\";\n\nexport default class MatchBasicRemapper implements IRemapper<MatchBasicModel> {\n private teamRemapper: TeamBasicRemapper = null;\n private competitionRemapper: CompetitionBasicRemapper = null;\n private scoresRemapper: ScoresRemapper = null;\n\n constructor() {\n this.teamRemapper = new TeamBasicRemapper();\n this.competitionRemapper = new CompetitionBasicRemapper();\n this.scoresRemapper = new ScoresRemapper();\n }\n\n fromResponse(response: any): MatchBasicModel {\n try {\n const model = new MatchBasicModel();\n model.id = response.id;\n model.kickoffAt = response.kickoff_at;\n model.finishedAt = response.finished_at;\n model.updatedAt = response.updated_at;\n model.homeTeam = this.teamRemapper.fromResponse(response.home_team);\n model.awayTeam = this.teamRemapper.fromResponse(response.away_team);\n model.lineupsConfirmed = response.lineups_confirmed;\n model.startedAt = response.started_at;\n model.minute = response.minute;\n model.scores = this.scoresRemapper.fromResponse(response.scores);\n model.context = { competition: this.competitionRemapper.fromResponse(response.context.competition) };\n model.status = {type: response.status.type, subType: response.status.sub_type};\n return model;\n } catch (e) {\n console.warn('There was a problem remapping the match response', e);\n throw e;\n }\n };\n\n}", "import TeamBasicModel from \"../Team/TeamBasicModel\";\nimport StatsModel from \"./Stats/StatsModel\";\nimport LineupsModel from \"./Lineups/LineupsModel\";\nimport CompetitionBasicModel from \"../Competition/CompetitionBasicModel\";\nimport ScoresModel from \"./Scores/ScoresModel\";\nimport TimelineModel from \"./Timeline/TimelineModel\";\n\nexport default class MatchFullModel {\n public id: string = '';\n public kickoffAt: string = '';\n public finishedAt: string = '';\n public updatedAt: string = '';\n public homeTeam: TeamBasicModel = null;\n public awayTeam: TeamBasicModel = null;\n public lineupsConfirmed: boolean = false;\n public startedAt: string = '';\n public minute: string = '';\n public scores: ScoresModel = null;\n public stats: StatsModel = null;\n public context: { competition: CompetitionBasicModel } = { competition: null };\n public timeline: TimelineModel[] = [];\n public status: { type: string, subType: string } = { type: null, subType: null};\n public lineups: LineupsModel = null;\n}\n", "import {StatType} from \"../StatType\";\r\n\r\nexport default class StatsModel {\r\n public corners: StatType = null;\r\n public crosses: StatType = null;\r\n public offside: StatType = null;\r\n public shotsOn: StatType = null;\r\n public throwIn: StatType = null;\r\n public redCards: StatType = null;\r\n public shotsOff: StatType = null;\r\n public goalKicks: StatType = null;\r\n public possession: StatType = null;\r\n public treatments: StatType = null;\r\n public yellowCards: StatType = null;\r\n public shotsBlocked: StatType = null;\r\n public substitutions: StatType = null;\r\n public counterAttacks: StatType = null;\r\n public foulsCommitted: StatType = null;\r\n}", "import {IRemapper} from \"../../../../../Global/IRemapper\";\r\nimport StatsModel from \"./StatsModel\";\r\nimport {StatType} from \"../StatType\";\r\n\r\nexport default class StatsRemapper implements IRemapper<StatsModel>{\r\n\r\n fromResponse(response: any): StatsModel {\r\n try {\r\n const model = new StatsModel();\r\n model.corners = this.statEntityFromResponse(response.corners);\r\n model.crosses = this.statEntityFromResponse(response.crosses);\r\n model.offside = this.statEntityFromResponse(response.offside);\r\n model.shotsOn = this.statEntityFromResponse(response.shots_on);\r\n model.throwIn = this.statEntityFromResponse(response.throw_in);\r\n model.redCards = this.statEntityFromResponse(response.red_cards);\r\n model.shotsOff = this.statEntityFromResponse(response.shots_off);\r\n model.goalKicks = this.statEntityFromResponse(response.goal_kicks);\r\n model.possession = this.statEntityFromResponse(response.possession);\r\n model.treatments = this.statEntityFromResponse(response.treatments);\r\n model.yellowCards = this.statEntityFromResponse(response.yellow_cards);\r\n model.shotsBlocked = this.statEntityFromResponse(response.shots_blocked);\r\n model.substitutions = this.statEntityFromResponse(response.substitutions);\r\n model.counterAttacks = this.statEntityFromResponse(response.counter_attacks);\r\n model.foulsCommitted = this.statEntityFromResponse(response.fouls_committed);\r\n return model;\r\n } catch (e) {\r\n console.warn(\"There was a problem remapping the stats\", e);\r\n throw e;\r\n }\r\n }\r\n\r\n private statEntityFromResponse = (entity: any): StatType => {\r\n return { homeTeam: entity ? entity.home_team : null, awayTeam: entity ? entity.away_team : null};\r\n };\r\n\r\n}", "import PlayerShortModel from \"../../Player/PlayerShortModel\";\n\nexport default class LineupsModel {\n public homeTeam: { players: PlayerShortModel[] } = { players: [] };\n public awayTeam: { players: PlayerShortModel[] } = { players: [] };\n}", "export default class PlayerShortModel {\n public id: string = \"\";\n public name: string = \"\";\n public position: string = \"\";\n public shirtNumber: number;\n public assets: {} = null;\n public type: string = \"\";\n} ", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport PlayerShortModel from \"../PlayerShortModel\";\n\nexport default class PlayerShortRemapper implements IRemapper<PlayerShortModel> {\n\n fromResponse(response: any): PlayerShortModel {\n try {\n const model = new PlayerShortModel();\n model.id = response.id;\n model.name = response.name;\n model.position = response.position;\n model.shirtNumber = response.shirt_number;\n model.assets = response.assets;\n model.type = response.type;\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping the player from timeline\", e);\n throw e;\n }\n };\n\n}", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport LineupsModel from \"./LineupsModel\";\nimport PlayerShortRemapper from \"../../Player/Remappers/PlayerShortRemapper\";\n\nexport default class LineupsRemapper implements IRemapper<LineupsModel> {\n private playerRemapper: PlayerShortRemapper = null;\n\n constructor() {\n this.playerRemapper = new PlayerShortRemapper();\n }\n\n fromResponse(response: any): LineupsModel {\n try {\n const model: LineupsModel = new LineupsModel();\n model.homeTeam.players = response.home_team && response.home_team.players ? response.home_team.players.map((player: any) => this.playerRemapper.fromResponse(player)) : [];\n model.awayTeam.players = response.away_team && response.away_team.players ? response.away_team.players.map((player: any) => this.playerRemapper.fromResponse(player)) : [];\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping the lineups\", e);\n throw e;\n }\n };\n\n}", "import PlayerShortModel from \"../../Player/PlayerShortModel\";\n\nexport default class TimelineModel {\n public minute: string = \"\";\n public type: string = \"\";\n public teamId: string = \"\";\n public player: PlayerShortModel = null;\n public relatedPlayer: PlayerShortModel = null;\n public updatedAt: string = \"\";\n}", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport TimelineModel from \"./TimelineModel\";\nimport PlayerShortRemapper from \"../../Player/Remappers/PlayerShortRemapper\"\n\nexport default class TimelineRemapper implements IRemapper<TimelineModel> {\n private playerRemapper: PlayerShortRemapper = null;\n\n constructor() {\n this.playerRemapper = new PlayerShortRemapper();\n }\n\n fromResponse(response: any): TimelineModel {\n try {\n const model = new TimelineModel();\n model.minute = response.minute;\n model.type = response.type;\n model.teamId = response.team_id;\n model.player = this.playerRemapper.fromResponse(response.player);\n model.relatedPlayer = response.related_player ? this.playerRemapper.fromResponse(response.related_player) : null;\n model.updatedAt = response.updated_at;\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping timeline\", e);\n throw e;\n }\n };\n\n}", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport MatchFullModel from \"../MatchFullModel\";\nimport TeamBasicRemapper from \"../../Team/Remappers/TeamBasicRemapper\";\nimport CompetitionBasicRemapper from \"../../Competition/Remappers/CompetitionBasicRemapper\";\nimport StatsRemapper from \"../Stats/StatsRemapper\";\nimport ScoresRemapper from \"../Scores/ScoresRemapper\";\nimport LineupsRemapper from \"../Lineups/LineupsRemapper\";\nimport LineupsModel from \"../Lineups/LineupsModel\";\nimport TimelineModel from \"../Timeline/TimelineModel\"\nimport TimelineRemapper from \"../Timeline/TimelineRemapper\";\n\nexport default class MatchFullRemapper implements IRemapper<MatchFullModel> {\n private teamMapper: TeamBasicRemapper = null;\n private competitionsMapper: CompetitionBasicRemapper = null;\n private lineupsMapper: LineupsRemapper = null;\n private scoresMapper: ScoresRemapper = null;\n private statsMapper: StatsRemapper = null;\n private timelineMapper: TimelineRemapper = null;\n\n constructor() {\n this.teamMapper = new TeamBasicRemapper();\n this.competitionsMapper = new CompetitionBasicRemapper();\n this.lineupsMapper = new LineupsRemapper();\n this.scoresMapper = new ScoresRemapper();\n this.statsMapper = new StatsRemapper();\n this.timelineMapper = new TimelineRemapper();\n }\n\n fromResponse(response: any): MatchFullModel {\n try {\n const model = new MatchFullModel();\n model.id = response.id;\n model.kickoffAt = response.kickoff_at;\n model.finishedAt = response.finished_at;\n model.updatedAt = response.updated_at;\n model.homeTeam = response.home_team ? this.teamMapper.fromResponse(response.home_team) : null;\n model.awayTeam = response.away_team ? this.teamMapper.fromResponse(response.away_team) : null;\n model.lineupsConfirmed = response.lineups_confirmed;\n model.startedAt = response.started_at;\n model.minute = response.minute;\n model.scores = this.scoresMapper.fromResponse(response.scores);\n model.stats = this.statsMapper.fromResponse(response.stats);\n model.context = { competition: this.competitionsMapper.fromResponse(response.context.competition) };\n model.timeline = response.timeline? response.timeline.map((element: TimelineModel) => this.timelineMapper.fromResponse(element)) : [];\n model.status = {type: response.status.type, subType: response.status.sub_type};\n model.lineups = response.lineups ? this.lineupsMapper.fromResponse(response.lineups) : new LineupsModel();\n return model;\n } catch (e) {\n console.warn('There was a problem remapping the match response', e);\n throw e;\n }\n };\n\n}", "import FootballCountryModel from \"../Country/FootballCountryModel\";\n\nexport default class TopPlayerModel {\n public id: string = '';\n public country: FootballCountryModel = null;\n public birthDate: string = '';\n public firstName: string = '';\n public lastName: string = '';\n public name: string = '';\n public position: string = '';\n public assets: {} = null;\n}\n", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\nimport TopPlayerModel from \"../TopPlayerModel\";\n\nexport default class TopPlayerRemapper implements IRemapper<TopPlayerModel> {\n private countryRemapper: FootballCountryRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n }\n\n fromResponse(response: any): TopPlayerModel {\n try {\n const model = new TopPlayerModel();\n model.id = response.id;\n model.firstName = response.first_name ? response.first_name : null;\n model.lastName = response.last_name ? response.last_name : null;\n model.name = response.name ? response.name : null;\n model.birthDate = response.birth_date;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.assets = response.assets;\n model.position = response.position;\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping top player response\", e);\n throw e;\n }\n };\n\n}", "import FootballCountryModel from \"../Country/FootballCountryModel\";\nimport TeamBasicModel from \"../Team/TeamBasicModel\";\n\nexport default class PlayerBasicModel {\n public id: string = '';\n public country: FootballCountryModel = null;\n public birthDate: string = '';\n public firstName: string = '';\n public lastName: string = '';\n public name: string = '';\n public position: string = '';\n public assets: {} = null;\n public teams: TeamBasicModel[] = [];\n}\n", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\nimport PlayerBasicModel from \"../PlayerBasicModel\";\nimport TeamBasicRemapper from \"../../Team/Remappers/TeamBasicRemapper\";\n\nexport default class PlayerBasicRemapper implements IRemapper<PlayerBasicModel> {\n private countryRemapper: FootballCountryRemapper = null;\n private teamRemapper: TeamBasicRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n this.teamRemapper = new TeamBasicRemapper();\n }\n\n fromResponse(response: any): PlayerBasicModel {\n try {\n const model = new PlayerBasicModel();\n model.id = response.id;\n model.firstName = response.first_name ? response.first_name : null;\n model.lastName = response.last_name ? response.last_name : null;\n model.name = response.name ? response.name : null;\n model.birthDate = response.birth_date;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.assets = response.assets;\n model.teams = response.teams ? response.teams.map((team: any) => this.teamRemapper.fromResponse(team)) : [];\n model.position = response.position;\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping players response\", e);\n throw e;\n }\n };\n\n}", "import FootballCountryModel from \"../Country/FootballCountryModel\";\nimport CompetitionBasicModel from \"../Competition/CompetitionBasicModel\";\nimport TeamBasicModel from \"../Team/TeamBasicModel\";\n\nexport default class PlayerFullModel {\n public id: string = '';\n public country: FootballCountryModel = null;\n public birthDate: string = '';\n public firstName: string = '';\n public lastName: string = '';\n public name: string = '';\n public position: string = '';\n public assets: {} = null;\n public competitions: CompetitionBasicModel[] = [];\n public teams: TeamBasicModel[] = [];\n}\n", "import {IRemapper} from \"../../../../../Global/IRemapper\";\nimport FootballCountryRemapper from \"../../Country/Remappers/FootballCountryRemapper\";\nimport PlayerFullModel from \"../PlayerFullModel\";\nimport TeamBasicRemapper from \"../../Team/Remappers/TeamBasicRemapper\";\nimport CompetitionBasicRemapper from \"../../Competition/Remappers/CompetitionBasicRemapper\";\n\nexport default class PlayerFullRemapper implements IRemapper<PlayerFullModel> {\n private countryRemapper: FootballCountryRemapper = null;\n private teamRemapper: TeamBasicRemapper = null;\n private competitionRemapper: CompetitionBasicRemapper = null;\n\n constructor() {\n this.countryRemapper = new FootballCountryRemapper();\n this.teamRemapper = new TeamBasicRemapper();\n this.competitionRemapper = new CompetitionBasicRemapper();\n }\n\n fromResponse(response: any): PlayerFullModel {\n try {\n const model = new PlayerFullModel();\n model.id = response.id;\n model.firstName = response.first_name ? response.first_name : null;\n model.lastName = response.last_name ? response.last_name : null;\n model.name = response.name ? response.name : null;\n model.birthDate = response.birth_date;\n model.country = this.countryRemapper.countryFromResponse(response.country);\n model.assets = response.assets;\n model.teams = response.teams ? response.teams.map((team: any) => this.teamRemapper.fromResponse(team)) : [];\n model.position = response.position;\n model.competitions = response.competitions ? response.competitions.map((comp: any) => this.competitionRemapper.fromResponse(comp)) : [];\n\n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping player response\", e);\n throw e;\n }\n };\n\n}", "import CompetitionBasicModel from \"../Competition/CompetitionBasicModel\";\nimport PlayerBasicModel from \"../Player/PlayerBasicModel\";\nimport TeamBasicModel from \"../Team/TeamBasicModel\";\n\nexport default class SearchModel {\n public teams: TeamBasicModel[] = null;\n public players: PlayerBasicModel[] = null;\n public competitions: CompetitionBasicModel[] = null;\n}\n", "import { IRemapper } from \"../../../../Global/IRemapper\";\nimport TeamBasicRemapper from \"../Team/Remappers/TeamBasicRemapper\";\nimport PlayerBasicRemapper from \"../Player/Remappers/PlayerBasicRemapper\";\nimport CompetitionBasicRemapper from \"../Competition/Remappers/CompetitionBasicRemapper\";\nimport SearchModel from \"./SearchModel\";\nimport TeamBasicModel from \"../Team/TeamBasicModel\";\nimport PlayerBasicModel from \"../Player/PlayerBasicModel\";\nimport CompetitionBasicModel from \"../Competition/CompetitionBasicModel\";\n\nexport default class SearchRemapper implements IRemapper<SearchModel> {\n private teamRemapper: TeamBasicRemapper = null;\n private playerRemapper: PlayerBasicRemapper = null;\n private competitionremapper: CompetitionBasicRemapper = null;\n\n\n constructor() {\n this.teamRemapper = new TeamBasicRemapper();\n this.playerRemapper = new PlayerBasicRemapper();\n this.competitionremapper = new CompetitionBasicRemapper();\n }\n\n fromResponse(response: any): SearchModel {\n try {\n const model = new SearchModel();\n model.teams = response.teams ? response.teams.map((team: TeamBasicModel) => this.teamRemapper.fromResponse(team)) : [];\n model.players = response.players ? response.players.map((player : PlayerBasicModel) => this.playerRemapper.fromResponse(player)) : [];\n model.competitions = response.competitions ? response.competitions.map((competition: CompetitionBasicModel) => this.competitionremapper.fromResponse(competition)) : [];\n \n return model;\n } catch (e) {\n console.warn(\"There was a problem remapping search response\", e);\n throw e;\n }\n };\n\n}", "import ProfileHttps from \"../../Https/ProfileHttps\";\r\nimport IdMappingService from \"../../IdMapping/IdMappingService\";\r\nimport ProfileFacade from \"./Facades/ProfileFacade\";\r\nimport LocalStorage from \"../../Global/LocalStorage\";\r\nimport OwnProfileBuilder from \"./Builders/OwnProfileBuilder\";\r\nimport ProfileBuilder from \"./Builders/ProfileBuilder\";\r\nimport SDKConfigurationModel from \"../../Configurator/Models/SDKConfiguraitonModel\";\r\nimport FootballFacade from \"../Football/Facades/FootballFacade\";\r\nimport FootballHttps from \"../../Https/FootballHttps\";\r\n\r\nexport default class Profile {\r\n readonly profileHttps: ProfileHttps = null;\r\n readonly footballHttps: FootballHttps = null;\r\n readonly footballFacade: FootballFacade = null;\r\n readonly idMapping: IdMappingService = null;\r\n readonly localStorage: LocalStorage = null;\r\n readonly profileFacade: ProfileFacade = null;\r\n readonly ownProfileBuilder: OwnProfileBuilder = null;\r\n readonly profileBuilder: ProfileBuilder = null;\r\n\r\n constructor(config: SDKConfigurationModel) {\r\n this.profileHttps = new ProfileHttps(config);\r\n this.footballHttps = new FootballHttps(config);\r\n this.idMapping = new IdMappingService(config);\r\n this.localStorage = new LocalStorage(config);\r\n this.footballFacade = new FootballFacade(this.localStorage, this.footballHttps, this.idMapping);\r\n this.profileFacade = new ProfileFacade(this.localStorage, this.profileHttps);\r\n this.ownProfileBuilder = new OwnProfileBuilder(this.localStorage, this.profileHttps, this.idMapping, this.footballHttps);\r\n this.profileBuilder = new ProfileBuilder(this.localStorage, this.profileHttps, this.idMapping, this.footballFacade);\r\n }\r\n\r\n public getOwn = () => {\r\n return this.ownProfileBuilder;\r\n };\r\n\r\n public getById = (id:string) => {\r\n return this.profileBuilder.setId(id);\r\n };\r\n\r\n public getCountries = async () => {\r\n return await this.profileFacade.getCountries();\r\n };\r\n\r\n public getByIds = async (profileIds: string[]) => {\r\n return await this.profileFacade.getByIds(profileIds);\r\n };\r\n\r\n}", "import {LangEnum} from \"../../Enums/LangEnum\";\nimport {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport IValidator from \"./IValidator\";\nimport {ValidationMessageEnum} from \"../../Enums/ValidationMessageEnum\";\nimport {LogEnum} from \"../../Enums/LogEnum\";\nimport MessageLogModel from \"../Models/MessageLogModel\";\nimport SDKConfigurationModel from \"../Models/SDKConfiguraitonModel\";\nimport ValidationItemModel from \"../Models/ValidationItemModel\";\n\nexport default class LangValidator implements IValidator {\n\n public validate = (config: SDKConfigurationModel): ValidationItemModel => {\n let validation: ValidationResponseEnum = this.validateField(config.lang);\n let message: MessageLogModel = this.generateMessage(validation);\n return {validation, message};\n };\n\n private validateField = (lang: string): ValidationResponseEnum => {\n const langValues = [LangEnum.BG, LangEnum.RO, LangEnum.EN];\n let validation: ValidationResponseEnum = null;\n\n if (lang !== undefined && lang !== null && lang.length > 0) {\n if (langValues.includes(lang as LangEnum)) {\n validation = ValidationResponseEnum.VALID_VALUE;\n } else {\n validation = ValidationResponseEnum.INVALID_VALUE;\n }\n } else {\n validation = ValidationResponseEnum.MISSING_VALUE;\n }\n\n return validation;\n };\n\n private generateMessage = (validation: ValidationResponseEnum): MessageLogModel => {\n let text: ValidationMessageEnum = null;\n let type: LogEnum = LogEnum.WARNING;\n\n if (validation === ValidationResponseEnum.MISSING_VALUE) {\n text = ValidationMessageEnum.LANG_MISSING;\n }\n if (validation === ValidationResponseEnum.INVALID_VALUE) {\n text = ValidationMessageEnum.LANG_INVALID;\n }\n if (validation === ValidationResponseEnum.VALID_VALUE) {\n text = null;\n type = null;\n }\n\n\n return {text: text, type: type};\n };\n\n}", "import IValidator from \"./IValidator\";\nimport {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport {ValidationMessageEnum} from \"../../Enums/ValidationMessageEnum\";\nimport {LogEnum} from \"../../Enums/LogEnum\";\nimport {EnvironmentEnum} from \"../../Enums/EnvironmentEnum\";\nimport MessageLogModel from \"../Models/MessageLogModel\";\nimport SDKConfigurationModel from \"../Models/SDKConfiguraitonModel\";\nimport ValidationItemModel from \"../Models/ValidationItemModel\";\n\nexport default class EnvironmentValidator implements IValidator {\n\n validate(arg: SDKConfigurationModel): ValidationItemModel {\n const validation: ValidationResponseEnum = this.validateField(arg.environment);\n const message: MessageLogModel = this.generateMessage(validation);\n\n return {validation, message};\n }\n\n private validateField = (environment: string): ValidationResponseEnum => {\n const environmentValues = [EnvironmentEnum.DEV, EnvironmentEnum.SANDBOX, EnvironmentEnum.PROD];\n let validation: ValidationResponseEnum = null;\n\n if (environment !== undefined && environment !== null && environment.length > 0) {\n if (environmentValues.includes(environment as EnvironmentEnum)) {\n validation = ValidationResponseEnum.VALID_VALUE;\n } else {\n validation = ValidationResponseEnum.INVALID_VALUE;\n }\n } else {\n validation = ValidationResponseEnum.MISSING_VALUE;\n }\n\n return validation;\n };\n\n private generateMessage = (validation: ValidationResponseEnum): MessageLogModel => {\n let text: ValidationMessageEnum = null;\n let type: LogEnum = LogEnum.WARNING;\n\n if (validation === ValidationResponseEnum.MISSING_VALUE) {\n text = ValidationMessageEnum.ENVIRONMENT_MISSING;\n }\n if (validation === ValidationResponseEnum.INVALID_VALUE) {\n text = ValidationMessageEnum.ENVIRONMENT_INVALID;\n }\n if (validation === ValidationResponseEnum.VALID_VALUE) {\n text = null;\n type = null;\n }\n\n\n return {text: text, type: type};\n };\n\n}", "import IValidator from \"./IValidator\";\nimport {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport {ValidationMessageEnum} from \"../../Enums/ValidationMessageEnum\";\nimport {LogEnum} from \"../../Enums/LogEnum\";\nimport SDKConfigurationModel from \"../Models/SDKConfiguraitonModel\";\nimport MessageLogModel from \"../Models/MessageLogModel\";\nimport ValidationItemModel from \"../Models/ValidationItemModel\";\n\nexport default class ApiKeyValidator implements IValidator {\n\n public validate(config: SDKConfigurationModel): ValidationItemModel {\n const validation = this.validateField(config.apiKey);\n const message = this.generateMessage(validation);\n\n return {validation, message};\n }\n\n private validateField = (apiKey: string) => {\n let validation: ValidationResponseEnum = null;\n\n if (apiKey !== undefined && apiKey !== null && apiKey.length > 0) {\n validation = ValidationResponseEnum.VALID_VALUE;\n } else {\n validation = ValidationResponseEnum.MISSING_VALUE;\n }\n\n return validation;\n };\n\n private generateMessage = (validation: ValidationResponseEnum): MessageLogModel => {\n let text: ValidationMessageEnum = null;\n let type: LogEnum = LogEnum.ERROR;\n\n if (validation === ValidationResponseEnum.MISSING_VALUE) {\n text = ValidationMessageEnum.API_KEY;\n }\n if (validation === ValidationResponseEnum.VALID_VALUE) {\n text = null;\n type = null;\n }\n\n\n return {text: text, type: type};\n };\n}", "import IValidator from \"./IValidator\";\nimport {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport {ValidationMessageEnum} from \"../../Enums/ValidationMessageEnum\";\nimport {LogEnum} from \"../../Enums/LogEnum\";\nimport {IdSchemaEnum} from \"../../Enums/IdSchemaEnum\";\nimport SDKConfigurationModel from \"../Models/SDKConfiguraitonModel\";\nimport MessageLogModel from \"../Models/MessageLogModel\";\nimport ValidationItemModel from \"../Models/ValidationItemModel\";\n\nexport default class IdSchemaValidator implements IValidator {\n\n validate(config: SDKConfigurationModel): ValidationItemModel {\n const validation: ValidationResponseEnum = this.validateField(config.idSchema);\n const message: MessageLogModel = this.generateMessage(validation);\n\n return {validation, message};\n }\n\n private validateField = (idSchema: string): ValidationResponseEnum => {\n const idSchemaValues = [IdSchemaEnum.NATIVE, IdSchemaEnum.SPORTAL_365, IdSchemaEnum.ENETPULSE, IdSchemaEnum.SPORTRADAR];\n let validation: ValidationResponseEnum = null;\n\n if (idSchema !== undefined && idSchema !== null && idSchema.length > 0) {\n if (idSchemaValues.includes(idSchema as IdSchemaEnum)) {\n validation = ValidationResponseEnum.VALID_VALUE;\n } else {\n validation = ValidationResponseEnum.INVALID_VALUE;\n }\n } else {\n validation = ValidationResponseEnum.MISSING_VALUE;\n }\n\n return validation;\n };\n\n private generateMessage = (validation: ValidationResponseEnum): MessageLogModel => {\n let text: ValidationMessageEnum = null;\n let type: LogEnum = LogEnum.WARNING;\n\n if (validation === ValidationResponseEnum.MISSING_VALUE) {\n text = ValidationMessageEnum.ID_SCHEMA_MISSING;\n }\n if (validation === ValidationResponseEnum.INVALID_VALUE) {\n text = ValidationMessageEnum.ID_SCHEMA_INVALID;\n }\n if (validation === ValidationResponseEnum.VALID_VALUE) {\n text = null;\n type = null;\n }\n\n\n return {text: text, type: type};\n };\n}", "export default class AuthProviderConfigModel {\n getIdToken: any = null;\n logout: any = null;\n}\n", "import {LogEnum} from \"../../Enums/LogEnum\";\n\nexport default class MessageLogModel {\n text: string = null;\n type: LogEnum = null;\n}", "import {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport MessageLogModel from \"./MessageLogModel\";\n\nexport default class AuthProviderValidationModel {\n validation: ValidationResponseEnum = null;\n message: MessageLogModel = new MessageLogModel();\n getIdToken: any = { validation: null, message: new MessageLogModel() };\n logout: any = { validation: null, message: new MessageLogModel() };\n}\n", "import {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport {ValidationMessageEnum} from \"../../Enums/ValidationMessageEnum\";\nimport {LogEnum} from \"../../Enums/LogEnum\";\nimport AuthProviderConfigModel from \"../Models/AuthProviderConfigModel\";\nimport AuthProviderValidationModel from \"../Models/AuthProviderValidationModel\";\n\n\nexport default class AuthProviderValidator {\n\n validate(arg: any): any {\n let authProviderValidation = this.validateAuthProvider(arg.authProvider);\n if (authProviderValidation.validation !== ValidationResponseEnum.MISSING_VALUE) {\n authProviderValidation = this.validateAuthProviderConfigFields(arg.authProvider, authProviderValidation);\n authProviderValidation = this.generateAuthProviderConfigMessages(authProviderValidation);\n authProviderValidation = this.checkAuthProviderConfigMessagesForErrors(authProviderValidation);\n }\n\n return authProviderValidation;\n };\n\n private validateAuthProvider = (authProvider: any) => {\n const authProviderConfigurationKeys = Object.keys(new AuthProviderConfigModel());\n\n const authProviderValidationModel = new AuthProviderValidationModel();\n\n if (authProvider) {\n const authProviderConfigKeys = Object.keys(authProvider);\n const incorrectKeys = authProviderConfigKeys.filter((key: string) => !authProviderConfigurationKeys.includes(key));\n\n if (incorrectKeys.length > 0) {\n authProviderValidationModel.validation = ValidationResponseEnum.INVALID_VALUE;\n authProviderValidationModel.message.type = LogEnum.WARNING;\n authProviderValidationModel.message.text = `${ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP} ${incorrectKeys.join(',')}`;\n } else {\n authProviderValidationModel.validation = ValidationResponseEnum.VALID_VALUE;\n }\n\n } else {\n authProviderValidationModel.validation = ValidationResponseEnum.MISSING_VALUE;\n authProviderValidationModel.message.type = LogEnum.ERROR;\n authProviderValidationModel.message.text = ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;\n }\n\n return authProviderValidationModel;\n\n };\n\n private validateAuthProviderConfigFields = (authProvider: any, authProviderValidation: any): any => {\n const supportedKeys: string[] = Object.keys(new AuthProviderConfigModel());\n supportedKeys.forEach((key: string) => {\n if (authProvider[key]) {\n authProviderValidation[key].validation = ValidationResponseEnum.VALID_VALUE\n } else {\n authProviderValidation[key].validation = ValidationResponseEnum.MISSING_VALUE\n }\n });\n\n return authProviderValidation;\n };\n\n private generateAuthProviderConfigMessages = (authProviderValidation: AuthProviderValidationModel): any => {\n Object.keys(authProviderValidation).filter((key: string) => key !== 'validation' && key !== 'message').forEach((key: string) => {\n //@ts-ignore\n const obj = authProviderValidation[key];\n\n if (obj.validation === ValidationResponseEnum.MISSING_VALUE) {\n obj.message.text = `${ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING} ${key}`;\n obj.message.type = LogEnum.ERROR;\n }\n });\n\n return authProviderValidation;\n };\n\n private checkAuthProviderConfigMessagesForErrors = (authProviderValidation: AuthProviderValidationModel) => {\n Object.keys(authProviderValidation).filter((key: string) => key !== 'validation' && key !== 'message').forEach((key: string) => {\n //@ts-ignore\n const obj = authProviderValidation[key];\n\n if (obj.validation === ValidationResponseEnum.MISSING_VALUE) {\n if (authProviderValidation.validation === ValidationResponseEnum.VALID_VALUE) {\n authProviderValidation.validation = ValidationResponseEnum.INVALID_VALUE;\n authProviderValidation.message.type = LogEnum.ERROR;\n authProviderValidation.message.text = ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG;\n }\n }\n });\n\n return authProviderValidation;\n };\n}\n", "import {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport MessageLogModel from \"./MessageLogModel\";\n\nexport default class ValidationItemModel {\n validation: ValidationResponseEnum;\n message: MessageLogModel;\n}", "import ValidationItemModel from \"./ValidationItemModel\";\n\nexport default class ConfigValidationModel {\n apiKey: ValidationItemModel = null;\n environment: ValidationItemModel = null;\n idSchema: ValidationItemModel = null;\n clientId: ValidationItemModel = null;\n lang: ValidationItemModel = null;\n authProvider: any = {\n getIdToken: new ValidationItemModel(),\n logout: new ValidationItemModel()\n };\n isValid: boolean = false;\n}", "import IValidator from \"./IValidator\";\nimport {ValidationResponseEnum} from \"../../Enums/ValidationResponseEnum\";\nimport {ValidationMessageEnum} from \"../../Enums/ValidationMessageEnum\";\nimport {LogEnum} from \"../../Enums/LogEnum\";\nimport SDKConfigurationModel from \"../Models/SDKConfiguraitonModel\";\nimport MessageLogModel from \"../Models/MessageLogModel\";\nimport ValidationItemModel from \"../Models/ValidationItemModel\";\n\nexport default class ClientIdValidator implements IValidator {\n\n public validate(config: SDKConfigurationModel): ValidationItemModel {\n const validation = this.validateField(config.clientId);\n const message = this.generateMessage(validation);\n\n return {validation, message};\n }\n\n private validateField = (clientId: string) => {\n let validation: ValidationResponseEnum = null;\n\n if (clientId !== undefined && clientId !== null && clientId.length > 0) {\n validation = ValidationResponseEnum.VALID_VALUE;\n } else {\n validation = ValidationResponseEnum.MISSING_VALUE;\n }\n\n return validation;\n };\n\n private generateMessage = (validation: ValidationResponseEnum): MessageLogModel => {\n let text: ValidationMessageEnum = null;\n let type: LogEnum = LogEnum.WARNING;\n\n if (validation === ValidationResponseEnum.MISSING_VALUE) {\n text = ValidationMessageEnum.CLIENT_ID;\n }\n if (validation === ValidationResponseEnum.VALID_VALUE) {\n text = null;\n type = null;\n }\n\n\n return {text: text, type: type};\n };\n}", "import {ConfigFieldEnum} from \"../Enums/ConfigFieldEnum\";\nimport {LogEnum} from \"../Enums/LogEnum\";\nimport LangValidator from \"./Validators/LangValidator\";\nimport EnvironmentValidator from \"./Validators/EnvironmentValidator\";\nimport ApiKeyValidator from \"./Validators/ApiKeyValidator\";\nimport IdSchemaValidator from \"./Validators/IdSchemaValidator\";\nimport AuthProviderValidator from \"./Validators/AuthProviderValidator\";\nimport SDKConfigurationModel from \"./Models/SDKConfiguraitonModel\";\nimport ConfigValidationModel from \"./Models/ConfigValidationModel\";\nimport ClientIdValidator from \"./Validators/ClientIdValidator\";\n\nexport default class ConfigurationValidator {\n\n /**\n * Validates the SDK configuration and generates a validation model of type @ConfigValidationModel.\n * The validation model contains information about which field is valid and the appropriate message for each field\n * which must be displayed to the developer.\n * @param config\n */\n public validate = (config: SDKConfigurationModel | any): ConfigValidationModel => {\n let configValidation: ConfigValidationModel = this.checkFieldsForValues(config);\n configValidation.isValid = this.containsErrorMessage(configValidation);\n\n return configValidation;\n };\n\n /**\n * Loops through the different config values and adds the proper validation for each one.\n * @param config\n */\n private checkFieldsForValues = (config: SDKConfigurationModel): ConfigValidationModel => {\n let configValidation: ConfigValidationModel = new ConfigValidationModel();\n const validators = {\n apiKey: new ApiKeyValidator(),\n environment: new EnvironmentValidator(),\n idSchema: new IdSchemaValidator(),\n clientId: new ClientIdValidator(),\n lang: new LangValidator(),\n authProvider: new AuthProviderValidator(),\n };\n\n for (let [key, value] of Object.entries(configValidation)) {\n if (key !== 'isValid') {\n value = validators[key as ConfigFieldEnum].validate(config);\n }\n }\n\n Object.keys(validators).forEach((key) => {\n //@ts-ignore\n configValidation[key] = validators[key].validate(config);\n\n })\n\n return configValidation;\n };\n\n /**\n * Checks the messages if there is one of type \"error\" which indicates that the SDK cannot work without it.\n * @param configValidation\n */\n private containsErrorMessage = (configValidation: ConfigValidationModel): boolean => {\n let isValid = true;\n\n for (const [key, value] of Object.entries(configValidation)) {\n if (key !== ConfigFieldEnum.authProvider) {\n if (key !== 'isValid' && value.message.type === LogEnum.ERROR) {\n isValid = false;\n return isValid;\n } else if (key !== \"isValid\" && value.message.type === LogEnum.WARNING) {\n isValid = true;\n return isValid;\n }\n }\n }\n\n return isValid;\n\n }\n}\n", "import SDKConfigurationModel from \"../../Configurator/Models/SDKConfiguraitonModel\";\r\nimport IdMappingService from \"../../IdMapping/IdMappingService\";\r\nimport LocalStorage from \"../../Global/LocalStorage\";\r\nimport FootballHttps from \"../../Https/FootballHttps\";\r\nimport FootballFacade from \"./Facades/FootballFacade\";\r\nimport FootballCountryModel from \"../Football/Models/Country/FootballCountryModel\";\r\nimport CompetitionBasicModel from \"./Models/Competition/CompetitionBasicModel\";\r\nimport CompetitionFullModel from \"./Models/Competition/CompetitionFullModel\";\r\nimport TeamBasicModel from \"./Models/Team/TeamBasicModel\";\r\nimport TeamFullModel from \"./Models/Team/TeamFullModel\";\r\nimport MatchBasicModel from \"./Models/Match/MatchBasicModel\";\r\nimport MatchFullModel from \"./Models/Match/MatchFullModel\";\r\nimport TopPlayerModel from \"./Models/Player/TopPlayerModel\";\r\nimport PlayerBasicModel from \"./Models/Player/PlayerBasicModel\";\r\nimport PlayerFullModel from \"./Models/Player/PlayerFullModel\";\r\nimport SearchModel from \"./Models/Search/SearchModel\";\r\nimport CompetitionFilters from \"./Models/Competition/CompetitionFilters\";\r\nimport TeamFilters from \"./Models/Team/TeamFilters\";\r\nimport MatchFilters from \"./Models/Match/MatchFilters\";\r\nimport PlayerFilters from \"./Models/Player/PlayerFilters\";\r\nimport SearchFilters from \"./Models/Search/SearchFilters\";\r\n\r\n\r\nexport default class Football {\r\n readonly https: FootballHttps = null;\r\n readonly idMapping: IdMappingService = null;\r\n readonly localStorage: LocalStorage = null;\r\n readonly footballFacade: FootballFacade = null;\r\n\r\n constructor(config: SDKConfigurationModel) {\r\n this.https = new FootballHttps(config);\r\n this.idMapping = new IdMappingService(config);\r\n this.localStorage = new LocalStorage(config)\r\n this.footballFacade = new FootballFacade(this.localStorage, this.https, this.idMapping);\r\n }\r\n\r\n public getCountries = async (): Promise<FootballCountryModel[]> => {\r\n const countriesResponse = await this.footballFacade.getCountries();\r\n\r\n return countriesResponse;\r\n };\r\n\r\n public getCompetitions = async (filters?: CompetitionFilters): Promise<CompetitionBasicModel[]> => {\r\n const competitionsResponse = await this.footballFacade.getCompetitions(filters);\r\n\r\n return competitionsResponse;\r\n };\r\n\r\n public getCompetitionById = async (id: string): Promise<CompetitionFullModel> => {\r\n const competitionResponse = await this.footballFacade.getCompetitionById(id)\r\n\r\n return competitionResponse;\r\n };\r\n\r\n public getTopCompetitions = async (): Promise<CompetitionBasicModel[]> => {\r\n const topCompetitionResponse = await this.footballFacade.getTopCompetitions();\r\n\r\n return topCompetitionResponse;\r\n };\r\n\r\n public getTeams = async (filters?: TeamFilters): Promise<TeamBasicModel[]> => {\r\n const teamsResponse = await this.footballFacade.getTeams(filters);\r\n\r\n return teamsResponse;\r\n };\r\n\r\n public getTeamById = async (id: string): Promise<TeamFullModel> => {\r\n const teamResponse = await this.footballFacade.getTeamById(id);\r\n\r\n return teamResponse;\r\n };\r\n\r\n public getTopTeams = async (): Promise<TeamBasicModel[]> => {\r\n const topTeamsResponse = await this.footballFacade.getTopTeams();\r\n\r\n return topTeamsResponse;\r\n };\r\n\r\n public getNextMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n const nextMatchForTeamResponse = await this.footballFacade.getNextMatchForTeam(id);\r\n\r\n return nextMatchForTeamResponse;\r\n };\r\n\r\n public getPrevMatchForTeam = async (id: string): Promise<MatchFullModel> => {\r\n const prevMatchForTeamResponse = await this.footballFacade.getPrevMatchForTeam(id);\r\n\r\n return prevMatchForTeamResponse;\r\n };\r\n\r\n public getPlayers = async (filters?: PlayerFilters): Promise<PlayerBasicModel[]> => {\r\n const playersResponse = await this.footballFacade.getPlayers(filters);\r\n\r\n return playersResponse;\r\n };\r\n\r\n public getPlayerById = async (id: string): Promise<PlayerFullModel> => {\r\n const playerResponse = await this.footballFacade.getPlayerById(id);\r\n\r\n return playerResponse;\r\n };\r\n\r\n public getTopPlayers = async (): Promise<TopPlayerModel[]> => {\r\n const topPlayersResponse = await this.footballFacade.getTopPlayers();\r\n\r\n return topPlayersResponse;\r\n };\r\n\r\n public getNextMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n const nextMatchForPlayerResponse = await this.footballFacade.getNextMatchForPlayer(id);\r\n\r\n return nextMatchForPlayerResponse;\r\n };\r\n\r\n public getPrevMatchForPlayer = async (id: string): Promise<MatchFullModel> => {\r\n const prevMatchForPlayerResponse = await this.footballFacade.getPrevMatchForPlayer(id);\r\n\r\n return prevMatchForPlayerResponse;\r\n };\r\n\r\n public getMatches = async (filters?: MatchFilters): Promise<MatchBasicModel[]> => {\r\n const matchesResponse = await this.footballFacade.getMatches(filters);\r\n\r\n return matchesResponse;\r\n };\r\n\r\n public getMatchById = async (id: string): Promise<MatchFullModel> => {\r\n const matchResponse = await this.footballFacade.getMatchById(id);\r\n\r\n return matchResponse;\r\n };\r\n\r\n public search = async (filters: SearchFilters): Promise<SearchModel> => {\r\n const searchResponse = await this.footballFacade.search(filters);\r\n\r\n return searchResponse;\r\n };\r\n\r\n}\r\n", "import axios, { AxiosInstance } from \"axios\";\r\nimport SDKConfiguraitonModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\nimport PredictionRequestModel from \"../Namespaces/Predictor/Models/Predictions/PredictionRequestModel\";\r\nimport PredictionRemapper from \"../Namespaces/Predictor/Models/Predictions/PredictionRemapper\";\r\nimport PredictionResponseModel from \"../Namespaces/Predictor/Models/Predictions/PredictionResponseModel\";\r\nimport MatchSummaryRemapper from \"../Namespaces/Predictor/Models/Summary/MatchSummaryRemapper\";\r\nimport MatchSummaryModel from \"../Namespaces/Predictor/Models/Summary/MatchSummaryModel\";\r\nimport { setBaseUrl } from \"../Global/Helper\";\r\n\r\nexport default class PredictorHttps {\r\n private instance: AxiosInstance = null;\r\n readonly apiSignInUrl: string = null;\r\n readonly clientApiSignInUrl: string = null;\r\n private predictionRemapper: PredictionRemapper = null;\r\n private matchSummaryRemapper: MatchSummaryRemapper = null;\r\n\r\n constructor(config: SDKConfiguraitonModel) {\r\n const baseUrl = setBaseUrl(config.environment, \"predictor\");\r\n this.apiSignInUrl = `?key=${config.apiKey}&client_id=${config.clientId}`;\r\n this.predictionRemapper = new PredictionRemapper();\r\n this.matchSummaryRemapper = new MatchSummaryRemapper();\r\n\r\n this.instance = axios.create({\r\n baseURL: baseUrl,\r\n headers: {\r\n 'Authorization': `Bearer ${config.authProvider.getIdToken()}`,\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n }\r\n\r\n public makePrediction = async (prediction: PredictionRequestModel): Promise<PredictionResponseModel> => {\r\n try {\r\n const requestData = this.predictionRemapper.remapRequestBody(prediction);\r\n const response = await this.instance.post(`/predictions${this.apiSignInUrl}`, JSON.stringify(requestData));\r\n return this.predictionRemapper.remapResponseBody(response.data);\r\n } catch (e) {\r\n console.warn('There was a problem making POST request: ', e);\r\n return e.message;\r\n }\r\n };\r\n\r\n public getMatchSummary = async (matchId: string): Promise<MatchSummaryModel> => {\r\n try {\r\n const response = await this.instance.get(`/predictions/summary/${matchId}${this.apiSignInUrl}`);\r\n return this.matchSummaryRemapper.remapResponse(response.data);\r\n } catch (e) {\r\n console.warn(`There was a problem fetching predictions for match: ${matchId} `, e);\r\n return e.message;\r\n }\r\n };\r\n\r\n public deletePrediction = async () => { };\r\n\r\n public getMyPredictions = async () => { };\r\n\r\n}", "export enum MarketEnum {\r\n FT_1X2 = 'FT_1X2',\r\n HT_1X2 = \"HT_1X2\",\r\n BOTH_TEAMS_SCORE = \"BOTH_TEAMS_SCORE\",\r\n OVER_GOALS = \"OVER_GOALS\",\r\n OVER_CORNERS = \"OVER_CORNERS\",\r\n DOUBLE_CHANCE = \"DOUBLE_CHANCE\",\r\n HT_FT = \"HT_FT\",\r\n PLAYER_SCORE = \"PLAYER_SCORE\",\r\n PLAYER_YELLOW_CARD = \"PLAYER_YELLOW_CARD\",\r\n PLAYER_RED_CARD = \"PLAYER_RED_CARD\",\r\n RED_CARD_MATCH = \"RED_CARD_MATCH\",\r\n PENALTY_MATCH = \"PENALTY_MATCH\",\r\n PLAYER_SCORE_FIRST_GOAL = \"PLAYER_SCORE_FIRST_GOAL\",\r\n CORNERS_MATCH = \"CORNERS_MATCH\",\r\n CORRECT_SCORE = \"CORRECT_SCORE\",\r\n PLAYER_SCORE_HATTRICK = \"PLAYER_SCORE_HATTRICK\",\r\n PLAYER_SCORE_TWICE = \"PLAYER_SCORE_TWICE\",\r\n}", "import { MarketEnum } from \"../../../../Enums/MarketEnum\";\r\nimport ResultModel from \"./ResultModel\";\r\n\r\nexport default class FixturesResponseModel {\r\n public matchId: string = null;\r\n public matchType: string = null;\r\n public result: ResultModel = null;\r\n public market: MarketEnum = null;\r\n public prediction?: string | boolean;\r\n public target?: string;\r\n public playerId?: string;\r\n public goalsHome?: string;\r\n public goalsAway?: string;\r\n}", "export default class ResultModel {\r\n public settledAt: string = null;\r\n public resettledAt: string = null;\r\n public status: string = null;\r\n public outcome: string = null;\r\n}", "import { MarketEnum } from \"../../../../Enums/MarketEnum\";\r\nimport FixturesRequestModel from \"./FixturesRequestModel\";\r\nimport FixturesResponseModel from \"./FixturesResponseModel\";\r\nimport ResultModel from \"./ResultModel\";\r\n\r\nexport default class FixturesRemapper {\r\n\r\n /**\r\n * Exposing properties control for object fixturesRequest. Some properties from FixturesRequestModel are depending on market value.\r\n * We check the market for properties who are not required. Throws two kinds of error message:\r\n * 1. If some property is not valid for given market.\r\n * 2. If some property is not passed to the fixture.\r\n * @param fixtures\r\n * @returns Remmaped fixture request body.\r\n */\r\n\r\n public remapFixturesRequest = (fixtures: FixturesRequestModel) => {\r\n let fixturesRequest: any = {};\r\n const playerMarkets: string[] = [MarketEnum.PLAYER_RED_CARD, MarketEnum.PLAYER_SCORE, MarketEnum.PLAYER_SCORE_FIRST_GOAL, MarketEnum.PLAYER_SCORE_HATTRICK,\r\n MarketEnum.PLAYER_SCORE_TWICE, MarketEnum.PLAYER_YELLOW_CARD];\r\n\r\n const predictionIsStringWithMarkets: string[] = [MarketEnum.HT_1X2, MarketEnum.HT_FT, MarketEnum.FT_1X2, MarketEnum.DOUBLE_CHANCE, MarketEnum.CORNERS_MATCH];\r\n\r\n const isExpectingPropertyMessage = 'API request body is expecting a property';\r\n const isNotExpectingPropertyMessage = 'API request body is not expecting a property';\r\n\r\n fixturesRequest.match_id = fixtures.matchId;\r\n fixturesRequest.match_type = fixtures.matchType;\r\n fixturesRequest.market = fixtures.market;\r\n\r\n if (fixtures.prediction !== undefined && fixtures.market !== MarketEnum.CORRECT_SCORE) {\r\n fixturesRequest.prediction = fixtures.prediction;\r\n } else if (typeof fixtures.prediction === \"boolean\" && predictionIsStringWithMarkets.includes(fixtures.market)) {\r\n throw new Error(`${isExpectingPropertyMessage} prediction to be type string`);\r\n } else if (typeof fixtures.prediction === \"string\" && !predictionIsStringWithMarkets.includes(fixtures.market)) {\r\n throw new Error(`${isExpectingPropertyMessage} prediction to be type boolean`);\r\n } else if (fixtures.prediction && fixtures.market === MarketEnum.CORRECT_SCORE) {\r\n throw new Error(`${isNotExpectingPropertyMessage} prediction for market: ${MarketEnum.CORRECT_SCORE}`);\r\n } else if (fixtures.prediction === undefined && fixtures.market !== MarketEnum.CORRECT_SCORE) {\r\n throw new Error(`${isExpectingPropertyMessage} prediction`);\r\n }\r\n\r\n if (fixtures.target && (fixtures.market === MarketEnum.OVER_CORNERS || fixtures.market === MarketEnum.OVER_GOALS)) {\r\n fixturesRequest.target = fixtures.target;\r\n } else if (fixtures.target && (fixtures.market !== MarketEnum.OVER_CORNERS && fixtures.market !== MarketEnum.OVER_GOALS)) {\r\n throw new Error(`${isNotExpectingPropertyMessage} target`);\r\n } else if (!fixtures.target && (fixtures.market === MarketEnum.OVER_CORNERS || fixtures.market === MarketEnum.OVER_GOALS)) {\r\n throw new Error(`${isExpectingPropertyMessage} target for the following markets: ${MarketEnum.OVER_GOALS} and ${MarketEnum.OVER_CORNERS}`);\r\n }\r\n\r\n if (fixtures.playerId && playerMarkets.includes(fixtures.market)) {\r\n fixturesRequest.player_id = fixtures.playerId;\r\n } else if (fixtures.playerId && !playerMarkets.includes(fixtures.market)) {\r\n throw new Error(`${isNotExpectingPropertyMessage} playerId for market: ${fixtures.market}`);\r\n } else if (!fixtures.playerId && playerMarkets.includes(fixtures.market)) {\r\n throw new Error(`${isExpectingPropertyMessage} playerId for market: ${fixtures.market}`);\r\n }\r\n\r\n if (fixtures.goalsHome && fixtures.goalsAway && fixtures.market === MarketEnum.CORRECT_SCORE) {\r\n fixturesRequest.goals_home = fixtures.goalsHome;\r\n fixturesRequest.goals_away = fixtures.goalsAway;\r\n } else if ((fixtures.goalsHome || fixtures.goalsAway) && fixtures.market !== MarketEnum.CORRECT_SCORE) {\r\n throw new Error('API request body is not expecting the following properties: goalsHome and goalsAway');\r\n } else if ((!fixtures.goalsHome || !fixtures.goalsAway) && fixtures.market === MarketEnum.CORRECT_SCORE) {\r\n throw new Error('API request body is expecting the following properties: goalsHome and goalsAway');\r\n }\r\n\r\n return fixturesRequest;\r\n };\r\n\r\n public remapFixturesResponse = (response: any) => {\r\n let fixturesResponse = new FixturesResponseModel();\r\n\r\n fixturesResponse.matchId = response.match_id;\r\n fixturesResponse.matchType = response.match_type;\r\n fixturesResponse.result = this.remapResult(response.result);\r\n fixturesResponse.market = response.market;\r\n\r\n if (response.prediction !== undefined) {\r\n fixturesResponse.prediction = response.prediction;\r\n }\r\n\r\n if (response.target) {\r\n fixturesResponse.target = response.target;\r\n }\r\n\r\n if (response.player_id) {\r\n fixturesResponse.playerId = response.player_id;\r\n }\r\n\r\n if (response.goals_home) {\r\n fixturesResponse.goalsHome = response.goals_home;\r\n }\r\n\r\n if (response.goals_away) {\r\n fixturesResponse.goalsAway = response.goals_away;\r\n }\r\n\r\n return fixturesResponse;\r\n };\r\n\r\n private remapResult = (result: any) => {\r\n let resultResponse = new ResultModel();\r\n\r\n resultResponse.settledAt = result.settled_at;\r\n resultResponse.resettledAt = result.resettled_at;\r\n resultResponse.status = result.status;\r\n resultResponse.outcome = result.outcome;\r\n\r\n return resultResponse;\r\n };\r\n\r\n}", "import FixturesResponseModel from \"../Fixtures/FixturesResponseModel\";\r\n\r\nexport default class PredictionResponseModel {\r\n public id: string = null;\r\n public gameInstanceId: string = null;\r\n public wager: number = null;\r\n public totalFixtures: number = null;\r\n public settledFixtures: number = null;\r\n public userId: string = null;\r\n public fixtures: FixturesResponseModel[] = null;\r\n public status: string = null;\r\n public tiebreaker: any = null;\r\n public points: number = null;\r\n public createdAt: string = null;\r\n public updatedAt: string = null;\r\n}", "export default class PredictionsModel {\r\n public fullTimeOneXTwo: any = {};\r\n public halfTimeOneXTwo: any = {};\r\n public bothTeamsScore: any = {};\r\n public overGoals: any = {};\r\n public overCorners: any = {};\r\n public doubleChance: any = {};\r\n public halfTimeFullTime: any = {};\r\n public playerScore: any = {};\r\n public playerYellowCard: any = {};\r\n public playerRedCard: any = {};\r\n public redCardMatch: any = {};\r\n public penaltyMatch: any = {};\r\n public playerScoreFirstGoal: any = {};\r\n public cornersMatch: any = {};\r\n public correctScore: any = {};\r\n public playerScoreHattrick: any = {};\r\n public playerScoreTwice: any = {};\r\n\r\n}", "import FixturesRemapper from \"../Fixtures/FixturesRemapper\";\r\nimport PredictionRequestModel from \"./PredictionRequestModel\";\r\nimport PredictionResponseModel from \"./PredictionResponseModel\";\r\nimport PredictionsModel from \"./PredictionsModel\";\r\n\r\nexport default class PredictionRemapper {\r\n private fixturesRemapper: FixturesRemapper = null;\r\n\r\n constructor() {\r\n this.fixturesRemapper = new FixturesRemapper();\r\n }\r\n\r\n public remapRequestBody = (prediction: PredictionRequestModel) => {\r\n let requestBody: any = {};\r\n\r\n requestBody.game_instance_id = prediction.gameInstanceId;\r\n requestBody.fixtures = prediction.fixtures.map((fixture: any) => this.fixturesRemapper.remapFixturesRequest(fixture));\r\n\r\n return requestBody;\r\n };\r\n\r\n public remapResponseBody = (response: any): PredictionResponseModel => {\r\n let predictionResponse = new PredictionResponseModel();\r\n\r\n predictionResponse.id = response.id;\r\n predictionResponse.gameInstanceId = response.game_instance_id;\r\n predictionResponse.wager = response.wager;\r\n predictionResponse.totalFixtures = response.total_fixtures;\r\n predictionResponse.settledFixtures = response.settled_fixtures;\r\n predictionResponse.userId = response.user_id;\r\n predictionResponse.fixtures = response.fixtures.map((fixture: any) => this.fixturesRemapper.remapFixturesResponse(fixture));\r\n predictionResponse.status = response.status;\r\n predictionResponse.tiebreaker = response.tiebreaker;\r\n predictionResponse.points = response.points;\r\n predictionResponse.createdAt = response.created_at;\r\n predictionResponse.updatedAt = response.updated_at;\r\n\r\n return predictionResponse;\r\n };\r\n\r\n public remapPredictionModel = (response: any): PredictionsModel => {\r\n let predictionsModel = new PredictionsModel();\r\n\r\n predictionsModel.fullTimeOneXTwo = response.FT_1X2;\r\n predictionsModel.halfTimeOneXTwo = response.HT_1X2;\r\n predictionsModel.bothTeamsScore = response.BOTH_TEAMS_SCORE;\r\n predictionsModel.overGoals = response.OVER_GOALS;\r\n predictionsModel.overCorners = response.OVER_CORNERS;\r\n predictionsModel.doubleChance = response.DOUBLE_CHANCE;\r\n predictionsModel.halfTimeFullTime = response.HT_FT;\r\n predictionsModel.playerScore = response.PLAYER_SCORE;\r\n predictionsModel.playerYellowCard = response.PLAYER_YELLOW_CARD;\r\n predictionsModel.playerRedCard = response.PLAYER_RED_CARD;\r\n predictionsModel.redCardMatch = response.RED_CARD_MATCH;\r\n predictionsModel.penaltyMatch = response.PENALTY_MATCH;\r\n predictionsModel.playerScoreFirstGoal = response.PLAYER_SCORE_FIRST_GOAL;\r\n predictionsModel.cornersMatch = response.CORNERS_MATCH;\r\n predictionsModel.correctScore = response.CORRECT_SCORE;\r\n predictionsModel.playerScoreHattrick = response.PLAYER_SCORE_HATTRICK;\r\n predictionsModel.playerScoreTwice = response.PLAYER_SCORE_TWICE;\r\n\r\n return predictionsModel;\r\n };\r\n\r\n}", "import PredictionsModel from \"../Predictions/PredictionsModel\";\r\n\r\nexport default class MatchSummaryModel {\r\n public matchId: string = null;\r\n public matchType: string = null;\r\n public predictions: PredictionsModel = null;\r\n}", "import PredictionRemapper from \"../Predictions/PredictionRemapper\";\r\nimport MatchSummaryModel from \"./MatchSummaryModel\";\r\n\r\nexport default class MatchSummaryRemapper {\r\n private remapPredictions: PredictionRemapper = null;\r\n\r\n constructor() {\r\n this.remapPredictions = new PredictionRemapper();\r\n }\r\n\r\n public remapResponse = (response: any): MatchSummaryModel => {\r\n let matchSummary = new MatchSummaryModel();\r\n\r\n matchSummary.matchId = response.match_id;\r\n matchSummary.matchType = response.match_type;\r\n matchSummary.predictions = this.remapPredictions.remapPredictionModel(response.predictions);\r\n\r\n return matchSummary;\r\n };\r\n}", "import MarketsConfigModel from \"./MarketsConfigModel\";\r\n\r\nexport default class PredictorConfigModel {\r\n public fullCoverageCompetitions: string[] = null;\r\n public markets: MarketsConfigModel = null;\r\n}", "import PredictorConfigModel from \"./PredictorConfigModel\";\r\n\r\nexport default class PredictorConfigRemapper {\r\n\r\n public remapConfig = (response:any) => {\r\n let model = new PredictorConfigModel();\r\n\r\n model.fullCoverageCompetitions = response.full_coverage_competitions;\r\n model.markets = response.markets;\r\n\r\n return model;\r\n };\r\n}", "import FixturesRequestModel from \"../Fixtures/FixturesRequestModel\";\r\n\r\nexport default class PredictionRequestModel {\r\n public gameInstanceId: string = null;\r\n public fixtures: FixturesRequestModel[] = null;\r\n}", "import { MarketEnum } from \"../../../Enums/MarketEnum\";\r\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\r\nimport PredictionsModel from \"../Models/Predictions/PredictionsModel\";\r\n\r\nexport default class PredictorService {\r\n readonly idMapping: IdMappingService = null;\r\n\r\n constructor(idMapping: IdMappingService) {\r\n this.idMapping = idMapping;\r\n }\r\n\r\n public remapMatchIdToNative = async (matchId: string[]) => {\r\n const objMatchId = await this.idMapping.getEntityIdsBySchemaId(matchId, \"match\", \"native\");\r\n const nativeMatchId = objMatchId.match[0];\r\n\r\n return nativeMatchId;\r\n };\r\n\r\n public remapPlayerIdToNative = async (playerId: string[]) => {\r\n const objPlayerId = await this.idMapping.getEntityIdsBySchemaId(playerId, \"player\", \"native\");\r\n const nativePlayerId = objPlayerId.player[0];\r\n\r\n return nativePlayerId;\r\n };\r\n\r\n /**\r\n * In case there is prediction with player market, it property's name is the player id itself so it will be remaped to idSchema.\r\n * @param predictions\r\n * @returns Predictions with remapped ids.\r\n */\r\n\r\n public remapPlayerIdToIdSchema = async (predictions: PredictionsModel) => {\r\n const playerMarkets = [\"playerScore\", \"playerYellowCard\", \"playerRedCard\", \"playerScoreFirstGoal\", \"playerScoreHattrick\", \"playerScoreTwice\"];\r\n\r\n for (const [key, value] of Object.entries(predictions)) {\r\n if (playerMarkets.includes(key)) {\r\n for (const key of Object.keys(value)) {\r\n const objPlayerId = { player: [key] };\r\n const objRemappedId = await this.idMapping.idMappingFacade.getEntitiesByIds(objPlayerId, \"native\", this.idMapping.idSchema);\r\n const newId = objRemappedId.player[0];\r\n value[newId] = value[key];\r\n delete value[key];\r\n }\r\n }\r\n }\r\n\r\n return predictions;\r\n };\r\n\r\n /**\r\n * Convert market from snake case to camel case.\r\n * @param market\r\n * @returns Market in camel case.\r\n */\r\n\r\n public convertMarket = (market: any): string => {\r\n const keys = Object.keys(new PredictionsModel());\r\n const markets = Object.values(MarketEnum);\r\n\r\n for (let i = 0; i < markets.length; i++) {\r\n if (market === markets[i]) {\r\n market = keys[i];\r\n }\r\n }\r\n\r\n return market;\r\n };\r\n}", "import { IdSchemaEnum } from \"../../../Enums/IdSchemaEnum\";\r\nimport { MarketEnum } from \"../../../Enums/MarketEnum\";\r\nimport ClientHttps from \"../../../Https/ClientHttps\";\r\nimport PredictorHttps from \"../../../Https/PredictorHttps\";\r\nimport IdMappingService from \"../../../IdMapping/IdMappingService\";\r\nimport PredictorConfigModel from \"../Models/Config/PredictorConfigModel\";\r\nimport PredictorConfigRemapper from \"../Models/Config/PredictorConfigRemapper\";\r\nimport FixturesRequestModel from \"../Models/Fixtures/FixturesRequestModel\";\r\nimport FixturesResponseModel from \"../Models/Fixtures/FixturesResponseModel\";\r\nimport PredictionRequestModel from \"../Models/Predictions/PredictionRequestModel\";\r\nimport PredictionResponseModel from \"../Models/Predictions/PredictionResponseModel\";\r\nimport MatchSummaryModel from \"../Models/Summary/MatchSummaryModel\";\r\nimport PredictorService from \"../Service/PredictorService\";\r\n\r\nexport default class PredictorFacade {\r\n readonly predictorHttps: PredictorHttps = null;\r\n readonly clientHttps: ClientHttps = null;\r\n readonly idMapping: IdMappingService = null;\r\n readonly predictorConfigRemapper: PredictorConfigRemapper = null;\r\n readonly predictorService: PredictorService = null;\r\n\r\n constructor(predictorHttps: PredictorHttps, clientHttps: ClientHttps, idMapping: IdMappingService) {\r\n this.predictorHttps = predictorHttps;\r\n this.idMapping = idMapping;\r\n this.clientHttps = clientHttps;\r\n this.predictorConfigRemapper = new PredictorConfigRemapper();\r\n this.predictorService = new PredictorService(idMapping);\r\n }\r\n\r\n /**\r\n * Using PredictorService to perform id mapping for matchId and playerId in request body.\r\n * @param fixture\r\n * @returns Fixture response from Prediction API. Ids are remapped if idSchema is different from native.\r\n */\r\n\r\n public makePrediction = async (fixture: FixturesRequestModel): Promise<PredictionResponseModel> => {\r\n let predictionRequest = new PredictionRequestModel();\r\n\r\n if (this.idMapping.idSchema !== IdSchemaEnum.NATIVE) {\r\n const originalMatchId = fixture.matchId;\r\n const originalPlayerId = fixture.playerId;\r\n\r\n fixture.matchId = await this.predictorService.remapMatchIdToNative([originalMatchId]);\r\n\r\n if (originalPlayerId) {\r\n fixture.playerId = await this.predictorService.remapPlayerIdToNative([originalPlayerId]);\r\n }\r\n\r\n predictionRequest.fixtures = [fixture];\r\n const predictionResponse = await this.predictorHttps.makePrediction(predictionRequest);\r\n\r\n //predictionResponse can contain error message from Prediction API\r\n if (predictionResponse instanceof PredictionResponseModel) {\r\n predictionResponse.fixtures.map((fixtureResponse: FixturesResponseModel) => {\r\n if (fixtureResponse.playerId) {\r\n fixtureResponse.playerId = originalPlayerId;\r\n }\r\n fixtureResponse.matchId = originalMatchId;\r\n });\r\n\r\n return predictionResponse;\r\n }\r\n\r\n return predictionResponse;\r\n } else {\r\n predictionRequest.fixtures = [fixture];\r\n\r\n return await this.predictorHttps.makePrediction(predictionRequest);\r\n }\r\n };\r\n\r\n /**\r\n * Using PredictorService to perform id mapping for matchId in request body. The response body contains all markets in property predictions.\r\n * In case there is prediction with player market, it property's name is the player id itself so it will be remaped to idSchema.\r\n * @param matchId\r\n * @returns Match summary with all predictions for it. Ids are remapped if idSchema is different from native.\r\n */\r\n\r\n public getMatchSummary = async (matchId: string): Promise<MatchSummaryModel> => {\r\n if (this.idMapping.idSchema !== IdSchemaEnum.NATIVE) {\r\n const nativeId = await this.predictorService.remapMatchIdToNative([matchId]);\r\n\r\n const matchSummaryResponse = await this.predictorHttps.getMatchSummary(nativeId);\r\n matchSummaryResponse.matchId = matchId;\r\n\r\n const predictionsToRemap = matchSummaryResponse.predictions;\r\n const remappedIdsPredictions = await this.predictorService.remapPlayerIdToIdSchema(predictionsToRemap);\r\n matchSummaryResponse.predictions = remappedIdsPredictions;\r\n\r\n return matchSummaryResponse;\r\n } else {\r\n return await this.predictorHttps.getMatchSummary(matchId);\r\n }\r\n };\r\n\r\n public getMarketSummary = async (matchId: string, market: MarketEnum): Promise<any> => {\r\n try {\r\n const matchSummary = await this.getMatchSummary(matchId);\r\n const convertedMarket = this.predictorService.convertMarket(market);\r\n let marketSummary: any = {};\r\n marketSummary.matchId = matchSummary.matchId;\r\n marketSummary.matchType = matchSummary.matchType;\r\n\r\n const markets = Object.keys(matchSummary.predictions);\r\n\r\n if (markets.includes(convertedMarket)) {\r\n //@ts-ignore\r\n marketSummary[convertedMarket] = matchSummary.predictions[convertedMarket];\r\n }\r\n\r\n if (!marketSummary.hasOwnProperty(convertedMarket)) {\r\n throw new Error(\"You have passed invalid market\");\r\n }\r\n\r\n return marketSummary;\r\n } catch (e) {\r\n return e.message;\r\n }\r\n };\r\n\r\n public getConfig = async (): Promise<PredictorConfigModel> => {\r\n const response = await this.clientHttps.getConfig();\r\n const config = await this.predictorConfigRemapper.remapConfig(response.predictor)\r\n\r\n if (this.idMapping.idSchema !== IdSchemaEnum.NATIVE) {\r\n const objCompetitionIds = { competition: config.fullCoverageCompetitions };\r\n\r\n const remappedIds = await this.idMapping.idMappingFacade.getEntitiesByIds(objCompetitionIds, \"native\", this.idMapping.idSchema);\r\n config.fullCoverageCompetitions = remappedIds.competition;\r\n\r\n return config;\r\n }\r\n\r\n return config;\r\n };\r\n\r\n public deletePrediction = () => { };\r\n\r\n public getMyPredictions = () => { };\r\n\r\n public getUserPastPredictions = () => { };\r\n\r\n public getUserCurrentPredictions = () => { };\r\n}", "import axios, { AxiosInstance } from \"axios\";\r\nimport { setBaseUrl } from \"../Global/Helper\";\r\nimport SDKConfigurationModel from \"../Configurator/Models/SDKConfiguraitonModel\";\r\n\r\nexport default class ClientHttps {\r\n private instance: AxiosInstance = null;\r\n readonly apiSignInUrl: string = '';\r\n\r\n constructor(config: SDKConfigurationModel) {\r\n const baseUrl = setBaseUrl(config.environment, \"client\");\r\n this.apiSignInUrl = `/clients/${config.clientId}/features?key=${config.apiKey}`;\r\n\r\n this.instance = axios.create({\r\n baseURL: baseUrl,\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n }\r\n });\r\n\r\n }\r\n\r\n public getConfig = async (): Promise<any> => {\r\n try {\r\n const response = await this.instance.get(`${this.apiSignInUrl}`);\r\n\r\n return response.data.data;\r\n } catch (e) {\r\n console.warn('There was a problem fetching configuration from Client API', e);\r\n return e.message;\r\n }\r\n };\r\n}", "import SDKConfigurationModel from \"../../Configurator/Models/SDKConfiguraitonModel\";\r\nimport PredictorHttps from \"../../Https/PredictorHttps\";\r\nimport IdMappingService from \"../../IdMapping/IdMappingService\";\r\nimport PredictorFacade from \"./Facade/PredictorFacade\";\r\nimport PredictorConfigModel from \"./Models/Config/PredictorConfigModel\";\r\nimport FixturesRequestModel from \"./Models/Fixtures/FixturesRequestModel\";\r\nimport PredictionResponseModel from \"./Models/Predictions/PredictionResponseModel\";\r\nimport MatchSummaryModel from \"./Models/Summary/MatchSummaryModel\";\r\nimport { MarketEnum } from \"../../Enums/MarketEnum\";\r\nimport ClientHttps from \"../../Https/ClientHttps\";\r\n\r\nexport default class Predictor {\r\n readonly predictorHttps: PredictorHttps = null;\r\n readonly clientHttps: ClientHttps = null;\r\n readonly predictorFacade: PredictorFacade = null;\r\n readonly idMapping: IdMappingService = null;\r\n\r\n constructor(config: SDKConfigurationModel) {\r\n this.predictorHttps = new PredictorHttps(config);\r\n this.clientHttps = new ClientHttps(config);\r\n this.idMapping = new IdMappingService(config);\r\n this.predictorFacade = new PredictorFacade(this.predictorHttps, this.clientHttps, this.idMapping);\r\n }\r\n\r\n public makePrediction = async (prediction: FixturesRequestModel): Promise<PredictionResponseModel> => {\r\n return await this.predictorFacade.makePrediction(prediction);\r\n };\r\n\r\n public getMatchSummary = async (matchId: string): Promise<MatchSummaryModel> => {\r\n return await this.predictorFacade.getMatchSummary(matchId);\r\n };\r\n\r\n public getMarketSummary = async (matchId: string, market: MarketEnum): Promise<any> => {\r\n return await this.predictorFacade.getMarketSummary(matchId, market);\r\n };\r\n\r\n public getConfig = async (): Promise<PredictorConfigModel> => {\r\n return await this.predictorFacade.getConfig();\r\n };\r\n\r\n public deletePrediction = () => { };\r\n\r\n public getMyPredictions = () => { };\r\n\r\n public getUserPastPredictions = () => { };\r\n\r\n public getUserCurrentPredictions = () => { };\r\n}", "export default class BadgesModel {\r\n public general: any[] = [];\r\n public predictor: any[] = [];\r\n public topX: any[] = [];\r\n}", "import RewardsModel from \"./Rewards/RewardsModel\";\r\n\r\nexport default class LoyaltyModel {\r\n public enabled: boolean = false;\r\n public rewards: RewardsModel = null;\r\n}", "import Points from \"./Points\";\r\n\r\nexport default class PointsModel {\r\n public general: Points[] = null;\r\n public topX: Points[] = null;\r\n public predictor: Points[] = null;\r\n}", "import PointsModel from \"../Points/PointsModel\";\r\nimport TiersModel from \"../Tiers/TiersModel\";\r\nimport BadgesModel from \"../Badges/BadgesModel\";\r\n\r\nexport default class RewardsModel {\r\n public points: PointsModel = null;\r\n public tiers: TiersModel[] = null;\r\n public badges: BadgesModel = null;\r\n}", "import BadgesModel from \"./Badges/BadgesModel\";\r\nimport LoyaltyModel from \"./LoyaltyModel\";\r\nimport PointsModel from \"./Points/PointsModel\";\r\nimport RewardsModel from \"./Rewards/RewardsModel\";\r\n\r\nexport default class LoyaltyRemapper {\r\n\r\n public remapLoyaltyResponse = (loyalty: any): LoyaltyModel => {\r\n const loyaltyModel = new LoyaltyModel()\r\n\r\n loyaltyModel.enabled = loyalty.enabled;\r\n loyaltyModel.rewards = this.remapRewards(loyalty.rewards)\r\n\r\n return loyaltyModel;\r\n };\r\n\r\n private remapRewards = (rewards: any): RewardsModel => {\r\n const rewardsModel = new RewardsModel();\r\n\r\n rewardsModel.points = this.remapPoints(rewards.points);\r\n rewardsModel.tiers = rewards.tiers;\r\n rewardsModel.badges = this.remapBadges(rewards.badges);\r\n\r\n return rewardsModel;\r\n };\r\n\r\n private remapPoints = (points: any): PointsModel => {\r\n const pointsModel = new PointsModel();\r\n\r\n pointsModel.general = points.general;\r\n pointsModel.topX = points.top_x;\r\n pointsModel.predictor = points.predictor;\r\n\r\n return pointsModel;\r\n };\r\n\r\n private remapBadges = (badges: any): BadgesModel => {\r\n const badgesModel = new BadgesModel();\r\n\r\n badgesModel.general = badges.general;\r\n badgesModel.predictor = badges.predictor;\r\n badgesModel.topX = badges.top_x;\r\n\r\n return badgesModel;\r\n };\r\n}", "import ClientHttps from \"../../../Https/ClientHttps\";\r\nimport LoyaltyModel from \"../Models/LoyaltyModel\";\r\nimport LoyaltyRemapper from \"../Models/LoyaltyRemapper\";\r\n\r\nexport default class LoyaltyFacade {\r\n readonly https: ClientHttps = null;\r\n readonly loyaltyRemapper: LoyaltyRemapper = null;\r\n\r\n constructor(https: ClientHttps) {\r\n this.https = https;\r\n this.loyaltyRemapper = new LoyaltyRemapper();\r\n }\r\n\r\n public getConfig = async (): Promise<LoyaltyModel> => {\r\n const response = await this.https.getConfig();\r\n\r\n return this.loyaltyRemapper.remapLoyaltyResponse(response.loyalty);\r\n };\r\n}", "import SDKConfigurationModel from \"../../Configurator/Models/SDKConfiguraitonModel\";\r\nimport ClientHttps from \"../../Https/ClientHttps\";\r\nimport LoyaltyFacade from \"./Facade/LoyaltyFacade\";\r\nimport LoyaltyModel from \"./Models/LoyaltyModel\";\r\n\r\nexport default class Loyalty {\r\n readonly https: ClientHttps = null;\r\n readonly loyaltyFacade: LoyaltyFacade = null;\r\n\r\n constructor(config: SDKConfigurationModel) {\r\n this.https = new ClientHttps(config);\r\n this.loyaltyFacade = new LoyaltyFacade(this.https);\r\n }\r\n\r\n public getConfig = async (): Promise<LoyaltyModel> => {\r\n return await this.loyaltyFacade.getConfig();\r\n };\r\n}", "import Profile from \"./Core/Namespaces/Profile/Profile\";\nimport SDKConfigurationModel from \"./Core/Configurator/Models/SDKConfiguraitonModel\";\nimport ConfigurationValidator from \"./Core/Configurator/ConfigurationValidator\";\nimport Football from \"./Core/Namespaces/Football/Football\";\nimport { IdSchemaEnum } from \"./Core/Enums/IdSchemaEnum\";\nimport Predictor from \"./Core/Namespaces/Predictor/Predictor\";\nimport Loyalty from \"./Core/Namespaces/Loyalty/Loyalty\";\n\nexport function FansUnitedSDK(config: SDKConfigurationModel){\n const configValidator = new ConfigurationValidator();\n const validation = configValidator.validate(config);\n\n if (!config.idSchema) {\n config.idSchema = IdSchemaEnum.NATIVE;\n }\n\n return {\n profile: new Profile(config),\n football: new Football(config),\n predictor: new Predictor(config),\n loyalty: new Loyalty(config)\n }\n}\n"],
5
+ "mappings": "omBAAA,gCAEA,GAAO,QAAU,SAAc,EAAI,EAAS,CAC1C,MAAO,WAAgB,CAErB,OADI,GAAO,GAAI,OAAM,UAAU,QACtB,EAAI,EAAG,EAAI,EAAK,OAAQ,IAC/B,EAAK,GAAK,UAAU,GAEtB,MAAO,GAAG,MAAM,EAAS,OCR7B,+BAEA,GAAI,IAAO,KAIP,EAAW,OAAO,UAAU,SAQhC,YAAiB,EAAK,CACpB,MAAO,GAAS,KAAK,KAAS,iBAShC,YAAqB,EAAK,CACxB,MAAO,OAAO,IAAQ,YASxB,YAAkB,EAAK,CACrB,MAAO,KAAQ,MAAQ,CAAC,GAAY,IAAQ,EAAI,cAAgB,MAAQ,CAAC,GAAY,EAAI,cACpF,MAAO,GAAI,YAAY,UAAa,YAAc,EAAI,YAAY,SAAS,GASlF,YAAuB,EAAK,CAC1B,MAAO,GAAS,KAAK,KAAS,uBAShC,YAAoB,EAAK,CACvB,MAAQ,OAAO,WAAa,aAAiB,YAAe,UAS9D,YAA2B,EAAK,CAC9B,GAAI,GACJ,MAAK,OAAO,cAAgB,aAAiB,YAAY,OACvD,EAAS,YAAY,OA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