1(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ 2// ! 3// Run gulp js_browserify after making changes to this file to see them applied in the browser. 4 5const { 6 ApiClientStomp, 7 AchievementsApiWs, 8 AchievementRequest, 9 OptInApiWs, 10 ManageOptinRequest, 11 OptInStatesRequest, 12 GraphsApiWs, 13 EntityGraphRequest, 14 ContestsApiWs, 15 ContestRequest, 16 LeaderboardApiWs, 17 LeaderboardSubscriptionRequest, 18 RewardsApiWs, 19 RewardRequest, 20 CompetitionsApiWs, 21 CompetitionRequest, 22 AwardsApiWs, 23 AwardRequest, 24 ClaimAwardRequest, 25 // MissionsApiWs, 26 // MissionStatesRequest, 27}
27 = require('@ziqni-tech/member-api-client'); 28 29System.register([], function (_export, _context) { 30 let achievementsApiWsClient = null; 31 let optInApiWsClient = null; 32 let graphsApiWsClient = null; 33 let contestsApiWsClient = null; 34 let leaderboardApiWsClient = null; 35 let rewardsApiWsClient = null; 36 let competitionsApiWsClient = null; 37 let awardsApiWsClient = null; 38 // let missionsApiWsClient = null; 39 let onOptinStatusChange = () => {}; 40 let getCompetitionsOptInStatsCb = () => {}; 41 let onAwardReceived = () => {}; 42 43 return { 44 execute: function () { 45 _export({ 46 currentPromotions: [], 47 competitionsOptInStats: {}, 48 missions: [], 49 contests: [], 50 competitions: [], 51 getOptInStatLocal: function (entityId, type = 'Achievement') { 52 if (type === 'Achievement') return this.currentPromotions.find(item => entityId === item.id)?.optInStatus; 53 if (type === 'Competition') return this.competitionsOptInStats[entityId]; 54 }, 55 setOptInStatLocal: function (entity, type = 'Achievement') { 56 let optInStat; 57 let promo; 58 59 if ((entity.entityType || type) === 'Competition') { 60 optInStat = this.competitionsOptInStats[entity.entityId]; 61 62 if (!optInStat) { 63 this.competitionsOptInStats[entity.entityId] = {}; 64 optInStat = this.competitionsOptInStats[entity.entityId]; 65 } 66 } 67 68 if ((entity.entityType || type) === 'Achievement') { 69 promo = this.currentPromotions.find(item => entity.entityId === item.id); 70 optInStat = promo?.optInStatus; 71 72 if (!optInStat) { 73 optInStat = {}; 74 if (!promo) { 75 this.currentPromotions.push({id: entity.entityId, optInStatus: optInStat}); 76 } else { 77 promo.optInStatus = optInStat; 78 } 79 } 80 } 81 82 if (entity.status) optInStat.status = entity.status; 83 if (entity.statusCode || entity.currentState) optInStat.statusCode = entity.statusCode ?? entity.currentState; 84 if (entity.metadata?.percentageComplete || entity.percentageComplete) 85 optInStat.percentageComplete = entity.metadata?.percentageComplete || entity.percentageComplete; 86 if (entity.points) optInStat.points = entity.points; 87 88 if (promo?.strategies?.pointsStrategy?.pointsValue) { 89 if (entity.points === 0 && entity.percentageComplete > 0) { 90 optInStat.points = this.getOptInPointsBasedOnPercentage(promo, entity); 91 } 92 } 93 }, 94 getOptInPointsBasedOnPercentage: function (promo, optInStat) { 95 return Math.floor(optInStat.percentageComplete / 100 * promo.strategies.pointsStrategy.pointsValue); 96 }, 97 setUpConnection: async function (token) { 98 const apiClientStomp = ApiClientStomp.instance; 99 100 apiClientStomp.sysCallBack = (message, headers) => { 101 if (headers.objectType === 'EntityStateChanged' 102 || headers.objectType === 'OptinStatus' 103 ) { 104 if (!['Achievement', 'Competition'].includes(message.entityType)) return; 105 106 this.setOptInStatLocal(message); 107 onOptinStatusChange(message.entityId); 108 109 if (message.entityType === 'Achievement') { 110 updateZiqniLoyaltyStatusToHeaderBar(message); 111 } 112 } 113 // Claimed award 114 // "MESSAGE\ncallback:entityChanged\nobjectType:EntityChanged\nsid:vfhq1gmo\ndestination: 115 // /user/queue/callbacks\ncontent-type:application/json\nsubscription:sub-1\nmessage-id:vfhq1gmo-1556\ncontent-length:393\n\n 116 // {\"entityId\":\"4iDAKI8BPp-fwwYTA1CX\",\"entityType\":\"Award\",\"changedAt\":\"2024-04-29T07:27:05.347Z\",\"typeOffChange\":1,\"changedBy\":\"ziqni-state\", 117 // \"displayName\":\"Loyalty FS Tier 1\",\"accountId\":\"FMbS7YwB6Jt8yN-tFi_X\",\"sequenceNumber\":1,\"entityRefId\":\"NVM8Eo8B9NMw64nNGEbN\", 118 // \"entityParentId\":\"8JPs6o4B9NMw64nNUjNW\",\"metadata\":{\"claimed\":true,\"parentType\":\"Achievement\",\"parentId\":\"SJNuDY4BsdoncgxKNZ2I\"}}\u0000" 119 120 // Unclaimed award 121 // "MESSAGE\ncallback:entityChanged\nobjectType:EntityChanged\nsid:3m1fbnkx\ndestination: 122 // /user/queue/callbacks\ncontent-type:application/json\nsubscription:sub-1\nmessage-id:3m1fbnkx-2112\ncontent-length:382\n\n 123 // {\"entityId\":\"LCHOKI8BPp-fwwYTqZWZ\",\"entityType\":\"Award\",\"changedAt\":\"2024-04-29T07:43:05.324Z\",\"typeOffChange\":1,\"changedBy\":\"ziqni-state\", 124 // \"displayName\":\"bonus\",\"accountId\":\"FMbS7YwB6Jt8yN-tFi_X\",\"sequenceNumber\":1,\"entityRefId\":\"RyDEKI8BPp-fwwYTXK9H\", 125 // \"entityParentId\":\"JCHNKI8BPp-fwwYTtH-H\",\"metadata\":{\"claimed\":false,\"parentType\":\"Achievement\",\"parentId\":\"LiHNKI8BPp-fwwYTqn6k\"}}\u0000" 126 127 if (headers.objectType === 'EntityChanged') { 128 if (message.entityType === 'Award') { 129 initZiqniBonuses(this); 130 onAwardReceived(message); 131 } 132 } 133 }; 134 await apiClientStomp.connect({ token }); 135 136 achievementsApiWsClient = new AchievementsApiWs(apiClientStomp); 137 optInApiWsClient = new OptInApiWs(apiClientStomp); 138 graphsApiWsClient = new GraphsApiWs(apiClientStomp); 139 contestsApiWsClient = new ContestsApiWs(apiClientStomp); 140 leaderboardApiWsClient = new LeaderboardApiWs(apiClientStomp); 141 rewardsApiWsClient = new RewardsApiWs(apiClientStomp); 142 competitionsApiWsClient = new CompetitionsApiWs(apiClientStomp); 143 awardsApiWsClient = new AwardsApiWs(apiClientStomp); 144 // missionsApiWsClient = new MissionsApiWs(apiClientStomp); 145 }, 146 getAllAchievements: function (cb, cbOnLastAchievement) { 147 this.getAchievements(cb, null, 0, true, cbOnLastAchievement); 148 },
149 getAchievements: function (cb, entityId = null, offset = 0, all = false, cbOnLastAchievement) { 150 const achievementRequest = AchievementRequest.constructFromObject({ 151 achievementFilter: { 152 productIds: [], 153 tags: [], 154 startDate: null, 155 endDate: null, 156 ids: entityId ? [entityId] : [], 157 statusCode: { 158 moreThan: 15, 159 lessThan: entityId ? 55 : 30 160 }, 161 sortBy: [{ 162 queryField: 'created', 163 order: 'Asc' 164 }], 165 skip: offset ?? 0, 166 limit: 20, 167 constraints: [], 168 includeOptInState: true 169 } 170 }, null); 171 172 achievementsApiWsClient.getAchievements(achievementRequest, (json) => { 173 if (!json.data || !json.data.length) { 174 cbOnLastAchievement && cbOnLastAchievement(); 175 return; 176 } 177 178 if (!entityId) { 179 this.currentPromotions = Array.concat(this.currentPromotions, json.data); 180 } 181 182 cb(json.data); 183 184 if (all) { 185 this.getAchievements(cb, entityId, offset + 20, true, cbOnLastAchievement); 186 } 187 }); 188 }, 189 getOptInStats: function (items, type) { 190 const optInStateRequest = OptInStatesRequest.constructFromObject({ 191 optinStatesFilter: { 192 ids: items.reduce((arr, item) => { 193 arr.push(type == 'Competition' ? item.competitionId : item.id); 194 return arr; 195 }, []), 196 limit: 200 197 } 198 }, null); 199 200 optInApiWsClient.optInStates(optInStateRequest, (json) => { 201 const parse = json => json?.data && json.data.reduce((acc, item) => { 202 acc[item.entityId] = item; 203 return acc; 204 }, {}) 205 206 if (type = 'Competition') { 207 this.competitionsOptInStats = Object.assign(this.achievementsOptInStats, parse(json)); 208 209 getCompetitionsOptInStatsCb(this.competitionsOptInStats); 210 } 211 }); 212 }, 213 optinCallback: function (entityId, type) { 214 const entity = this.getOptInStatLocal(entityId, type); 215 const optInStatus = entity?.statusCode ?? 0; 216 this.manageOptIn(entityId, optInStatus < 15, (data) => { 217 if (data[0]?.status !== 'Processing') { 218 this.setOptInStatLocal(data[0], type); 219 onOptinStatusChange(entityId) 220 } 221 }); 222 }, 223 manageOptIn: function (entityId, optIn, cb) { 224 const manageOptinRequest = ManageOptinRequest.constructFromObject({ 225 action: optIn ? "join" : "leave", 226 entityId 227 }, null); 228 229 optInApiWsClient.manageOptin(manageOptinRequest, (json) => { 230 cb(json.data); 231 }); 232 }, 233 setOnOptinStatusChange: function (cb) { 234 onOptinStatusChange = cb; 235 }, 236 setGetCompetitionsOptInStatsCb: function (cb) { 237 getCompetitionsOptInStatsCb = cb; 238 }, 239 setOnAwardReceived: function (cb) { 240 onAwardReceived = cb; 241 }, 242 getContestOptInStatus: function (contest) { 243 const item = this.competitionsOptInStats[contest.competitionId]; 244 245 if (!item) return null; 246 247 return { 248 status: item.status, 249 statusCode: item.statusCode, 250 }; 251 }, 252 getMissionData: function (cb) { 253 const graphRequest = EntityGraphRequest.constructFromObject({ 254 ids: this.currentPromotions 255 .filter(item => item.constraints.includes('mission')) 256 .reduce((acc, item) => acc.concat([item.id]), []), 257 entityType: "Achievement", 258 includes: ['description', 'scheduling', 'memberTagsFilter'], 259 traversal: 'BREADTH_FIRST', 260 }, null); 261 262 graphsApiWsClient.getGraph(graphRequest, ({meta, data}) => { 263 if (meta.totalRecordsFound === 0) return; 264 265 this.missions = data.graphs; 266 267 cb(this.prepareMissionAchievements()); 268 }); 269 }, 270 // getMissionsState: function (missionId, cb) { 271 // const request = MissionStatesRequest.constructFromObject({ 272 // missionStatesFilter: { 273 // statusCodes: { 274 // moreThan: 10, 275 // lessThan: 60 276 // } 277 // }, 278 // includes: ['description', 'scheduling', 'memberTagsFilter', 'optin-status'], 279 // }, null); 280 // 281 // missionsApiWsClient.getMissionStates(request, ({data}) => { 282 // if (data.length === 0) return; 283 // 284 // console.log(data) 285 // }); 286 // }, 287 prepareMissionAchievements: function () { 288 const missions = []; 289 290 this.missions.forEach(mission => { 291 const missionAchievements = []; 292 293 for (let listItem of mission.edges) { 294 const achievement = this.currentPromotions.find((item) => item.id === listItem.tailEntityId); 295 296 if (!achievement) break; 297 298 if (achievement) { 299 missionAchievements.push(achievement); 300 } 301 } 302 missions.push(missionAchievements); 303 }) 304 305 return missions; 306 }, 307 getLoyaltyProgress: function (cb, offset = 0) { 308 const achievementRequest = AchievementRequest.constructFromObject({ 309 achievementFilter: { 310 tags: ['Loyalty'], 311 statusCode: { 312 moreThan: 15, 313 lessThan: 35 314 }, 315 sortBy: [{ 316 queryField: 'created', 317 order: 'Asc' 318 }], 319 offset: offset, 320 limit: 20, 321 includeOptInState: true 322 } 323 }, null); 324 325 achievementsApiWsClient.getAchievements(achievementRequest, ({data}) => { 326 if (!data.length) return; 327 328 let currentItem = data.find(item => item.optInStatus?.statusCode < 35); 329 330 if (!currentItem) { 331 currentItem = data.find(item => item.constraints.includes('mission')); 332 } 333 334 if (!currentItem) this.getLoyaltyProgress(cb, data.length); 335 336 // currentItem.optInStatus.points = this.getOptInPointsBasedOnPercentage(currentItem, currentItem.optInStatus); 337 338 const isItemInCurrentPromotions = this.currentPromotions.findIndex(item => item.id === currentItem.id); 339 if (isItemInCurrentPromotions === -1) this.currentPromotions.push(currentItem); 340 341 cb && cb(currentItem); 342 }); 343 }, 344 getContests: function (cb, contestId = null) { 345 this.getCompetitions((competitionsData) => { 346 const competitionsWithOptInRequired = 347 competitionsData.reduce( 348 (acc, competition) => {
349 if (competition.constraints.includes('optinRequiredForEntrants')) 350 return acc.concat(competition.id); 351 352 return acc; 353 }, []); 354 355 // 45 -finalized, 35 - finished, 25 - active, 15 - ready 356 const contestRequest = ContestRequest.constructFromObject({ 357 contestFilter: { 358 productIds: [], 359 tags: [], 360 startDate: null, 361 endDate: null, 362 ids: contestId ? [contestId] : [], 363 statusCode: { 364 moreThan: 10, 365 lessThan: contestId ? 60 : 30 366 }, 367 sortBy: [{ 368 queryField: 'created', 369 order: 'Asc' 370 }], 371 skip: 0, 372 limit: 20, 373 constraints: [] 374 } 375 }, null); 376 377 contestsApiWsClient.getContests(contestRequest, (json) => { 378 if (!json.data) return; 379 380 const contestData = json.data.map((contest) => { 381 if (competitionsWithOptInRequired.includes(contest.competitionId)) { 382 contest.optInRequired = true; 383 } 384 return contest; 385 }); 386 387 cb(contestData); 388 389 if (!contestId) { 390 this.contests = contestData; 391 392 setTimeout(() => { 393 this.getOptInStats(json.data, 'Competition'); 394 }, 30) 395 } 396 }); 397 }); 398 }, 399 getCompetitions: function (cb) { 400 const competitionRequest = CompetitionRequest.constructFromObject({ 401 competitionFilter: { 402 productIds: [], 403 tags: [], 404 startDate: null, 405 endDate: null, 406 ids: [], 407 statusCode: { 408 moreThan: 10, 409 lessThan: 30 410 }, 411 sortBy: [{ 412 queryField: 'created', 413 order: 'Asc' 414 }], 415 skip: 0, 416 limit: 20, 417 constraints: [] 418 } 419 }, null); 420 421 competitionsApiWsClient.getCompetitions(competitionRequest, (json) => { 422 if (!json.data) return; 423 424 this.competitions = json.data; 425 cb(json.data); 426 }); 427 }, 428 subscribeToLeaderBoard: function (leaderboardId, cb) { 429 const leaderboardRequest = LeaderboardSubscriptionRequest.constructFromObject({ 430 action: "Subscribe", 431 entityId: leaderboardId, 432 leaderboardFilter: { 433 topRanksToInclude: 50, 434 ranksAboveToInclude: 0, 435 ranksBelowToInclude: 0 436 } 437 }, null); 438 439 leaderboardApiWsClient.subscribeToLeaderboard(leaderboardRequest, (json) => { 440 if (!json.data) return; 441 442 cb(json.data); 443 this.unsubscribeFromLeaderBoard(leaderboardId); 444 }); 445 }, 446 unsubscribeFromLeaderBoard: function (leaderboardId) { 447 const leaderboardRequest = LeaderboardSubscriptionRequest.constructFromObject({ 448 action: "Unsubscribe", 449 entityId: leaderboardId, 450 leaderboardFilter: {} 451 }, null); 452 453 leaderboardApiWsClient.subscribeToLeaderboard(leaderboardRequest); 454 }, 455 getRewardsForEntity: function (entities, cb) { 456 const rewardsRequest = RewardRequest.constructFromObject({ 457 entityFilter: 458 entities.reduce((acc, entity) => { 459 return acc.concat({ 460 entityType: entity.type, 461 entityIds: [entity.id] 462 }); 463 }, []) 464 }); 465 466 rewardsApiWsClient.getRewards(rewardsRequest, (json) => { 467 if (!json.data) return; 468 469 cb(json.data); 470 }); 471 }, 472 getCustomerAwards: function (cb) {
473 // statusCode 15 - NotClaimed, 35 - Claimed 474 const awardsRequest = AwardRequest.constructFromObject({ 475 awardFilter: { 476 statusCode: { 477 moreThan: 10, 478 lessThan: 35 479 }, 480 sortBy: [{ 481 queryField: 'created', 482 order: 'Asc' 483 }], 484 limit: 200, 485 } 486 }); 487 488 awardsApiWsClient.getAwards(awardsRequest, (json) => { 489 if (!json.data) return; 490 491 cb(json.data); 492 }); 493 }, 494 claimAward: function (id, cb) { 495 const awardsRequest = ClaimAwardRequest.constructFromObject({ 496 awardIds: [id] 497 }); 498 499 awardsApiWsClient.claimAwards(awardsRequest, (json) => { 500 if (!json.data) return; 501 502 cb(json.data); 503 }); 504 } 505 }); 506 } 507 }; 508},/*optional metas*/ [ 509 // /*optional meta for dependency*/ {assert: {type: 'javascript'}}, 510]); 511}
vendor: 4,085 bytes, lines 511-609
511,{"@ziqni-tech/member-api-client":24}],2:[function(require,module,exports){ 512(function webpackUniversalModuleDefinition(root, factory) { 513 if(typeof exports === 'object' && typeof module === 'object') 514 module.exports = factory(); 515 else if(typeof define === 'function' && define.amd) 516 define("StompJs", [], factory); 517 else if(typeof exports === 'object') 518 exports["StompJs"] = factory(); 519 else 520 root["StompJs"] = factory(); 521})(typeof self !== 'undefined' ? self : this, function() { 522return /******/ (function(modules) { // webpackBootstrap 523/******/ // The module cache 524/******/ var installedModules = {}; 525/******/ 526/******/ // The require function 527/******/ function __webpack_require__(moduleId) { 528/******/ 529/******/ // Check if module is in cache 530/******/ if(installedModules[moduleId]) { 531/******/ return installedModules[moduleId].exports; 532/******/ } 533/******/ // Create a new module (and put it into the cache) 534/******/ var module = installedModules[moduleId] = { 535/******/ i: moduleId, 536/******/ l: false, 537/******/ exports: {} 538/******/ }; 539/******/ 540/******/ // Execute the module function 541/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 542/******/ 543/******/ // Flag the module as loaded 544/******/ module.l = true; 545/******/ 546/******/ // Return the exports of the module 547/******/ return module.exports; 548/******/ } 549/******/ 550/******/ 551/******/ // expose the modules object (__webpack_modules__) 552/******/ __webpack_require__.m = modules; 553/******/ 554/******/ // expose the module cache 555/******/ __webpack_require__.c = installedModules; 556/******/ 557/******/ // define getter function for harmony exports 558/******/ __webpack_require__.d = function(exports, name, getter) { 559/******/ if(!__webpack_require__.o(exports, name)) { 560/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 561/******/ } 562/******/ }; 563/******/ 564/******/ // define __esModule on exports 565/******/ __webpack_require__.r = function(exports) { 566/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 567/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 568/******/ } 569/******/ Object.defineProperty(exports, '__esModule', { value: true }); 570/******/ }; 571/******/ 572/******/ // create a fake namespace object 573/******/ // mode & 1: value is a module id, require it 574/******/ // mode & 2: merge all properties of value into the ns 575/******/ // mode & 4: return value when already ns object 576/******/ // mode & 8|1: behave like require 577/******/ __webpack_require__.t = function(value, mode) { 578/******/ if(mode & 1) value = __webpack_require__(value); 579/******/ if(mode & 8) return value; 580/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 581/******/ var ns = Object.create(null); 582/******/ __webpack_require__.r(ns); 583/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 584/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 585/******/ return ns; 586/******/ }; 587/******/ 588/******/ // getDefaultExport function for compatibility with non-harmony modules 589/******/ __webpack_require__.n = function(module) { 590/******/ var getter = module && module.__esModule ? 591/******/ function getDefault() { return module['default']; } : 592/******/ function getModuleExports() { return module; }; 593/******/ __webpack_require__.d(getter, 'a', getter); 594/******/ return getter; 595/******/ }; 596/******/ 597/******/ // Object.prototype.hasOwnProperty.call 598/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 599/******/ 600/******/ // __webpack_public_path__ 601/******/ __webpack_require__.p = ""; 602/******/ 603/******/ 604/******/ // Load entry module and return exports 605/******/ return __webpack_require__(__webpack_require__.s = 0); 606/******/ }) 607/************************************************************************/ 608/******/ ({ 609
610/***/ "./src/augment-websocket.ts": 611/*!**********************************!*\ 612 !*** ./src/augment-websocket.ts ***! 613 \**********************************/ 614/*! exports provided: augmentWebsocket */ 615/***/ (function(module, __webpack_exports__, __webpack_require__) { 616 617"use strict"; 618__webpack_require__.r(__webpack_exports__); 619/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "augmentWebsocket", function() { return augmentWebsocket; }); 620/** 621 * @internal 622 */ 623function augmentWebsocket(webSocket, debug) { 624 webSocket.terminate = function () { 625 const noOp = () => { }; 626 // set all callbacks to no op 627 this.onerror = noOp; 628 this.onmessage = noOp; 629 this.onopen = noOp; 630 const ts = new Date(); 631 const origOnClose = this.onclose; 632 // Track delay in actual closure of the socket 633 this.onclose = closeEvent => { 634 const delay = new Date().getTime() - ts.getTime(); 635 debug(`Discarded socket closed after ${delay}ms, with code/reason: ${closeEvent.code}/${closeEvent.reason}`); 636 }; 637 this.close(); 638 origOnClose.call(this, { 639 code: 4001, 640 reason: 'Heartbeat failure, discarding the socket', 641 wasClean: false, 642 }); 643 }; 644} 645 646 647/***/ }), 648
649/***/ "./src/byte.ts": 650/*!*********************!*\ 651 !*** ./src/byte.ts ***! 652 \*********************/ 653/*! exports provided: BYTE */ 654/***/ (function(module, __webpack_exports__, __webpack_require__) { 655 656"use strict"; 657__webpack_require__.r(__webpack_exports__); 658/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BYTE", function() { return BYTE; }); 659/** 660 * Some byte values, used as per STOMP specifications. 661 * 662 * Part of `@stomp/stompjs`. 663 * 664 * @internal 665 */ 666const BYTE = { 667 // LINEFEED byte (octet 10) 668 LF: '\x0A', 669 // NULL byte (octet 0) 670 NULL: '\x00', 671}; 672 673 674/***/ }), 675
676/***/ "./src/client.ts": 677/*!***********************!*\ 678 !*** ./src/client.ts ***! 679 \***********************/ 680/*! exports provided: Client */ 681/***/ (function(module, __webpack_exports__, __webpack_require__) { 682 683"use strict"; 684__webpack_require__.r(__webpack_exports__); 685/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Client", function() { return Client; }); 686/* harmony import */ var _stomp_handler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stomp-handler */ "./src/stomp-handler.ts"); 687/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./types */ "./src/types.ts"); 688/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./versions */ "./src/versions.ts"); 689var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { 690 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 691 return new (P || (P = Promise))(function (resolve, reject) { 692 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 693 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 694 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 695 step((generator = generator.apply(thisArg, _arguments || [])).next()); 696 }); 697}; 698 699 700 701/** 702 * STOMP Client Class. 703 * 704 * Part of `@stomp/stompjs`. 705 */ 706class Client { 707 /** 708 * Create an instance. 709 */ 710 constructor(conf = {}) { 711 /** 712 * STOMP versions to attempt during STOMP handshake. By default versions `1.0`, `1.1`, and `1.2` are attempted. 713 * 714 * Example: 715 * ```javascript 716 * // Try only versions 1.0 and 1.1 717 * client.stompVersions = new Versions(['1.0', '1.1']) 718 * ``` 719 */ 720 this.stompVersions = _versions__WEBPACK_IMPORTED_MODULE_2__["Versions"].default; 721 /** 722 * Will retry if Stomp connection is not established in specified milliseconds. 723 * Default 0, which implies wait for ever. 724 */ 725 this.connectionTimeout = 0; 726 /** 727 * automatically reconnect with delay in milliseconds, set to 0 to disable. 728 */ 729 this.reconnectDelay = 5000; 730 /** 731 * Incoming heartbeat interval in milliseconds. Set to 0 to disable. 732 */ 733 this.heartbeatIncoming = 10000; 734 /** 735 * Outgoing heartbeat interval in milliseconds. Set to 0 to disable. 736 */ 737 this.heartbeatOutgoing = 10000; 738 /** 739 * This switches on a non standard behavior while sending WebSocket packets. 740 * It splits larger (text) packets into chunks of [maxWebSocketChunkSize]{@link Client#maxWebSocketChunkSize}. 741 * Only Java Spring brokers seems to use this mode. 742 * 743 * WebSockets, by itself, split large (text) packets, 744 * so it is not needed with a truly compliant STOMP/WebSocket broker. 745 * Actually setting it for such broker will cause large messages to fail. 746 * 747 * `false` by default. 748 * 749 * Binary frames are never split. 750 */ 751 this.splitLargeFrames = false; 752 /** 753 * See [splitLargeFrames]{@link Client#splitLargeFrames}. 754 * This has no effect if [splitLargeFrames]{@link Client#splitLargeFrames} is `false`. 755 */ 756 this.maxWebSocketChunkSize = 8 * 1024; 757 /** 758 * Usually the 759 * [type of WebSocket frame]{@link https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send#Parameters} 760 * is automatically decided by type of the payload. 761 * Default is `false`, which should work with all compliant brokers. 762 * 763 * Set this flag to force binary frames. 764 */ 765 this.forceBinaryWSFrames = false; 766 /** 767 * A bug in ReactNative chops a string on occurrence of a NULL. 768 * See issue [https://github.com/stomp-js/stompjs/issues/89]{@link https://github.com/stomp-js/stompjs/issues/89}. 769 * This makes incoming WebSocket messages invalid STOMP packets. 770 * Setting this flag attempts to reverse the damage by appending a NULL. 771 * If the broker splits a large message into multiple WebSocket messages, 772 * this flag will cause data loss and abnormal termination of connection. 773 * 774 * This is not an ideal solution, but a stop gap until the underlying issue is fixed at ReactNative library. 775 */ 776 this.appendMissingNULLonIncoming = false;
777 /** 778 * Activation state. 779 * 780 * It will usually be ACTIVE or INACTIVE. 781 * When deactivating it may go from ACTIVE to INACTIVE without entering DEACTIVATING. 782 */ 783 this.state = _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].INACTIVE; 784 // Dummy callbacks 785 const noOp = () => { }; 786 this.debug = noOp; 787 this.beforeConnect = noOp; 788 this.onConnect = noOp; 789 this.onDisconnect = noOp; 790 this.onUnhandledMessage = noOp; 791 this.onUnhandledReceipt = noOp; 792 this.onUnhandledFrame = noOp; 793 this.onStompError = noOp; 794 this.onWebSocketClose = noOp; 795 this.onWebSocketError = noOp; 796 this.logRawCommunication = false; 797 this.onChangeState = noOp; 798 // These parameters would typically get proper values before connect is called 799 this.connectHeaders = {}; 800 this._disconnectHeaders = {}; 801 // Apply configuration 802 this.configure(conf); 803 } 804 /** 805 * Underlying WebSocket instance, READONLY. 806 */ 807 get webSocket() { 808 return this._stompHandler ? this._stompHandler._webSocket : undefined; 809 } 810 /** 811 * Disconnection headers. 812 */ 813 get disconnectHeaders() { 814 return this._disconnectHeaders; 815 } 816 set disconnectHeaders(value) { 817 this._disconnectHeaders = value; 818 if (this._stompHandler) { 819 this._stompHandler.disconnectHeaders = this._disconnectHeaders; 820 } 821 } 822 /** 823 * `true` if there is a active connection with STOMP Broker 824 */ 825 get connected() { 826 return !!this._stompHandler && this._stompHandler.connected; 827 } 828 /** 829 * version of STOMP protocol negotiated with the server, READONLY 830 */ 831 get connectedVersion() { 832 return this._stompHandler ? this._stompHandler.connectedVersion : undefined; 833 } 834 /** 835 * if the client is active (connected or going to reconnect) 836 */ 837 get active() { 838 return this.state === _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].ACTIVE; 839 } 840 _changeState(state) { 841 this.state = state; 842 this.onChangeState(state); 843 } 844 /** 845 * Update configuration. 846 */ 847 configure(conf) { 848 // bulk assign all properties to this 849 Object.assign(this, conf); 850 } 851 /** 852 * Initiate the connection with the broker. 853 * If the connection breaks, as per [Client#reconnectDelay]{@link Client#reconnectDelay}, 854 * it will keep trying to reconnect. 855 * 856 * Call [Client#deactivate]{@link Client#deactivate} to disconnect and stop reconnection attempts. 857 */ 858 activate() { 859 if (this.state === _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].DEACTIVATING) { 860 this.debug('Still DEACTIVATING, please await call to deactivate before trying to re-activate'); 861 throw new Error('Still DEACTIVATING, can not activate now'); 862 } 863 if (this.active) { 864 this.debug('Already ACTIVE, ignoring request to activate'); 865 return; 866 } 867 this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].ACTIVE); 868 this._connect(); 869 } 870 _connect() { 871 return __awaiter(this, void 0, void 0, function* () { 872 if (this.connected) { 873 this.debug('STOMP: already connected, nothing to do'); 874 return; 875 } 876 yield this.beforeConnect(); 877 if (!this.active) { 878 this.debug('Client has been marked inactive, will not attempt to connect'); 879 return; 880 } 881 // setup connection watcher 882 if (this.connectionTimeout > 0) { 883 // clear first 884 if (this._connectionWatcher) { 885 clearTimeout(this._connectionWatcher); 886 } 887 this._connectionWatcher = setTimeout(() => { 888 if (this.connected) { 889 return; 890 } 891 // Connection not established, close the underlying socket 892 // a reconnection will be attempted 893 this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`); 894 this.forceDisconnect(); 895 }, this.connectionTimeout); 896 } 897 this.debug('Opening Web Socket...'); 898 // Get the actual WebSocket (or a similar object) 899 const webSocket = this._createWebSocket(); 900 this._stompHandler = new _stomp_handler__WEBPACK_IMPORTED_MODULE_0__["StompHandler"](this, webSocket, { 901 debug: this.debug, 902 stompVersions: this.stompVersions, 903 connectHeaders: this.connectHeaders, 904 disconnectHeaders: this._disconnectHeaders, 905 heartbeatIncoming: this.heartbeatIncoming, 906 heartbeatOutgoing: this.heartbeatOutgoing, 907 splitLargeFrames: this.splitLargeFrames, 908 maxWebSocketChunkSize: this.maxWebSocketChunkSize, 909 forceBinaryWSFrames: this.forceBinaryWSFrames, 910 logRawCommunication: this.logRawCommunication, 911 appendMissingNULLonIncoming: this.appendMissingNULLonIncoming, 912 discardWebsocketOnCommFailure: this.discardWebsocketOnCommFailure, 913 onConnect: frame => { 914 // Successfully connected, stop the connection watcher 915 if (this._connectionWatcher) { 916 clearTimeout(this._connectionWatcher); 917 this._connectionWatcher = undefined; 918 } 919 if (!this.active) { 920 this.debug('STOMP got connected while deactivate was issued, will disconnect now'); 921 this._disposeStompHandler(); 922 return; 923 } 924 this.onConnect(frame); 925 }, 926 onDisconnect: frame => { 927 this.onDisconnect(frame); 928 }, 929 onStompError: frame => { 930 this.onStompError(frame); 931 }, 932 onWebSocketClose: evt => { 933 this._stompHandler = undefined; // a new one will be created in case of a reconnect 934 if (this.state === _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].DEACTIVATING) { 935 // Mark deactivation complete 936 this._resolveSocketClose(); 937 this._resolveSocketClose = undefined; 938 this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].INACTIVE); 939 }
940 this.onWebSocketClose(evt); 941 // The callback is called before attempting to reconnect, this would allow the client 942 // to be `deactivated` in the callback. 943 if (this.active) { 944 this._schedule_reconnect(); 945 } 946 }, 947 onWebSocketError: evt => { 948 this.onWebSocketError(evt); 949 }, 950 onUnhandledMessage: message => { 951 this.onUnhandledMessage(message); 952 }, 953 onUnhandledReceipt: frame => { 954 this.onUnhandledReceipt(frame); 955 }, 956 onUnhandledFrame: frame => { 957 this.onUnhandledFrame(frame); 958 }, 959 }); 960 this._stompHandler.start(); 961 }); 962 } 963 _createWebSocket() { 964 let webSocket; 965 if (this.webSocketFactory) { 966 webSocket = this.webSocketFactory(); 967 } 968 else { 969 webSocket = new WebSocket(this.brokerURL, this.stompVersions.protocolVersions()); 970 } 971 webSocket.binaryType = 'arraybuffer'; 972 return webSocket; 973 } 974 _schedule_reconnect() { 975 if (this.reconnectDelay > 0) { 976 this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`); 977 this._reconnector = setTimeout(() => { 978 this._connect(); 979 }, this.reconnectDelay); 980 } 981 } 982 /** 983 * Disconnect if connected and stop auto reconnect loop. 984 * Appropriate callbacks will be invoked if underlying STOMP connection was connected. 985 * 986 * This call is async, it will resolve immediately if there is no underlying active websocket, 987 * otherwise, it will resolve after underlying websocket is properly disposed. 988 * 989 * To reactivate you can call [Client#activate]{@link Client#activate}. 990 */ 991 deactivate() { 992 return __awaiter(this, void 0, void 0, function* () { 993 let retPromise; 994 if (this.state !== _types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].ACTIVE) { 995 this.debug(`Already ${_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"][this.state]}, ignoring call to deactivate`); 996 return Promise.resolve(); 997 } 998 this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].DEACTIVATING); 999 // Clear if a reconnection was scheduled 1000 if (this._reconnector) { 1001 clearTimeout(this._reconnector); 1002 } 1003 if (this._stompHandler && 1004 this.webSocket.readyState !== _types__WEBPACK_IMPORTED_MODULE_1__["StompSocketState"].CLOSED) { 1005 // we need to wait for underlying websocket to close 1006 retPromise = new Promise((resolve, reject) => { 1007 this._resolveSocketClose = resolve; 1008 }); 1009 } 1010 else { 1011 // indicate that auto reconnect loop should terminate 1012 this._changeState(_types__WEBPACK_IMPORTED_MODULE_1__["ActivationState"].INACTIVE); 1013 return Promise.resolve(); 1014 } 1015 this._disposeStompHandler(); 1016 return retPromise; 1017 }); 1018 } 1019 /** 1020 * Force disconnect if there is an active connection by directly closing the underlying WebSocket. 1021 * This is different than a normal disconnect where a DISCONNECT sequence is carried out with the broker. 1022 * After forcing disconnect, automatic reconnect will be attempted. 1023 * To stop further reconnects call [Client#deactivate]{@link Client#deactivate} as well. 1024 */ 1025 forceDisconnect() { 1026 if (this._stompHandler) { 1027 this._stompHandler.forceDisconnect(); 1028 } 1029 } 1030 _disposeStompHandler() { 1031 // Dispose STOMP Handler 1032 if (this._stompHandler) { 1033 this._stompHandler.dispose(); 1034 this._stompHandler = null; 1035 } 1036 } 1037 /** 1038 * Send a message to a named destination. Refer to your STOMP broker documentation for types 1039 * and naming of destinations. 1040 * 1041 * STOMP protocol specifies and suggests some headers and also allows broker specific headers. 1042 * 1043 * `body` must be String. 1044 * You will need to covert the payload to string in case it is not string (e.g. JSON). 1045 * 1046 * To send a binary message body use binaryBody parameter. It should be a 1047 * [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array). 1048 * Sometimes brokers may not support binary frames out of the box. 1049 * Please check your broker documentation. 1050 * 1051 * `content-length` header is automatically added to the STOMP Frame sent to the broker. 1052 * Set `skipContentLengthHeader` to indicate that `content-length` header should not be added. 1053 * For binary messages `content-length` header is always added. 1054 * 1055 * Caution: The broker will, most likely, report an error and disconnect if message body has NULL octet(s) 1056 * and `content-length` header is missing. 1057 * 1058 * ```javascript 1059 * client.publish({destination: "/queue/test", headers: {priority: 9}, body: "Hello, STOMP"}); 1060 * 1061 * // Only destination is mandatory parameter 1062 * client.publish({destination: "/queue/test", body: "Hello, STOMP"}); 1063 * 1064 * // Skip content-length header in the frame to the broker 1065 * client.publish({"/queue/test", body: "Hello, STOMP", skipContentLengthHeader: true}); 1066 * 1067 * var binaryData = generateBinaryData(); // This need to be of type Uint8Array 1068 * // setting content-type header is not mandatory, however a good practice 1069 * client.publish({destination: '/topic/special', binaryBody: binaryData, 1070 * headers: {'content-type': 'application/octet-stream'}}); 1071 * ``` 1072 */ 1073 publish(params) { 1074 this._stompHandler.publish(params); 1075 } 1076 /** 1077 * STOMP brokers may carry out operation asynchronously and allow requesting for acknowledgement. 1078 * To request an acknowledgement, a `receipt` header needs to be sent with the actual request. 1079 * The value (say receipt-id) for this header needs to be unique for each use. Typically a sequence, a UUID, a 1080 * random number or a combination may be used. 1081 * 1082 * A complaint broker will send a RECEIPT frame when an operation has actually been completed. 1083 * The operation needs to be matched based in the value of the receipt-id. 1084 * 1085 * This method allow watching for a receipt and invoke the callback 1086 * when corresponding receipt has been received. 1087 * 1088 * The actual {@link FrameImpl} will be passed as parameter to the callback. 1089 * 1090 * Example: 1091 * ```javascript 1092 * // Subscribing with acknowledgement 1093 * let receiptId = randomText(); 1094 * 1095 * client.watchForReceipt(receiptId, function() {
1096 * // Will be called after server acknowledges 1097 * }); 1098 * 1099 * client.subscribe(TEST.destination, onMessage, {receipt: receiptId}); 1100 * 1101 * 1102 * // Publishing with acknowledgement 1103 * receiptId = randomText(); 1104 * 1105 * client.watchForReceipt(receiptId, function() { 1106 * // Will be called after server acknowledges 1107 * }); 1108 * client.publish({destination: TEST.destination, headers: {receipt: receiptId}, body: msg}); 1109 * ``` 1110 */ 1111 watchForReceipt(receiptId, callback) { 1112 this._stompHandler.watchForReceipt(receiptId, callback); 1113 } 1114 /** 1115 * Subscribe to a STOMP Broker location. The callback will be invoked for each received message with 1116 * the {@link IMessage} as argument. 1117 * 1118 * Note: The library will generate an unique ID if there is none provided in the headers. 1119 * To use your own ID, pass it using the headers argument. 1120 * 1121 * ```javascript 1122 * callback = function(message) { 1123 * // called when the client receives a STOMP message from the server 1124 * if (message.body) { 1125 * alert("got message with body " + message.body) 1126 * } else { 1127 * alert("got empty message"); 1128 * } 1129 * }); 1130 * 1131 * var subscription = client.subscribe("/queue/test", callback); 1132 * 1133 * // Explicit subscription id 1134 * var mySubId = 'my-subscription-id-001'; 1135 * var subscription = client.subscribe(destination, callback, { id: mySubId }); 1136 * ``` 1137 */ 1138 subscribe(destination, callback, headers = {}) { 1139 return this._stompHandler.subscribe(destination, callback, headers); 1140 } 1141 /** 1142 * It is preferable to unsubscribe from a subscription by calling 1143 * `unsubscribe()` directly on {@link StompSubscription} returned by `client.subscribe()`: 1144 * 1145 * ```javascript 1146 * var subscription = client.subscribe(destination, onmessage); 1147 * // ... 1148 * subscription.unsubscribe(); 1149 * ``` 1150 * 1151 * See: http://stomp.github.com/stomp-specification-1.2.html#UNSUBSCRIBE UNSUBSCRIBE Frame 1152 */ 1153 unsubscribe(id, headers = {}) { 1154 this._stompHandler.unsubscribe(id, headers); 1155 } 1156 /** 1157 * Start a transaction, the returned {@link ITransaction} has methods - [commit]{@link ITransaction#commit} 1158 * and [abort]{@link ITransaction#abort}. 1159 * 1160 * `transactionId` is optional, if not passed the library will generate it internally. 1161 */ 1162 begin(transactionId) { 1163 return this._stompHandler.begin(transactionId); 1164 } 1165 /** 1166 * Commit a transaction. 1167 * 1168 * It is preferable to commit a transaction by calling [commit]{@link ITransaction#commit} directly on 1169 * {@link ITransaction} returned by [client.begin]{@link Client#begin}. 1170 * 1171 * ```javascript 1172 * var tx = client.begin(txId); 1173 * //... 1174 * tx.commit(); 1175 * ``` 1176 */ 1177 commit(transactionId) { 1178 this._stompHandler.commit(transactionId); 1179 } 1180 /** 1181 * Abort a transaction. 1182 * It is preferable to abort a transaction by calling [abort]{@link ITransaction#abort} directly on 1183 * {@link ITransaction} returned by [client.begin]{@link Client#begin}. 1184 * 1185 * ```javascript 1186 * var tx = client.begin(txId); 1187 * //... 1188 * tx.abort(); 1189 * ``` 1190 */ 1191 abort(transactionId) { 1192 this._stompHandler.abort(transactionId); 1193 } 1194 /** 1195 * ACK a message. It is preferable to acknowledge a message by calling [ack]{@link IMessage#ack} directly 1196 * on the {@link IMessage} handled by a subscription callback: 1197 * 1198 * ```javascript 1199 * var callback = function (message) { 1200 * // process the message 1201 * // acknowledge it 1202 * message.ack(); 1203 * }; 1204 * client.subscribe(destination, callback, {'ack': 'client'}); 1205 * ``` 1206 */ 1207 ack(messageId, subscriptionId, headers = {}) { 1208 this._stompHandler.ack(messageId, subscriptionId, headers); 1209 } 1210 /** 1211 * NACK a message. It is preferable to acknowledge a message by calling [nack]{@link IMessage#nack} directly 1212 * on the {@link IMessage} handled by a subscription callback: 1213 * 1214 * ```javascript 1215 * var callback = function (message) { 1216 * // process the message 1217 * // an error occurs, nack it 1218 * message.nack(); 1219 * }; 1220 * client.subscribe(destination, callback, {'ack': 'client'}); 1221 * ``` 1222 */ 1223 nack(messageId, subscriptionId, headers = {}) { 1224 this._stompHandler.nack(messageId, subscriptionId, headers); 1225 } 1226} 1227 1228 1229/***/ }), 1230
1231/***/ "./src/compatibility/compat-client.ts": 1232/*!********************************************!*\ 1233 !*** ./src/compatibility/compat-client.ts ***! 1234 \********************************************/ 1235/*! exports provided: CompatClient */ 1236/***/ (function(module, __webpack_exports__, __webpack_require__) { 1237 1238"use strict"; 1239__webpack_require__.r(__webpack_exports__); 1240/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompatClient", function() { return CompatClient; }); 1241/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../client */ "./src/client.ts"); 1242/* harmony import */ var _heartbeat_info__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./heartbeat-info */ "./src/compatibility/heartbeat-info.ts"); 1243 1244 1245/** 1246 * Available for backward compatibility, please shift to using {@link Client}. 1247 * 1248 * **Deprecated** 1249 * 1250 * Part of `@stomp/stompjs`. 1251 * 1252 * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html) 1253 */ 1254class CompatClient extends _client__WEBPACK_IMPORTED_MODULE_0__["Client"] { 1255 /** 1256 * Available for backward compatibility, please shift to using {@link Client} 1257 * and [Client#webSocketFactory]{@link Client#webSocketFactory}. 1258 * 1259 * **Deprecated** 1260 * 1261 * @internal 1262 */ 1263 constructor(webSocketFactory) { 1264 super(); 1265 /** 1266 * It is no op now. No longer needed. Large packets work out of the box. 1267 */ 1268 this.maxWebSocketFrameSize = 16 * 1024; 1269 this._heartbeatInfo = new _heartbeat_info__WEBPACK_IMPORTED_MODULE_1__["HeartbeatInfo"](this); 1270 this.reconnect_delay = 0; 1271 this.webSocketFactory = webSocketFactory; 1272 // Default from previous version 1273 this.debug = (...message) => { 1274 console.log(...message); 1275 }; 1276 } 1277 _parseConnect(...args) { 1278 let closeEventCallback; 1279 let connectCallback; 1280 let errorCallback; 1281 let headers = {}; 1282 if (args.length < 2) { 1283 throw new Error('Connect requires at least 2 arguments'); 1284 } 1285 if (typeof args[1] === 'function') { 1286 [headers, connectCallback, errorCallback, closeEventCallback] = args; 1287 } 1288 else { 1289 switch (args.length) { 1290 case 6: 1291 [ 1292 headers.login, 1293 headers.passcode, 1294 connectCallback, 1295 errorCallback, 1296 closeEventCallback, 1297 headers.host, 1298 ] = args; 1299 break; 1300 default: 1301 [ 1302 headers.login, 1303 headers.passcode, 1304 connectCallback, 1305 errorCallback, 1306 closeEventCallback, 1307 ] = args; 1308 } 1309 } 1310 return [headers, connectCallback, errorCallback, closeEventCallback]; 1311 } 1312 /** 1313 * Available for backward compatibility, please shift to using [Client#activate]{@link Client#activate}. 1314 * 1315 * **Deprecated** 1316 * 1317 * The `connect` method accepts different number of arguments and types. See the Overloads list. Use the 1318 * version with headers to pass your broker specific options. 1319 * 1320 * overloads: 1321 * - connect(headers, connectCallback) 1322 * - connect(headers, connectCallback, errorCallback) 1323 * - connect(login, passcode, connectCallback) 1324 * - connect(login, passcode, connectCallback, errorCallback) 1325 * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback) 1326 * - connect(login, passcode, connectCallback, errorCallback, closeEventCallback, host) 1327 * 1328 * params: 1329 * - headers, see [Client#connectHeaders]{@link Client#connectHeaders} 1330 * - connectCallback, see [Client#onConnect]{@link Client#onConnect} 1331 * - errorCallback, see [Client#onStompError]{@link Client#onStompError} 1332 * - closeEventCallback, see [Client#onWebSocketClose]{@link Client#onWebSocketClose} 1333 * - login [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders) 1334 * - passcode [String], [Client#connectHeaders](../classes/Client.html#connectHeaders) 1335 * - host [String], see [Client#connectHeaders](../classes/Client.html#connectHeaders) 1336 * 1337 * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html) 1338 */ 1339 connect(...args) { 1340 const out = this._parseConnect(...args); 1341 if (out[0]) { 1342 this.connectHeaders = out[0]; 1343 } 1344 if (out[1]) { 1345 this.onConnect = out[1]; 1346 } 1347 if (out[2]) { 1348 this.onStompError = out[2]; 1349 } 1350 if (out[3]) {
1351 this.onWebSocketClose = out[3]; 1352 } 1353 super.activate(); 1354 } 1355 /** 1356 * Available for backward compatibility, please shift to using [Client#deactivate]{@link Client#deactivate}. 1357 * 1358 * **Deprecated** 1359 * 1360 * See: 1361 * [Client#onDisconnect]{@link Client#onDisconnect}, and 1362 * [Client#disconnectHeaders]{@link Client#disconnectHeaders} 1363 * 1364 * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html) 1365 */ 1366 disconnect(disconnectCallback, headers = {}) { 1367 if (disconnectCallback) { 1368 this.onDisconnect = disconnectCallback; 1369 } 1370 this.disconnectHeaders = headers; 1371 super.deactivate(); 1372 } 1373 /** 1374 * Available for backward compatibility, use [Client#publish]{@link Client#publish}. 1375 * 1376 * Send a message to a named destination. Refer to your STOMP broker documentation for types 1377 * and naming of destinations. The headers will, typically, be available to the subscriber. 1378 * However, there may be special purpose headers corresponding to your STOMP broker. 1379 * 1380 * **Deprecated**, use [Client#publish]{@link Client#publish} 1381 * 1382 * Note: Body must be String. You will need to covert the payload to string in case it is not string (e.g. JSON) 1383 * 1384 * ```javascript 1385 * client.send("/queue/test", {priority: 9}, "Hello, STOMP"); 1386 * 1387 * // If you want to send a message with a body, you must also pass the headers argument. 1388 * client.send("/queue/test", {}, "Hello, STOMP"); 1389 * ``` 1390 * 1391 * To upgrade, please follow the [Upgrade Guide](../additional-documentation/upgrading.html) 1392 */ 1393 send(destination, headers = {}, body = '') { 1394 headers = Object.assign({}, headers); 1395 const skipContentLengthHeader = headers['content-length'] === false; 1396 if (skipContentLengthHeader) { 1397 delete headers['content-length']; 1398 } 1399 this.publish({ 1400 destination, 1401 headers: headers, 1402 body, 1403 skipContentLengthHeader, 1404 }); 1405 } 1406 /** 1407 * Available for backward compatibility, renamed to [Client#reconnectDelay]{@link Client#reconnectDelay}. 1408 * 1409 * **Deprecated** 1410 */ 1411 set reconnect_delay(value) { 1412 this.reconnectDelay = value; 1413 } 1414 /** 1415 * Available for backward compatibility, renamed to [Client#webSocket]{@link Client#webSocket}. 1416 * 1417 * **Deprecated** 1418 */ 1419 get ws() { 1420 return this.webSocket; 1421 } 1422 /** 1423 * Available for backward compatibility, renamed to [Client#connectedVersion]{@link Client#connectedVersion}. 1424 * 1425 * **Deprecated** 1426 */ 1427 get version() { 1428 return this.connectedVersion; 1429 } 1430 /** 1431 * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}. 1432 * 1433 * **Deprecated** 1434 */ 1435 get onreceive() { 1436 return this.onUnhandledMessage; 1437 } 1438 /** 1439 * Available for backward compatibility, renamed to [Client#onUnhandledMessage]{@link Client#onUnhandledMessage}. 1440 * 1441 * **Deprecated** 1442 */ 1443 set onreceive(value) { 1444 this.onUnhandledMessage = value; 1445 } 1446 /** 1447 * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}. 1448 * Prefer using [Client#watchForReceipt]{@link Client#watchForReceipt}. 1449 * 1450 * **Deprecated** 1451 */ 1452 get onreceipt() { 1453 return this.onUnhandledReceipt; 1454 } 1455 /** 1456 * Available for backward compatibility, renamed to [Client#onUnhandledReceipt]{@link Client#onUnhandledReceipt}. 1457 * 1458 * **Deprecated** 1459 */ 1460 set onreceipt(value) { 1461 this.onUnhandledReceipt = value; 1462 } 1463 /** 1464 * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming} 1465 * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}. 1466 * 1467 * **Deprecated** 1468 */ 1469 get heartbeat() { 1470 return this._heartbeatInfo; 1471 } 1472 /** 1473 * Available for backward compatibility, renamed to [Client#heartbeatIncoming]{@link Client#heartbeatIncoming} 1474 * [Client#heartbeatOutgoing]{@link Client#heartbeatOutgoing}. 1475 * 1476 * **Deprecated** 1477 */ 1478 set heartbeat(value) { 1479 this.heartbeatIncoming = value.incoming; 1480 this.heartbeatOutgoing = value.outgoing; 1481 } 1482} 1483 1484 1485/***/ }), 1486
1487/***/ "./src/compatibility/heartbeat-info.ts": 1488/*!*********************************************!*\ 1489 !*** ./src/compatibility/heartbeat-info.ts ***! 1490 \*********************************************/ 1491/*! exports provided: HeartbeatInfo */ 1492/***/ (function(module, __webpack_exports__, __webpack_require__) { 1493 1494"use strict"; 1495__webpack_require__.r(__webpack_exports__); 1496/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeartbeatInfo", function() { return HeartbeatInfo; }); 1497/** 1498 * Part of `@stomp/stompjs`. 1499 * 1500 * @internal 1501 */ 1502class HeartbeatInfo { 1503 constructor(client) { 1504 this.client = client; 1505 } 1506 get outgoing() { 1507 return this.client.heartbeatOutgoing; 1508 } 1509 set outgoing(value) { 1510 this.client.heartbeatOutgoing = value; 1511 } 1512 get incoming() { 1513 return this.client.heartbeatIncoming; 1514 } 1515 set incoming(value) { 1516 this.client.heartbeatIncoming = value; 1517 } 1518} 1519 1520 1521/***/ }), 1522
1523/***/ "./src/compatibility/stomp.ts": 1524/*!************************************!*\ 1525 !*** ./src/compatibility/stomp.ts ***! 1526 \************************************/ 1527/*! exports provided: Stomp */ 1528/***/ (function(module, __webpack_exports__, __webpack_require__) { 1529 1530"use strict"; 1531__webpack_require__.r(__webpack_exports__); 1532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Stomp", function() { return Stomp; }); 1533/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../versions */ "./src/versions.ts"); 1534/* harmony import */ var _compat_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compat-client */ "./src/compatibility/compat-client.ts"); 1535 1536 1537/** 1538 * STOMP Class, acts like a factory to create {@link Client}. 1539 * 1540 * Part of `@stomp/stompjs`. 1541 * 1542 * **Deprecated** 1543 * 1544 * It will be removed in next major version. Please switch to {@link Client}. 1545 */ 1546class Stomp { 1547 /** 1548 * This method creates a WebSocket client that is connected to 1549 * the STOMP server located at the url. 1550 * 1551 * ```javascript 1552 * var url = "ws://localhost:61614/stomp"; 1553 * var client = Stomp.client(url); 1554 * ``` 1555 * 1556 * **Deprecated** 1557 * 1558 * It will be removed in next major version. Please switch to {@link Client} 1559 * using [Client#brokerURL]{@link Client#brokerURL}. 1560 */ 1561 static client(url, protocols) { 1562 // This is a hack to allow another implementation than the standard 1563 // HTML5 WebSocket class. 1564 // 1565 // It is possible to use another class by calling 1566 // 1567 // Stomp.WebSocketClass = MozWebSocket 1568 // 1569 // *prior* to call `Stomp.client()`. 1570 // 1571 // This hack is deprecated and `Stomp.over()` method should be used 1572 // instead. 1573 // See remarks on the function Stomp.over 1574 if (protocols == null) { 1575 protocols = _versions__WEBPACK_IMPORTED_MODULE_0__["Versions"].default.protocolVersions(); 1576 } 1577 const wsFn = () => { 1578 const klass = Stomp.WebSocketClass || WebSocket; 1579 return new klass(url, protocols); 1580 }; 1581 return new _compat_client__WEBPACK_IMPORTED_MODULE_1__["CompatClient"](wsFn); 1582 } 1583 /** 1584 * This method is an alternative to [Stomp#client]{@link Stomp#client} to let the user 1585 * specify the WebSocket to use (either a standard HTML5 WebSocket or 1586 * a similar object). 1587 * 1588 * In order to support reconnection, the function Client._connect should be callable more than once. 1589 * While reconnecting 1590 * a new instance of underlying transport (TCP Socket, WebSocket or SockJS) will be needed. So, this function 1591 * alternatively allows passing a function that should return a new instance of the underlying socket. 1592 * 1593 * ```javascript 1594 * var client = Stomp.over(function(){ 1595 * return new WebSocket('ws://localhost:15674/ws') 1596 * }); 1597 * ``` 1598 * 1599 * **Deprecated** 1600 * 1601 * It will be removed in next major version. Please switch to {@link Client} 1602 * using [Client#webSocketFactory]{@link Client#webSocketFactory}. 1603 */ 1604 static over(ws) { 1605 let wsFn; 1606 if (typeof ws === 'function') { 1607 wsFn = ws; 1608 } 1609 else { 1610 console.warn('Stomp.over did not receive a factory, auto reconnect will not work. ' + 1611 'Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over'); 1612 wsFn = () => ws; 1613 } 1614 return new _compat_client__WEBPACK_IMPORTED_MODULE_1__["CompatClient"](wsFn); 1615 } 1616} 1617/** 1618 * In case you need to use a non standard class for WebSocket. 1619 * 1620 * For example when using within NodeJS environment: 1621 * 1622 * ```javascript 1623 * StompJs = require('../../esm5/'); 1624 * Stomp = StompJs.Stomp; 1625 * Stomp.WebSocketClass = require('websocket').w3cwebsocket; 1626 * ``` 1627 * 1628 * **Deprecated** 1629 * 1630 * 1631 * It will be removed in next major version. Please switch to {@link Client} 1632 * using [Client#webSocketFactory]{@link Client#webSocketFactory}. 1633 */ 1634// tslint:disable-next-line:variable-name 1635Stomp.WebSocketClass = null; 1636 1637 1638/***/ }), 1639
1640/***/ "./src/frame-impl.ts": 1641/*!***************************!*\ 1642 !*** ./src/frame-impl.ts ***! 1643 \***************************/ 1644/*! exports provided: FrameImpl */ 1645/***/ (function(module, __webpack_exports__, __webpack_require__) { 1646 1647"use strict"; 1648__webpack_require__.r(__webpack_exports__); 1649/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FrameImpl", function() { return FrameImpl; }); 1650/* harmony import */ var _byte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte */ "./src/byte.ts"); 1651 1652/** 1653 * Frame class represents a STOMP frame. 1654 * 1655 * @internal 1656 */ 1657class FrameImpl { 1658 /** 1659 * Frame constructor. `command`, `headers` and `body` are available as properties. 1660 * 1661 * @internal 1662 */ 1663 constructor(params) { 1664 const { command, headers, body, binaryBody, escapeHeaderValues, skipContentLengthHeader, } = params; 1665 this.command = command; 1666 this.headers = Object.assign({}, headers || {}); 1667 if (binaryBody) { 1668 this._binaryBody = binaryBody; 1669 this.isBinaryBody = true; 1670 } 1671 else { 1672 this._body = body || ''; 1673 this.isBinaryBody = false; 1674 } 1675 this.escapeHeaderValues = escapeHeaderValues || false; 1676 this.skipContentLengthHeader = skipContentLengthHeader || false; 1677 } 1678 /** 1679 * body of the frame 1680 */ 1681 get body() { 1682 if (!this._body && this.isBinaryBody) { 1683 this._body = new TextDecoder().decode(this._binaryBody); 1684 } 1685 return this._body; 1686 } 1687 /** 1688 * body as Uint8Array 1689 */ 1690 get binaryBody() { 1691 if (!this._binaryBody && !this.isBinaryBody) { 1692 this._binaryBody = new TextEncoder().encode(this._body); 1693 } 1694 return this._binaryBody; 1695 } 1696 /** 1697 * deserialize a STOMP Frame from raw data. 1698 * 1699 * @internal 1700 */ 1701 static fromRawFrame(rawFrame, escapeHeaderValues) { 1702 const headers = {}; 1703 const trim = (str) => str.replace(/^\s+|\s+$/g, ''); 1704 // In case of repeated headers, as per standards, first value need to be used 1705 for (const header of rawFrame.headers.reverse()) { 1706 const idx = header.indexOf(':'); 1707 const key = trim(header[0]); 1708 let value = trim(header[1]); 1709 if (escapeHeaderValues && 1710 rawFrame.command !== 'CONNECT' && 1711 rawFrame.command !== 'CONNECTED') { 1712 value = FrameImpl.hdrValueUnEscape(value); 1713 } 1714 headers[key] = value; 1715 } 1716 return new FrameImpl({ 1717 command: rawFrame.command, 1718 headers, 1719 binaryBody: rawFrame.binaryBody, 1720 escapeHeaderValues, 1721 }); 1722 } 1723 /** 1724 * @internal 1725 */ 1726 toString() { 1727 return this.serializeCmdAndHeaders(); 1728 } 1729 /** 1730 * serialize this Frame in a format suitable to be passed to WebSocket. 1731 * If the body is string the output will be string. 1732 * If the body is binary (i.e. of type Unit8Array) it will be serialized to ArrayBuffer. 1733 * 1734 * @internal 1735 */ 1736 serialize() { 1737 const cmdAndHeaders = this.serializeCmdAndHeaders(); 1738 if (this.isBinaryBody) { 1739 return FrameImpl.toUnit8Array(cmdAndHeaders, this._binaryBody).buffer; 1740 } 1741 else { 1742 return cmdAndHeaders + this._body + _byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].NULL; 1743 } 1744 } 1745 serializeCmdAndHeaders() { 1746 const lines = [this.command]; 1747 if (this.skipContentLengthHeader) { 1748 delete this.headers['content-length']; 1749 } 1750 for (const name of Object.keys(this.headers || {})) { 1751 const value = this.headers[name]; 1752 if (this.escapeHeaderValues && 1753 this.command !== 'CONNECT' && 1754 this.command !== 'CONNECTED') { 1755 lines.push(`${name}:${FrameImpl.hdrValueEscape(`${value}`)}`); 1756 } 1757 else { 1758 lines.push(`${name}:${value}`); 1759 } 1760 } 1761 if (this.isBinaryBody || 1762 (!this.isBodyEmpty() && !this.skipContentLengthHeader)) { 1763 lines.push(`content-length:${this.bodyLength()}`); 1764 } 1765 return lines.join(_byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF) + _byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF + _byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF; 1766 } 1767 isBodyEmpty() { 1768 return this.bodyLength() === 0; 1769 } 1770 bodyLength() { 1771 const binaryBody = this.binaryBody; 1772 return binaryBody ? binaryBody.length : 0; 1773 } 1774 /** 1775 * Compute the size of a UTF-8 string by counting its number of bytes 1776 * (and not the number of characters composing the string) 1777 */ 1778 static sizeOfUTF8(s) { 1779 return s ? new TextEncoder().encode(s).length : 0; 1780 } 1781 static toUnit8Array(cmdAndHeaders, binaryBody) { 1782 const uint8CmdAndHeaders = new TextEncoder().encode(cmdAndHeaders); 1783 const nullTerminator = new Uint8Array([0]); 1784 const uint8Frame = new Uint8Array(uint8CmdAndHeaders.length + binaryBody.length + nullTerminator.length); 1785 uint8Frame.set(uint8CmdAndHeaders); 1786 uint8Frame.set(binaryBody, uint8CmdAndHeaders.length); 1787 uint8Frame.set(nullTerminator, uint8CmdAndHeaders.length + binaryBody.length); 1788 return uint8Frame; 1789 } 1790 /** 1791 * Serialize a STOMP frame as per STOMP standards, suitable to be sent to the STOMP broker. 1792 * 1793 * @internal 1794 */ 1795 static marshall(params) { 1796 const frame = new FrameImpl(params); 1797 return frame.serialize(); 1798 } 1799 /** 1800 * Escape header values 1801 */ 1802 static hdrValueEscape(str) { 1803 return str 1804 .replace(/\\/g, '\\\\') 1805 .replace(/\r/g, '\\r') 1806 .replace(/\n/g, '\\n') 1807 .replace(/:/g, '\\c'); 1808 } 1809 /** 1810 * UnEscape header values 1811 */ 1812 static hdrValueUnEscape(str) { 1813 return str 1814 .replace(/\\r/g, '\r')
1815 .replace(/\\n/g, '\n') 1816 .replace(/\\c/g, ':') 1817 .replace(/\\\\/g, '\\'); 1818 } 1819} 1820 1821 1822/***/ }), 1823
1824/***/ "./src/index.ts": 1825/*!**********************!*\ 1826 !*** ./src/index.ts ***! 1827 \**********************/ 1828/*! exports provided: Client, FrameImpl, Parser, StompConfig, StompHeaders, StompSubscription, StompSocketState, ActivationState, Versions, CompatClient, Stomp */ 1829/***/ (function(module, __webpack_exports__, __webpack_require__) { 1830 1831"use strict"; 1832__webpack_require__.r(__webpack_exports__); 1833/* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./client */ "./src/client.ts"); 1834/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Client", function() { return _client__WEBPACK_IMPORTED_MODULE_0__["Client"]; }); 1835 1836/* harmony import */ var _frame_impl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frame-impl */ "./src/frame-impl.ts"); 1837/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FrameImpl", function() { return _frame_impl__WEBPACK_IMPORTED_MODULE_1__["FrameImpl"]; }); 1838 1839/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser */ "./src/parser.ts"); 1840/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return _parser__WEBPACK_IMPORTED_MODULE_2__["Parser"]; }); 1841 1842/* harmony import */ var _stomp_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stomp-config */ "./src/stomp-config.ts"); 1843/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompConfig", function() { return _stomp_config__WEBPACK_IMPORTED_MODULE_3__["StompConfig"]; }); 1844 1845/* harmony import */ var _stomp_headers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stomp-headers */ "./src/stomp-headers.ts"); 1846/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompHeaders", function() { return _stomp_headers__WEBPACK_IMPORTED_MODULE_4__["StompHeaders"]; }); 1847 1848/* harmony import */ var _stomp_subscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./stomp-subscription */ "./src/stomp-subscription.ts"); 1849/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompSubscription", function() { return _stomp_subscription__WEBPACK_IMPORTED_MODULE_5__["StompSubscription"]; }); 1850 1851/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./types */ "./src/types.ts"); 1852/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StompSocketState", function() { return _types__WEBPACK_IMPORTED_MODULE_6__["StompSocketState"]; }); 1853 1854/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ActivationState", function() { return _types__WEBPACK_IMPORTED_MODULE_6__["ActivationState"]; }); 1855 1856/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./versions */ "./src/versions.ts"); 1857/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Versions", function() { return _versions__WEBPACK_IMPORTED_MODULE_7__["Versions"]; }); 1858 1859/* harmony import */ var _compatibility_compat_client__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./compatibility/compat-client */ "./src/compatibility/compat-client.ts"); 1860/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CompatClient", function() { return _compatibility_compat_client__WEBPACK_IMPORTED_MODULE_8__["CompatClient"]; }); 1861 1862/* harmony import */ var _compatibility_stomp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./compatibility/stomp */ "./src/compatibility/stomp.ts"); 1863/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Stomp", function() { return _compatibility_stomp__WEBPACK_IMPORTED_MODULE_9__["Stomp"]; }); 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873// Compatibility code 1874 1875 1876 1877 1878/***/ }), 1879
1880/***/ "./src/parser.ts": 1881/*!***********************!*\ 1882 !*** ./src/parser.ts ***! 1883 \***********************/ 1884/*! exports provided: Parser */ 1885/***/ (function(module, __webpack_exports__, __webpack_require__) { 1886 1887"use strict"; 1888__webpack_require__.r(__webpack_exports__); 1889/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Parser", function() { return Parser; }); 1890/** 1891 * @internal 1892 */ 1893const NULL = 0; 1894/** 1895 * @internal 1896 */ 1897const LF = 10; 1898/** 1899 * @internal 1900 */ 1901const CR = 13; 1902/** 1903 * @internal 1904 */ 1905const COLON = 58; 1906/** 1907 * This is an evented, rec descent parser. 1908 * A stream of Octets can be passed and whenever it recognizes 1909 * a complete Frame or an incoming ping it will invoke the registered callbacks. 1910 * 1911 * All incoming Octets are fed into _onByte function. 1912 * Depending on current state the _onByte function keeps changing. 1913 * Depending on the state it keeps accumulating into _token and _results. 1914 * State is indicated by current value of _onByte, all states are named as _collect. 1915 * 1916 * STOMP standards https://stomp.github.io/stomp-specification-1.2.html 1917 * imply that all lengths are considered in bytes (instead of string lengths). 1918 * So, before actual parsing, if the incoming data is String it is converted to Octets. 1919 * This allows faithful implementation of the protocol and allows NULL Octets to be present in the body. 1920 * 1921 * There is no peek function on the incoming data. 1922 * When a state change occurs based on an Octet without consuming the Octet, 1923 * the Octet, after state change, is fed again (_reinjectByte). 1924 * This became possible as the state change can be determined by inspecting just one Octet. 1925 * 1926 * There are two modes to collect the body, if content-length header is there then it by counting Octets 1927 * otherwise it is determined by NULL terminator. 1928 * 1929 * Following the standards, the command and headers are converted to Strings 1930 * and the body is returned as Octets. 1931 * Headers are returned as an array and not as Hash - to allow multiple occurrence of an header. 1932 * 1933 * This parser does not use Regular Expressions as that can only operate on Strings. 1934 * 1935 * It handles if multiple STOMP frames are given as one chunk, a frame is split into multiple chunks, or 1936 * any combination there of. The parser remembers its state (any partial frame) and continues when a new chunk 1937 * is pushed. 1938 * 1939 * Typically the higher level function will convert headers to Hash, handle unescaping of header values 1940 * (which is protocol version specific), and convert body to text. 1941 * 1942 * Check the parser.spec.js to understand cases that this parser is supposed to handle. 1943 * 1944 * Part of `@stomp/stompjs`. 1945 * 1946 * @internal 1947 */ 1948class Parser { 1949 constructor(onFrame, onIncomingPing) { 1950 this.onFrame = onFrame; 1951 this.onIncomingPing = onIncomingPing; 1952 this._encoder = new TextEncoder(); 1953 this._decoder = new TextDecoder(); 1954 this._token = []; 1955 this._initState(); 1956 } 1957 parseChunk(segment, appendMissingNULLonIncoming = false) { 1958 let chunk; 1959 if (segment instanceof ArrayBuffer) { 1960 chunk = new Uint8Array(segment); 1961 } 1962 else { 1963 chunk = this._encoder.encode(segment); 1964 } 1965 // See https://github.com/stomp-js/stompjs/issues/89 1966 // Remove when underlying issue is fixed. 1967 // 1968 // Send a NULL byte, if the last byte of a Text frame was not NULL.F 1969 if (appendMissingNULLonIncoming && chunk[chunk.length - 1] !== 0) { 1970 const chunkWithNull = new Uint8Array(chunk.length + 1); 1971 chunkWithNull.set(chunk, 0); 1972 chunkWithNull[chunk.length] = 0; 1973 chunk = chunkWithNull; 1974 } 1975 // tslint:disable-next-line:prefer-for-of 1976 for (let i = 0; i < chunk.length; i++) { 1977 const byte = chunk[i]; 1978 this._onByte(byte); 1979 } 1980 } 1981 // The following implements a simple Rec Descent Parser. 1982 // The grammar is simple and just one byte tells what should be the next state 1983 _collectFrame(byte) { 1984 if (byte === NULL) { 1985 // Ignore 1986 return; 1987 } 1988 if (byte === CR) { 1989 // Ignore CR 1990 return; 1991 } 1992 if (byte === LF) { 1993 // Incoming Ping 1994 this.onIncomingPing(); 1995 return; 1996 } 1997 this._onByte = this._collectCommand; 1998 this._reinjectByte(byte); 1999 } 2000 _collectCommand(byte) { 2001 if (byte === CR) { 2002 // Ignore CR 2003 return; 2004 } 2005 if (byte === LF) { 2006 this._results.command = this._consumeTokenAsUTF8(); 2007 this._onByte = this._collectHeaders; 2008 return; 2009 } 2010 this._consumeByte(byte); 2011 } 2012 _collectHeaders(byte) { 2013 if (byte === CR) { 2014 // Ignore CR 2015 return; 2016 } 2017 if (byte === LF) { 2018 this._setupCollectBody(); 2019 return; 2020 } 2021 this._onByte = this._collectHeaderKey; 2022 this._reinjectByte(byte); 2023 } 2024 _reinjectByte(byte) { 2025 this._onByte(byte); 2026 } 2027 _collectHeaderKey(byte) { 2028 if (byte === COLON) { 2029 this._headerKey = this._consumeTokenAsUTF8(); 2030 this._onByte = this._collectHeaderValue; 2031 return; 2032 } 2033 this._consumeByte(byte); 2034 } 2035 _collectHeaderValue(byte) { 2036 if (byte === CR) { 2037 // Ignore CR 2038 return; 2039 } 2040 if (byte === LF) { 2041 this._results.headers.push([this._headerKey, this._consumeTokenAsUTF8()]); 2042 this._headerKey = undefined; 2043 this._onByte = this._collectHeaders; 2044 return; 2045 } 2046 this._consumeByte(byte); 2047 } 2048 _setupCollectBody() { 2049 const contentLengthHeader = this._results.headers.filter((header) => { 2050 return header[0] === 'content-length'; 2051 })[0]; 2052 if (contentLengthHeader) { 2053 this._bodyBytesRemaining = parseInt(contentLengthHeader[1], 10); 2054 this._onByte = this._collectBodyFixedSize; 2055 } 2056 else { 2057 this._onByte = this._collectBodyNullTerminated; 2058 } 2059 } 2060 _collectBodyNullTerminated(byte) { 2061 if (byte === NULL) { 2062 this._retrievedBody(); 2063 return; 2064 } 2065 this._consumeByte(byte); 2066 } 2067 _collectBodyFixedSize(byte) { 2068 // It is post decrement, so that we discard the trailing NULL octet 2069 if (this._bodyBytesRemaining-- === 0) { 2070 this._retrievedBody(); 2071 return; 2072 } 2073 this._consumeByte(byte); 2074 } 2075 _retrievedBody() { 2076 this._results.binaryBody = this._consumeTokenAsRaw(); 2077 this.onFrame(this._results); 2078 this._initState(); 2079 } 2080 // Rec Descent Parser helpers 2081 _consumeByte(byte) { 2082 this._token.push(byte); 2083 } 2084 _consumeTokenAsUTF8() { 2085 return this._decoder.decode(this._consumeTokenAsRaw()); 2086 } 2087 _consumeTokenAsRaw() { 2088 const rawResult = new Uint8Array(this._token); 2089 this._token = []; 2090 return rawResult; 2091 } 2092 _initState() { 2093 this._results = { 2094 command: undefined, 2095 headers: [], 2096 binaryBody: undefined, 2097 }; 2098 this._token = []; 2099 this._headerKey = undefined; 2100 this._onByte = this._collectFrame; 2101 } 2102} 2103 2104 2105/***/ }), 2106
2107/***/ "./src/stomp-config.ts": 2108/*!*****************************!*\ 2109 !*** ./src/stomp-config.ts ***! 2110 \*****************************/ 2111/*! exports provided: StompConfig */ 2112/***/ (function(module, __webpack_exports__, __webpack_require__) { 2113 2114"use strict"; 2115__webpack_require__.r(__webpack_exports__); 2116/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompConfig", function() { return StompConfig; }); 2117/** 2118 * Configuration options for STOMP Client, each key corresponds to 2119 * field by the same name in {@link Client}. This can be passed to 2120 * the constructor of {@link Client} or to [Client#configure]{@link Client#configure}. 2121 * 2122 * There used to be a class with the same name in `@stomp/ng2-stompjs`, which has been replaced by 2123 * {@link RxStompConfig} and {@link InjectableRxStompConfig}. 2124 * 2125 * Part of `@stomp/stompjs`. 2126 */ 2127class StompConfig { 2128} 2129 2130 2131/***/ }), 2132
2133/***/ "./src/stomp-handler.ts": 2134/*!******************************!*\ 2135 !*** ./src/stomp-handler.ts ***! 2136 \******************************/ 2137/*! exports provided: StompHandler */ 2138/***/ (function(module, __webpack_exports__, __webpack_require__) { 2139 2140"use strict"; 2141__webpack_require__.r(__webpack_exports__); 2142/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompHandler", function() { return StompHandler; }); 2143/* harmony import */ var _byte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./byte */ "./src/byte.ts"); 2144/* harmony import */ var _frame_impl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frame-impl */ "./src/frame-impl.ts"); 2145/* harmony import */ var _parser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser */ "./src/parser.ts"); 2146/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types */ "./src/types.ts"); 2147/* harmony import */ var _versions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./versions */ "./src/versions.ts"); 2148/* harmony import */ var _augment_websocket__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./augment-websocket */ "./src/augment-websocket.ts"); 2149 2150 2151 2152 2153 2154 2155/** 2156 * The STOMP protocol handler 2157 * 2158 * Part of `@stomp/stompjs`. 2159 * 2160 * @internal 2161 */ 2162class StompHandler { 2163 constructor(_client, _webSocket, config = {}) { 2164 this._client = _client; 2165 this._webSocket = _webSocket; 2166 this._serverFrameHandlers = { 2167 // [CONNECTED Frame](http://stomp.github.com/stomp-specification-1.2.html#CONNECTED_Frame) 2168 CONNECTED: frame => { 2169 this.debug(`connected to server ${frame.headers.server}`); 2170 this._connected = true; 2171 this._connectedVersion = frame.headers.version; 2172 // STOMP version 1.2 needs header values to be escaped 2173 if (this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) { 2174 this._escapeHeaderValues = true; 2175 } 2176 this._setupHeartbeat(frame.headers); 2177 this.onConnect(frame); 2178 }, 2179 // [MESSAGE Frame](http://stomp.github.com/stomp-specification-1.2.html#MESSAGE) 2180 MESSAGE: frame => { 2181 // the callback is registered when the client calls 2182 // `subscribe()`. 2183 // If there is no registered subscription for the received message, 2184 // the default `onUnhandledMessage` callback is used that the client can set. 2185 // This is useful for subscriptions that are automatically created 2186 // on the browser side (e.g. [RabbitMQ's temporary 2187 // queues](http://www.rabbitmq.com/stomp.html)). 2188 const subscription = frame.headers.subscription; 2189 const onReceive = this._subscriptions[subscription] || this.onUnhandledMessage; 2190 // bless the frame to be a Message 2191 const message = frame; 2192 const client = this; 2193 const messageId = this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2 2194 ? message.headers.ack 2195 : message.headers['message-id']; 2196 // add `ack()` and `nack()` methods directly to the returned frame 2197 // so that a simple call to `message.ack()` can acknowledge the message. 2198 message.ack = (headers = {}) => { 2199 return client.ack(messageId, subscription, headers); 2200 }; 2201 message.nack = (headers = {}) => { 2202 return client.nack(messageId, subscription, headers); 2203 }; 2204 onReceive(message); 2205 }, 2206 // [RECEIPT Frame](http://stomp.github.com/stomp-specification-1.2.html#RECEIPT) 2207 RECEIPT: frame => { 2208 const callback = this._receiptWatchers[frame.headers['receipt-id']]; 2209 if (callback) { 2210 callback(frame); 2211 // Server will acknowledge only once, remove the callback 2212 delete this._receiptWatchers[frame.headers['receipt-id']]; 2213 } 2214 else { 2215 this.onUnhandledReceipt(frame); 2216 } 2217 }, 2218 // [ERROR Frame](http://stomp.github.com/stomp-specification-1.2.html#ERROR) 2219 ERROR: frame => { 2220 this.onStompError(frame); 2221 }, 2222 }; 2223 // used to index subscribers 2224 this._counter = 0; 2225 // subscription callbacks indexed by subscriber's ID 2226 this._subscriptions = {}; 2227 // receipt-watchers indexed by receipts-ids 2228 this._receiptWatchers = {}; 2229 this._partialData = ''; 2230 this._escapeHeaderValues = false;
2231 this._lastServerActivityTS = Date.now(); 2232 this.configure(config); 2233 } 2234 get connectedVersion() { 2235 return this._connectedVersion; 2236 } 2237 get connected() { 2238 return this._connected; 2239 } 2240 configure(conf) { 2241 // bulk assign all properties to this 2242 Object.assign(this, conf); 2243 } 2244 start() { 2245 const parser = new _parser__WEBPACK_IMPORTED_MODULE_2__["Parser"]( 2246 // On Frame 2247 rawFrame => { 2248 const frame = _frame_impl__WEBPACK_IMPORTED_MODULE_1__["FrameImpl"].fromRawFrame(rawFrame, this._escapeHeaderValues); 2249 // if this.logRawCommunication is set, the rawChunk is logged at this._webSocket.onmessage 2250 if (!this.logRawCommunication) { 2251 this.debug(`<<< ${frame}`); 2252 } 2253 const serverFrameHandler = this._serverFrameHandlers[frame.command] || this.onUnhandledFrame; 2254 serverFrameHandler(frame); 2255 }, 2256 // On Incoming Ping 2257 () => { 2258 this.debug('<<< PONG'); 2259 }); 2260 this._webSocket.onmessage = (evt) => { 2261 this.debug('Received data'); 2262 this._lastServerActivityTS = Date.now(); 2263 if (this.logRawCommunication) { 2264 const rawChunkAsString = evt.data instanceof ArrayBuffer 2265 ? new TextDecoder().decode(evt.data) 2266 : evt.data; 2267 this.debug(`<<< ${rawChunkAsString}`); 2268 } 2269 parser.parseChunk(evt.data, this.appendMissingNULLonIncoming); 2270 }; 2271 this._onclose = (closeEvent) => { 2272 this.debug(`Connection closed to ${this._client.brokerURL}`); 2273 this._cleanUp(); 2274 this.onWebSocketClose(closeEvent); 2275 }; 2276 this._webSocket.onclose = this._onclose; 2277 this._webSocket.onerror = (errorEvent) => { 2278 this.onWebSocketError(errorEvent); 2279 }; 2280 this._webSocket.onopen = () => { 2281 // Clone before updating 2282 const connectHeaders = Object.assign({}, this.connectHeaders); 2283 this.debug('Web Socket Opened...'); 2284 connectHeaders['accept-version'] = this.stompVersions.supportedVersions(); 2285 connectHeaders['heart-beat'] = [ 2286 this.heartbeatOutgoing, 2287 this.heartbeatIncoming, 2288 ].join(','); 2289 this._transmit({ command: 'CONNECT', headers: connectHeaders }); 2290 }; 2291 } 2292 _setupHeartbeat(headers) { 2293 if (headers.version !== _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_1 && 2294 headers.version !== _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) { 2295 return; 2296 } 2297 // It is valid for the server to not send this header 2298 // https://stomp.github.io/stomp-specification-1.2.html#Heart-beating 2299 if (!headers['heart-beat']) { 2300 return; 2301 } 2302 // heart-beat header received from the server looks like: 2303 // 2304 // heart-beat: sx, sy 2305 const [serverOutgoing, serverIncoming] = headers['heart-beat'] 2306 .split(',') 2307 .map((v) => parseInt(v, 10)); 2308 if (this.heartbeatOutgoing !== 0 && serverIncoming !== 0) { 2309 const ttl = Math.max(this.heartbeatOutgoing, serverIncoming); 2310 this.debug(`send PING every ${ttl}ms`); 2311 this._pinger = setInterval(() => { 2312 if (this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].OPEN) { 2313 this._webSocket.send(_byte__WEBPACK_IMPORTED_MODULE_0__["BYTE"].LF); 2314 this.debug('>>> PING'); 2315 } 2316 }, ttl); 2317 } 2318 if (this.heartbeatIncoming !== 0 && serverOutgoing !== 0) { 2319 const ttl = Math.max(this.heartbeatIncoming, serverOutgoing); 2320 this.debug(`check PONG every ${ttl}ms`); 2321 this._ponger = setInterval(() => { 2322 const delta = Date.now() - this._lastServerActivityTS; 2323 // We wait twice the TTL to be flexible on window's setInterval calls 2324 if (delta > ttl * 2) { 2325 this.debug(`did not receive server activity for the last ${delta}ms`); 2326 this._closeOrDiscardWebsocket(); 2327 } 2328 }, ttl); 2329 } 2330 } 2331 _closeOrDiscardWebsocket() { 2332 if (this.discardWebsocketOnCommFailure) { 2333 this.debug('Discarding websocket, the underlying socket may linger for a while'); 2334 this._discardWebsocket(); 2335 } 2336 else { 2337 this.debug('Issuing close on the websocket'); 2338 this._closeWebsocket(); 2339 } 2340 } 2341 forceDisconnect() { 2342 if (this._webSocket) { 2343 if (this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].CONNECTING || 2344 this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].OPEN) { 2345 this._closeOrDiscardWebsocket(); 2346 } 2347 } 2348 } 2349 _closeWebsocket() { 2350 this._webSocket.onmessage = () => { }; // ignore messages 2351 this._webSocket.close(); 2352 } 2353 _discardWebsocket() { 2354 if (!this._webSocket.terminate) { 2355 Object(_augment_websocket__WEBPACK_IMPORTED_MODULE_5__["augmentWebsocket"])(this._webSocket, (msg) => this.debug(msg)); 2356 } 2357 this._webSocket.terminate(); 2358 } 2359 _transmit(params) { 2360 const { command, headers, body, binaryBody, skipContentLengthHeader } = params; 2361 const frame = new _frame_impl__WEBPACK_IMPORTED_MODULE_1__["FrameImpl"]({ 2362 command, 2363 headers, 2364 body, 2365 binaryBody, 2366 escapeHeaderValues: this._escapeHeaderValues, 2367 skipContentLengthHeader, 2368 }); 2369 let rawChunk = frame.serialize(); 2370 if (this.logRawCommunication) { 2371 this.debug(`>>> ${rawChunk}`); 2372 } 2373 else { 2374 this.debug(`>>> ${frame}`); 2375 } 2376 if (this.forceBinaryWSFrames && typeof rawChunk === 'string') { 2377 rawChunk = new TextEncoder().encode(rawChunk); 2378 } 2379 if (typeof rawChunk !== 'string' || !this.splitLargeFrames) { 2380 this._webSocket.send(rawChunk); 2381 } 2382 else { 2383 let out = rawChunk; 2384 while (out.length > 0) { 2385 const chunk = out.substring(0, this.maxWebSocketChunkSize); 2386 out = out.substring(this.maxWebSocketChunkSize); 2387 this._webSocket.send(chunk); 2388 this.debug(`chunk sent = ${chunk.length}, remaining = ${out.length}`); 2389 } 2390 } 2391 } 2392 dispose() { 2393 if (this.connected) { 2394 try { 2395 // clone before updating 2396 const disconnectHeaders = Object.assign({}, this.disconnectHeaders); 2397 if (!disconnectHeaders.receipt) { 2398 disconnectHeaders.receipt = `close-${this._counter++}`; 2399 } 2400 this.watchForReceipt(disconnectHeaders.receipt, frame => { 2401 this._closeWebsocket(); 2402 this._cleanUp(); 2403 this.onDisconnect(frame); 2404 }); 2405 this._transmit({ command: 'DISCONNECT', headers: disconnectHeaders }); 2406 } 2407 catch (error) { 2408 this.debug(`Ignoring error during disconnect ${error}`); 2409 } 2410 } 2411 else { 2412 if (this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].CONNECTING || 2413 this._webSocket.readyState === _types__WEBPACK_IMPORTED_MODULE_3__["StompSocketState"].OPEN) { 2414 this._closeWebsocket(); 2415 } 2416 } 2417 } 2418 _cleanUp() { 2419 this._connected = false;
2420 if (this._pinger) { 2421 clearInterval(this._pinger); 2422 } 2423 if (this._ponger) { 2424 clearInterval(this._ponger); 2425 } 2426 } 2427 publish(params) { 2428 const { destination, headers, body, binaryBody, skipContentLengthHeader } = params; 2429 const hdrs = Object.assign({ destination }, headers); 2430 this._transmit({ 2431 command: 'SEND', 2432 headers: hdrs, 2433 body, 2434 binaryBody, 2435 skipContentLengthHeader, 2436 }); 2437 } 2438 watchForReceipt(receiptId, callback) { 2439 this._receiptWatchers[receiptId] = callback; 2440 } 2441 subscribe(destination, callback, headers = {}) { 2442 headers = Object.assign({}, headers); 2443 if (!headers.id) { 2444 headers.id = `sub-${this._counter++}`; 2445 } 2446 headers.destination = destination; 2447 this._subscriptions[headers.id] = callback; 2448 this._transmit({ command: 'SUBSCRIBE', headers }); 2449 const client = this; 2450 return { 2451 id: headers.id, 2452 unsubscribe(hdrs) { 2453 return client.unsubscribe(headers.id, hdrs); 2454 }, 2455 }; 2456 } 2457 unsubscribe(id, headers = {}) { 2458 headers = Object.assign({}, headers); 2459 delete this._subscriptions[id]; 2460 headers.id = id; 2461 this._transmit({ command: 'UNSUBSCRIBE', headers }); 2462 } 2463 begin(transactionId) { 2464 const txId = transactionId || `tx-${this._counter++}`; 2465 this._transmit({ 2466 command: 'BEGIN', 2467 headers: { 2468 transaction: txId, 2469 }, 2470 }); 2471 const client = this; 2472 return { 2473 id: txId, 2474 commit() { 2475 client.commit(txId); 2476 }, 2477 abort() { 2478 client.abort(txId); 2479 }, 2480 }; 2481 } 2482 commit(transactionId) { 2483 this._transmit({ 2484 command: 'COMMIT', 2485 headers: { 2486 transaction: transactionId, 2487 }, 2488 }); 2489 } 2490 abort(transactionId) { 2491 this._transmit({ 2492 command: 'ABORT', 2493 headers: { 2494 transaction: transactionId, 2495 }, 2496 }); 2497 } 2498 ack(messageId, subscriptionId, headers = {}) { 2499 headers = Object.assign({}, headers); 2500 if (this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) { 2501 headers.id = messageId; 2502 } 2503 else { 2504 headers['message-id'] = messageId; 2505 } 2506 headers.subscription = subscriptionId; 2507 this._transmit({ command: 'ACK', headers }); 2508 } 2509 nack(messageId, subscriptionId, headers = {}) { 2510 headers = Object.assign({}, headers); 2511 if (this._connectedVersion === _versions__WEBPACK_IMPORTED_MODULE_4__["Versions"].V1_2) { 2512 headers.id = messageId; 2513 } 2514 else { 2515 headers['message-id'] = messageId; 2516 } 2517 headers.subscription = subscriptionId; 2518 return this._transmit({ command: 'NACK', headers }); 2519 } 2520} 2521 2522 2523/***/ }), 2524
2525/***/ "./src/stomp-headers.ts": 2526/*!******************************!*\ 2527 !*** ./src/stomp-headers.ts ***! 2528 \******************************/ 2529/*! exports provided: StompHeaders */ 2530/***/ (function(module, __webpack_exports__, __webpack_require__) { 2531 2532"use strict"; 2533__webpack_require__.r(__webpack_exports__); 2534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompHeaders", function() { return StompHeaders; }); 2535/** 2536 * STOMP headers. Many functions calls will accept headers as parameters. 2537 * The headers sent by Broker will be available as [IFrame#headers]{@link IFrame#headers}. 2538 * 2539 * `key` and `value` must be valid strings. 2540 * In addition, `key` must not contain `CR`, `LF`, or `:`. 2541 * 2542 * Part of `@stomp/stompjs`. 2543 */ 2544class StompHeaders { 2545} 2546 2547 2548/***/ }), 2549
2550/***/ "./src/stomp-subscription.ts": 2551/*!***********************************!*\ 2552 !*** ./src/stomp-subscription.ts ***! 2553 \***********************************/ 2554/*! exports provided: StompSubscription */ 2555/***/ (function(module, __webpack_exports__, __webpack_require__) { 2556 2557"use strict"; 2558__webpack_require__.r(__webpack_exports__); 2559/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompSubscription", function() { return StompSubscription; }); 2560/** 2561 * Call [Client#subscribe]{@link Client#subscribe} to create a StompSubscription. 2562 * 2563 * Part of `@stomp/stompjs`. 2564 */ 2565class StompSubscription { 2566} 2567 2568 2569/***/ }), 2570
2571/***/ "./src/types.ts": 2572/*!**********************!*\ 2573 !*** ./src/types.ts ***! 2574 \**********************/ 2575/*! exports provided: StompSocketState, ActivationState */ 2576/***/ (function(module, __webpack_exports__, __webpack_require__) { 2577 2578"use strict"; 2579__webpack_require__.r(__webpack_exports__); 2580/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StompSocketState", function() { return StompSocketState; }); 2581/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActivationState", function() { return ActivationState; }); 2582/** 2583 * Possible states for the IStompSocket 2584 */ 2585var StompSocketState; 2586(function (StompSocketState) { 2587 StompSocketState[StompSocketState["CONNECTING"] = 0] = "CONNECTING"; 2588 StompSocketState[StompSocketState["OPEN"] = 1] = "OPEN"; 2589 StompSocketState[StompSocketState["CLOSING"] = 2] = "CLOSING"; 2590 StompSocketState[StompSocketState["CLOSED"] = 3] = "CLOSED"; 2591})(StompSocketState || (StompSocketState = {})); 2592/** 2593 * Possible activation state 2594 */ 2595var ActivationState; 2596(function (ActivationState) { 2597 ActivationState[ActivationState["ACTIVE"] = 0] = "ACTIVE"; 2598 ActivationState[ActivationState["DEACTIVATING"] = 1] = "DEACTIVATING"; 2599 ActivationState[ActivationState["INACTIVE"] = 2] = "INACTIVE"; 2600})(ActivationState || (ActivationState = {})); 2601 2602 2603/***/ }), 2604
2605/***/ "./src/versions.ts": 2606/*!*************************!*\ 2607 !*** ./src/versions.ts ***! 2608 \*************************/ 2609/*! exports provided: Versions */ 2610/***/ (function(module, __webpack_exports__, __webpack_require__) { 2611 2612"use strict"; 2613__webpack_require__.r(__webpack_exports__); 2614/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Versions", function() { return Versions; }); 2615/** 2616 * Supported STOMP versions 2617 * 2618 * Part of `@stomp/stompjs`. 2619 */ 2620class Versions { 2621 /** 2622 * Takes an array of string of versions, typical elements '1.0', '1.1', or '1.2' 2623 * 2624 * You will an instance if this class if you want to override supported versions to be declared during 2625 * STOMP handshake. 2626 */ 2627 constructor(versions) { 2628 this.versions = versions; 2629 } 2630 /** 2631 * Used as part of CONNECT STOMP Frame 2632 */ 2633 supportedVersions() { 2634 return this.versions.join(','); 2635 } 2636 /** 2637 * Used while creating a WebSocket 2638 */ 2639 protocolVersions() { 2640 return this.versions.map(x => `v${x.replace('.', '')}.stomp`); 2641 } 2642} 2643/** 2644 * Indicates protocol version 1.0 2645 */ 2646Versions.V1_0 = '1.0'; 2647/** 2648 * Indicates protocol version 1.1 2649 */ 2650Versions.V1_1 = '1.1'; 2651/** 2652 * Indicates protocol version 1.2 2653 */ 2654Versions.V1_2 = '1.2'; 2655/** 2656 * @internal 2657 */ 2658Versions.default = new Versions([ 2659 Versions.V1_0, 2660 Versions.V1_1, 2661 Versions.V1_2, 2662]); 2663 2664 2665/***/ })
2665, 2666 2667/***/ 0: 2668/*!****************************!*\ 2669 !*** multi ./src/index.ts ***! 2670 \****************************/ 2671/*! no static exports found */ 2672/***/ (function(module, exports, __webpack_require__) { 2673 2674module.exports = __webpack_require__(/*! /home/kdeepak/MyWork/Tech/stomp/stompjs/src/index.ts */"./src/index.ts"); 2675 2676 2677/***/ }) 2678 2679/******/ }); 2680}); 2681 2682},{}],3:[function(require,module,exports){ 2683(function (Buffer){ 2684"use strict"; 2685 2686Object.defineProperty(exports, "__esModule", { 2687 value: true 2688}); 2689exports["default"] = void 0; 2690 2691var _superagent = _interopRequireDefault(require("superagent")); 2692 2693var _querystring = _interopRequireDefault(require("querystring")); 2694 2695function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 2696 2697function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } 2698 2699function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 2700 2701function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 2702 2703function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 2704 2705/** 2706* @module ApiClient 2707* @version 1.0.14 2708*/ 2709 2710/** 2711* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an 2712* application to use this class directly - the *Api and model classes provide the public API for the service. The 2713* contents of this file should be regarded as internal but are documented for completeness. 2714* @alias module:ApiClient 2715* @class 2716*/ 2717var ApiClient = /*#__PURE__*/function () { 2718 /** 2719 * The base URL against which to resolve every API call's (relative) path. 2720 * Overrides the default value set in spec file if present 2721 * @param {String} basePath 2722 */ 2723 function ApiClient() { 2724 var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'https://member-api.ziqni.com'; 2725 2726 _classCallCheck(this, ApiClient); 2727 2728 /** 2729 * The base URL against which to resolve every API call's (relative) path. 2730 * @type {String} 2731 * @default https://member-api.ziqni.com 2732 */ 2733 this.basePath = basePath.replace(/\/+$/, ''); 2734 /** 2735 * The authentication methods to be included for all API calls. 2736 * @type {Array.<String>} 2737 */ 2738 2739 this.authentications = { 2740 'OAuth2': { 2741 type: 'oauth2' 2742 } 2743 }; 2744 /** 2745 * The default HTTP headers to be included for all API calls. 2746 * @type {Array.<String>} 2747 * @default {} 2748 */ 2749 2750 this.defaultHeaders = { 2751 'User-Agent': 'OpenAPI-Generator/1.0.14/Javascript' 2752 }; 2753 /** 2754 * The default HTTP timeout for all API calls. 2755 * @type {Number} 2756 * @default 60000 2757 */ 2758 2759 this.timeout = 60000; 2760 /** 2761 * If set to false an additional timestamp parameter is added to all API GET calls to 2762 * prevent browser caching 2763 * @type {Boolean} 2764 * @default true 2765 */ 2766 2767 this.cache = true; 2768 /** 2769 * If set to true, the client will save the cookies from each server 2770 * response, and return them in the next request. 2771 * @default false 2772 */ 2773 2774 this.enableCookies = false; 2775 /* 2776 * Used to save and return cookies in a node.js (non-browser) setting, 2777 * if this.enableCookies is set to true. 2778 */ 2779 2780 if (typeof window === 'undefined') { 2781 this.agent = new _superagent["default"].agent(); 2782 } 2783 /* 2784 * Allow user to override superagent agent 2785 */ 2786 2787 2788 this.requestAgent = null; 2789 /* 2790 * Allow user to add superagent plugins 2791 */ 2792 2793 this.plugins = null; 2794 } 2795 /** 2796 * Returns a string representation for an actual parameter. 2797 * @param param The actual parameter. 2798 * @returns {String} The string representation of <code>param</code>. 2799 */ 2800 2801 2802 _createClass(ApiClient, [{ 2803 key: "paramToString", 2804 value: function paramToString(param) { 2805 if (param == undefined || param == null) { 2806 return ''; 2807 } 2808 2809 if (param instanceof Date) { 2810 return param.toJSON(); 2811 } 2812 2813 if (ApiClient.canBeJsonified(param)) { 2814 return JSON.stringify(param); 2815 } 2816 2817 return param.toString(); 2818 } 2819 /** 2820 * Returns a boolean indicating if the parameter could be JSON.stringified 2821 * @param param The actual parameter 2822 * @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified 2823 */ 2824 2825 }, { 2826 key: "buildUrl", 2827 value: 2828 /** 2829 * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. 2830 * NOTE: query parameters are not handled here. 2831 * @param {String} path The path to append to the base URL. 2832 * @param {Object} pathParams The parameter values to append. 2833 * @param {String} apiBasePath Base path defined in the path, operation level to override the default one 2834 * @returns {String} The encoded path with parameter values substituted. 2835 */ 2836 function buildUrl(path, pathParams, apiBasePath) { 2837 var _this = this; 2838 2839 if (!path.match(/^\//)) { 2840 path = '/' + path; 2841 } 2842 2843 var url = this.basePath + path; // use API (operation, path) base path if defined 2844 2845 if (apiBasePath !== null && apiBasePath !== undefined) { 2846 url = apiBasePath + path; 2847 } 2848 2849 url = url.replace(/\{([\w-\.]+)\}/g, function (fullMatch, key) { 2850 var value; 2851 2852 if (pathParams.hasOwnProperty(key)) { 2853 value = _this.paramToString(pathParams[key]); 2854 } else { 2855 value = fullMatch; 2856 } 2857 2858 return encodeURIComponent(value); 2859 }); 2860 return url; 2861 } 2862 /** 2863 * Checks whether the given content type represents JSON.<br> 2864 * JSON content type examples:<br> 2865 * <ul> 2866 * <li>application/json</li> 2867 * <li>application/json; charset=UTF8</li> 2868 * <li>APPLICATION/JSON</li> 2869 * </ul> 2870 * @param {String} contentType The MIME content type to check. 2871 * @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>. 2872 */ 2873 2874 }, { 2875 key: "isJsonMime", 2876 value: function isJsonMime(contentType) { 2877 return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); 2878 } 2879 /** 2880 * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. 2881 * @param {Array.<String>} contentTypes 2882 * @returns {String} The chosen content type, preferring JSON. 2883 */ 2884 2885 }, { 2886 key: "jsonPreferredMime", 2887 value: function jsonPreferredMime(contentTypes) { 2888 for (var i = 0; i < contentTypes.length; i++) { 2889 if (this.isJsonMime(contentTypes[i])) { 2890 return contentTypes[i]; 2891 } 2892 } 2893 2894 return contentTypes[0]; 2895 } 2896 /** 2897 * Checks whether the given parameter value represents file-like content. 2898 * @param param The parameter to check. 2899 * @returns {Boolean} <code>true</code> if <code>param</code> represents a file. 2900 */ 2901 2902 }, { 2903 key: "isFileParam", 2904 value: function isFileParam(param) { 2905 // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) 2906 if (typeof require === 'function') { 2907 var fs; 2908 2909 try { 2910 fs = require('fs'); 2911 } catch (err) {} 2912 2913 if (fs && fs.ReadStream && param instanceof fs.ReadStream) { 2914 return true; 2915 } 2916 } // Buffer in Node.js 2917 2918 2919 if (typeof Buffer === 'function' && param instanceof Buffer) { 2920 return true; 2921 } // Blob in browser 2922 2923 2924 if (typeof Blob === 'function' && param instanceof Blob) { 2925 return true; 2926 } // File in browser (it seems File object is also instance of Blob, but keep this for safe) 2927 2928 2929 if (typeof File === 'function' && param instanceof File) { 2930 return true; 2931 } 2932 2933 return false;
2934 } 2935 /** 2936 * Normalizes parameter values: 2937 * <ul> 2938 * <li>remove nils</li> 2939 * <li>keep files and arrays</li> 2940 * <li>format to string with `paramToString` for other cases</li> 2941 * </ul> 2942 * @param {Object.<String, Object>} params The parameters as object properties. 2943 * @returns {Object.<String, Object>} normalized parameters. 2944 */ 2945 2946 }, { 2947 key: "normalizeParams", 2948 value: function normalizeParams(params) { 2949 var newParams = {}; 2950 2951 for (var key in params) { 2952 if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { 2953 var value = params[key]; 2954 2955 if (this.isFileParam(value) || Array.isArray(value)) { 2956 newParams[key] = value; 2957 } else { 2958 newParams[key] = this.paramToString(value); 2959 } 2960 } 2961 } 2962 2963 return newParams; 2964 } 2965 /** 2966 * Builds a string representation of an array-type actual parameter, according to the given collection format. 2967 * @param {Array} param An array parameter. 2968 * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. 2969 * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns 2970 * <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>. 2971 */ 2972 2973 }, { 2974 key: "buildCollectionParam", 2975 value: function buildCollectionParam(param, collectionFormat) { 2976 if (param == null) { 2977 return null; 2978 } 2979 2980 switch (collectionFormat) { 2981 case 'csv': 2982 return param.map(this.paramToString, this).join(','); 2983 2984 case 'ssv': 2985 return param.map(this.paramToString, this).join(' '); 2986 2987 case 'tsv': 2988 return param.map(this.paramToString, this).join('\t'); 2989 2990 case 'pipes': 2991 return param.map(this.paramToString, this).join('|'); 2992 2993 case 'multi': 2994 //return the array directly as SuperAgent will handle it as expected 2995 return param.map(this.paramToString, this); 2996 2997 case 'passthrough': 2998 return param; 2999 3000 default: 3001 throw new Error('Unknown collection format: ' + collectionFormat); 3002 } 3003 } 3004 /** 3005 * Applies authentication headers to the request. 3006 * @param {Object} request The request object created by a <code>superagent()</code> call. 3007 * @param {Array.<String>} authNames An array of authentication method names. 3008 */ 3009 3010 }, { 3011 key: "applyAuthToRequest", 3012 value: function applyAuthToRequest(request, authNames) { 3013 var _this2 = this; 3014 3015 authNames.forEach(function (authName) { 3016 var auth = _this2.authentications[authName]; 3017 3018 switch (auth.type) { 3019 case 'basic': 3020 if (auth.username || auth.password) { 3021 request.auth(auth.username || '', auth.password || ''); 3022 } 3023 3024 break; 3025 3026 case 'bearer': 3027 if (auth.accessToken) { 3028 var localVarBearerToken = typeof auth.accessToken === 'function' ? auth.accessToken() : auth.accessToken; 3029 request.set({ 3030 'Authorization': 'Bearer ' + localVarBearerToken 3031 }); 3032 } 3033 3034 break; 3035 3036 case 'apiKey': 3037 if (auth.apiKey) { 3038 var data = {}; 3039 3040 if (auth.apiKeyPrefix) { 3041 data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; 3042 } else { 3043 data[auth.name] = auth.apiKey; 3044 } 3045 3046 if (auth['in'] === 'header') { 3047 request.set(data); 3048 } else { 3049 request.query(data); 3050 } 3051 } 3052 3053 break; 3054 3055 case 'oauth2': 3056 if (auth.accessToken) { 3057 request.set({ 3058 'Authorization': 'Bearer ' + auth.accessToken 3059 }); 3060 } 3061 3062 break; 3063 3064 default: 3065 throw new Error('Unknown authentication type: ' + auth.type); 3066 } 3067 }); 3068 } 3069 /** 3070 * Deserializes an HTTP response body into a value of the specified type. 3071 * @param {Object} response A SuperAgent response object. 3072 * @param {(String|Array.<String>|Object.<String, Object>|Function)} returnType The type to return. Pass a string for simple types 3073 * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To 3074 * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: 3075 * all properties on <code>data<code> will be converted to this type. 3076 * @returns A value of the specified type. 3077 */ 3078 3079 }, {
3080 key: "deserialize", 3081 value: function deserialize(response, returnType) { 3082 if (response == null || returnType == null || response.status == 204) { 3083 return null; 3084 } // Rely on SuperAgent for parsing response body. 3085 // See http://visionmedia.github.io/superagent/#parsing-response-bodies 3086 3087 3088 var data = response.body; 3089 3090 if (data == null || _typeof(data) === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) { 3091 // SuperAgent does not always produce a body; use the unparsed response as a fallback 3092 data = response.text; 3093 } 3094 3095 return ApiClient.convertToType(data, returnType); 3096 } 3097 /** 3098 * Callback function to receive the result of the operation. 3099 * @callback module:ApiClient~callApiCallback 3100 * @param {String} error Error message, if any. 3101 * @param data The data returned by the service call. 3102 * @param {String} response The complete HTTP response. 3103 */ 3104 3105 /** 3106 * Invokes the REST service using the supplied settings and parameters. 3107 * @param {String} path The base URL to invoke. 3108 * @param {String} httpMethod The HTTP method to use. 3109 * @param {Object.<String, String>} pathParams A map of path parameters and their values. 3110 * @param {Object.<String, Object>} queryParams A map of query parameters and their values. 3111 * @param {Object.<String, Object>} headerParams A map of header parameters and their values. 3112 * @param {Object.<String, Object>} formParams A map of form parameters and their values. 3113 * @param {Object} bodyParam The value to pass as the request body. 3114 * @param {Array.<String>} authNames An array of authentication type names. 3115 * @param {Array.<String>} contentTypes An array of request MIME types. 3116 * @param {Array.<String>} accepts An array of acceptable response MIME types. 3117 * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the 3118 * constructor for a complex type. 3119 * @param {String} apiBasePath base path defined in the operation/path level to override the default one 3120 * @param {module:ApiClient~callApiCallback} callback The callback function. 3121 * @returns {Object} The SuperAgent request object. 3122 */ 3123 3124 }, { 3125 key: "callApi", 3126 value: function callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, apiBasePath, callback) { 3127 var _this3 = this; 3128 3129 var url = this.buildUrl(path, pathParams, apiBasePath); 3130 var request = (0, _superagent["default"])(httpMethod, url); 3131 3132 if (this.plugins !== null) { 3133 for (var index in this.plugins) { 3134 if (this.plugins.hasOwnProperty(index)) { 3135 request.use(this.plugins[index]); 3136 } 3137 } 3138 } // apply authentications 3139 3140 3141 this.applyAuthToRequest(request, authNames); // set query parameters 3142 3143 if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { 3144 queryParams['_'] = new Date().getTime(); 3145 } 3146 3147 request.query(this.normalizeParams(queryParams)); // set header parameters 3148 3149 request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); // set requestAgent if it is set by user 3150 3151 if (this.requestAgent) { 3152 request.agent(this.requestAgent); 3153 } // set request timeout 3154 3155 3156 request.timeout(this.timeout); 3157 var contentType = this.jsonPreferredMime(contentTypes); 3158 3159 if (contentType) { 3160 // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) 3161 if (contentType != 'multipart/form-data') { 3162 request.type(contentType); 3163 } 3164 } 3165 3166 if (contentType === 'application/x-www-form-urlencoded') { 3167 request.send(_querystring["default"].stringify(this.normalizeParams(formParams))); 3168 } else if (contentType == 'multipart/form-data') { 3169 var _formParams = this.normalizeParams(formParams); 3170 3171 for (var key in _formParams) { 3172 if (_formParams.hasOwnProperty(key)) { 3173 var _formParamsValue = _formParams[key]; 3174 3175 if (this.isFileParam(_formParamsValue)) { 3176 // file field 3177 request.attach(key, _formParamsValue); 3178 } else if (Array.isArray(_formParamsValue) && _formParamsValue.length && this.isFileParam(_formParamsValue[0])) { 3179 // multiple files 3180 _formParamsValue.forEach(function (file) { 3181 return request.attach(key, file); 3182 }); 3183 } else { 3184 request.field(key, _formParamsValue); 3185 } 3186 } 3187 } 3188 } else if (bodyParam !== null && bodyParam !== undefined) { 3189 if (!request.header['Content-Type']) { 3190 request.type('application/json'); 3191 } 3192 3193 request.send(bodyParam); 3194 } 3195 3196 var accept = this.jsonPreferredMime(accepts); 3197 3198 if (accept) { 3199 request.accept(accept); 3200 } 3201 3202 if (returnType === 'Blob') { 3203 request.responseType('blob'); 3204 } else if (returnType === 'String') { 3205 request.responseType('string'); 3206 } // Attach previously saved cookies, if enabled 3207 3208 3209 if (this.enableCookies) { 3210 if (typeof window === 'undefined') { 3211 this.agent._attachCookies(request); 3212 } else { 3213 request.withCredentials(); 3214 } 3215 } 3216 3217 request.end(function (error, response) { 3218 if (callback) { 3219 var data = null; 3220 3221 if (!error) { 3222 try { 3223 data = _this3.deserialize(response, returnType); 3224 3225 if (_this3.enableCookies && typeof window === 'undefined') { 3226 _this3.agent._saveCookies(response); 3227 } 3228 } catch (err) { 3229 error = err; 3230 } 3231 } 3232 3233 callback(error, data, response); 3234 } 3235 }); 3236 return request; 3237 } 3238 /** 3239 * Parses an ISO-8601 string representation or epoch representation of a date value. 3240 * @param {String} str The date value as a string. 3241 * @returns {Date} The parsed date object. 3242 */ 3243 3244 }, { 3245 key: "hostSettings", 3246 value: 3247 /** 3248 * Gets an array of host settings 3249 * @returns An array of host settings 3250 */ 3251 function hostSettings() { 3252 return [{ 3253 'url': "https://member-api.ziqni.com", 3254 'description': "Live" 3255 }]; 3256 } 3257 }, { 3258 key: "getBasePathFromSettings", 3259 value: function getBasePathFromSettings(index) { 3260 var variables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 3261 var servers = this.hostSettings(); // check array index out of bound 3262 3263 if (index < 0 || index >= servers.length) { 3264 throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); 3265 } 3266 3267 var server = servers[index]; 3268 var url = server['url']; // go through variable and assign a value 3269 3270 for (var variable_name in server['variables']) { 3271 if (variable_name in variables) { 3272 var variable = server['variables'][variable_name]; 3273 3274 if (!('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name])) { 3275 url = url.replace("{" + variable_name + "}", variables[variable_name]); 3276 } else { 3277 throw new Error("The variable `" + variable_name + "` in the host URL has invali
3277d value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); 3278 } 3279 } else { 3280 // use default value 3281 url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']); 3282 } 3283 } 3284 3285 return url; 3286 } 3287 /** 3288 * Constructs a new map or array model from REST data. 3289 * @param data {Object|Array} The REST data. 3290 * @param obj {Object|Array} The target object or array. 3291 */ 3292 3293 }], [{ 3294 key: "canBeJsonified", 3295 value: function canBeJsonified(str) { 3296 if (typeof str !== 'string' && _typeof(str) !== 'object') return false; 3297 3298 try { 3299 var type = str.toString(); 3300 return type === '[object Object]' || type === '[object Array]'; 3301 } catch (err) { 3302 return false; 3303 } 3304 } 3305 }, { 3306 key: "parseDate", 3307 value: function parseDate(str) { 3308 if (isNaN(str)) { 3309 return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); 3310 } 3311 3312 return new Date(+str); 3313 } 3314 /** 3315 * Converts a value to the specified type. 3316 * @param {(String|Object)} data The data to convert, as a string or object. 3317 * @param {(String|Array.<String>|Object.<String, Object>|Function)} type The type to return. Pass a string for simple types 3318 * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To 3319 * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: 3320 * all properties on <code>data<code> will be converted to this type. 3321 * @returns An instance of the specified type or null or undefined if data is null or undefined. 3322 */ 3323 3324 }, { 3325 key: "convertToType", 3326 value: function convertToType(data, type) { 3327 if (data === null || data === undefined) return data; 3328 3329 switch (type) { 3330 case 'Boolean': 3331 return Boolean(data); 3332 3333 case 'Integer': 3334 return parseInt(data, 10); 3335 3336 case 'Number': 3337 return parseFloat(data); 3338 3339 case 'String': 3340 return String(data); 3341 3342 case 'Date': 3343 return ApiClient.parseDate(String(data)); 3344 3345 case 'Blob': 3346 return data; 3347 3348 default: 3349 if (type === Object) { 3350 // generic object, return directly 3351 return data; 3352 } else if (typeof type.constructFromObject === 'function') { 3353 // for model type like User and enum class 3354 return type.constructFromObject(data); 3355 } else if (Array.isArray(type)) { 3356 // for array type like: ['String'] 3357 var itemType = type[0]; 3358 return data.map(function (item) { 3359 return ApiClient.convertToType(item, itemType); 3360 }); 3361 } else if (_typeof(type) === 'object') { 3362 // for plain object type like: {'String': 'Integer'} 3363 var keyType, valueType; 3364 3365 for (var k in type) { 3366 if (type.hasOwnProperty(k)) { 3367 keyType = k; 3368 valueType = type[k]; 3369 break; 3370 } 3371 } 3372 3373 var result = {}; 3374 3375 for (var k in data) { 3376 if (data.hasOwnProperty(k)) { 3377 var key = ApiClient.convertToType(k, keyType); 3378 var value = ApiClient.convertToType(data[k], valueType); 3379 result[key] = value; 3380 } 3381 } 3382 3383 return result; 3384 } else { 3385 // for unknown type, return the data directly 3386 return data; 3387 } 3388 3389 } 3390 } 3391 }, { 3392 key: "constructFromObject", 3393 value: function constructFromObject(data, obj, itemType) { 3394 if (Array.isArray(data)) { 3395 for (var i = 0; i < data.length; i++) { 3396 if (data.hasOwnProperty(i)) obj[i] = ApiClient.convertToType(data[i], itemType); 3397 } 3398 } else { 3399 for (var k in data) { 3400 if (data.hasOwnProperty(k)) obj[k] = ApiClient.convertToType(data[k], itemType); 3401 } 3402 } 3403 } 3404 }]); 3405 3406 return ApiClient; 3407}(); 3408/** 3409 * Enumeration of collection format separator strategies. 3410 * @enum {String} 3411 * @readonly 3412 */ 3413 3414 3415ApiClient.CollectionFormatEnum = { 3416 /** 3417 * Comma-separated values. Value: <code>csv</code> 3418 * @const 3419 */ 3420 CSV: ',', 3421 3422 /** 3423 * Space-separated values. Value: <code>ssv</code> 3424 * @const 3425 */ 3426 SSV: ' ', 3427 3428 /** 3429 * Tab-separated values. Value: <code>tsv</code> 3430 * @const 3431 */ 3432 TSV: '\t', 3433 3434 /** 3435 * Pipe(|)-separated values. Value: <code>pipes</code> 3436 * @const 3437 */ 3438 PIPES: '|', 3439 3440 /** 3441 * Native array. Value: <code>multi</code> 3442 * @const 3443 */ 3444 MULTI: 'multi' 3445}; 3446/** 3447* The default API client implementation. 3448* @type {module:ApiClient} 3449*/ 3450 3451ApiClient.instance = new ApiClient(); 3452var _default = ApiClient; 3453exports["default"] = _default; 3454}).call(this,require("buffer").Buffer) 3455},{"buffer":168,"fs":167,"querystring":176,"superagent":236}],4:[function(require,module,exports){ 3456"use strict"; 3457 3458function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } 3459 3460Object.defineProperty(exports, "__esModule", { 3461 value: true 3462}); 3463exports["default"] = void 0; 3464 3465var _superagent = _interopRequireDefault(require("superagent")); 3466 3467var _querystring = _interopRequireDefault(require("querystring")); 3468 3469function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 3470 3471function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context);
vendor: 6,615 bytes, line 3471
3471 if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEac
3471h(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } 3472 3473function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } 3474 3475function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } 3476 3477function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3478 3479function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3480 3481function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 3482 3483function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 3484 3485var StompJs = require('@stomp/stompjs'); 3486 3487var SockJS = require('sockjs-client'); 3488/** 3489* @module ApiClient 3490* @version 0.0.1 3491*/ 3492 3493/** 3494* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an 3495* application to use this class directly - the *Api and model classes provide the public API for the service. The 3496* contents of this file should be regarded as internal but are documented for completeness. 3497* @alias module:ApiClient 3498* @class 3499*/ 3500 3501 3502var ApiClientStomp = /*#__PURE__*/function () { 3503 /** 3504 * @type StompJs.Client 3505 */ 3506 3507 /** 3508 * The base URL against which to resolve every API call's (relative) path. 3509 * Overrides the default value set in spec file if present 3510 * @param {String} basePath 3511 */ 3512 function ApiClientStomp() { 3513 var _this = this; 3514 3515 var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'wss://member-api.ziqni.com/ws'; 3516 3517 _classCallCheck(this, ApiClientStomp); 3518 3519 _defineProperty(this, "client", void 0); 3520 3521 _defineProperty(this, "connect", /*#__PURE__*/function () { 3522 var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(param) { 3523 return _regeneratorRuntime().wrap(function _callee$(_context) { 3524 while (1) { 3525 switch (_context.prev = _context.next) { 3526 case 0: 3527 return _context.abrupt("return", new Promise(function (resolve, reject) { 3528 _this.client.beforeConnect = function () { 3529 if (param && param.token) { 3530 _this.client.connectHeaders = { 3531 login: 'Bearer', 3532 passcode: param.token // 'JWT token you get from https://api.ziqni.com/swagger-ui/#/member-token/createMemberToken', 3533 3534 }; 3535 } 3536 }; 3537 3538 _this.client.onConnect = function (frame) { 3539 if (frame.command === 'CONNECTED') { 3540 var rpcCallbackSubscription = _this.client.subscribe("/user/queue/rpc-results", _this.handleRpcCallback); 3541 3542 var sysCallbackSubscription = _this.client.subscribe("/user/queue/callbacks", _this.handleSysCallback); 3543 3544 resolve(); 3545 } // Do something, all subscribes must be done is this callback 3546 // This is needed because this will be executed after a (re)connect 3547 3548 }; 3549 3550 _this.client.onStompError = function (frame) {
3551 // Will be invoked in case of error encountered at Broker 3552 // Bad login/passcode typically will cause an error 3553 // Complaint brokers will set `message` header with a brief message. Body may contain details. 3554 // Compliant brokers will terminate the connection after any error 3555 //Todo: check if we really need to deactivate client 3556 console.log('Broker reported error: ' + frame.headers['message']); 3557 console.log('Additional details: ' + frame.body); // this.client.deactivate() 3558 // reject({ 3559 // error: { 3560 // message: frame.headers['message'], 3561 // body: frame.body 3562 // } 3563 // }) 3564 }; 3565 3566 _this.client.activate(); 3567 })); 3568 3569 case 1: 3570 case "end": 3571 return _context.stop(); 3572 } 3573 } 3574 }, _callee); 3575 })); 3576 3577 return function (_x) { 3578 return _ref.apply(this, arguments); 3579 }; 3580 }()); 3581 3582 _defineProperty(this, "disconnect", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { 3583 return _regeneratorRuntime().wrap(function _callee2$(_context2) { 3584 while (1) { 3585 switch (_context2.prev = _context2.next) { 3586 case 0: 3587 return _context2.abrupt("return", new Promise(function (resolve, reject) { 3588 _this.client.deactivate().then(function () { 3589 return resolve(); 3590 })["catch"](function () { 3591 return reject(); 3592 }); 3593 })); 3594 3595 case 1: 3596 case "end": 3597 return _context2.stop(); 3598 } 3599 } 3600 }, _callee2); 3601 }
3601))); 3602 3603 _defineProperty(this, "handleRpcCallback", function (message) { 3604 if (message.body) { 3605 var messageId = message.headers['message-id']; 3606 3607 var callback = _this.rpcCallBacks && _this.rpcCallBacks.get(messageId); 3608 3609 if (callback) { 3610 callback(JSON.parse(message.body)); 3611 } // ToDo: Handle messages with unknown message id 3612 // console.log("Got Message With Body " + message.body); 3613 3614 } else { 3615 console.log('message with empty body', message); // ToDo: Handle message with empty body 3616 } 3617 }); 3618 3619 _defineProperty(this, "handleSysCallback", function (message) { 3620 if (message.body) { 3621 if (typeof _this.sysCallBack === 'function') { 3622 _this.sysCallBack(JSON.parse(message.body), message.headers); 3623 } else { 3624 console.log("SysCallBack is empty. Message: " + message.body); 3625 } 3626 } else { 3627 console.log('message with empty body', message); 3628 } 3629 }); 3630 3631 /** 3632 * The base URL against which to resolve every API call's (relative) path. 3633 * @type {String} 3634 * @default https://member-api.ziqni.com 3635 */ 3636 this.basePath = basePath.replace(/\/+$/, ''); 3637 /** 3638 * The authentication methods to be included for all API calls. 3639 * @type {Array.<String>} 3640 */ 3641 3642 this.authentications = { 3643 'OAuth2': { 3644 type: 'oauth2' 3645 } 3646 }; 3647 /** 3648 * The default HTTP headers to be included for all API calls. 3649 * @type {Array.<String>} 3650 * @default {} 3651 */ 3652 3653 this.defaultHeaders = { 3654 'User-Agent': 'OpenAPI-Generator/0.0.1/Javascript' 3655 }; 3656 /** 3657 * The default HTTP timeout for all API calls. 3658 * @type {Number} 3659 * @default 60000 3660 */ 3661 3662 this.timeout = 60000; 3663 /* 3664 * Used to save and return cookies in a node.js (non-browser) setting, 3665 * if this.enableCookies is set to true. 3666 */ 3667 3668 if (typeof window === 'undefined') { 3669 this.agent = new _superagent["default"].agent(); 3670 } 3671 3672 this.publicToken = 'eyJhbGciOiJIUzI1NiJ9.eyJhcGlfa2V5X2lkIjoicXhtcXFZRUJUZVV0U0VzNEVJLWgiLCJtZW1iZXJfcmVmZXJlbmNlX2lkIjoiVGVzdF9rZXktMDYwNzg0NGYtMjU1Yy00ZDE5LTg1YTAtYzQzNmMxZDRmNTVlIiwiYWNjb3VudF9pZCI6IkY3bThkSHdCc3ctT0gzTUVvVzIzIiwic3BhY2VfbmFtZSI6ImZpcnN0LXNwYWNlIiwibmFtZSI6IlRlc3RfbmFtZS0zYWE1YzRlZS1jY2VlLTRiZWMtYjU5My1kYTdiMzAwZWU4OTAiLCJtZW1iZXJfdHlwZSI6IkluZGl2aWR1YWwiLCJtZW1iZXJfaWQiOiJ3LVVlSElJQnVwTjhDRjN6YzBoeiIsInJlc291cmNlX2FjY2VzcyI6eyJ6aXFuaS1nYXBpIjp7InJvbGVzIjpbIlB1YmxpYyIsIk1lbWJlciIsIlZpZXdBY2hpZXZlbWVudHMiLCJWaWV3QXdhcmRzIiwiQ2xhaW1Bd2FyZHMiLCJWaWV3Q29tcGV0aXRpb25zIiwiVmlld0NvbnRlc3RzIiwiVmlld0ZpbGVzIiwiVmlld01lbWJlcnMiLCJNZW1iZXJzT3B0aW4iLCJWaWV3TWVzc2FnZXMiLCJDb25uZWN0UHJveHkiLCJWaWV3UmV3YXJkcyIsIlZpZXdSdWxlcyJdfX0sInN1YiI6InctVWVISUlCdXBOOENGM3pjMGh6IiwianRpIjoiM2JkZjFhMmQtOTg1NS00NTJiLWEyZDctYTFmY2ZiNTUyMzZmIiwiaWF0IjoxNjU5MDk4Mjk3LCJleHAiOjE2NjEyNTgyOTd9.xurnAsrRccborCMqEhLYDkhpYLmvSWn9U3qP550H3fg'; 3673 this.rpcCallBacks = new Map(); 3674 this.sysCallBack = null; 3675 this.client = new StompJs.Client({ 3676 brokerURL: this.basePath, 3677 connectHeaders: { 3678 login: 'Bearer', 3679 passcode: this.publicToken // 'JWT token you get from https://api.ziqni.com/swagger-ui/#/member-token/createMemberToken', 3680 3681 }, 3682 debug: function debug(str) { 3683 console.log(str); 3684 }, 3685 reconnectDelay: 5000, 3686 heartbeatIncoming: 4000, 3687 heartbeatOutgoing: 4000 3688 }); 3689 3690 this.client.webSocketFactory = function () { 3691 return new SockJS('https://member-api.ziqni.com/ws'); 3692 }; 3693 } 3694 /** 3695 * Returns a string representation for an actual parameter. 3696 * @param param The actual parameter. 3697 * @returns {String} The string representation of <code>param</code>. 3698 */ 3699 3700 3701 _createClass(ApiClientStomp, [{ 3702 key: "uuidv4", 3703 value: function uuidv4() { 3704 return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, function (c) { 3705 return (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16); 3706 }); 3707 } 3708 }, { 3709 key: "sendRpc", 3710 value: function sendRpc(destination, message, callback) { 3711 var messageId = this.uuidv4(); 3712 var messageHeaders = { 3713 'message-id': messageId 3714 }; 3715 this.client.publish({ 3716 destination: destination, 3717 headers: messageHeaders, 3718 body: JSON.stringify(message) 3719 }); 3720 this.rpcCallBacks.set(messageId, callback); 3721 } 3722 }, { 3723 key: "sendSys", 3724 value: function sendSys(destination, message, callback) { 3725 this.client.publish({ 3726 destination: destination, 3727 body: JSON.stringify(message) 3728 }); 3729 this.sysCallBack = callback; 3730 } 3731 }]); 3732 3733 return ApiClientStomp; 3734}(); 3735/** 3736* The default API Stomp client implementation. 3737* @type {module:ApiClientStomp} 3738*/ 3739 3740 3741ApiClientStomp.instance = new ApiClientStomp(); 3742var _default = ApiClientStomp; 3743exports["default"] = _default; 3744},{"@stomp/stompjs":2,"querystring":176,"sockjs-client":179,"superagent":236}],5:[function(require,module,exports){ 3745"use strict"; 3746 3747Object.defineProperty(exports, "__esModule", { 3748 value: true 3749}); 3750exports["default"] = void 0; 3751 3752var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 3753 3754function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 3755 3756function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3757 3758function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3759 3760function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 3761 3762var AchievementsApiWs = /*#__PURE__*/function () { 3763 function AchievementsApiWs(apiClientStomp) { 3764 _classCallCheck(this, AchievementsApiWs); 3765 3766 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 3767 } 3768 3769 _createClass(AchievementsApiWs, [{ 3770 key: "getAchievements", 3771 value: function getAchievements(achievementRequest, callback) { 3772 if (achievementRequest === undefined || achievementRequest === null) { 3773 throw new Error("Missing the required parameter 'achievementRequest' when calling getAchievements"); 3774 } 3775 3776 var message = { 3777 body: achievementRequest 3778 }; 3779 3780 _ApiClientStomp["default"].instance.sendRpc('/gapi/getAchievements', message, callback); 3781 } 3782 }]); 3783 3784 return AchievementsApiWs; 3785}(); 3786 3787exports["default"] = AchievementsApiWs; 3788},{"../ApiClientStomp":4}],6:[function(require,module,exports){ 3789"use strict"; 3790 3791Object.defineProperty(exports, "__esModule", { 3792 value: true 3793}); 3794exports["default"] = void 0; 3795 3796var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 3797 3798function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 3799 3800function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3801 3802function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3803 3804function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 3805 3806var AwardsApiWs = /*#__PURE__*/function () { 3807 function AwardsApiWs(apiClientStomp) { 3808 _classCallCheck(this, AwardsApiWs); 3809 3810 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 3811 } 3812 3813 _createClass(AwardsApiWs, [{ 3814 key: "claimAwards", 3815 value: function claimAwards(claimAwardRequest, callback) { 3816 if (claimAwardRequest === undefined || claimAwardRequest === null) { 3817 throw new Error("Missing the required parameter 'claimAwardRequest' when calling claimAwards"); 3818 } 3819 3820 var message = { 3821 body: claimAwardRequest 3822 }; 3823 3824 _ApiClientStomp["default"].instance.sendRpc('/gapi/claimAwards', message, callback); 3825 } 3826 }, { 3827 key: "getAwards", 3828 value: function getAwards(awardRequest, callback) { 3829 if (awardRequest === undefined || awardRequest === null) { 3830 throw new Error("Missing the required parameter 'awardRequest' when calling getAwards"); 3831 } 3832 3833 var message = { 3834 body: awardRequest 3835 }; 3836 3837 _ApiClientStomp["default"].instance.sendRpc('/gapi/getAwards', message, callback); 3838 } 3839 }]); 3840 3841 return AwardsApiWs; 3842}(); 3843 3844exports["default"] = AwardsApiWs; 3845},{"../ApiClientStomp":4}],7:[function(require,module,exports){ 3846"use strict"; 3847 3848Object.defineProperty(exports, "__esModule", { 3849 value: true 3850}); 3851exports["default"] = void 0; 3852 3853var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 3854 3855function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 3856 3857function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3858 3859function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3860 3861function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 3862 3863var CallbacksApiWs = /*#__PURE__*/function () { 3864 function CallbacksApiWs(apiClientStomp) { 3865 _classCallCheck(this, CallbacksApiWs); 3866 3867 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 3868 } 3869 3870 _createClass(CallbacksApiWs, [{ 3871 key: "listCallbacks", 3872 value: function listCallbacks(callback) { 3873 var message = { 3874 body: {} 3875 }; 3876 3877 _ApiClientStomp["default"].instance.sendRpc('/gapi/listCallbacks', message, callback); 3878 } 3879 }]); 3880 3881 return CallbacksApiWs; 3882}(); 3883 3884exports["default"] = CallbacksApiWs; 3885},{"../ApiClientStomp":4}],8:[function(require,module,exports){ 3886"use strict"; 3887 3888Object.defineProperty(exports, "__esModule", { 3889 value: true 3890}); 3891exports["default"] = void 0; 3892 3893var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 3894 3895function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 3896 3897function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3898 3899function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3900 3901function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 3902 3903var CompetitionsApiWs = /*#__PURE__*/function () { 3904 function CompetitionsApiWs(apiClientStomp) { 3905 _classCallCheck(this, CompetitionsApiWs); 3906 3907 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 3908 } 3909 3910 _createClass(CompetitionsApiWs, [{ 3911 key: "getCompetitions", 3912 value: function getCompetitions(competitionRequest, callback) {
3913 if (competitionRequest === undefined || competitionRequest === null) { 3914 throw new Error("Missing the required parameter 'competitionRequest' when calling getCompetitions"); 3915 } 3916 3917 var message = { 3918 body: competitionRequest 3919 }; 3920 3921 _ApiClientStomp["default"].instance.sendRpc('/gapi/getCompetitions', message, callback); 3922 } 3923 }]); 3924 3925 return CompetitionsApiWs; 3926}(); 3927 3928exports["default"] = CompetitionsApiWs; 3929},{"../ApiClientStomp":4}],9:[function(require,module,exports){ 3930"use strict"; 3931 3932Object.defineProperty(exports, "__esModule", { 3933 value: true 3934}); 3935exports["default"] = void 0; 3936 3937var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 3938 3939function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 3940 3941function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3942 3943function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3944 3945function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 3946 3947var ContestsApiWs = /*#__PURE__*/function () { 3948 function ContestsApiWs(apiClientStomp) { 3949 _classCallCheck(this, ContestsApiWs); 3950 3951 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 3952 } 3953 3954 _createClass(ContestsApiWs, [{ 3955 key: "getContests", 3956 value: function getContests(contestRequest, callback) { 3957 if (contestRequest === undefined || contestRequest === null) { 3958 throw new Error("Missing the required parameter 'contestRequest' when calling getContests"); 3959 } 3960 3961 var message = { 3962 body: contestRequest 3963 }; 3964 3965 _ApiClientStomp["default"].instance.sendRpc('/gapi/getContests', message, callback); 3966 } 3967 }]); 3968 3969 return ContestsApiWs; 3970}(); 3971 3972exports["default"] = ContestsApiWs; 3973},{"../ApiClientStomp":4}],10:[function(require,module,exports){ 3974"use strict"; 3975 3976Object.defineProperty(exports, "__esModule", { 3977 value: true 3978}); 3979exports["default"] = void 0; 3980 3981var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 3982 3983function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 3984 3985function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 3986 3987function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 3988 3989function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 3990 3991var DefaultApiWs = /*#__PURE__*/function () { 3992 function DefaultApiWs(apiClientStomp) { 3993 _classCallCheck(this, DefaultApiWs); 3994 3995 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 3996 } 3997 3998 _createClass(DefaultApiWs, [{ 3999 key: "heartbeat", 4000 value: function heartbeat(callback) { 4001 var message = { 4002 body: {} 4003 }; 4004 4005 _ApiClientStomp["default"].instance.sendRpc('/gapi/heartbeat', message, callback); 4006 } 4007 }]); 4008 4009 return DefaultApiWs; 4010}(); 4011 4012exports["default"] = DefaultApiWs; 4013},{"../ApiClientStomp":4}],11:[function(require,module,exports){ 4014"use strict"; 4015 4016Object.defineProperty(exports, "__esModule", { 4017 value: true 4018}); 4019exports["default"] = void 0; 4020 4021var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4022 4023function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4024 4025function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4026 4027function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4028 4029function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4030 4031var FilesApiWs = /*#__PURE__*/function () { 4032 function FilesApiWs(apiClientStomp) { 4033 _classCallCheck(this, FilesApiWs); 4034 4035 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4036 } 4037 4038 _createClass(FilesApiWs, [{ 4039 key: "getFiles", 4040 value: function getFiles(fileRequest, callback) { 4041 if (fileRequest === undefined || fileRequest === null) { 4042 throw new Error("Missing the required parameter 'fileRequest' when calling getFiles"); 4043 } 4044 4045 var message = { 4046 body: fileRequest 4047 }; 4048 4049 _ApiClientStomp["default"].instance.sendRpc('/gapi/getFiles', message, callback); 4050 } 4051 }]); 4052 4053 return FilesApiWs; 4054}(); 4055 4056exports["default"] = FilesApiWs; 4057},{"../ApiClientStomp":4}],12:[function(require,module,exports){ 4058"use strict"; 4059 4060Object.defineProperty(exports, "__esModule", { 4061 value: true 4062}); 4063exports["default"] = void 0; 4064 4065var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4066 4067function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4068 4069function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4070 4071function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4072 4073function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4074 4075var GraphsApiWs = /*#__PURE__*/function () { 4076 function GraphsApiWs(apiClientStomp) { 4077 _classCallCheck(this, GraphsApiWs); 4078 4079 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4080 } 4081 4082 _createClass(GraphsApiWs, [{ 4083 key: "getGraph", 4084 value: function getGraph(entityGraphRequest, callback) { 4085 if (entityGraphRequest === undefined || entityGraphRequest === null) { 4086 throw new Error("Missing the required parameter 'entityGraphRequest' when calling getGraph"); 4087 } 4088 4089 var message = { 4090 body: entityGraphRequest 4091 }; 4092 4093 _ApiClientStomp["default"].instance.sendRpc('/gapi/getGraph', message, callback); 4094 } 4095 }]); 4096 4097 return GraphsApiWs; 4098}(); 4099 4100exports["default"] = GraphsApiWs; 4101},{"../ApiClientStomp":4}],13:[function(require,module,exports){ 4102"use strict"; 4103 4104Object.defineProperty(exports, "__esModule", { 4105 value: true 4106}); 4107exports["default"] = void 0; 4108 4109var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4110 4111function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4112 4113function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4114 4115function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4116 4117function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4118 4119var HeartbeatApiWs = /*#__PURE__*/function () { 4120 function HeartbeatApiWs(apiClientStomp) { 4121 _classCallCheck(this, HeartbeatApiWs); 4122 4123 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4124 } 4125 4126 _createClass(HeartbeatApiWs, [{ 4127 key: "heartbeat", 4128 value: function heartbeat(callback) { 4129 var message = { 4130 body: {} 4131 }; 4132 4133 _ApiClientStomp["default"].instance.sendRpc('/gapi/heartbeat', message, callback); 4134 } 4135 }]); 4136 4137 return HeartbeatApiWs; 4138}(); 4139 4140exports["default"] = HeartbeatApiWs; 4141},{"../ApiClientStomp":4}],14:[function(require,module,exports){ 4142"use strict"; 4143 4144Object.defineProperty(exports, "__esModule", { 4145 value: true 4146}); 4147exports["default"] = void 0; 4148 4149var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4150 4151function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4152 4153function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4154 4155function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4156 4157function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4158 4159var InstantWinsApiWs = /*#__PURE__*/function () { 4160 function InstantWinsApiWs(apiClientStomp) { 4161 _classCallCheck(this, InstantWinsApiWs); 4162 4163 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4164 } 4165 4166 _createClass(InstantWinsApiWs, [{ 4167 key: "listInstantWins", 4168 value: function listInstantWins(instantWinRequest, callback) { 4169 if (instantWinRequest === undefined || instantWinRequest === null) { 4170 throw new Error("Missing the required parameter 'instantWinRequest' when calling listInstantWins"); 4171 } 4172 4173 var message = { 4174 body: instantWinRequest 4175 }; 4176 4177 _ApiClientStomp["default"].instance.sendRpc('/gapi/listInstantWins', message, callback); 4178 } 4179 }, { 4180 key: "playInstantWin", 4181 value: function playInstantWin(instantWinPlayRequest, callback) { 4182 if (instantWinPlayRequest === undefined || instantWinPlayRequest === null) { 4183 throw new Error("Missing the required parameter 'instantWinPlayRequest' when calling playInstantWin"); 4184 } 4185 4186 var message = { 4187 body: instantWinPlayRequest 4188 }; 4189 4190 _ApiClientStomp["default"].instance.sendRpc('/gapi/playInstantWin', message, callback); 4191 } 4192 }]); 4193 4194 return InstantWinsApiWs; 4195}(); 4196 4197exports["default"] = InstantWinsApiWs; 4198},{"../ApiClientStomp":4}],15:[function(require,module,exports){ 4199"use strict"; 4200 4201Object.defineProperty(exports, "__esModule", { 4202 value: true 4203}); 4204exports["default"] = void 0; 4205 4206var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4207 4208function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4209 4210function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4211 4212function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4213 4214function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4215 4216var LeaderboardApiWs = /*#__PURE__*/function () { 4217 function LeaderboardApiWs(apiClientStomp) { 4218 _classCallCheck(this, LeaderboardApiWs); 4219 4220 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4221 } 4222 4223 _createClass(LeaderboardApiWs, [{ 4224 key: "subscribeToLeaderboard", 4225 value: function subscribeToLeaderboard(leaderboardSubscriptionRequest, callback) { 4226 if (leaderboardSubscriptionRequest === undefined || leaderboardSubscriptionRequest === null) { 4227 throw new Error("Missing the required parameter 'leaderboardSubscriptionRequest' when calling subscribeToLeaderboard"); 4228 } 4229 4230 var message = { 4231 body: leaderboardSubscriptionRequest 4232 }; 4233 4234 _ApiClientStomp["default"].instance.sendRpc('/gapi/subscribeToLeaderboard', message, callback); 4235 } 4236 }]); 4237 4238 return LeaderboardApiWs; 4239}(); 4240 4241exports["default"] = LeaderboardApiWs; 4242},{"../ApiClientStomp":4}],16:[function(require,module,exports){ 4243"use strict"; 4244 4245Object.defineProperty(exports, "__esModule", { 4246 value: true 4247}); 4248exports["default"] = void 0; 4249 4250var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4251 4252function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4253 4254function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4255 4256function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4257 4258function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4259 4260var MembersApiWs = /*#__PURE__*/function () { 4261 function MembersApiWs(apiClientStomp) { 4262 _classCallCheck(this, MembersApiWs); 4263 4264 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4265 } 4266 4267 _createClass(MembersApiWs, [{ 4268 key: "getMember", 4269 value: function getMember(memberRequest, callback) { 4270 if (memberRequest === undefined || memberRequest === null) { 4271 throw new Error("Missing the required parameter 'memberRequest' when calling getMember"); 4272 } 4273 4274 var message = { 4275 body: memberRequest 4276 }; 4277 4278 _ApiClientStomp["default"].instance.sendRpc('/gapi/getMember', message, callback); 4279 } 4280 }]); 4281 4282 return MembersApiWs; 4283}(); 4284 4285exports["default"] = MembersApiWs; 4286},{"../ApiClientStomp":4}],17:[function(require,module,exports){ 4287"use strict"; 4288 4289Object.defineProperty(exports, "__esModule", { 4290 value: true 4291}); 4292exports["default"] = void 0; 4293 4294var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4295 4296function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4297 4298function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4299 4300function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4301 4302function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Co
4302nstructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4303 4304var MessagesApiWs = /*#__PURE__*/function () { 4305 function MessagesApiWs(apiClientStomp) { 4306 _classCallCheck(this, MessagesApiWs); 4307 4308 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4309 } 4310 4311 _createClass(MessagesApiWs, [{ 4312 key: "getMessages", 4313 value: function getMessages(messageRequest, callback) { 4314 if (messageRequest === undefined || messageRequest === null) { 4315 throw new Error("Missing the required parameter 'messageRequest' when calling getMessages"); 4316 } 4317 4318 var message = { 4319 body: messageRequest 4320 }; 4321 4322 _ApiClientStomp["default"].instance.sendRpc('/gapi/getMessages', message, callback); 4323 } 4324 }]); 4325 4326 return MessagesApiWs; 4327}(); 4328 4329exports["default"] = MessagesApiWs; 4330},{"../ApiClientStomp":4}],18:[function(require,module,exports){ 4331"use strict"; 4332 4333Object.defineProperty(exports, "__esModule", { 4334 value: true 4335}); 4336exports["default"] = void 0; 4337 4338var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4339 4340function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4341 4342function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4343 4344function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4345 4346function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4347 4348var MissionsApiWs = /*#__PURE__*/function () { 4349 function MissionsApiWs(apiClientStomp) { 4350 _classCallCheck(this, MissionsApiWs); 4351 4352 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4353 } 4354 4355 _createClass(MissionsApiWs, [{ 4356 key: "getMissionStates", 4357 value: function getMissionStates(missionStatesRequest, callback) { 4358 if (missionStatesRequest === undefined || missionStatesRequest === null) { 4359 throw new Error("Missing the required parameter 'missionStatesRequest' when calling getMissionStates"); 4360 } 4361 4362 var message = { 4363 body: missionStatesRequest 4364 }; 4365 4366 _ApiClientStomp["default"].instance.sendRpc('/gapi/getMissionStates', message, callback); 4367 } 4368 }]); 4369 4370 return MissionsApiWs; 4371}(); 4372 4373exports["default"] = MissionsApiWs; 4374},{"../ApiClientStomp":4}],19:[function(require,module,exports){ 4375"use strict"; 4376 4377Object.defineProperty(exports, "__esModule", { 4378 value: true 4379}); 4380exports["default"] = void 0; 4381 4382var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4383 4384function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4385 4386function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4387 4388function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4389 4390function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4391 4392var OptInApiWs = /*#__PURE__*/function () { 4393 function OptInApiWs(apiClientStomp) { 4394 _classCallCheck(this, OptInApiWs); 4395 4396 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4397 } 4398 4399 _createClass(OptInApiWs, [{ 4400 key: "manageOptin", 4401 value: function manageOptin(manageOptinRequest, callback) { 4402 if (manageOptinRequest === undefined || manageOptinRequest === null) { 4403 throw new Error("Missing the required parameter 'manageOptinRequest' when calling manageOptin"); 4404 } 4405 4406 var message = { 4407 body: manageOptinRequest 4408 }; 4409 4410 _ApiClientStomp["default"].instance.sendRpc('/gapi/manageOptin', message, callback); 4411 } 4412 }, { 4413 key: "optInStates", 4414 value: function optInStates(optInStatesRequest, callback) { 4415 if (optInStatesRequest === undefined || optInStatesRequest === null) { 4416 throw new Error("Missing the required parameter 'optInStatesRequest' when calling optInStates"); 4417 } 4418 4419 var message = { 4420 body: optInStatesRequest 4421 }; 4422 4423 _ApiClientStomp["default"].instance.sendRpc('/gapi/optInStates', message, callback); 4424 } 4425 }]); 4426 4427 return OptInApiWs; 4428}(); 4429 4430exports["default"] = OptInApiWs; 4431},{"../ApiClientStomp":4}],20:[function(require,module,exports){ 4432"use strict"; 4433 4434Object.defineProperty(exports, "__esModule", { 4435 value: true 4436}); 4437exports["default"] = void 0; 4438 4439var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4440 4441function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4442 4443function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4444 4445function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4446 4447function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4448 4449var ProductsApiWs = /*#__PURE__*/function () { 4450 function ProductsApiWs(apiClientStomp) { 4451 _classCallCheck(this, ProductsApiWs); 4452 4453 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4454 } 4455 4456 _createClass(ProductsApiWs, [{ 4457 key: "getProducts", 4458 value: function getProducts(productRequest, callback) { 4459 if (productRequest === undefined || productRequest === null) { 4460 throw new Error("Missing the required parameter 'productRequest' when calling getProducts"); 4461 } 4462 4463 var message = { 4464 body: productRequest 4465 }; 4466 4467 _ApiClientStomp["default"].instance.sendRpc('/gapi/getProducts', message, callback); 4468 } 4469 }]); 4470 4471 return ProductsApiWs; 4472}(); 4473 4474exports["default"] = ProductsApiWs; 4475},{"../ApiClientStomp":4}],21:[function(require,module,exports){ 4476"use strict"; 4477 4478Object.defineProperty(exports, "__esModule", { 4479 value: true 4480}); 4481exports["default"] = void 0; 4482 4483var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4484 4485function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4486 4487function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4488 4489function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4490 4491function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4492 4493var RewardsApiWs = /*#__PURE__*/function () { 4494 function RewardsApiWs(apiClientStomp) { 4495 _classCallCheck(this, RewardsApiWs); 4496 4497 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4498 } 4499 4500 _createClass(RewardsApiWs, [{ 4501 key: "getRewards", 4502 value: function getRewards(rewardRequest, callback) { 4503 if (rewardRequest === undefined || rewardRequest === null) { 4504 throw new Error("Missing the required parameter 'rewardRequest' when calling getRewards"); 4505 } 4506 4507 var message = { 4508 body: rewardRequest 4509 }; 4510 4511 _ApiClientStomp["default"].instance.sendRpc('/gapi/getRewards', message, callback); 4512 } 4513 }]); 4514 4515 return RewardsApiWs; 4516}(); 4517 4518exports["default"] = RewardsApiWs; 4519},{"../ApiClientStomp":4}],22:[function(require,module,exports){ 4520"use strict"; 4521 4522Object.defineProperty(exports, "__esModule", { 4523 value: true 4524}); 4525exports["default"] = void 0; 4526 4527var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4528 4529function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4530 4531function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4532 4533function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4534 4535function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4536 4537var RulesApiWs = /*#__PURE__*/function () { 4538 function RulesApiWs(apiClientStomp) { 4539 _classCallCheck(this, RulesApiWs); 4540 4541 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4542 } 4543 4544 _createClass(RulesApiWs, [{ 4545 key: "getRules", 4546 value: function getRules(entityRequest, callback) { 4547 if (entityRequest === undefined || entityRequest === null) { 4548 throw new Error("Missing the required parameter 'entityRequest' when calling getRules"); 4549 } 4550 4551 var message = { 4552 body: entityRequest 4553 }; 4554 4555 _ApiClientStomp["default"].instance.sendRpc('/gapi/getRules', message, callback); 4556 } 4557 }]); 4558 4559 return RulesApiWs; 4560}(); 4561 4562exports["default"] = RulesApiWs; 4563},{"../ApiClientStomp":4}],23:[function(require,module,exports){ 4564"use strict"; 4565 4566Object.defineProperty(exports, "__esModule", { 4567 value: true 4568}); 4569exports["default"] = void 0; 4570 4571var _ApiClientStomp = _interopRequireDefault(require("../ApiClientStomp")); 4572 4573function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 4574 4575function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 4576 4577function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 4578 4579function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 4580 4581var StatsApiWs = /*#__PURE__*/function () { 4582 function StatsApiWs(apiClientStomp) { 4583 _classCallCheck(this, StatsApiWs); 4584 4585 this.apiClientStomp = apiClientStomp || ApiClientStomp.instance; 4586 } 4587 4588 _createClass(StatsApiWs, [{ 4589 key: "getActiveEntitiesCount", 4590 value: function getActiveEntitiesCount(modelCountRequest, callback) { 4591 if (modelCountRequest === undefined || modelCountRequest === null) { 4592 throw new Error("Missing the required parameter 'modelCountRequest' when calling getActiveEntitiesCount"); 4593 } 4594 4595 var message = { 4596 body: modelCountRequest 4597 }; 4598 4599 _ApiClientStomp["default"].instance.sendRpc('/gapi/getActiveEntitiesCount', message, callback); 4600 } 4601 }]); 4602 4603 return StatsApiWs; 4604}(); 4605 4606exports["default"] = StatsApiWs; 4607},{"../ApiClientStomp":4}],24:[function(require,module,exports){ 4608"use strict"; 4609 4610Object.defineProperty(exports, "__esModule", { 4611 value: true 4612}); 4613Object.defineProperty(exports, "Achievement", { 4614 enumerable: true, 4615 get: function get() { 4616 return _Achievement["default"]; 4617 } 4618}); 4619Object.defineProperty(exports, "AchievementAllOf", { 4620 enumerable: true, 4621 get: function get() { 4622 return _AchievementAllOf["default"]; 4623 } 4624}); 4625Object.defineProperty(exports, "AchievementFilter", { 4626 enumerable: true, 4627 get: function get() { 4628 return _AchievementFilter["default"]; 4629 } 4630}); 4631Object.defineProperty(exports, "AchievementRequest", { 4632 enumerable: true, 4633 get: function get() { 4634 return _AchievementRequest["default"]; 4635 } 4636}); 4637Object.defineProperty(exports, "AchievementResponse", { 4638 enumerable: true, 4639 get: function get() { 4640 return _AchievementResponse["default"]; 4641 } 4642}); 4643Object.defineProperty(exports, "AchievementStrategies", { 4644 enumerable: true, 4645 get: function get() { 4646 return _AchievementStrategies["default"]; 4647 } 4648}); 4649Object.defineProperty(exports, "AchievementsApiWs", { 4650 enumerable: true, 4651 get: function get() { 4652 return _AchievementsApiWs["default"]; 4653 } 4654}); 4655Object.defineProperty(exports, "ActionTypeAdjustmentFactor", { 4656 enumerable: true, 4657 get: function get() { 4658 return _ActionTypeAdjustmentFactor["default"]; 4659 } 4660}); 4661Object.defineProperty(exports, "ApiClient", { 4662 enumerable: true, 4663 get: function get() { 4664 return _ApiClient["default"]; 4665 } 4666}); 4667Object.defineProperty(exports, "ApiClientStomp", { 4668 enumerable: true, 4669 get: function get() { 4670 return _ApiClientStomp["default"]; 4671 } 4672}); 4673Object.defineProperty(exports, "Award", { 4674 enumerable: true, 4675 get: function get() { 4676 return _Award["default"]; 4677 } 4678}); 4679Object.defineProperty(exports, "AwardAllOf", { 4680 enumerable: true, 4681 get: function get() { 4682 return _AwardAllOf["default"]; 4683 } 4684}); 4685Object.defineProperty(exports, "AwardFilter", { 4686 enumerable: true, 4687 get: function get() { 4688 return _AwardFilter["default"]; 4689 } 4690}); 4691Object.defineProperty(exports, "AwardRequest", { 4692 enumerable: true, 4693 get: function get() { 4694 return _AwardRequest["default"]; 4695 } 4696}); 4697Object.defineProperty(exports, "AwardResponse", { 4698 enumerable: true, 4699 get: function get() { 4700 return _AwardResponse["default"]; 4701 } 4702}); 4703Object.defineProperty(exports, "AwardStatus", { 4704 enumerable: true, 4705 get: function get() { 4706 return _AwardStatus["default"]; 4707 } 4708}); 4709Object.defineProperty(exports, "AwardsApiWs", { 4710 enumerable: true, 4711 get: function get() { 4712 return _AwardsApiWs["default"]; 4713 } 4714}); 4715Object.defineProperty(exports, "CallbackEntry", { 4716 enumerable: true, 4717 get: function get() { 4718 return _CallbackEntry["default"]; 4719 } 4720}); 4721Object.defineProperty(exports, "CallbacksApiWs", { 4722 enumerable: true, 4723 get: function get() { 4724 return _CallbacksApiWs["default"]; 4725 } 4726}); 4727Object.defineProperty(exports, "CallbacksResponse", { 4728 enumerable: true, 4729 get: function get() { 4730 return _CallbacksResponse["default"]; 4731 } 4732}); 4733Object.defineProperty(exports, "ClaimAwardRequest", { 4734 enumerable: true, 4735 get: function get() { 4736 return _ClaimAwardRequest["default"]; 4737 } 4738}); 4739Object.defineProperty(exports, "Competition", { 4740 enumerable: true, 4741 get: function get() { 4742 return _Competition["default"]; 4743 } 4744}); 4745Object.defineProperty(exports, "CompetitionAllOf", { 4746 enumerable: true, 4747 get: function get() { 4748 return _CompetitionAllOf["default"]; 4749 } 4750}); 4751Object.defineProperty(exports, "CompetitionCountResponse", { 4752 enumerable: true, 4753 get: function get() { 4754 return _CompetitionCountResponse["default"]; 4755 } 4756}); 4757Object.defineProperty(exports, "CompetitionFilter", { 4758 enumerable: true, 4759 get: function get() { 4760 return _CompetitionFilter["default"]; 4761 } 4762}); 4763Object.defineProperty(exports, "CompetitionRequest", { 4764 enumerable: true, 4765 get: function get() { 4766 return _CompetitionRequest["default"]; 4767 } 4768}); 4769Object.defineProperty(exports, "CompetitionResponse", { 4770 enumerable: tru
4770e, 4771 get: function get() { 4772 return _CompetitionResponse["default"]; 4773 } 4774}); 4775Object.defineProperty(exports, "CompetitionStatus", { 4776 enumerable: true, 4777 get: function get() { 4778 return _CompetitionStatus["default"]; 4779 } 4780}); 4781Object.defineProperty(exports, "CompetitionType", { 4782 enumerable: true, 4783 get: function get() { 4784 return _CompetitionType["default"]; 4785 } 4786}); 4787Object.defineProperty(exports, "CompetitionsApiWs", { 4788 enumerable: true, 4789 get: function get() { 4790 return _CompetitionsApiWs["default"]; 4791 } 4792}); 4793Object.defineProperty(exports, "ConditionalOperator", { 4794 enumerable: true, 4795 get: function get() { 4796 return _ConditionalOperator["default"]; 4797 } 4798}); 4799Object.defineProperty(exports, "Contest", { 4800 enumerable: true, 4801 get: function get() { 4802 return _Contest["default"]; 4803 } 4804}); 4805Object.defineProperty(exports, "ContestAllOf", { 4806 enumerable: true, 4807 get: function get() { 4808 return _ContestAllOf["default"]; 4809 } 4810}); 4811Object.defineProperty(exports, "ContestFilter", { 4812 enumerable: true, 4813 get: function get() { 4814 return _ContestFilter["default"]; 4815 } 4816}); 4817Object.defineProperty(exports, "ContestReduced", { 4818 enumerable: true, 4819 get: function get() { 4820 return _ContestReduced["default"]; 4821 } 4822}); 4823Object.defineProperty(exports, "ContestRequest", { 4824 enumerable: true, 4825 get: function get() { 4826 return _ContestRequest["default"]; 4827 } 4828}); 4829Object.defineProperty(exports, "ContestResponse", { 4830 enumerable: true, 4831 get: function get() { 4832 return _ContestResponse["default"]; 4833 } 4834}); 4835Object.defineProperty(exports, "ContestStatus", { 4836 enumerable: true, 4837 get: function get() { 4838 return _ContestStatus["default"]; 4839 } 4840}); 4841Object.defineProperty(exports, "ContestsApiWs", { 4842 enumerable: true, 4843 get: function get() { 4844 return _ContestsApiWs["default"]; 4845 } 4846}); 4847Object.defineProperty(exports, "CustomFields", { 4848 enumerable: true, 4849 get: function get() { 4850 return _CustomFields["default"]; 4851 } 4852}); 4853Object.defineProperty(exports, "DateRange", { 4854 enumerable: true, 4855 get: function get() { 4856 return _DateRange["default"]; 4857 } 4858}); 4859Object.defineProperty(exports, "DefaultApiWs", { 4860 enumerable: true, 4861 get: function get() { 4862 return _DefaultApiWs["default"]; 4863 } 4864}); 4865Object.defineProperty(exports, "Dependancy", { 4866 enumerable: true, 4867 get: function get() { 4868 return _Dependancy["default"]; 4869 } 4870}); 4871Object.defineProperty(exports, "DependantOn", { 4872 enumerable: true, 4873 get: function get() { 4874 return _DependantOn["default"]; 4875 } 4876}); 4877Object.defineProperty(exports, "EntityChanged", { 4878 enumerable: true, 4879 get: function get() { 4880 return _EntityChanged["default"]; 4881 } 4882}); 4883Object.defineProperty(exports, "EntityFilter", { 4884 enumerable: true, 4885 get: function get() { 4886 return _EntityFilter["default"]; 4887 } 4888}); 4889Object.defineProperty(exports, "EntityGraph", { 4890 enumerable: true, 4891 get: function get() { 4892 return _EntityGraph["default"]; 4893 } 4894}); 4895Object.defineProperty(exports, "EntityGraphEdge", { 4896 enumerable: true, 4897 get: function get() { 4898 return _EntityGraphEdge["default"]; 4899 } 4900}); 4901Object.defineProperty(exports, "EntityGraphEdgeType", { 4902 enumerable: true, 4903 get: function get() { 4904 return _EntityGraphEdgeType["default"]; 4905 } 4906}); 4907Object.defineProperty(exports, "EntityGraphNode", { 4908 enumerable: true, 4909 get: function get() { 4910 return _EntityGraphNode["default"]; 4911 } 4912}); 4913Object.defineProperty(exports, "EntityGraphRequest", { 4914 enumerable: true, 4915 get: function get() { 4916 return _EntityGraphRequest["default"]; 4917 } 4918}); 4919Object.defineProperty(exports, "EntityGraphResponse", { 4920 enumerable: true, 4921 get: function get() { 4922 return _EntityGraphResponse["default"]; 4923 } 4924}); 4925Object.defineProperty(exports, "EntityGraphResult", { 4926 enumerable: true, 4927 get: function get() { 4928 return _EntityGraphResult["default"]; 4929 } 4930}); 4931Object.defineProperty(exports, "EntityGraphTraversal", { 4932 enumerable: true, 4933 get: function get() { 4934 return _EntityGraphTraversal["default"]; 4935 } 4936}); 4937Object.defineProperty(exports, "EntityRequest", { 4938 enumerable: true, 4939 get: function get() { 4940 return _EntityRequest["default"]; 4941 } 4942}); 4943Object.defineProperty(exports, "EntityStateChanged", { 4944 enumerable: true, 4945 get: function get() { 4946 return _EntityStateChanged["default"]; 4947 } 4948}); 4949Object.defineProperty(exports, "EntityType", { 4950 enumerable: true, 4951 get: function get() { 4952 return _EntityType["default"]; 4953 } 4954}); 4955Object.defineProperty(exports, "Error", { 4956 enumerable: true, 4957 get: function get() { 4958 return _Error["default"]; 4959 } 4960}); 4961Object.defineProperty(exports, "EventRefType", { 4962 enumerable: true, 4963 get: function get() { 4964 return _EventRefType["default"]; 4965 } 4966}); 4967Object.defineProperty(exports, "FieldType", { 4968 enumerable: true, 4969 get: function get() { 4970 return _FieldType["default"]; 4971 } 4972}); 4973Object.defineProperty(exports, "File", { 4974 enumerable: true, 4975 get: function get() { 4976 return _File["default"]; 4977 } 4978}); 4979Object.defineProperty(exports, "FileObject", { 4980 enumerable: true, 4981 get: function get() { 4982 return _FileObject["default"]; 4983 } 4984}); 4985Object.defineProperty(exports, "FileObjectAllOf", { 4986 enumerable: true, 4987 get: function get() { 4988 return _FileObjectAllOf["default"]; 4989 } 4990}); 4991Object.defineProperty(exports, "FileObjectResponse", { 4992 enumerable: true, 4993 get: function get() { 4994 return _FileObjectResponse["default"]; 4995 } 4996}); 4997Object.defineProperty(exports, "FileRequest", { 4998 enumerable: true, 4999 get: function get() { 5000 return _FileRequest["default"]; 5001 } 5002}); 5003Object.defineProperty(exports, "FileResponse", { 5004 enumerable: true, 5005 get: function get() { 5006 return _FileResponse["default"]; 5007 } 5008}); 5009Object.defineProperty(exports, "FilesApiWs", { 5010 enumerable: true, 5011 get: function get() { 5012 return _FilesApiWs["default"]; 5013 } 5014}); 5015Object.defineProperty(exports, "GraphsApiWs", { 5016 enumerable: true, 5017 get: function get() { 5018 return _GraphsApiWs["default"]; 5019 } 5020}); 5021Object.defineProperty(exports, "GridLocation", { 5022 enumerable: true, 5023 get: function get() { 5024 return _GridLocation["default"]; 5025 } 5026}); 5027Object.defineProperty(exports, "HeartbeatApiWs", { 5028 enumerable: true, 5029 get: function get() { 5030 return _HeartbeatApiWs["default"]; 5031 } 5032}); 5033Object.defineProperty(exports, "InstantWin", { 5034 enumerable: true, 5035 get: function get() { 5036 return _InstantWin["default"]; 5037 } 5038}); 5039Object.defineProperty(exports, "InstantWinAllOf", { 5040 enumerable: true, 5041 get: function get() { 5042 return _InstantWinAllOf["default"]; 5043 } 5044}); 5045Object.defineProperty(exports, "InstantWinFilter", { 5046 enumerable: true, 5047 get: function get() { 5048 return _InstantWinFilter["default"]; 5049 } 5050}); 5051Object.defineProperty(exports, "InstantWinPlayOutcome", { 5052 enumerable: true, 5053 get: function get() { 5054 return _InstantWinPlayOutcome["default"]; 5055 } 5056}); 5057Object.defineProperty(exports, "InstantWinPlayRequest", { 5058 enumerable: true, 5059 get: function get() { 5060 return _InstantWinPlayRequest["default"]; 5061 } 5062}); 5063Object.defineProperty(exports, "InstantWinPlayResponse", { 5064 enumerable: true, 5065 get: function get() { 5066 return _InstantWinPlayResponse["default"]; 5067 } 5068}); 5069Object.defineProperty(exports, "InstantWinRequest", { 5070 enumerable: true, 5071 get: function get() { 5072 return _InstantWinRequest["default"]; 5073 } 5074}); 5075Object.defineProperty(exports, "InstantWinResponse", { 5076 enumerable: true, 5077 get: function get() { 5078 return _InstantWinResponse["default"]; 5079 } 5080}); 5081Object.defineProperty(exports, "InstantWinResult", { 5082 enumerable: true, 5083 get: function get() { 5084 return _InstantWinResult["default"]; 5085 } 5086}); 5087Object.defineProperty(exports, "InstantWinResultAllOf", { 5088 enumerable: true, 5089 get: function get() { 5090 return _InstantWinResultAllOf["default"]; 5091 } 5092}); 5093Object.defineProperty(exports, "InstantWinTile", { 5094 enumerable: true, 5095 get: function get() { 5096 return _InstantWinTile["default"]; 5097 } 5098}); 5099Object.defineProperty(exports, "InstantWinsApiWs", { 5100 enumerable: true, 5101 get: function get() { 5102 return _InstantWinsApiWs["default"]; 5103 } 5104}); 5105Object.defineProperty(exports, "Leaderboard", { 5106 enumerable: true, 5107 get: function get() { 5108 return _Leaderboard["default"]; 5109 } 5110}); 5111Object.defineProperty(exports, "LeaderboardApiWs", { 5112 enumerable: true, 5113 get: function get() { 5114 return _LeaderboardApiWs["default"]; 5115 } 5116}); 5117Object.defineProperty(exports, "LeaderboardEntry", { 5118 enumerable: true, 5119 get: function get() { 5120 return _LeaderboardEntry["default"]; 5121 } 5122}); 5123Object.defineProperty(exports, "LeaderboardFilter", { 5124 enumerable: true, 5125 get: function get() { 5126 return _LeaderboardFilter["default"]; 5127 } 5128}); 5129Object.defineProperty(exports, "LeaderboardMember", { 5130 enumerable: true, 5131 get: function get() { 5132 return _LeaderboardMember["default"]; 5133 } 5134}); 5135Object.defineProperty(exports, "LeaderboardResponse", { 5136 enumerable: true, 5137 get: function get() { 5138 return _LeaderboardResponse["default"]; 5139 } 5140}); 5141Object.defineProperty(exports, "LeaderboardSubscriptionRequest", { 5142 enumerable: true, 5143 get: function get() { 5144 return _LeaderboardSubscriptionRequest["default"]; 5145 } 5146}); 5147Object.defineProperty(exports, "ManageOptinRequest", { 5148 enumerable: true, 5149 get: function get() { 5150 return _ManageOptinRequest["default"]; 5151 } 5152}); 5153Object.defineProperty(exports, "Member", { 5154 enumerable: true, 5155 get: function get() { 5156 return _Member["default"]; 5157 } 5158}); 5159Object.defineProperty(exports, "MemberAllOf", { 5160 enumerable: true, 5161 get: function get() { 5162 return _MemberAllOf["default"]; 5163 } 5164}); 5165Object.defineProperty(exports, "MemberRequest", { 5166 enumerable: true, 5167 get: function get() { 5168 return _MemberRequest["default"]; 5169 } 5170}); 5171Object.defineProperty(exports, "MemberResponse", { 5172 enumerable: true, 5173 get: function get() { 5174 return _MemberResponse["default"]; 5175 } 5176}); 5177Object.defineProperty(exports, "MemberType", { 5178 enumerable: true, 5179 get: function get() { 5180 return _MemberType["default"]; 5181 } 5182}); 5183Object.defineProperty(exports, "MembersApiWs", { 5184 enumerable: true, 5185 get: function get() { 5186 return _MembersApiWs["default"]; 5187 } 5188}); 5189Object.defineProperty(exports, "Message", { 5190 enumerable: true, 5191 get: function get() { 5192 return _Message["default"]; 5193 } 5194}); 5195Object.defineProperty(exports, "MessageAllOf", { 5196 enumerable: true, 5197 get: function get() { 5198 return _MessageAllOf["default"]; 5199 } 5200}); 5201Object.defineProperty(exports, "MessageFilter", { 5202 enumerable: true, 5203 get: function get() { 5204 return _MessageFilter["default"]; 5205 } 5206}); 5207Object.defineProperty(exports, "MessageRequest", { 5208 enumerable: true, 5209 get: function get() { 5210 return _MessageRequest["default"]; 5211 } 5212}); 5213Object.defineProperty(exports, "MessageResponse", { 5214 enumerable: true, 5215 get: function get() { 5216 return _MessageResponse["default"]; 5217 } 5218}); 5219Object.defineProperty(exports, "MessageStatus", { 5220 enumerable: true, 5221 get: function get() { 5222 return _MessageStatus["default"]; 5223 } 5224}); 5225Object.defineProperty(exports, "MessageType", { 5226 enumerable: true, 5227 get: function get() { 5228 return _MessageType["default"]; 5229 } 5230}); 5231Object.defineProperty(exports, "MessagesApiWs", { 5232 enumerable: true, 5233 get: function get() { 5234 return _MessagesApiWs["default"]; 5235 } 5236}); 5237Object.defineProperty(exports, "MetaBasic", { 5238 enumerable: true, 5239 get: function get() { 5240 return _MetaBasic["default"]; 5241 } 5242}); 5243Object.defineProperty(exports, "MetaInfo", { 5244 enumerable: true, 5245 get: function get() { 5246 return _MetaInfo["default"]; 5247 } 5248}); 5249Object.defineProperty(exports, "MissionState", { 5250 enumerable: true, 5251 get: function get() { 5252 return _MissionState["default"]; 5253 } 5254}); 5255Object.defineProperty(exports, "MissionStates", { 5256 enumerable: true, 5257 get: function get() { 5258 return _MissionStates["default"]; 5259 } 5260}); 5261Object.defineProperty(exports, "MissionStatesFilter", { 5262 enumerable: true, 5263 get: function get() { 5264 return _MissionStatesFilter["default"]; 5265 } 5266}); 5267Object.defineProperty(exports, "MissionStatesRequest", { 5268 enumerable: true, 5269 get: function get() { 5270 return _MissionStatesRequest["default"]; 5271 } 5272}); 5273Object.defineProperty(exports, "MissionStatesResponse", { 5274 enumerable: true, 5275 get: function get() { 5276 return _MissionStatesResponse["default"]; 5277 } 5278}); 5279Object.defineProperty(exports, "MissionsApiWs", { 5280 enumerable: true, 5281 get: function get() { 5282 return _MissionsApiWs["default"]; 5283 } 5284}); 5285Object.defineProperty(exports, "ModelCountRequest", { 5286 enumerable: true, 5287 get: function get() { 5288 return _ModelCountRequest["default"]; 5289 } 5290}); 5291Object.defineProperty(exports, "ModelCountResponse", { 5292 enumerable: true, 5293 get: function get() { 5294 return _ModelCountResponse["default"]; 5295 } 5296}); 5297Object.defineProperty(exports, "ModelDefault", { 5298 enumerable: true, 5299 get: function get() { 5300 return _ModelDefault["default"]; 5301 } 5302}); 5303Object.defineProperty(exports, "NumberRange", { 5304 enumerable: true, 5305 get: function get() { 5306 return _NumberRange["default"]; 5307 } 5308}); 5309Object.defineProperty(exports, "OptInApiWs", { 5310 enumerable: true, 5311 get: function get() { 5312 return _OptInApiWs["default"]; 5313 } 5314}); 5315Object.defineProperty(exports, "OptInResponse", { 5316 enumerable: true, 5317 get: function get() { 5318 return _OptInResponse["default"]; 5319 } 5320}); 5321Object.defineProperty(exports, "OptInStatesRequest", { 5322 enumerable: true, 5323 get: function get() { 5324 return _OptInStatesRequest["default"]; 5325 } 5326}); 5327Object.defineProperty(exports, "OptinAction", { 5328 enumerable: true, 5329 get: function get() { 5330 return _OptinAction["default"]; 5331 } 5332}); 5333Object.defineProperty(exports, "OptinStatesFilter", { 5334 enumerable: true, 5335 get: function get() { 5336 return _OptinStatesFilter["default"]; 5337 } 5338}); 5339Object.defineProperty(exports, "OptinStatus", { 5340 enumerable: true, 5341 get: function get() { 5342 return _OptinStatus["default"]; 5343 } 5344}); 5345Object.defineProperty(exports, "OptionalModelFields", { 5346 enumerable: true, 5347 get: function get() { 5348 return _OptionalModelFields["default"]; 5349 } 5350}); 5351Object.defineProperty(exports, "PointsStrategy", { 5352 enumerable: true, 5353 get: function get() { 5354 return _PointsStrategy["default"]; 5355 } 5356}); 5357Object.defineProperty(exports, "Product", { 5358 enumerable: true, 5359 get: function get() { 5360 return _Product["default"]; 5361 } 5362}); 5363Object.defineProperty(exports, "ProductAllOf", { 5364 enumerable: true, 5365 get: function get() { 5366 return _ProductAllOf["default"]; 5367 } 5368}); 5369Object.defineProperty(exports, "ProductFilter", { 5370 enumerable: true, 5371 get: function get() { 5372 return _ProductFilter["default"]; 5373 } 5374}); 5375Object.defineProperty(exports, "ProductReduced", { 5376 enumerable: true, 5377 get: function get() { 5378 return _ProductReduced["default"]; 5379 } 5380}); 5381Object.defineProperty(exports, "ProductReducedAllOf", { 5382 enumerable: true, 5383 get: function get() { 5384 return _ProductReducedAllOf["default"]; 5385 } 5386}); 5387Object.defineProperty(exports, "ProductRequest", { 5388 enumerable: true, 5389 get: function get() { 5390 return _ProductRequest["default"]; 5391 } 5392}); 5393Object.defineProperty(exports, "ProductResponse", { 5394 enumerable: true, 5395 get: function get() { 5396 return _ProductResponse["default"]; 5397 } 5398}); 5399Object.defineProperty(exports, "ProductsApiWs", { 5400 enumerable: true, 5401 get: function get() { 5402 return _ProductsApiWs["default"]; 5403 } 5404}); 5405Object.defineProperty(exports, "ProxyMessage", { 5406 enumerable: true, 5407 get: function get() { 5408 return _ProxyMessage["default"]; 5409 } 5410}); 5411Object.defineProperty(exports, "QueryMultipleFields", { 5412 enumerable: true, 5413 get: function get() { 5414 return _QueryMultipleFields["default"]; 5415 } 5416}); 5417Object.defineProperty(exports, "QuerySortBy", { 5418 enumerable: true, 5419 get: function get() { 5420 return _QuerySortBy["default"]; 5421 } 5422}); 5423Object.defineProperty(exports, "RangeQuery", { 5424 enumerable: true, 5425 get: function get() { 5426 return _RangeQuery["default"]; 5427 } 5428}); 5429Object.defineProperty(exports, "RankingStrategy", { 5430 enumerable: true, 5431 get: function get() { 5432 return _RankingStrategy["default"]; 5433 } 5434}); 5435Object.defineProperty(exports, "ResponseMeta", { 5436 enumerable: true, 5437 get: function get() { 5438 return _ResponseMeta["default"]; 5439 } 5440}); 5441Object.defineProperty(exports, "Reward", { 5442 enumerable: true, 5443 get: function get() { 5444 return _Reward["default"]; 5445 } 5446}); 5447Object.defineProperty(exports, "RewardReduced", { 5448 enumerable: true, 5449 get: function get() { 5450 return _RewardReduced["default"]; 5451 } 5452}); 5453Object.defineProperty(exports, "RewardReducedAllOf", { 5454 enumerable: true, 5455 get: function get() { 5456 return _RewardReducedAllOf["default"]; 5457 } 5458}); 5459Object.defineProperty(exports, "RewardRequest", { 5460 enumerable: true, 5461 get: function get() { 5462 return _RewardRequest["default"
5462]; 5463 } 5464}); 5465Object.defineProperty(exports, "RewardResponse", { 5466 enumerable: true, 5467 get: function get() { 5468 return _RewardResponse["default"]; 5469 } 5470}); 5471Object.defineProperty(exports, "RewardTypeReduced", { 5472 enumerable: true, 5473 get: function get() { 5474 return _RewardTypeReduced["default"]; 5475 } 5476}); 5477Object.defineProperty(exports, "RewardsApiWs", { 5478 enumerable: true, 5479 get: function get() { 5480 return _RewardsApiWs["default"]; 5481 } 5482}); 5483Object.defineProperty(exports, "RoundType", { 5484 enumerable: true, 5485 get: function get() { 5486 return _RoundType["default"]; 5487 } 5488}); 5489Object.defineProperty(exports, "Rule", { 5490 enumerable: true, 5491 get: function get() { 5492 return _Rule["default"]; 5493 } 5494}); 5495Object.defineProperty(exports, "RuleArgument", { 5496 enumerable: true, 5497 get: function get() { 5498 return _RuleArgument["default"]; 5499 } 5500}); 5501Object.defineProperty(exports, "RuleExpression", { 5502 enumerable: true, 5503 get: function get() { 5504 return _RuleExpression["default"]; 5505 } 5506}); 5507Object.defineProperty(exports, "RuleRequest", { 5508 enumerable: true, 5509 get: function get() { 5510 return _RuleRequest["default"]; 5511 } 5512}); 5513Object.defineProperty(exports, "RuleResponse", { 5514 enumerable: true, 5515 get: function get() { 5516 return _RuleResponse["default"]; 5517 } 5518}); 5519Object.defineProperty(exports, "RuleRoutine", { 5520 enumerable: true, 5521 get: function get() { 5522 return _RuleRoutine["default"]; 5523 } 5524}); 5525Object.defineProperty(exports, "RulesApiWs", { 5526 enumerable: true, 5527 get: function get() { 5528 return _RulesApiWs["default"]; 5529 } 5530}); 5531Object.defineProperty(exports, "ScheduleType", { 5532 enumerable: true, 5533 get: function get() { 5534 return _ScheduleType["default"]; 5535 } 5536}); 5537Object.defineProperty(exports, "Scheduling", { 5538 enumerable: true, 5539 get: function get() { 5540 return _Scheduling["default"]; 5541 } 5542}); 5543Object.defineProperty(exports, "ScoringStrategy", { 5544 enumerable: true, 5545 get: function get() { 5546 return _ScoringStrategy["default"]; 5547 } 5548}); 5549Object.defineProperty(exports, "SortOrder", { 5550 enumerable: true, 5551 get: function get() { 5552 return _SortOrder["default"]; 5553 } 5554}); 5555Object.defineProperty(exports, "StatsApiWs", { 5556 enumerable: true, 5557 get: function get() { 5558 return _StatsApiWs["default"]; 5559 } 5560}); 5561Object.defineProperty(exports, "Strategy", { 5562 enumerable: true, 5563 get: function get() { 5564 return _Strategy["default"]; 5565 } 5566}); 5567Object.defineProperty(exports, "StrategyType", { 5568 enumerable: true, 5569 get: function get() { 5570 return _StrategyType["default"]; 5571 } 5572}); 5573Object.defineProperty(exports, "TagFilter", { 5574 enumerable: true, 5575 get: function get() { 5576 return _TagFilter["default"]; 5577 } 5578}); 5579Object.defineProperty(exports, "UnsubscribeRequest", { 5580 enumerable: true, 5581 get: function get() { 5582 return _UnsubscribeRequest["default"]; 5583 } 5584}); 5585 5586var _ApiClient = _interopRequireDefault(require("./ApiClient")); 5587 5588var _Achievement = _interopRequireDefault(require("./model/Achievement")); 5589 5590var _AchievementAllOf = _interopRequireDefault(require("./model/AchievementAllOf")); 5591 5592var _AchievementFilter = _interopRequireDefault(require("./model/AchievementFilter")); 5593 5594var _AchievementRequest = _interopRequireDefault(require("./model/AchievementRequest")); 5595 5596var _AchievementResponse = _interopRequireDefault(require("./model/AchievementResponse")); 5597 5598var _AchievementStrategies = _interopRequireDefault(require("./model/AchievementStrategies")); 5599 5600var _ActionTypeAdjustmentFactor = _interopRequireDefault(require("./model/ActionTypeAdjustmentFactor")); 5601 5602var _Award = _interopRequireDefault(require("./model/Award")); 5603 5604var _AwardAllOf = _interopRequireDefault(require("./model/AwardAllOf")); 5605 5606var _AwardFilter = _interopRequireDefault(require("./model/AwardFilter")); 5607 5608var _AwardRequest = _interopRequireDefault(require("./model/AwardRequest")); 5609 5610var _AwardResponse = _interopRequireDefault(require("./model/AwardResponse")); 5611 5612var _AwardStatus = _interopRequireDefault(require("./model/AwardStatus")); 5613 5614var _CallbackEntry = _interopRequireDefault(require("./model/CallbackEntry")); 5615 5616var _CallbacksResponse = _interopRequireDefault(require("./model/CallbacksResponse")); 5617 5618var _ClaimAwardRequest = _interopRequireDefault(require("./model/ClaimAwardRequest")); 5619 5620var _Competition = _interopRequireDefault(require("./model/Competition")); 5621 5622var _CompetitionAllOf = _interopRequireDefault(require("./model/CompetitionAllOf")); 5623 5624var _CompetitionCountResponse = _interopRequireDefault(require("./model/CompetitionCountResponse")); 5625 5626var _CompetitionFilter = _interopRequireDefault(require("./model/CompetitionFilter")); 5627 5628var _CompetitionRequest = _interopRequireDefault(require("./model/CompetitionRequest")); 5629 5630var _CompetitionResponse = _interopRequireDefault(require("./model/CompetitionResponse")); 5631 5632var _CompetitionStatus = _interopRequireDefault(require("./model/CompetitionStatus")); 5633 5634var _CompetitionType = _interopRequireDefault(require("./model/CompetitionType")); 5635 5636var _ConditionalOperator = _interopRequireDefault(require("./model/ConditionalOperator")); 5637 5638var _Contest = _interopRequireDefault(require("./model/Contest")); 5639 5640var _ContestAllOf = _interopRequireDefault(require("./model/ContestAllOf")); 5641 5642var _ContestFilter = _interopRequireDefault(require("./model/ContestFilter")); 5643 5644var _ContestReduced = _interopRequireDefault(require("./model/ContestReduced")); 5645 5646var _ContestRequest = _interopRequireDefault(require("./model/ContestRequest")); 5647 5648var _ContestResponse = _interopRequireDefault(require("./model/ContestResponse")); 5649 5650var _ContestStatus = _interopRequireDefault(require("./model/ContestStatus")); 5651 5652var _CustomFields = _interopRequireDefault(require("./model/CustomFields")); 5653 5654var _DateRange = _interopRequireDefault(require("./model/DateRange")); 5655 5656var _Dependancy = _interopRequireDefault(require("./model/Dependancy")); 5657 5658var _DependantOn = _interopRequireDefault(require("./model/DependantOn")); 5659 5660var _EntityChanged = _interopRequireDefault(require("./model/EntityChanged")); 5661 5662var _EntityFilter = _interopRequireDefault(require("./model/EntityFilter")); 5663 5664var _EntityGraph = _interopRequireDefault(require("./model/EntityGraph")); 5665 5666var _EntityGraphEdge = _interopRequireDefault(require("./model/EntityGraphEdge")); 5667 5668var _EntityGraphEdgeType = _interopRequireDefault(require("./model/EntityGraphEdgeType")); 5669 5670var _EntityGraphNode = _interopRequireDefault(require("./model/EntityGraphNode")); 5671 5672var _EntityGraphRequest = _interopRequireDefault(require("./model/EntityGraphRequest")); 5673 5674var _EntityGraphResponse = _interopRequireDefault(require("./model/EntityGraphResponse")); 5675 5676var _EntityGraphResult = _interopRequireDefault(require("./model/EntityGraphResult")); 5677 5678var _EntityGraphTraversal = _interopRequireDefault(require("./model/EntityGraphTraversal")); 5679 5680var _EntityRequest = _interopRequireDefault(require("./model/EntityRequest")); 5681 5682var _EntityStateChanged = _interopRequireDefault(require("./model/EntityStateChanged")); 5683 5684var _EntityType = _interopRequireDefault(require("./model/EntityType")); 5685 5686var _Error = _interopRequireDefault(require("./model/Error")); 5687 5688var _EventRefType = _interopRequireDefault(require("./model/EventRefType")); 5689 5690var _FieldType = _interopRequireDefault(require("./model/FieldType")); 5691 5692var _File = _interopRequireDefault(require("./model/File")); 5693 5694var _FileObject = _interopRequireDefault(require("./model/FileObject")); 5695 5696var _FileObjectAllOf = _interopRequireDefault(require("./model/FileObjectAllOf")); 5697 5698var _FileObjectResponse = _interopRequireDefault(require("./model/FileObjectResponse")); 5699 5700var _FileRequest = _interopRequireDefault(require("./model/FileRequest")); 5701 5702var _FileResponse = _interopRequireDefault(require("./model/FileResponse")); 5703 5704var _GridLocation = _interopRequireDefault(require("./model/GridLocation")); 5705 5706var _InstantWin = _interopRequireDefault(require("./model/InstantWin")); 5707 5708var _InstantWinAllOf = _interopRequireDefault(require("./model/InstantWinAllOf")); 5709 5710var _InstantWinFilter = _interopRequireDefault(require("./model/InstantWinFilter")); 5711 5712var _InstantWinPlayOutcome = _interopRequireDefault(require("./model/InstantWinPlayOutcome")); 5713 5714var _InstantWinPlayRequest = _interopRequireDefault(require("./model/InstantWinPlayRequest")); 5715 5716var _InstantWinPlayResponse = _interopRequireDefault(require("./model/InstantWinPlayResponse")); 5717 5718var _InstantWinRequest = _interopRequireDefault(require("./model/InstantWinRequest")); 5719 5720var _InstantWinResponse = _interopRequireDefault(require("./model/InstantWinResponse")); 5721 5722var _InstantWinResult = _interopRequireDefault(require("./model/InstantWinResult")); 5723 5724var _InstantWinResultAllOf = _interopRequireDefault(require("./model/InstantWinResultAllOf")); 5725 5726var _InstantWinTile = _interopRequireDefault(require("./model/InstantWinTile")); 5727 5728var _Leaderboard = _interopRequireDefault(require("./model/Leaderboard")); 5729 5730var _LeaderboardEntry = _interopRequireDefault(require("./model/LeaderboardEntry")); 5731 5732var _LeaderboardFilter = _interopRequireDefault(require("./model/LeaderboardFilter")); 5733 5734var _LeaderboardMember = _interopRequireDefault(require("./model/LeaderboardMember")); 5735 5736var _LeaderboardResponse = _interopRequireDefault(require("./model/LeaderboardResponse")); 5737 5738var _LeaderboardSubscriptionRequest = _interopRequireDefault(require("./model/LeaderboardSubscriptionRequest")); 5739 5740var _ManageOptinRequest = _interopRequireDefault(require("./model/ManageOptinRequest")); 5741 5742var _Member = _interopRequireDefault(require("./model/Member")); 5743 5744var _MemberAllOf = _interopRequireDefault(require("./model/MemberAllOf")); 5745 5746var _MemberRequest = _interopRequireDefault(require("./model/MemberRequest")); 5747 5748var _MemberResponse = _interopRequireDefault(require("./model/MemberResponse")); 5749 5750var _MemberType = _interopRequireDefault(require("./model/MemberType")); 5751 5752var _Message = _interopRequireDefault(require("./model/Message")); 5753 5754var _MessageAllOf = _interopRequireDefault(require("./model/MessageAllOf")); 5755 5756var _MessageFilter = _interopRequireDefault(require("./model/MessageFilter")); 5757 5758var _MessageRequest = _interopRequireDefault(require("./model/MessageRequest")); 5759 5760var _MessageResponse = _interopRequireDefault(require("./model/MessageResponse")); 5761 5762var _MessageStatus = _interopRequireDefault(require("./model/MessageStatus")); 5763 5764var _MessageType = _interopRequireDefault(require("./model/MessageType")); 5765 5766var _MetaBasic = _interopRequireDefault(require("./model/MetaBasic")); 5767 5768var _MetaInfo = _interopRequireDefault(require("./model/MetaInfo")); 5769 5770var _MissionState = _interopRequireDefault(require("./model/MissionState")); 5771 5772var _MissionStates = _interopRequireDefault(require("./model/MissionStates")); 5773 5774var _MissionStatesFilter = _interopRequireDefault(require("./model/MissionStatesFilter")); 5775 5776var _MissionStatesRequest = _interopRequireDefault(require("./model/MissionStatesRequest")); 5777 5778var _MissionStatesResponse = _interopRequireDefault(require("./model/MissionStatesResponse")); 5779 5780var _ModelCountRequest = _interopRequireDefault(require("./model/ModelCountRequest")); 5781 5782var _ModelCountResponse = _interopRequireDefault(require("./model/ModelCountResponse")); 5783 5784var _ModelDefault = _interopRequireDefault(require("./model/ModelDefault")); 5785 5786var _NumberRange = _interopRequireDefault(require("./model/NumberRange")); 5787 5788var _OptInResponse = _interopRequireDefault(require("./model/OptInResponse")); 5789 5790var _OptInStatesRequest = _interopRequireDefault(require("./model/OptInStatesRequest")); 5791 5792var _OptinAction = _interopRequireDefault(require("./model/OptinAction")); 5793 5794var _OptinStatesFilter = _interopRequireDefault(require("./model/OptinStatesFilter")); 5795 5796var _OptinStatus = _interopRequireDefault(require("./model/OptinStatus")); 5797 5798var _OptionalModelFields = _interopRequireDefault(require("./model/OptionalModelFields")); 5799 5800var _PointsStrategy = _interopRequireDefault(require("./model/PointsStrategy")); 5801 5802var _Product = _interopRequireDefault(require("./model/Product")); 5803 5804var _ProductAllOf = _interopRequireDefault(require("./model/ProductAllOf")); 5805 5806var _ProductFilter = _interopRequireDefault(require("./model/ProductFilter")); 5807 5808var _ProductReduced = _interopRequireDefault(require("./model/ProductReduced")); 5809 5810var _ProductReducedAllOf = _interopRequireDefault(require("./model/ProductReducedAllOf")); 5811 5812var _ProductRequest = _interopRequireDefault(require("./model/ProductRequest")); 5813 5814var _ProductResponse = _interopRequireDefault(require("./model/ProductResponse")); 5815 5816var _ProxyMessage = _interopRequireDefault(require("./model/ProxyMessage")); 5817 5818var _QueryMultipleFields = _interopRequireDefault(require("./model/QueryMultipleFields")); 5819 5820var _QuerySortBy = _interopRequireDefault(require("./model/QuerySortBy")); 5821 5822var _RangeQuery = _interopRequireDefault(require("./model/RangeQuery")); 5823 5824var _RankingStrategy = _interopRequireDefault(require("./model/RankingStrategy")); 5825 5826var _ResponseMeta = _interopRequireDefault(require("./model/ResponseMeta")); 5827 5828var _Reward = _interopRequireDefault(require("./model/Reward")); 5829 5830var _RewardReduced = _interopRequireDefault(require("./model/RewardReduced")); 5831 5832var _RewardReducedAllOf = _interopRequireDefault(require("./model/RewardReducedAllOf")); 5833 5834var _RewardRequest = _interopRequireDefault(require("./model/RewardRequest")); 5835 5836var _RewardResponse = _interopRequireDefault(require("./model/RewardResponse")); 5837 5838var _RewardTypeReduced = _interopRequireDefault(require("./model/RewardTypeReduced")); 5839 5840var _RoundType = _interopRequireDefault(require("./model/RoundType")); 5841 5842var _Rule = _interopRequireDefault(require("./model/Rule")); 5843 5844var _RuleArgument = _interopRequireDefault(require("./model/RuleArgument")); 5845 5846var _RuleExpression = _interopRequireDefault(require("./model/RuleExpression")); 5847 5848var _RuleRequest = _interopRequireDefault(require("./model/RuleRequest")); 5849 5850var _RuleResponse = _interopRequireDefault(require("./model/RuleResponse")); 5851 5852var _RuleRoutine = _interopRequireDefault(require("./model/RuleRoutine")); 5853 5854var _ScheduleType = _interopRequireDefault(require("./model/ScheduleType")); 5855 5856var _Scheduling = _interopRequireDefault(require("./model/Scheduling")); 5857 5858var _ScoringStrategy = _interopRequireDefault(require("./model/ScoringStrategy")); 5859 5860var _SortOrder = _interopRequireDefault(require("./model/SortOrder")); 5861 5862var _Strategy = _interopRequireDefault(require("./model/Strategy")); 5863 5864var _StrategyType = _interopRequireDefault(require("./model/StrategyType")); 5865 5866var _TagFilter = _interopRequireDefault(require("./model/TagFilter")); 5867 5868var _UnsubscribeRequest = _interopRequireDefault(require("./model/UnsubscribeRequest")); 5869 5870var _AchievementsApiWs = _interopRequireDefault(require("./api/AchievementsApiWs")); 5871 5872var _AwardsApiWs = _interopRequireDefault(require("./api/AwardsApiWs")); 5873 5874var _CallbacksApiWs = _interopRequireDefault(require("./api/CallbacksApiWs")); 5875 5876var _CompetitionsApiWs = _interopRequireDefault(require("./api/Compet
5876itionsApiWs")); 5877 5878var _ContestsApiWs = _interopRequireDefault(require("./api/ContestsApiWs")); 5879 5880var _FilesApiWs = _interopRequireDefault(require("./api/FilesApiWs")); 5881 5882var _GraphsApiWs = _interopRequireDefault(require("./api/GraphsApiWs")); 5883 5884var _HeartbeatApiWs = _interopRequireDefault(require("./api/HeartbeatApiWs")); 5885 5886var _InstantWinsApiWs = _interopRequireDefault(require("./api/InstantWinsApiWs")); 5887 5888var _LeaderboardApiWs = _interopRequireDefault(require("./api/LeaderboardApiWs")); 5889 5890var _MembersApiWs = _interopRequireDefault(require("./api/MembersApiWs")); 5891 5892var _MessagesApiWs = _interopRequireDefault(require("./api/MessagesApiWs")); 5893 5894var _MissionsApiWs = _interopRequireDefault(require("./api/MissionsApiWs")); 5895 5896var _OptInApiWs = _interopRequireDefault(require("./api/OptInApiWs")); 5897 5898var _ProductsApiWs = _interopRequireDefault(require("./api/ProductsApiWs")); 5899 5900var _RewardsApiWs = _interopRequireDefault(require("./api/RewardsApiWs")); 5901 5902var _RulesApiWs = _interopRequireDefault(require("./api/RulesApiWs")); 5903 5904var _StatsApiWs = _interopRequireDefault(require("./api/StatsApiWs")); 5905 5906var _ApiClientStomp = _interopRequireDefault(require("./ApiClientStomp")); 5907 5908var _DefaultApiWs = _interopRequireDefault(require("./api/DefaultApiWs")); 5909 5910function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 5911},{"./ApiClient":3,"./ApiClientStomp":4,"./api/AchievementsApiWs":5,"./api/AwardsApiWs":6,"./api/CallbacksApiWs":7,"./api/CompetitionsApiWs":8,"./api/ContestsApiWs":9,"./api/DefaultApiWs":10,"./api/FilesApiWs":11,"./api/GraphsApiWs":12,"./api/HeartbeatApiWs":13,"./api/InstantWinsApiWs":14,"./api/LeaderboardApiWs":15,"./api/MembersApiWs":16,"./api/MessagesApiWs":17,"./api/MissionsApiWs":18,"./api/OptInApiWs":19,"./api/ProductsApiWs":20,"./api/RewardsApiWs":21,"./api/RulesApiWs":22,"./api/StatsApiWs":23,"./model/Achievement":25,"./model/AchievementAllOf":26,"./model/AchievementFilter":27,"./model/AchievementRequest":28,"./model/AchievementResponse":29,"./model/AchievementStrategies":30,"./model/ActionTypeAdjustmentFactor":31,"./model/Award":32,"./model/AwardAllOf":33,"./model/AwardFilter":34,"./model/AwardRequest":35,"./model/AwardResponse":36,"./model/AwardStatus":37,"./model/CallbackEntry":38,"./model/CallbacksResponse":39,"./model/ClaimAwardRequest":40,"./model/Competition":41,"./model/CompetitionAllOf":42,"./model/CompetitionCountResponse":43,"./model/CompetitionFilter":44,"./model/CompetitionRequest":45,"./model/CompetitionResponse":46,"./model/CompetitionStatus":47,"./model/CompetitionType":48,"./model/ConditionalOperator":49,"./model/Contest":50,"./model/ContestAllOf":51,"./model/ContestFilter":52,"./model/ContestReduced":53,"./model/ContestRequest":54,"./model/ContestResponse":55,"./model/ContestStatus":56,"./model/CustomFields":57,"./model/DateRange":58,"./model/Dependancy":59,"./model/DependantOn":60,"./model/EntityChanged":61,"./model/EntityFilter":62,"./model/EntityGraph":63,"./model/EntityGraphEdge":64,"./model/EntityGraphEdgeType":65,"./model/EntityGraphNode":66,"./model/EntityGraphRequest":67,"./model/EntityGraphResponse":68,"./model/EntityGraphResult":69,"./model/EntityGraphTraversal":70,"./model/EntityRequest":71,"./model/EntityStateChanged":72,"./model/EntityType":73,"./model/Error":74,"./model/EventRefType":75,"./model/FieldType":76,"./model/File":77,"./model/FileObject":78,"./model/FileObjectAllOf":79,"./model/FileObjectResponse":80,"./model/FileRequest":81,"./model/FileResponse":82,"./model/GridLocation":83,"./model/InstantWin":84,"./model/InstantWinAllOf":85,"./model/InstantWinFilter":86,"./model/InstantWinPlayOutcome":87,"./model/InstantWinPlayRequest":88,"./model/InstantWinPlayResponse":89,"./model/InstantWinRequest":90,"./model/InstantWinResponse":91,"./model/InstantWinResult":92,"./model/InstantWinResultAllOf"
5911:93,"./model/InstantWinTile":94,"./model/Leaderboard":95,"./model/LeaderboardEntry":96,"./model/LeaderboardFilter":97,"./model/LeaderboardMember":98,"./model/LeaderboardResponse":99,"./model/LeaderboardSubscriptionRequest":100,"./model/ManageOptinRequest":101,"./model/Member":102,"./model/MemberAllOf":103,"./model/MemberRequest":104,"./model/MemberResponse":105,"./model/MemberType":106,"./model/Message":107,"./model/MessageAllOf":108,"./model/MessageFilter":109,"./model/MessageRequest":110,"./model/MessageResponse":111,"./model/MessageStatus":112,"./model/MessageType":113,"./model/MetaBasic":114,"./model/MetaInfo":115,"./model/MissionState":116,"./model/MissionStates":117,"./model/MissionStatesFilter":118,"./model/MissionStatesRequest":119,"./model/MissionStatesResponse":120,"./model/ModelCountRequest":121,"./model/ModelCountResponse":122,"./model/ModelDefault":123,"./model/NumberRange":124,"./model/OptInResponse":125,"./model/OptInStatesRequest":126,"./model/OptinAction":127,"./model/OptinStatesFilter":128,"./model/OptinStatus":129,"./model/OptionalModelFields":130,"./model/PointsStrategy":131,"./model/Product":132,"./model/ProductAllOf":133,"./model/ProductFilter":134,"./model/ProductReduced":135,"./model/ProductReducedAllOf":136,"./model/ProductRequest":137,"./model/ProductResponse":138,"./model/ProxyMessage":139,"./model/QueryMultipleFields":140,"./model/QuerySortBy":141,"./model/RangeQuery":142,"./model/RankingStrategy":143,"./model/ResponseMeta":144,"./model/Reward":145,"./model/RewardReduced":146,"./model/RewardReducedAllOf":147,"./model/RewardRequest":148,"./model/RewardResponse":149,"./model/RewardTypeReduced":150,"./model/RoundType":151,"./model/Rule":152,"./model/RuleArgument":153,"./model/RuleExpression":154,"./model/RuleRequest":155,"./model/RuleResponse":156,"./model/RuleRoutine":157,"./model/ScheduleType":158,"./model/Scheduling":159,"./model/ScoringStrategy":160,"./model/SortOrder":161,"./model/Strategy":162,"./model/StrategyType":163,"./model/TagFilter":164,"./model/UnsubscribeRequest":165}],25:[function(require,module,exports){ 5912"use strict"; 5913 5914Object.defineProperty(exports, "__esModule", { 5915 value: true 5916}); 5917exports["default"] = void 0; 5918 5919var _ApiClient = _interopRequireDefault(require("../ApiClient")); 5920 5921var _AchievementAllOf = _interopRequireDefault(require("./AchievementAllOf")); 5922 5923var _AchievementStrategies = _interopRequireDefault(require("./AchievementStrategies")); 5924 5925var _DependantOn = _interopRequireDefault(require("./DependantOn")); 5926 5927var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 5928 5929var _OptinStatus = _interopRequireDefault(require("./OptinStatus")); 5930 5931var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 5932 5933var _ProductReduced = _interopRequireDefault(require("./ProductReduced")); 5934 5935var _Scheduling = _interopRequireDefault(require("./Scheduling")); 5936 5937function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 5938 5939function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 5940 5941function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 5942 5943function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 5944 5945/** 5946 * The Achievement model module. 5947 * @module model/Achievement 5948 * @version 1.0.14 5949 */ 5950var Achievement = /*#__PURE__*/function () { 5951 /** 5952 * Constructs a new <code>Achievement</code>. 5953 * @alias module:model/Achievement 5954 * @implements module:model/AchievementAllOf 5955 * @implements module:model/ModelDefault 5956 * @implements module:model/OptionalModelFields 5957 * @param id {String} Ziqni id of the model 5958 */ 5959 function Achievement(id) { 5960 _classCallCheck(this, Achievement); 5961 5962 _AchievementAllOf["default"].initialize(this); 5963 5964 _ModelDefault["default"].initialize(this, id); 5965 5966 _OptionalModelFields["default"].initialize(this); 5967 5968 Achievement.initialize(this, id); 5969 } 5970 /** 5971 * Initializes the fields of this object. 5972 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 5973 * Only for internal use. 5974 */ 5975 5976 5977 _createClass(Achievement, null, [{ 5978 key: "initialize", 5979 value: function initialize(obj, id) { 5980 obj['id'] = id; 5981 } 5982 /** 5983 * Constructs a <code>Achievement</code> from a plain JavaScript object, optionally creating a new instance. 5984 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 5985 * @param {Object} data The plain JavaScript object bearing properties of interest. 5986 * @param {module:model/Achievement} obj Optional instance to populate. 5987 * @return {module:model/Achievement} The populated <code>Achievement</code> instance. 5988 */ 5989 5990 }, { 5991 key: "constructFromObject", 5992 value: function constructFromObject(data, obj) { 5993 if (data) { 5994 obj = obj || new Achievement(); 5995 5996 _AchievementAllOf["default"].constructFromObject(data, obj); 5997 5998 _ModelDefault["default"].constructFromObject(data, obj); 5999 6000 _OptionalModelFields["default"].constructFromObject(data, obj); 6001 6002 if (data.hasOwnProperty('name')) { 6003 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 6004 } 6005 6006 if (data.hasOwnProperty('description')) { 6007 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 6008 } 6009 6010 if (data.hasOwnProperty('termsAndConditions')) { 6011 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 6012 } 6013 6014 if (data.hasOwnProperty('constraints')) { 6015 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 6016 } 6017 6018 if (data.hasOwnProperty('maxNumberOfIssues')) { 6019 obj['maxNumberOfIssues'] = _ApiClient["default"].convertToType(data['maxNumberOfIssues'], 'Number'); 6020 } 6021 6022 if (data.hasOwnProperty('scheduling')) { 6023 obj['scheduling'] = _Scheduling["default"].constructFromObject(data['scheduling']); 6024 } 6025 6026 if (data.hasOwnProperty('status')) { 6027 obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); 6028 } 6029 6030 if (data.hasOwnProperty('statusCode')) { 6031 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 6032 } 6033 6034 if (data.hasOwnProperty('memberTagsFilter')) { 6035 obj['memberTagsFilter'] = _DependantOn["default"].constructFromObject(data['memberTagsFilter']); 6036 } 6037 6038 if (data.hasOwnProperty('achievementDependencies')) { 6039 obj['achievementDependencies'] = _DependantOn["default"].constructFromObject(data['achievementDependencies']); 6040 } 6041 6042 if (data.hasOwnProperty('productTagsFilter')) { 6043 obj['productTagsFilter'] = _DependantOn["default"].constructFromObject(data['productTagsFilter']); 6044 } 6045 6046 if (data.hasOwnProperty('products')) { 6047 obj['products'] = _ApiClient["default"].convertToType(data['products'], [_ProductReduced["default"]]); 6048 } 6049 6050 if (data.hasOwnProperty('iconLink')) { 6051 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 6052 } 6053 6054 if (data.hasOwnProperty('bannerLink')) { 6055 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 6056 } 6057 6058 if (data.hasOwnProperty('bannerLowResolutionLink')) { 6059 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 6060 } 6061 6062 if (data.hasOwnProperty('bannerHighResolutionLink')) { 6063 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 6064 } 6065 6066 if (data.hasOwnProperty('strategies')) { 6067 obj['strategies'] = _AchievementStrategies["default"].constructFromObject(data['strategies']); 6068 } 6069 6070 if (data.hasOwnProperty('optInStatus')) { 6071 obj['optInStatus'] = _OptinStatus["default"].constructFromObject(data['optInStatus']); 6072 } 6073 6074 if (data.hasOwnProperty('id')) { 6075 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 6076 } 6077 6078 if (data.hasOwnProperty('spaceName')) { 6079 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 6080 } 6081 6082 if (data.hasOwnProperty('created')) { 6083 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 6084 } 6085 6086 if (data.hasOwnProperty('customFields')) { 6087 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 6088 'String': Object 6089 }); 6090 } 6091 6092 if (data.hasOwnProperty('tags')) { 6093 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 6094 } 6095 6096 if (data.hasOwnProperty('metadata')) { 6097 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 6098 'String': 'String' 6099 }); 6100 } 6101 } 6102 6103 return obj; 6104 } 6105 }]); 6106 6107 return Achievement; 6108}(); 6109/** 6110 * @member {String} name 6111 */ 6112 6113 6114Achievement.prototype['name'] = undefined; 6115/** 6116 * @member {String} description 6117 */ 6118 6119Achievement.prototype['description'] = undefined; 6120/** 6121 * @member {String} termsAndConditions 6122 */ 6123 6124Achievement.prototype['termsAndConditions'] = undefined; 6125/** 6126 * Additional constraints, if set means true [optinRequiredForEntrants, hasRules, hasRew
6126ards] 6127 * @member {Array.<String>} constraints 6128 */ 6129 6130Achievement.prototype['constraints'] = undefined; 6131/** 6132 * Maximum number of issued achievements 6133 * @member {Number} maxNumberOfIssues 6134 */ 6135 6136Achievement.prototype['maxNumberOfIssues'] = undefined; 6137/** 6138 * @member {module:model/Scheduling} scheduling 6139 */ 6140 6141Achievement.prototype['scheduling'] = undefined; 6142/** 6143 * Achievement status 6144 * @member {String} status 6145 */ 6146 6147Achievement.prototype['status'] = undefined; 6148/** 6149 * @member {Number} statusCode 6150 */ 6151 6152Achievement.prototype['statusCode'] = undefined; 6153/** 6154 * @member {module:model/DependantOn} memberTagsFilter 6155 */ 6156 6157Achievement.prototype['memberTagsFilter'] = undefined; 6158/** 6159 * @member {module:model/DependantOn} achievementDependencies 6160 */ 6161 6162Achievement.prototype['achievementDependencies'] = undefined; 6163/** 6164 * @member {module:model/DependantOn} productTagsFilter 6165 */ 6166 6167Achievement.prototype['productTagsFilter'] = undefined; 6168/** 6169 * @member {Array.<module:model/ProductReduced>} products 6170 */ 6171 6172Achievement.prototype['products'] = undefined; 6173/** 6174 * Link to the icon 6175 * @member {String} iconLink 6176 */ 6177 6178Achievement.prototype['iconLink'] = undefined; 6179/** 6180 * Link to the banner 6181 * @member {String} bannerLink 6182 */ 6183 6184Achievement.prototype['bannerLink'] = undefined; 6185/** 6186 * Link to the bannerLowResolution 6187 * @member {String} bannerLowResolutionLink 6188 */ 6189 6190Achievement.prototype['bannerLowResolutionLink'] = undefined; 6191/** 6192 * Link to the bannerHighResolution 6193 * @member {String} bannerHighResolutionLink 6194 */ 6195 6196Achievement.prototype['bannerHighResolutionLink'] = undefined; 6197/** 6198 * @member {module:model/AchievementStrategies} strategies 6199 */ 6200 6201Achievement.prototype['strategies'] = undefined; 6202/** 6203 * @member {module:model/OptinStatus} optInStatus 6204 */ 6205 6206Achievement.prototype['optInStatus'] = undefined; 6207/** 6208 * Ziqni id of the model 6209 * @member {String} id 6210 */ 6211 6212Achievement.prototype['id'] = undefined; 6213/** 6214 * This is the space name which is linked to the account 6215 * @member {String} spaceName 6216 */ 6217 6218Achievement.prototype['spaceName'] = undefined; 6219/** 6220 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 6221 * @member {Date} created 6222 */ 6223 6224Achievement.prototype['created'] = undefined; 6225/** 6226 * @member {Object.<String, Object>} customFields 6227 */ 6228 6229Achievement.prototype['customFields'] = undefined; 6230/** 6231 * A list of id's used to tag models 6232 * @member {Array.<String>} tags 6233 */ 6234 6235Achievement.prototype['tags'] = undefined; 6236/** 6237 * @member {Object.<String, String>} metadata 6238 */ 6239 6240Achievement.prototype['metadata'] = undefined; // Implement AchievementAllOf interface: 6241 6242/** 6243 * @member {String} name 6244 */ 6245 6246_AchievementAllOf["default"].prototype['name'] = undefined; 6247/** 6248 * @member {String} description 6249 */ 6250 6251_AchievementAllOf["default"].prototype['description'] = undefined; 6252/** 6253 * @member {String} termsAndConditions 6254 */ 6255 6256_AchievementAllOf["default"].prototype['termsAndConditions'] = undefined; 6257/** 6258 * Additional constraints, if set means true [optinRequiredForEntrants, hasRules, hasRewards] 6259 * @member {Array.<String>} constraints 6260 */ 6261 6262_AchievementAllOf["default"].prototype['constraints'] = undefined; 6263/** 6264 * Maximum number of issued achievements 6265 * @member {Number} maxNumberOfIssues 6266 */ 6267 6268_AchievementAllOf["default"].prototype['maxNumberOfIssues'] = undefined; 6269/** 6270 * @member {module:model/Scheduling} scheduling 6271 */ 6272 6273_AchievementAllOf["default"].prototype['scheduling'] = undefined; 6274/** 6275 * Achievement status 6276 * @member {String} status 6277 */ 6278 6279_AchievementAllOf["default"].prototype['status'] = undefined; 6280/** 6281 * @member {Number} statusCode 6282 */ 6283 6284_AchievementAllOf["default"].prototype['statusCode'] = undefined; 6285/** 6286 * @member {module:model/DependantOn} memberTagsFilter 6287 */ 6288 6289_AchievementAllOf["default"].prototype['memberTagsFilter'] = undefined; 6290/** 6291 * @member {module:model/DependantOn} achievementDependencies 6292 */ 6293 6294_AchievementAllOf["default"].prototype['achievementDependencies'] = undefined; 6295/** 6296 * @member {module:model/DependantOn} productTagsFilter 6297 */ 6298 6299_AchievementAllOf["default"].prototype['productTagsFilter'] = undefined; 6300/** 6301 * @member {Array.<module:model/ProductReduced>} products 6302 */ 6303 6304_AchievementAllOf["default"].prototype['products'] = undefined; 6305/** 6306 * Link to the icon 6307 * @member {String} iconLink 6308 */ 6309 6310_AchievementAllOf["default"].prototype['iconLink'] = undefined; 6311/** 6312 * Link to the banner 6313 * @member {String} bannerLink 6314 */ 6315 6316_AchievementAllOf["default"].prototype['bannerLink'] = undefined; 6317/** 6318 * Link to the bannerLowResolution 6319 * @member {String} bannerLowResolutionLink 6320 */ 6321 6322_AchievementAllOf["default"].prototype['bannerLowResolutionLink'] = undefined; 6323/** 6324 * Link to the bannerHighResolution 6325 * @member {String} bannerHighResolutionLink 6326 */ 6327 6328_AchievementAllOf["default"].prototype['bannerHighResolutionLink'] = undefined; 6329/** 6330 * @member {module:model/AchievementStrategies} strategies 6331 */ 6332 6333_AchievementAllOf["default"].prototype['strategies'] = undefined; 6334/** 6335 * @member {module:model/OptinStatus} optInStatus 6336 */ 6337 6338_AchievementAllOf["default"].prototype['optInStatus'] = undefined; // Implement ModelDefault interface: 6339 6340/** 6341 * Ziqni id of the model 6342 * @member {String} id 6343 */ 6344 6345_ModelDefault["default"].prototype['id'] = undefined; 6346/** 6347 * This is the space name which is linked to the account 6348 * @member {String} spaceName 6349 */ 6350 6351_ModelDefault["default"].prototype['spaceName'] = undefined; 6352/** 6353 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 6354 * @member {Date} created 6355 */ 6356 6357_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 6358 6359/** 6360 * @member {Object.<String, Object>} customFields 6361 */ 6362 6363_OptionalModelFields["default"].prototype['customFields'] = undefined; 6364/** 6365 * A list of id's used to tag models 6366 * @member {Array.<String>} tags 6367 */ 6368 6369_OptionalModelFields["default"].prototype['tags'] = undefined; 6370/** 6371 * @member {Object.<String, String>} metadata 6372 */ 6373 6374_OptionalModelFields["default"].prototype['metadata'] = undefined; 6375var _default = Achievement; 6376exports["default"] = _default; 6377},{"../ApiClient":3,"./AchievementAllOf":26,"./AchievementStrategies":30,"./DependantOn":60,"./ModelDefault":123,"./OptinStatus":129,"./OptionalModelFields":130,"./ProductReduced":135,"./Scheduling":159}],26:[function(require,module,exports){ 6378"use strict"; 6379 6380Object.defineProperty(exports, "__esModule", { 6381 value: true 6382}); 6383exports["default"] = void 0; 6384 6385var _ApiClient = _interopRequireDefault(require("../ApiClient")); 6386 6387var _AchievementStrategies = _interopRequireDefault(require("./AchievementStrategies")); 6388 6389var _DependantOn = _interopRequireDefault(require("./DependantOn")); 6390 6391var _OptinStatus = _interopRequireDefault(require("./OptinStatus")); 6392 6393var _ProductReduced = _interopRequireDefault(require("./ProductReduced")); 6394 6395var _Scheduling = _interopRequireDefault(require("./Scheduling")); 6396 6397function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 6398 6399function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6400 6401function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6402 6403function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 6404 6405/** 6406 * The AchievementAllOf model module. 6407 * @module model/AchievementAllOf 6408 * @version 1.0.14 6409 */ 6410var AchievementAllOf = /*#__PURE__*/function () { 6411 /** 6412 * Constructs a new <code>AchievementAllOf</code>. 6413 * @alias module:model/AchievementAllOf 6414 */ 6415 function AchievementAllOf() { 6416 _classCallCheck(this, AchievementAllOf); 6417 6418 AchievementAllOf.initialize(this); 6419 } 6420 /** 6421 * Initializes the fields of this object. 6422 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 6423 * Only for internal use. 6424 */ 6425 6426 6427 _createClass(AchievementAllOf, null, [{ 6428 key: "initialize", 6429 value: function initialize(obj) {} 6430 /** 6431 * Constructs a <code>AchievementAllOf</code> from a plain JavaScript object, optionally creating a new instance. 6432 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 6433 * @param {Object} data The plain JavaScript object bearing properties of interest. 6434 * @param {module:model/AchievementAllOf} obj Optional instance to populate. 6435 * @return {module:model/AchievementAllOf} The populated <code>AchievementAllOf</code> instance. 6436 */ 6437 6438 }, { 6439 key: "constructFromObject", 6440 value: function constructFromObject(data, obj) { 6441 if (data) { 6442 obj = obj || new AchievementAllOf(); 6443 6444 if (data.hasOwnProperty('name')) { 6445 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 6446 } 6447 6448 if (data.hasOwnProperty('description')) { 6449 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 6450 } 6451 6452 if (data.hasOwnProperty('termsAndConditions')) { 6453 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 6454 } 6455 6456 if (data.hasOwnProperty('constraints')) { 6457 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 6458 } 6459 6460 if (data.hasOwnProperty('maxNumberOfIssues')) { 6461 obj['maxNumberOfIssues'] = _ApiClient["default"].convertToType(data['maxNumberOfIssues'], 'Number'); 6462 } 6463 6464 if (data.hasOwnProperty('scheduling')) { 6465 obj['scheduling'] = _Scheduling["default"].constructFromObject(data['scheduling']); 6466 } 6467 6468 if (data.hasOwnProperty('status')) { 6469 obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); 6470 } 6471 6472 if (data.hasOwnProperty('statusCode')) { 6473 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 6474 } 6475 6476 if (data.hasOwnProperty('memberTagsFilter')) { 6477 obj['memberTagsFilter'] = _DependantOn["default"].constructFromObject(data['memberTagsFilter']); 6478 } 6479 6480 if (data.hasOwnProperty('achievementDependencies')) { 6481 obj['achievementDependencies'] = _DependantOn["default"].constructFromObject(data['achievementDependencies']); 6482 } 6483 6484 if (data.hasOwnProperty('productTagsFilter')) { 6485 obj['productTagsFilter'] = _DependantOn["default"].constructFromObject(data['productTagsFilter']); 6486 } 6487 6488 if (data.hasOwnProperty('products')) { 6489 obj['products'] = _ApiClient["default"].convertToType(data['products'], [_ProductReduced["default"]]); 6490 } 6491 6492 if (data.hasOwnProperty('iconLink')) { 6493 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 6494 } 6495 6496 if (data.hasOwnProperty('bannerLink')) { 6497 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 6498 } 6499 6500 if (data.hasOwnProperty('bannerLowResolutionLink')) { 6501 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 6502 } 6503 6504 if (data.hasOwnProperty('bannerHighResolutionLink')) { 6505 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 6506 } 6507 6508 if (data.hasOwnProperty('strategies')) { 6509 obj['strategies'] = _AchievementStrategies["default"].constructFromObject(data['strategies']); 6510 } 6511 6512 if (data.hasOwnProperty('optInStatus')) { 6513 obj['optInStatus'] = _OptinStatus["default"].constructFromObject(data['optInStatus']); 6514 } 6515 } 6516 6517 return obj; 6518 } 6519 }]); 6520 6521 return AchievementAllOf; 6522}(); 6523/** 6524 * @member {String} name 6525 */ 6526 6527 6528AchievementAllOf.prototype['name'] = undefined; 6529/** 6530 * @member {String} description 6531 */ 6532 6533AchievementAllOf.prototype['description'] = undefined; 6534/** 6535 * @member {String} termsAndConditions 6536 */ 6537 6538AchievementAllOf.prototype['termsAndConditions'] = undefined; 6539/** 6540 * Additional constraints, if set means true [optinRequiredForEntrants, hasRules, hasRew
6540ards] 6541 * @member {Array.<String>} constraints 6542 */ 6543 6544AchievementAllOf.prototype['constraints'] = undefined; 6545/** 6546 * Maximum number of issued achievements 6547 * @member {Number} maxNumberOfIssues 6548 */ 6549 6550AchievementAllOf.prototype['maxNumberOfIssues'] = undefined; 6551/** 6552 * @member {module:model/Scheduling} scheduling 6553 */ 6554 6555AchievementAllOf.prototype['scheduling'] = undefined; 6556/** 6557 * Achievement status 6558 * @member {String} status 6559 */ 6560 6561AchievementAllOf.prototype['status'] = undefined; 6562/** 6563 * @member {Number} statusCode 6564 */ 6565 6566AchievementAllOf.prototype['statusCode'] = undefined; 6567/** 6568 * @member {module:model/DependantOn} memberTagsFilter 6569 */ 6570 6571AchievementAllOf.prototype['memberTagsFilter'] = undefined; 6572/** 6573 * @member {module:model/DependantOn} achievementDependencies 6574 */ 6575 6576AchievementAllOf.prototype['achievementDependencies'] = undefined; 6577/** 6578 * @member {module:model/DependantOn} productTagsFilter 6579 */ 6580 6581AchievementAllOf.prototype['productTagsFilter'] = undefined; 6582/** 6583 * @member {Array.<module:model/ProductReduced>} products 6584 */ 6585 6586AchievementAllOf.prototype['products'] = undefined; 6587/** 6588 * Link to the icon 6589 * @member {String} iconLink 6590 */ 6591 6592AchievementAllOf.prototype['iconLink'] = undefined; 6593/** 6594 * Link to the banner 6595 * @member {String} bannerLink 6596 */ 6597 6598AchievementAllOf.prototype['bannerLink'] = undefined; 6599/** 6600 * Link to the bannerLowResolution 6601 * @member {String} bannerLowResolutionLink 6602 */ 6603 6604AchievementAllOf.prototype['bannerLowResolutionLink'] = undefined; 6605/** 6606 * Link to the bannerHighResolution 6607 * @member {String} bannerHighResolutionLink 6608 */ 6609 6610AchievementAllOf.prototype['bannerHighResolutionLink'] = undefined; 6611/** 6612 * @member {module:model/AchievementStrategies} strategies 6613 */ 6614 6615AchievementAllOf.prototype['strategies'] = undefined; 6616/** 6617 * @member {module:model/OptinStatus} optInStatus 6618 */ 6619 6620AchievementAllOf.prototype['optInStatus'] = undefined; 6621var _default = AchievementAllOf; 6622exports["default"] = _default; 6623},{"../ApiClient":3,"./AchievementStrategies":30,"./DependantOn":60,"./OptinStatus":129,"./ProductReduced":135,"./Scheduling":159}],27:[function(require,module,exports){ 6624"use strict"; 6625 6626Object.defineProperty(exports, "__esModule", { 6627 value: true 6628}); 6629exports["default"] = void 0; 6630 6631var _ApiClient = _interopRequireDefault(require("../ApiClient")); 6632 6633var _DateRange = _interopRequireDefault(require("./DateRange")); 6634 6635var _NumberRange = _interopRequireDefault(require("./NumberRange")); 6636 6637var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 6638 6639function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 6640 6641function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6642 6643function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6644 6645function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 6646 6647/** 6648 * The AchievementFilter model module. 6649 * @module model/AchievementFilter 6650 * @version 1.0.14 6651 */ 6652var AchievementFilter = /*#__PURE__*/function () { 6653 /** 6654 * Constructs a new <code>AchievementFilter</code>. 6655 * @alias module:model/AchievementFilter 6656 * @param includeOptInState {Boolean} 6657 */ 6658 function AchievementFilter(includeOptInState) { 6659 _classCallCheck(this, AchievementFilter); 6660 6661 AchievementFilter.initialize(this, includeOptInState); 6662 } 6663 /** 6664 * Initializes the fields of this object. 6665 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 6666 * Only for internal use. 6667 */ 6668 6669 6670 _createClass(AchievementFilter, null, [{ 6671 key: "initialize", 6672 value: function initialize(obj, includeOptInState) { 6673 obj['includeOptInState'] = includeOptInState; 6674 } 6675 /** 6676 * Constructs a <code>AchievementFilter</code> from a plain JavaScript object, optionally creating a new instance. 6677 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 6678 * @param {Object} data The plain JavaScript object bearing properties of interest. 6679 * @param {module:model/AchievementFilter} obj Optional instance to populate. 6680 * @return {module:model/AchievementFilter} The populated <code>AchievementFilter</code> instance. 6681 */ 6682 6683 }, { 6684 key: "constructFromObject", 6685 value: function constructFromObject(data, obj) { 6686 if (data) { 6687 obj = obj || new AchievementFilter(); 6688 6689 if (data.hasOwnProperty('tags')) { 6690 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 6691 } 6692 6693 if (data.hasOwnProperty('startDate')) { 6694 obj['startDate'] = _DateRange["default"].constructFromObject(data['startDate']); 6695 } 6696 6697 if (data.hasOwnProperty('endDate')) { 6698 obj['endDate'] = _DateRange["default"].constructFromObject(data['endDate']); 6699 } 6700 6701 if (data.hasOwnProperty('ids')) { 6702 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 6703 } 6704 6705 if (data.hasOwnProperty('sortBy')) { 6706 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 6707 } 6708 6709 if (data.hasOwnProperty('skip')) { 6710 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 6711 } 6712 6713 if (data.hasOwnProperty('limit')) { 6714 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 6715 } 6716 6717 if (data.hasOwnProperty('statusCode')) { 6718 obj['statusCode'] = _NumberRange["default"].constructFromObject(data['statusCode']); 6719 } 6720 6721 if (data.hasOwnProperty('constraints')) { 6722 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 6723 } 6724 6725 if (data.hasOwnProperty('productTags')) { 6726 obj['productTags'] = _ApiClient["default"].convertToType(data['productTags'], ['String']); 6727 } 6728 6729 if (data.hasOwnProperty('productIds')) { 6730 obj['productIds'] = _ApiClient["default"].convertToType(data['productIds'], ['String']); 6731 } 6732 6733 if (data.hasOwnProperty('scheduleTypes')) { 6734 obj['scheduleTypes'] = _ApiClient["default"].convertToType(data['scheduleTypes'], ['String']); 6735 } 6736 6737 if (data.hasOwnProperty('includeOptInState')) { 6738 obj['includeOptInState'] = _ApiClient["default"].convertToType(data['includeOptInState'], 'Boolean'); 6739 } 6740 } 6741 6742 return obj; 6743 } 6744 }]); 6745 6746 return AchievementFilter; 6747}(); 6748/** 6749 * @member {Array.<String>} tags 6750 */ 6751 6752 6753AchievementFilter.prototype['tags'] = undefined; 6754/** 6755 * @member {module:model/DateRange} startDate 6756 */ 6757 6758AchievementFilter.prototype['startDate'] = undefined; 6759/** 6760 * @member {module:model/DateRange} endDate 6761 */ 6762 6763AchievementFilter.prototype['endDate'] = undefined; 6764/** 6765 * @member {Array.<String>} ids 6766 */ 6767 6768AchievementFilter.prototype['ids'] = undefined; 6769/** 6770 * @member {Array.<module:model/QuerySortBy>} sortBy 6771 */ 6772 6773AchievementFilter.prototype['sortBy'] = undefined; 6774/** 6775 * @member {Number} skip 6776 */ 6777 6778AchievementFilter.prototype['skip'] = undefined; 6779/** 6780 * @member {Number} limit 6781 */ 6782 6783AchievementFilter.prototype['limit'] = undefined; 6784/** 6785 * @member {module:model/NumberRange} statusCode 6786 */ 6787 6788AchievementFilter.prototype['statusCode'] = undefined; 6789/** 6790 * Specify the constraints that need to be applied to the filter. 6791 * @member {Array.<String>} constraints 6792 */ 6793 6794AchievementFilter.prototype['constraints'] = undefined; 6795/** 6796 * @member {Array.<String>} productTags 6797 */ 6798 6799AchievementFilter.prototype['productTags'] = undefined; 6800/** 6801 * @member {Array.<String>} productIds 6802 */ 6803 6804AchievementFilter.prototype['productIds'] = undefined; 6805/** 6806 * @member {Array.<String>} scheduleTypes 6807 */ 6808 6809AchievementFilter.prototype['scheduleTypes'] = undefined; 6810/** 6811 * @member {Boolean} includeOptInState 6812 */ 6813 6814AchievementFilter.prototype['includeOptInState'] = undefined; 6815var _default = AchievementFilter; 6816exports["default"] = _default; 6817},{"../ApiClient":3,"./DateRange":58,"./NumberRange":124,"./QuerySortBy":141}],28:[function(require,module,exports){ 6818"use strict"; 6819 6820Object.defineProperty(exports, "__esModule", { 6821 value: true 6822}); 6823exports["default"] = void 0; 6824 6825var _ApiClient = _interopRequireDefault(require("../ApiClient")); 6826 6827var _AchievementFilter = _interopRequireDefault(require("./AchievementFilter")); 6828 6829function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 6830 6831function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6832 6833function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6834 6835function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 6836 6837/** 6838 * The AchievementRequest model module. 6839 * @module model/AchievementRequest 6840 * @version 1.0.14 6841 */ 6842var AchievementRequest = /*#__PURE__*/function () { 6843 /** 6844 * Constructs a new <code>AchievementRequest</code>. 6845 * @alias module:model/AchievementRequest 6846 */ 6847 function AchievementRequest() { 6848 _classCallCheck(this, AchievementRequest); 6849 6850 AchievementRequest.initialize(this); 6851 } 6852 /** 6853 * Initializes the fields of this object. 6854 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 6855 * Only for internal use. 6856 */ 6857 6858 6859 _createClass(AchievementRequest, null, [{ 6860 key: "initialize", 6861 value: function initialize(obj) {} 6862 /** 6863 * Constructs a <code>AchievementRequest</code> from a plain JavaScript object, optionally creating a new instance. 6864 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 6865 * @param {Object} data The plain JavaScript object bearing properties of interest. 6866 * @param {module:model/AchievementRequest} obj Optional instance to populate. 6867 * @return {module:model/AchievementRequest} The populated <code>AchievementRequest</code> instance. 6868 */ 6869 6870 }, { 6871 key: "constructFromObject", 6872 value: function constructFromObject(data, obj) { 6873 if (data) { 6874 obj = obj || new AchievementRequest(); 6875 6876 if (data.hasOwnProperty('achievementFilter')) { 6877 obj['achievementFilter'] = _AchievementFilter["default"].constructFromObject(data['achievementFilter']); 6878 } 6879 6880 if (data.hasOwnProperty('languageKey')) { 6881 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 6882 } 6883 } 6884 6885 return obj; 6886 } 6887 }]); 6888 6889 return AchievementRequest; 6890}(); 6891/** 6892 * @member {module:model/AchievementFilter} achievementFilter 6893 */ 6894 6895 6896AchievementRequest.prototype['achievementFilter'] = undefined; 6897/** 6898 * The language codes can be found in the settings/transalations section of the back office 6899 * @member {String} languageKey 6900 */ 6901 6902AchievementRequest.prototype['languageKey'] = undefined; 6903var _default = AchievementRequest; 6904exports["default"] = _default; 6905},{"../ApiClient":3,"./AchievementFilter":27}],29:[function(require,module,exports){ 6906"use strict"; 6907 6908Object.defineProperty(exports, "__esModule", { 6909 value: true 6910}); 6911exports["default"] = void 0; 6912 6913var _ApiClient = _interopRequireDefault(require("../ApiClient")); 6914 6915var _Achievement = _interopRequireDefault(require("./Achievement")); 6916 6917var _Error = _interopRequireDefault(require("./Error")); 6918 6919var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 6920 6921function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 6922 6923function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 6924 6925function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 6926 6927function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 6928 6929/** 6930 * The AchievementResponse model module. 6931 * @module model/AchievementResponse 6932 * @version 1.0.14 6933 */ 6934var AchievementResponse = /*#__PURE__*/function () { 6935 /** 6936 * Constructs a new <code>AchievementResponse</code>. 6937 * @alias module:model/AchievementResponse 6938 */ 6939 function AchievementResponse() { 6940 _classCallCheck(this, AchievementResponse); 6941 6942 AchievementResponse.initialize(this); 6943 } 6944 /** 6945 * Initializes the fields of this object. 6946 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 6947 * Only for internal use. 6948 */ 6949 6950 6951 _createClass(AchievementResponse, null, [{ 6952 key: "initialize", 6953 value: function initialize(obj) {} 6954 /** 6955 * Constructs a <code>AchievementResponse</code> from a plain JavaScript object, optionally creating a new instance. 6956 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 6957 * @param {Object} data The plain JavaScript object bearing properties of interest. 6958 * @param {module:model/AchievementResponse} obj Optional instance to populate. 6959 * @return {module:model/AchievementResponse} The populated <code>AchievementResponse</code> instance. 6960 */ 6961 6962 }, { 6963 key: "constructFromObject", 6964 value: function constructFromObject(data, obj) { 6965 if (data) { 6966 obj = obj || new AchievementResponse(); 6967 6968 if (data.hasOwnProperty('meta')) { 6969 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 6970 } 6971 6972 if (data.hasOwnProperty('data')) { 6973 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Achievement["default"]]); 6974 } 6975 6976 if (data.hasOwnProperty('errors')) { 6977 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 6978 } 6979 } 6980 6981 return obj; 6982 } 6983 }]); 6984 6985 return AchievementResponse; 6986}(); 6987/** 6988 * @member {module:model/ResponseMeta} meta 6989 */ 6990 6991 6992AchievementResponse.prototype['meta'] = undefined; 6993/** 6994 * @member {Array.<module:model/Achievement>} data 6995 */ 6996 6997AchievementResponse.prototype['data'] = undefined; 6998/** 6999 * @member {Array.<module:model/Error>} errors 7000 */ 7001 7002AchievementResponse.prototype['errors'] = undefined; 7003var _default = AchievementResponse; 7004exports["default"] = _default; 7005},{"../ApiClient":3,"./Achievement":25,"./Error":74,"./ResponseMeta":144}],30:[function(require,module,exports){ 7006"use strict"; 7007 7008Object.defineProperty(exports, "__esModule", { 7009 value: true 7010}); 7011exports["default"] = void 0; 7012 7013var _ApiClient = _interopRequireDefault(require("../ApiClient")); 7014 7015var _PointsStrategy = _interopRequireDefault(require("./PointsStrategy")); 7016 7017function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 7018 7019function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7020 7021function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.k
7021ey, descriptor); } } 7022 7023function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 7024 7025/** 7026 * The AchievementStrategies model module. 7027 * @module model/AchievementStrategies 7028 * @version 1.0.14 7029 */ 7030var AchievementStrategies = /*#__PURE__*/function () { 7031 /** 7032 * Constructs a new <code>AchievementStrategies</code>. 7033 * @alias module:model/AchievementStrategies 7034 */ 7035 function AchievementStrategies() { 7036 _classCallCheck(this, AchievementStrategies); 7037 7038 AchievementStrategies.initialize(this); 7039 } 7040 /** 7041 * Initializes the fields of this object. 7042 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 7043 * Only for internal use. 7044 */ 7045 7046 7047 _createClass(AchievementStrategies, null, [{ 7048 key: "initialize", 7049 value: function initialize(obj) {} 7050 /** 7051 * Constructs a <code>AchievementStrategies</code> from a plain JavaScript object, optionally creating a new instance. 7052 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 7053 * @param {Object} data The plain JavaScript object bearing properties of interest. 7054 * @param {module:model/AchievementStrategies} obj Optional instance to populate. 7055 * @return {module:model/AchievementStrategies} The populated <code>AchievementStrategies</code> instance. 7056 */ 7057 7058 }, { 7059 key: "constructFromObject", 7060 value: function constructFromObject(data, obj) { 7061 if (data) { 7062 obj = obj || new AchievementStrategies(); 7063 7064 if (data.hasOwnProperty('pointsStrategy')) { 7065 obj['pointsStrategy'] = _PointsStrategy["default"].constructFromObject(data['pointsStrategy']); 7066 } 7067 } 7068 7069 return obj; 7070 } 7071 }]); 7072 7073 return AchievementStrategies; 7074}(); 7075/** 7076 * @member {module:model/PointsStrategy} pointsStrategy 7077 */ 7078 7079 7080AchievementStrategies.prototype['pointsStrategy'] = undefined; 7081var _default = AchievementStrategies; 7082exports["default"] = _default; 7083},{"../ApiClient":3,"./PointsStrategy":131}],31:[function(require,module,exports){ 7084"use strict"; 7085 7086Object.defineProperty(exports, "__esModule", { 7087 value: true 7088}); 7089exports["default"] = void 0; 7090 7091var _ApiClient = _interopRequireDefault(require("../ApiClient")); 7092 7093function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 7094 7095function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7096 7097function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7098 7099function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 7100 7101/** 7102 * The ActionTypeAdjustmentFactor model module. 7103 * @module model/ActionTypeAdjustmentFactor 7104 * @version 1.0.14 7105 */ 7106var ActionTypeAdjustmentFactor = /*#__PURE__*/function () { 7107 /** 7108 * Constructs a new <code>ActionTypeAdjustmentFactor</code>. 7109 * @alias module:model/ActionTypeAdjustmentFactor 7110 * @param adjustmentFactor {Number} The multiplier to apply to source values received for this product events 7111 * @param actionTypeId {String} A unique system generated identifier for Action Type 7112 */ 7113 function ActionTypeAdjustmentFactor(adjustmentFactor, actionTypeId) { 7114 _classCallCheck(this, ActionTypeAdjustmentFactor); 7115 7116 ActionTypeAdjustmentFactor.initialize(this, adjustmentFactor, actionTypeId); 7117 } 7118 /** 7119 * Initializes the fields of this object. 7120 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 7121 * Only for internal use. 7122 */ 7123 7124 7125 _createClass(ActionTypeAdjustmentFactor, null, [{ 7126 key: "initialize", 7127 value: function initialize(obj, adjustmentFactor, actionTypeId) { 7128 obj['adjustmentFactor'] = adjustmentFactor; 7129 obj['actionTypeId'] = actionTypeId; 7130 } 7131 /** 7132 * Constructs a <code>ActionTypeAdjustmentFactor</code> from a plain JavaScript object, optionally creating a new instance. 7133 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 7134 * @param {Object} data The plain JavaScript object bearing properties of interest. 7135 * @param {module:model/ActionTypeAdjustmentFactor} obj Optional instance to populate. 7136 * @return {module:model/ActionTypeAdjustmentFactor} The populated <code>ActionTypeAdjustmentFactor</code> instance. 7137 */ 7138 7139 }, { 7140 key: "constructFromObject", 7141 value: function constructFromObject(data, obj) { 7142 if (data) { 7143 obj = obj || new ActionTypeAdjustmentFactor(); 7144 7145 if (data.hasOwnProperty('adjustmentFactor')) { 7146 obj['adjustmentFactor'] = _ApiClient["default"].convertToType(data['adjustmentFactor'], 'Number'); 7147 } 7148 7149 if (data.hasOwnProperty('actionTypeId')) { 7150 obj['actionTypeId'] = _ApiClient["default"].convertToType(data['actionTypeId'], 'String'); 7151 } 7152 } 7153 7154 return obj; 7155 } 7156 }]); 7157 7158 return ActionTypeAdjustmentFactor; 7159}(); 7160/** 7161 * The multiplier to apply to source values received for this product events 7162 * @member {Number} adjustmentFactor 7163 */ 7164 7165 7166ActionTypeAdjustmentFactor.prototype['adjustmentFactor'] = undefined; 7167/** 7168 * A unique system generated identifier for Action Type 7169 * @member {String} actionTypeId 7170 */ 7171 7172ActionTypeAdjustmentFactor.prototype['actionTypeId'] = undefined; 7173var _default = ActionTypeAdjustmentFactor; 7174exports["default"] = _default; 7175},{"../ApiClient":3}],32:[function(require,module,exports){ 7176"use strict"; 7177 7178Object.defineProperty(exports, "__esModule", { 7179 value: true 7180}); 7181exports["default"] = void 0; 7182 7183var _ApiClient = _interopRequireDefault(require("../ApiClient")); 7184 7185var _AwardAllOf = _interopRequireDefault(require("./AwardAllOf")); 7186 7187var _AwardStatus = _interopRequireDefault(require("./AwardStatus")); 7188 7189var _EntityType = _interopRequireDefault(require("./EntityType")); 7190 7191var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 7192 7193var _RewardTypeReduced = _interopRequireDefault(require("./RewardTypeReduced")); 7194 7195function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 7196 7197function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7198 7199function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7200 7201function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 7202 7203/** 7204 * The Award model module. 7205 * @module model/Award 7206 * @version 1.0.14 7207 */ 7208var Award = /*#__PURE__*/function () { 7209 /** 7210 * Constructs a new <code>Award</code>. 7211 * @alias module:model/Award 7212 * @implements module:model/AwardAllOf 7213 * @implements module:model/ModelDefault 7214 * @param id {String} Ziqni id of the model 7215 */ 7216 function Award(id) { 7217 _classCallCheck(this, Award); 7218 7219 _AwardAllOf["default"].initialize(this); 7220 7221 _ModelDefault["default"].initialize(this, id); 7222 7223 Award.initialize(this, id); 7224 } 7225 /** 7226 * Initializes the fields of this object. 7227 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 7228 * Only for internal use. 7229 */ 7230 7231 7232 _createClass(Award, null, [{ 7233 key: "initialize", 7234 value: function initialize(obj, id) { 7235 obj['id'] = id; 7236 } 7237 /** 7238 * Constructs a <code>Award</code> from a plain JavaScript object, optionally creating a new instance. 7239 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 7240 * @param {Object} data The plain JavaScript object bearing properties of interest. 7241 * @param {module:model/Award} obj Optional instance to populate. 7242 * @return {module:model/Award} The populated <code>Award</code> instance. 7243 */ 7244 7245 }, { 7246 key: "constructFromObject", 7247 value: function constructFromObject(data, obj) { 7248 if (data) { 7249 obj = obj || new Award(); 7250 7251 _AwardAllOf["default"].constructFromObject(data, obj); 7252 7253 _ModelDefault["default"].constructFromObject(data, obj); 7254 7255 if (data.hasOwnProperty('memberId')) { 7256 obj['memberId'] = _ApiClient["default"].convertToType(data['memberId'], 'String'); 7257 } 7258 7259 if (data.hasOwnProperty('rewardId')) { 7260 obj['rewardId'] = _ApiClient["default"].convertToType(data['rewardId'], 'String'); 7261 } 7262 7263 if (data.hasOwnProperty('rewardType')) { 7264 obj['rewardType'] = _RewardTypeReduced["default"].constructFromObject(data['rewardType']); 7265 } 7266 7267 if (data.hasOwnProperty('rewardRank')) { 7268 obj['rewardRank'] = _ApiClient["default"].convertToType(data['rewardRank'], 'String'); 7269 } 7270 7271 if (data.hasOwnProperty('rewardValue')) { 7272 obj['rewardValue'] = _ApiClient["default"].convertToType(data['rewardValue'], 'Number'); 7273 } 7274 7275 if (data.hasOwnProperty('delay')) { 7276 obj['delay'] = _ApiClient["default"].convertToType(data['delay'], 'Number'); 7277 } 7278 7279 if (data.hasOwnProperty('entityType')) { 7280 obj['entityType'] = _EntityType["default"].constructFromObject(data['entityType']); 7281 } 7282 7283 if (data.hasOwnProperty('entityId')) { 7284 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 7285 } 7286 7287 if (data.hasOwnProperty('pointInTime')) { 7288 obj['pointInTime'] = _ApiClient["default"].convertToType(data['pointInTime'], 'Date'); 7289 } 7290 7291 if (data.hasOwnProperty('period')) { 7292 obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Number'); 7293 } 7294 7295 if (data.hasOwnProperty('tags')) { 7296 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 7297 } 7298 7299 if (data.hasOwnProperty('metadata')) { 7300 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 7301 'String': 'String' 7302 }); 7303 } 7304 7305 if (data.hasOwnProperty('statusCode')) { 7306 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 7307 } 7308 7309 if (data.hasOwnProperty('constraints')) { 7310 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 7311 } 7312 7313 if (data.hasOwnProperty('claimed')) { 7314 obj['claimed'] = _ApiClient["default"].convertToType(data['claimed'], 'Boolean'); 7315 } 7316 7317 if (data.hasOwnProperty('status')) { 7318 obj['status'] = _AwardStatus["default"].constructFromObject(data['status']); 7319 } 7320 7321 if (data.hasOwnProperty('name')) { 7322 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 7323 } 7324 7325 if (data.hasOwnProperty('description')) { 7326 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 7327 } 7328 7329 if (data.hasOwnProperty('memberRefId')) { 7330 obj['memberRefId'] = _ApiClient["default"].convertToType(data['memberRefId'], 'String'); 7331 } 7332 7333 if (data.hasOwnProperty('id')) { 7334 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 7335 } 7336 7337 if (data.hasOwnProperty('spaceName')) { 7338 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 7339 } 7340 7341 if (data.hasOwnProperty('created')) { 7342 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 7343 } 7344 } 7345 7346 return obj; 7347 } 7348 }]); 7349 7350 return Award; 7351}(); 7352/** 7353 * A unique identifier of a Member 7354 * @member {String} memberId 7355 */ 7356 7357 7358Award.prototype['memberId'] = undefined; 7359/** 7360 * A unique identifier of a Reward 7361 * @member {String} rewardId 7362 */ 7363 7364Award.prototype['rewardId'] = undefined; 7365/** 7366 * @member {module:model/RewardTypeReduced} rewardType 7367 */ 7368 7369Award.prototype['rewardType'] = undefined; 7370/** 7371 * If used in the context of contest this will associate with the rank of the leaderboard 7372 * @member {String} rewardRank 7373 */ 7374 7375Award.prototype['rewardRank'] = undefined; 7376/** 7377 * Numerical value of the reward that will be issued based on the reward type 7378 * @member {Number} rewardValue 7379 */ 7380 7381Award.prototype['rewardValue'] = undefined; 7382/** 7383 * Delay of issuing a reward in minutes 7384 * @member {Number} delay 7385 */ 7386 7387Award.prototype['delay'] = undefined; 7388/** 7389 * @member {module:model/EntityType} entityType 7390 */ 7391 7392Award.prototype['entityType'] = undefined; 7393/** 7394 * The Id of the contest or achievement related to this Award. Dependant on entityType 7395 * @member {String} entityId 7396 */ 7397 7398Award.prototype['entityId'] = undefined; 7399/** 7400 * ISO8601 timestamp for when an Award is available until a specific point in t
7400ime. All records are stored in UTC time zone. * There can only be one time definition used for claim period either \"pointInTime\" or \"period\" 7401 * @member {Date} pointInTime 7402 */ 7403 7404Award.prototype['pointInTime'] = undefined; 7405/** 7406 * Claimable duration in minutes, this value will set the controls until when the award is claimable. * There can only be one time definition used for claim period either \"pointInTime\" or \"period\" 7407 * @member {Number} period 7408 */ 7409 7410Award.prototype['period'] = undefined; 7411/** 7412 * A list of Strings of groups that the reward belongs to. 7413 * @member {Array.<String>} tags 7414 */ 7415 7416Award.prototype['tags'] = undefined; 7417/** 7418 * The metadata associated with this award 7419 * @member {Object.<String, String>} metadata 7420 */ 7421 7422Award.prototype['metadata'] = undefined; 7423/** 7424 * The code of the award 7425 * @member {Number} statusCode 7426 */ 7427 7428Award.prototype['statusCode'] = undefined; 7429/** 7430 * Additional constraints, if the value is present it means the 7431 * @member {Array.<String>} constraints 7432 */ 7433 7434Award.prototype['constraints'] = undefined; 7435/** 7436 * Award is claimed. 7437 * @member {Boolean} claimed 7438 */ 7439 7440Award.prototype['claimed'] = undefined; 7441/** 7442 * @member {module:model/AwardStatus} status 7443 */ 7444 7445Award.prototype['status'] = undefined; 7446/** 7447 * name from reward 7448 * @member {String} name 7449 */ 7450 7451Award.prototype['name'] = undefined; 7452/** 7453 * Text limited description 7454 * @member {String} description 7455 */ 7456 7457Award.prototype['description'] = undefined; 7458/** 7459 * @member {String} memberRefId 7460 */ 7461 7462Award.prototype['memberRefId'] = undefined; 7463/** 7464 * Ziqni id of the model 7465 * @member {String} id 7466 */ 7467 7468Award.prototype['id'] = undefined; 7469/** 7470 * This is the space name which is linked to the account 7471 * @member {String} spaceName 7472 */ 7473 7474Award.prototype['spaceName'] = undefined; 7475/** 7476 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 7477 * @member {Date} created 7478 */ 7479 7480Award.prototype['created'] = undefined; // Implement AwardAllOf interface: 7481 7482/** 7483 * A unique identifier of a Member 7484 * @member {String} memberId 7485 */ 7486 7487_AwardAllOf["default"].prototype['memberId'] = undefined; 7488/** 7489 * A unique identifier of a Reward 7490 * @member {String} rewardId 7491 */ 7492 7493_AwardAllOf["default"].prototype['rewardId'] = undefined; 7494/** 7495 * @member {module:model/RewardTypeReduced} rewardType 7496 */ 7497 7498_AwardAllOf["default"].prototype['rewardType'] = undefined; 7499/** 7500 * If used in the context of contest this will associate with the rank of the leaderboard 7501 * @member {String} rewardRank 7502 */ 7503 7504_AwardAllOf["default"].prototype['rewardRank'] = undefined; 7505/** 7506 * Numerical value of the reward that will be issued based on the reward type 7507 * @member {Number} rewardValue 7508 */ 7509 7510_AwardAllOf["default"].prototype['rewardValue'] = undefined; 7511/** 7512 * Delay of issuing a reward in minutes 7513 * @member {Number} delay 7514 */ 7515 7516_AwardAllOf["default"].prototype['delay'] = undefined; 7517/** 7518 * @member {module:model/EntityType} entityType 7519 */ 7520 7521_AwardAllOf["default"].prototype['entityType'] = undefined; 7522/** 7523 * The Id of the contest or achievement related to this Award. Dependant on entityType 7524 * @member {String} entityId 7525 */ 7526 7527_AwardAllOf["default"].prototype['entityId'] = undefined; 7528/** 7529 * ISO8601 timestamp for when an Award is available until a specific point in time. All records are stored in UTC time zone. * There can only be one time definition used for claim period either \"pointInTime\" or \"period\" 7530 * @member {Date} pointInTime 7531 */ 7532 7533_AwardAllOf["default"].prototype['pointInTime'] = undefined; 7534/** 7535 * Claimable duration in minutes, this value will set the controls until when the award is claimable. * There can only be one time definition used for claim period either \"pointInTime\" or \"period\" 7536 * @member {Number} period 7537 */ 7538 7539_AwardAllOf["default"].prototype['period'] = undefined; 7540/** 7541 * A list of Strings of groups that the reward belongs to. 7542 * @member {Array.<String>} tags 7543 */ 7544 7545_AwardAllOf["default"].prototype['tags'] = undefined; 7546/** 7547 * The metadata associated with this award 7548 * @member {Object.<String, String>} metadata 7549 */ 7550 7551_AwardAllOf["default"].prototype['metadata'] = undefined; 7552/** 7553 * The code of the award 7554 * @member {Number} statusCode 7555 */ 7556 7557_AwardAllOf["default"].prototype['statusCode'] = undefined; 7558/** 7559 * Additional constraints, if the value is present it means the 7560 * @member {Array.<String>} constraints 7561 */ 7562 7563_AwardAllOf["default"].prototype['constraints'] = undefined; 7564/** 7565 * Award is claimed. 7566 * @member {Boolean} claimed 7567 */ 7568 7569_AwardAllOf["default"].prototype['claimed'] = undefined; 7570/** 7571 * @member {module:model/AwardStatus} status 7572 */ 7573 7574_AwardAllOf["default"].prototype['status'] = undefined; 7575/** 7576 * name from reward 7577 * @member {String} name 7578 */ 7579 7580_AwardAllOf["default"].prototype['name'] = undefined; 7581/** 7582 * Text limited description 7583 * @member {String} description 7584 */ 7585 7586_AwardAllOf["default"].prototype['description'] = undefined; 7587/** 7588 * @member {String} memberRefId 7589 */ 7590 7591_AwardAllOf["default"].prototype['memberRefId'] = undefined; // Implement ModelDefault interface: 7592 7593/** 7594 * Ziqni id of the model 7595 * @member {String} id 7596 */ 7597 7598_ModelDefault["default"].prototype['id'] = undefined; 7599/** 7600 * This is the space name which is linked to the account 7601 * @member {String} spaceName 7602 */ 7603 7604_ModelDefault["default"].prototype['spaceName'] = undefined; 7605/** 7606 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 7607 * @member {Date} created 7608 */ 7609 7610_ModelDefault["default"].prototype['created'] = undefined; 7611var _default = Award; 7612exports["default"] = _default; 7613},{"../ApiClient":3,"./AwardAllOf":33,"./AwardStatus":37,"./EntityType":73,"./ModelDefault":123,"./RewardTypeReduced":150}],33:[function(require,module,exports){ 7614"use strict"; 7615 7616Object.defineProperty(exports, "__esModule", { 7617 value: true 7618}); 7619exports["default"] = void 0; 7620 7621var _ApiClient = _interopRequireDefault(require("../ApiClient")); 7622 7623var _AwardStatus = _interopRequireDefault(require("./AwardStatus")); 7624 7625var _EntityType = _interopRequireDefault(require("./EntityType")); 7626 7627var _RewardTypeReduced = _interopRequireDefault(require("./RewardTypeReduced")); 7628 7629function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 7630 7631function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7632 7633function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7634 7635function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 7636 7637/** 7638 * The AwardAllOf model module. 7639 * @module model/AwardAllOf 7640 * @version 1.0.14 7641 */ 7642var AwardAllOf = /*#__PURE__*/function () { 7643 /** 7644 * Constructs a new <code>AwardAllOf</code>. 7645 * @alias module:model/AwardAllOf 7646 */ 7647 function AwardAllOf() { 7648 _classCallCheck(this, AwardAllOf); 7649 7650 AwardAllOf.initialize(this); 7651 } 7652 /** 7653 * Initializes the fields of this object. 7654 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 7655 * Only for internal use. 7656 */ 7657 7658 7659 _createClass(AwardAllOf, null, [{ 7660 key: "initialize", 7661 value: function initialize(obj) {} 7662 /** 7663 * Constructs a <code>AwardAllOf</code> from a plain JavaScript object, optionally creating a new instance. 7664 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 7665 * @param {Object} data The plain JavaScript object bearing properties of interest. 7666 * @param {module:model/AwardAllOf} obj Optional instance to populate. 7667 * @return {module:model/AwardAllOf} The populated <code>AwardAllOf</code> instance. 7668 */ 7669 7670 }, { 7671 key: "constructFromObject", 7672 value: function constructFromObject(data, obj) { 7673 if (data) { 7674 obj = obj || new AwardAllOf(); 7675 7676 if (data.hasOwnProperty('memberId')) { 7677 obj['memberId'] = _ApiClient["default"].convertToType(data['memberId'], 'String'); 7678 } 7679 7680 if (data.hasOwnProperty('rewardId')) { 7681 obj['rewardId'] = _ApiClient["default"].convertToType(data['rewardId'], 'String'); 7682 } 7683 7684 if (data.hasOwnProperty('rewardType')) { 7685 obj['rewardType'] = _RewardTypeReduced["default"].constructFromObject(data['rewardType']); 7686 } 7687 7688 if (data.hasOwnProperty('rewardRank')) { 7689 obj['rewardRank'] = _ApiClient["default"].convertToType(data['rewardRank'], 'String'); 7690 } 7691 7692 if (data.hasOwnProperty('rewardValue')) { 7693 obj['rewardValue'] = _ApiClient["default"].convertToType(data['rewardValue'], 'Number'); 7694 } 7695 7696 if (data.hasOwnProperty('delay')) { 7697 obj['delay'] = _ApiClient["default"].convertToType(data['delay'], 'Number'); 7698 } 7699 7700 if (data.hasOwnProperty('entityType')) { 7701 obj['entityType'] = _EntityType["default"].constructFromObject(data['entityType']); 7702 } 7703 7704 if (data.hasOwnProperty('entityId')) { 7705 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 7706 } 7707 7708 if (data.hasOwnProperty('pointInTime')) { 7709 obj['pointInTime'] = _ApiClient["default"].convertToType(data['pointInTime'], 'Date'); 7710 } 7711 7712 if (data.hasOwnProperty('period')) { 7713 obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Number'); 7714 } 7715 7716 if (data.hasOwnProperty('tags')) { 7717 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 7718 } 7719 7720 if (data.hasOwnProperty('metadata')) { 7721 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 7722 'String': 'String' 7723 }); 7724 } 7725 7726 if (data.hasOwnProperty('statusCode')) { 7727 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 7728 } 7729 7730 if (data.hasOwnProperty('constraints')) { 7731 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 7732 } 7733 7734 if (data.hasOwnProperty('claimed')) { 7735 obj['claimed'] = _ApiClient["default"].convertToType(data['claimed'], 'Boolean'); 7736 } 7737 7738 if (data.hasOwnProperty('status')) { 7739 obj['status'] = _AwardStatus["default"].constructFromObject(data['status']); 7740 } 7741 7742 if (data.hasOwnProperty('name')) { 7743 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 7744 } 7745 7746 if (data.hasOwnProperty('description')) { 7747 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 7748 } 7749 7750 if (data.hasOwnProperty('memberRefId')) { 7751 obj['memberRefId'] = _ApiClient["default"].convertToType(data['memberRefId'], 'String'); 7752 } 7753 } 7754 7755 return obj; 7756 } 7757 }]); 7758 7759 return AwardAllOf; 7760}(); 7761/** 7762 * A unique identifier of a Member 7763 * @member {String} memberId 7764 */ 7765 7766 7767AwardAllOf.prototype['memberId'] = undefined; 7768/** 7769 * A unique identifier of a Reward 7770 * @member {String} rewardId 7771 */ 7772 7773AwardAllOf.prototype['rewardId'] = undefined; 7774/** 7775 * @member {module:model/RewardTypeReduced} rewardType 7776 */ 7777 7778AwardAllOf.prototype['rewardType'] = undefined; 7779/** 7780 * If used in the context of contest this will associate with the rank of the leaderboard 7781 * @member {String} rewardRank 7782 */ 7783 7784AwardAllOf.prototype['rewardRank'] = undefined; 7785/** 7786 * Numerical value of the reward that will be issued based on the reward type 7787 * @member {Number} rewardValue 7788 */ 7789 7790AwardAllOf.prototype['rewardValue'] = undefined; 7791/** 7792 * Delay of issuing a reward in minutes 7793 * @member {Number} delay 7794 */ 7795 7796AwardAllOf.prototype['delay'] = undefined; 7797/** 7798 * @member {module:model/EntityType} entityType 7799 */ 7800 7801AwardAllOf.prototype['entityType'] = undefined; 7802/** 7803 * The Id of the contest or achievement related to this Award. Dependant on entityType 7804 * @member {String} entityId 7805 */ 7806 7807AwardAllOf.prototype['entityId'] = undefined; 7808/** 7809 * ISO8601 timestamp for when an Award is available until a specific point in t
7809ime. All records are stored in UTC time zone. * There can only be one time definition used for claim period either \"pointInTime\" or \"period\" 7810 * @member {Date} pointInTime 7811 */ 7812 7813AwardAllOf.prototype['pointInTime'] = undefined; 7814/** 7815 * Claimable duration in minutes, this value will set the controls until when the award is claimable. * There can only be one time definition used for claim period either \"pointInTime\" or \"period\" 7816 * @member {Number} period 7817 */ 7818 7819AwardAllOf.prototype['period'] = undefined; 7820/** 7821 * A list of Strings of groups that the reward belongs to. 7822 * @member {Array.<String>} tags 7823 */ 7824 7825AwardAllOf.prototype['tags'] = undefined; 7826/** 7827 * The metadata associated with this award 7828 * @member {Object.<String, String>} metadata 7829 */ 7830 7831AwardAllOf.prototype['metadata'] = undefined; 7832/** 7833 * The code of the award 7834 * @member {Number} statusCode 7835 */ 7836 7837AwardAllOf.prototype['statusCode'] = undefined; 7838/** 7839 * Additional constraints, if the value is present it means the 7840 * @member {Array.<String>} constraints 7841 */ 7842 7843AwardAllOf.prototype['constraints'] = undefined; 7844/** 7845 * Award is claimed. 7846 * @member {Boolean} claimed 7847 */ 7848 7849AwardAllOf.prototype['claimed'] = undefined; 7850/** 7851 * @member {module:model/AwardStatus} status 7852 */ 7853 7854AwardAllOf.prototype['status'] = undefined; 7855/** 7856 * name from reward 7857 * @member {String} name 7858 */ 7859 7860AwardAllOf.prototype['name'] = undefined; 7861/** 7862 * Text limited description 7863 * @member {String} description 7864 */ 7865 7866AwardAllOf.prototype['description'] = undefined; 7867/** 7868 * @member {String} memberRefId 7869 */ 7870 7871AwardAllOf.prototype['memberRefId'] = undefined; 7872var _default = AwardAllOf; 7873exports["default"] = _default; 7874},{"../ApiClient":3,"./AwardStatus":37,"./EntityType":73,"./RewardTypeReduced":150}],34:[function(require,module,exports){ 7875"use strict"; 7876 7877Object.defineProperty(exports, "__esModule", { 7878 value: true 7879}); 7880exports["default"] = void 0; 7881 7882var _ApiClient = _interopRequireDefault(require("../ApiClient")); 7883 7884var _DateRange = _interopRequireDefault(require("./DateRange")); 7885 7886var _NumberRange = _interopRequireDefault(require("./NumberRange")); 7887 7888var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 7889 7890function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 7891 7892function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 7893 7894function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 7895 7896function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 7897 7898/** 7899 * The AwardFilter model module. 7900 * @module model/AwardFilter 7901 * @version 1.0.14 7902 */ 7903var AwardFilter = /*#__PURE__*/function () { 7904 /** 7905 * Constructs a new <code>AwardFilter</code>. 7906 * @alias module:model/AwardFilter 7907 */ 7908 function AwardFilter() { 7909 _classCallCheck(this, AwardFilter); 7910 7911 AwardFilter.initialize(this); 7912 } 7913 /** 7914 * Initializes the fields of this object. 7915 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 7916 * Only for internal use. 7917 */ 7918 7919 7920 _createClass(AwardFilter, null, [{ 7921 key: "initialize", 7922 value: function initialize(obj) {} 7923 /** 7924 * Constructs a <code>AwardFilter</code> from a plain JavaScript object, optionally creating a new instance. 7925 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 7926 * @param {Object} data The plain JavaScript object bearing properties of interest. 7927 * @param {module:model/AwardFilter} obj Optional instance to populate. 7928 * @return {module:model/AwardFilter} The populated <code>AwardFilter</code> instance. 7929 */ 7930 7931 }, { 7932 key: "constructFromObject", 7933 value: function constructFromObject(data, obj) { 7934 if (data) { 7935 obj = obj || new AwardFilter(); 7936 7937 if (data.hasOwnProperty('productIds')) { 7938 obj['productIds'] = _ApiClient["default"].convertToType(data['productIds'], ['String']); 7939 } 7940 7941 if (data.hasOwnProperty('tags')) { 7942 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 7943 } 7944 7945 if (data.hasOwnProperty('ids')) { 7946 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 7947 } 7948 7949 if (data.hasOwnProperty('pointInTimeDateRange')) { 7950 obj['pointInTimeDateRange'] = _DateRange["default"].constructFromObject(data['pointInTimeDateRange']); 7951 } 7952 7953 if (data.hasOwnProperty('statusCode')) { 7954 obj['statusCode'] = _NumberRange["default"].constructFromObject(data['statusCode']); 7955 } 7956 7957 if (data.hasOwnProperty('sortBy')) { 7958 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 7959 } 7960 7961 if (data.hasOwnProperty('skip')) { 7962 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 7963 } 7964 7965 if (data.hasOwnProperty('limit')) { 7966 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 7967 } 7968 7969 if (data.hasOwnProperty('constraints')) { 7970 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 7971 } 7972 7973 if (data.hasOwnProperty('entityIds')) { 7974 obj['entityIds'] = _ApiClient["default"].convertToType(data['entityIds'], ['String']); 7975 } 7976 } 7977 7978 return obj; 7979 } 7980 }]); 7981 7982 return AwardFilter; 7983}(); 7984/** 7985 * @member {Array.<String>} productIds 7986 */ 7987 7988 7989AwardFilter.prototype['productIds'] = undefined; 7990/** 7991 * @member {Array.<String>} tags 7992 */ 7993 7994AwardFilter.prototype['tags'] = undefined; 7995/** 7996 * @member {Array.<String>} ids 7997 */ 7998 7999AwardFilter.prototype['ids'] = undefined; 8000/** 8001 * @member {module:model/DateRange} pointInTimeDateRange 8002 */ 8003 8004AwardFilter.prototype['pointInTimeDateRange'] = undefined; 8005/** 8006 * @member {module:model/NumberRange} statusCode 8007 */ 8008 8009AwardFilter.prototype['statusCode'] = undefined; 8010/** 8011 * @member {Array.<module:model/QuerySortBy>} sortBy 8012 */ 8013 8014AwardFilter.prototype['sortBy'] = undefined; 8015/** 8016 * @member {Number} skip 8017 */ 8018 8019AwardFilter.prototype['skip'] = undefined; 8020/** 8021 * @member {Number} limit 8022 */ 8023 8024AwardFilter.prototype['limit'] = undefined; 8025/** 8026 * @member {Array.<String>} constraints 8027 */ 8028 8029AwardFilter.prototype['constraints'] = undefined; 8030/** 8031 * Achievement, Contest or Competition 8032 * @member {Array.<String>} entityIds 8033 */ 8034 8035AwardFilter.prototype['entityIds'] = undefined; 8036var _default = AwardFilter; 8037exports["default"] = _default; 8038},{"../ApiClient":3,"./DateRange":58,"./NumberRange":124,"./QuerySortBy":141}],35:[function(require,module,exports){ 8039"use strict"; 8040 8041Object.defineProperty(exports, "__esModule", { 8042 value: true 8043}); 8044exports["default"] = void 0; 8045 8046var _ApiClient = _interopRequireDefault(require("../ApiClient")); 8047 8048var _AwardFilter = _interopRequireDefault(require("./AwardFilter")); 8049 8050function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 8051 8052function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8053 8054function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8055 8056function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 8057 8058/** 8059 * The AwardRequest model module. 8060 * @module model/AwardRequest 8061 * @version 1.0.14 8062 */ 8063var AwardRequest = /*#__PURE__*/function () { 8064 /** 8065 * Constructs a new <code>AwardRequest</code>. 8066 * @alias module:model/AwardRequest 8067 */ 8068 function AwardRequest() { 8069 _classCallCheck(this, AwardRequest); 8070 8071 AwardRequest.initialize(this); 8072 } 8073 /** 8074 * Initializes the fields of this object. 8075 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 8076 * Only for internal use. 8077 */ 8078 8079 8080 _createClass(AwardRequest, null, [{ 8081 key: "initialize", 8082 value: function initialize(obj) {} 8083 /** 8084 * Constructs a <code>AwardRequest</code> from a plain JavaScript object, optionally creating a new instance. 8085 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 8086 * @param {Object} data The plain JavaScript object bearing properties of interest. 8087 * @param {module:model/AwardRequest} obj Optional instance to populate. 8088 * @return {module:model/AwardRequest} The populated <code>AwardRequest</code> instance. 8089 */ 8090 8091 }, { 8092 key: "constructFromObject", 8093 value: function constructFromObject(data, obj) { 8094 if (data) { 8095 obj = obj || new AwardRequest(); 8096 8097 if (data.hasOwnProperty('awardFilter')) { 8098 obj['awardFilter'] = _AwardFilter["default"].constructFromObject(data['awardFilter']); 8099 } 8100 8101 if (data.hasOwnProperty('languageKey')) { 8102 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 8103 } 8104 8105 if (data.hasOwnProperty('currencyKey')) { 8106 obj['currencyKey'] = _ApiClient["default"].convertToType(data['currencyKey'], 'String'); 8107 } 8108 } 8109 8110 return obj; 8111 } 8112 }]); 8113 8114 return AwardRequest; 8115}(); 8116/** 8117 * @member {module:model/AwardFilter} awardFilter 8118 */ 8119 8120 8121AwardRequest.prototype['awardFilter'] = undefined; 8122/** 8123 * The language codes can be found in the settings/transalations section of the back office 8124 * @member {String} languageKey 8125 */ 8126 8127AwardRequest.prototype['languageKey'] = undefined; 8128/** 8129 * The UoM currency key to normalise the value to for presentation. Example; If the reward is in EUR and this value is set to USD then the value will be multiplied by 1.09387699997429 8130 * @member {String} currencyKey 8131 */ 8132 8133AwardRequest.prototype['currencyKey'] = undefined; 8134var _default = AwardRequest; 8135exports["default"] = _default; 8136},{"../ApiClient":3,"./AwardFilter":34}],36:[function(require,module,exports){ 8137"use strict"; 8138 8139Object.defineProperty(exports, "__esModule", { 8140 value: true 8141}); 8142exports["default"] = void 0; 8143 8144var _ApiClient = _interopRequireDefault(require("../ApiClient")); 8145 8146var _Award = _interopRequireDefault(require("./Award")); 8147 8148var _Error = _interopRequireDefault(require("./Error")); 8149 8150var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 8151 8152function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 8153 8154function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8155 8156function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8157 8158function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 8159 8160/** 8161 * The AwardResponse model module. 8162 * @module model/AwardResponse 8163 * @version 1.0.14 8164 */ 8165var AwardResponse = /*#__PURE__*/function () { 8166 /** 8167 * Constructs a new <code>AwardResponse</code>. 8168 * @alias module:model/AwardResponse 8169 */ 8170 function AwardResponse() { 8171 _classCallCheck(this, AwardResponse); 8172 8173 AwardResponse.initialize(this); 8174 } 8175 /** 8176 * Initializes the fields of this object. 8177 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 8178 * Only for internal use. 8179 */ 8180 8181 8182 _createClass(AwardResponse, null, [{ 8183 key: "initialize", 8184 value: function initialize(obj) {} 8185 /** 8186 * Constructs a <code>AwardResponse</code> from a plain JavaScript object, optionally creating a new instance. 8187 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 8188 * @param {Object} data The plain JavaScript object bearing properties of interest. 8189 * @param {module:model/AwardResponse} obj Optional instance to populate. 8190 * @return {module:model/AwardResponse} The populated <code>AwardResponse</code> instance. 8191 */ 8192 8193 }, { 8194 key: "constructFromObject", 8195 value: function constructFromObject(data, obj) { 8196 if (data) { 8197 obj = obj || new AwardResponse(); 8198 8199 if (data.hasOwnProperty('meta')) { 8200 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 8201 } 8202 8203 if (data.hasOwnProperty('data')) { 8204 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Award["default"]]); 8205 } 8206 8207 if (data.hasOwnProperty('errors')) { 8208 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 8209 } 8210 } 8211 8212 return obj; 8213 } 8214 }]); 8215 8216 return AwardResponse; 8217}(); 8218/** 8219 * @member {module:model/ResponseMeta} meta 8220 */ 8221 8222 8223AwardResponse.prototype['meta'] = undefined; 8224/** 8225 * @member {Array.<module:model/Award>} data 8226 */ 8227 8228AwardResponse.prototype['data'] = undefined; 8229/** 8230 * @member {Array.<module:model/Error>} errors 8231 */ 8232 8233AwardResponse.prototype['errors'] = undefined; 8234var _default = AwardResponse; 8235exports["default"] = _default; 8236},{"../ApiClient":3,"./Award":32,"./Error":74,"./ResponseMeta":144}],37:[function(require,module,exports){ 8237"use strict"; 8238 8239Object.defineProperty(exports, "__esModule", { 8240 value: true 8241}); 8242exports["default"] = void 0; 8243 8244var _ApiClient = _interopRequireDefault(require("../ApiClient")); 8245 8246function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 8247 8248function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8249 8250function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8251 8252function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 8253 8254function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 8255 8256/** 8257* Enum class AwardStatus. 8258* @enum {} 8259* @readonly 8260*/ 8261var AwardStatus = /*#__PURE__*/function () { 8262 function AwardStatus() { 8263 _classCallCheck(this, AwardStatus); 8264 8265 _defineProperty(this, "Unknown", "Unknown"); 8266 8267 _defineProperty(this, "Preparing", "Preparing"); 8268 8269 _defineProperty(this, "NotClaimed", "NotClaimed"); 8270 8271 _defineProperty(this, "Claimed", "Claimed"); 8272 8273 _defineProperty(this, "Expired", "Expired"); 8274 } 8275 8276 _createClass(AwardStatus, null, [{ 8277 key: "constructFromObject", 8278 value: 8279 /** 8280 * Returns a <code>AwardStatus</code> enum value from a Javascript object name. 8281 * @param {Object}
8281 data The plain JavaScript object containing the name of the enum value. 8282 * @return {module:model/AwardStatus} The enum <code>AwardStatus</code> value. 8283 */ 8284 function constructFromObject(object) { 8285 return object; 8286 } 8287 }]); 8288 8289 return AwardStatus; 8290}(); 8291 8292exports["default"] = AwardStatus; 8293},{"../ApiClient":3}],38:[function(require,module,exports){ 8294"use strict"; 8295 8296Object.defineProperty(exports, "__esModule", { 8297 value: true 8298}); 8299exports["default"] = void 0; 8300 8301var _ApiClient = _interopRequireDefault(require("../ApiClient")); 8302 8303function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 8304 8305function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8306 8307function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8308 8309function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 8310 8311/** 8312 * The CallbackEntry model module. 8313 * @module model/CallbackEntry 8314 * @version 1.0.14 8315 */ 8316var CallbackEntry = /*#__PURE__*/function () { 8317 /** 8318 * Constructs a new <code>CallbackEntry</code>. 8319 * @alias module:model/CallbackEntry 8320 * @param name {String} 8321 * @param constraints {Array.<String>} 8322 */ 8323 function CallbackEntry(name, constraints) { 8324 _classCallCheck(this, CallbackEntry); 8325 8326 CallbackEntry.initialize(this, name, constraints); 8327 } 8328 /** 8329 * Initializes the fields of this object. 8330 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 8331 * Only for internal use. 8332 */ 8333 8334 8335 _createClass(CallbackEntry, null, [{ 8336 key: "initialize", 8337 value: function initialize(obj, name, constraints) { 8338 obj['name'] = name; 8339 obj['constraints'] = constraints; 8340 } 8341 /** 8342 * Constructs a <code>CallbackEntry</code> from a plain JavaScript object, optionally creating a new instance. 8343 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 8344 * @param {Object} data The plain JavaScript object bearing properties of interest. 8345 * @param {module:model/CallbackEntry} obj Optional instance to populate. 8346 * @return {module:model/CallbackEntry} The populated <code>CallbackEntry</code> instance. 8347 */ 8348 8349 }, { 8350 key: "constructFromObject", 8351 value: function constructFromObject(data, obj) { 8352 if (data) { 8353 obj = obj || new CallbackEntry(); 8354 8355 if (data.hasOwnProperty('name')) { 8356 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 8357 } 8358 8359 if (data.hasOwnProperty('constraints')) { 8360 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 8361 } 8362 } 8363 8364 return obj; 8365 } 8366 }]); 8367 8368 return CallbackEntry; 8369}(); 8370/** 8371 * @member {String} name 8372 */ 8373 8374 8375CallbackEntry.prototype['name'] = undefined; 8376/** 8377 * @member {Array.<String>} constraints 8378 */ 8379 8380CallbackEntry.prototype['constraints'] = undefined; 8381var _default = CallbackEntry; 8382exports["default"] = _default; 8383},{"../ApiClient":3}],39:[function(require,module,exports){ 8384"use strict"; 8385 8386Object.defineProperty(exports, "__esModule", { 8387 value: true 8388}); 8389exports["default"] = void 0; 8390 8391var _ApiClient = _interopRequireDefault(require("../ApiClient")); 8392 8393var _CallbackEntry = _interopRequireDefault(require("./CallbackEntry")); 8394 8395function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 8396 8397function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8398 8399function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8400 8401function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 8402 8403/** 8404 * The CallbacksResponse model module. 8405 * @module model/CallbacksResponse 8406 * @version 1.0.14 8407 */ 8408var CallbacksResponse = /*#__PURE__*/function () { 8409 /** 8410 * Constructs a new <code>CallbacksResponse</code>. 8411 * @alias module:model/CallbacksResponse 8412 * @param callback {Array.<module:model/CallbackEntry>} 8413 */ 8414 function CallbacksResponse(callback) { 8415 _classCallCheck(this, CallbacksResponse); 8416 8417 CallbacksResponse.initialize(this, callback); 8418 } 8419 /** 8420 * Initializes the fields of this object. 8421 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 8422 * Only for internal use. 8423 */ 8424 8425 8426 _createClass(CallbacksResponse, null, [{ 8427 key: "initialize", 8428 value: function initialize(obj, callback) { 8429 obj['callback'] = callback; 8430 } 8431 /** 8432 * Constructs a <code>CallbacksResponse</code> from a plain JavaScript object, optionally creating a new instance. 8433 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 8434 * @param {Object} data The plain JavaScript object bearing properties of interest. 8435 * @param {module:model/CallbacksResponse} obj Optional instance to populate. 8436 * @return {module:model/CallbacksResponse} The populated <code>CallbacksResponse</code> instance. 8437 */ 8438 8439 }, { 8440 key: "constructFromObject", 8441 value: function constructFromObject(data, obj) { 8442 if (data) { 8443 obj = obj || new CallbacksResponse(); 8444 8445 if (data.hasOwnProperty('callback')) { 8446 obj['callback'] = _ApiClient["default"].convertToType(data['callback'], [_CallbackEntry["default"]]); 8447 } 8448 } 8449 8450 return obj; 8451 } 8452 }]); 8453 8454 return CallbacksResponse; 8455}(); 8456/** 8457 * @member {Array.<module:model/CallbackEntry>} callback 8458 */ 8459 8460 8461CallbacksResponse.prototype['callback'] = undefined; 8462var _default = CallbacksResponse; 8463exports["default"] = _default; 8464},{"../ApiClient":3,"./CallbackEntry":38}],40:[function(require,module,exports){ 8465"use strict"; 8466 8467Object.defineProperty(exports, "__esModule", { 8468 value: true 8469}); 8470exports["default"] = void 0; 8471 8472var _ApiClient = _interopRequireDefault(require("../ApiClient")); 8473 8474function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 8475 8476function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8477 8478function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8479 8480function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 8481 8482/** 8483 * The ClaimAwardRequest model module. 8484 * @module model/ClaimAwardRequest 8485 * @version 1.0.14 8486 */ 8487var ClaimAwardRequest = /*#__PURE__*/function () { 8488 /** 8489 * Constructs a new <code>ClaimAwardRequest</code>. 8490 * @alias module:model/ClaimAwardRequest 8491 */ 8492 function ClaimAwardRequest() { 8493 _classCallCheck(this, ClaimAwardRequest); 8494 8495 ClaimAwardRequest.initialize(this); 8496 } 8497 /** 8498 * Initializes the fields of this object. 8499 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 8500 * Only for internal use. 8501 */ 8502 8503 8504 _createClass(ClaimAwardRequest, null, [{ 8505 key: "initialize", 8506 value: function initialize(obj) {} 8507 /** 8508 * Constructs a <code>ClaimAwardRequest</code> from a plain JavaScript object, optionally creating a new instance. 8509 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 8510 * @param {Object} data The plain JavaScript object bearing properties of interest. 8511 * @param {module:model/ClaimAwardRequest} obj Optional instance to populate. 8512 * @return {module:model/ClaimAwardRequest} The populated <code>ClaimAwardRequest</code> instance. 8513 */ 8514 8515 }, { 8516 key: "constructFromObject", 8517 value: function constructFromObject(data, obj) { 8518 if (data) { 8519 obj = obj || new ClaimAwardRequest(); 8520 8521 if (data.hasOwnProperty('languageKey')) { 8522 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 8523 } 8524 8525 if (data.hasOwnProperty('awardIds')) { 8526 obj['awardIds'] = _ApiClient["default"].convertToType(data['awardIds'], ['String']); 8527 } 8528 } 8529 8530 return obj; 8531 } 8532 }]); 8533 8534 return ClaimAwardRequest; 8535}(); 8536/** 8537 * The language codes can be found in the settings/transalations section of the back office 8538 * @member {String} languageKey 8539 */ 8540 8541 8542ClaimAwardRequest.prototype['languageKey'] = undefined; 8543/** 8544 * @member {Array.<String>} awardIds 8545 */ 8546 8547ClaimAwardRequest.prototype['awardIds'] = undefined; 8548var _default = ClaimAwardRequest; 8549exports["default"] = _default; 8550},{"../ApiClient":3}],41:[function(require,module,exports){ 8551"use strict"; 8552 8553Object.defineProperty(exports, "__esModule", { 8554 value: true 8555}); 8556exports["default"] = void 0; 8557 8558var _ApiClient = _interopRequireDefault(require("../ApiClient")); 8559 8560var _CompetitionAllOf = _interopRequireDefault(require("./CompetitionAllOf")); 8561 8562var _CompetitionStatus = _interopRequireDefault(require("./CompetitionStatus")); 8563 8564var _CompetitionType = _interopRequireDefault(require("./CompetitionType")); 8565 8566var _DependantOn = _interopRequireDefault(require("./DependantOn")); 8567 8568var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 8569 8570var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 8571 8572var _ProductReduced = _interopRequireDefault(require("./ProductReduced")); 8573 8574function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 8575 8576function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 8577 8578function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 8579 8580function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 8581 8582/** 8583 * The Competition model module. 8584 * @module model/Competition 8585 * @version 1.0.14 8586 */ 8587var Competition = /*#__PURE__*/function () { 8588 /** 8589 * Constructs a new <code>Competition</code>. 8590 * @alias module:model/Competition 8591 * @implements module:model/CompetitionAllOf 8592 * @implements module:model/ModelDefault 8593 * @implements module:model/OptionalModelFields 8594 * @param id {String} Ziqni id of the model 8595 */ 8596 function Competition(id) { 8597 _classCallCheck(this, Competition); 8598 8599 _CompetitionAllOf["default"].initialize(this); 8600 8601 _ModelDefault["default"].initialize(this, id); 8602 8603 _OptionalModelFields["default"].initialize(this); 8604 8605 Competition.initialize(this, id); 8606 } 8607 /** 8608 * Initializes the fields of this object. 8609 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 8610 * Only for internal use. 8611 */ 8612 8613 8614 _createClass(Competition, null, [{ 8615 key: "initialize", 8616 value: function initialize(obj, id) { 8617 obj['id'] = id; 8618 } 8619 /** 8620 * Constructs a <code>Competition</code> from a plain JavaScript object, optionally creating a new instance. 8621 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 8622 * @param {Object} data The plain JavaScript object bearing properties of interest. 8623 * @param {module:model/Competition} obj Optional instance to populate. 8624 * @return {module:model/Competition} The populated <code>Competition</code> instance. 8625 */ 8626 8627 }, { 8628 key: "constructFromObject", 8629 value: function constructFromObject(data, obj) { 8630 if (data) { 8631 obj = obj || new Competition(); 8632 8633 _CompetitionAllOf["default"].constructFromObject(data, obj); 8634 8635 _ModelDefault["default"].constructFromObject(data, obj); 8636 8637 _OptionalModelFields["default"].constructFromObject(data, obj); 8638 8639 if (data.hasOwnProperty('competitionType')) { 8640 obj['competitionType'] = _CompetitionType["default"].constructFromObject(data['competitionType']); 8641 } 8642 8643 if (data.hasOwnProperty('numberOfRounds')) { 8644 obj['numberOfRounds'] = _ApiClient["default"].convertToType(data['numberOfRounds'], 'Number'); 8645 } 8646 8647 if (data.hasOwnProperty('numberOfGroupStages')) { 8648 obj['numberOfGroupStages'] = _ApiClient["default"].convertToType(data['numberOfGroupStages'], 'Number'); 8649 } 8650 8651 if (data.hasOwnProperty('maxNumberOfEntrants')) { 8652 obj['maxNumberOfEntrants'] = _ApiClient["default"].convertToType(data['maxNumberOfEntrants'], 'Number'); 8653 } 8654 8655 if (data.hasOwnProperty('minNumberOfEntrants')) { 8656 obj['minNumberOfEntrants'] = _ApiClient["default"].convertToType(data['minNumberOfEntrants'], 'Number'); 8657 } 8658 8659 if (data.hasOwnProperty('name')) { 8660 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 8661 } 8662 8663 if (data.hasOwnProperty('description')) { 8664 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 8665 } 8666 8667 if (data.hasOwnProperty('termsAndConditions')) { 8668 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 8669 } 8670 8671 if (data.hasOwnProperty('entrantMemberType')) { 8672 obj['entrantMemberType'] = _ApiClient["default"].convertToType(data['entrantMemberType'], 'String'); 8673 } 8674 8675 if (data.hasOwnProperty('scheduledStartDate')) { 8676 obj['scheduledStartDate'] = _ApiClient["default"].convertToType(data['scheduledStartDate'], 'Date'); 8677 } 8678 8679 if (data.hasOwnProperty('scheduledEndDate')) { 8680 obj['scheduledEndDate'] = _ApiClient["default"].convertToType(data['scheduledEndDate'], 'Date'); 8681 } 8682 8683 if (data.hasOwnProperty('actualStartDate')) { 8684 obj['actualStartDate'] = _ApiClient["default"].convertToType(data['actualStartDate'], 'Date'); 8685 } 8686 8687 if (data.hasOwnProperty('actualEndDate')) { 8688 obj['actualEndDate'] = _ApiClient["default"].convertToType(data['actualEndDate'], 'Date'); 8689 } 8690 8691 if (data.hasOwnProperty('status')) { 8692 obj['status'] = _CompetitionStatus["default"].constructFromObject(data['status']); 8693 } 8694 8695 if (data.hasOwnProperty('statusCode')) { 8696 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 8697 } 8698 8699 if (data.hasOwnProperty('constraints')) { 8700 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 8701 } 8702 8703 if (data.hasOwnProperty('products')) { 8704 obj['products'] = _ApiClient["default"].convertToType(data['products'], [_ProductReduced["default"]]); 8705 } 8706 8707 if (data.hasOwnProperty('memberTagsFilter')) { 8708 obj['memberTagsFilter'] = _DependantOn["defa
8708ult"].constructFromObject(data['memberTagsFilter']); 8709 } 8710 8711 if (data.hasOwnProperty('productTagsFilter')) { 8712 obj['productTagsFilter'] = _DependantOn["default"].constructFromObject(data['productTagsFilter']); 8713 } 8714 8715 if (data.hasOwnProperty('bannerLink')) { 8716 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 8717 } 8718 8719 if (data.hasOwnProperty('bannerHighResolutionLink')) { 8720 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 8721 } 8722 8723 if (data.hasOwnProperty('bannerLowResolutionLink')) { 8724 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 8725 } 8726 8727 if (data.hasOwnProperty('iconLink')) { 8728 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 8729 } 8730 8731 if (data.hasOwnProperty('id')) { 8732 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 8733 } 8734 8735 if (data.hasOwnProperty('spaceName')) { 8736 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 8737 } 8738 8739 if (data.hasOwnProperty('created')) { 8740 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 8741 } 8742 8743 if (data.hasOwnProperty('customFields')) { 8744 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 8745 'String': Object 8746 }); 8747 } 8748 8749 if (data.hasOwnProperty('tags')) { 8750 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 8751 } 8752 8753 if (data.hasOwnProperty('metadata')) { 8754 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 8755 'String': 'String' 8756 }); 8757 } 8758 } 8759 8760 return obj; 8761 } 8762 }]); 8763 8764 return Competition; 8765}(); 8766/** 8767 * @member {module:model/CompetitionType} competitionType 8768 */ 8769 8770 8771Competition.prototype['competitionType'] = undefined; 8772/** 8773 * Number of rounds to be played in a competition 8774 * @member {Number} numberOfRounds 8775 */ 8776 8777Competition.prototype['numberOfRounds'] = undefined; 8778/** 8779 * Number of group stages 8780 * @member {Number} numberOfGroupStages 8781 */ 8782 8783Competition.prototype['numberOfGroupStages'] = undefined; 8784/** 8785 * Maximum number of partiipants allowed in a competition 8786 * @member {Number} maxNumberOfEntrants 8787 */ 8788 8789Competition.prototype['maxNumberOfEntrants'] = undefined; 8790/** 8791 * Maximum number of partiipants allowed in a competition 8792 * @member {Number} minNumberOfEntrants 8793 */ 8794 8795Competition.prototype['minNumberOfEntrants'] = undefined; 8796/** 8797 * @member {String} name 8798 */ 8799 8800Competition.prototype['name'] = undefined; 8801/** 8802 * @member {String} description 8803 */ 8804 8805Competition.prototype['description'] = undefined; 8806/** 8807 * @member {String} termsAndConditions 8808 */ 8809 8810Competition.prototype['termsAndConditions'] = undefined; 8811/** 8812 * @member {String} entrantMemberType 8813 */ 8814 8815Competition.prototype['entrantMemberType'] = undefined; 8816/** 8817 * ISO8601 timestamp for when a Competition should start. All records are stored in UTC time zone 8818 * @member {Date} scheduledStartDate 8819 */ 8820 8821Competition.prototype['scheduledStartDate'] = undefined; 8822/** 8823 * ISO8601 timestamp for when a Competition should end. All records are stored in UTC time zone 8824 * @member {Date} scheduledEndDate 8825 */ 8826 8827Competition.prototype['scheduledEndDate'] = undefined; 8828/** 8829 * ISO8601 timestamp for when a Competition started. All records are stored in UTC time zone 8830 * @member {Date} actualStartDate 8831 */ 8832 8833Competition.prototype['actualStartDate'] = undefined; 8834/** 8835 * ISO8601 timestamp for when a Competition ended. All records are stored in UTC time zone 8836 * @member {Date} actualEndDate 8837 */ 8838 8839Competition.prototype['actualEndDate'] = undefined; 8840/** 8841 * @member {module:model/CompetitionStatus} status 8842 */ 8843 8844Competition.prototype['status'] = undefined; 8845/** 8846 * The code of the competition 8847 * @member {Number} statusCode 8848 */ 8849 8850Competition.prototype['statusCode'] = undefined; 8851/** 8852 * Additional constraints 8853 * @member {Array.<String>} constraints 8854 */ 8855 8856Competition.prototype['constraints'] = undefined; 8857/** 8858 * If individual product were selected then they will be listed here. If the proproduct tags filter was used then this field will be empty and the productTagsFilter will be populated. 8859 * @member {Array.<module:model/ProductReduced>} products 8860 */ 8861 8862Competition.prototype['products'] = undefined; 8863/** 8864 * @member {module:model/DependantOn} memberTagsFilter 8865 */ 8866 8867Competition.prototype['memberTagsFilter'] = undefined; 8868/** 8869 * @member {module:model/DependantOn} productTagsFilter 8870 */ 8871 8872Competition.prototype['productTagsFilter'] = undefined; 8873/** 8874 * Link to the banner 8875 * @member {String} bannerLink 8876 */ 8877 8878Competition.prototype['bannerLink'] = undefined; 8879/** 8880 * Link to the bannerHighResolution 8881 * @member {String} bannerHighResolutionLink 8882 */ 8883 8884Competition.prototype['bannerHighResolutionLink'] = undefined; 8885/** 8886 * Link to the bannerLowResolution 8887 * @member {String} bannerLowResolutionLink 8888 */ 8889 8890Competition.prototype['bannerLowResolutionLink'] = undefined; 8891/** 8892 * Link to the icon 8893 * @member {String} iconLink 8894 */ 8895 8896Competition.prototype['iconLink'] = undefined; 8897/** 8898 * Ziqni id of the model 8899 * @member {String} id 8900 */ 8901 8902Competition.prototype['id'] = undefined; 8903/** 8904 * This is the space name which is linked to the account 8905 * @member {String} spaceName 8906 */ 8907 8908Competition.prototype['spaceName'] = undefined; 8909/** 8910 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 8911 * @member {Date} created 8912 */ 8913 8914Competition.prototype['created'] = undefined; 8915/** 8916 * @member {Object.<String, Object>} customFields 8917 */ 8918 8919Competition.prototype['customFields'] = undefined; 8920/** 8921 * A list of id's used to tag models 8922 * @member {Array.<String>} tags 8923 */ 8924 8925Competition.prototype['tags'] = undefined; 8926/** 8927 * @member {Object.<String, String>} metadata 8928 */ 8929 8930Competition.prototype['metadata'] = undefined; // Implement CompetitionAllOf interface: 8931 8932/** 8933 * @member {module:model/CompetitionType} competitionType 8934 */ 8935 8936_CompetitionAllOf["default"].prototype['competitionType'] = undefined; 8937/** 8938 * Number of rounds to be played in a competition 8939 * @member {Number} numberOfRounds 8940 */ 8941 8942_CompetitionAllOf["default"].prototype['numberOfRounds'] = undefined; 8943/** 8944 * Number of group stages 8945 * @member {Number} numberOfGroupStages 8946 */ 8947 8948_CompetitionAllOf["default"].prototype['numberOfGroupStages'] = undefined; 8949/** 8950 * Maximum number of partiipants allowed in a competition 8951 * @member {Number} maxNumberOfEntrants 8952 */ 8953 8954_CompetitionAllOf["default"].prototype['maxNumberOfEntrants'] = undefined; 8955/** 8956 * Maximum number of partiipants allowed in a competition 8957 * @member {Number} minNumberOfEntrants 8958 */ 8959 8960_CompetitionAllOf["default"].prototype['minNumberOfEntrants'] = undefined; 8961/** 8962 * @member {String} name 8963 */ 8964 8965_CompetitionAllOf["default"].prototype['name'] = undefined; 8966/** 8967 * @member {String} description 8968 */ 8969 8970_CompetitionAllOf["default"].prototype['description'] = undefined; 8971/** 8972 * @member {String} termsAndConditions 8973 */ 8974 8975_CompetitionAllOf["default"].prototype['termsAndConditions'] = undefined; 8976/** 8977 * @member {String} entrantMemberType 8978 */ 8979 8980_CompetitionAllOf["default"].prototype['entrantMemberType'] = undefined; 8981/** 8982 * ISO8601 timestamp for when a Competition should start. All records are stored in UTC time zone 8983 * @member {Date} scheduledStartDate 8984 */ 8985 8986_CompetitionAllOf["default"].prototype['scheduledStartDate'] = undefined; 8987/** 8988 * ISO8601 timestamp for when a Competition should end. All records are stored in UTC time zone 8989 * @member {Date} scheduledEndDate 8990 */ 8991 8992_CompetitionAllOf["default"].prototype['scheduledEndDate'] = undefined; 8993/** 8994 * ISO8601 timestamp for when a Competition started. All records are stored in UTC time zone 8995 * @member {Date} actualStartDate 8996 */ 8997 8998_CompetitionAllOf["default"].prototype['actualStartDate'] = undefined; 8999/** 9000 * ISO8601 timestamp for when a Competition ended. All records are stored in UTC time zone 9001 * @member {Date} actualEndDate 9002 */ 9003 9004_CompetitionAllOf["default"].prototype['actualEndDate'] = undefined; 9005/** 9006 * @member {module:model/CompetitionStatus} status 9007 */ 9008 9009_CompetitionAllOf["default"].prototype['status'] = undefined; 9010/** 9011 * The code of the competition 9012 * @member {Number} statusCode 9013 */ 9014 9015_CompetitionAllOf["default"].prototype['statusCode'] = undefined; 9016/** 9017 * Additional constraints 9018 * @member {Array.<String>} constraints 9019 */ 9020 9021_CompetitionAllOf["default"].prototype['constraints'] = undefined; 9022/** 9023 * If individual product were selected then they will be listed here. If the proproduct tags filter was used then this field will be empty and the productTagsFilter will be populated. 9024 * @member {Array.<module:model/ProductReduced>} products 9025 */ 9026 9027_CompetitionAllOf["default"].prototype['products'] = undefined; 9028/** 9029 * @member {module:model/DependantOn} memberTagsFilter 9030 */ 9031 9032_CompetitionAllOf["default"].prototype['memberTagsFilter'] = undefined; 9033/** 9034 * @member {module:model/DependantOn} productTagsFilter 9035 */ 9036 9037_CompetitionAllOf["default"].prototype['productTagsFilter'] = undefined; 9038/** 9039 * Link to the banner 9040 * @member {String} bannerLink 9041 */ 9042 9043_CompetitionAllOf["default"].prototype['bannerLink'] = undefined; 9044/** 9045 * Link to the bannerHighResolution 9046 * @member {String} bannerHighResolutionLink 9047 */ 9048 9049_CompetitionAllOf["default"].prototype['bannerHighResolutionLink'] = undefined; 9050/** 9051 * Link to the bannerLowResolution 9052 * @member {String} bannerLowResolutionLink 9053 */ 9054 9055_CompetitionAllOf["default"].prototype['bannerLowResolutionLink'] = undefined; 9056/** 9057 * Link to the icon 9058 * @member {String} iconLink 9059 */ 9060 9061_CompetitionAllOf["default"].prototype['iconLink'] = undefined; // Implement ModelDefault interface: 9062 9063/** 9064 * Ziqni id of the model 9065 * @member {String} id 9066 */ 9067 9068_ModelDefault["default"].prototype['id'] = undefined; 9069/** 9070 * This is the space name which is linked to the account 9071 * @member {String} spaceName 9072 */ 9073 9074_ModelDefault["default"].prototype['spaceName'] = undefined; 9075/** 9076 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 9077 * @member {Date} created 9078 */ 9079 9080_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 9081 9082/** 9083 * @member {Object.<String, Object>} customFields 9084 */ 9085 9086_OptionalModelFields["default"].prototype['customFields'] = undefined; 9087/** 9088 * A list of id's used to tag models 9089 * @member {Array.<String>} tags 9090 */ 9091 9092_OptionalModelFields["default"].prototype['tags'] = undefined; 9093/** 9094 * @member {Object.<String, String>} metadata 9095 */ 9096 9097_OptionalModelFields["default"].prototype['metadata'] = undefined; 9098var _default = Competition; 9099exports["default"] = _default; 9100},{"../ApiClient":3,"./CompetitionAllOf":42,"./CompetitionStatus":47,"./CompetitionType":48,"./DependantOn":60,"./ModelDefault":123,"./OptionalModelFields":130,"./ProductReduced":135}],42:[function(require,module,exports){ 9101"use strict"; 9102 9103Object.defineProperty(exports, "__esModule", { 9104 value: true 9105}); 9106exports["default"] = void 0; 9107 9108var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9109 9110var _CompetitionStatus = _interopRequireDefault(require("./CompetitionStatus")); 9111 9112var _CompetitionType = _interopRequireDefault(require("./CompetitionType")); 9113 9114var _DependantOn = _interopRequireDefault(require("./DependantOn")); 9115 9116var _ProductReduced = _interopRequireDefault(require("./ProductReduced")); 9117 9118function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9119 9120function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9121 9122function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9123 9124function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9125 9126/** 9127 * The CompetitionAllOf model module. 9128 * @module model/CompetitionAllOf 9129 * @version 1.0.14 9130 */ 9131var CompetitionAllOf = /*#__PURE__*/function () { 9132 /** 9133 * Constructs a new <code>CompetitionAllOf</code>. 9134 * @alias module:model/CompetitionAllOf 9135 */ 9136 function CompetitionAllOf() { 9137 _classCallCheck(this, CompetitionAllOf); 9138 9139 CompetitionAllOf.initialize(this); 9140 } 9141 /** 9142 * Initializes the fields of this object. 9143 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 9144 * Only for internal use. 9145 */ 9146 9147 9148 _createClass(CompetitionAllOf, null, [{ 9149 key: "initialize", 9150 value: function initialize(obj) {} 9151 /** 9152 * Constructs a <code>CompetitionAllOf</code> from a plain JavaScript object, optionally creating a new instance. 9153 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 9154 * @param {Object} data The plain JavaScript object bearing properties of interest. 9155 * @param {module:model/CompetitionAllOf} obj Optional instance to populate. 9156 * @return {module:model/CompetitionAllOf} The populated <code>CompetitionAllOf</code> instance. 9157 */ 9158 9159 }, { 9160 key: "constructFromObject", 9161 value: function constructFromObject(data, obj) { 9162 if (data) { 9163 obj = obj || new CompetitionAllOf(); 9164 9165 if (data.hasOwnProperty('competitionType')) { 9166 obj['competitionType'] = _CompetitionType["default"].constructFromObject(data['competitionType']); 9167 } 9168 9169 if (data.hasOwnProperty('numberOfRounds')) { 9170 obj['numberOfRounds'] = _ApiClient["default"].convertToType(data['numberOfRounds'], 'Number'); 9171 } 9172 9173 if (data.hasOwnProperty('numberOfGroupStages')) { 9174 obj['numberOfGroupStages'] = _ApiClient["default"].convertToType(data['numberOfGroupStages'], 'Number'); 9175 } 9176 9177 if (data.hasOwnProperty('maxNumberOfEntrants')) { 9178 obj['maxNumberOfEntrants'] = _ApiClient["default"].convertToType(data['maxNumberOfEntrants'], 'Number'); 9179 } 9180 9181 if (data.hasOwnProperty('minNumberOfEntrants')) { 9182 obj['minNumberOfEntrants'] = _ApiClient["default"].convertToType(data['minNumberOfEntrants'], 'Number'); 9183 } 9184 9185 if (data.hasOwnProperty('name')) { 9186 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 9187 } 9188 9189 if (data.hasOwnProperty('description')) { 9190 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 9191 } 9192 9193 if (data.hasOwnProperty('termsAndConditions')) { 9194 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 9195 } 9196 9197 if (data.hasOwnProperty('entrantMemberType')) { 9198 obj['entrantMemberType'] = _ApiClient["default"].convertToType(data['entrantMemberType'], 'String'); 9199 } 9200 9201 if (data.hasOwnProperty('scheduledStartDate')) { 9202 obj['scheduledStartDate'] = _ApiClient["default"].convertToType(data['scheduledStartDate'], 'Date'); 9203 } 9204 9205 if (data.hasOwnProperty('scheduledEndDate')) { 9206 obj['scheduledEndDate'] = _ApiClient["default"].convertToType(data['scheduledEndDate'], 'Date'); 9207 } 9208 9209 if (data.hasOwnProperty('actualStartDate')) { 9210 obj['actualStartDate'] = _ApiClient["default"].convertToType(data['actualStartDate'], 'Date'); 9211 } 9212 9213 if (data.hasOwnProperty('actualEndDate')) { 9214 obj['actualEndDate'] = _ApiClient["default"].convertToType(data['actualEndDate'], 'Date'); 9215 } 9216 9217 if (data.hasOwnProperty('status')) { 9218 obj['status'] = _CompetitionStatus["default"].constructFromObject(data['status']); 9219 } 9220 9221 if (data.hasOwnProperty('statusCode')) { 9222 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 9223 } 9224 9225 if (data.hasOwnProperty('constraints')) { 9226 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 9227 } 9228 9229 if (data.hasOwnProperty('produc
9229ts')) { 9230 obj['products'] = _ApiClient["default"].convertToType(data['products'], [_ProductReduced["default"]]); 9231 } 9232 9233 if (data.hasOwnProperty('memberTagsFilter')) { 9234 obj['memberTagsFilter'] = _DependantOn["default"].constructFromObject(data['memberTagsFilter']); 9235 } 9236 9237 if (data.hasOwnProperty('productTagsFilter')) { 9238 obj['productTagsFilter'] = _DependantOn["default"].constructFromObject(data['productTagsFilter']); 9239 } 9240 9241 if (data.hasOwnProperty('bannerLink')) { 9242 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 9243 } 9244 9245 if (data.hasOwnProperty('bannerHighResolutionLink')) { 9246 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 9247 } 9248 9249 if (data.hasOwnProperty('bannerLowResolutionLink')) { 9250 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 9251 } 9252 9253 if (data.hasOwnProperty('iconLink')) { 9254 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 9255 } 9256 } 9257 9258 return obj; 9259 } 9260 }]); 9261 9262 return CompetitionAllOf; 9263}(); 9264/** 9265 * @member {module:model/CompetitionType} competitionType 9266 */ 9267 9268 9269CompetitionAllOf.prototype['competitionType'] = undefined; 9270/** 9271 * Number of rounds to be played in a competition 9272 * @member {Number} numberOfRounds 9273 */ 9274 9275CompetitionAllOf.prototype['numberOfRounds'] = undefined; 9276/** 9277 * Number of group stages 9278 * @member {Number} numberOfGroupStages 9279 */ 9280 9281CompetitionAllOf.prototype['numberOfGroupStages'] = undefined; 9282/** 9283 * Maximum number of partiipants allowed in a competition 9284 * @member {Number} maxNumberOfEntrants 9285 */ 9286 9287CompetitionAllOf.prototype['maxNumberOfEntrants'] = undefined; 9288/** 9289 * Maximum number of partiipants allowed in a competition 9290 * @member {Number} minNumberOfEntrants 9291 */ 9292 9293CompetitionAllOf.prototype['minNumberOfEntrants'] = undefined; 9294/** 9295 * @member {String} name 9296 */ 9297 9298CompetitionAllOf.prototype['name'] = undefined; 9299/** 9300 * @member {String} description 9301 */ 9302 9303CompetitionAllOf.prototype['description'] = undefined; 9304/** 9305 * @member {String} termsAndConditions 9306 */ 9307 9308CompetitionAllOf.prototype['termsAndConditions'] = undefined; 9309/** 9310 * @member {String} entrantMemberType 9311 */ 9312 9313CompetitionAllOf.prototype['entrantMemberType'] = undefined; 9314/** 9315 * ISO8601 timestamp for when a Competition should start. All records are stored in UTC time zone 9316 * @member {Date} scheduledStartDate 9317 */ 9318 9319CompetitionAllOf.prototype['scheduledStartDate'] = undefined; 9320/** 9321 * ISO8601 timestamp for when a Competition should end. All records are stored in UTC time zone 9322 * @member {Date} scheduledEndDate 9323 */ 9324 9325CompetitionAllOf.prototype['scheduledEndDate'] = undefined; 9326/** 9327 * ISO8601 timestamp for when a Competition started. All records are stored in UTC time zone 9328 * @member {Date} actualStartDate 9329 */ 9330 9331CompetitionAllOf.prototype['actualStartDate'] = undefined; 9332/** 9333 * ISO8601 timestamp for when a Competition ended. All records are stored in UTC time zone 9334 * @member {Date} actualEndDate 9335 */ 9336 9337CompetitionAllOf.prototype['actualEndDate'] = undefined; 9338/** 9339 * @member {module:model/CompetitionStatus} status 9340 */ 9341 9342CompetitionAllOf.prototype['status'] = undefined; 9343/** 9344 * The code of the competition 9345 * @member {Number} statusCode 9346 */ 9347 9348CompetitionAllOf.prototype['statusCode'] = undefined; 9349/** 9350 * Additional constraints 9351 * @member {Array.<String>} constraints 9352 */ 9353 9354CompetitionAllOf.prototype['constraints'] = undefined; 9355/** 9356 * If individual product were selected then they will be listed here. If the proproduct tags filter was used then this field will be empty and the productTagsFilter will be populated. 9357 * @member {Array.<module:model/ProductReduced>} products 9358 */ 9359 9360CompetitionAllOf.prototype['products'] = undefined; 9361/** 9362 * @member {module:model/DependantOn} memberTagsFilter 9363 */ 9364 9365CompetitionAllOf.prototype['memberTagsFilter'] = undefined; 9366/** 9367 * @member {module:model/DependantOn} productTagsFilter 9368 */ 9369 9370CompetitionAllOf.prototype['productTagsFilter'] = undefined; 9371/** 9372 * Link to the banner 9373 * @member {String} bannerLink 9374 */ 9375 9376CompetitionAllOf.prototype['bannerLink'] = undefined; 9377/** 9378 * Link to the bannerHighResolution 9379 * @member {String} bannerHighResolutionLink 9380 */ 9381 9382CompetitionAllOf.prototype['bannerHighResolutionLink'] = undefined; 9383/** 9384 * Link to the bannerLowResolution 9385 * @member {String} bannerLowResolutionLink 9386 */ 9387 9388CompetitionAllOf.prototype['bannerLowResolutionLink'] = undefined; 9389/** 9390 * Link to the icon 9391 * @member {String} iconLink 9392 */ 9393 9394CompetitionAllOf.prototype['iconLink'] = undefined; 9395var _default = CompetitionAllOf; 9396exports["default"] = _default; 9397},{"../ApiClient":3,"./CompetitionStatus":47,"./CompetitionType":48,"./DependantOn":60,"./ProductReduced":135}],43:[function(require,module,exports){ 9398"use strict"; 9399 9400Object.defineProperty(exports, "__esModule", { 9401 value: true 9402}); 9403exports["default"] = void 0; 9404 9405var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9406 9407var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 9408 9409function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9410 9411function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9412 9413function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9414 9415function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9416 9417/** 9418 * The CompetitionCountResponse model module. 9419 * @module model/CompetitionCountResponse 9420 * @version 1.0.14 9421 */ 9422var CompetitionCountResponse = /*#__PURE__*/function () { 9423 /** 9424 * Constructs a new <code>CompetitionCountResponse</code>. 9425 * @alias module:model/CompetitionCountResponse 9426 */ 9427 function CompetitionCountResponse() { 9428 _classCallCheck(this, CompetitionCountResponse); 9429 9430 CompetitionCountResponse.initialize(this); 9431 } 9432 /** 9433 * Initializes the fields of this object. 9434 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 9435 * Only for internal use. 9436 */ 9437 9438 9439 _createClass(CompetitionCountResponse, null, [{ 9440 key: "initialize", 9441 value: function initialize(obj) {} 9442 /** 9443 * Constructs a <code>CompetitionCountResponse</code> from a plain JavaScript object, optionally creating a new instance. 9444 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 9445 * @param {Object} data The plain JavaScript object bearing properties of interest. 9446 * @param {module:model/CompetitionCountResponse} obj Optional instance to populate. 9447 * @return {module:model/CompetitionCountResponse} The populated <code>CompetitionCountResponse</code> instance. 9448 */ 9449 9450 }, { 9451 key: "constructFromObject", 9452 value: function constructFromObject(data, obj) { 9453 if (data) { 9454 obj = obj || new CompetitionCountResponse(); 9455 9456 if (data.hasOwnProperty('meta')) { 9457 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 9458 } 9459 } 9460 9461 return obj; 9462 } 9463 }]); 9464 9465 return CompetitionCountResponse; 9466}(); 9467/** 9468 * @member {module:model/ResponseMeta} meta 9469 */ 9470 9471 9472CompetitionCountResponse.prototype['meta'] = undefined; 9473var _default = CompetitionCountResponse; 9474exports["default"] = _default; 9475},{"../ApiClient":3,"./ResponseMeta":144}],44:[function(require,module,exports){ 9476"use strict"; 9477 9478Object.defineProperty(exports, "__esModule", { 9479 value: true 9480}); 9481exports["default"] = void 0; 9482 9483var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9484 9485var _DateRange = _interopRequireDefault(require("./DateRange")); 9486 9487var _NumberRange = _interopRequireDefault(require("./NumberRange")); 9488 9489var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 9490 9491function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9492 9493function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9494 9495function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9496 9497function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9498 9499/** 9500 * The CompetitionFilter model module. 9501 * @module model/CompetitionFilter 9502 * @version 1.0.14 9503 */ 9504var CompetitionFilter = /*#__PURE__*/function () { 9505 /** 9506 * Constructs a new <code>CompetitionFilter</code>. 9507 * @alias module:model/CompetitionFilter 9508 */ 9509 function CompetitionFilter() { 9510 _classCallCheck(this, CompetitionFilter); 9511 9512 CompetitionFilter.initialize(this); 9513 } 9514 /** 9515 * Initializes the fields of this object. 9516 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 9517 * Only for internal use. 9518 */ 9519 9520 9521 _createClass(CompetitionFilter, null, [{ 9522 key: "initialize", 9523 value: function initialize(obj) {} 9524 /** 9525 * Constructs a <code>CompetitionFilter</code> from a plain JavaScript object, optionally creating a new instance. 9526 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 9527 * @param {Object} data The plain JavaScript object bearing properties of interest. 9528 * @param {module:model/CompetitionFilter} obj Optional instance to populate. 9529 * @return {module:model/CompetitionFilter} The populated <code>CompetitionFilter</code> instance. 9530 */ 9531 9532 }, { 9533 key: "constructFromObject", 9534 value: function constructFromObject(data, obj) { 9535 if (data) { 9536 obj = obj || new CompetitionFilter(); 9537 9538 if (data.hasOwnProperty('tags')) { 9539 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 9540 } 9541 9542 if (data.hasOwnProperty('productIds')) { 9543 obj['productIds'] = _ApiClient["default"].convertToType(data['productIds'], ['String']); 9544 } 9545 9546 if (data.hasOwnProperty('statusCode')) { 9547 obj['statusCode'] = _NumberRange["default"].constructFromObject(data['statusCode']); 9548 } 9549 9550 if (data.hasOwnProperty('sortBy')) { 9551 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 9552 } 9553 9554 if (data.hasOwnProperty('ids')) { 9555 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 9556 } 9557 9558 if (data.hasOwnProperty('skip')) { 9559 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 9560 } 9561 9562 if (data.hasOwnProperty('limit')) { 9563 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 9564 } 9565 9566 if (data.hasOwnProperty('constraints')) { 9567 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 9568 } 9569 9570 if (data.hasOwnProperty('endDateRange')) { 9571 obj['endDateRange'] = _DateRange["default"].constructFromObject(data['endDateRange']); 9572 } 9573 9574 if (data.hasOwnProperty('startDateRange')) { 9575 obj['startDateRange'] = _DateRange["default"].constructFromObject(data['startDateRange']); 9576 } 9577 } 9578 9579 return obj; 9580 } 9581 }]); 9582 9583 return CompetitionFilter; 9584}(); 9585/** 9586 * @member {Array.<String>} tags 9587 */ 9588 9589 9590CompetitionFilter.prototype['tags'] = undefined; 9591/** 9592 * @member {Array.<String>} productIds 9593 */ 9594 9595CompetitionFilter.prototype['productIds'] = undefined; 9596/** 9597 * @member {module:model/NumberRange} statusCode 9598 */ 9599 9600CompetitionFilter.prototype['statusCode'] = undefined; 9601/** 9602 * @member {Array.<module:model/QuerySortBy>} sortBy 9603 */ 9604 9605CompetitionFilter.prototype['sortBy'] = undefined; 9606/** 9607 * @member {Array.<String>} ids 9608 */ 9609 9610CompetitionFilter.prototype['ids'] = undefined; 9611/** 9612 * @member {Number} skip 9613 */ 9614 9615CompetitionFilter.prototype['skip'] = undefined; 9616/** 9617 * @member {Number} limit 9618 */ 9619 9620CompetitionFilter.prototype['limit'] = undefined; 9621/** 9622 * Specify the constraints that need to be applied to the filter. 9623 * @member {Array.<String>} constraints 9624 */ 9625 9626CompetitionFilter.prototype['constraints'] = undefined; 9627/** 9628 * @member {module:model/DateRange} endDateRange 9629 */ 9630 9631CompetitionFilter.prototype['endDateRange'] = undefined; 9632/** 9633 * @member {module:model/DateRange} startDateRange 9634 */ 9635 9636CompetitionFilter.prototype['startDateRange'] = undefined; 9637var _default = CompetitionFilter; 9638exports["default"] = _default; 9639},{"../ApiClient":3,"./DateRange":58,"./NumberRange":124,"./QuerySortBy":141}],45:[function(require,module,exports){ 9640"use strict"; 9641 9642Object.defineProperty(exports, "__esModule", { 9643 value: true 9644}); 9645exports["default"] = void 0; 9646 9647var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9648 9649var _CompetitionFilter = _interopRequireDefault(require("./CompetitionFilter")); 9650 9651function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9652 9653function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9654 9655function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9656 9657function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9658 9659/** 9660 * The CompetitionRequest model module. 9661 * @module model/CompetitionRequest 9662 * @version 1.0.14 9663 */ 9664var CompetitionRequest = /*#__PURE__*/function () { 9665 /** 9666 * Constructs a new <code>CompetitionRequest</code>. 9667 * @alias module:model/CompetitionRequest 9668 */ 9669 function CompetitionRequest() { 9670 _classCallCheck(this, CompetitionRequest); 9671 9672 CompetitionRequest.initialize(this); 9673 } 9674 /** 9675 * Initializes the fields of this object. 9676 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 9677 * Only for internal use. 9678 */ 9679 9680 9681 _createClass(CompetitionRequest, null, [{ 9682 key: "initialize", 9683 value: function initialize(obj) {} 9684 /** 9685 * Constructs a <code>CompetitionRequest</code> from a plain JavaScript object, optionally creating a new instance. 9686 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 9687 * @param {Object} data The plain JavaScript object bearing properties of interest. 9688 * @param {module:model/CompetitionRequest} obj Optional instance to populate. 9689 * @return {module:model/CompetitionRequest} The populated <code>CompetitionRequest</code> instance. 9690 */ 9691 9692 }, { 9693 key: "constructFromObject", 9694 value: function constructFromObject(data, obj) { 9695 if (data) { 9696 obj = obj || new CompetitionRequest(); 9697 9698 if (data.hasOwnProperty('languageKey')) { 9699 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 9700 } 9701 9702 if (data.hasOwnProperty('competitionFilter')) { 9703 obj['competitionFilter'] = _CompetitionFilter["default"].constructFromObject(data['competitionFilter']); 9704 } 9705 } 9706 9707 return obj; 9708 } 9709 }]); 9710 9711 return CompetitionRequest; 9712}(); 9713/** 9714 * The language codes can be foun
9714d in the settings/transalations section of the back office 9715 * @member {String} languageKey 9716 */ 9717 9718 9719CompetitionRequest.prototype['languageKey'] = undefined; 9720/** 9721 * @member {module:model/CompetitionFilter} competitionFilter 9722 */ 9723 9724CompetitionRequest.prototype['competitionFilter'] = undefined; 9725var _default = CompetitionRequest; 9726exports["default"] = _default; 9727},{"../ApiClient":3,"./CompetitionFilter":44}],46:[function(require,module,exports){ 9728"use strict"; 9729 9730Object.defineProperty(exports, "__esModule", { 9731 value: true 9732}); 9733exports["default"] = void 0; 9734 9735var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9736 9737var _Competition = _interopRequireDefault(require("./Competition")); 9738 9739var _Error = _interopRequireDefault(require("./Error")); 9740 9741var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 9742 9743function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9744 9745function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9746 9747function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9748 9749function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9750 9751/** 9752 * The CompetitionResponse model module. 9753 * @module model/CompetitionResponse 9754 * @version 1.0.14 9755 */ 9756var CompetitionResponse = /*#__PURE__*/function () { 9757 /** 9758 * Constructs a new <code>CompetitionResponse</code>. 9759 * @alias module:model/CompetitionResponse 9760 */ 9761 function CompetitionResponse() { 9762 _classCallCheck(this, CompetitionResponse); 9763 9764 CompetitionResponse.initialize(this); 9765 } 9766 /** 9767 * Initializes the fields of this object. 9768 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 9769 * Only for internal use. 9770 */ 9771 9772 9773 _createClass(CompetitionResponse, null, [{ 9774 key: "initialize", 9775 value: function initialize(obj) {} 9776 /** 9777 * Constructs a <code>CompetitionResponse</code> from a plain JavaScript object, optionally creating a new instance. 9778 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 9779 * @param {Object} data The plain JavaScript object bearing properties of interest. 9780 * @param {module:model/CompetitionResponse} obj Optional instance to populate. 9781 * @return {module:model/CompetitionResponse} The populated <code>CompetitionResponse</code> instance. 9782 */ 9783 9784 }, { 9785 key: "constructFromObject", 9786 value: function constructFromObject(data, obj) { 9787 if (data) { 9788 obj = obj || new CompetitionResponse(); 9789 9790 if (data.hasOwnProperty('meta')) { 9791 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 9792 } 9793 9794 if (data.hasOwnProperty('data')) { 9795 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Competition["default"]]); 9796 } 9797 9798 if (data.hasOwnProperty('errors')) { 9799 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 9800 } 9801 } 9802 9803 return obj; 9804 } 9805 }]); 9806 9807 return CompetitionResponse; 9808}(); 9809/** 9810 * @member {module:model/ResponseMeta} meta 9811 */ 9812 9813 9814CompetitionResponse.prototype['meta'] = undefined; 9815/** 9816 * @member {Array.<module:model/Competition>} data 9817 */ 9818 9819CompetitionResponse.prototype['data'] = undefined; 9820/** 9821 * @member {Array.<module:model/Error>} errors 9822 */ 9823 9824CompetitionResponse.prototype['errors'] = undefined; 9825var _default = CompetitionResponse; 9826exports["default"] = _default; 9827},{"../ApiClient":3,"./Competition":41,"./Error":74,"./ResponseMeta":144}],47:[function(require,module,exports){ 9828"use strict"; 9829 9830Object.defineProperty(exports, "__esModule", { 9831 value: true 9832}); 9833exports["default"] = void 0; 9834 9835var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9836 9837function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9838 9839function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9840 9841function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9842 9843function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9844 9845function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 9846 9847/** 9848* Enum class CompetitionStatus. 9849* @enum {} 9850* @readonly 9851*/ 9852var CompetitionStatus = /*#__PURE__*/function () { 9853 function CompetitionStatus() { 9854 _classCallCheck(this, CompetitionStatus); 9855 9856 _defineProperty(this, "Unknown", "Unknown"); 9857 9858 _defineProperty(this, "Deleting", "Deleting"); 9859 9860 _defineProperty(this, "Deleted", "Deleted"); 9861 9862 _defineProperty(this, "Draft", "Draft"); 9863 9864 _defineProperty(this, "Template", "Template"); 9865 9866 _defineProperty(this, "Preparing", "Preparing"); 9867 9868 _defineProperty(this, "Ready", "Ready"); 9869 9870 _defineProperty(this, "Starting", "Starting"); 9871 9872 _defineProperty(this, "Active", "Active"); 9873
9874 _defineProperty(this, "Finishing", "Finishing"); 9875 9876 _defineProperty(this, "Finished", "Finished"); 9877 9878 _defineProperty(this, "Cancelling", "Cancelling"); 9879 9880 _defineProperty(this, "Cancelled", "Cancelled"); 9881 9882 _defineProperty(this, "Finalising", "Finalising"); 9883 9884 _defineProperty(this, "Finalised", "Finalised"); 9885 } 9886 9887 _createClass(CompetitionStatus, null, [{ 9888 key: "constructFromObject", 9889 value: 9890 /** 9891 * Returns a <code>CompetitionStatus</code> enum value from a Javascript object name. 9892 * @param {Object} data The plain JavaScript object containing the name of the enum value. 9893 * @return {module:model/CompetitionStatus} The enum <code>CompetitionStatus</code> value. 9894 */ 9895 function constructFromObject(object) { 9896 return object; 9897 } 9898 }]); 9899 9900 return CompetitionStatus; 9901}(); 9902 9903exports["default"] = CompetitionStatus; 9904},{"../ApiClient":3}],48:[function(require,module,exports){ 9905"use strict"; 9906 9907Object.defineProperty(exports, "__esModule", { 9908 value: true 9909}); 9910exports["default"] = void 0; 9911 9912var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9913 9914function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9915 9916function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9917 9918function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9919 9920function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9921 9922function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 9923 9924/** 9925* Enum class CompetitionType. 9926* @enum {} 9927* @readonly 9928*/ 9929var CompetitionType = /*#__PURE__*/function () { 9930 function CompetitionType() { 9931 _classCallCheck(this, CompetitionType); 9932 9933 _defineProperty(this, "Leaderboard", "Leaderboard"); 9934 } 9935 9936 _createClass(CompetitionType, null, [{ 9937 key: "constructFromObject", 9938 value: 9939 /** 9940 * Returns a <code>CompetitionType</code> enum value from a Javascript object name. 9941 * @param {Object} data The plain JavaScript object containing the name of the enum value. 9942 * @return {module:model/CompetitionType} The enum <code>CompetitionType</code> value. 9943 */ 9944 function constructFromObject(object) { 9945 return object; 9946 } 9947 }]); 9948 9949 return CompetitionType; 9950}(); 9951 9952exports["default"] = CompetitionType; 9953},{"../ApiClient":3}],49:[function(require,module,exports){ 9954"use strict"; 9955 9956Object.defineProperty(exports, "__esModule", { 9957 value: true 9958}); 9959exports["default"] = void 0; 9960 9961var _ApiClient = _interopRequireDefault(require("../ApiClient")); 9962 9963function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 9964 9965function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 9966 9967function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9968 9969function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 9970 9971function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 9972 9973/** 9974* Enum class ConditionalOperator. 9975* @enum {} 9976* @readonly 9977*/ 9978var ConditionalOperator = /*#__PURE__*/function () { 9979 function ConditionalOperator() { 9980 _classCallCheck(this, ConditionalOperator); 9981 9982 _defineProperty(this, "Equals", "Equals"); 9983 9984 _defineProperty(this, "GreaterThan", "GreaterThan"); 9985 9986 _defineProperty(this, "GreaterThanEquals", "GreaterThanEquals"); 9987 9988 _defineProperty(this, "LessThan", "LessThan"); 9989 9990 _defineProperty(this, "LessThanEquals", "LessThanEquals"); 9991 9992 _defineProperty(this, "Between", "Between"); 9993 } 9994 9995 _createClass(ConditionalOperator, null, [{ 9996 key: "constructFromObject", 9997 value: 9998 /** 9999 * Returns a <code>ConditionalOperator</code> enum value from a Javascript object name. 10000 * @param {Object}
10000 data The plain JavaScript object containing the name of the enum value. 10001 * @return {module:model/ConditionalOperator} The enum <code>ConditionalOperator</code> value. 10002 */ 10003 function constructFromObject(object) { 10004 return object; 10005 } 10006 }]); 10007 10008 return ConditionalOperator; 10009}(); 10010 10011exports["default"] = ConditionalOperator; 10012},{"../ApiClient":3}],50:[function(require,module,exports){ 10013"use strict"; 10014 10015Object.defineProperty(exports, "__esModule", { 10016 value: true 10017}); 10018exports["default"] = void 0; 10019 10020var _ApiClient = _interopRequireDefault(require("../ApiClient")); 10021 10022var _ContestAllOf = _interopRequireDefault(require("./ContestAllOf")); 10023 10024var _ContestStatus = _interopRequireDefault(require("./ContestStatus")); 10025 10026var _DependantOn = _interopRequireDefault(require("./DependantOn")); 10027 10028var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 10029 10030var _OptinStatus = _interopRequireDefault(require("./OptinStatus")); 10031 10032var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 10033 10034var _RoundType = _interopRequireDefault(require("./RoundType")); 10035 10036var _Strategy = _interopRequireDefault(require("./Strategy")); 10037 10038function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 10039 10040function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 10041 10042function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 10043 10044function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 10045 10046/** 10047 * The Contest model module. 10048 * @module model/Contest 10049 * @version 1.0.14 10050 */ 10051var Contest = /*#__PURE__*/function () { 10052 /** 10053 * Constructs a new <code>Contest</code>. 10054 * This is a contest model 10055 * @alias module:model/Contest 10056 * @implements module:model/ContestAllOf 10057 * @implements module:model/ModelDefault 10058 * @implements module:model/OptionalModelFields 10059 * @param id {String} Ziqni id of the model 10060 */ 10061 function Contest(id) { 10062 _classCallCheck(this, Contest); 10063 10064 _ContestAllOf["default"].initialize(this); 10065 10066 _ModelDefault["default"].initialize(this, id); 10067 10068 _OptionalModelFields["default"].initialize(this); 10069 10070 Contest.initialize(this, id); 10071 } 10072 /** 10073 * Initializes the fields of this object. 10074 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 10075 * Only for internal use. 10076 */ 10077 10078 10079 _createClass(Contest, null, [{ 10080 key: "initialize", 10081 value: function initialize(obj, id) { 10082 obj['id'] = id; 10083 } 10084 /** 10085 * Constructs a <code>Contest</code> from a plain JavaScript object, optionally creating a new instance. 10086 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 10087 * @param {Object} data The plain JavaScript object bearing properties of interest. 10088 * @param {module:model/Contest} obj Optional instance to populate. 10089 * @return {module:model/Contest} The populated <code>Contest</code> instance. 10090 */ 10091 10092 }, { 10093 key: "constructFromObject", 10094 value: function constructFromObject(data, obj) { 10095 if (data) { 10096 obj = obj || new Contest(); 10097 10098 _ContestAllOf["default"].constructFromObject(data, obj); 10099 10100 _ModelDefault["default"].constructFromObject(data, obj); 10101 10102 _OptionalModelFields["default"].constructFromObject(data, obj); 10103 10104 if (data.hasOwnProperty('name')) { 10105 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 10106 } 10107 10108 if (data.hasOwnProperty('description')) { 10109 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 10110 } 10111 10112 if (data.hasOwnProperty('termsAndConditions')) { 10113 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 10114 } 10115 10116 if (data.hasOwnProperty('competitionId')) { 10117 obj['competitionId'] = _ApiClient["default"].convertToType(data['competitionId'], 'String'); 10118 } 10119 10120 if (data.hasOwnProperty('round')) { 10121 obj['round'] = _ApiClient["default"].convertToType(data['round'], 'Number'); 10122 } 10123 10124 if (data.hasOwnProperty('roundType')) { 10125 obj['roundType'] = _RoundType["default"].constructFromObject(data['roundType']); 10126 } 10127 10128 if (data.hasOwnProperty('groupStage')) { 10129 obj['groupStage'] = _ApiClient["default"].convertToType(data['groupStage'], 'Number'); 10130 } 10131 10132 if (data.hasOwnProperty('entrantsFromContest')) { 10133 obj['entrantsFromContest'] = _ApiClient["default"].convertToType(data['entrantsFromContest'], ['String']); 10134 } 10135 10136 if (data.hasOwnProperty('groupStageLabel')) { 10137 obj['groupStageLabel'] = _ApiClient["default"].convertToType(data['groupStageLabel'], 'String'); 10138 } 10139 10140 if (data.hasOwnProperty('optInStatus')) { 10141 obj['optInStatus'] = _OptinStatus["default"].constructFromObject(data['optInStatus']); 10142 } 10143 10144 if (data.hasOwnProperty('maxNumberOfEntrants')) { 10145 obj['maxNumberOfEntrants'] = _ApiClient["default"].convertToType(data['maxNumberOfEntrants'], 'Number'); 10146 } 10147 10148 if (data.hasOwnProperty('minNumberOfEntrants')) { 10149 obj['minNumberOfEntrants'] = _ApiClient["default"].convertToType(data['minNumberOfEntrants'], 'Number'); 10150 } 10151 10152 if (data.hasOwnProperty('scheduledStartDate')) { 10153 obj['scheduledStartDate'] = _ApiClient["default"].convertToType(data['scheduledStartDate'], 'Date'); 10154 } 10155 10156 if (data.hasOwnProperty('scheduledEndDate')) { 10157 obj['scheduledEndDate'] = _ApiClient["default"].convertToType(data['scheduledEndDate'], 'Date'); 10158 } 10159 10160 if (data.hasOwnProperty('actualStartDate')) { 10161 obj['actualStartDate'] = _ApiClient["default"].convertToType(data['actualStartDate'], 'Date'); 10162 } 10163 10164 if (data.hasOwnProperty('actualEndDate')) { 10165 obj['actualEndDate'] = _ApiClient["default"].convertToType(data['actualEndDate'], 'Date'); 10166 } 10167 10168 if (data.hasOwnProperty('strategies')) { 10169 obj['strategies'] = _Strategy["default"].constructFromObject(data['strategies']); 10170 } 10171 10172 if (data.hasOwnProperty('status')) { 10173 obj['status'] = _ContestStatus["default"].constructFromObject(data['status']); 10174 } 10175 10176 if (data.hasOwnProperty('statusCode')) { 10177 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 10178 } 10179 10180 if (data.hasOwnProperty('memberTagsFilter')) { 10181 obj['memberTagsFilter'] = _DependantOn["default"].constructFromObject(data['memberTagsFilter']); 10182 } 10183 10184 if (data.hasOwnProperty('constraints')) { 10185 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 10186 } 10187 10188 if (data.hasOwnProperty('bannerLink')) { 10189 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 10190 } 10191 10192 if (data.hasOwnProperty('bannerHighResolutionLink')) { 10193 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 10194 } 10195 10196 if (data.hasOwnProperty('bannerLowResolutionLink')) { 10197 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 10198 } 10199 10200 if (data.hasOwnProperty('iconLink')) { 10201 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 10202 } 10203 10204 if (data.hasOwnProperty('id')) { 10205 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 10206 } 10207 10208 if (data.hasOwnProperty('spaceName')) { 10209 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 10210 } 10211 10212 if (data.hasOwnProperty('created')) { 10213 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 10214 } 10215 10216 if (data.hasOwnProperty('customFields')) { 10217 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 10218 'String': Object 10219 }); 10220 } 10221 10222 if (data.hasOwnProperty('tags')) { 10223 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 10224 } 10225 10226 if (data.hasOwnProperty('metadata')) { 10227 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 10228 'String': 'String' 10229 }); 10230 } 10231 } 10232 10233 return obj; 10234 } 10235 }]); 10236 10237 return Contest; 10238}(); 10239/** 10240 * @member {String} name 10241 */ 10242 10243 10244Contest.prototype['name'] = undefined; 10245/** 10246 * @member {String} description 10247 */ 10248 10249Contest.prototype['description'] = undefined; 10250/** 10251 * @member {String} termsAndConditions 10252 */ 10253 10254Contest.prototype['termsAndConditions'] = undefined; 10255/** 10256 * A unique identifier of a Competition 10257 * @member {String} competitionId 10258 */ 10259 10260Contest.prototype['competitionId'] = undefined; 10261/** 10262 * To what round does the contest belong 10263 * @member {Number} round 10264 */ 10265 10266Contest.prototype['round'] = undefined; 10267/** 10268 * @member {module:model/RoundType} roundType 10269 */ 10270 10271Contest.prototype['roundType'] = undefined; 10272/** 10273 * Is used for more complex Competitions e.g. multi round competitions where round 1 group stage matched round 2 10274 * @member {Number} groupStage 10275 */ 10276 10277Contest.prototype['groupStage'] = undefined; 10278/** 10279 * A list of Ziqni contest identifiers to allow contests chaining. When a Progression competition is active and
10279you have a 2 round competition the first round has to reference the second round then this parameter becomes mandatory instead of Optional. 10280 * @member {Array.<String>} entrantsFromContest 10281 */ 10282 10283Contest.prototype['entrantsFromContest'] = undefined; 10284/** 10285 * The name of the group stages 10286 * @member {String} groupStageLabel 10287 */ 10288 10289Contest.prototype['groupStageLabel'] = undefined; 10290/** 10291 * @member {module:model/OptinStatus} optInStatus 10292 */ 10293 10294Contest.prototype['optInStatus'] = undefined; 10295/** 10296 * Maximum number of entrants for the contest 10297 * @member {Number} maxNumberOfEntrants 10298 */ 10299 10300Contest.prototype['maxNumberOfEntrants'] = undefined; 10301/** 10302 * Minimum number of entrants for the contest 10303 * @member {Number} minNumberOfEntrants 10304 */ 10305 10306Contest.prototype['minNumberOfEntrants'] = undefined; 10307/** 10308 * ISO8601 timestamp for when a Contest should start. All records are stored in UTC time zone 10309 * @member {Date} scheduledStartDate 10310 */ 10311 10312Contest.prototype['scheduledStartDate'] = undefined; 10313/** 10314 * ISO8601 timestamp for when a Contest should end. All records are stored in UTC time zone 10315 * @member {Date} scheduledEndDate 10316 */ 10317 10318Contest.prototype['scheduledEndDate'] = undefined; 10319/** 10320 * ISO8601 timestamp for when a Competition started. All records are stored in UTC time zone 10321 * @member {Date} actualStartDate 10322 */ 10323 10324Contest.prototype['actualStartDate'] = undefined; 10325/** 10326 * ISO8601 timestamp for when a Competition ended. All records are stored in UTC time zone 10327 * @member {Date} actualEndDate 10328 */ 10329 10330Contest.prototype['actualEndDate'] = undefined; 10331/** 10332 * @member {module:model/Strategy} strategies 10333 */ 10334 10335Contest.prototype['strategies'] = undefined; 10336/** 10337 * @member {module:model/ContestStatus} status 10338 */ 10339 10340Contest.prototype['status'] = undefined; 10341/** 10342 * The code of the contest 10343 * @member {Number} statusCode 10344 */ 10345 10346Contest.prototype['statusCode'] = undefined; 10347/** 10348 * @member {module:model/DependantOn} memberTagsFilter 10349 */ 10350 10351Contest.prototype['memberTagsFilter'] = undefined; 10352/** 10353 * Additional constraints 10354 * @member {Array.<String>} constraints 10355 */ 10356 10357Contest.prototype['constraints'] = undefined; 10358/** 10359 * Link to the banner 10360 * @member {String} bannerLink 10361 */ 10362 10363Contest.prototype['bannerLink'] = undefined; 10364/** 10365 * Link to the bannerHighResolution 10366 * @member {String} bannerHighResolutionLink 10367 */ 10368 10369Contest.prototype['bannerHighResolutionLink'] = undefined; 10370/** 10371 * Link to the bannerLowResolution 10372 * @member {String} bannerLowResolutionLink 10373 */ 10374 10375Contest.prototype['bannerLowResolutionLink'] = undefined; 10376/** 10377 * Link to the icon 10378 * @member {String} iconLink 10379 */ 10380 10381Contest.prototype['iconLink'] = undefined; 10382/** 10383 * Ziqni id of the model 10384 * @member {String} id 10385 */ 10386 10387Contest.prototype['id'] = undefined; 10388/** 10389 * This is the space name which is linked to the account 10390 * @member {String} spaceName 10391 */ 10392 10393Contest.prototype['spaceName'] = undefined; 10394/** 10395 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 10396 * @member {Date} created 10397 */ 10398 10399Contest.prototype['created'] = undefined; 10400/** 10401 * @member {Object.<String, Object>} customFields 10402 */ 10403 10404Contest.prototype['customFields'] = undefined; 10405/** 10406 * A list of id's used to tag models 10407 * @member {Array.<String>} tags 10408 */ 10409 10410Contest.prototype['tags'] = undefined; 10411/** 10412 * @member {Object.<String, String>} metadata 10413 */ 10414 10415Contest.prototype['metadata'] = undefined; // Implement ContestAllOf interface: 10416 10417/** 10418 * @member {String} name 10419 */ 10420 10421_ContestAllOf["default"].prototype['name'] = undefined; 10422/** 10423 * @member {String} description 10424 */ 10425 10426_ContestAllOf["default"].prototype['description'] = undefined; 10427/** 10428 * @member {String} termsAndConditions 10429 */ 10430 10431_ContestAllOf["default"].prototype['termsAndConditions'] = undefined; 10432/** 10433 * A unique identifier of a Competition 10434 * @member {String} competitionId 10435 */ 10436 10437_ContestAllOf["default"].prototype['competitionId'] = undefined; 10438/** 10439 * To what round does the contest belong 10440 * @member {Number} round 10441 */ 10442 10443_ContestAllOf["default"].prototype['round'] = undefined; 10444/** 10445 * @member {module:model/RoundType} roundType 10446 */ 10447 10448_ContestAllOf["default"].prototype['roundType'] = undefined; 10449/** 10450 * Is used for more complex Competitions e.g. multi round competitions where round 1 group stage matched round 2 10451 * @member {Number} groupStage 10452 */ 10453 10454_ContestAllOf["default"].prototype['groupStage'] = undefined; 10455/** 10456 * A list of Ziqni contest identifiers to allow contests chaining. When a Progression competition is active and
10456you have a 2 round competition the first round has to reference the second round then this parameter becomes mandatory instead of Optional. 10457 * @member {Array.<String>} entrantsFromContest 10458 */ 10459 10460_ContestAllOf["default"].prototype['entrantsFromContest'] = undefined; 10461/** 10462 * The name of the group stages 10463 * @member {String} groupStageLabel 10464 */ 10465 10466_ContestAllOf["default"].prototype['groupStageLabel'] = undefined; 10467/** 10468 * @member {module:model/OptinStatus} optInStatus 10469 */ 10470 10471_ContestAllOf["default"].prototype['optInStatus'] = undefined; 10472/** 10473 * Maximum number of entrants for the contest 10474 * @member {Number} maxNumberOfEntrants 10475 */ 10476 10477_ContestAllOf["default"].prototype['maxNumberOfEntrants'] = undefined; 10478/** 10479 * Minimum number of entrants for the contest 10480 * @member {Number} minNumberOfEntrants 10481 */ 10482 10483_ContestAllOf["default"].prototype['minNumberOfEntrants'] = undefined; 10484/** 10485 * ISO8601 timestamp for when a Contest should start. All records are stored in UTC time zone 10486 * @member {Date} scheduledStartDate 10487 */ 10488 10489_ContestAllOf["default"].prototype['scheduledStartDate'] = undefined; 10490/** 10491 * ISO8601 timestamp for when a Contest should end. All records are stored in UTC time zone 10492 * @member {Date} scheduledEndDate 10493 */ 10494 10495_ContestAllOf["default"].prototype['scheduledEndDate'] = undefined; 10496/** 10497 * ISO8601 timestamp for when a Competition started. All records are stored in UTC time zone 10498 * @member {Date} actualStartDate 10499 */ 10500 10501_ContestAllOf["default"].prototype['actualStartDate'] = undefined; 10502/** 10503 * ISO8601 timestamp for when a Competition ended. All records are stored in UTC time zone 10504 * @member {Date} actualEndDate 10505 */ 10506 10507_ContestAllOf["default"].prototype['actualEndDate'] = undefined; 10508/** 10509 * @member {module:model/Strategy} strategies 10510 */ 10511 10512_ContestAllOf["default"].prototype['strategies'] = undefined; 10513/** 10514 * @member {module:model/ContestStatus} status 10515 */ 10516 10517_ContestAllOf["default"].prototype['status'] = undefined; 10518/** 10519 * The code of the contest 10520 * @member {Number} statusCode 10521 */ 10522 10523_ContestAllOf["default"].prototype['statusCode'] = undefined; 10524/** 10525 * @member {module:model/DependantOn} memberTagsFilter 10526 */ 10527 10528_ContestAllOf["default"].prototype['memberTagsFilter'] = undefined; 10529/** 10530 * Additional constraints 10531 * @member {Array.<String>} constraints 10532 */ 10533 10534_ContestAllOf["default"].prototype['constraints'] = undefined; 10535/** 10536 * Link to the banner 10537 * @member {String} bannerLink 10538 */ 10539 10540_ContestAllOf["default"].prototype['bannerLink'] = undefined; 10541/** 10542 * Link to the bannerHighResolution 10543 * @member {String} bannerHighResolutionLink 10544 */ 10545 10546_ContestAllOf["default"].prototype['bannerHighResolutionLink'] = undefined; 10547/** 10548 * Link to the bannerLowResolution 10549 * @member {String} bannerLowResolutionLink 10550 */ 10551 10552_ContestAllOf["default"].prototype['bannerLowResolutionLink'] = undefined; 10553/** 10554 * Link to the icon 10555 * @member {String} iconLink 10556 */ 10557 10558_ContestAllOf["default"].prototype['iconLink'] = undefined; // Implement ModelDefault interface: 10559 10560/** 10561 * Ziqni id of the model 10562 * @member {String} id 10563 */ 10564 10565_ModelDefault["default"].prototype['id'] = undefined; 10566/** 10567 * This is the space name which is linked to the account 10568 * @member {String} spaceName 10569 */ 10570 10571_ModelDefault["default"].prototype['spaceName'] = undefined; 10572/** 10573 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 10574 * @member {Date} created 10575 */ 10576 10577_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 10578 10579/** 10580 * @member {Object.<String, Object>} customFields 10581 */ 10582 10583_OptionalModelFields["default"].prototype['customFields'] = undefined; 10584/** 10585 * A list of id's used to tag models 10586 * @member {Array.<String>} tags 10587 */ 10588 10589_OptionalModelFields["default"].prototype['tags'] = undefined; 10590/** 10591 * @member {Object.<String, String>} metadata 10592 */ 10593 10594_OptionalModelFields["default"].prototype['metadata'] = undefined; 10595var _default = Contest; 10596exports["default"] = _default; 10597},{"../ApiClient":3,"./ContestAllOf":51,"./ContestStatus":56,"./DependantOn":60,"./ModelDefault":123,"./OptinStatus":129,"./OptionalModelFields":130,"./RoundType":151,"./Strategy":162}],51:[function(require,module,exports){ 10598"use strict"; 10599 10600Object.defineProperty(exports, "__esModule", { 10601 value: true 10602}); 10603exports["default"] = void 0; 10604 10605var _ApiClient = _interopRequireDefault(require("../ApiClient")); 10606 10607var _ContestStatus = _interopRequireDefault(require("./ContestStatus")); 10608 10609var _DependantOn = _interopRequireDefault(require("./DependantOn")); 10610 10611var _OptinStatus = _interopRequireDefault(require("./OptinStatus")); 10612 10613var _RoundType = _interopRequireDefault(require("./RoundType")); 10614 10615var _Strategy = _interopRequireDefault(require("./Strategy")); 10616 10617function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 10618 10619function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 10620 10621function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 10622 10623function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 10624 10625/** 10626 * The ContestAllOf model module. 10627 * @module model/ContestAllOf 10628 * @version 1.0.14 10629 */ 10630var ContestAllOf = /*#__PURE__*/function () { 10631 /** 10632 * Constructs a new <code>ContestAllOf</code>. 10633 * @alias module:model/ContestAllOf 10634 */ 10635 function ContestAllOf() { 10636 _classCallCheck(this, ContestAllOf); 10637 10638 ContestAllOf.initialize(this); 10639 } 10640 /** 10641 * Initializes the fields of this object. 10642 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 10643 * Only for internal use. 10644 */ 10645 10646 10647 _createClass(ContestAllOf, null, [{ 10648 key: "initialize", 10649 value: function initialize(obj) {} 10650 /** 10651 * Constructs a <code>ContestAllOf</code> from a plain JavaScript object, optionally creating a new instance. 10652 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 10653 * @param {Object} data The plain JavaScript object bearing properties of interest. 10654 * @param {module:model/ContestAllOf} obj Optional instance to populate. 10655 * @return {module:model/ContestAllOf} The populated <code>ContestAllOf</code> instance. 10656 */ 10657 10658 }, { 10659 key: "constructFromObject", 10660 value: function constructFromObject(data, obj) { 10661 if (data) { 10662 obj = obj || new ContestAllOf(); 10663 10664 if (data.hasOwnProperty('name')) { 10665 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 10666 } 10667 10668 if (data.hasOwnProperty('description')) { 10669 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 10670 } 10671 10672 if (data.hasOwnProperty('termsAndConditions')) { 10673 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 10674 } 10675 10676 if (data.hasOwnProperty('competitionId')) { 10677 obj['competitionId'] = _ApiClient["default"].convertToType(data['competitionId'], 'String'); 10678 } 10679 10680 if (data.hasOwnProperty('round')) { 10681 obj['round'] = _ApiClient["default"].convertToType(data['round'], 'Number'); 10682 } 10683 10684 if (data.hasOwnProperty('roundType')) { 10685 obj['roundType'] = _RoundType["default"].constructFromObject(data['roundType']); 10686 } 10687 10688 if (data.hasOwnProperty('groupStage')) { 10689 obj['groupStage'] = _ApiClient["default"].convertToType(data['groupStage'], 'Number'); 10690 } 10691 10692 if (data.hasOwnProperty('entrantsFromContest')) { 10693 obj['entrantsFromContest'] = _ApiClient["default"].convertToType(data['entrantsFromContest'], ['String']); 10694 } 10695 10696 if (data.hasOwnProperty('groupStageLabel')) { 10697 obj['groupStageLabel'] = _ApiClient["default"].convertToType(data['groupStageLabel'], 'String'); 10698 } 10699 10700 if (data.hasOwnProperty('optInStatus')) { 10701 obj['optInStatus'] = _OptinStatus["default"].constructFromObject(data['optInStatus']); 10702 } 10703 10704 if (data.hasOwnProperty('maxNumberOfEntrants')) { 10705 obj['maxNumberOfEntrants'] = _ApiClient["default"].convertToType(data['maxNumberOfEntrants'], 'Number'); 10706 } 10707 10708 if (data.hasOwnProperty('minNumberOfEntrants')) { 10709 obj['minNumberOfEntrants'] = _ApiClient["default"].convertToType(data['minNumberOfEntrants'], 'Number'); 10710 } 10711 10712 if (data.hasOwnProperty('scheduledStartDate')) { 10713 obj['scheduledStartDate'] = _ApiClient["default"].convertToType(data['scheduledStartDate'], 'Date'); 10714 } 10715 10716 if (data.hasOwnProperty('scheduledEndDate')) { 10717 obj['scheduledEndDate'] = _ApiClient["default"].convertToType(data['scheduledEndDate'], 'Date'); 10718 } 10719 10720 if (data.hasOwnProperty('actualStartDate')) { 10721 obj['actualStartDate'] = _ApiClient["default"].convertToType(data['actualStartDate'], 'Date'); 10722 } 10723 10724 if (data.hasOwnProperty('actualEndDate')) { 10725 obj['actualEndDate'] = _ApiClient["default"].convertToType(data['actualEndDate'], 'Date'); 10726 } 10727 10728 if (data.hasOwnProperty('strategies')) { 10729 obj['strategies'] = _Strategy["default"].constructFromObject(data['strategies']); 10730 } 10731 10732 if (data.hasOwnProperty('status')) { 10733 obj['status'] = _ContestStatus["default"].constructFromObject(data['status']); 10734 } 10735 10736 if (data.hasOwnProperty('statusCode')) { 10737 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 10738 } 10739 10740 if (data.hasOwnProperty('memberTagsFilter')) { 10741 obj['memberTagsFilter'] = _DependantOn["default"].constructFromObject(data['memberTagsFilter']); 10742 } 10743 10744 if (data.hasOwnProperty('constraints')) { 10745 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 10746 } 10747 10748 if (data.hasOwnProperty('bannerLink')) { 10749 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 10750 } 10751 10752 if (data.hasOwnProperty('bannerHighResolutionLink')) { 10753 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 10754 } 10755 10756 if (data.hasOwnProperty('bannerLowResolutionLink')) { 10757 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 10758 } 10759 10760 if (data.hasOwnProperty('iconLink')) { 10761 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 10762 } 10763 } 10764 10765 return obj; 10766 } 10767 }]); 10768 10769 return ContestAllOf; 10770}(); 10771/** 10772 * @member {String} name 10773 */ 10774 10775 10776ContestAllOf.prototype['name'] = undefined; 10777/** 10778 * @member {String} description 10779 */ 10780 10781ContestAllOf.prototype['description'] = undefined; 10782/** 10783 * @member {String} termsAndConditions 10784 */ 10785 10786ContestAllOf.prototype['termsAndConditions'] = undefined; 10787/** 10788 * A unique identifier of a Competition 10789 * @member {String} competitionId 10790 */ 10791 10792ContestAllOf.prototype['competitionId'] = undefined; 10793/** 10794 * To what round does the contest belong 10795 * @member {Number} round 10796 */ 10797 10798ContestAllOf.prototype['round'] = undefined; 10799/** 10800 * @member {module:model/RoundType} roundType 10801 */ 10802 10803ContestAllOf.prototype['roundType'] = undefined; 10804/** 10805 * Is used for more complex Competitions e.g. multi round competitions where round 1 group stage matched round 2 10806 * @member {Number} groupStage 10807 */ 10808 10809ContestAllOf.prototype['groupStage'] = undefined; 10810/** 10811 * A list of Ziqni contest identifiers to allow contests chaining. When a Progression competition is active and
10811you have a 2 round competition the first round has to reference the second round then this parameter becomes mandatory instead of Optional. 10812 * @member {Array.<String>} entrantsFromContest 10813 */ 10814 10815ContestAllOf.prototype['entrantsFromContest'] = undefined; 10816/** 10817 * The name of the group stages 10818 * @member {String} groupStageLabel 10819 */ 10820 10821ContestAllOf.prototype['groupStageLabel'] = undefined; 10822/** 10823 * @member {module:model/OptinStatus} optInStatus 10824 */ 10825 10826ContestAllOf.prototype['optInStatus'] = undefined; 10827/** 10828 * Maximum number of entrants for the contest 10829 * @member {Number} maxNumberOfEntrants 10830 */ 10831 10832ContestAllOf.prototype['maxNumberOfEntrants'] = undefined; 10833/** 10834 * Minimum number of entrants for the contest 10835 * @member {Number} minNumberOfEntrants 10836 */ 10837 10838ContestAllOf.prototype['minNumberOfEntrants'] = undefined; 10839/** 10840 * ISO8601 timestamp for when a Contest should start. All records are stored in UTC time zone 10841 * @member {Date} scheduledStartDate 10842 */ 10843 10844ContestAllOf.prototype['scheduledStartDate'] = undefined; 10845/** 10846 * ISO8601 timestamp for when a Contest should end. All records are stored in UTC time zone 10847 * @member {Date} scheduledEndDate 10848 */ 10849 10850ContestAllOf.prototype['scheduledEndDate'] = undefined; 10851/** 10852 * ISO8601 timestamp for when a Competition started. All records are stored in UTC time zone 10853 * @member {Date} actualStartDate 10854 */ 10855 10856ContestAllOf.prototype['actualStartDate'] = undefined; 10857/** 10858 * ISO8601 timestamp for when a Competition ended. All records are stored in UTC time zone 10859 * @member {Date} actualEndDate 10860 */ 10861 10862ContestAllOf.prototype['actualEndDate'] = undefined; 10863/** 10864 * @member {module:model/Strategy} strategies 10865 */ 10866 10867ContestAllOf.prototype['strategies'] = undefined; 10868/** 10869 * @member {module:model/ContestStatus} status 10870 */ 10871 10872ContestAllOf.prototype['status'] = undefined; 10873/** 10874 * The code of the contest 10875 * @member {Number} statusCode 10876 */ 10877 10878ContestAllOf.prototype['statusCode'] = undefined; 10879/** 10880 * @member {module:model/DependantOn} memberTagsFilter 10881 */ 10882 10883ContestAllOf.prototype['memberTagsFilter'] = undefined; 10884/** 10885 * Additional constraints 10886 * @member {Array.<String>} constraints 10887 */ 10888 10889ContestAllOf.prototype['constraints'] = undefined; 10890/** 10891 * Link to the banner 10892 * @member {String} bannerLink 10893 */ 10894 10895ContestAllOf.prototype['bannerLink'] = undefined; 10896/** 10897 * Link to the bannerHighResolution 10898 * @member {String} bannerHighResolutionLink 10899 */ 10900 10901ContestAllOf.prototype['bannerHighResolutionLink'] = undefined; 10902/** 10903 * Link to the bannerLowResolution 10904 * @member {String} bannerLowResolutionLink 10905 */ 10906 10907ContestAllOf.prototype['bannerLowResolutionLink'] = undefined; 10908/** 10909 * Link to the icon 10910 * @member {String} iconLink 10911 */ 10912 10913ContestAllOf.prototype['iconLink'] = undefined; 10914var _default = ContestAllOf; 10915exports["default"] = _default; 10916},{"../ApiClient":3,"./ContestStatus":56,"./DependantOn":60,"./OptinStatus":129,"./RoundType":151,"./Strategy":162}],52:[function(require,module,exports){ 10917"use strict"; 10918 10919Object.defineProperty(exports, "__esModule", { 10920 value: true 10921}); 10922exports["default"] = void 0; 10923 10924var _ApiClient = _interopRequireDefault(require("../ApiClient")); 10925 10926var _DateRange = _interopRequireDefault(require("./DateRange")); 10927 10928var _NumberRange = _interopRequireDefault(require("./NumberRange")); 10929 10930var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 10931 10932function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 10933 10934function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 10935 10936function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 10937 10938function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 10939 10940/** 10941 * The ContestFilter model module. 10942 * @module model/ContestFilter 10943 * @version 1.0.14 10944 */ 10945var ContestFilter = /*#__PURE__*/function () { 10946 /** 10947 * Constructs a new <code>ContestFilter</code>. 10948 * Filter to trim results from list of Contets 10949 * @alias module:model/ContestFilter 10950 */ 10951 function ContestFilter() { 10952 _classCallCheck(this, ContestFilter); 10953 10954 ContestFilter.initialize(this); 10955 } 10956 /** 10957 * Initializes the fields of this object. 10958 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 10959 * Only for internal use. 10960 */ 10961 10962 10963 _createClass(ContestFilter, null, [{ 10964 key: "initialize", 10965 value: function initialize(obj) {} 10966 /** 10967 * Constructs a <code>ContestFilter</code> from a plain JavaScript object, optionally creating a new instance. 10968 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 10969 * @param {Object} data The plain JavaScript object bearing properties of interest. 10970 * @param {module:model/ContestFilter} obj Optional instance to populate. 10971 * @return {module:model/ContestFilter} The populated <code>ContestFilter</code> instance. 10972 */ 10973 10974 }, { 10975 key: "constructFromObject", 10976 value: function constructFromObject(data, obj) { 10977 if (data) { 10978 obj = obj || new ContestFilter(); 10979 10980 if (data.hasOwnProperty('productIds')) { 10981 obj['productIds'] = _ApiClient["default"].convertToType(data['productIds'], ['String']); 10982 } 10983 10984 if (data.hasOwnProperty('tags')) { 10985 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 10986 } 10987 10988 if (data.hasOwnProperty('startDate')) { 10989 obj['startDate'] = _DateRange["default"].constructFromObject(data['startDate']); 10990 } 10991 10992 if (data.hasOwnProperty('endDate')) { 10993 obj['endDate'] = _DateRange["default"].constructFromObject(data['endDate']); 10994 } 10995 10996 if (data.hasOwnProperty('sortBy')) { 10997 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 10998 } 10999 11000 if (data.hasOwnProperty('ids')) { 11001 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 11002 } 11003 11004 if (data.hasOwnProperty('competitionIds')) { 11005 obj['competitionIds'] = _ApiClient["default"].convertToType(data['competitionIds'], ['String']); 11006 } 11007 11008 if (data.hasOwnProperty('skip')) { 11009 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 11010 } 11011 11012 if (data.hasOwnProperty('limit')) { 11013 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 11014 } 11015 11016 if (data.hasOwnProperty('statusCode')) { 11017 obj['statusCode'] = _NumberRange["default"].constructFromObject(data['statusCode']); 11018 } 11019 11020 if (data.hasOwnProperty('constraints')) { 11021 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 11022 } 11023 } 11024 11025 return obj; 11026 } 11027 }]); 11028 11029 return ContestFilter; 11030}(); 11031/** 11032 * @member {Array.<String>} productIds 11033 */ 11034 11035 11036ContestFilter.prototype['productIds'] = undefined; 11037/** 11038 * @member {Array.<String>} tags 11039 */ 11040 11041ContestFilter.prototype['tags'] = undefined; 11042/** 11043 * @member {module:model/DateRange} startDate 11044 */ 11045 11046ContestFilter.prototype['startDate'] = undefined; 11047/** 11048 * @member {module:model/DateRange} endDate 11049 */ 11050 11051ContestFilter.prototype['endDate'] = undefined; 11052/** 11053 * @member {Array.<module:model/QuerySortBy>} sortBy 11054 */ 11055 11056ContestFilter.prototype['sortBy'] = undefined; 11057/** 11058 * @member {Array.<String>} ids 11059 */ 11060 11061ContestFilter.prototype['ids'] = undefined; 11062/** 11063 * @member {Array.<String>} competitionIds 11064 */ 11065 11066ContestFilter.prototype['competitionIds'] = undefined; 11067/** 11068 * @member {Number} skip 11069 */ 11070 11071ContestFilter.prototype['skip'] = undefined; 11072/** 11073 * @member {Number} limit 11074 */ 11075 11076ContestFilter.prototype['limit'] = undefined; 11077/** 11078 * @member {module:model/NumberRange} statusCode 11079 */ 11080 11081ContestFilter.prototype['statusCode'] = undefined; 11082/** 11083 * Specify the constraints that need to be applied to the filter. 11084 * @member {Array.<String>} constraints 11085 */ 11086 11087ContestFilter.prototype['constraints'] = undefined; 11088var _default = ContestFilter; 11089exports["default"] = _default; 11090},{"../ApiClient":3,"./DateRange":58,"./NumberRange":124,"./QuerySortBy":141}],53:[function(require,module,exports){ 11091"use strict"; 11092 11093Object.defineProperty(exports, "__esModule", { 11094 value: true 11095}); 11096exports["default"] = void 0; 11097 11098var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11099 11100var _ContestStatus = _interopRequireDefault(require("./ContestStatus")); 11101 11102var _RewardReduced = _interopRequireDefault(require("./RewardReduced")); 11103 11104function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11105 11106function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11107 11108function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11109 11110function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11111 11112/** 11113 * The ContestReduced model module. 11114 * @module model/ContestReduced 11115 * @version 1.0.14 11116 */ 11117var ContestReduced = /*#__PURE__*/function () { 11118 /** 11119 * Constructs a new <code>ContestReduced</code>. 11120 * @alias module:model/ContestReduced 11121 */ 11122 function ContestReduced() { 11123 _classCallCheck(this, ContestReduced); 11124 11125 ContestReduced.initialize(this); 11126 } 11127 /** 11128 * Initializes the fields of this object. 11129 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11130 * Only for internal use. 11131 */ 11132 11133 11134 _createClass(ContestReduced, null, [{ 11135 key: "initialize", 11136 value: function initialize(obj) {} 11137 /** 11138 * Constructs a <code>ContestReduced</code> from a plain JavaScript object, optionally creating a new instance. 11139 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11140 * @param {Object} data The plain JavaScript object bearing properties of interest. 11141 * @param {module:model/ContestReduced} obj Optional instance to populate. 11142 * @return {module:model/ContestReduced} The populated <code>ContestReduced</code> instance. 11143 */ 11144 11145 }, { 11146 key: "constructFromObject", 11147 value: function constructFromObject(data, obj) { 11148 if (data) { 11149 obj = obj || new ContestReduced(); 11150 11151 if (data.hasOwnProperty('competitionId')) { 11152 obj['competitionId'] = _ApiClient["default"].convertToType(data['competitionId'], 'String'); 11153 } 11154 11155 if (data.hasOwnProperty('row')) { 11156 obj['row'] = _ApiClient["default"].convertToType(data['row'], 'Number'); 11157 } 11158 11159 if (data.hasOwnProperty('name')) { 11160 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 11161 } 11162 11163 if (data.hasOwnProperty('round')) { 11164 obj['round'] = _ApiClient["default"].convertToType(data['round'], 'Number'); 11165 } 11166 11167 if (data.hasOwnProperty('groupStage')) { 11168 obj['groupStage'] = _ApiClient["default"].convertToType(data['groupStage'], 'Number'); 11169 } 11170 11171 if (data.hasOwnProperty('entrantsFromContest')) { 11172 obj['entrantsFromContest'] = _ApiClient["default"].convertToType(data['entrantsFromContest'], ['String']); 11173 } 11174 11175 if (data.hasOwnProperty('status')) { 11176 obj['status'] = _ContestStatus["default"].constructFromObject(data['status']); 11177 } 11178 11179 if (data.hasOwnProperty('statusCode')) { 11180 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 11181 } 11182 11183 if (data.hasOwnProperty('scheduledStartDate')) { 11184 obj['scheduledStartDate'] = _ApiClient["default"].convertToType(data['scheduledStartDate'], 'Date'); 11185 } 11186 11187 if (data.hasOwnProperty('scheduledEndDate')) { 11188 obj['scheduledEndDate'] = _ApiClient["default"].convertToType(data['scheduledEndDate'], 'Date'); 11189 } 11190 11191 if (data.hasOwnProperty('actualStartDate')) { 11192 obj['actualStartDate'] = _ApiClient["default"].convertToType(data['actualStartDate'], 'Date'); 11193 } 11194 11195 if (data.hasOwnProperty('actualEndDate')) { 11196 obj['actualEndDate'] = _ApiClient["default"].convertToType(data['actualEndDate'], 'Date'); 11197 } 11198 11199 if (data.hasOwnProperty('tags')) { 11200 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 11201 } 11202 11203 if (data.hasOwnProperty('rewards')) { 11204 obj['rewards'] = _ApiClient["default"].convertToType(data['rewards'], [_RewardReduced["default"]]); 11205 } 11206 } 11207 11208 return obj; 11209 } 11210 }]); 11211 11212 return ContestReduced; 11213}(); 11214/** 11215 * A unique identifier of a Competition 11216 * @member {String} competitionId 11217 */ 11218 11219 11220ContestReduced.prototype['competitionId'] = undefined; 11221/** 11222 * The row number for displaying the Contest in a table 11223 * @member {Number} row 11224 */ 11225 11226ContestReduced.prototype['row'] = undefined; 11227/** 11228 * A name for the Contest. Can be translated 11229 * @member {String} name 11230 */ 11231 11232ContestReduced.prototype['name'] = undefined; 11233/** 11234 * To what round does the contest belong 11235 * @member {Number} round 11236 */ 11237 11238ContestReduced.prototype['round'] = undefined; 11239/** 11240 * Is used for more complex Competitions e.g. multi round competitions where round 1 group stage matched round 2 11241 * @member {Number} groupStage 11242 */ 11243 11244ContestReduced.prototype['groupStage'] = undefined; 11245/** 11246 * A list of Ziqni contest identifiers to allow contests chaining. When a Progression competition is active and
11246you have a 2 round competition the first round has to reference the second round then this parameter becomes mandatory instead of Optional. 11247 * @member {Array.<String>} entrantsFromContest 11248 */ 11249 11250ContestReduced.prototype['entrantsFromContest'] = undefined; 11251/** 11252 * @member {module:model/ContestStatus} status 11253 */ 11254 11255ContestReduced.prototype['status'] = undefined; 11256/** 11257 * The code of the contest 11258 * @member {Number} statusCode 11259 */ 11260 11261ContestReduced.prototype['statusCode'] = undefined; 11262/** 11263 * ISO8601 timestamp for when a Contest should start. All records are stored in UTC time zone 11264 * @member {Date} scheduledStartDate 11265 */ 11266 11267ContestReduced.prototype['scheduledStartDate'] = undefined; 11268/** 11269 * ISO8601 timestamp for when a Contest should end. All records are stored in UTC time zone 11270 * @member {Date} scheduledEndDate 11271 */ 11272 11273ContestReduced.prototype['scheduledEndDate'] = undefined; 11274/** 11275 * ISO8601 timestamp for when a Contest started. All records are stored in UTC time zone 11276 * @member {Date} actualStartDate 11277 */ 11278 11279ContestReduced.prototype['actualStartDate'] = undefined; 11280/** 11281 * ISO8601 timestamp for when a Contest ended. All records are stored in UTC time zone 11282 * @member {Date} actualEndDate 11283 */ 11284 11285ContestReduced.prototype['actualEndDate'] = undefined; 11286/** 11287 * A list of id's used to tag 11288 * @member {Array.<String>} tags 11289 */ 11290 11291ContestReduced.prototype['tags'] = undefined; 11292/** 11293 * @member {Array.<module:model/RewardReduced>} rewards 11294 */ 11295 11296ContestReduced.prototype['rewards'] = undefined; 11297var _default = ContestReduced; 11298exports["default"] = _default; 11299},{"../ApiClient":3,"./ContestStatus":56,"./RewardReduced":146}],54:[function(require,module,exports){ 11300"use strict"; 11301 11302Object.defineProperty(exports, "__esModule", { 11303 value: true 11304}); 11305exports["default"] = void 0; 11306 11307var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11308 11309var _ContestFilter = _interopRequireDefault(require("./ContestFilter")); 11310 11311function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11312 11313function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11314 11315function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11316 11317function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11318 11319/** 11320 * The ContestRequest model module. 11321 * @module model/ContestRequest 11322 * @version 1.0.14 11323 */ 11324var ContestRequest = /*#__PURE__*/function () { 11325 /** 11326 * Constructs a new <code>ContestRequest</code>. 11327 * This is a request to get Contest 11328 * @alias module:model/ContestRequest 11329 */ 11330 function ContestRequest() { 11331 _classCallCheck(this, ContestRequest); 11332 11333 ContestRequest.initialize(this); 11334 } 11335 /** 11336 * Initializes the fields of this object. 11337 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11338 * Only for internal use. 11339 */ 11340 11341 11342 _createClass(ContestRequest, null, [{ 11343 key: "initialize", 11344 value: function initialize(obj) {} 11345 /** 11346 * Constructs a <code>ContestRequest</code> from a plain JavaScript object, optionally creating a new instance. 11347 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11348 * @param {Object} data The plain JavaScript object bearing properties of interest. 11349 * @param {module:model/ContestRequest} obj Optional instance to populate. 11350 * @return {module:model/ContestRequest} The populated <code>ContestRequest</code> instance. 11351 */ 11352 11353 }, { 11354 key: "constructFromObject", 11355 value: function constructFromObject(data, obj) { 11356 if (data) { 11357 obj = obj || new ContestRequest(); 11358 11359 if (data.hasOwnProperty('languageKey')) { 11360 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 11361 } 11362 11363 if (data.hasOwnProperty('contestFilter')) { 11364 obj['contestFilter'] = _ContestFilter["default"].constructFromObject(data['contestFilter']); 11365 } 11366 } 11367 11368 return obj; 11369 } 11370 }]); 11371 11372 return ContestRequest; 11373}(); 11374/** 11375 * The language codes can be found in the settings/transalations section of the back office 11376 * @member {String} languageKey 11377 */ 11378 11379 11380ContestRequest.prototype['languageKey'] = undefined; 11381/** 11382 * @member {module:model/ContestFilter} contestFilter 11383 */ 11384 11385ContestRequest.prototype['contestFilter'] = undefined; 11386var _default = ContestRequest; 11387exports["default"] = _default; 11388},{"../ApiClient":3,"./ContestFilter":52}],55:[function(require,module,exports){ 11389"use strict"; 11390 11391Object.defineProperty(exports, "__esModule", { 11392 value: true 11393}); 11394exports["default"] = void 0; 11395 11396var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11397 11398var _Contest = _interopRequireDefault(require("./Contest")); 11399 11400var _Error = _interopRequireDefault(require("./Error")); 11401 11402var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 11403 11404function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11405 11406function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11407 11408function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11409 11410function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11411 11412/** 11413 * The ContestResponse model module. 11414 * @module model/ContestResponse 11415 * @version 1.0.14 11416 */ 11417var ContestResponse = /*#__PURE__*/function () { 11418 /** 11419 * Constructs a new <code>ContestResponse</code>. 11420 * This is a Contest Response 11421 * @alias module:model/ContestResponse 11422 */ 11423 function ContestResponse() { 11424 _classCallCheck(this, ContestResponse); 11425 11426 ContestResponse.initialize(this); 11427 } 11428 /** 11429 * Initializes the fields of this object. 11430 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11431 * Only for internal use. 11432 */ 11433 11434 11435 _createClass(ContestResponse, null, [{ 11436 key: "initialize", 11437 value: function initialize(obj) {} 11438 /** 11439 * Constructs a <code>ContestResponse</code> from a plain JavaScript object, optionally creating a new instance. 11440 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11441 * @param {Object} data The plain JavaScript object bearing properties of interest. 11442 * @param {module:model/ContestResponse} obj Optional instance to populate. 11443 * @return {module:model/ContestResponse} The populated <code>ContestResponse</code> instance. 11444 */ 11445 11446 }, { 11447 key: "constructFromObject", 11448 value: function constructFromObject(data, obj) { 11449 if (data) { 11450 obj = obj || new ContestResponse(); 11451 11452 if (data.hasOwnProperty('meta')) { 11453 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 11454 } 11455 11456 if (data.hasOwnProperty('data')) { 11457 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Contest["default"]]); 11458 } 11459 11460 if (data.hasOwnProperty('errors')) { 11461 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 11462 } 11463 } 11464 11465 return obj; 11466 } 11467 }]); 11468 11469 return ContestResponse; 11470}(); 11471/** 11472 * @member {module:model/ResponseMeta} meta 11473 */ 11474 11475 11476ContestResponse.prototype['meta'] = undefined; 11477/** 11478 * @member {Array.<module:model/Contest>} data 11479 */ 11480 11481ContestResponse.prototype['data'] = undefined; 11482/** 11483 * @member {Array.<module:model/Error>} errors 11484 */ 11485 11486ContestResponse.prototype['errors'] = undefined; 11487var _default = ContestResponse; 11488exports["default"] = _default; 11489},{"../ApiClient":3,"./Contest":50,"./Error":74,"./ResponseMeta":144}],56:[function(require,module,exports){ 11490"use strict"; 11491 11492Object.defineProperty(exports, "__esModule", { 11493 value: true 11494}); 11495exports["default"] = void 0; 11496 11497var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11498 11499function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11500 11501function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11502 11503function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11504 11505function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11506 11507function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 11508 11509/** 11510* Enum class ContestStatus. 11511* @enum {} 11512* @readonly 11513*/ 11514var ContestStatus = /*#__PURE__*/function () { 11515 function ContestStatus() { 11516 _classCallCheck(this, ContestStatus); 11517 11518 _defineProperty(this, "Unknown", "Unknown"); 11519 11520 _defineProperty(this, "Deleting", "Deleting"); 11521 11522 _defineProperty(this, "Deleted", "Deleted"); 11523 11524 _defineProperty(this, "Draft", "Draft"); 11525 11526 _defineProperty(this, "Template", "Template"); 11527 11528 _defineProperty(this, "Preparing", "Preparing"); 11529 11530 _defineProperty(this, "Ready", "Ready"); 11531 11532 _defineProperty(this, "Starting", "Starting"); 11533 11534 _defineProperty(this, "Active", "Active"); 11535
11536 _defineProperty(this, "Finishing", "Finishing"); 11537 11538 _defineProperty(this, "Finished", "Finished"); 11539 11540 _defineProperty(this, "Cancelling", "Cancelling"); 11541 11542 _defineProperty(this, "Cancelled", "Cancelled"); 11543 11544 _defineProperty(this, "Finalising", "Finalising"); 11545 11546 _defineProperty(this, "Finalised", "Finalised"); 11547 } 11548 11549 _createClass(ContestStatus, null, [{ 11550 key: "constructFromObject", 11551 value: 11552 /** 11553 * Returns a <code>ContestStatus</code> enum value from a Javascript object name. 11554 * @param {Object} data The plain JavaScript object containing the name of the enum value. 11555 * @return {module:model/ContestStatus} The enum <code>ContestStatus</code> value. 11556 */ 11557 function constructFromObject(object) { 11558 return object; 11559 } 11560 }]); 11561 11562 return ContestStatus; 11563}(); 11564 11565exports["default"] = ContestStatus; 11566},{"../ApiClient":3}],57:[function(require,module,exports){ 11567"use strict"; 11568 11569Object.defineProperty(exports, "__esModule", { 11570 value: true 11571}); 11572exports["default"] = void 0; 11573 11574var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11575 11576function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11577 11578function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11579 11580function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11581 11582function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11583 11584/** 11585 * The CustomFields model module. 11586 * @module model/CustomFields 11587 * @version 1.0.14 11588 */ 11589var CustomFields = /*#__PURE__*/function () { 11590 /** 11591 * Constructs a new <code>CustomFields</code>. 11592 * @alias module:model/CustomFields 11593 */ 11594 function CustomFields() { 11595 _classCallCheck(this, CustomFields); 11596 11597 CustomFields.initialize(this); 11598 } 11599 /** 11600 * Initializes the fields of this object. 11601 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11602 * Only for internal use. 11603 */ 11604 11605 11606 _createClass(CustomFields, null, [{ 11607 key: "initialize", 11608 value: function initialize(obj) {} 11609 /** 11610 * Constructs a <code>CustomFields</code> from a plain JavaScript object, optionally creating a new instance. 11611 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11612 * @param {Object} data The plain JavaScript object bearing properties of interest. 11613 * @param {module:model/CustomFields} obj Optional instance to populate. 11614 * @return {module:model/CustomFields} The populated <code>CustomFields</code> instance. 11615 */ 11616 11617 }, { 11618 key: "constructFromObject", 11619 value: function constructFromObject(data, obj) { 11620 if (data) { 11621 obj = obj || new CustomFields(); 11622 11623 if (data.hasOwnProperty('customFields')) { 11624 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 11625 'String': Object 11626 }); 11627 } 11628 } 11629 11630 return obj; 11631 } 11632 }]); 11633 11634 return CustomFields; 11635}(); 11636/** 11637 * @member {Object.<String, Object>} customFields 11638 */ 11639 11640 11641CustomFields.prototype['customFields'] = undefined; 11642var _default = CustomFields; 11643exports["default"] = _default; 11644},{"../ApiClient":3}],58:[function(require,module,exports){ 11645"use strict"; 11646 11647Object.defineProperty(exports, "__esModule", { 11648 value: true 11649}); 11650exports["default"] = void 0; 11651 11652var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11653 11654function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11655 11656function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11657 11658function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11659 11660function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11661 11662/** 11663 * The DateRange model module. 11664 * @module model/DateRange 11665 * @version 1.0.14 11666 */ 11667var DateRange = /*#__PURE__*/function () { 11668 /** 11669 * Constructs a new <code>DateRange</code>. 11670 * @alias module:model/DateRange 11671 */ 11672 function DateRange() { 11673 _classCallCheck(this, DateRange); 11674 11675 DateRange.initialize(this); 11676 } 11677 /** 11678 * Initializes the fields of this object. 11679 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11680 * Only for internal use. 11681 */ 11682 11683 11684 _createClass(DateRange, null, [{ 11685 key: "initialize", 11686 value: function initialize(obj) {} 11687 /** 11688 * Constructs a <code>DateRange</code> from a plain JavaScript object, optionally creating a new instance. 11689 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11690 * @param {Object} data The plain JavaScript object bearing properties of interest. 11691 * @param {module:model/DateRange} obj Optional instance to populate. 11692 * @return {module:model/DateRange} The populated <code>DateRange</code> instance. 11693 */ 11694 11695 }, { 11696 key: "constructFromObject", 11697 value: function constructFromObject(data, obj) { 11698 if (data) { 11699 obj = obj || new DateRange(); 11700 11701 if (data.hasOwnProperty('before')) { 11702 obj['before'] = _ApiClient["default"].convertToType(data['before'], 'Date'); 11703 } 11704 11705 if (data.hasOwnProperty('after')) { 11706 obj['after'] = _ApiClient["default"].convertToType(data['after'], 'Date'); 11707 } 11708 } 11709 11710 return obj; 11711 } 11712 }]); 11713 11714 return DateRange; 11715}(); 11716/** 11717 * @member {Date} before 11718 */ 11719 11720 11721DateRange.prototype['before'] = undefined; 11722/** 11723 * @member {Date} after 11724 */ 11725 11726DateRange.prototype['after'] = undefined; 11727var _default = DateRange; 11728exports["default"] = _default; 11729},{"../ApiClient":3}],59:[function(require,module,exports){ 11730"use strict"; 11731 11732Object.defineProperty(exports, "__esModule", { 11733 value: true 11734}); 11735exports["default"] = void 0; 11736 11737var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11738 11739var _DependantOn = _interopRequireDefault(require("./DependantOn")); 11740 11741function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11742 11743function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11744 11745function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11746 11747function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11748 11749/** 11750 * The Dependancy model module. 11751 * @module model/Dependancy 11752 * @version 1.0.14 11753 */ 11754var Dependancy = /*#__PURE__*/function () { 11755 /** 11756 * Constructs a new <code>Dependancy</code>. 11757 * @alias module:model/Dependancy 11758 */
11759 function Dependancy() { 11760 _classCallCheck(this, Dependancy); 11761 11762 Dependancy.initialize(this); 11763 } 11764 /** 11765 * Initializes the fields of this object. 11766 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11767 * Only for internal use. 11768 */ 11769 11770 11771 _createClass(Dependancy, null, [{ 11772 key: "initialize", 11773 value: function initialize(obj) {} 11774 /** 11775 * Constructs a <code>Dependancy</code> from a plain JavaScript object, optionally creating a new instance. 11776 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11777 * @param {Object} data The plain JavaScript object bearing properties of interest. 11778 * @param {module:model/Dependancy} obj Optional instance to populate. 11779 * @return {module:model/Dependancy} The populated <code>Dependancy</code> instance. 11780 */ 11781 11782 }, { 11783 key: "constructFromObject", 11784 value: function constructFromObject(data, obj) { 11785 if (data) { 11786 obj = obj || new Dependancy(); 11787 11788 if (data.hasOwnProperty('entityType')) { 11789 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 11790 } 11791 11792 if (data.hasOwnProperty('dependantOn')) { 11793 obj['dependantOn'] = _DependantOn["default"].constructFromObject(data['depen
11793dantOn']); 11794 } 11795 } 11796 11797 return obj; 11798 } 11799 }]); 11800 11801 return Dependancy; 11802}(); 11803/** 11804 * A model that will have dependancies implemented 11805 * @member {String} entityType 11806 */ 11807 11808 11809Dependancy.prototype['entityType'] = undefined; 11810/** 11811 * @member {module:model/DependantOn} dependantOn 11812 */ 11813 11814Dependancy.prototype['dependantOn'] = undefined; 11815var _default = Dependancy; 11816exports["default"] = _default; 11817},{"../ApiClient":3,"./DependantOn":60}],60:[function(require,module,exports){ 11818"use strict"; 11819 11820Object.defineProperty(exports, "__esModule", { 11821 value: true 11822}); 11823exports["default"] = void 0; 11824 11825var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11826 11827function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11828 11829function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11830 11831function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11832 11833function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11834 11835/** 11836 * The DependantOn model module. 11837 * @module model/DependantOn 11838 * @version 1.0.14 11839 */ 11840var DependantOn = /*#__PURE__*/function () { 11841 /** 11842 * Constructs a new <code>DependantOn</code>. 11843 * @alias module:model/DependantOn 11844 */ 11845 function DependantOn() { 11846 _classCallCheck(this, DependantOn); 11847 11848 DependantOn.initialize(this); 11849 } 11850 /** 11851 * Initializes the fields of this object. 11852 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11853 * Only for internal use. 11854 */ 11855 11856 11857 _createClass(DependantOn, null, [{ 11858 key: "initialize", 11859 value: function initialize(obj) {} 11860 /** 11861 * Constructs a <code>DependantOn</code> from a plain JavaScript object, optionally creating a new instance. 11862 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11863 * @param {Object} data The plain JavaScript object bearing properties of interest. 11864 * @param {module:model/DependantOn} obj Optional instance to populate. 11865 * @return {module:model/DependantOn} The populated <code>DependantOn</code> instance. 11866 */ 11867 11868 }, { 11869 key: "constructFromObject", 11870 value: function constructFromObject(data, obj) { 11871 if (data) { 11872 obj = obj || new DependantOn(); 11873 11874 if (data.hasOwnProperty('must')) { 11875 obj['must'] = _ApiClient["default"].convertToType(data['must'], ['String']); 11876 } 11877 11878 if (data.hasOwnProperty('mustNot')) { 11879 obj['mustNot'] = _ApiClient["default"].convertToType(data['mustNot'], ['String']); 11880 } 11881 11882 if (data.hasOwnProperty('should')) { 11883 obj['should'] = _ApiClient["default"].convertToType(data['should'], ['String']); 11884 } 11885 11886 if (data.hasOwnProperty('shouldMatchAtLeast')) { 11887 obj['shouldMatchAtLeast'] = _ApiClient["default"].convertToType(data['shouldMatchAtLeast'], 'Number'); 11888 } 11889 } 11890 11891 return obj; 11892 } 11893 }]); 11894 11895 return DependantOn; 11896}(); 11897/** 11898 * A rule indicating that it has to be included. Players that are in the EU group with a MUST rule - that means only players that have that group can participate 11899 * @member {Array.<String>} must 11900 */ 11901 11902 11903DependantOn.prototype['must'] = undefined; 11904/** 11905 * A rule indicating that it will not be included. Players that are in the EU group with a MUST-NOT rule - that means that players that have that group can NOT participate 11906 * @member {Array.<String>} mustNot 11907 */ 11908 11909DependantOn.prototype['mustNot'] = undefined; 11910/** 11911 * A rule indicating that some of them have to be included. Dependancy on shouldMatchAtLeast parameter. Players that are in the EU and DE groups with a SHOULD rule and a shouldMatchAtLeast with a value of 1 - that means that players that have 1 of the groups can participate 11912 * @member {Array.<String>} should 11913 */ 11914 11915DependantOn.prototype['should'] = undefined; 11916/** 11917 * Dependant on should. Triggered when 2 or more should parameters selected 11918 * @member {Number} shouldMatchAtLeast 11919 */ 11920 11921DependantOn.prototype['shouldMatchAtLeast'] = undefined; 11922var _default = DependantOn; 11923exports["default"] = _default; 11924},{"../ApiClient":3}],61:[function(require,module,exports){ 11925"use strict"; 11926 11927Object.defineProperty(exports, "__esModule", { 11928 value: true 11929}); 11930exports["default"] = void 0; 11931 11932var _ApiClient = _interopRequireDefault(require("../ApiClient")); 11933 11934function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 11935 11936function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 11937 11938function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 11939 11940function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 11941 11942/** 11943 * The EntityChanged model module. 11944 * @module model/EntityChanged 11945 * @version 1.0.14 11946 */ 11947var EntityChanged = /*#__PURE__*/function () { 11948 /** 11949 * Constructs a new <code>EntityChanged</code>. 11950 * @alias module:model/EntityChanged 11951 */ 11952 function EntityChanged() { 11953 _classCallCheck(this, EntityChanged); 11954 11955 EntityChanged.initialize(this); 11956 } 11957 /** 11958 * Initializes the fields of this object. 11959 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 11960 * Only for internal use. 11961 */ 11962 11963 11964 _createClass(EntityChanged, null, [{ 11965 key: "initialize", 11966 value: function initialize(obj) {} 11967 /** 11968 * Constructs a <code>EntityChanged</code> from a plain JavaScript object, optionally creating a new instance. 11969 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 11970 * @param {Object} data The plain JavaScript object bearing properties of interest. 11971 * @param {module:model/EntityChanged} obj Optional instance to populate. 11972 * @return {module:model/EntityChanged} The populated <code>EntityChanged</code> instance. 11973 */ 11974 11975 }, { 11976 key: "constructFromObject", 11977 value: function constructFromObject(data, obj) { 11978 if (data) { 11979 obj = obj || new EntityChanged(); 11980 11981 if (data.hasOwnProperty('entityId')) { 11982 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 11983 } 11984 11985 if (data.hasOwnProperty('entityType')) { 11986 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 11987 } 11988 11989 if (data.hasOwnProperty('changedAt')) { 11990 obj['changedAt'] = _ApiClient["default"].convertToType(data['changedAt'], 'Date'); 11991 } 11992 11993 if (data.hasOwnProperty('typeOffChange')) { 11994 obj['typeOffChange'] = _ApiClient["default"].convertToType(data['typeOffChange'], 'Number'); 11995 } 11996 11997 if (data.hasOwnProperty('changedBy')) { 11998 obj['changedBy'] = _ApiClient["default"].convertToType(data['changedBy'], 'String'); 11999 } 12000 12001 if (data.hasOwnProperty('displayName')) { 12002 obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String'); 12003 } 12004 12005 if (data.hasOwnProperty('accountId')) { 12006 obj['accountId'] = _ApiClient["default"].convertToType(data['accountId'], 'String'); 12007 } 12008 12009 if (data.hasOwnProperty('sequenceNumber')) { 12010 obj['sequenceNumber'] = _ApiClient["default"].convertToType(data['sequenceNumber'], 'Number'); 12011 } 12012 12013 if (data.hasOwnProperty('entityRefId')) { 12014 obj['entityRefId'] = _ApiClient["default"].convertToType(data['entityRefId'], 'String'); 12015 } 12016 12017 if (data.hasOwnProperty('entityParentId')) { 12018 obj['entityParentId'] = _ApiClient["default"].convertToType(data['entityParentId'], 'String'); 12019 } 12020 12021 if (data.hasOwnProperty('metadata')) { 12022 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 12023 'String': Object 12024 }); 12025 } 12026 } 12027 12028 return obj; 12029 } 12030 }]); 12031 12032 return EntityChanged; 12033}(); 12034/** 12035 * @member {String} entityId 12036 */ 12037 12038 12039EntityChanged.prototype['entityId'] = undefined; 12040/** 12041 * @member {String} entityType 12042 */ 12043 12044EntityChanged.prototype['entityType'] = undefined; 12045/** 12046 * @member {Date} changedAt 12047 */ 12048 12049EntityChanged.prototype['changedAt'] = undefined; 12050/** 12051 * @member {Number} typeOffChange 12052 */ 12053 12054EntityChanged.prototype['typeOffChange'] = undefined; 12055/** 12056 * @member {String} changedBy 12057 */ 12058 12059EntityChanged.prototype['changedBy'] = undefined; 12060/** 12061 * @member {String} displayName 12062 */ 12063 12064EntityChanged.prototype['displayName'] = undefined; 12065/** 12066 * @member {String} accountId 12067 */ 12068 12069EntityChanged.prototype['accountId'] = undefined; 12070/** 12071 * @member {Number} sequenceNumber 12072 */ 12073 12074EntityChanged.prototype['sequenceNumber'] = undefined; 12075/** 12076 * @member {String} entityRefId 12077 */ 12078 12079EntityChanged.prototype['entityRefId'] = undefined; 12080/** 12081 * @member {String} entityParentId 12082 */ 12083 12084EntityChanged.prototype['entityParentId'] = undefined; 12085/** 12086 * @member {Object.<String, Object>} metadata 12087 */ 12088 12089EntityChanged.prototype['metadata'] = undefined; 12090var _default = EntityChanged; 12091exports["default"] = _default; 12092},{"../ApiClient":3}],62:[function(require,module,exports){ 12093"use strict"; 12094 12095Object.defineProperty(exports, "__esModule", { 12096 value: true 12097}); 12098exports["default"] = void 0; 12099 12100var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12101 12102function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12103 12104function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12105 12106function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12107 12108function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12109 12110/** 12111 * The EntityFilter model module. 12112 * @module model/EntityFilter 12113 * @version 1.0.14 12114 */ 12115var EntityFilter = /*#__PURE__*/function () { 12116 /** 12117 * Constructs a new <code>EntityFilter</code>. 12118 * @alias module:model/EntityFilter 12119 */ 12120 function EntityFilter() { 12121 _classCallCheck(this, EntityFilter); 12122 12123 EntityFilter.initialize(this); 12124 } 12125 /** 12126 * Initializes the fields of this object. 12127 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 12128 * Only for internal use. 12129 */ 12130 12131 12132 _createClass(EntityFilter, null, [{ 12133 key: "initialize", 12134 value: function initialize(obj) {} 12135 /** 12136 * Constructs a <code>EntityFilter</code> from a plain JavaScript object, optionally creating a new instance. 12137 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 12138 * @param {Object} data The plain JavaScript object bearing properties of interest. 12139 * @param {module:model/EntityFilter} obj Optional instance to populate. 12140 * @return {module:model/EntityFilter} The populated <code>EntityFilter</code> instance. 12141 */ 12142 12143 }, { 12144 key: "constructFromObject", 12145 value: function constructFromObject(data, obj) { 12146 if (data) { 12147 obj = obj || new EntityFilter(); 12148 12149 if (data.hasOwnProperty('entityType')) { 12150 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 12151 } 12152 12153 if (data.hasOwnProperty('entityIds')) { 12154 obj['entityIds'] = _ApiClient["default"].convertToType(data['entityIds'], ['String']); 12155 } 12156 } 12157 12158 return obj; 12159 } 12160 }]); 12161 12162 return EntityFilter; 12163}(); 12164/** 12165 * Achievement, Contest or Competition 12166 * @member {String} entityType 12167 */ 12168 12169 12170EntityFilter.prototype['entityType'] = undefined; 12171/** 12172 * @member {Array.<String>} entityIds 12173 */ 12174 12175EntityFilter.prototype['entityIds'] = undefined; 12176var _default = EntityFilter; 12177exports["default"] = _default; 12178},{"../ApiClient":3}],63:[function(require,module,exports){ 12179"use strict"; 12180 12181Object.defineProperty(exports, "__esModule", { 12182 value: true 12183}); 12184exports["default"] = void 0; 12185 12186var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12187 12188var _EntityGraphEdge = _interopRequireDefault(require("./EntityGraphEdge")); 12189 12190function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12191 12192function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12193 12194function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12195 12196function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12197 12198/** 12199 * The EntityGraph model module. 12200 * @module model/EntityGraph 12201 * @version 1.0.14 12202 */ 12203var EntityGraph = /*#__PURE__*/function () { 12204 /** 12205 * Constructs a new <code>EntityGraph</code>. 12206 * @alias module:model/EntityGraph 12207 */ 12208 function EntityGraph() { 12209 _classCallCheck(this, EntityGraph); 12210 12211 EntityGraph.initialize(this); 12212 } 12213 /** 12214 * Initializes the fields of this object. 12215 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 12216 * Only for internal use. 12217 */ 12218 12219 12220 _createClass(EntityGraph, null, [{ 12221 key: "initialize", 12222 value: function initialize(obj) {} 12223 /** 12224 * Constructs a <code>EntityGraph</code> from a plain JavaScript object, optionally creating a new instance. 12225 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 12226 * @param {Object} data The plain JavaScript object bearing properties of interest. 12227 * @param {module:model/EntityGraph} obj Optional instance to populate. 12228 * @return {module:model/EntityGraph} The populated <code>EntityGraph</code> instance. 12229 */ 12230 12231 }, { 12232 key: "constructFromObject", 12233 value: function constructFromObject(data, obj) { 12234 if (data) { 12235 obj = obj || new EntityGraph(); 12236 12237 if (data.hasOwnProperty('edges')) { 12238 obj['edges'] = _ApiClient["default"].convertToType(data['edges'], [_EntityGraphEdge["default"]]); 12239 } 12240 12241 if (data.hasOwnProperty('nodesInCompletedState')) {
12242 obj['nodesInCompletedState'] = _ApiClient["default"].convertToType(data['nodesInCompletedState'], 'Number'); 12243 } 12244 } 12245 12246 return obj; 12247 } 12248 }]); 12249 12250 return EntityGraph; 12251}(); 12252/** 12253 * Pairs of nodes that specify a line joining these two nodes are said to form an edge 12254 * @member {Array.<module:model/EntityGraphEdge>} edges 12255 */ 12256 12257 12258EntityGraph.prototype['edges'] = undefined; 12259/** 12260 * Nodes in this graph that are in state greater than 35 12261 * @member {Number} nodesInCompletedState 12262 */ 12263 12264EntityGraph.prototype['nodesInCompletedState'] = undefined; 12265var _default = EntityGraph; 12266exports["default"] = _default; 12267},{"../ApiClient":3,"./EntityGraphEdge":64}],64:[function(require,module,exports){ 12268"use strict"; 12269 12270Object.defineProperty(exports, "__esModule", { 12271 value: true 12272}); 12273exports["default"] = void 0; 12274 12275var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12276 12277var _EntityGraphEdgeType = _interopRequireDefault(require("./EntityGraphEdgeType")); 12278 12279function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12280 12281function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12282 12283function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12284 12285function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12286 12287/** 12288 * The EntityGraphEdge model module. 12289 * @module model/EntityGraphEdge 12290 * @version 1.0.14 12291 */ 12292var EntityGraphEdge = /*#__PURE__*/function () { 12293 /** 12294 * Constructs a new <code>EntityGraphEdge</code>. 12295 * @alias module:model/EntityGraphEdge 12296 * @param ordering {Number} 12297 */ 12298 function EntityGraphEdge(ordering) { 12299 _classCallCheck(this, EntityGraphEdge); 12300 12301 EntityGraphEdge.initialize(this, ordering); 12302 } 12303 /** 12304 * Initializes the fields of this object. 12305 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 12306 * Only for internal use. 12307 */ 12308 12309 12310 _createClass(EntityGraphEdge, null, [{ 12311 key: "initialize", 12312 value: function initialize(obj, ordering) { 12313 obj['ordering'] = ordering; 12314 } 12315 /** 12316 * Constructs a <code>EntityGraphEdge</code> from a plain JavaScript object, optionally creating a new instance. 12317 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 12318 * @param {Object} data The plain JavaScript object bearing properties of interest. 12319 * @param {module:model/EntityGraphEdge} obj Optional instance to populate. 12320 * @return {module:model/EntityGraphEdge} The populated <code>EntityGraphEdge</code> instance. 12321 */ 12322 12323 }, { 12324 key: "constructFromObject", 12325 value: function constructFromObject(data, obj) { 12326 if (data) { 12327 obj = obj || new EntityGraphEdge(); 12328 12329 if (data.hasOwnProperty('ordering')) { 12330 obj['ordering'] = _ApiClient["default"].convertToType(data['ordering'], 'Number'); 12331 } 12332 12333 if (data.hasOwnProperty('constraints')) { 12334 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 12335 } 12336 12337 if (data.hasOwnProperty('tailEntityId')) { 12338 obj['tailEntityId'] = _ApiClient["default"].convertToType(data['tailEntityId'], 'String'); 12339 } 12340 12341 if (data.hasOwnProperty('headEntityId')) { 12342 obj['headEntityId'] = _ApiClient["default"].convertToType(data['headEntityId'], 'String'); 12343 } 12344 12345 if (data.hasOwnProperty('graphEdgeType')) { 12346 obj['graphEdgeType'] = _EntityGraphEdgeType["default"].constructFromObject(data['graphEdgeType']); 12347 } 12348 } 12349 12350 return obj; 12351 } 12352 }]); 12353 12354 return EntityGraphEdge; 12355}(); 12356/** 12357 * @member {Number} ordering 12358 */ 12359 12360 12361EntityGraphEdge.prototype['ordering'] = undefined; 12362/** 12363 * @member {Array.<String>} constraints 12364 */ 12365 12366EntityGraphEdge.prototype['constraints'] = undefined; 12367/** 12368 * X the tail of the edge 12369 * @member {String} tailEntityId 12370 */ 12371 12372EntityGraphEdge.prototype['tailEntityId'] = undefined; 12373/** 12374 * Y the head of the edge. 12375 * @member {String} headEntityId 12376 */ 12377 12378EntityGraphEdge.prototype['headEntityId'] = undefined; 12379/** 12380 * @member {module:model/EntityGraphEdgeType} graphEdgeType 12381 */ 12382 12383EntityGraphEdge.prototype['graphEdgeType'] = undefined; 12384var _default = EntityGraphEdge; 12385exports["default"] = _default; 12386},{"../ApiClient":3,"./EntityGraphEdgeType":65}],65:[function(require,module,exports){ 12387"use strict"; 12388 12389Object.defineProperty(exports, "__esModule", { 12390 value: true 12391}); 12392exports["default"] = void 0; 12393 12394var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12395 12396function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12397 12398function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12399 12400function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12401 12402function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12403 12404function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 12405 12406/** 12407* Enum class EntityGraphEdgeType. 12408* @enum {} 12409* @readonly 12410*/ 12411var EntityGraphEdgeType = /*#__PURE__*/function () { 12412 function EntityGraphEdgeType() { 12413 _classCallCheck(this, EntityGraphEdgeType); 12414 12415 _defineProperty(this, "ROOT", "ROOT"); 12416 12417 _defineProperty(this, "MUST", "MUST"); 12418 12419 _defineProperty(this, "SHOULD", "SHOULD"); 12420 12421 _defineProperty(this, "MUST_NOT", "MUST_NOT"); 12422 12423 _defineProperty(this, "UNKNOWN", "UNKNOWN"); 12424 12425 _defineProperty(this, "BROKEN", "BROKEN"); 12426 } 12427 12428 _createClass(EntityGraphEdgeType, null, [{ 12429 key: "constructFromObject", 12430 value: 12431 /** 12432 * Returns a <code>EntityGraphEdgeType</code> enum value from a Javascript object name. 12433 * @param {Object}
12433 data The plain JavaScript object containing the name of the enum value. 12434 * @return {module:model/EntityGraphEdgeType} The enum <code>EntityGraphEdgeType</code> value. 12435 */ 12436 function constructFromObject(object) { 12437 return object; 12438 } 12439 }]); 12440 12441 return EntityGraphEdgeType; 12442}(); 12443 12444exports["default"] = EntityGraphEdgeType; 12445},{"../ApiClient":3}],66:[function(require,module,exports){ 12446"use strict"; 12447 12448Object.defineProperty(exports, "__esModule", { 12449 value: true 12450}); 12451exports["default"] = void 0; 12452 12453var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12454 12455var _OptinStatus = _interopRequireDefault(require("./OptinStatus")); 12456 12457function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12458 12459function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12460 12461function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12462 12463function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12464 12465/** 12466 * The EntityGraphNode model module. 12467 * @module model/EntityGraphNode 12468 * @version 1.0.14 12469 */ 12470var EntityGraphNode = /*#__PURE__*/function () { 12471 /** 12472 * Constructs a new <code>EntityGraphNode</code>. 12473 * Mission is a specialised view of connected achievements. The first achievement is the container, every dependant achievement is a chained dependency 12474 * @alias module:model/EntityGraphNode 12475 * @param optInStatus {module:model/OptinStatus} 12476 * @param entityId {String} 12477 */ 12478 function EntityGraphNode(optInStatus, entityId) { 12479 _classCallCheck(this, EntityGraphNode); 12480 12481 EntityGraphNode.initialize(this, optInStatus, entityId); 12482 } 12483 /** 12484 * Initializes the fields of this object. 12485 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 12486 * Only for internal use. 12487 */ 12488 12489 12490 _createClass(EntityGraphNode, null, [{ 12491 key: "initialize", 12492 value: function initialize(obj, optInStatus, entityId) { 12493 obj['optInStatus'] = optInStatus; 12494 obj['entityId'] = entityId; 12495 } 12496 /** 12497 * Constructs a <code>EntityGraphNode</code> from a plain JavaScript object, optionally creating a new instance. 12498 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 12499 * @param {Object} data The plain JavaScript object bearing properties of interest. 12500 * @param {module:model/EntityGraphNode} obj Optional instance to populate. 12501 * @return {module:model/EntityGraphNode} The populated <code>EntityGraphNode</code> instance. 12502 */ 12503 12504 }, { 12505 key: "constructFromObject", 12506 value: function constructFromObject(data, obj) { 12507 if (data) { 12508 obj = obj || new EntityGraphNode(); 12509 12510 if (data.hasOwnProperty('name')) { 12511 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 12512 } 12513 12514 if (data.hasOwnProperty('optInStatus')) { 12515 obj['optInStatus'] = _OptinStatus["default"].constructFromObject(data['optInStatus']); 12516 } 12517 12518 if (data.hasOwnProperty('constraints')) { 12519 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 12520 } 12521 12522 if (data.hasOwnProperty('entityType')) { 12523 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 12524 } 12525 12526 if (data.hasOwnProperty('entityId')) { 12527 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 12528 } 12529 12530 if (data.hasOwnProperty('entityStatusCode')) { 12531 obj['entityStatusCode'] = _ApiClient["default"].convertToType(data['entityStatusCode'], 'Number'); 12532 } 12533 12534 if (data.hasOwnProperty('entityStatus')) { 12535 obj['entityStatus'] = _ApiClient["default"].convertToType(data['entityStatus'], 'String'); 12536 } 12537 12538 if (data.hasOwnProperty('includes')) { 12539 obj['includes'] = _ApiClient["default"].convertToType(data['includes'], { 12540 'String': Object 12541 }); 12542 } 12543 } 12544 12545 return obj; 12546 } 12547 }]); 12548 12549 return EntityGraphNode; 12550}(); 12551/** 12552 * @member {String} name 12553 */ 12554 12555 12556EntityGraphNode.prototype['name'] = undefined; 12557/** 12558 * @member {module:model/OptinStatus} optInStatus 12559 */ 12560 12561EntityGraphNode.prototype['optInStatus'] = undefined; 12562/** 12563 * isCompleted, etc 12564 * @member {Array.<String>} constraints 12565 */ 12566 12567EntityGraphNode.prototype['constraints'] = undefined; 12568/** 12569 * @member {String} entityType 12570 */ 12571 12572EntityGraphNode.prototype['entityType'] = undefined; 12573/** 12574 * @member {String} entityId 12575 */ 12576 12577EntityGraphNode.prototype['entityId'] = undefined; 12578/** 12579 * @member {Number} entityStatusCode 12580 */ 12581 12582EntityGraphNode.prototype['entityStatusCode'] = undefined; 12583/** 12584 * @member {String} entityStatus 12585 */ 12586 12587EntityGraphNode.prototype['entityStatus'] = undefined; 12588/** 12589 * @member {Object.<String, Object>} includes 12590 */ 12591 12592EntityGraphNode.prototype['includes'] = undefined; 12593var _default = EntityGraphNode; 12594exports["default"] = _default; 12595},{"../ApiClient":3,"./OptinStatus":129}],67:[function(require,module,exports){ 12596"use strict"; 12597 12598Object.defineProperty(exports, "__esModule", { 12599 value: true 12600}); 12601exports["default"] = void 0; 12602 12603var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12604 12605var _EntityGraphTraversal = _interopRequireDefault(require("./EntityGraphTraversal")); 12606 12607var _EntityType = _interopRequireDefault(require("./EntityType")); 12608 12609function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12610 12611function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12612 12613function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12614 12615function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12616 12617/** 12618 * The EntityGraphRequest model module. 12619 * @module model/EntityGraphRequest 12620 * @version 1.0.14 12621 */ 12622var EntityGraphRequest = /*#__PURE__*/function () { 12623 /** 12624 * Constructs a new <code>EntityGraphRequest</code>. 12625 * @alias module:model/EntityGraphRequest 12626 * @param ids {Array.<String>} The identifier of the node to create a connected graph for 12627 * @param entityType {module:model/EntityType} 12628 */ 12629 function EntityGraphRequest(ids, entityType) { 12630 _classCallCheck(this, EntityGraphRequest); 12631 12632 EntityGraphRequest.initialize(this, ids, entityType); 12633 } 12634 /** 12635 * Initializes the fields of this object. 12636 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 12637 * Only for internal use. 12638 */ 12639 12640 12641 _createClass(EntityGraphRequest, null, [{ 12642 key: "initialize", 12643 value: function initialize(obj, ids, entityType) { 12644 obj['ids'] = ids; 12645 obj['entityType'] = entityType; 12646 } 12647 /** 12648 * Constructs a <code>EntityGraphRequest</code> from a plain JavaScript object, optionally creating a new instance. 12649 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 12650 * @param {Object} data The plain JavaScript object bearing properties of interest. 12651 * @param {module:model/EntityGraphRequest} obj Optional instance to populate. 12652 * @return {module:model/EntityGraphRequest} The populated <code>EntityGraphRequest</code> instance. 12653 */ 12654 12655 }, { 12656 key: "constructFromObject", 12657 value: function constructFromObject(data, obj) { 12658 if (data) { 12659 obj = obj || new EntityGraphRequest(); 12660 12661 if (data.hasOwnProperty('ids')) { 12662 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 12663 } 12664 12665 if (data.hasOwnProperty('constraints')) { 12666 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 12667 } 12668 12669 if (data.hasOwnProperty('traversal')) { 12670 obj['traversal'] = _EntityGraphTraversal["default"].constructFromObject(data['traversal']); 12671 } 12672 12673 if (data.hasOwnProperty('languageKey')) { 12674 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 12675 } 12676 12677 if (data.hasOwnProperty('includes')) { 12678 obj['includes'] = _ApiClient["default"].convertToType(data['includes'], ['String']); 12679 } 12680 12681 if (data.hasOwnProperty('entityType')) { 12682 obj['entityType'] = _EntityType["default"].constructFromObject(data['entityType']); 12683 } 12684 } 12685 12686 return obj; 12687 } 12688 }]); 12689 12690 return EntityGraphRequest; 12691}(); 12692/** 12693 * The identifier of the node to create a connected graph for 12694 * @member {Array.<String>} ids 12695 */ 12696 12697 12698EntityGraphRequest.prototype['ids'] = undefined; 12699/** 12700 * Specify the constraints that need to be applied to the filter. 12701 * @member {Array.<String>} constraints 12702 */ 12703 12704EntityGraphRequest.prototype['constraints'] = undefined; 12705/** 12706 * @member {module:model/EntityGraphTraversal} traversal 12707 */ 12708 12709EntityGraphRequest.prototype['traversal'] = undefined; 12710/** 12711 * The language codes can be found in the settings/transalations section of the back office 12712 * @member {String} languageKey 12713 */ 12714 12715EntityGraphRequest.prototype['languageKey'] = undefined; 12716/** 12717 * What objects to include from the entity in this response. For achievement the following can be included; description, memberTagsFilter, scheduling, and termsAndConditions 12718 * @member {Array.<String>} includes 12719 */ 12720 12721EntityGraphRequest.prototype['includes'] = undefined; 12722/** 12723 * @member {module:model/EntityType} entityType 12724 */ 12725 12726EntityGraphRequest.prototype['entityType'] = undefined; 12727var _default = EntityGraphRequest; 12728exports["default"] = _default; 12729},{"../ApiClient":3,"./EntityGraphTraversal":70,"./EntityType":73}],68:[function(require,module,exports){ 12730"use strict"; 12731 12732Object.defineProperty(exports, "__esModule", { 12733 value: true 12734}); 12735exports["default"] = void 0; 12736 12737var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12738 12739var _EntityGraphResult = _interopRequireDefault(require("./EntityGraphResult")); 12740 12741var _Error = _interopRequireDefault(require("./Error")); 12742 12743var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 12744 12745function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12746 12747function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12748 12749function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12750 12751function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12752 12753/** 12754 * The EntityGraphResponse model module. 12755 * @module model/EntityGraphResponse 12756 * @version 1.0.14 12757 */ 12758var EntityGraphResponse = /*#__PURE__*/function () { 12759 /** 12760 * Constructs a new <code>EntityGraphResponse</code>. 12761 * @alias module:model/EntityGraphResponse 12762 */ 12763 function EntityGraphResponse() { 12764 _classCallCheck(this, EntityGraphResponse); 12765 12766 EntityGraphResponse.initialize(this); 12767 } 12768 /** 12769 * Initializes the fields of this object. 12770 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 12771 * Only for internal use. 12772 */ 12773 12774 12775 _createClass(EntityGraphResponse, null, [{ 12776 key: "initialize", 12777 value: function initialize(obj) {} 12778 /** 12779 * Constructs a <code>EntityGraphResponse</code> from a plain JavaScript object, optionally creating a new instance. 12780 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 12781 * @param {Object} data The plain JavaScript object bearing properties of interest. 12782 * @param {module:model/EntityGraphResponse} obj Optional instance to populate. 12783 * @return {module:model/EntityGraphResponse} The populated <code>EntityGraphResponse</code> instance. 12784 */ 12785 12786 }, { 12787 key: "constructFromObject", 12788 value: function constructFromObject(data, obj) { 12789 if (data) { 12790 obj = obj || new EntityGraphResponse(); 12791 12792 if (data.hasOwnProperty('meta')) { 12793 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 12794 } 12795 12796 if (data.hasOwnProperty('data')) { 12797 obj['data'] = _EntityGraphResult["default"].constructFromObject(data['data']); 12798 } 12799 12800 if (data.hasOwnProperty('errors')) { 12801 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 12802 } 12803 } 12804 12805 return obj; 12806 } 12807 }]); 12808 12809 return EntityGraphResponse; 12810}(); 12811/** 12812 * @member {module:model/ResponseMeta} meta 12813 */ 12814 12815 12816EntityGraphResponse.prototype['meta'] = undefined; 12817/** 12818 * @member {module:model/EntityGraphResult} data 12819 */ 12820 12821EntityGraphResponse.prototype['data'] = undefined; 12822/** 12823 * @member {Array.<module:model/Error>} errors 12824 */ 12825 12826EntityGraphResponse.prototype['errors'] = undefined; 12827var _default = EntityGraphResponse; 12828exports["default"] = _default; 12829},{"../ApiClient":3,"./EntityGraphResult":69,"./Error":74,"./ResponseMeta":144}],69:[function(require,module,exports){ 12830"use strict"; 12831 12832Object.defineProperty(exports, "__esModule", { 12833 value: true 12834}); 12835exports["default"] = void 0; 12836 12837var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12838 12839var _EntityGraph = _interopRequireDefault(require("./EntityGraph")); 12840 12841var _EntityGraphNode = _interopRequireDefault(require("./EntityGraphNode")); 12842 12843function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12844 12845function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12846 12847function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12848 12849function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12850 12851/** 12852 * The EntityGraphResult model module. 12853 * @module model/EntityGraphResult 12854 * @version 1.0.14 12855 */ 12856var EntityGraphResult = /*#__PURE__*/function () { 12857 /** 12858 * Constructs a new <code>EntityGraphResult</code>. 12859 * @alias module:model/EntityGraphResult 12860 * @param nodes {Array.<module:model/EntityGraphNode>} 12861 */ 12862 function EntityGraphResult(nodes) { 12863 _classCallCheck(this, EntityGraphResult); 12864 12865 EntityGraphResult.initialize(this, nodes); 12866 } 12867 /** 12868 * Initializes the fields of this object. 12869 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 12870 * Only for internal use. 12871 */ 12872 12873 12874 _createClass(EntityGraphResult, null, [{ 12875 key: "initialize", 12876 value: function initialize(obj, nodes) {
12877 obj['nodes'] = nodes; 12878 } 12879 /** 12880 * Constructs a <code>EntityGraphResult</code> from a plain JavaScript object, optionally creating a new instance. 12881 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 12882 * @param {Object} data The plain JavaScript object bearing properties of interest. 12883 * @param {module:model/EntityGraphResult} obj Optional instance to populate. 12884 * @return {module:model/EntityGraphResult} The populated <code>EntityGraphResult</code> instance. 12885 */ 12886 12887 }, { 12888 key: "constructFromObject", 12889 value: function constructFromObject(data, obj) { 12890 if (data) { 12891 obj = obj || new EntityGraphResult(); 12892 12893 if (data.hasOwnProperty('nodes')) { 12894 obj['nodes'] = _ApiClient["default"].convertToType(data['nodes'], [_EntityGraphNode["default"]]); 12895 } 12896 12897 if (data.hasOwnProperty('graphs')) { 12898 obj['graphs'] = _ApiClient["default"].convertToType(data['graphs'], [_EntityGraph["default"]]); 12899 } 12900 } 12901 12902 return obj; 12903 } 12904 }]); 12905 12906 return EntityGraphResult; 12907}(); 12908/** 12909 * @member {Array.<module:model/EntityGraphNode>} nodes 12910 */ 12911 12912 12913EntityGraphResult.prototype['nodes'] = undefined; 12914/** 12915 * @member {Array.<module:model/EntityGraph>} graphs 12916 */ 12917 12918EntityGraphResult.prototype['graphs'] = undefined; 12919var _default = EntityGraphResult; 12920exports["default"] = _default; 12921},{"../ApiClient":3,"./EntityGraph":63,"./EntityGraphNode":66}],70:[function(require,module,exports){ 12922"use strict"; 12923 12924Object.defineProperty(exports, "__esModule", { 12925 value: true 12926}); 12927exports["default"] = void 0; 12928 12929var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12930 12931function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12932 12933function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12934 12935function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12936 12937function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12938 12939function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 12940 12941/** 12942* Enum class EntityGraphTraversal. 12943* @enum {} 12944* @readonly 12945*/ 12946var EntityGraphTraversal = /*#__PURE__*/function () { 12947 function EntityGraphTraversal() { 12948 _classCallCheck(this, EntityGraphTraversal); 12949 12950 _defineProperty(this, "DEPTH_FIRST", "DEPTH_FIRST"); 12951 12952 _defineProperty(this, "BREADTH_FIRST", "BREADTH_FIRST"); 12953 } 12954 12955 _createClass(EntityGraphTraversal, null, [{ 12956 key: "constructFromObject", 12957 value: 12958 /** 12959 * Returns a <code>EntityGraphTraversal</code> enum value from a Javascript object name. 12960 * @param {Object} data The plain JavaScript object containing the name of the enum value. 12961 * @return {module:model/EntityGraphTraversal} The enum <code>EntityGraphTraversal</code> value. 12962 */ 12963 function constructFromObject(object) { 12964 return object; 12965 } 12966 }]); 12967 12968 return EntityGraphTraversal; 12969}(); 12970 12971exports["default"] = EntityGraphTraversal; 12972},{"../ApiClient":3}],71:[function(require,module,exports){ 12973"use strict"; 12974 12975Object.defineProperty(exports, "__esModule", { 12976 value: true 12977}); 12978exports["default"] = void 0; 12979 12980var _ApiClient = _interopRequireDefault(require("../ApiClient")); 12981 12982var _EntityFilter = _interopRequireDefault(require("./EntityFilter")); 12983 12984var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 12985 12986function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 12987 12988function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 12989 12990function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 12991 12992function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 12993 12994/** 12995 * The EntityRequest model module. 12996 * @module model/EntityRequest 12997 * @version 1.0.14 12998 */ 12999var EntityRequest = /*#__PURE__*/function () { 13000 /** 13001 * Constructs a new <code>EntityRequest</code>. 13002 * @alias module:model/EntityRequest 13003 */ 13004 function EntityRequest() { 13005 _classCallCheck(this, EntityRequest); 13006 13007 EntityRequest.initialize(this); 13008 } 13009 /** 13010 * Initializes the fields of this object. 13011 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 13012 * Only for internal use. 13013 */ 13014 13015 13016 _createClass(EntityRequest, null, [{ 13017 key: "initialize", 13018 value: function initialize(obj) {} 13019 /** 13020 * Constructs a <code>EntityRequest</code> from a plain JavaScript object, optionally creating a new instance. 13021 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 13022 * @param {Object} data The plain JavaScript object bearing properties of interest. 13023 * @param {module:model/EntityRequest} obj Optional instance to populate. 13024 * @return {module:model/EntityRequest} The populated <code>EntityRequest</code> instance. 13025 */ 13026 13027 }, { 13028 key: "constructFromObject", 13029 value: function constructFromObject(data, obj) { 13030 if (data) { 13031 obj = obj || new EntityRequest(); 13032 13033 if (data.hasOwnProperty('languageKey')) { 13034 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 13035 } 13036 13037 if (data.hasOwnProperty('entityFilter')) { 13038 obj['entityFilter'] = _ApiClient["default"].convertToType(data['entityFilter'], [_EntityFilter["default"]]); 13039 } 13040 13041 if (data.hasOwnProperty('sortBy')) { 13042 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 13043 } 13044 13045 if (data.hasOwnProperty('skip')) { 13046 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 13047 } 13048 13049 if (data.hasOwnProperty('limit')) { 13050 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 13051 } 13052 } 13053 13054 return obj; 13055 } 13056 }]); 13057 13058 return EntityRequest; 13059}(); 13060/** 13061 * The language codes can be found in the settings/transalations section of the back office 13062 * @member {String} languageKey 13063 */ 13064 13065 13066EntityRequest.prototype['languageKey'] = undefined; 13067/** 13068 * @member {Array.<module:model/EntityFilter>} entityFilter 13069 */ 13070 13071EntityRequest.prototype['entityFilter'] = undefined; 13072/** 13073 * @member {Array.<module:model/QuerySortBy>} sortBy 13074 */ 13075 13076EntityRequest.prototype['sortBy'] = undefined; 13077/** 13078 * @member {Number} skip 13079 */ 13080 13081EntityRequest.prototype['skip'] = undefined; 13082/** 13083 * @member {Number} limit 13084 */ 13085 13086EntityRequest.prototype['limit'] = undefined; 13087var _default = EntityRequest; 13088exports["default"] = _default; 13089},{"../ApiClient":3,"./EntityFilter":62,"./QuerySortBy":141}],72:[function(require,module,exports){ 13090"use strict"; 13091 13092Object.defineProperty(exports, "__esModule", { 13093 value: true 13094}); 13095exports["default"] = void 0; 13096 13097var _ApiClient = _interopRequireDefault(require("../ApiClient")); 13098 13099function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 13100 13101function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13102 13103function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 13104 13105function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 13106 13107/** 13108 * The EntityStateChanged model module. 13109 * @module model/EntityStateChanged 13110 * @version 1.0.14 13111 */ 13112var EntityStateChanged = /*#__PURE__*/function () { 13113 /** 13114 * Constructs a new <code>EntityStateChanged</code>. 13115 * @alias module:model/EntityStateChanged 13116 */ 13117 function EntityStateChanged() { 13118 _classCallCheck(this, EntityStateChanged); 13119 13120 EntityStateChanged.initialize(this); 13121 } 13122 /** 13123 * Initializes the fields of this object. 13124 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 13125 * Only for internal use. 13126 */ 13127 13128 13129 _createClass(EntityStateChanged, null, [{ 13130 key: "initialize", 13131 value: function initialize(obj) {} 13132 /** 13133 * Constructs a <code>EntityStateChanged</code> from a plain JavaScript object, optionally creating a new instance. 13134 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 13135 * @param {Object} data The plain JavaScript object bearing properties of interest. 13136 * @param {module:model/EntityStateChanged} obj Optional instance to populate. 13137 * @return {module:model/EntityStateChanged} The populated <code>EntityStateChanged</code> instance. 13138 */ 13139 13140 }, { 13141 key: "constructFromObject", 13142 value: function constructFromObject(data, obj) { 13143 if (data) { 13144 obj = obj || new EntityStateChanged(); 13145 13146 if (data.hasOwnProperty('entityId')) { 13147 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 13148 } 13149 13150 if (data.hasOwnProperty('entityType')) { 13151 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 13152 } 13153 13154 if (data.hasOwnProperty('changedAt')) { 13155 obj['changedAt'] = _ApiClient["default"].convertToType(data['changedAt'], 'Date'); 13156 } 13157 13158 if (data.hasOwnProperty('changedBy')) { 13159 obj['changedBy'] = _ApiClient["default"].convertToType(data['changedBy'], 'String'); 13160 } 13161 13162 if (data.hasOwnProperty('typeOffChange')) { 13163 obj['typeOffChange'] = _ApiClient["default"].convertToType(data['typeOffChange'], 'Number'); 13164 } 13165 13166 if (data.hasOwnProperty('displayName')) { 13167 obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String'); 13168 } 13169 13170 if (data.hasOwnProperty('accountId')) { 13171 obj['accountId'] = _ApiClient["default"].convertToType(data['accountId'], 'String'); 13172 } 13173 13174 if (data.hasOwnProperty('sequenceNumber')) { 13175 obj['sequenceNumber'] = _ApiClient["default"].convertToType(data['sequenceNumber'], 'Number'); 13176 } 13177 13178 if (data.hasOwnProperty('entityRefId')) { 13179 obj['entityRefId'] = _ApiClient["default"].convertToType(data['entityRefId'], 'String'); 13180 } 13181 13182 if (data.hasOwnProperty('entityParentId')) { 13183 obj['entityParentId'] = _ApiClient["default"].convertToType(data['entityParentId'], 'String'); 13184 } 13185 13186 if (data.hasOwnProperty('metadata')) { 13187 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], Object); 13188 } 13189 13190 if (data.hasOwnProperty('previousState')) { 13191 obj['previousState'] = _ApiClient["default"].convertToType(data['previousState'], 'Number'); 13192 } 13193 13194 if (data.hasOwnProperty('currentState')) { 13195 obj['currentState'] = _ApiClient["default"].convertToType(data['currentState'], 'Number'); 13196 } 13197 } 13198 13199 return obj; 13200 } 13201 }]); 13202 13203 return EntityStateChanged; 13204}(); 13205/** 13206 * @member {String} entityId 13207 */ 13208 13209 13210EntityStateChanged.prototype['entityId'] = undefined; 13211/** 13212 * @member {String} entityType 13213 */ 13214 13215EntityStateChanged.prototype['entityType'] = undefined; 13216/** 13217 * @member {Date} changedAt 13218 */ 13219 13220EntityStateChanged.prototype['changedAt'] = undefined; 13221/** 13222 * @member {String} changedBy 13223 */ 13224 13225EntityStateChanged.prototype['changedBy'] = undefined; 13226/** 13227 * @member {Number} typeOffChange 13228 */ 13229 13230EntityStateChanged.prototype['typeOffChange'] = undefined; 13231/** 13232 * @member {String} displayName 13233 */ 13234 13235EntityStateChanged.prototype['displayName'] = undefined; 13236/** 13237 * @member {String} accountId 13238 */ 13239 13240EntityStateChanged.prototype['accountId'] = undefined; 13241/** 13242 * @member {Number} sequenceNumber 13243 */ 13244 13245EntityStateChanged.prototype['sequenceNumber'] = undefined; 13246/** 13247 * @member {String} entityRefId 13248 */ 13249 13250EntityStateChanged.prototype['entityRefId'] = undefined; 13251/** 13252 * @member {String} entityParentId 13253 */ 13254 13255EntityStateChanged.prototype['entityParentId'] = undefined; 13256/** 13257 * @member {Object} metadata 13258 */ 13259 13260EntityStateChanged.prototype['metadata'] = undefined; 13261/** 13262 * @member {Number} previousState 13263 */ 13264 13265EntityStateChanged.prototype['previousState'] = undefined; 13266/** 13267 * @member {Number} currentState 13268 */ 13269 13270EntityStateChanged.prototype['currentState'] = undefined; 13271var _default = EntityStateChanged; 13272exports["default"] = _default; 13273},{"../ApiClient":3}],73:[function(require,module,exports){ 13274"use strict"; 13275 13276Object.defineProperty(exports, "__esModule", { 13277 value: true 13278}); 13279exports["default"] = void 0; 13280 13281var _ApiClient = _interopRequireDefault(require("../ApiClient")); 13282 13283function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 13284 13285function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13286 13287function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 13288 13289function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 13290 13291function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 13292 13293/** 13294* Enum class EntityType. 13295* @enum {} 13296* @readonly 13297*/ 13298var EntityType = /*#__PURE__*/function () { 13299 function EntityType() { 13300 _classCallCheck(this, EntityType); 13301 13302 _defineProperty(this, "Member", "Member"); 13303 13304 _defineProperty(this, "Product", "Product"); 13305 13306 _defineProperty(this, "Achievement", "Achievement"); 13307 13308 _defineProperty(this, "Repository", "Repository"); 13309 13310 _defineProperty(this, "FileObject", "FileObject"); 13311 13312 _defineProperty(this, "Language", "Language"); 13313 13314 _defineProperty(this, "MemberMessage", "MemberMessage"); 13315 13316 _defineProperty(this, "Reward", "Reward"); 13317 13318 _defineProperty(this, "MemberAward", "MemberAward"); 13319 13320 _defineProperty(this, "Award", "Award"); 13321 13322 _defineProperty(this, "Message", "Message"); 13323 13324 _defineProperty(this, "RewardType", "RewardType"); 13325 13326 _defineProperty(this, "ActionType", "ActionType"); 13327 13328 _defineProperty(this, "UnitOfMeasure", "UnitOfMeasure"); 13329 13330 _defineProperty(this, "Competition", "Competition"); 13331 13332 _defineProperty(this, "Contest", "Contest"); 13333 13334 _defineProperty(this, "SqsConnection", "SqsConnection"); 13335 13336 _defineProperty(this, "KafkaConnection", "KafkaConnection"); 13337 13338 _defineProperty(this, "RabbitMqConnection", "RabbitMqConnection"); 13339 13340 _defineProperty(this, "Events", "Events"); 13341 13342 _defineProperty(this, "Webhook", "Webhook"); 13343 13344 _defineProperty(this, "Attachment", "Attach
13344ment"); 13345 13346 _defineProperty(this, "RuleSet", "RuleSet"); 13347 } 13348 13349 _createClass(EntityType, null, [{ 13350 key: "constructFromObject", 13351 value: 13352 /** 13353 * Returns a <code>EntityType</code> enum value from a Javascript object name. 13354 * @param {Object} data The plain JavaScript object containing the name of the enum value. 13355 * @return {module:model/EntityType} The enum <code>EntityType</code> value. 13356 */ 13357 function constructFromObject(object) { 13358 return object; 13359 } 13360 }]); 13361 13362 return EntityType; 13363}(); 13364 13365exports["default"] = EntityType; 13366},{"../ApiClient":3}],74:[function(require,module,exports){ 13367"use strict"; 13368 13369Object.defineProperty(exports, "__esModule", { 13370 value: true 13371}); 13372exports["default"] = void 0; 13373 13374var _ApiClient = _interopRequireDefault(require("../ApiClient")); 13375 13376function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 13377 13378function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13379 13380function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 13381 13382function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 13383 13384/** 13385 * The Error model module. 13386 * @module model/Error 13387 * @version 1.0.14 13388 */ 13389var Error = /*#__PURE__*/function () { 13390 /** 13391 * Constructs a new <code>Error</code>. 13392 * @alias module:model/Error 13393 * @param status {Number} 13394 */ 13395 function Error(status) { 13396 _classCallCheck(this, Error); 13397 13398 Error.initialize(this, status); 13399 } 13400 /** 13401 * Initializes the fields of this object. 13402 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 13403 * Only for internal use. 13404 */ 13405 13406 13407 _createClass(Error, null, [{ 13408 key: "initialize", 13409 value: function initialize(obj, status) { 13410 obj['status'] = status; 13411 } 13412 /** 13413 * Constructs a <code>Error</code> from a plain JavaScript object, optionally creating a new instance. 13414 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 13415 * @param {Object} data The plain JavaScript object bearing properties of interest. 13416 * @param {module:model/Error} obj Optional instance to populate. 13417 * @return {module:model/Error} The populated <code>Error</code> instance. 13418 */ 13419 13420 }, { 13421 key: "constructFromObject", 13422 value: function constructFromObject(data, obj) { 13423 if (data) { 13424 obj = obj || new Error(); 13425 13426 if (data.hasOwnProperty('message')) { 13427 obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String'); 13428 } 13429 13430 if (data.hasOwnProperty('code')) { 13431 obj['code'] = _ApiClient["default"].convertToType(data['code'], 'Number'); 13432 } 13433 13434 if (data.hasOwnProperty('status')) { 13435 obj['status'] = _ApiClient["default"].convertToType(data['status'], 'Number'); 13436 } 13437 } 13438 13439 return obj; 13440 } 13441 }]); 13442 13443 return Error; 13444}(); 13445/** 13446 * @member {String} message 13447 */ 13448 13449 13450Error.prototype['message'] = undefined; 13451/** 13452 * @member {Number} code 13453 */ 13454 13455Error.prototype['code'] = undefined; 13456/** 13457 * @member {Number} status 13458 */ 13459 13460Error.prototype['status'] = undefined; 13461var _default = Error; 13462exports["default"] = _default; 13463},{"../ApiClient":3}],75:[function(require,module,exports){ 13464"use strict"; 13465 13466Object.defineProperty(exports, "__esModule", { 13467 value: true 13468}); 13469exports["default"] = void 0; 13470 13471var _ApiClient = _interopRequireDefault(require("../ApiClient")); 13472 13473function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 13474 13475function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13476 13477function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 13478 13479function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 13480 13481function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 13482 13483/** 13484* Enum class EventRefType. 13485* @enum {} 13486* @readonly 13487*/ 13488var EventRefType = /*#__PURE__*/function () { 13489 function EventRefType() { 13490 _classCallCheck(this, EventRefType); 13491 13492 _defineProperty(this, "Competition", "Competition"); 13493 13494 _defineProperty(this, "Contest", "Contest"); 13495 13496 _defineProperty(this, "Achievement", "Achievement"); 13497 13498 _defineProperty(this, "User", "User"); 13499 13500 _defineProperty(this, "MemberMessage", "MemberMessage"); 13501 } 13502 13503 _createClass(EventRefType, null, [{ 13504 key: "constructFromObject", 13505 value: 13506 /** 13507 * Returns a <code>EventRefType</code> enum value from a Javascript object name. 13508 * @param {Object}
13508 data The plain JavaScript object containing the name of the enum value. 13509 * @return {module:model/EventRefType} The enum <code>EventRefType</code> value. 13510 */ 13511 function constructFromObject(object) { 13512 return object; 13513 } 13514 }]); 13515 13516 return EventRefType; 13517}(); 13518 13519exports["default"] = EventRefType; 13520},{"../ApiClient":3}],76:[function(require,module,exports){ 13521"use strict"; 13522 13523Object.defineProperty(exports, "__esModule", { 13524 value: true 13525}); 13526exports["default"] = void 0; 13527 13528var _ApiClient = _interopRequireDefault(require("../ApiClient")); 13529 13530function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 13531 13532function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13533 13534function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 13535 13536function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 13537 13538function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 13539 13540/** 13541* Enum class FieldType. 13542* @enum {} 13543* @readonly 13544*/ 13545var FieldType = /*#__PURE__*/function () { 13546 function FieldType() { 13547 _classCallCheck(this, FieldType); 13548 13549 _defineProperty(this, "Text", "Text"); 13550 13551 _defineProperty(this, "TextArray", "TextArray"); 13552 13553 _defineProperty(this, "Number", "Number"); 13554 13555 _defineProperty(this, "NumberArray", "NumberArray"); 13556 } 13557 13558 _createClass(FieldType, null, [{ 13559 key: "constructFromObject", 13560 value: 13561 /** 13562 * Returns a <code>FieldType</code> enum value from a Javascript object name. 13563 * @param {Object} data The plain JavaScript object containing the name of the enum value. 13564 * @return {module:model/FieldType} The enum <code>FieldType</code> value. 13565 */ 13566 function constructFromObject(object) { 13567 return object; 13568 } 13569 }]); 13570 13571 return FieldType; 13572}(); 13573 13574exports["default"] = FieldType; 13575},{"../ApiClient":3}],77:[function(require,module,exports){ 13576"use strict"; 13577 13578Object.defineProperty(exports, "__esModule", { 13579 value: true 13580}); 13581exports["default"] = void 0; 13582 13583var _ApiClient = _interopRequireDefault(require("../ApiClient")); 13584 13585var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 13586 13587var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 13588 13589function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 13590 13591function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13592 13593function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 13594 13595function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 13596 13597/** 13598 * The File model module. 13599 * @module model/File 13600 * @version 1.0.14 13601 */ 13602var File = /*#__PURE__*/function () { 13603 /** 13604 * Constructs a new <code>File</code>. 13605 * This is the File model 13606 * @alias module:model/File 13607 * @implements module:model/ModelDefault 13608 * @implements module:model/OptionalModelFields 13609 * @param id {String} Ziqni id of the model 13610 */ 13611 function File(id) { 13612 _classCallCheck(this, File); 13613 13614 _ModelDefault["default"].initialize(this, id); 13615 13616 _OptionalModelFields["default"].initialize(this); 13617 13618 File.initialize(this, id); 13619 } 13620 /** 13621 * Initializes the fields of this object. 13622 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 13623 * Only for internal use. 13624 */ 13625 13626 13627 _createClass(File, null, [{ 13628 key: "initialize", 13629 value: function initialize(obj, id) { 13630 obj['id'] = id; 13631 } 13632 /** 13633 * Constructs a <code>File</code> from a plain JavaScript object, optionally creating a new instance. 13634 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 13635 * @param {Object} data The plain JavaScript object bearing properties of interest. 13636 * @param {module:model/File} obj Optional instance to populate. 13637 * @return {module:model/File} The populated <code>File</code> instance. 13638 */ 13639 13640 }, { 13641 key: "constructFromObject", 13642 value: function constructFromObject(data, obj) { 13643 if (data) { 13644 obj = obj || new File(); 13645 13646 _ModelDefault["default"].constructFromObject(data, obj); 13647 13648 _OptionalModelFields["default"].constructFromObject(data, obj); 13649 13650 if (data.hasOwnProperty('id')) { 13651 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 13652 } 13653 13654 if (data.hasOwnProperty('spaceName')) { 13655 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 13656 } 13657 13658 if (data.hasOwnProperty('created')) { 13659 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 13660 } 13661 13662 if (data.hasOwnProperty('customFields')) { 13663 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 13664 'String': Object 13665 }); 13666 } 13667 13668 if (data.hasOwnProperty('tags')) { 13669 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 13670 } 13671 13672 if (data.hasOwnProperty('metadata')) { 13673 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 13674 'String': 'String' 13675 }); 13676 } 13677 } 13678 13679 return obj; 13680 } 13681 }]); 13682 13683 return File; 13684}(); 13685/** 13686 * Ziqni id of the model 13687 * @member {String} id 13688 */ 13689 13690 13691File.prototype['id'] = undefined; 13692/** 13693 * This is the space name which is linked to the account 13694 * @member {String} spaceName 13695 */ 13696 13697File.prototype['spaceName'] = undefined; 13698/** 13699 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 13700 * @member {Date} created 13701 */ 13702 13703File.prototype['created'] = undefined; 13704/** 13705 * @member {Object.<String, Object>} customFields 13706 */ 13707 13708File.prototype['customFields'] = undefined; 13709/** 13710 * A list of id's used to tag models 13711 * @member {Array.<String>} tags 13712 */ 13713 13714File.prototype['tags'] = undefined; 13715/** 13716 * @member {Object.<String, String>} metadata 13717 */ 13718 13719File.prototype['metadata'] = undefined; // Implement ModelDefault interface: 13720 13721/** 13722 * Ziqni id of the model 13723 * @member {String} id 13724 */ 13725 13726_ModelDefault["default"].prototype['id'] = undefined; 13727/** 13728 * This is the space name which is linked to the account 13729 * @member {String} spaceName 13730 */ 13731 13732_ModelDefault["default"].prototype['spaceName'] = undefined; 13733/** 13734 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 13735 * @member {Date} created 13736 */ 13737 13738_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 13739 13740/** 13741 * @member {Object.<String, Object>} customFields 13742 */ 13743 13744_OptionalModelFields["default"].prototype['customFields'] = undefined; 13745/** 13746 * A list of id's used to tag models 13747 * @member {Array.<String>} tags 13748 */ 13749 13750_OptionalModelFields["default"].prototype['tags'] = undefined; 13751/** 13752 * @member {Object.<String, String>} metadata 13753 */ 13754 13755_OptionalModelFields["default"].prototype['metadata'] = undefined; 13756var _default = File; 13757exports["default"] = _default; 13758},{"../ApiClient":3,"./ModelDefault":123,"./OptionalModelFields":130}],78:[function(require,module,exports){ 13759"use strict"; 13760 13761Object.defineProperty(exports, "__esModule", { 13762 value: true 13763}); 13764exports["default"] = void 0; 13765 13766var _ApiClient = _interopRequireDefault(require("../ApiClient")); 13767 13768var _FileObjectAllOf = _interopRequireDefault(require("./FileObjectAllOf")); 13769 13770var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 13771 13772var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 13773 13774function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 13775 13776function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 13777 13778function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 13779 13780function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 13781 13782/** 13783 * The FileObject model module. 13784 * @module model/FileObject 13785 * @version 1.0.14 13786 */ 13787var FileObject = /*#__PURE__*/function () { 13788 /** 13789 * Constructs a new <code>FileObject</code>. 13790 * @alias module:model/FileObject 13791 * @implements module:model/ModelDefault 13792 * @implements module:model/OptionalModelFields 13793 * @implements module:model/FileObjectAllOf 13794 * @param id {String} Ziqni id of the model 13795 * @param repositoryId {String} The repository identifier this file belongs too 13796 * @param name {String} Name of the original file uploaded 13797 * @param mimeType {String} Mime type of the file. Valid mime types - text/csv or application/vmd.ms-excelor or application/x-directory for directories 13798 * @param path {String} The name of the attachment within the bucket 13799 * @param parentFolderPath {String} The folder name containing the attachment within the bucket 13800 */ 13801 function FileObject(id, repositoryId, name, mimeType, path, parentFolderPath) { 13802 _classCallCheck(this, FileObject); 13803 13804 _ModelDefault["default"].initialize(this, id); 13805 13806 _OptionalModelFields["default"].initialize(this); 13807 13808 _FileObjectAllOf["default"].initialize(this, repositoryId, name, mimeType, path, parentFolderPath); 13809 13810 FileObject.initialize(this, id, repositoryId, name, mimeType, path, parentFolderPath); 13811 } 13812 /** 13813 * Initializes the fields of this object. 13814 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 13815 * Only for internal use. 13816 */ 13817 13818 13819 _createClass(FileObject, null, [{ 13820 key: "initialize", 13821 value: function initialize(obj, id, repositoryId, name, mimeType, path, parentFolderPath) { 13822 obj['id'] = id; 13823 obj['repositoryId'] = repositoryId; 13824 obj['name'] = name; 13825 obj['mimeType'] = mimeType; 13826 obj['path'] = path; 13827 obj['parentFolderPath'] = parentFolderPath; 13828 } 13829 /** 13830 * Constructs a <code>FileObject</code> from a plain JavaScript object, optionally creating a new instance. 13831 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 13832 * @param {Object} data The plain JavaScript object bearing properties of interest. 13833 * @param {module:model/FileObject} obj Optional instance to populate. 13834 * @return {module:model/FileObject} The populated <code>FileObject</code> instance. 13835 */ 13836 13837 }, { 13838 key: "constructFromObject", 13839 value: function constructFromObject(data, obj) { 13840 if (data) { 13841 obj = obj || new FileObject(); 13842 13843 _ModelDefault["default"].constructFromObject(data, obj); 13844 13845 _OptionalModelFields["default"].constructFromObject(data, obj); 13846 13847 _FileObjectAllOf["default"].constructFromObject(data, obj); 13848 13849 if (data.hasOwnProperty('id')) { 13850 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 13851 } 13852 13853 if (data.hasOwnProperty('spaceName')) { 13854 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 13855 } 13856 13857 if (data.hasOwnProperty('created')) { 13858 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 13859 } 13860 13861 if (data.hasOwnProperty('customFields')) { 13862 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 13863 'String': Object 13864 }); 13865 } 13866 13867 if (data.hasOwnProperty('tags')) { 13868 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 13869 } 13870 13871 if (data.hasOwnProperty('metadata')) { 13872 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 13873 'String': 'String' 13874 }); 13875 } 13876 13877 if (data.hasOwnProperty('repositoryId')) { 13878 obj['repositoryId'] = _ApiClient["default"].convertToType(data['repositoryId'], 'String'); 13879 } 13880 13881 if (data.hasOwnProperty('name')) { 13882 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 13883 } 13884 13885 if (data.hasOwnProperty('mimeType')) { 13886 obj['mimeType'] = _ApiClient["default"].convertToType(data['mimeType'], 'String'); 13887 } 13888 13889 if (data.hasOwnProperty('path')) { 13890 obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String'); 13891 } 13892 13893 if (data.hasOwnProperty('parentFolderPath')) { 13894 obj['parentFolderPath'] = _ApiClient["default"].convertToType(data['parentFolderPath'], 'String'); 13895 } 13896 13897 if (data.hasOwnProperty('uri')) { 13898 obj['uri'] = _ApiClient["default"].convertToType(data['uri'], 'String'); 13899 } 13900 13901 if (data.hasOwnProperty('size')) { 13902 obj['size'] = _ApiClient["default"].convertToType(data['size'], 'Number'); 13903 } 13904 13905 if (data.hasOwnProperty('constraints')) { 13906 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 13907 } 13908 } 13909 13910 return obj; 13911 } 13912 }]); 13913 13914 return FileObject; 13915}(); 13916/** 13917 * Ziqni id of the model 13918 * @member {String} id 13919 */ 13920 13921 13922FileObject.prototype['id'] = undefined; 13923/** 13924 * This is the space name which is linked to the account 13925 * @member {String} spaceName 13926 */ 13927 13928FileObject.prototype['spaceName'] = undefined; 13929/** 13930 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 13931 * @member {Date} created 13932 */ 13933 13934FileObject.prototype['created'] = undefined; 13935/** 13936 * @member {Object.<String, Object>} customFields 13937 */ 13938 13939FileObject.prototype['customFields'] = undefined; 13940/** 13941 * A list of id's used to tag models 13942 * @member {Array.<String>} tags 13943 */ 13944 13945FileObject.prototype['tags'] = undefined; 13946/** 13947 * @member {Object.<String, String>} metadata 13948 */ 13949 13950FileObject.prototype['metadata'] = undefined; 13951/** 13952 * The repository identifier this file belongs too 13953 * @member {String} repositoryId 13954 */ 13955 13956FileObject.prototype['repositoryId'] = undefined; 13957/** 13958 * Name of the original file uploaded 13959 * @member {String} name 13960 */ 13961 13962FileObject.prototype['name'] = undefined; 13963/** 13964 * Mime type of the file. Valid mime types - text/csv or application/vmd.ms-excelor or application/x-directory for directories 13965 * @member {String} mimeType 13966 */ 13967 13968FileObject.prototype['mimeType'] = undefined; 13969/** 13970 * The name of the attachment within the bucket 13971 * @member {String} path 13972 */ 13973 13974FileObject.prototype['path'] = undefined; 13975/** 13976 * The folder name containing the attachment within the bucket 13977 * @member {String} parentFolderPath 13978 */ 13979 13980FileObject.prototype['parentFolderPath'] = undefined; 13981/** 13982 * The uniform resource identifier where the file can be viewed/downloaded 13983 * @member {String} uri 13984 */ 13985 13986FileObject.prototype['uri'] = undefined; 13987/** 13988 * The size of the file 13989 * @member {Number} size 13990 */ 13991 13992FileObject.prototype['size'] = undefined; 13993/** 13994 * Additional constraints, if the value is present it means the 13995 * @member {Array.<String>} constraints 13996 */ 13997 13998FileObject.prototype['constraints'] = undefined; // Implement ModelDefault interface: 13999 14000/** 14001 * Ziqni id of the m
14001odel 14002 * @member {String} id 14003 */ 14004 14005_ModelDefault["default"].prototype['id'] = undefined; 14006/** 14007 * This is the space name which is linked to the account 14008 * @member {String} spaceName 14009 */ 14010 14011_ModelDefault["default"].prototype['spaceName'] = undefined; 14012/** 14013 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 14014 * @member {Date} created 14015 */ 14016 14017_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 14018 14019/** 14020 * @member {Object.<String, Object>} customFields 14021 */ 14022 14023_OptionalModelFields["default"].prototype['customFields'] = undefined; 14024/** 14025 * A list of id's used to tag models 14026 * @member {Array.<String>} tags 14027 */ 14028 14029_OptionalModelFields["default"].prototype['tags'] = undefined; 14030/** 14031 * @member {Object.<String, String>} metadata 14032 */ 14033 14034_OptionalModelFields["default"].prototype['metadata'] = undefined; // Implement FileObjectAllOf interface: 14035 14036/** 14037 * The repository identifier this file belongs too 14038 * @member {String} repositoryId 14039 */ 14040 14041_FileObjectAllOf["default"].prototype['repositoryId'] = undefined; 14042/** 14043 * Name of the original file uploaded 14044 * @member {String} name 14045 */ 14046 14047_FileObjectAllOf["default"].prototype['name'] = undefined; 14048/** 14049 * Mime type of the file. Valid mime types - text/csv or application/vmd.ms-excelor or application/x-directory for directories 14050 * @member {String} mimeType 14051 */ 14052 14053_FileObjectAllOf["default"].prototype['mimeType'] = undefined; 14054/** 14055 * The name of the attachment within the bucket 14056 * @member {String} path 14057 */ 14058 14059_FileObjectAllOf["default"].prototype['path'] = undefined; 14060/** 14061 * The folder name containing the attachment within the bucket 14062 * @member {String} parentFolderPath 14063 */ 14064 14065_FileObjectAllOf["default"].prototype['parentFolderPath'] = undefined; 14066/** 14067 * The uniform resource identifier where the file can be viewed/downloaded 14068 * @member {String} uri 14069 */ 14070 14071_FileObjectAllOf["default"].prototype['uri'] = undefined; 14072/** 14073 * The size of the file 14074 * @member {Number} size 14075 */ 14076 14077_FileObjectAllOf["default"].prototype['size'] = undefined; 14078/** 14079 * Additional constraints, if the value is present it means the 14080 * @member {Array.<String>} constraints 14081 */ 14082 14083_FileObjectAllOf["default"].prototype['constraints'] = undefined; 14084var _default = FileObject; 14085exports["default"] = _default; 14086},{"../ApiClient":3,"./FileObjectAllOf":79,"./ModelDefault":123,"./OptionalModelFields":130}],79:[function(require,module,exports){ 14087"use strict"; 14088 14089Object.defineProperty(exports, "__esModule", { 14090 value: true 14091}); 14092exports["default"] = void 0; 14093 14094var _ApiClient = _interopRequireDefault(require("../ApiClient")); 14095 14096function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 14097 14098function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 14099 14100function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 14101 14102function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 14103 14104/** 14105 * The FileObjectAllOf model module. 14106 * @module model/FileObjectAllOf 14107 * @version 1.0.14 14108 */ 14109var FileObjectAllOf = /*#__PURE__*/function () { 14110 /** 14111 * Constructs a new <code>FileObjectAllOf</code>. 14112 * @alias module:model/FileObjectAllOf 14113 * @param repositoryId {String} The repository identifier this file belongs too 14114 * @param name {String} Name of the original file uploaded 14115 * @param mimeType {String} Mime type of the file. Valid mime types - text/csv or application/vmd.ms-excelor or application/x-directory for directories 14116 * @param path {String} The name of the attachment within the bucket 14117 * @param parentFolderPath {String} The folder name containing the attachment within the bucket 14118 */ 14119 function FileObjectAllOf(repositoryId, name, mimeType, path, parentFolderPath) { 14120 _classCallCheck(this, FileObjectAllOf); 14121 14122 FileObjectAllOf.initialize(this, repositoryId, name, mimeType, path, parentFolderPath); 14123 } 14124 /** 14125 * Initializes the fields of this object. 14126 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 14127 * Only for internal use. 14128 */ 14129 14130 14131 _createClass(FileObjectAllOf, null, [{ 14132 key: "initialize", 14133 value: function initialize(obj, repositoryId, name, mimeType, path, parentFolderPath) { 14134 obj['repositoryId'] = repositoryId; 14135 obj['name'] = name; 14136 obj['mimeType'] = mimeType; 14137 obj['path'] = path; 14138 obj['parentFolderPath'] = parentFolderPath; 14139 } 14140 /** 14141 * Constructs a <code>FileObjectAllOf</code> from a plain JavaScript object, optionally creating a new instance. 14142 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 14143 * @param {Object} data The plain JavaScript object bearing properties of interest. 14144 * @param {module:model/FileObjectAllOf} obj Optional instance to populate. 14145 * @return {module:model/FileObjectAllOf} The populated <code>FileObjectAllOf</code> instance. 14146 */ 14147 14148 }, { 14149 key: "constructFromObject", 14150 value: function constructFromObject(data, obj) { 14151 if (data) { 14152 obj = obj || new FileObjectAllOf(); 14153 14154 if (data.hasOwnProperty('repositoryId')) { 14155 obj['repositoryId'] = _ApiClient["default"].convertToType(data['repositoryId'], 'String'); 14156 } 14157 14158 if (data.hasOwnProperty('name')) { 14159 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 14160 } 14161 14162 if (data.hasOwnProperty('mimeType')) { 14163 obj['mimeType'] = _ApiClient["default"].convertToType(data['mimeType'], 'String'); 14164 } 14165 14166 if (data.hasOwnProperty('path')) { 14167 obj['path'] = _ApiClient["default"].convertToType(data['path'], 'String'); 14168 } 14169 14170 if (data.hasOwnProperty('parentFolderPath')) { 14171 obj['parentFolderPath'] = _ApiClient["default"].convertToType(data['parentFolderPath'], 'String'); 14172 } 14173 14174 if (data.hasOwnProperty('uri')) { 14175 obj['uri'] = _ApiClient["default"].convertToType(data['uri'], 'String'); 14176 } 14177 14178 if (data.hasOwnProperty('size')) { 14179 obj['size'] = _ApiClient["default"].convertToType(data['size'], 'Number'); 14180 } 14181 14182 if (data.hasOwnProperty('constraints')) { 14183 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 14184 } 14185 } 14186 14187 return obj; 14188 } 14189 }]); 14190 14191 return FileObjectAllOf; 14192}(); 14193/** 14194 * The repository identifier this file belongs too 14195 * @member {String} repositoryId 14196 */ 14197 14198 14199FileObjectAllOf.prototype['repositoryId'] = undefined; 14200/** 14201 * Name of the original file uploaded 14202 * @member {String} name 14203 */ 14204 14205FileObjectAllOf.prototype['name'] = undefined; 14206/** 14207 * Mime type of the file. Valid mime types - text/csv or application/vmd.ms-excelor or application/x-directory for directories 14208 * @member {String} mimeType 14209 */ 14210 14211FileObjectAllOf.prototype['mimeType'] = undefined; 14212/** 14213 * The name of the attachment within the bucket 14214 * @member {String} path 14215 */ 14216 14217FileObjectAllOf.prototype['path'] = undefined; 14218/** 14219 * The folder name containing the attachment within the bucket 14220 * @member {String} parentFolderPath 14221 */ 14222 14223FileObjectAllOf.prototype['parentFolderPath'] = undefined; 14224/** 14225 * The uniform resource identifier where the file can be viewed/downloaded 14226 * @member {String} uri 14227 */ 14228 14229FileObjectAllOf.prototype['uri'] = undefined; 14230/** 14231 * The size of the file 14232 * @member {Number} size 14233 */ 14234 14235FileObjectAllOf.prototype['size'] = undefined; 14236/** 14237 * Additional constraints, if the value is present it means the 14238 * @member {Array.<String>} constraints 14239 */ 14240 14241FileObjectAllOf.prototype['constraints'] = undefined; 14242var _default = FileObjectAllOf; 14243exports["default"] = _default; 14244},{"../ApiClient":3}],80:[function(require,module,exports){ 14245"use strict"; 14246 14247Object.defineProperty(exports, "__esModule", { 14248 value: true 14249}); 14250exports["default"] = void 0; 14251 14252var _ApiClient = _interopRequireDefault(require("../ApiClient")); 14253 14254var _Error = _interopRequireDefault(require("./Error")); 14255 14256var _FileObject = _interopRequireDefault(require("./FileObject")); 14257 14258var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 14259 14260function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 14261 14262function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 14263 14264function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 14265 14266function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 14267 14268/** 14269 * The FileObjectResponse model module. 14270 * @module model/FileObjectResponse 14271 * @version 1.0.14 14272 */ 14273var FileObjectResponse = /*#__PURE__*/function () { 14274 /** 14275 * Constructs a new <code>FileObjectResponse</code>. 14276 * @alias module:model/FileObjectResponse 14277 */ 14278 function FileObjectResponse() { 14279 _classCallCheck(this, FileObjectResponse); 14280 14281 FileObjectResponse.initialize(this); 14282 } 14283 /** 14284 * Initializes the fields of this object. 14285 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 14286 * Only for internal use. 14287 */ 14288 14289 14290 _createClass(FileObjectResponse, null, [{ 14291 key: "initialize", 14292 value: function initialize(obj) {} 14293 /** 14294 * Constructs a <code>FileObjectResponse</code> from a plain JavaScript object, optionally creating a new instance. 14295 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 14296 * @param {Object} data The plain JavaScript object bearing properties of interest. 14297 * @param {module:model/FileObjectResponse} obj Optional instance to populate. 14298 * @return {module:model/FileObjectResponse} The populated <code>FileObjectResponse</code> instance. 14299 */ 14300 14301 }, { 14302 key: "constructFromObject", 14303 value: function constructFromObject(data, obj) { 14304 if (data) { 14305 obj = obj || new FileObjectResponse(); 14306 14307 if (data.hasOwnProperty('meta')) { 14308 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 14309 } 14310 14311 if (data.hasOwnProperty('data')) { 14312 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_FileObject["default"]]); 14313 } 14314 14315 if (data.hasOwnProperty('errors')) { 14316 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 14317 } 14318 } 14319 14320 return obj; 14321 } 14322 }]); 14323 14324 return FileObjectResponse; 14325}(); 14326/** 14327 * @member {module:model/ResponseMeta} meta 14328 */ 14329 14330 14331FileObjectResponse.prototype['meta'] = undefined; 14332/** 14333 * @member {Array.<module:model/FileObject>} data 14334 */ 14335 14336FileObjectResponse.prototype['data'] = undefined; 14337/** 14338 * @member {Array.<module:model/Error>} errors 14339 */ 14340 14341FileObjectResponse.prototype['errors'] = undefined; 14342var _default = FileObjectResponse; 14343exports["default"] = _default; 14344},{"../ApiClient":3,"./Error":74,"./FileObject":78,"./ResponseMeta":144}],81:[function(require,module,exports){ 14345"use strict"; 14346 14347Object.defineProperty(exports, "__esModule", { 14348 value: true 14349}); 14350exports["default"] = void 0; 14351 14352var _ApiClient = _interopRequireDefault(require("../ApiClient")); 14353 14354var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 14355 14356function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 14357 14358function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 14359 14360function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 14361 14362function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 14363 14364/** 14365 * The FileRequest model module. 14366 * @module model/FileRequest 14367 * @version 1.0.14 14368 */ 14369var FileRequest = /*#__PURE__*/function () { 14370 /** 14371 * Constructs a new <code>FileRequest</code>. 14372 * @alias module:model/FileRequest 14373 */ 14374 function FileRequest() { 14375 _classCallCheck(this, FileRequest); 14376 14377 FileRequest.initialize(this); 14378 } 14379 /** 14380 * Initializes the fields of this object. 14381 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 14382 * Only for internal use. 14383 */ 14384 14385 14386 _createClass(FileRequest, null, [{ 14387 key: "initialize", 14388 value: function initialize(obj) {} 14389 /** 14390 * Constructs a <code>FileRequest</code> from a plain JavaScript object, optionally creating a new instance. 14391 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 14392 * @param {Object} data The plain JavaScript object bearing properties of interest. 14393 * @param {module:model/FileRequest} obj Optional instance to populate. 14394 * @return {module:model/FileRequest} The populated <code>FileRequest</code> instance. 14395 */ 14396 14397 }, { 14398 key: "constructFromObject", 14399 value: function constructFromObject(data, obj) { 14400 if (data) { 14401 obj = obj || new FileRequest(); 14402 14403 if (data.hasOwnProperty('ids')) { 14404 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 14405 } 14406 14407 if (data.hasOwnProperty('sortBy')) { 14408 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 14409 } 14410 14411 if (data.hasOwnProperty('skip')) { 14412 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 14413 } 14414 14415 if (data.hasOwnProperty('limit')) { 14416 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 14417 } 14418 14419 if (data.hasOwnProperty('repositoryId')) { 14420 obj['repositoryId'] = _ApiClient["default"].convertToType(data['repositoryId'], 'String'); 14421 } 14422 } 14423 14424 return obj; 14425 } 14426 }]); 14427 14428 return FileRequest; 14429}(); 14430/** 14431 * @member {Array.<String>} ids 14432 */ 14433 14434 14435FileRequest.prototype['ids'] = undefined; 14436/** 14437 * @member {Array.<module:model/QuerySortBy>} sortBy 14438 */ 14439 14440FileRequest.prototype['sortBy'] = undefined; 14441/** 14442 * @member {Number} skip 14443 */ 14444 14445FileRequest.prototype['skip'] = undefined; 14446/** 14447 * @member {Number} limit 14448 */ 14449 14450FileRequest.prototype['limit'] = undefined; 14451/** 14452 * @member {String} repositoryId 14453 */ 14454 14455FileRequest.prototype['repositoryId'] = undefined; 14456var _default = FileRequest; 14457exports["default"] = _default; 14458},{"../ApiClient":3,"./QuerySortBy":141}],82:[function(require,module,exports){ 14459"use strict"; 14460 14461Object.defineProperty(exports, "__esModule", { 14462 value: true 14463}); 14464exports["default"] = void 0; 14465 14466var _ApiClient = _interopRequireDefault(require("../ApiClient")); 14467 14468var _Error = _interopRequireDefault(require("./Error")); 14469 14470var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 14471 14472function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 14473 14474function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 14475 14476function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor
14476.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 14477 14478function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 14479 14480/** 14481 * The FileResponse model module. 14482 * @module model/FileResponse 14483 * @version 1.0.14 14484 */ 14485var FileResponse = /*#__PURE__*/function () { 14486 /** 14487 * Constructs a new <code>FileResponse</code>. 14488 * @alias module:model/FileResponse 14489 */ 14490 function FileResponse() { 14491 _classCallCheck(this, FileResponse); 14492 14493 FileResponse.initialize(this); 14494 } 14495 /** 14496 * Initializes the fields of this object. 14497 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 14498 * Only for internal use. 14499 */ 14500 14501 14502 _createClass(FileResponse, null, [{ 14503 key: "initialize", 14504 value: function initialize(obj) {} 14505 /** 14506 * Constructs a <code>FileResponse</code> from a plain JavaScript object, optionally creating a new instance. 14507 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 14508 * @param {Object} data The plain JavaScript object bearing properties of interest. 14509 * @param {module:model/FileResponse} obj Optional instance to populate. 14510 * @return {module:model/FileResponse} The populated <code>FileResponse</code> instance. 14511 */ 14512 14513 }, { 14514 key: "constructFromObject", 14515 value: function constructFromObject(data, obj) { 14516 if (data) { 14517 obj = obj || new FileResponse(); 14518 14519 if (data.hasOwnProperty('meta')) { 14520 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 14521 } 14522 14523 if (data.hasOwnProperty('data')) { 14524 obj['data'] = _ApiClient["default"].convertToType(data['data'], [File]); 14525 } 14526 14527 if (data.hasOwnProperty('errors')) { 14528 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 14529 } 14530 } 14531 14532 return obj; 14533 } 14534 }]); 14535 14536 return FileResponse; 14537}(); 14538/** 14539 * @member {module:model/ResponseMeta} meta 14540 */ 14541 14542 14543FileResponse.prototype['meta'] = undefined; 14544/** 14545 * @member {Array.<File>} data 14546 */ 14547 14548FileResponse.prototype['data'] = undefined; 14549/** 14550 * @member {Array.<module:model/Error>} errors 14551 */ 14552 14553FileResponse.prototype['errors'] = undefined; 14554var _default = FileResponse; 14555exports["default"] = _default; 14556},{"../ApiClient":3,"./Error":74,"./ResponseMeta":144}],83:[function(require,module,exports){ 14557"use strict"; 14558 14559Object.defineProperty(exports, "__esModule", { 14560 value: true 14561}); 14562exports["default"] = void 0; 14563 14564var _ApiClient = _interopRequireDefault(require("../ApiClient")); 14565 14566function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 14567 14568function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 14569 14570function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 14571 14572function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 14573 14574/** 14575 * The GridLocation model module. 14576 * @module model/GridLocation 14577 * @version 1.0.14 14578 */ 14579var GridLocation = /*#__PURE__*/function () { 14580 /** 14581 * Constructs a new <code>GridLocation</code>. 14582 * This struct contains two integer-valued fields, row and col . A GridLocation can be used to represent a location in a two-dimensional grid. 14583 * @alias module:model/GridLocation 14584 * @param row {Number} 14585 * @param col {Number} 14586 */ 14587 function GridLocation(row, col) { 14588 _classCallCheck(this, GridLocation); 14589
14590 GridLocation.initialize(this, row, col); 14591 } 14592 /** 14593 * Initializes the fields of this object. 14594 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 14595 * Only for internal use. 14596 */ 14597 14598 14599 _createClass(GridLocation, null, [{ 14600 key: "initialize", 14601 value: function initialize(obj, row, col) { 14602 obj['row'] = row; 14603 obj['col'] = col; 14604 } 14605 /** 14606 * Constructs a <code>GridLocation</code> from a plain JavaScript object, optionally creating a new instance. 14607 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 14608 * @param {Object} data The plain JavaScript object bearing properties of interest. 14609 * @param {module:model/GridLocation} obj Optional instance to populate. 14610 * @return {module:model/GridLocation} The populated <code>GridLocation</code> instance. 14611 */ 14612 14613 }, { 14614 key: "constructFromObject", 14615 value: function constructFromObject(data, obj) { 14616 if (data) { 14617 obj = obj || new GridLocation(); 14618 14619 if (data.hasOwnProperty('row')) { 14620 obj['row'] = _ApiClient["default"].convertToType(data['row'], 'Number'); 14621 } 14622 14623 if (data.hasOwnProperty('col')) { 14624 obj['col'] = _ApiClient["default"].convertToType(data['col'], 'Number'); 14625 } 14626 } 14627 14628 return obj; 14629 } 14630 }]); 14631 14632 return GridLocation; 14633}(); 14634/** 14635 * @member {Number} row 14636 */ 14637 14638 14639GridLocation.prototype['row'] = undefined; 14640/** 14641 * @member {Number} col 14642 */ 14643 14644GridLocation.prototype['col'] = undefined; 14645var _default = GridLocation; 14646exports["default"] = _default; 14647},{"../ApiClient":3}],84:[function(require,module,exports){ 14648"use strict"; 14649 14650Object.defineProperty(exports, "__esModule", { 14651 value: true 14652}); 14653exports["default"] = void 0; 14654 14655var _ApiClient = _interopRequireDefault(require("../ApiClient")); 14656 14657var _InstantWinAllOf = _interopRequireDefault(require("./InstantWinAllOf")); 14658 14659var _InstantWinTile = _interopRequireDefault(require("./InstantWinTile")); 14660 14661var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 14662 14663var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 14664 14665function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 14666 14667function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 14668 14669function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 14670 14671function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 14672 14673/** 14674 * The InstantWin model module. 14675 * @module model/InstantWin 14676 * @version 1.0.14 14677 */ 14678var InstantWin = /*#__PURE__*/function () { 14679 /** 14680 * Constructs a new <code>InstantWin</code>. 14681 * @alias module:model/InstantWin 14682 * @implements module:model/InstantWinAllOf 14683 * @implements module:model/ModelDefault 14684 * @implements module:model/OptionalModelFields 14685 * @param instantWinType {Number} 14686 * @param tiles {Array.<module:model/InstantWinTile>} 14687 * @param id {String} Ziqni id of the model 14688 */ 14689 function InstantWin(instantWinType, tiles, id) { 14690 _classCallCheck(this, InstantWin); 14691 14692 _InstantWinAllOf["default"].initialize(this, instantWinType, tiles); 14693 14694 _ModelDefault["default"].initialize(this, id); 14695 14696 _OptionalModelFields["default"].initialize(this); 14697 14698 InstantWin.initialize(this, instantWinType, tiles, id); 14699 } 14700 /** 14701 * Initializes the fields of this object. 14702 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 14703 * Only for internal use. 14704 */ 14705 14706 14707 _createClass(InstantWin, null, [{ 14708 key: "initialize", 14709 value: function initialize(obj, instantWinType, tiles, id) { 14710 obj['instantWinType'] = instantWinType; 14711 obj['tiles'] = tiles; 14712 obj['id'] = id; 14713 } 14714 /** 14715 * Constructs a <code>InstantWin</code> from a plain JavaScript object, optionally creating a new instance. 14716 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 14717 * @param {Object} data The plain JavaScript object bearing properties of interest. 14718 * @param {module:model/InstantWin} obj Optional instance to populate. 14719 * @return {module:model/InstantWin} The populated <code>InstantWin</code> instance. 14720 */ 14721 14722 }, { 14723 key: "constructFromObject", 14724 value: function constructFromObject(data, obj) { 14725 if (data) { 14726 obj = obj || new InstantWin(); 14727 14728 _InstantWinAllOf["default"].constructFromObject(data, obj); 14729 14730 _ModelDefault["default"].constructFromObject(data, obj); 14731 14732 _OptionalModelFields["default"].constructFromObject(data, obj); 14733 14734 if (data.hasOwnProperty('name')) { 14735 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 14736 } 14737 14738 if (data.hasOwnProperty('description')) { 14739 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 14740 } 14741 14742 if (data.hasOwnProperty('termsAndConditions')) { 14743 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 14744 } 14745 14746 if (data.hasOwnProperty('constraints')) { 14747 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 14748 } 14749 14750 if (data.hasOwnProperty('statusCode')) { 14751 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 14752 } 14753 14754 if (data.hasOwnProperty('instantWinType')) { 14755 obj['instantWinType'] = _ApiClient["default"].convertToType(data['instantWinType'], 'Number'); 14756 } 14757 14758 if (data.hasOwnProperty('iconLink')) { 14759 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 14760 } 14761 14762 if (data.hasOwnProperty('bannerLink')) { 14763 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 14764 } 14765 14766 if (data.hasOwnProperty('bannerLowResolutionLink')) { 14767 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 14768 } 14769 14770 if (data.hasOwnProperty('bannerHighResolutionLink')) { 14771 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 14772 } 14773 14774 if (data.hasOwnProperty('tiles')) { 14775 obj['tiles'] = _ApiClient["default"].convertToType(data['tiles'], [_InstantWinTile["default"]]); 14776 } 14777 14778 if (data.hasOwnProperty('id')) { 14779 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 14780 } 14781 14782 if (data.hasOwnProperty('spaceName')) { 14783 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 14784 } 14785 14786 if (data.hasOwnProperty('created')) { 14787 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 14788 } 14789 14790 if (data.hasOwnProperty('customFields')) { 14791 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 14792 'String': Object 14793 }); 14794 } 14795 14796 if (data.hasOwnProperty('tags')) { 14797 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 14798 } 14799 14800 if (data.hasOwnProperty('metadata')) { 14801 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 14802 'String': 'String' 14803 }); 14804 } 14805 } 14806 14807 return obj; 14808 } 14809 }]); 14810 14811 return InstantWin; 14812}(); 14813/** 14814 * @member {String} name 14815 */ 14816 14817 14818InstantWin.prototype['name'] = undefined; 14819/** 14820 * @member {String} description 14821 */ 14822 14823InstantWin.prototype['description'] = undefined; 14824/** 14825 * @member {String} termsAndConditions 14826 */ 14827 14828InstantWin.prototype['termsAndConditions'] = undefined; 14829/** 14830 * Additional constraints, if set means true [optinRequiredForEntrants, hasRules, hasRew
14830ards] 14831 * @member {Array.<String>} constraints 14832 */ 14833 14834InstantWin.prototype['constraints'] = undefined; 14835/** 14836 * @member {Number} statusCode 14837 */ 14838 14839InstantWin.prototype['statusCode'] = undefined; 14840/** 14841 * @member {Number} instantWinType 14842 */ 14843 14844InstantWin.prototype['instantWinType'] = undefined; 14845/** 14846 * Attachement id for the corresponding icon image. 14847 * @member {String} iconLink 14848 */ 14849 14850InstantWin.prototype['iconLink'] = undefined; 14851/** 14852 * Link to the banner 14853 * @member {String} bannerLink 14854 */ 14855 14856InstantWin.prototype['bannerLink'] = undefined; 14857/** 14858 * Link to the bannerLowResolution 14859 * @member {String} bannerLowResolutionLink 14860 */ 14861 14862InstantWin.prototype['bannerLowResolutionLink'] = undefined; 14863/** 14864 * Link to the bannerHighResolution 14865 * @member {String} bannerHighResolutionLink 14866 */ 14867 14868InstantWin.prototype['bannerHighResolutionLink'] = undefined; 14869/** 14870 * @member {Array.<module:model/InstantWinTile>} tiles 14871 */ 14872 14873InstantWin.prototype['tiles'] = undefined; 14874/** 14875 * Ziqni id of the model 14876 * @member {String} id 14877 */ 14878 14879InstantWin.prototype['id'] = undefined; 14880/** 14881 * This is the space name which is linked to the account 14882 * @member {String} spaceName 14883 */ 14884 14885InstantWin.prototype['spaceName'] = undefined; 14886/** 14887 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 14888 * @member {Date} created 14889 */ 14890 14891InstantWin.prototype['created'] = undefined; 14892/** 14893 * @member {Object.<String, Object>} customFields 14894 */ 14895 14896InstantWin.prototype['customFields'] = undefined; 14897/** 14898 * A list of id's used to tag models 14899 * @member {Array.<String>} tags 14900 */ 14901 14902InstantWin.prototype['tags'] = undefined; 14903/** 14904 * @member {Object.<String, String>} metadata 14905 */ 14906 14907InstantWin.prototype['metadata'] = undefined; // Implement InstantWinAllOf interface: 14908 14909/** 14910 * @member {String} name 14911 */ 14912 14913_InstantWinAllOf["default"].prototype['name'] = undefined; 14914/** 14915 * @member {String} description 14916 */ 14917 14918_InstantWinAllOf["default"].prototype['description'] = undefined; 14919/** 14920 * @member {String} termsAndConditions 14921 */ 14922 14923_InstantWinAllOf["default"].prototype['termsAndConditions'] = undefined; 14924/** 14925 * Additional constraints, if set means true [optinRequiredForEntrants, hasRules, hasRewards] 14926 * @member {Array.<String>} constraints 14927 */ 14928 14929_InstantWinAllOf["default"].prototype['constraints'] = undefined; 14930/** 14931 * @member {Number} statusCode 14932 */ 14933 14934_InstantWinAllOf["default"].prototype['statusCode'] = undefined; 14935/** 14936 * @member {Number} instantWinType 14937 */ 14938 14939_InstantWinAllOf["default"].prototype['instantWinType'] = undefined; 14940/** 14941 * Attachement id for the corresponding icon image. 14942 * @member {String} iconLink 14943 */ 14944 14945_InstantWinAllOf["default"].prototype['iconLink'] = undefined; 14946/** 14947 * Link to the banner 14948 * @member {String} bannerLink 14949 */ 14950 14951_InstantWinAllOf["default"].prototype['bannerLink'] = undefined; 14952/** 14953 * Link to the bannerLowResolution 14954 * @member {String} bannerLowResolutionLink 14955 */ 14956 14957_InstantWinAllOf["default"].prototype['bannerLowResolutionLink'] = undefined; 14958/** 14959 * Link to the bannerHighResolution 14960 * @member {String} bannerHighResolutionLink 14961 */ 14962 14963_InstantWinAllOf["default"].prototype['bannerHighResolutionLink'] = undefined; 14964/** 14965 * @member {Array.<module:model/InstantWinTile>} tiles 14966 */ 14967 14968_InstantWinAllOf["default"].prototype['tiles'] = undefined; // Implement ModelDefault interface: 14969 14970/** 14971 * Ziqni id of the model 14972 * @member {String} id 14973 */ 14974 14975_ModelDefault["default"].prototype['id'] = undefined; 14976/** 14977 * This is the space name which is linked to the account 14978 * @member {String} spaceName 14979 */ 14980 14981_ModelDefault["default"].prototype['spaceName'] = undefined; 14982/** 14983 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 14984 * @member {Date} created 14985 */ 14986 14987_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 14988 14989/** 14990 * @member {Object.<String, Object>} customFields 14991 */ 14992 14993_OptionalModelFields["default"].prototype['customFields'] = undefined; 14994/** 14995 * A list of id's used to tag models 14996 * @member {Array.<String>} tags 14997 */ 14998 14999_OptionalModelFields["default"].prototype['tags'] = undefined; 15000/** 15001 * @member {Object.<String, String>} metadata 15002 */ 15003 15004_OptionalModelFields["default"].prototype['metadata'] = undefined; 15005var _default = InstantWin; 15006exports["default"] = _default; 15007},{"../ApiClient":3,"./InstantWinAllOf":85,"./InstantWinTile":94,"./ModelDefault":123,"./OptionalModelFields":130}],85:[function(require,module,exports){ 15008"use strict"; 15009 15010Object.defineProperty(exports, "__esModule", { 15011 value: true 15012}); 15013exports["default"] = void 0; 15014 15015var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15016 15017var _InstantWinTile = _interopRequireDefault(require("./InstantWinTile")); 15018 15019function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15020 15021function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15022 15023function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15024 15025function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15026 15027/** 15028 * The InstantWinAllOf model module. 15029 * @module model/InstantWinAllOf 15030 * @version 1.0.14 15031 */ 15032var InstantWinAllOf = /*#__PURE__*/function () { 15033 /** 15034 * Constructs a new <code>InstantWinAllOf</code>. 15035 * @alias module:model/InstantWinAllOf 15036 * @param instantWinType {Number} 15037 * @param tiles {Array.<module:model/InstantWinTile>} 15038 */ 15039 function InstantWinAllOf(instantWinType, tiles) { 15040 _classCallCheck(this, InstantWinAllOf); 15041 15042 InstantWinAllOf.initialize(this, instantWinType, tiles); 15043 } 15044 /** 15045 * Initializes the fields of this object. 15046 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15047 * Only for internal use. 15048 */ 15049 15050 15051 _createClass(InstantWinAllOf, null, [{ 15052 key: "initialize", 15053 value: function initialize(obj, instantWinType, tiles) { 15054 obj['instantWinType'] = instantWinType; 15055 obj['tiles'] = tiles; 15056 } 15057 /** 15058 * Constructs a <code>InstantWinAllOf</code> from a plain JavaScript object, optionally creating a new instance. 15059 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15060 * @param {Object} data The plain JavaScript object bearing properties of interest. 15061 * @param {module:model/InstantWinAllOf} obj Optional instance to populate. 15062 * @return {module:model/InstantWinAllOf} The populated <code>InstantWinAllOf</code> instance. 15063 */ 15064 15065 }, { 15066 key: "constructFromObject", 15067 value: function constructFromObject(data, obj) { 15068 if (data) { 15069 obj = obj || new InstantWinAllOf(); 15070 15071 if (data.hasOwnProperty('name')) { 15072 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 15073 } 15074 15075 if (data.hasOwnProperty('description')) { 15076 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 15077 } 15078 15079 if (data.hasOwnProperty('termsAndConditions')) { 15080 obj['termsAndConditions'] = _ApiClient["default"].convertToType(data['termsAndConditions'], 'String'); 15081 } 15082 15083 if (data.hasOwnProperty('constraints')) { 15084 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 15085 } 15086 15087 if (data.hasOwnProperty('statusCode')) { 15088 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 15089 } 15090 15091 if (data.hasOwnProperty('instantWinType')) { 15092 obj['instantWinType'] = _ApiClient["default"].convertToType(data['instantWinType'], 'Number'); 15093 } 15094 15095 if (data.hasOwnProperty('iconLink')) { 15096 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 15097 } 15098 15099 if (data.hasOwnProperty('bannerLink')) { 15100 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 15101 } 15102 15103 if (data.hasOwnProperty('bannerLowResolutionLink')) { 15104 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 15105 } 15106 15107 if (data.hasOwnProperty('bannerHighResolutionLink')) { 15108 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 15109 } 15110 15111 if (data.hasOwnProperty('tiles')) { 15112 obj['tiles'] = _ApiClient["default"].convertToType(data['tiles'], [_InstantWinTile["default"]]); 15113 } 15114 } 15115 15116 return obj; 15117 } 15118 }]); 15119 15120 return InstantWinAllOf; 15121}(); 15122/** 15123 * @member {String} name 15124 */ 15125 15126 15127InstantWinAllOf.prototype['name'] = undefined; 15128/** 15129 * @member {String} description 15130 */ 15131 15132InstantWinAllOf.prototype['description'] = undefined; 15133/** 15134 * @member {String} termsAndConditions 15135 */ 15136 15137InstantWinAllOf.prototype['termsAndConditions'] = undefined; 15138/** 15139 * Additional constraints, if set means true [optinRequiredForEntrants, hasRules, hasRew
15139ards] 15140 * @member {Array.<String>} constraints 15141 */ 15142 15143InstantWinAllOf.prototype['constraints'] = undefined; 15144/** 15145 * @member {Number} statusCode 15146 */ 15147 15148InstantWinAllOf.prototype['statusCode'] = undefined; 15149/** 15150 * @member {Number} instantWinType 15151 */ 15152 15153InstantWinAllOf.prototype['instantWinType'] = undefined; 15154/** 15155 * Attachement id for the corresponding icon image. 15156 * @member {String} iconLink 15157 */ 15158 15159InstantWinAllOf.prototype['iconLink'] = undefined; 15160/** 15161 * Link to the banner 15162 * @member {String} bannerLink 15163 */ 15164 15165InstantWinAllOf.prototype['bannerLink'] = undefined; 15166/** 15167 * Link to the bannerLowResolution 15168 * @member {String} bannerLowResolutionLink 15169 */ 15170 15171InstantWinAllOf.prototype['bannerLowResolutionLink'] = undefined; 15172/** 15173 * Link to the bannerHighResolution 15174 * @member {String} bannerHighResolutionLink 15175 */ 15176 15177InstantWinAllOf.prototype['bannerHighResolutionLink'] = undefined; 15178/** 15179 * @member {Array.<module:model/InstantWinTile>} tiles 15180 */ 15181 15182InstantWinAllOf.prototype['tiles'] = undefined; 15183var _default = InstantWinAllOf; 15184exports["default"] = _default; 15185},{"../ApiClient":3,"./InstantWinTile":94}],86:[function(require,module,exports){ 15186"use strict"; 15187 15188Object.defineProperty(exports, "__esModule", { 15189 value: true 15190}); 15191exports["default"] = void 0; 15192 15193var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15194 15195function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15196 15197function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15198 15199function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15200 15201function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15202 15203/** 15204 * The InstantWinFilter model module. 15205 * @module model/InstantWinFilter 15206 * @version 1.0.14 15207 */ 15208var InstantWinFilter = /*#__PURE__*/function () { 15209 /** 15210 * Constructs a new <code>InstantWinFilter</code>. 15211 * @alias module:model/InstantWinFilter 15212 */ 15213 function InstantWinFilter() { 15214 _classCallCheck(this, InstantWinFilter); 15215 15216 InstantWinFilter.initialize(this); 15217 } 15218 /** 15219 * Initializes the fields of this object. 15220 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15221 * Only for internal use. 15222 */ 15223 15224 15225 _createClass(InstantWinFilter, null, [{ 15226 key: "initialize", 15227 value: function initialize(obj) {} 15228 /** 15229 * Constructs a <code>InstantWinFilter</code> from a plain JavaScript object, optionally creating a new instance. 15230 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15231 * @param {Object} data The plain JavaScript object bearing properties of interest. 15232 * @param {module:model/InstantWinFilter} obj Optional instance to populate. 15233 * @return {module:model/InstantWinFilter} The populated <code>InstantWinFilter</code> instance. 15234 */ 15235 15236 }, { 15237 key: "constructFromObject", 15238 value: function constructFromObject(data, obj) { 15239 if (data) { 15240 obj = obj || new InstantWinFilter(); 15241 15242 if (data.hasOwnProperty('tags')) { 15243 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 15244 } 15245 15246 if (data.hasOwnProperty('ids')) { 15247 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 15248 } 15249 15250 if (data.hasOwnProperty('skip')) { 15251 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 15252 } 15253 15254 if (data.hasOwnProperty('limit')) { 15255 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 15256 } 15257 15258 if (data.hasOwnProperty('constraints')) { 15259 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 15260 } 15261 15262 if (data.hasOwnProperty('instantWinTypes')) { 15263 obj['instantWinTypes'] = _ApiClient["default"].convertToType(data['instantWinTypes'], ['Number']); 15264 } 15265 } 15266 15267 return obj; 15268 } 15269 }]); 15270 15271 return InstantWinFilter; 15272}(); 15273/** 15274 * @member {Array.<String>} tags 15275 */ 15276 15277 15278InstantWinFilter.prototype['tags'] = undefined; 15279/** 15280 * @member {Array.<String>} ids 15281 */ 15282 15283InstantWinFilter.prototype['ids'] = undefined; 15284/** 15285 * @member {Number} skip 15286 */ 15287 15288InstantWinFilter.prototype['skip'] = undefined; 15289/** 15290 * @member {Number} limit 15291 */ 15292 15293InstantWinFilter.prototype['limit'] = undefined; 15294/** 15295 * Specify the constraints that need to be applied to the filter. 15296 * @member {Array.<String>} constraints 15297 */ 15298 15299InstantWinFilter.prototype['constraints'] = undefined; 15300/** 15301 * @member {Array.<Number>} instantWinTypes 15302 */ 15303 15304InstantWinFilter.prototype['instantWinTypes'] = undefined; 15305var _default = InstantWinFilter; 15306exports["default"] = _default; 15307},{"../ApiClient":3}],87:[function(require,module,exports){ 15308"use strict"; 15309 15310Object.defineProperty(exports, "__esModule", { 15311 value: true 15312}); 15313exports["default"] = void 0; 15314 15315var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15316 15317var _Award = _interopRequireDefault(require("./Award")); 15318 15319var _InstantWinTile = _interopRequireDefault(require("./InstantWinTile")); 15320 15321function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15322 15323function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15324 15325function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15326 15327function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15328 15329/** 15330 * The InstantWinPlayOutcome model module. 15331 * @module model/InstantWinPlayOutcome 15332 * @version 1.0.14 15333 */ 15334var InstantWinPlayOutcome = /*#__PURE__*/function () { 15335 /** 15336 * Constructs a new <code>InstantWinPlayOutcome</code>. 15337 * @alias module:model/InstantWinPlayOutcome 15338 */ 15339 function InstantWinPlayOutcome() { 15340 _classCallCheck(this, InstantWinPlayOutcome); 15341 15342 InstantWinPlayOutcome.initialize(this); 15343 } 15344 /** 15345 * Initializes the fields of this object. 15346 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15347 * Only for internal use. 15348 */ 15349 15350 15351 _createClass(InstantWinPlayOutcome, null, [{ 15352 key: "initialize", 15353 value: function initialize(obj) {} 15354 /** 15355 * Constructs a <code>InstantWinPlayOutcome</code> from a plain JavaScript object, optionally creating a new instance. 15356 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15357 * @param {Object} data The plain JavaScript object bearing properties of interest. 15358 * @param {module:model/InstantWinPlayOutcome} obj Optional instance to populate. 15359 * @return {module:model/InstantWinPlayOutcome} The populated <code>InstantWinPlayOutcome</code> instance. 15360 */ 15361 15362 }, { 15363 key: "constructFromObject", 15364 value: function constructFromObject(data, obj) { 15365 if (data) { 15366 obj = obj || new InstantWinPlayOutcome(); 15367 15368 if (data.hasOwnProperty('awards')) { 15369 obj['awards'] = _ApiClient["default"].convertToType(data['awards'], [_Award["default"]]); 15370 } 15371 15372 if (data.hasOwnProperty('tiles')) { 15373 obj['tiles'] = _ApiClient["default"].convertToType(data['tiles'], [_InstantWinTile["default"]]); 15374 } 15375 } 15376 15377 return obj; 15378 } 15379 }]); 15380 15381 return InstantWinPlayOutcome; 15382}(); 15383/** 15384 * The awards that the member unlocked 15385 * @member {Array.<module:model/Award>} awards 15386 */ 15387 15388 15389InstantWinPlayOutcome.prototype['awards'] = undefined; 15390/** 15391 * The tiles uncovered during the game session, for the wheel of fortune this will be the slice the player landed on for a scratch card it would be the revealed tiles 15392 * @member {Array.<module:model/InstantWinTile>} tiles 15393 */ 15394 15395InstantWinPlayOutcome.prototype['tiles'] = undefined; 15396var _default = InstantWinPlayOutcome; 15397exports["default"] = _default; 15398},{"../ApiClient":3,"./Award":32,"./InstantWinTile":94}],88:[function(require,module,exports){ 15399"use strict"; 15400 15401Object.defineProperty(exports, "__esModule", { 15402 value: true 15403}); 15404exports["default"] = void 0; 15405 15406var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15407 15408function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15409 15410function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15411 15412function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15413 15414function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15415 15416/** 15417 * The InstantWinPlayRequest model module. 15418 * @module model/InstantWinPlayRequest 15419 * @version 1.0.14 15420 */ 15421var InstantWinPlayRequest = /*#__PURE__*/function () { 15422 /** 15423 * Constructs a new <code>InstantWinPlayRequest</code>. 15424 * @alias module:model/InstantWinPlayRequest 15425 */ 15426 function InstantWinPlayRequest() { 15427 _classCallCheck(this, InstantWinPlayRequest); 15428 15429 InstantWinPlayRequest.initialize(this); 15430 } 15431 /** 15432 * Initializes the fields of this object. 15433 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15434 * Only for internal use. 15435 */ 15436 15437 15438 _createClass(InstantWinPlayRequest, null, [{ 15439 key: "initialize", 15440 value: function initialize(obj) {} 15441 /** 15442 * Constructs a <code>InstantWinPlayRequest</code> from a plain JavaScript object, optionally creating a new instance. 15443 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15444 * @param {Object} data The plain JavaScript object bearing properties of interest. 15445 * @param {module:model/InstantWinPlayRequest} obj Optional instance to populate. 15446 * @return {module:model/InstantWinPlayRequest} The populated <code>InstantWinPlayRequest</code> instance. 15447 */ 15448 15449 }, { 15450 key: "constructFromObject", 15451 value: function constructFromObject(data, obj) { 15452 if (data) { 15453 obj = obj || new InstantWinPlayRequest(); 15454 15455 if (data.hasOwnProperty('awardId')) { 15456 obj['awardId'] = _ApiClient["default"].convertToType(data['awardId'], 'String'); 15457 } 15458 15459 if (data.hasOwnProperty('languageKey')) { 15460 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 15461 } 15462 15463 if (data.hasOwnProperty('currencyKey')) { 15464 obj['currencyKey'] = _ApiClient["default"].convertToType(data['currencyKey'], 'String'); 15465 } 15466 } 15467 15468 return obj; 15469 } 15470 }]); 15471 15472 return InstantWinPlayRequest; 15473}(); 15474/** 15475 * The award identifier is required to claim this. This can only be made once. 15476 * @member {String} awardId 15477 */ 15478 15479 15480InstantWinPlayRequest.prototype['awardId'] = undefined; 15481/** 15482 * The language codes can be found in the settings/transalations section of the back office 15483 * @member {String} languageKey 15484 */ 15485 15486InstantWinPlayRequest.prototype['languageKey'] = undefined; 15487/** 15488 * The UoM currency key to normalise the value to for presentation. Example; If the reward is in EUR and this value is set to USD then the value will be multiplied by 1.09387699997429 15489 * @member {String} currencyKey 15490 */ 15491 15492InstantWinPlayRequest.prototype['currencyKey'] = undefined; 15493var _default = InstantWinPlayRequest; 15494exports["default"] = _default; 15495},{"../ApiClient":3}],89:[function(require,module,exports){ 15496"use strict"; 15497 15498Object.defineProperty(exports, "__esModule", { 15499 value: true 15500}); 15501exports["default"] = void 0; 15502 15503var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15504 15505var _Error = _interopRequireDefault(require("./Error")); 15506 15507var _InstantWinPlayOutcome = _interopRequireDefault(require("./InstantWinPlayOutcome")); 15508 15509var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 15510 15511function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15512 15513function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15514 15515function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15516 15517function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15518 15519/** 15520 * The InstantWinPlayResponse model module. 15521 * @module model/InstantWinPlayResponse 15522 * @version 1.0.14 15523 */ 15524var InstantWinPlayResponse = /*#__PURE__*/function () { 15525 /** 15526 * Constructs a new <code>InstantWinPlayResponse</code>. 15527 * @alias module:model/InstantWinPlayResponse 15528 */ 15529 function InstantWinPlayResponse() { 15530 _classCallCheck(this, InstantWinPlayResponse); 15531 15532 InstantWinPlayResponse.initialize(this); 15533 } 15534 /** 15535 * Initializes the fields of this object. 15536 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15537 * Only for internal use. 15538 */ 15539 15540 15541 _createClass(InstantWinPlayResponse, null, [{ 15542 key: "initialize", 15543 value: function initialize(obj) {} 15544 /** 15545 * Constructs a <code>InstantWinPlayResponse</code> from a plain JavaScript object, optionally creating a new instance. 15546 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15547 * @param {Object} data The plain JavaScript object bearing properties of interest. 15548 * @param {module:model/InstantWinPlayResponse} obj Optional instance to populate. 15549 * @return {module:model/InstantWinPlayResponse} The populated <code>InstantWinPlayResponse</code> instance. 15550 */ 15551 15552 }, { 15553 key: "constructFromObject", 15554 value: function constructFromObject(data, obj) { 15555 if (data) { 15556 obj = obj || new InstantWinPlayResponse(); 15557 15558 if (data.hasOwnProperty('meta')) { 15559 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 15560 } 15561 15562 if (data.hasOwnProperty('data')) { 15563 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_InstantWinPlayOutcome["default"]]); 15564 } 15565 15566 if (data.hasOwnProperty('errors')) { 15567 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 15568 } 15569 } 15570 15571 return obj; 15572 } 15573 }]); 15574 15575 return InstantWinPlayResponse; 15576}(); 15577/** 15578 * @member {module:model/ResponseMeta} meta 15579 */ 15580 15581 15582InstantWinPlayResponse.prototype['meta'] = undefined; 15583/** 15584 * @member {Array.<module:model/InstantWinPlayOutcome>} data 15585 */ 15586 15587InstantWinPlayResponse.prototype['data'] = undefined; 15588/** 15589 * @member {Array.<module:model/Error>} errors 15590 */ 15591 15592InstantWinPlayResponse.prototype['errors'] = undefined; 15593var _default = InstantWinPlayResponse; 15594exports["default"] = _default; 15595},{"../ApiClient":3,"./Error":74,"./InstantWinPlayOutcome":87,"./ResponseMeta":144}]
15595,90:[function(require,module,exports){ 15596"use strict"; 15597 15598Object.defineProperty(exports, "__esModule", { 15599 value: true 15600}); 15601exports["default"] = void 0; 15602 15603var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15604 15605var _InstantWinFilter = _interopRequireDefault(require("./InstantWinFilter")); 15606 15607function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15608 15609function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15610 15611function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15612 15613function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15614 15615/** 15616 * The InstantWinRequest model module. 15617 * @module model/InstantWinRequest 15618 * @version 1.0.14 15619 */ 15620var InstantWinRequest = /*#__PURE__*/function () { 15621 /** 15622 * Constructs a new <code>InstantWinRequest</code>. 15623 * @alias module:model/InstantWinRequest 15624 */ 15625 function InstantWinRequest() { 15626 _classCallCheck(this, InstantWinRequest); 15627 15628 InstantWinRequest.initialize(this); 15629 } 15630 /** 15631 * Initializes the fields of this object. 15632 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15633 * Only for internal use. 15634 */ 15635 15636 15637 _createClass(InstantWinRequest, null, [{ 15638 key: "initialize", 15639 value: function initialize(obj) {} 15640 /** 15641 * Constructs a <code>InstantWinRequest</code> from a plain JavaScript object, optionally creating a new instance. 15642 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15643 * @param {Object} data The plain JavaScript object bearing properties of interest. 15644 * @param {module:model/InstantWinRequest} obj Optional instance to populate. 15645 * @return {module:model/InstantWinRequest} The populated <code>InstantWinRequest</code> instance. 15646 */ 15647 15648 }, { 15649 key: "constructFromObject", 15650 value: function constructFromObject(data, obj) { 15651 if (data) { 15652 obj = obj || new InstantWinRequest(); 15653 15654 if (data.hasOwnProperty('instantWinFilter')) { 15655 obj['instantWinFilter'] = _InstantWinFilter["default"].constructFromObject(data['instantWinFilter']); 15656 } 15657 15658 if (data.hasOwnProperty('languageKey')) { 15659 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 15660 } 15661 15662 if (data.hasOwnProperty('currencyKey')) { 15663 obj['currencyKey'] = _ApiClient["default"].convertToType(data['currencyKey'], 'String'); 15664 } 15665 } 15666 15667 return obj; 15668 } 15669 }]); 15670 15671 return InstantWinRequest; 15672}(); 15673/** 15674 * @member {module:model/InstantWinFilter} instantWinFilter 15675 */ 15676 15677 15678InstantWinRequest.prototype['instantWinFilter'] = undefined; 15679/** 15680 * The language codes can be found in the settings/transalations section of the back office 15681 * @member {String} languageKey 15682 */ 15683 15684InstantWinRequest.prototype['languageKey'] = undefined; 15685/** 15686 * The UoM currency key to normalise the value to for presentation. Example; If the reward is in EUR and this value is set to USD then the value will be multiplied by 1.09387699997429 15687 * @member {String} currencyKey 15688 */ 15689 15690InstantWinRequest.prototype['currencyKey'] = undefined; 15691var _default = InstantWinRequest; 15692exports["default"] = _default; 15693},{"../ApiClient":3,"./InstantWinFilter":86}],91:[function(require,module,exports){ 15694"use strict"; 15695 15696Object.defineProperty(exports, "__esModule", { 15697 value: true 15698}); 15699exports["default"] = void 0; 15700 15701var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15702 15703var _Error = _interopRequireDefault(require("./Error")); 15704 15705var _InstantWin = _interopRequireDefault(require("./InstantWin")); 15706 15707var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 15708 15709function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15710 15711function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15712 15713function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15714 15715function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15716 15717/** 15718 * The InstantWinResponse model module. 15719 * @module model/InstantWinResponse 15720 * @version 1.0.14 15721 */ 15722var InstantWinResponse = /*#__PURE__*/function () { 15723 /** 15724 * Constructs a new <code>InstantWinResponse</code>. 15725 * @alias module:model/InstantWinResponse 15726 */ 15727 function InstantWinResponse() { 15728 _classCallCheck(this, InstantWinResponse); 15729 15730 InstantWinResponse.initialize(this); 15731 } 15732 /** 15733 * Initializes the fields of this object. 15734 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15735 * Only for internal use. 15736 */ 15737 15738 15739 _createClass(InstantWinResponse, null, [{ 15740 key: "initialize", 15741 value: function initialize(obj) {} 15742 /** 15743 * Constructs a <code>InstantWinResponse</code> from a plain JavaScript object, optionally creating a new instance. 15744 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15745 * @param {Object} data The plain JavaScript object bearing properties of interest. 15746 * @param {module:model/InstantWinResponse} obj Optional instance to populate. 15747 * @return {module:model/InstantWinResponse} The populated <code>InstantWinResponse</code> instance. 15748 */ 15749 15750 }, { 15751 key: "constructFromObject", 15752 value: function constructFromObject(data, obj) { 15753 if (data) { 15754 obj = obj || new InstantWinResponse(); 15755 15756 if (data.hasOwnProperty('meta')) { 15757 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 15758 } 15759 15760 if (data.hasOwnProperty('data')) { 15761 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_InstantWin["default"]]); 15762 } 15763 15764 if (data.hasOwnProperty('errors')) { 15765 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 15766 } 15767 } 15768 15769 return obj; 15770 } 15771 }]); 15772 15773 return InstantWinResponse; 15774}(); 15775/** 15776 * @member {module:model/ResponseMeta} meta 15777 */ 15778 15779 15780InstantWinResponse.prototype['meta'] = undefined; 15781/** 15782 * @member {Array.<module:model/InstantWin>} data 15783 */ 15784 15785InstantWinResponse.prototype['data'] = undefined; 15786/** 15787 * @member {Array.<module:model/Error>} errors 15788 */ 15789 15790InstantWinResponse.prototype['errors'] = undefined; 15791var _default = InstantWinResponse; 15792exports["default"] = _default; 15793},{"../ApiClient":3,"./Error":74,"./InstantWin":84,"./ResponseMeta":144}],92:[function(require,module,exports){ 15794"use strict"; 15795 15796Object.defineProperty(exports, "__esModule", { 15797 value: true 15798}); 15799exports["default"] = void 0; 15800 15801var _ApiClient = _interopRequireDefault(require("../ApiClient")); 15802 15803var _Award = _interopRequireDefault(require("./Award")); 15804 15805var _InstantWinResultAllOf = _interopRequireDefault(require("./InstantWinResultAllOf")); 15806 15807var _InstantWinTile = _interopRequireDefault(require("./InstantWinTile")); 15808 15809var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 15810 15811var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 15812 15813function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 15814 15815function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 15816 15817function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 15818 15819function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 15820 15821/** 15822 * The InstantWinResult model module. 15823 * @module model/InstantWinResult 15824 * @version 1.0.14 15825 */ 15826var InstantWinResult = /*#__PURE__*/function () { 15827 /** 15828 * Constructs a new <code>InstantWinResult</code>. 15829 * @alias module:model/InstantWinResult 15830 * @implements module:model/InstantWinResultAllOf 15831 * @implements module:model/ModelDefault 15832 * @implements module:model/OptionalModelFields 15833 * @param tiles {Array.<module:model/InstantWinTile>} 15834 * @param id {String} Ziqni id of the model 15835 */ 15836 function InstantWinResult(tiles, id) { 15837 _classCallCheck(this, InstantWinResult); 15838 15839 _InstantWinResultAllOf["default"].initialize(this, tiles); 15840 15841 _ModelDefault["default"].initialize(this, id); 15842 15843 _OptionalModelFields["default"].initialize(this); 15844 15845 InstantWinResult.initialize(this, tiles, id); 15846 } 15847 /** 15848 * Initializes the fields of this object. 15849 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 15850 * Only for internal use. 15851 */ 15852 15853 15854 _createClass(InstantWinResult, null, [{ 15855 key: "initialize", 15856 value: function initialize(obj, tiles, id) { 15857 obj['tiles'] = tiles; 15858 obj['id'] = id; 15859 } 15860 /** 15861 * Constructs a <code>InstantWinResult</code> from a plain JavaScript object, optionally creating a new instance. 15862 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 15863 * @param {Object} data The plain JavaScript object bearing properties of interest. 15864 * @param {module:model/InstantWinResult} obj Optional instance to populate. 15865 * @return {module:model/InstantWinResult} The populated <code>InstantWinResult</code> instance. 15866 */ 15867 15868 }, { 15869 key: "constructFromObject", 15870 value: function constructFromObject(data, obj) { 15871 if (data) { 15872 obj = obj || new InstantWinResult(); 15873 15874 _InstantWinResultAllOf["default"].constructFromObject(data, obj); 15875 15876 _ModelDefault["default"].constructFromObject(data, obj); 15877 15878 _OptionalModelFields["default"].constructFromObject(data, obj); 15879 15880 if (data.hasOwnProperty('awards')) { 15881 obj['awards'] = _ApiClient["default"].convertToType(data['awards'], [_Award["default"]]); 15882 } 15883 15884 if (data.hasOwnProperty('tiles')) { 15885 obj['tiles'] = _ApiClient["default"].convertToType(data['tiles'], [_InstantWinTile["default"]]); 15886 } 15887 15888 if (data.hasOwnProperty('id')) { 15889 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 15890 } 15891 15892 if (data.hasOwnProperty('spaceName')) { 15893 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 15894 } 15895 15896 if (data.hasOwnProperty('created')) { 15897 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 15898 } 15899 15900 if (data.hasOwnProperty('customFields')) { 15901 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 15902 'String': Object 15903 }); 15904 } 15905 15906 if (data.hasOwnProperty('tags')) { 15907 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 15908 } 15909 15910 if (data.hasOwnProperty('metadata')) { 15911 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 15912 'String': 'String' 15913 }); 15914 } 15915 } 15916 15917 return obj; 15918 } 15919 }]); 15920 15921 return InstantWinResult; 15922}(); 15923/** 15924 * @member {Array.<module:model/Award>} awards 15925 */ 15926 15927 15928InstantWinResult.prototype['awards'] = undefined; 15929/** 15930 * @member {Array.<module:model/InstantWinTile>} tiles 15931 */ 15932 15933InstantWinResult.prototype['tiles'] = undefined; 15934/** 15935 * Ziqni id of the model 15936 * @member {String} id 15937 */ 15938 15939InstantWinResult.prototype['id'] = undefined; 15940/** 15941 * This is the space name which is linked to the account 15942 * @member {String} spaceName 15943 */ 15944 15945InstantWinResult.prototype['spaceName'] = undefined; 15946/** 15947 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 15948 * @member {Date} created 15949 */ 15950 15951InstantWinResult.prototype['created'] = undefined; 15952/** 15953 * @member {Object.<String, Object>} customFields 15954 */ 15955 15956InstantWinResult.prototype['customFields'] = undefined; 15957/** 15958 * A list of id's used to tag models 15959 * @member {Array.<String>} tags 15960 */ 15961 15962InstantWinResult.prototype['tags'] = undefined; 15963/** 15964 * @member {Object.<String, String>} metadata 15965 */ 15966 15967InstantWinResult.prototype['metadata'] = undefined; // Implement InstantWinResultAllOf interface: 15968 15969/** 15970 * @member {Array.<module:model/Award>} awards 15971 */ 15972 15973_InstantWinResultAllOf["default"].prototype['awards'] = undefined; 15974/** 15975 * @member {Array.<module:model/InstantWinTile>} tiles 15976 */ 15977 15978_InstantWinResultAllOf["default"].prototype['tiles'] = undefined; // Implement ModelDefault interface: 15979 15980/** 15981 * Ziqni id of the model 15982 * @member {String} id 15983 */ 15984 15985_ModelDefault["default"].prototype['id'] = undefined; 15986/** 15987 * This is the space name which is linked to the account 15988 * @member {String} spaceName 15989 */ 15990 15991_ModelDefault["default"].prototype['spaceName'] = undefined; 15992/** 15993 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 15994 * @member {Date} created 15995 */ 15996 15997_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 15998 15999/** 16000 * @member {Object.<String, Object>} customFields 16001 */ 16002 16003_OptionalModelFields["default"].prototype['customFields'] = undefined; 16004/** 16005 * A list of id's used to tag models 16006 * @member {Array.<String>} tags 16007 */ 16008 16009_OptionalModelFields["default"].prototype['tags'] = undefined; 16010/** 16011 * @member {Object.<String, String>} metadata 16012 */ 16013 16014_OptionalModelFields["default"].prototype['metadata'] = undefined; 16015var _default = InstantWinResult; 16016exports["default"] = _default; 16017}
16017,{"../ApiClient":3,"./Award":32,"./InstantWinResultAllOf":93,"./InstantWinTile":94,"./ModelDefault":123,"./OptionalModelFields":130}],93:[function(require,module,exports){ 16018"use strict"; 16019 16020Object.defineProperty(exports, "__esModule", { 16021 value: true 16022}); 16023exports["default"] = void 0; 16024 16025var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16026 16027var _Award = _interopRequireDefault(require("./Award")); 16028 16029var _InstantWinTile = _interopRequireDefault(require("./InstantWinTile")); 16030 16031function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16032 16033function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16034 16035function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16036 16037function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16038 16039/** 16040 * The InstantWinResultAllOf model module. 16041 * @module model/InstantWinResultAllOf 16042 * @version 1.0.14 16043 */ 16044var InstantWinResultAllOf = /*#__PURE__*/function () { 16045 /** 16046 * Constructs a new <code>InstantWinResultAllOf</code>. 16047 * @alias module:model/InstantWinResultAllOf 16048 * @param tiles {Array.<module:model/InstantWinTile>} 16049 */ 16050 function InstantWinResultAllOf(tiles) { 16051 _classCallCheck(this, InstantWinResultAllOf); 16052 16053 InstantWinResultAllOf.initialize(this, tiles); 16054 } 16055 /** 16056 * Initializes the fields of this object. 16057 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16058 * Only for internal use. 16059 */ 16060 16061 16062 _createClass(InstantWinResultAllOf, null, [{ 16063 key: "initialize", 16064 value: function initialize(obj, tiles) { 16065 obj['tiles'] = tiles; 16066 } 16067 /** 16068 * Constructs a <code>InstantWinResultAllOf</code> from a plain JavaScript object, optionally creating a new instance. 16069 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16070 * @param {Object} data The plain JavaScript object bearing properties of interest. 16071 * @param {module:model/InstantWinResultAllOf} obj Optional instance to populate. 16072 * @return {module:model/InstantWinResultAllOf} The populated <code>InstantWinResultAllOf</code> instance. 16073 */ 16074 16075 }, { 16076 key: "constructFromObject", 16077 value: function constructFromObject(data, obj) { 16078 if (data) { 16079 obj = obj || new InstantWinResultAllOf(); 16080 16081 if (data.hasOwnProperty('awards')) { 16082 obj['awards'] = _ApiClient["default"].convertToType(data['awards'], [_Award["default"]]); 16083 } 16084 16085 if (data.hasOwnProperty('tiles')) { 16086 obj['tiles'] = _ApiClient["default"].convertToType(data['tiles'], [_InstantWinTile["default"]]); 16087 } 16088 } 16089 16090 return obj; 16091 } 16092 }]); 16093 16094 return InstantWinResultAllOf; 16095}(); 16096/** 16097 * @member {Array.<module:model/Award>} awards 16098 */ 16099 16100 16101InstantWinResultAllOf.prototype['awards'] = undefined; 16102/** 16103 * @member {Array.<module:model/InstantWinTile>} tiles 16104 */ 16105 16106InstantWinResultAllOf.prototype['tiles'] = undefined; 16107var _default = InstantWinResultAllOf; 16108exports["default"] = _default; 16109},{"../ApiClient":3,"./Award":32,"./InstantWinTile":94}],94:[function(require,module,exports){ 16110"use strict"; 16111 16112Object.defineProperty(exports, "__esModule", { 16113 value: true 16114}); 16115exports["default"] = void 0; 16116 16117var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16118 16119var _GridLocation = _interopRequireDefault(require("./GridLocation")); 16120 16121var _RewardReduced = _interopRequireDefault(require("./RewardReduced")); 16122 16123function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16124 16125function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16126 16127function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16128 16129function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16130 16131/** 16132 * The InstantWinTile model module. 16133 * @module model/InstantWinTile 16134 * @version 1.0.14 16135 */ 16136var InstantWinTile = /*#__PURE__*/function () { 16137 /** 16138 * Constructs a new <code>InstantWinTile</code>. 16139 * @alias module:model/InstantWinTile 16140 * @param icon {String} The id to the image file 16141 * @param probability {Number} 16142 * @param location {module:model/GridLocation} 16143 */ 16144 function InstantWinTile(icon, probability, location) { 16145 _classCallCheck(this, InstantWinTile); 16146 16147 InstantWinTile.initialize(this, icon, probability, location); 16148 } 16149 /** 16150 * Initializes the fields of this object. 16151 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16152 * Only for internal use. 16153 */ 16154 16155 16156 _createClass(InstantWinTile, null, [{ 16157 key: "initialize", 16158 value: function initialize(obj, icon, probability, location) { 16159 obj['icon'] = icon; 16160 obj['probability'] = probability; 16161 obj['location'] = location; 16162 } 16163 /** 16164 * Constructs a <code>InstantWinTile</code> from a plain JavaScript object, optionally creating a new instance. 16165 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16166 * @param {Object} data The plain JavaScript object bearing properties of interest. 16167 * @param {module:model/InstantWinTile} obj Optional instance to populate. 16168 * @return {module:model/InstantWinTile} The populated <code>InstantWinTile</code> instance. 16169 */ 16170 16171 }, { 16172 key: "constructFromObject", 16173 value: function constructFromObject(data, obj) { 16174 if (data) { 16175 obj = obj || new InstantWinTile(); 16176 16177 if (data.hasOwnProperty('icon')) { 16178 obj['icon'] = _ApiClient["default"].convertToType(data['icon'], 'String'); 16179 } 16180 16181 if (data.hasOwnProperty('iconLink')) { 16182 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 16183 } 16184 16185 if (data.hasOwnProperty('text')) { 16186 obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String'); 16187 } 16188 16189 if (data.hasOwnProperty('contraints')) { 16190 obj['contraints'] = _ApiClient["default"].convertToType(data['contraints'], ['String']); 16191 } 16192 16193 if (data.hasOwnProperty('reward')) { 16194 obj['reward'] = _RewardReduced["default"].constructFromObject(data['reward']); 16195 } 16196 16197 if (data.hasOwnProperty('probability')) { 16198 obj['probability'] = _ApiClient["default"].convertToType(data['probability'], 'Number'); 16199 } 16200 16201 if (data.hasOwnProperty('location')) { 16202 obj['location'] = _GridLocation["default"].constructFromObject(data['location']); 16203 } 16204 } 16205 16206 return obj; 16207 } 16208 }]); 16209 16210 return InstantWinTile; 16211}(); 16212/** 16213 * The id to the image file 16214 * @member {String} icon 16215 */ 16216 16217 16218InstantWinTile.prototype['icon'] = undefined; 16219/** 16220 * The uri to this image 16221 * @member {String} iconLink 16222 */ 16223 16224InstantWinTile.prototype['iconLink'] = undefined; 16225/** 16226 * @member {String} text 16227 */ 16228 16229InstantWinTile.prototype['text'] = undefined; 16230/** 16231 * hasPrizes, glow 16232 * @member {Array.<String>} contraints 16233 */ 16234 16235InstantWinTile.prototype['contraints'] = undefined; 16236/** 16237 * @member {module:model/RewardReduced} reward 16238 */ 16239 16240InstantWinTile.prototype['reward'] = undefined; 16241/** 16242 * @member {Number} probability 16243 */ 16244 16245InstantWinTile.prototype['probability'] = undefined; 16246/** 16247 * @member {module:model/GridLocation} location 16248 */ 16249 16250InstantWinTile.prototype['location'] = undefined; 16251var _default = InstantWinTile; 16252exports["default"] = _default; 16253}
16253,{"../ApiClient":3,"./GridLocation":83,"./RewardReduced":146}],95:[function(require,module,exports){ 16254"use strict"; 16255 16256Object.defineProperty(exports, "__esModule", { 16257 value: true 16258}); 16259exports["default"] = void 0; 16260 16261var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16262 16263var _LeaderboardEntry = _interopRequireDefault(require("./LeaderboardEntry")); 16264 16265function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16266 16267function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16268 16269function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16270 16271function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16272 16273/** 16274 * The Leaderboard model module. 16275 * @module model/Leaderboard 16276 * @version 1.0.14 16277 */ 16278var Leaderboard = /*#__PURE__*/function () { 16279 /** 16280 * Constructs a new <code>Leaderboard</code>. 16281 * @alias module:model/Leaderboard 16282 * @param constraints {Array.<String>} Additional constraints 16283 */ 16284 function Leaderboard(constraints) { 16285 _classCallCheck(this, Leaderboard); 16286 16287 Leaderboard.initialize(this, constraints); 16288 } 16289 /** 16290 * Initializes the fields of this object. 16291 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16292 * Only for internal use. 16293 */ 16294 16295 16296 _createClass(Leaderboard, null, [{ 16297 key: "initialize", 16298 value: function initialize(obj, constraints) { 16299 obj['constraints'] = constraints; 16300 } 16301 /** 16302 * Constructs a <code>Leaderboard</code> from a plain JavaScript object, optionally creating a new instance. 16303 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16304 * @param {Object} data The plain JavaScript object bearing properties of interest. 16305 * @param {module:model/Leaderboard} obj Optional instance to populate. 16306 * @return {module:model/Leaderboard} The populated <code>Leaderboard</code> instance. 16307 */ 16308 16309 }, { 16310 key: "constructFromObject", 16311 value: function constructFromObject(data, obj) { 16312 if (data) { 16313 obj = obj || new Leaderboard(); 16314 16315 if (data.hasOwnProperty('leaderboardEntries')) { 16316 obj['leaderboardEntries'] = _ApiClient["default"].convertToType(data['leaderboardEntries'], [_LeaderboardEntry["default"]]); 16317 } 16318 16319 if (data.hasOwnProperty('constraints')) { 16320 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 16321 } 16322 16323 if (data.hasOwnProperty('sequence')) { 16324 obj['sequence'] = _ApiClient["default"].convertToType(data['sequence'], 'Number'); 16325 } 16326 16327 if (data.hasOwnProperty('id')) { 16328 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 16329 } 16330 16331 if (data.hasOwnProperty('created')) { 16332 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 16333 } 16334 16335 if (data.hasOwnProperty('accountId')) { 16336 obj['accountId'] = _ApiClient["default"].convertToType(data['accountId'], 'String'); 16337 } 16338 } 16339 16340 return obj; 16341 } 16342 }]); 16343 16344 return Leaderboard; 16345}(); 16346/** 16347 * @member {Array.<module:model/LeaderboardEntry>} leaderboardEntries 16348 */ 16349 16350 16351Leaderboard.prototype['leaderboardEntries'] = undefined; 16352/** 16353 * Additional constraints 16354 * @member {Array.<String>} constraints 16355 */ 16356 16357Leaderboard.prototype['constraints'] = undefined; 16358/** 16359 * how many changes were made to the leaderboard 16360 * @member {Number} sequence 16361 */ 16362 16363Leaderboard.prototype['sequence'] = undefined; 16364/** 16365 * A unique system generated identifier of the competition or contest this leaderboard relates to 16366 * @member {String} id 16367 */ 16368 16369Leaderboard.prototype['id'] = undefined; 16370/** 16371 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 16372 * @member {Date} created 16373 */ 16374 16375Leaderboard.prototype['created'] = undefined; 16376/** 16377 * This is the space name which is linked to the account 16378 * @member {String} accountId 16379 */ 16380 16381Leaderboard.prototype['accountId'] = undefined; 16382var _default = Leaderboard; 16383exports["default"] = _default; 16384},{"../ApiClient":3,"./LeaderboardEntry":96}],96:[function(require,module,exports){ 16385"use strict"; 16386 16387Object.defineProperty(exports, "__esModule", { 16388 value: true 16389}); 16390exports["default"] = void 0; 16391 16392var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16393 16394var _LeaderboardMember = _interopRequireDefault(require("./LeaderboardMember")); 16395 16396function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16397 16398function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16399 16400function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16401 16402function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16403 16404/** 16405 * The LeaderboardEntry model module. 16406 * @module model/LeaderboardEntry 16407 * @version 1.0.14 16408 */ 16409var LeaderboardEntry = /*#__PURE__*/function () { 16410 /** 16411 * Constructs a new <code>LeaderboardEntry</code>. 16412 * @alias module:model/LeaderboardEntry 16413 * @param rank {Number} The rank of the player 16414 * @param members {Array.<module:model/LeaderboardMember>} 16415 */ 16416 function LeaderboardEntry(rank, members) { 16417 _classCallCheck(this, LeaderboardEntry); 16418 16419 LeaderboardEntry.initialize(this, rank, members); 16420 } 16421 /** 16422 * Initializes the fields of this object. 16423 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16424 * Only for internal use. 16425 */ 16426 16427 16428 _createClass(LeaderboardEntry, null, [{ 16429 key: "initialize", 16430 value: function initialize(obj, rank, members) { 16431 obj['rank'] = rank; 16432 obj['members'] = members; 16433 } 16434 /** 16435 * Constructs a <code>LeaderboardEntry</code> from a plain JavaScript object, optionally creating a new instance. 16436 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16437 * @param {Object} data The plain JavaScript object bearing properties of interest. 16438 * @param {module:model/LeaderboardEntry} obj Optional instance to populate. 16439 * @return {module:model/LeaderboardEntry} The populated <code>LeaderboardEntry</code> instance. 16440 */ 16441 16442 }, { 16443 key: "constructFromObject", 16444 value: function constructFromObject(data, obj) { 16445 if (data) { 16446 obj = obj || new LeaderboardEntry(); 16447 16448 if (data.hasOwnProperty('rank')) { 16449 obj['rank'] = _ApiClient["default"].convertToType(data['rank'], 'Number'); 16450 } 16451 16452 if (data.hasOwnProperty('score')) { 16453 obj['score'] = _ApiClient["default"].convertToType(data['score'], 'Number'); 16454 } 16455 16456 if (data.hasOwnProperty('bestScores')) { 16457 obj['bestScores'] = _ApiClient["default"].convertToType(data['bestScores'], ['Number']); 16458 } 16459 16460 if (data.hasOwnProperty('members')) { 16461 obj['members'] = _ApiClient["default"].convertToType(data['members'], [_LeaderboardMember["default"]]); 16462 } 16463 } 16464 16465 return obj; 16466 } 16467 }]); 16468 16469 return LeaderboardEntry; 16470}(); 16471/** 16472 * The rank of the player 16473 * @member {Number} rank 16474 */ 16475 16476 16477LeaderboardEntry.prototype['rank'] = undefined; 16478/** 16479 * The multiplier to apply to source values received for this product action helper events 16480 * @member {Number} score 16481 */ 16482 16483LeaderboardEntry.prototype['score'] = undefined; 16484/** 16485 * The multiplier to apply to source values received for this product action helper events 16486 * @member {Array.<Number>} bestScores 16487 */ 16488 16489LeaderboardEntry.prototype['bestScores'] = undefined; 16490/** 16491 * @member {Array.<module:model/LeaderboardMember>} members 16492 */ 16493 16494LeaderboardEntry.prototype['members'] = undefined; 16495var _default = LeaderboardEntry; 16496exports["default"] = _default; 16497},{"../ApiClient":3,"./LeaderboardMember":98}],97:[function(require,module,exports){ 16498"use strict"; 16499 16500Object.defineProperty(exports, "__esModule", { 16501 value: true 16502}); 16503exports["default"] = void 0; 16504 16505var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16506 16507function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16508 16509function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16510 16511function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16512 16513function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16514 16515/** 16516 * The LeaderboardFilter model module. 16517 * @module model/LeaderboardFilter 16518 * @version 1.0.14 16519 */ 16520var LeaderboardFilter = /*#__PURE__*/function () { 16521 /** 16522 * Constructs a new <code>LeaderboardFilter</code>. 16523 * @alias module:model/LeaderboardFilter 16524 * @param topRanksToInclude {Number} Include rank from zero [0] none, then one [1] to the rank specified here. The maximum allowed is 50 16525 */ 16526 function LeaderboardFilter(topRanksToInclude) { 16527 _classCallCheck(this, LeaderboardFilter); 16528 16529 LeaderboardFilter.initialize(this, topRanksToInclude); 16530 } 16531 /** 16532 * Initializes the fields of this object. 16533 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16534 * Only for internal use. 16535 */ 16536 16537 16538 _createClass(LeaderboardFilter, null, [{ 16539 key: "initialize", 16540 value: function initialize(obj, topRanksToInclude) { 16541 obj['topRanksToInclude'] = topRanksToInclude; 16542 } 16543 /** 16544 * Constructs a <code>LeaderboardFilter</code> from a plain JavaScript object, optionally creating a new instance. 16545 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16546 * @param {Object} data The plain JavaScript object bearing properties of interest. 16547 * @param {module:model/LeaderboardFilter} obj Optional instance to populate. 16548 * @return {module:model/LeaderboardFilter} The populated <code>LeaderboardFilter</code> instance. 16549 */ 16550 16551 }, { 16552 key: "constructFromObject", 16553 value: function constructFromObject(data, obj) { 16554 if (data) { 16555 obj = obj || new LeaderboardFilter(); 16556 16557 if (data.hasOwnProperty('topRanksToInclude')) { 16558 obj['topRanksToInclude'] = _ApiClient["default"].convertToType(data['topRanksToInclude'], 'Number'); 16559 } 16560 16561 if (data.hasOwnProperty('ranksAboveToInclude')) { 16562 obj['ranksAboveToInclude'] = _ApiClient["default"].convertToType(data['ranksAboveToInclude'], 'Number'); 16563 } 16564 16565 if (data.hasOwnProperty('ranksBelowToInclude')) { 16566 obj['ranksBelowToInclude'] = _ApiClient["default"].convertToType(data['ranksBelowToInclude'], 'Number'); 16567 } 16568 } 16569 16570 return obj; 16571 } 16572 }]); 16573 16574 return LeaderboardFilter; 16575}(); 16576/** 16577 * Include rank from zero [0] none, then one [1] to the rank specified here. The maximum allowed is 50 16578 * @member {Number} topRanksToInclude 16579 */ 16580 16581 16582LeaderboardFilter.prototype['topRanksToInclude'] = undefined; 16583/** 16584 * Include ranks above member position. The maximum allowed is 20 16585 * @member {Number} ranksAboveToInclude 16586 */ 16587 16588LeaderboardFilter.prototype['ranksAboveToInclude'] = undefined; 16589/** 16590 * Include ranks below member position. The maximum allowed is 20 16591 * @member {Number} ranksBelowToInclude 16592 */ 16593 16594LeaderboardFilter.prototype['ranksBelowToInclude'] = undefined; 16595var _default = LeaderboardFilter; 16596exports["default"] = _default; 16597},{"../ApiClient":3}],98:[function(require,module,exports){ 16598"use strict"; 16599 16600Object.defineProperty(exports, "__esModule", { 16601 value: true 16602}); 16603exports["default"] = void 0; 16604 16605var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16606 16607function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16608 16609function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16610 16611function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16612 16613function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16614 16615/** 16616 * The LeaderboardMember model module. 16617 * @module model/LeaderboardMember 16618 * @version 1.0.14 16619 */ 16620var LeaderboardMember = /*#__PURE__*/function () { 16621 /** 16622 * Constructs a new <code>LeaderboardMember</code>. 16623 * @alias module:model/LeaderboardMember 16624 * @param name {String} The name of the player 16625 * @param memberId {String} Unique system identifier of a Member 16626 * @param memberRefId {String} The reference to this member in your system 16627 */ 16628 function LeaderboardMember(name, memberId, memberRefId) { 16629 _classCallCheck(this, LeaderboardMember); 16630 16631 LeaderboardMember.initialize(this, name, memberId, memberRefId); 16632 } 16633 /** 16634 * Initializes the fields of this object. 16635 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16636 * Only for internal use. 16637 */ 16638 16639 16640 _createClass(LeaderboardMember, null, [{ 16641 key: "initialize", 16642 value: function initialize(obj, name, memberId, memberRefId) { 16643 obj['name'] = name; 16644 obj['memberId'] = memberId; 16645 obj['memberRefId'] = memberRefId; 16646 } 16647 /** 16648 * Constructs a <code>LeaderboardMember</code> from a plain JavaScript object, optionally creating a new instance. 16649 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16650 * @param {Object} data The plain JavaScript object bearing properties of interest. 16651 * @param {module:model/LeaderboardMember} obj Optional instance to populate. 16652 * @return {module:model/LeaderboardMember} The populated <code>LeaderboardMember</code> instance. 16653 */ 16654 16655 }, { 16656 key: "constructFromObject", 16657 value: function constructFromObject(data, obj) { 16658 if (data) { 16659 obj = obj || new LeaderboardMember(); 16660 16661 if (data.hasOwnProperty('name')) { 16662 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 16663 } 16664 16665 if (data.hasOwnProperty('memberId')) { 16666 obj['memberId'] = _ApiClient["default"].convertToType(data['memberId'], 'String'); 16667 } 16668 16669 if (data.hasOwnProperty('memberRefId')) { 16670 obj['memberRefId'] = _ApiClient["default"].convertToType(data['memberRefId'], 'String'); 16671 } 16672 16673 if (data.hasOwnProperty('rankChangeFrom')) { 16674 obj['rankChangeFrom'] = _ApiClient["default"].convertToType(data['rankChangeFrom'], 'Number'); 16675 } 16676 16677 if (data.hasOwnProperty('rankChangeType')) { 16678 obj['rankChangeType'] = _ApiClient["default"].convertToType(data['rankChangeType'], 'Numbe
16678r'); 16679 } 16680 16681 if (data.hasOwnProperty('params')) { 16682 obj['params'] = _ApiClient["default"].convertToType(data['params'], { 16683 'String': 'Number' 16684 }); 16685 } 16686 16687 if (data.hasOwnProperty('goalReached')) { 16688 obj['goalReached'] = _ApiClient["default"].convertToType(data['goalReached'], 'Boolean'); 16689 } 16690 } 16691 16692 return obj; 16693 } 16694 }]); 16695 16696 return LeaderboardMember; 16697}(); 16698/** 16699 * The name of the player 16700 * @member {String} name 16701 */ 16702 16703 16704LeaderboardMember.prototype['name'] = undefined; 16705/** 16706 * Unique system identifier of a Member 16707 * @member {String} memberId 16708 */ 16709 16710LeaderboardMember.prototype['memberId'] = undefined; 16711/** 16712 * The reference to this member in your system 16713 * @member {String} memberRefId 16714 */ 16715 16716LeaderboardMember.prototype['memberRefId'] = undefined; 16717/** 16718 * Previous rank held, null if no changes are recorded 16719 * @member {Number} rankChangeFrom 16720 */ 16721 16722LeaderboardMember.prototype['rankChangeFrom'] = undefined; 16723/** 16724 * [-1] for rank-down, like 5 to 8. [0] for no change, [1] for rank-up like 9 to 3 16725 * @member {Number} rankChangeType 16726 */ 16727 16728LeaderboardMember.prototype['rankChangeType'] = undefined; 16729/** 16730 * The user defined values used in the rules builder 16731 * @member {Object.<String, Number>} params 16732 */ 16733 16734LeaderboardMember.prototype['params'] = undefined; 16735/** 16736 * Has the player met the minimum requirements to qualify for a ranked position 16737 * @member {Boolean} goalReached 16738 */ 16739 16740LeaderboardMember.prototype['goalReached'] = undefined; 16741var _default = LeaderboardMember; 16742exports["default"] = _default; 16743},{"../ApiClient":3}],99:[function(require,module,exports){ 16744"use strict"; 16745 16746Object.defineProperty(exports, "__esModule", { 16747 value: true 16748}); 16749exports["default"] = void 0; 16750 16751var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16752 16753var _Error = _interopRequireDefault(require("./Error")); 16754 16755var _Leaderboard = _interopRequireDefault(require("./Leaderboard")); 16756 16757var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 16758 16759function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16760 16761function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16762 16763function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16764 16765function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16766 16767/** 16768 * The LeaderboardResponse model module. 16769 * @module model/LeaderboardResponse 16770 * @version 1.0.14 16771 */ 16772var LeaderboardResponse = /*#__PURE__*/function () { 16773 /** 16774 * Constructs a new <code>LeaderboardResponse</code>. 16775 * @alias module:model/LeaderboardResponse 16776 * @param meta {module:model/ResponseMeta} 16777 * @param errors {Array.<module:model/Error>} 16778 * @param data {module:model/Leaderboard} 16779 */ 16780 function LeaderboardResponse(meta, errors, data) { 16781 _classCallCheck(this, LeaderboardResponse); 16782 16783 LeaderboardResponse.initialize(this, meta, errors, data); 16784 } 16785 /** 16786 * Initializes the fields of this object. 16787 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16788 * Only for internal use. 16789 */ 16790 16791 16792 _createClass(LeaderboardResponse, null, [{ 16793 key: "initialize", 16794 value: function initialize(obj, meta, errors, data) { 16795 obj['meta'] = meta; 16796 obj['errors'] = errors; 16797 obj['data'] = data; 16798 } 16799 /** 16800 * Constructs a <code>LeaderboardResponse</code> from a plain JavaScript object, optionally creating a new instance. 16801 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16802 * @param {Object} data The plain JavaScript object bearing properties of interest. 16803 * @param {module:model/LeaderboardResponse} obj Optional instance to populate. 16804 * @return {module:model/LeaderboardResponse} The populated <code>LeaderboardResponse</code> instance. 16805 */ 16806 16807 }, { 16808 key: "constructFromObject", 16809 value: function constructFromObject(data, obj) { 16810 if (data) { 16811 obj = obj || new LeaderboardResponse(); 16812 16813 if (data.hasOwnProperty('meta')) { 16814 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 16815 } 16816 16817 if (data.hasOwnProperty('errors')) { 16818 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 16819 } 16820 16821 if (data.hasOwnProperty('data')) { 16822 obj['data'] = _Leaderboard["default"].constructFromObject(data['data']); 16823 } 16824 } 16825 16826 return obj; 16827 } 16828 }]); 16829 16830 return LeaderboardResponse; 16831}(); 16832/** 16833 * @member {module:model/ResponseMeta} meta 16834 */ 16835 16836 16837LeaderboardResponse.prototype['meta'] = undefined; 16838/** 16839 * @member {Array.<module:model/Error>} errors 16840 */ 16841 16842LeaderboardResponse.prototype['errors'] = undefined; 16843/** 16844 * @member {module:model/Leaderboard} data 16845 */ 16846 16847LeaderboardResponse.prototype['data'] = undefined; 16848var _default = LeaderboardResponse; 16849exports["default"] = _default; 16850},{"../ApiClient":3,"./Error":74,"./Leaderboard":95,"./ResponseMeta":144}],100:[function(require,module,exports){ 16851"use strict"; 16852 16853Object.defineProperty(exports, "__esModule", { 16854 value: true 16855}); 16856exports["default"] = void 0; 16857 16858var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16859 16860var _LeaderboardFilter = _interopRequireDefault(require("./LeaderboardFilter")); 16861 16862function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16863 16864function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16865 16866function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16867 16868function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16869 16870/** 16871 * The LeaderboardSubscriptionRequest model module. 16872 * @module model/LeaderboardSubscriptionRequest 16873 * @version 1.0.14 16874 */ 16875var LeaderboardSubscriptionRequest = /*#__PURE__*/function () { 16876 /** 16877 * Constructs a new <code>LeaderboardSubscriptionRequest</code>. 16878 * @alias module:model/LeaderboardSubscriptionRequest
16879 * @param entityId {String} Either the competition, contest, tournament or match identifier 16880 * @param action {module:model/LeaderboardSubscriptionRequest.ActionEnum} Either subscribe or unsubscribe from the data feed 16881 */ 16882 function LeaderboardSubscriptionRequest(entityId, action) { 16883 _classCallCheck(this, LeaderboardSubscriptionRequest); 16884 16885 LeaderboardSubscriptionRequest.initialize(this, entityId, action); 16886 } 16887 /** 16888 * Initializes the fields of this object. 16889 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 16890 * Only for internal use. 16891 */ 16892 16893 16894 _createClass(LeaderboardSubscriptionRequest, null, [{ 16895 key: "initialize", 16896 value: function initialize(obj, entityId, action) { 16897 obj['entityId'] = entityId; 16898 obj['action'] = action; 16899 } 16900 /** 16901 * Constructs a <code>LeaderboardSubscriptionRequest</code> from a plain JavaScript object, optionally creating a new instance. 16902 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 16903 * @param {Object} data The plain JavaScript object bearing properties of interest. 16904 * @param {module:model/LeaderboardSubscriptionRequest} obj Optional instance to populate. 16905 * @return {module:model/LeaderboardSubscriptionRequest} The populated <code>LeaderboardSubscriptionRequest</code> instance. 16906 */ 16907 16908 }, { 16909 key: "constructFromObject", 16910 value: function constructFromObject(data, obj) { 16911 if (data) { 16912 obj = obj || new LeaderboardSubscriptionRequest(); 16913 16914 if (data.hasOwnProperty('leaderboardFilter')) { 16915 obj['leaderboardFilter'] = _LeaderboardFilter["default"].constructFromObject(data['leaderboardFilter']); 16916 } 16917 16918 if (data.hasOwnProperty('entityId')) { 16919 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 16920 } 16921 16922 if (data.hasOwnProperty('action')) { 16923 obj['action'] = _ApiClient["default"].convertToType(data['action'], 'String'); 16924 } 16925 } 16926 16927 return obj; 16928 } 16929 }]); 16930 16931 return LeaderboardSubscriptionRequest; 16932}(); 16933/** 16934 * @member {module:model/LeaderboardFilter} leaderboardFilter 16935 */ 16936 16937 16938LeaderboardSubscriptionRequest.prototype['leaderboardFilter'] = undefined; 16939/** 16940 * Either the competition, contest, tournament or match identifier 16941 * @member {String} entityId 16942 */ 16943 16944LeaderboardSubscriptionRequest.prototype['entityId'] = undefined; 16945/** 16946 * Either subscribe or unsubscribe from the data feed 16947 * @member {module:model/LeaderboardSubscriptionRequest.ActionEnum} action 16948 */ 16949 16950LeaderboardSubscriptionRequest.prototype['action'] = undefined; 16951/** 16952 * Allowed values for the <code>action</code> property. 16953 * @enum {String} 16954 * @readonly 16955 */ 16956 16957LeaderboardSubscriptionRequest['ActionEnum'] = { 16958 /** 16959 * value: "Subscribe" 16960 * @const 16961 */ 16962 "Subscribe": "Subscribe", 16963 16964 /** 16965 * value: "Unsubscribe" 16966 * @const 16967 */ 16968 "Unsubscribe": "Unsubscribe" 16969}; 16970var _default = LeaderboardSubscriptionRequest; 16971exports["default"] = _default; 16972},{"../ApiClient":3,"./LeaderboardFilter":97}],101:[function(require,module,exports){ 16973"use strict"; 16974 16975Object.defineProperty(exports, "__esModule", { 16976 value: true 16977}); 16978exports["default"] = void 0; 16979 16980var _ApiClient = _interopRequireDefault(require("../ApiClient")); 16981 16982var _OptinAction = _interopRequireDefault(require("./OptinAction")); 16983 16984function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 16985 16986function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 16987 16988function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 16989 16990function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 16991 16992/** 16993 * The ManageOptinRequest model module. 16994 * @module model/ManageOptinRequest 16995 * @version 1.0.14 16996 */ 16997var ManageOptinRequest = /*#__PURE__*/function () { 16998 /** 16999 * Constructs a new <code>ManageOptinRequest</code>. 17000 * @alias module:model/ManageOptinRequest 17001 * @param action {module:model/OptinAction} 17002 */ 17003 function ManageOptinRequest(action) { 17004 _classCallCheck(this, ManageOptinRequest); 17005 17006 ManageOptinRequest.initialize(this, action); 17007 } 17008 /** 17009 * Initializes the fields of this object. 17010 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 17011 * Only for internal use. 17012 */ 17013 17014 17015 _createClass(ManageOptinRequest, null, [{ 17016 key: "initialize", 17017 value: function initialize(obj, action) { 17018 obj['action'] = action; 17019 } 17020 /** 17021 * Constructs a <code>ManageOptinRequest</code> from a plain JavaScript object, optionally creating a new instance. 17022 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 17023 * @param {Object} data The plain JavaScript object bearing properties of interest. 17024 * @param {module:model/ManageOptinRequest} obj Optional instance to populate. 17025 * @return {module:model/ManageOptinRequest} The populated <code>ManageOptinRequest</code> instance. 17026 */ 17027 17028 }, { 17029 key: "constructFromObject", 17030 value: function constructFromObject(data, obj) { 17031 if (data) { 17032 obj = obj || new ManageOptinRequest(); 17033 17034 if (data.hasOwnProperty('entityId')) { 17035 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 17036 } 17037 17038 if (data.hasOwnProperty('entityType')) { 17039 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 17040 } 17041 17042 if (data.hasOwnProperty('action')) { 17043 obj['action'] = _OptinAction["default"].constructFromObject(data['action']); 17044 } 17045 } 17046 17047 return obj; 17048 } 17049 }]); 17050 17051 return ManageOptinRequest; 17052}(); 17053/** 17054 * The system identifier for the entity 17055 * @member {String} entityId 17056 */ 17057 17058 17059ManageOptinRequest.prototype['entityId'] = undefined; 17060/** 17061 * Achievement, Competition, or Contest 17062 * @member {String} entityType 17063 */ 17064 17065ManageOptinRequest.prototype['entityType'] = undefined; 17066/** 17067 * @member {module:model/OptinAction} action 17068 */ 17069 17070ManageOptinRequest.prototype['action'] = undefined; 17071var _default = ManageOptinRequest; 17072exports["default"] = _default; 17073},{"../ApiClient":3,"./OptinAction":127}],102:[function(require,module,exports){ 17074"use strict"; 17075 17076Object.defineProperty(exports, "__esModule", { 17077 value: true 17078}); 17079exports["default"] = void 0; 17080 17081var _ApiClient = _interopRequireDefault(require("../ApiClient")); 17082 17083var _MemberAllOf = _interopRequireDefault(require("./MemberAllOf")); 17084 17085var _MemberType = _interopRequireDefault(require("./MemberType")); 17086 17087var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 17088 17089var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 17090 17091function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 17092 17093function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 17094 17095function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 17096 17097function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 17098 17099/** 17100 * The Member model module. 17101 * @module model/Member 17102 * @version 1.0.14 17103 */ 17104var Member = /*#__PURE__*/function () { 17105 /** 17106 * Constructs a new <code>Member</code>. 17107 * This is the Member model 17108 * @alias module:model/Member 17109 * @implements module:model/MemberAllOf 17110 * @implements module:model/ModelDefault 17111 * @implements module:model/OptionalModelFields 17112 * @param id {String} Ziqni id of the model 17113 */ 17114 function Member(id) { 17115 _classCallCheck(this, Member); 17116 17117 _MemberAllOf["default"].initialize(this); 17118 17119 _ModelDefault["default"].initialize(this, id); 17120 17121 _OptionalModelFields["default"].initialize(this); 17122 17123 Member.initialize(this, id); 17124 } 17125 /** 17126 * Initializes the fields of this object. 17127 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 17128 * Only for internal use. 17129 */ 17130 17131 17132 _createClass(Member, null, [{ 17133 key: "initialize", 17134 value: function initialize(obj, id) { 17135 obj['id'] = id; 17136 } 17137 /** 17138 * Constructs a <code>Member</code> from a plain JavaScript object, optionally creating a new instance. 17139 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 17140 * @param {Object} data The plain JavaScript object bearing properties of interest. 17141 * @param {module:model/Member} obj Optional instance to populate. 17142 * @return {module:model/Member} The populated <code>Member</code> instance. 17143 */ 17144 17145 }, { 17146 key: "constructFromObject", 17147 value: function constructFromObject(data, obj) { 17148 if (data) { 17149 obj = obj || new Member(); 17150 17151 _MemberAllOf["default"].constructFromObject(data, obj); 17152 17153 _ModelDefault["default"].constructFromObject(data, obj); 17154 17155 _OptionalModelFields["default"].constructFromObject(data, obj); 17156 17157 if (data.hasOwnProperty('name')) { 17158 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 17159 } 17160 17161 if (data.hasOwnProperty('memberRefId')) { 17162 obj['memberRefId'] = _ApiClient["default"].convertToType(data['memberRefId'], 'String'); 17163 } 17164 17165 if (data.hasOwnProperty('memberType')) { 17166 obj['memberType'] = _MemberType["default"].constructFromObject(data['memberType']); 17167 } 17168 17169 if (data.hasOwnProperty('teamMembers')) { 17170 obj['teamMembers'] = _ApiClient["default"].convertToType(data['teamMembers'], ['String']); 17171 } 17172 17173 if (data.hasOwnProperty('constraints')) { 17174 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 17175 } 17176 17177 if (data.hasOwnProperty('iconLink')) { 17178 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 17179 } 17180 17181 if (data.hasOwnProperty('timeZoneOffset')) { 17182 obj['timeZoneOffset'] = _ApiClient["default"].convertToType(data['timeZoneOffset'], 'String'); 17183 } 17184 17185 if (data.hasOwnProperty('id')) { 17186 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 17187 } 17188 17189 if (data.hasOwnProperty('spaceName')) { 17190 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 17191 } 17192 17193 if (data.hasOwnProperty('created')) { 17194 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 17195 } 17196 17197 if (data.hasOwnProperty('customFields')) { 17198 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 17199 'String': Object 17200 }); 17201 } 17202 17203 if (data.hasOwnProperty('tags')) { 17204 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 17205 } 17206 17207 if (data.hasOwnProperty('metadata')) { 17208 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 17209 'String': 'String' 17210 }); 17211 } 17212 } 17213 17214 return obj; 17215 } 17216 }]); 17217 17218 return Member; 17219}(); 17220/** 17221 * The name of the member that is used on leader boards and public displays 17222 * @member {String} name 17223 */ 17224 17225 17226Member.prototype['name'] = undefined; 17227/** 17228 * The reference to this member in your system 17229 * @member {String} memberRefId 17230 */ 17231 17232Member.prototype['memberRefId'] = undefined; 17233/** 17234 * @member {module:model/MemberType} memberType 17235 */ 17236 17237Member.prototype['memberType'] = undefined; 17238/** 17239 * A social group like Guilds 17240 * @member {Array.<String>} teamMembers 17241 */ 17242 17243Member.prototype['teamMembers'] = undefined; 17244/** 17245 * Additional constraints 17246 * @member {Array.<String>} constraints 17247 */ 17248 17249Member.prototype['constraints'] = undefined; 17250/** 17251 * Link to the icon 17252 * @member {String} iconLink 17253 */ 17254 17255Member.prototype['iconLink'] = undefined; 17256/** 17257 * To what time zone teh emmber belongs to 17258 * @member {String} timeZoneOffset 17259 */ 17260 17261Member.prototype['timeZoneOffset'] = undefined; 17262/** 17263 * Ziqni id of the model 17264 * @member {String} id 17265 */ 17266 17267Member.prototype['id'] = undefined; 17268/** 17269 * This is the space name which is linked to the account 17270 * @member {String} spaceName 17271 */ 17272 17273Member.prototype['spaceName'] = undefined; 17274/** 17275 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 17276 * @member {Date} created 17277 */ 17278 17279Member.prototype['created'] = undefined; 17280/** 17281 * @member {Object.<String, Object>} customFields 17282 */ 17283 17284Member.prototype['customFields'] = undefined; 17285/** 17286 * A list of id's used to tag models 17287 * @member {Array.<String>} tags 17288 */ 17289 17290Member.prototype['tags'] = undefined; 17291/** 17292 * @member {Object.<String, String>} metadata 17293 */ 17294 17295Member.prototype['metadata'] = undefined; // Implement MemberAllOf interface: 17296 17297/** 17298 * The name of the member that is used on leader boards and public displays 17299 * @member {String} name 17300 */ 17301 17302_MemberAllOf["default"].prototype['name'] = undefined; 17303/** 17304 * The reference to this member in your system 17305 * @member {String} memberRefId 17306 */ 17307 17308_MemberAllOf["default"].prototype['memberRefId'] = undefined; 17309/** 17310 * @member {module:model/MemberType} memberType 17311 */ 17312 17313_MemberAllOf["default"].prototype['memberType'] = undefined; 17314/** 17315 * A social group like Guilds 17316 * @member {Array.<String>} teamMembers 17317 */ 17318 17319_MemberAllOf["default"].prototype['teamMembers'] = undefined; 17320/** 17321 * Additional constraints 17322 * @member {Array.<String>} constraints 17323 */ 17324 17325_MemberAllOf["default"].prototype['constraints'] = undefined; 17326/** 17327 * Link to the icon 17328 * @member {String} iconLink 17329 */ 17330 17331_MemberAllOf["default"].prototype['iconLink'] = undefined; 17332/** 17333 * To what time zone teh emmber belongs to 17334 * @member {String} timeZoneOffset 17335 */ 17336 17337_MemberAllOf["default"].prototype['timeZoneOffset'] = undefined; // Implement ModelDefault interface: 17338 17339/** 17340 * Ziqni id of the model 17341 * @member {String} id 17342 */ 17343 17344_ModelDefault["default"].prototype['id'] = undefined; 17345/** 17346 * This is the space name which is linked to the account 17347 * @member {String} spaceName 17348 */ 17349 17350_ModelDefault["default"].prototype['spaceName'] = undefined; 17351/** 17352 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 17353 * @member {Date} created 17354 */ 17355 17356_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 17357 17358/** 17359 * @member {Object.<String, Object>} customFields 17360 */ 17361 17362_OptionalModelFields["default"].prototype['customFields'] = undefined; 17363/** 17364 * A list of id's used to tag models 17365 * @member {Array.<String>} tags 17366 */ 17367 17368_OptionalModelFields["default"].prototype['tags'] = undefined; 17369/** 17370 * @member {Object.<String, String>} metadata 17371 */ 17372 17373_OptionalModelFields["default"].prototype['metadata'] = undefined; 17374var _default = Member; 17375exports["default"] = _default; 17376},{"../ApiClient":3,"./MemberAllOf":103,"./MemberType":106,"./ModelDefault":123,"./OptionalModelFields":130}],103:[function(require,module,exports){ 17377"use strict"; 17378 17379Object.defineProperty(exports, "__esModule", { 17380 value: true 17381}); 17382exports["default"] = void 0; 17383 17384var _ApiClient = _interopRequireDefault(require("../ApiClient")); 17385 17386var _MemberType = _interopRequireDefault(require("./MemberType")); 17387 17388function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 17389 17390function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 17391 17392function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) {
17392var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 17393 17394function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 17395 17396/** 17397 * The MemberAllOf model module. 17398 * @module model/MemberAllOf 17399 * @version 1.0.14 17400 */ 17401var MemberAllOf = /*#__PURE__*/function () { 17402 /** 17403 * Constructs a new <code>MemberAllOf</code>. 17404 * @alias module:model/MemberAllOf 17405 */ 17406 function MemberAllOf() { 17407 _classCallCheck(this, MemberAllOf); 17408 17409 MemberAllOf.initialize(this); 17410 } 17411 /** 17412 * Initializes the fields of this object. 17413 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 17414 * Only for internal use. 17415 */ 17416 17417 17418 _createClass(MemberAllOf, null, [{ 17419 key: "initialize", 17420 value: function initialize(obj) {} 17421 /** 17422 * Constructs a <code>MemberAllOf</code> from a plain JavaScript object, optionally creating a new instance. 17423 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 17424 * @param {Object} data The plain JavaScript object bearing properties of interest. 17425 * @param {module:model/MemberAllOf} obj Optional instance to populate. 17426 * @return {module:model/MemberAllOf} The populated <code>MemberAllOf</code> instance. 17427 */ 17428 17429 }, { 17430 key: "constructFromObject", 17431 value: function constructFromObject(data, obj) { 17432 if (data) { 17433 obj = obj || new MemberAllOf(); 17434 17435 if (data.hasOwnProperty('name')) { 17436 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 17437 } 17438 17439 if (data.hasOwnProperty('memberRefId')) { 17440 obj['memberRefId'] = _ApiClient["default"].convertToType(data['memberRefId'], 'String'); 17441 } 17442 17443 if (data.hasOwnProperty('memberType')) { 17444 obj['memberType'] = _MemberType["default"].constructFromObject(data['memberType']); 17445 } 17446 17447 if (data.hasOwnProperty('teamMembers')) { 17448 obj['teamMembers'] = _ApiClient["default"].convertToType(data['teamMembers'], ['String']); 17449 } 17450 17451 if (data.hasOwnProperty('constraints')) { 17452 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 17453 } 17454 17455 if (data.hasOwnProperty('iconLink')) { 17456 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 17457 } 17458 17459 if (data.hasOwnProperty('timeZoneOffset')) { 17460 obj['timeZoneOffset'] = _ApiClient["default"].convertToType(data['timeZoneOffset'], 'String'); 17461 } 17462 } 17463 17464 return obj; 17465 } 17466 }]); 17467 17468 return MemberAllOf; 17469}(); 17470/** 17471 * The name of the member that is used on leader boards and public displays 17472 * @member {String} name 17473 */ 17474 17475 17476MemberAllOf.prototype['name'] = undefined; 17477/** 17478 * The reference to this member in your system 17479 * @member {String} memberRefId 17480 */ 17481 17482MemberAllOf.prototype['memberRefId'] = undefined; 17483/** 17484 * @member {module:model/MemberType} memberType 17485 */ 17486 17487MemberAllOf.prototype['memberType'] = undefined; 17488/** 17489 * A social group like Guilds 17490 * @member {Array.<String>} teamMembers 17491 */ 17492 17493MemberAllOf.prototype['teamMembers'] = undefined; 17494/** 17495 * Additional constraints 17496 * @member {Array.<String>} constraints 17497 */ 17498 17499MemberAllOf.prototype['constraints'] = undefined; 17500/** 17501 * Link to the icon 17502 * @member {String} iconLink 17503 */ 17504 17505MemberAllOf.prototype['iconLink'] = undefined; 17506/** 17507 * To what time zone teh emmber belongs to 17508 * @member {String} timeZoneOffset 17509 */ 17510 17511MemberAllOf.prototype['timeZoneOffset'] = undefined; 17512var _default = MemberAllOf; 17513exports["default"] = _default; 17514},{"../ApiClient":3,"./MemberType":106}],104:[function(require,module,exports){ 17515"use strict"; 17516 17517Object.defineProperty(exports, "__esModule", { 17518 value: true 17519}); 17520exports["default"] = void 0; 17521 17522var _ApiClient = _interopRequireDefault(require("../ApiClient")); 17523 17524function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 17525 17526function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 17527 17528function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 17529 17530function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 17531 17532/** 17533 * The MemberRequest model module. 17534 * @module model/MemberRequest 17535 * @version 1.0.14 17536 */ 17537var MemberRequest = /*#__PURE__*/function () { 17538 /** 17539 * Constructs a new <code>MemberRequest</code>. 17540 * @alias module:model/MemberRequest 17541 * @param includeCustomFields {Array.<String>} Only include custom fields that have these keys 17542 */
17543 function MemberRequest(includeCustomFields) { 17544 _classCallCheck(this, MemberRequest); 17545 17546 MemberRequest.initialize(this, includeCustomFields); 17547 } 17548 /** 17549 * Initializes the fields of this object. 17550 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 17551 * Only for internal use. 17552 */ 17553 17554 17555 _createClass(MemberRequest, null, [{ 17556 key: "initialize", 17557 value: function initialize(obj, includeCustomFields) { 17558 obj['includeCustomFields'] = includeCustomFields; 17559 } 17560 /** 17561 * Constructs a <code>MemberRequest</code> from a plain JavaScript object, optionally creating a new instance. 17562 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 17563 * @param {Object} data The plain JavaScript object bearing properties of interest. 17564 * @param {module:model/MemberRequest} obj Optional instance to populate. 17565 * @return {module:model/MemberRequest} The populated <code>MemberRequest</code> instance. 17566 */ 17567 17568 }, { 17569 key: "constructFromObject", 17570 value: function constructFromObject(data, obj) { 17571 if (data) {
17572 obj = obj || new MemberRequest(); 17573 17574 if (data.hasOwnProperty('includeFields')) { 17575 obj['includeFields'] = _ApiClient["default"].convertToType(data['includeFields'], ['String']); 17576 } 17577 17578 if (data.hasOwnProperty('includeCustomFields')) { 17579 obj['includeCustomFields'] = _ApiClient["default"].convertToType(data['includeCustomFields'], ['String']); 17580 } 17581 17582 if (data.hasOwnProperty('includeMetaDataFields')) { 17583 obj['includeMetaDataFields'] = _ApiClient["default"].convertToType(data['includeMetaDataFields'], ['String']); 17584 } 17585 } 17586 17587 return obj; 17588 } 17589 }]); 17590 17591 return MemberRequest; 17592}(); 17593/** 17594 * ALL, or else the name of the top level fields you want to include 17595 * @member {Array.<String>} includeFields 17596 */ 17597 17598 17599MemberRequest.prototype['includeFields'] = undefined; 17600/** 17601 * Only include custom fields that have these keys 17602 * @member {Array.<String>} includeCustomFields 17603 */ 17604 17605MemberRequest.prototype['includeCustomFields'] = undefined; 17606/** 17607 * Only include metadata that have these keys 17608 * @member {Array.<String>} includeMetaDataFields 17609 */ 17610 17611MemberRequest.prototype['includeMetaDataFields'] = undefined; 17612var _default = MemberRequest; 17613exports["default"] = _default; 17614},{"../ApiClient":3}],105:[function(require,module,exports){ 17615"use strict"; 17616 17617Object.defineProperty(exports, "__esModule", { 17618 value: true 17619}); 17620exports["default"] = void 0; 17621 17622var _ApiClient = _interopRequireDefault(require("../ApiClient")); 17623 17624var _Error = _interopRequireDefault(require("./Error")); 17625 17626var _Member = _interopRequireDefault(require("./Member")); 17627 17628var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 17629 17630function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 17631 17632function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 17633 17634function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 17635 17636function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 17637 17638/** 17639 * The MemberResponse model module. 17640 * @module model/MemberResponse 17641 * @version 1.0.14 17642 */ 17643var MemberResponse = /*#__PURE__*/function () { 17644 /** 17645 * Constructs a new <code>MemberResponse</code>. 17646 * @alias module:model/MemberResponse 17647 */ 17648 function MemberResponse() { 17649 _classCallCheck(this, MemberResponse); 17650 17651 MemberResponse.initialize(this); 17652 } 17653 /** 17654 * Initializes the fields of this object. 17655 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 17656 * Only for internal use. 17657 */ 17658 17659 17660 _createClass(MemberResponse, null, [{ 17661 key: "initialize", 17662 value: function initialize(obj) {} 17663 /** 17664 * Constructs a <code>MemberResponse</code> from a plain JavaScript object, optionally creating a new instance. 17665 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 17666 * @param {Object} data The plain JavaScript object bearing properties of interest. 17667 * @param {module:model/MemberResponse} obj Optional instance to populate. 17668 * @return {module:model/MemberResponse} The populated <code>MemberResponse</code> instance. 17669 */ 17670 17671 }, { 17672 key: "constructFromObject", 17673 value: function constructFromObject(data, obj) { 17674 if (data) { 17675 obj = obj || new MemberResponse(); 17676 17677 if (data.hasOwnProperty('meta')) { 17678 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 17679 } 17680 17681 if (data.hasOwnProperty('data')) { 17682 obj['data'] = _Member["default"].constructFromObject(data['data']); 17683 } 17684 17685 if (data.hasOwnProperty('errors')) { 17686 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 17687 } 17688 } 17689 17690 return obj; 17691 } 17692 }]); 17693 17694 return MemberResponse; 17695}(); 17696/** 17697 * @member {module:model/ResponseMeta} meta 17698 */ 17699 17700 17701MemberResponse.prototype['meta'] = undefined; 17702/** 17703 * @member {module:model/Member} data 17704 */ 17705 17706MemberResponse.prototype['data'] = undefined; 17707/** 17708 * @member {Array.<module:model/Error>} errors 17709 */ 17710 17711MemberResponse.prototype['errors'] = undefined; 17712var _default = MemberResponse; 17713exports["default"] = _default; 17714},{"../ApiClient":3,"./Error":74,"./Member":102,"./ResponseMeta":144}],106:[function(require,module,exports){ 17715"use strict"; 17716 17717Object.defineProperty(exports, "__esModule", { 17718 value: true 17719}); 17720exports["default"] = void 0; 17721 17722var _ApiClient = _interopRequireDefault(require("../ApiClient")); 17723 17724function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 17725 17726function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 17727 17728function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 17729 17730function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 17731 17732function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 17733 17734/** 17735* Enum class MemberType. 17736* @enum {} 17737* @readonly 17738*/ 17739var MemberType = /*#__PURE__*/function () { 17740 function MemberType() { 17741 _classCallCheck(this, MemberType); 17742 17743 _defineProperty(this, "Individual", "Individual"); 17744 } 17745 17746 _createClass(MemberType, null, [{ 17747 key: "constructFromObject", 17748 value: 17749 /** 17750 * Returns a <code>MemberType</code> enum value from a Javascript object name. 17751 * @param {Object}
17751 data The plain JavaScript object containing the name of the enum value. 17752 * @return {module:model/MemberType} The enum <code>MemberType</code> value. 17753 */ 17754 function constructFromObject(object) { 17755 return object; 17756 } 17757 }]); 17758 17759 return MemberType; 17760}(); 17761 17762exports["default"] = MemberType; 17763},{"../ApiClient":3}],107:[function(require,module,exports){ 17764"use strict"; 17765 17766Object.defineProperty(exports, "__esModule", { 17767 value: true 17768}); 17769exports["default"] = void 0; 17770 17771var _ApiClient = _interopRequireDefault(require("../ApiClient")); 17772 17773var _EventRefType = _interopRequireDefault(require("./EventRefType")); 17774 17775var _MessageAllOf = _interopRequireDefault(require("./MessageAllOf")); 17776 17777var _MessageStatus = _interopRequireDefault(require("./MessageStatus")); 17778 17779var _MessageType = _interopRequireDefault(require("./MessageType")); 17780 17781var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 17782 17783var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 17784 17785function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 17786 17787function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 17788 17789function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 17790 17791function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 17792 17793/** 17794 * The Message model module. 17795 * @module model/Message 17796 * @version 1.0.14 17797 */ 17798var Message = /*#__PURE__*/function () { 17799 /** 17800 * Constructs a new <code>Message</code>. 17801 * @alias module:model/Message 17802 * @implements module:model/MessageAllOf 17803 * @implements module:model/ModelDefault 17804 * @implements module:model/OptionalModelFields 17805 * @param id {String} Ziqni id of the model 17806 */ 17807 function Message(id) { 17808 _classCallCheck(this, Message); 17809 17810 _MessageAllOf["default"].initialize(this, id); 17811 17812 _ModelDefault["default"].initialize(this, id); 17813 17814 _OptionalModelFields["default"].initialize(this); 17815 17816 Message.initialize(this, id); 17817 } 17818 /** 17819 * Initializes the fields of this object. 17820 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 17821 * Only for internal use. 17822 */ 17823 17824 17825 _createClass(Message, null, [{ 17826 key: "initialize", 17827 value: function initialize(obj, id) { 17828 obj['id'] = id; 17829 } 17830 /** 17831 * Constructs a <code>Message</code> from a plain JavaScript object, optionally creating a new instance. 17832 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 17833 * @param {Object} data The plain JavaScript object bearing properties of interest. 17834 * @param {module:model/Message} obj Optional instance to populate. 17835 * @return {module:model/Message} The populated <code>Message</code> instance. 17836 */ 17837 17838 }, { 17839 key: "constructFromObject", 17840 value: function constructFromObject(data, obj) { 17841 if (data) { 17842 obj = obj || new Message(); 17843 17844 _MessageAllOf["default"].constructFromObject(data, obj); 17845 17846 _ModelDefault["default"].constructFromObject(data, obj); 17847 17848 _OptionalModelFields["default"].constructFromObject(data, obj); 17849 17850 if (data.hasOwnProperty('eventRefType')) { 17851 obj['eventRefType'] = _EventRefType["default"].constructFromObject(data['eventRefType']); 17852 } 17853 17854 if (data.hasOwnProperty('eventRefId')) { 17855 obj['eventRefId'] = _ApiClient["default"].convertToType(data['eventRefId'], 'String'); 17856 } 17857 17858 if (data.hasOwnProperty('messageType')) { 17859 obj['messageType'] = _MessageType["default"].constructFromObject(data['messageType']); 17860 } 17861 17862 if (data.hasOwnProperty('subject')) { 17863 obj['subject'] = _ApiClient["default"].convertToType(data['subject'], 'String'); 17864 } 17865 17866 if (data.hasOwnProperty('body')) { 17867 obj['body'] = _ApiClient["default"].convertToType(data['body'], 'String'); 17868 } 17869 17870 if (data.hasOwnProperty('status')) { 17871 obj['status'] = _MessageStatus["default"].constructFromObject(data['status']); 17872 } 17873 17874 if (data.hasOwnProperty('expiry')) { 17875 obj['expiry'] = _ApiClient["default"].convertToType(data['expiry'], 'Date'); 17876 } 17877 17878 if (data.hasOwnProperty('memberIds')) { 17879 obj['memberIds'] = _ApiClient["default"].convertToType(data['memberIds'], ['String']); 17880 } 17881 17882 if (data.hasOwnProperty('memberTags')) { 17883 obj['memberTags'] = _ApiClient["default"].convertToType(data['memberTags'], ['String']); 17884 } 17885 17886 if (data.hasOwnProperty('id')) { 17887 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 17888 } 17889 17890 if (data.hasOwnProperty('spaceName')) { 17891 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 17892 } 17893 17894 if (data.hasOwnProperty('created')) { 17895 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 17896 } 17897 17898 if (data.hasOwnProperty('customFields')) { 17899 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 17900 'String': Object 17901 }); 17902 } 17903 17904 if (data.hasOwnProperty('tags')) { 17905 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 17906 } 17907 17908 if (data.hasOwnProperty('metadata')) { 17909 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 17910 'String': 'String' 17911 }); 17912 } 17913 } 17914 17915 return obj; 17916 } 17917 }]); 17918 17919 return Message; 17920}(); 17921/** 17922 * @member {module:model/EventRefType} eventRefType 17923 */ 17924 17925 17926Message.prototype['eventRefType'] = undefined; 17927/** 17928 * The reference ID of the event object 17929 * @member {String} eventRefId 17930 */ 17931 17932Message.prototype['eventRefId'] = undefined; 17933/** 17934 * @member {module:model/MessageType} messageType 17935 */ 17936 17937Message.prototype['messageType'] = undefined; 17938/** 17939 * The title of the message 17940 * @member {String} subject 17941 */ 17942 17943Message.prototype['subject'] = undefined; 17944/** 17945 * The context of the message 17946 * @member {String} body 17947 */ 17948 17949Message.prototype['body'] = undefined; 17950/** 17951 * @member {module:model/MessageStatus} status 17952 */ 17953 17954Message.prototype['status'] = undefined; 17955/** 17956 * The time that the message will disappear after. ISO8601 timestamp 17957 * @member {Date} expiry 17958 */ 17959 17960Message.prototype['expiry'] = undefined; 17961/** 17962 * The reference ID of the event object 17963 * @member {Array.<String>} memberIds 17964 */ 17965 17966Message.prototype['memberIds'] = undefined; 17967/** 17968 * @member {Array.<String>} memberTags 17969 */ 17970 17971Message.prototype['memberTags'] = undefined; 17972/** 17973 * Ziqni id of the model 17974 * @member {String} id 17975 */ 17976 17977Message.prototype['id'] = undefined; 17978/** 17979 * This is the space name which is linked to the account 17980 * @member {String} spaceName 17981 */ 17982 17983Message.prototype['spaceName'] = undefined; 17984/** 17985 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 17986 * @member {Date} created 17987 */ 17988 17989Message.prototype['created'] = undefined; 17990/** 17991 * @member {Object.<String, Object>} customFields 17992 */ 17993 17994Message.prototype['customFields'] = undefined; 17995/** 17996 * A list of id's used to tag models 17997 * @member {Array.<String>} tags 17998 */ 17999 18000Message.prototype['tags'] = undefined; 18001/** 18002 * @member {Object.<String, String>} metadata 18003 */ 18004 18005Message.prototype['metadata'] = undefined; // Implement MessageAllOf interface: 18006 18007/** 18008 * @member {module:model/EventRefType} eventRefType 18009 */ 18010 18011_MessageAllOf["default"].prototype['eventRefType'] = undefined; 18012/** 18013 * The reference ID of the event object 18014 * @member {String} eventRefId 18015 */ 18016 18017_MessageAllOf["default"].prototype['eventRefId'] = undefined; 18018/** 18019 * @member {module:model/MessageType} messageType 18020 */ 18021 18022_MessageAllOf["default"].prototype['messageType'] = undefined; 18023/** 18024 * The title of the message 18025 * @member {String} subject 18026 */ 18027 18028_MessageAllOf["default"].prototype['subject'] = undefined; 18029/** 18030 * The context of the message 18031 * @member {String} body 18032 */ 18033 18034_MessageAllOf["default"].prototype['body'] = undefined; 18035/** 18036 * @member {module:model/MessageStatus} status 18037 */ 18038 18039_MessageAllOf["default"].prototype['status'] = undefined; 18040/** 18041 * The time that the message will disappear after. ISO8601 timestamp 18042 * @member {Date} expiry 18043 */ 18044 18045_MessageAllOf["default"].prototype['expiry'] = undefined; 18046/** 18047 * The reference ID of the event object 18048 * @member {Array.<String>} memberIds 18049 */ 18050 18051_MessageAllOf["default"].prototype['memberIds'] = undefined; 18052/** 18053 * @member {Array.<String>} memberTags 18054 */ 18055 18056_MessageAllOf["default"].prototype['memberTags'] = undefined; 18057/** 18058 * @member {String} id 18059 */ 18060 18061_MessageAllOf["default"].prototype['id'] = undefined; // Implement ModelDefault interface: 18062 18063/** 18064 * Ziqni id of the model 18065 * @member {String} id 18066 */ 18067 18068_ModelDefault["default"].prototype['id'] = undefined; 18069/** 18070 * This is the space name which is linked to the account 18071 * @member {String} spaceName 18072 */ 18073 18074_ModelDefault["default"].prototype['spaceName'] = undefined; 18075/** 18076 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 18077 * @member {Date} created 18078 */ 18079 18080_ModelDefault["default"].prototype['created'] = undefined; // Implement OptionalModelFields interface: 18081 18082/** 18083 * @member {Object.<String, Object>} customFields 18084 */ 18085 18086_OptionalModelFields["default"].prototype['customFields'] = undefined; 18087/** 18088 * A list of id's used to tag models 18089 * @member {Array.<String>} tags 18090 */ 18091 18092_OptionalModelFields["default"].prototype['tags'] = undefined; 18093/** 18094 * @member {Object.<String, String>} metadata 18095 */ 18096 18097_OptionalModelFields["default"].prototype['metadata'] = undefined; 18098var _default = Message; 18099exports["default"] = _default; 18100},{"../ApiClient":3,"./EventRefType":75,"./MessageAllOf":108,"./MessageStatus":112,"./MessageType":113,"./ModelDefault":123,"./OptionalModelFields":130}],108:[function(require,module,exports){ 18101"use strict"; 18102 18103Object.defineProperty(exports, "__esModule", { 18104 value: true 18105}); 18106exports["default"] = void 0; 18107 18108var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18109 18110var _EventRefType = _interopRequireDefault(require("./EventRefType")); 18111 18112var _MessageStatus = _interopRequireDefault(require("./MessageStatus")); 18113 18114var _MessageType = _interopRequireDefault(require("./MessageType")); 18115 18116function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18117 18118function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18119 18120function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18121 18122function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18123 18124/** 18125 * The MessageAllOf model module. 18126 * @module model/MessageAllOf 18127 * @version 1.0.14 18128 */ 18129var MessageAllOf = /*#__PURE__*/function () { 18130 /** 18131 * Constructs a new <code>MessageAllOf</code>. 18132 * @alias module:model/MessageAllOf 18133 * @param id {String} 18134 */ 18135 function MessageAllOf(id) { 18136 _classCallCheck(this, MessageAllOf); 18137 18138 MessageAllOf.initialize(this, id); 18139 } 18140 /** 18141 * Initializes the fields of this object. 18142 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 18143 * Only for internal use. 18144 */ 18145 18146 18147 _createClass(MessageAllOf, null, [{ 18148 key: "initialize", 18149 value: function initialize(obj, id) { 18150 obj['id'] = id; 18151 } 18152 /** 18153 * Constructs a <code>MessageAllOf</code> from a plain JavaScript object, optionally creating a new instance. 18154 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 18155 * @param {Object} data The plain JavaScript object bearing properties of interest. 18156 * @param {module:model/MessageAllOf} obj Optional instance to populate. 18157 * @return {module:model/MessageAllOf} The populated <code>MessageAllOf</code> instance. 18158 */ 18159 18160 }, { 18161 key: "constructFromObject", 18162 value: function constructFromObject(data, obj) { 18163 if (data) { 18164 obj = obj || new MessageAllOf(); 18165 18166 if (data.hasOwnProperty('eventRefType')) { 18167 obj['eventRefType'] = _EventRefType["default"].constructFromObject(data['eventRefType']); 18168 } 18169 18170 if (data.hasOwnProperty('eventRefId')) { 18171 obj['eventRefId'] = _ApiClient["default"].convertToType(data['eventRefId'], 'String'); 18172 } 18173 18174 if (data.hasOwnProperty('messageType')) { 18175 obj['messageType'] = _MessageType["default"].constructFromObject(data['messageType']); 18176 } 18177 18178 if (data.hasOwnProperty('subject')) { 18179 obj['subject'] = _ApiClient["default"].convertToType(data['subject'], 'String'); 18180 } 18181 18182 if (data.hasOwnProperty('body')) { 18183 obj['body'] = _ApiClient["default"].convertToType(data['body'], 'String'); 18184 } 18185 18186 if (data.hasOwnProperty('status')) { 18187 obj['status'] = _MessageStatus["default"].constructFromObject(data['status']); 18188 } 18189 18190 if (data.hasOwnProperty('expiry')) { 18191 obj['expiry'] = _ApiClient["default"].convertToType(data['expiry'], 'Date'); 18192 } 18193 18194 if (data.hasOwnProperty('memberIds')) { 18195 obj['memberIds'] = _ApiClient["default"].convertToType(data['memberIds'], ['String']); 18196 } 18197 18198 if (data.hasOwnProperty('memberTags')) { 18199 obj['memberTags'] = _ApiClient["default"].convertToType(data['memberTags'], ['String']); 18200 } 18201 18202 if (data.hasOwnProperty('id')) { 18203 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 18204 } 18205 } 18206 18207 return obj; 18208 } 18209 }]); 18210 18211 return MessageAllOf; 18212}(); 18213/** 18214 * @member {module:model/EventRefType} eventRefType 18215 */ 18216 18217 18218MessageAllOf.prototype['eventRefType'] = undefined; 18219/** 18220 * The reference ID of the event object 18221 * @member {String} eventRefId 18222 */ 18223 18224MessageAllOf.prototype['eventRefId'] = undefined; 18225/** 18226 * @member {module:model/MessageType} messageType 18227 */ 18228 18229MessageAllOf.prototype['messageType'] = undefined; 18230/** 18231 * The title of the message 18232 * @member {String} subject 18233 */ 18234 18235MessageAllOf.prototype['subject'] = undefined; 18236/** 18237 * The context of the message 18238 * @member {String} body 18239 */ 18240 18241MessageAllOf.prototype['body'] = undefined; 18242/** 18243 * @member {module:model/MessageStatus} status 18244 */ 18245 18246MessageAllOf.prototype['status'] = undefined; 18247/** 18248 * The time that the message will disappear after. ISO8601 timestamp 18249 * @member {Date} expiry 18250 */ 18251 18252MessageAllOf.prototype['expiry'] = undefined; 18253/** 18254 * The reference ID of the event object 18255 * @member {Array.<String>} memberIds 18256 */ 18257 18258MessageAllOf.prototype['memberIds'] = undefined; 18259/** 18260 * @member {Array.<String>} memberTags 18261 */ 18262 18263MessageAllOf.prototype['memberTags'] = undefined; 18264/** 18265 * @member {String} id 18266 */ 18267 18268MessageAllOf.prototype['id'] = undefined; 18269var _default = MessageAllOf; 18270exports["default"] = _default; 18271},{"../ApiClient":3,"./EventRefType":75,"./MessageStatus":112,"./MessageType":113}],109:[function(require,module,exports){ 18272"use strict"; 18273 18274Object.defineProperty(exports, "__esModule", { 18275 value: true 18276}); 18277exports["default"] = void 0; 18278 18279var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18280 18281var _DateRange = _interopRequireDefault(require("./DateRange")); 18282 18283var _MessageType = _interopRequireDefault(require("./MessageType")); 18284 18285var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 18286 18287function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18288 18289function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as
18289a function"); } } 18290 18291function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18292 18293function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18294 18295/** 18296 * The MessageFilter model module. 18297 * @module model/MessageFilter 18298 * @version 1.0.14 18299 */ 18300var MessageFilter = /*#__PURE__*/function () { 18301 /** 18302 * Constructs a new <code>MessageFilter</code>. 18303 * @alias module:model/MessageFilter 18304 */ 18305 function MessageFilter() { 18306 _classCallCheck(this, MessageFilter); 18307 18308 MessageFilter.initialize(this); 18309 } 18310 /** 18311 * Initializes the fields of this object. 18312 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 18313 * Only for internal use. 18314 */ 18315 18316 18317 _createClass(MessageFilter, null, [{ 18318 key: "initialize", 18319 value: function initialize(obj) {} 18320 /** 18321 * Constructs a <code>MessageFilter</code> from a plain JavaScript object, optionally creating a new instance. 18322 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 18323 * @param {Object} data The plain JavaScript object bearing properties of interest. 18324 * @param {module:model/MessageFilter} obj Optional instance to populate. 18325 * @return {module:model/MessageFilter} The populated <code>MessageFilter</code> instance. 18326 */ 18327 18328 }, { 18329 key: "constructFromObject", 18330 value: function constructFromObject(data, obj) { 18331 if (data) { 18332 obj = obj || new MessageFilter(); 18333 18334 if (data.hasOwnProperty('tags')) { 18335 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 18336 } 18337 18338 if (data.hasOwnProperty('ids')) { 18339 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 18340 } 18341 18342 if (data.hasOwnProperty('sortBy')) { 18343 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 18344 } 18345 18346 if (data.hasOwnProperty('skip')) { 18347 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 18348 } 18349 18350 if (data.hasOwnProperty('limit')) { 18351 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 18352 } 18353 18354 if (data.hasOwnProperty('expiryDateRange')) { 18355 obj['expiryDateRange'] = _DateRange["default"].constructFromObject(data['expiryDateRange']); 18356 } 18357 18358 if (data.hasOwnProperty('createdDateRange')) { 18359 obj['createdDateRange'] = _DateRange["default"].constructFromObject(data['createdDateRange']); 18360 } 18361 18362 if (data.hasOwnProperty('messageType')) { 18363 obj['messageType'] = _MessageType["default"].constructFromObject(data['messageType']); 18364 } 18365 } 18366 18367 return obj; 18368 } 18369 }]); 18370 18371 return MessageFilter; 18372}(); 18373/** 18374 * @member {Array.<String>} tags 18375 */ 18376 18377 18378MessageFilter.prototype['tags'] = undefined; 18379/** 18380 * @member {Array.<String>} ids 18381 */ 18382 18383MessageFilter.prototype['ids'] = undefined; 18384/** 18385 * @member {Array.<module:model/QuerySortBy>} sortBy 18386 */ 18387 18388MessageFilter.prototype['sortBy'] = undefined; 18389/** 18390 * @member {Number} skip 18391 */ 18392 18393MessageFilter.prototype['skip'] = undefined; 18394/** 18395 * @member {Number} limit 18396 */ 18397 18398MessageFilter.prototype['limit'] = undefined; 18399/** 18400 * @member {module:model/DateRange} expiryDateRange 18401 */ 18402 18403MessageFilter.prototype['expiryDateRange'] = undefined; 18404/** 18405 * @member {module:model/DateRange} createdDateRange 18406 */ 18407 18408MessageFilter.prototype['createdDateRange'] = undefined; 18409/** 18410 * @member {module:model/MessageType} messageType 18411 */ 18412 18413MessageFilter.prototype['messageType'] = undefined; 18414var _default = MessageFilter; 18415exports["default"] = _default; 18416},{"../ApiClient":3,"./DateRange":58,"./MessageType":113,"./QuerySortBy":141}],110:[function(require,module,exports){ 18417"use strict"; 18418 18419Object.defineProperty(exports, "__esModule", { 18420 value: true 18421}); 18422exports["default"] = void 0; 18423 18424var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18425 18426var _MessageFilter = _interopRequireDefault(require("./MessageFilter")); 18427 18428function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18429 18430function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18431 18432function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18433 18434function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18435 18436/** 18437 * The MessageRequest model module. 18438 * @module model/MessageRequest 18439 * @version 1.0.14 18440 */ 18441var MessageRequest = /*#__PURE__*/function () { 18442 /** 18443 * Constructs a new <code>MessageRequest</code>. 18444 * @alias module:model/MessageRequest 18445 */ 18446 function MessageRequest() { 18447 _classCallCheck(this, MessageRequest); 18448 18449 MessageRequest.initialize(this); 18450 } 18451 /** 18452 * Initializes the fields of this object. 18453 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 18454 * Only for internal use. 18455 */ 18456 18457 18458 _createClass(MessageRequest, null, [{ 18459 key: "initialize", 18460 value: function initialize(obj) {} 18461 /** 18462 * Constructs a <code>MessageRequest</code> from a plain JavaScript object, optionally creating a new instance. 18463 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 18464 * @param {Object} data The plain JavaScript object bearing properties of interest. 18465 * @param {module:model/MessageRequest} obj Optional instance to populate. 18466 * @return {module:model/MessageRequest} The populated <code>MessageRequest</code> instance. 18467 */ 18468 18469 }, { 18470 key: "constructFromObject", 18471 value: function constructFromObject(data, obj) { 18472 if (data) { 18473 obj = obj || new MessageRequest(); 18474 18475 if (data.hasOwnProperty('languageKey')) { 18476 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 18477 } 18478 18479 if (data.hasOwnProperty('messageFilter')) { 18480 obj['messageFilter'] = _MessageFilter["default"].constructFromObject(data['messageFilter']); 18481 } 18482 } 18483 18484 return obj; 18485 } 18486 }]); 18487 18488 return MessageRequest; 18489}(); 18490/** 18491 * The language codes can be found in the settings/transalations section of the back office 18492 * @member {String} languageKey 18493 */ 18494 18495 18496MessageRequest.prototype['languageKey'] = undefined; 18497/** 18498 * @member {module:model/MessageFilter} messageFilter 18499 */ 18500 18501MessageRequest.prototype['messageFilter'] = undefined; 18502var _default = MessageRequest; 18503exports["default"] = _default; 18504},{"../ApiClient":3,"./MessageFilter":109}],111:[function(require,module,exports){ 18505"use strict"; 18506 18507Object.defineProperty(exports, "__esModule", { 18508 value: true 18509}); 18510exports["default"] = void 0; 18511 18512var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18513 18514var _Error = _interopRequireDefault(require("./Error")); 18515 18516var _Message = _interopRequireDefault(require("./Message")); 18517 18518var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 18519 18520function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18521 18522function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18523 18524function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18525 18526function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18527 18528/** 18529 * The MessageResponse model module. 18530 * @module model/MessageResponse 18531 * @version 1.0.14 18532 */ 18533var MessageResponse = /*#__PURE__*/function () { 18534 /** 18535 * Constructs a new <code>MessageResponse</code>. 18536 * @alias module:model/MessageResponse 18537 */ 18538 function MessageResponse() { 18539 _classCallCheck(this, MessageResponse); 18540 18541 MessageResponse.initialize(this); 18542 } 18543 /** 18544 * Initializes the fields of this object. 18545 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 18546 * Only for internal use. 18547 */ 18548 18549 18550 _createClass(MessageResponse, null, [{ 18551 key: "initialize", 18552 value: function initialize(obj) {} 18553 /** 18554 * Constructs a <code>MessageResponse</code> from a plain JavaScript object, optionally creating a new instance. 18555 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 18556 * @param {Object} data The plain JavaScript object bearing properties of interest. 18557 * @param {module:model/MessageResponse} obj Optional instance to populate. 18558 * @return {module:model/MessageResponse} The populated <code>MessageResponse</code> instance. 18559 */ 18560 18561 }, { 18562 key: "constructFromObject", 18563 value: function constructFromObject(data, obj) { 18564 if (data) { 18565 obj = obj || new MessageResponse(); 18566 18567 if (data.hasOwnProperty('meta')) { 18568 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 18569 } 18570 18571 if (data.hasOwnProperty('data')) { 18572 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Message["default"]]); 18573 } 18574 18575 if (data.hasOwnProperty('errors')) { 18576 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 18577 } 18578 } 18579 18580 return obj; 18581 } 18582 }]); 18583 18584 return MessageResponse; 18585}(); 18586/** 18587 * @member {module:model/ResponseMeta} meta 18588 */ 18589 18590 18591MessageResponse.prototype['meta'] = undefined; 18592/** 18593 * @member {Array.<module:model/Message>} data 18594 */ 18595 18596MessageResponse.prototype['data'] = undefined; 18597/** 18598 * @member {Array.<module:model/Error>} errors 18599 */ 18600 18601MessageResponse.prototype['errors'] = undefined; 18602var _default = MessageResponse; 18603exports["default"] = _default; 18604},{"../ApiClient":3,"./Error":74,"./Message":107,"./ResponseMeta":144}],112:[function(require,module,exports){ 18605"use strict"; 18606 18607Object.defineProperty(exports, "__esModule", { 18608 value: true 18609}); 18610exports["default"] = void 0; 18611 18612var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18613 18614function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18615 18616function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18617 18618function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18619 18620function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18621 18622function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 18623 18624/** 18625* Enum class MessageStatus. 18626* @enum {} 18627* @readonly 18628*/ 18629var MessageStatus = /*#__PURE__*/function () { 18630 function MessageStatus() { 18631 _classCallCheck(this, MessageStatus); 18632 18633 _defineProperty(this, "New", "New"); 18634 18635 _defineProperty(this, "Read", "Read"); 18636 18637 _defineProperty(this, "CollaborationRequest", "CollaborationRequest"); 18638 18639 _defineProperty(this, "Actioned", "Actioned"); 18640 18641 _defineProperty(this, "Claimed", "Claimed"); 18642 18643 _defineProperty(this, "Expired", "Expired"); 18644 18645 _defineProperty(this, "Canceled", "Canceled"); 18646 18647 _defineProperty(this, "Deprecated", "Deprecated"); 18648 } 18649 18650 _createClass(MessageStatus, null, [{ 18651 key: "constructFromObject", 18652 value: 18653 /** 18654 * Returns a <code>MessageStatus</code> enum value from a Javascript object name. 18655 * @param {Object}
18655 data The plain JavaScript object containing the name of the enum value. 18656 * @return {module:model/MessageStatus} The enum <code>MessageStatus</code> value. 18657 */ 18658 function constructFromObject(object) { 18659 return object; 18660 } 18661 }]); 18662 18663 return MessageStatus; 18664}(); 18665 18666exports["default"] = MessageStatus; 18667},{"../ApiClient":3}],113:[function(require,module,exports){ 18668"use strict"; 18669 18670Object.defineProperty(exports, "__esModule", { 18671 value: true 18672}); 18673exports["default"] = void 0; 18674 18675var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18676 18677function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18678 18679function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18680 18681function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18682 18683function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18684 18685function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 18686 18687/** 18688* Enum class MessageType. 18689* @enum {} 18690* @readonly 18691*/ 18692var MessageType = /*#__PURE__*/function () { 18693 function MessageType() { 18694 _classCallCheck(this, MessageType); 18695 18696 _defineProperty(this, "Achievement", "Achievement"); 18697 18698 _defineProperty(this, "Ticket", "Ticket"); 18699 18700 _defineProperty(this, "Reward", "Reward"); 18701 18702 _defineProperty(this, "Text", "Text"); 18703 18704 _defineProperty(this, "Notification", "Notification"); 18705 18706 _defineProperty(this, "InboxItem", "InboxItem"); 18707 18708 _defineProperty(this, "NotificationInboxItem", "NotificationInboxItem"); 18709 } 18710 18711 _createClass(MessageType, null, [{ 18712 key: "constructFromObject", 18713 value: 18714 /** 18715 * Returns a <code>MessageType</code> enum value from a Javascript object name. 18716 * @param {Object} data The plain JavaScript object containing the name of the enum value. 18717 * @return {module:model/MessageType} The enum <code>MessageType</code> value. 18718 */ 18719 function constructFromObject(object) { 18720 return object; 18721 } 18722 }]); 18723 18724 return MessageType; 18725}(); 18726 18727exports["default"] = MessageType; 18728},{"../ApiClient":3}],114:[function(require,module,exports){ 18729"use strict"; 18730 18731Object.defineProperty(exports, "__esModule", { 18732 value: true 18733}); 18734exports["default"] = void 0; 18735 18736var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18737 18738var _MetaInfo = _interopRequireDefault(require("./MetaInfo")); 18739 18740function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18741 18742function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18743 18744function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18745 18746function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18747 18748/** 18749 * The MetaBasic model module. 18750 * @module model/MetaBasic 18751 * @version 1.0.14 18752 */ 18753var MetaBasic = /*#__PURE__*/function () { 18754 /** 18755 * Constructs a new <code>MetaBasic</code>. 18756 * @alias module:model/MetaBasic 18757 * @implements module:model/MetaInfo 18758 * @param objectType {String} 18759 * @param resultCount {Number} The count of successful results 18760 * @param errorCount {Number} The count of errors 18761 */ 18762 function MetaBasic(objectType, resultCount, errorCount) { 18763 _classCallCheck(this, MetaBasic); 18764 18765 _MetaInfo["default"].initialize(this, objectType, resultCount, errorCount); 18766 18767 MetaBasic.initialize(this, objectType, resultCount, errorCount); 18768 } 18769 /** 18770 * Initializes the fields of this object. 18771 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 18772 * Only for internal use. 18773 */ 18774 18775 18776 _createClass(MetaBasic, null, [{ 18777 key: "initialize", 18778 value: function initialize(obj, objectType, resultCount, errorCount) { 18779 obj['objectType'] = objectType; 18780 obj['resultCount'] = resultCount; 18781 obj['errorCount'] = errorCount; 18782 } 18783 /** 18784 * Constructs a <code>MetaBasic</code> from a plain JavaScript object, optionally creating a new instance. 18785 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 18786 * @param {Object} data The plain JavaScript object bearing properties of interest. 18787 * @param {module:model/MetaBasic} obj Optional instance to populate. 18788 * @return {module:model/MetaBasic} The populated <code>MetaBasic</code> instance. 18789 */ 18790 18791 }, { 18792 key: "constructFromObject", 18793 value: function constructFromObject(data, obj) { 18794 if (data) { 18795 obj = obj || new MetaBasic(); 18796 18797 _MetaInfo["default"].constructFromObject(data, obj); 18798 18799 if (data.hasOwnProperty('objectType')) { 18800 obj['objectType'] = _ApiClient["default"].convertToType(data['objectType'], 'String'); 18801 } 18802 18803 if (data.hasOwnProperty('totalRecords')) { 18804 obj['totalRecords'] = _ApiClient["default"].convertToType(data['totalRecords'], 'Number'); 18805 } 18806 18807 if (data.hasOwnProperty('resultCount')) { 18808 obj['resultCount'] = _ApiClient["default"].convertToType(data['resultCount'], 'Number'); 18809 } 18810 18811 if (data.hasOwnProperty('errorCount')) { 18812 obj['errorCount'] = _ApiClient["default"].convertToType(data['errorCount'], 'Number'); 18813 } 18814 } 18815 18816 return obj; 18817 } 18818 }]); 18819 18820 return MetaBasic; 18821}(); 18822/** 18823 * @member {String} objectType 18824 */ 18825 18826 18827MetaBasic.prototype['objectType'] = undefined; 18828/** 18829 * The count of all results 18830 * @member {Number} totalRecords 18831 */ 18832 18833MetaBasic.prototype['totalRecords'] = undefined; 18834/** 18835 * The count of successful results 18836 * @member {Number} resultCount 18837 */ 18838 18839MetaBasic.prototype['resultCount'] = undefined; 18840/** 18841 * The count of errors 18842 * @member {Number} errorCount 18843 */ 18844 18845MetaBasic.prototype['errorCount'] = undefined; // Implement MetaInfo interface: 18846 18847/** 18848 * @member {String} objectType 18849 */ 18850 18851_MetaInfo["default"].prototype['objectType'] = undefined; 18852/** 18853 * The count of all results 18854 * @member {Number} totalRecords 18855 */ 18856 18857_MetaInfo["default"].prototype['totalRecords'] = undefined; 18858/** 18859 * The count of successful results 18860 * @member {Number} resultCount 18861 */ 18862 18863_MetaInfo["default"].prototype['resultCount'] = undefined; 18864/** 18865 * The count of errors 18866 * @member {Number} errorCount 18867 */ 18868 18869_MetaInfo["default"].prototype['errorCount'] = undefined; 18870var _default = MetaBasic; 18871exports["default"] = _default; 18872},{"../ApiClient":3,"./MetaInfo":115}],115:[function(require,module,exports){ 18873"use strict"; 18874 18875Object.defineProperty(exports, "__esModule", { 18876 value: true 18877}); 18878exports["default"] = void 0; 18879 18880var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18881 18882function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18883 18884function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 18885 18886function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 18887 18888function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 18889 18890/** 18891 * The MetaInfo model module. 18892 * @module model/MetaInfo 18893 * @version 1.0.14 18894 */ 18895var MetaInfo = /*#__PURE__*/function () { 18896 /** 18897 * Constructs a new <code>MetaInfo</code>. 18898 * @alias module:model/MetaInfo 18899 * @param objectType {String} 18900 * @param resultCount {Number} The count of successful results 18901 * @param errorCount {Number} The count of errors 18902 */ 18903 function MetaInfo(objectType, resultCount, errorCount) { 18904 _classCallCheck(this, MetaInfo); 18905 18906 MetaInfo.initialize(this, objectType, resultCount, errorCount); 18907 } 18908 /** 18909 * Initializes the fields of this object. 18910 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 18911 * Only for internal use. 18912 */ 18913 18914 18915 _createClass(MetaInfo, null, [{ 18916 key: "initialize", 18917 value: function initialize(obj, objectType, resultCount, errorCount) { 18918 obj['objectType'] = objectType; 18919 obj['resultCount'] = resultCount; 18920 obj['errorCount'] = errorCount; 18921 } 18922 /** 18923 * Constructs a <code>MetaInfo</code> from a plain JavaScript object, optionally creating a new instance. 18924 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 18925 * @param {Object} data The plain JavaScript object bearing properties of interest. 18926 * @param {module:model/MetaInfo} obj Optional instance to populate. 18927 * @return {module:model/MetaInfo} The populated <code>MetaInfo</code> instance. 18928 */ 18929 18930 }, { 18931 key: "constructFromObject", 18932 value: function constructFromObject(data, obj) { 18933 if (data) { 18934 obj = obj || new MetaInfo(); 18935 18936 if (data.hasOwnProperty('objectType')) { 18937 obj['objectType'] = _ApiClient["default"].convertToType(data['objectType'], 'String'); 18938 } 18939 18940 if (data.hasOwnProperty('totalRecords')) { 18941 obj['totalRecords'] = _ApiClient["default"].convertToType(data['totalRecords'], 'Number'); 18942 } 18943 18944 if (data.hasOwnProperty('resultCount')) { 18945 obj['resultCount'] = _ApiClient["default"].convertToType(data['resultCount'], 'Number'); 18946 } 18947 18948 if (data.hasOwnProperty('errorCount')) { 18949 obj['errorCount'] = _ApiClient["default"].convertToType(data['errorCount'], 'Number'); 18950 } 18951 } 18952 18953 return obj; 18954 } 18955 }]); 18956 18957 return MetaInfo; 18958}(); 18959/** 18960 * @member {String} objectType 18961 */ 18962 18963 18964MetaInfo.prototype['objectType'] = undefined; 18965/** 18966 * The count of all results 18967 * @member {Number} totalRecords 18968 */ 18969 18970MetaInfo.prototype['totalRecords'] = undefined; 18971/** 18972 * The count of successful results 18973 * @member {Number} resultCount 18974 */ 18975 18976MetaInfo.prototype['resultCount'] = undefined; 18977/** 18978 * The count of errors 18979 * @member {Number} errorCount 18980 */ 18981 18982MetaInfo.prototype['errorCount'] = undefined; 18983var _default = MetaInfo; 18984exports["default"] = _default; 18985},{"../ApiClient":3}],116:[function(require,module,exports){ 18986"use strict"; 18987 18988Object.defineProperty(exports, "__esModule", { 18989 value: true 18990}); 18991exports["default"] = void 0; 18992 18993var _ApiClient = _interopRequireDefault(require("../ApiClient")); 18994 18995var _OptinStatus = _interopRequireDefault(require("./OptinStatus")); 18996 18997function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 18998 18999function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19000 19001function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19002 19003function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19004 19005/** 19006 * The MissionState model module. 19007 * @module model/MissionState 19008 * @version 1.0.14 19009 */ 19010var MissionState = /*#__PURE__*/function () { 19011 /** 19012 * Constructs a new <code>MissionState</code>. 19013 * Mission is a specialised view of connected achievements. The first achievement is the container, every depen
19013dant achievement is a chained dependency 19014 * @alias module:model/MissionState 19015 * @param optInStatus {module:model/OptinStatus} 19016 * @param entityId {String} 19017 */ 19018 function MissionState(optInStatus, entityId) { 19019 _classCallCheck(this, MissionState); 19020 19021 MissionState.initialize(this, optInStatus, entityId); 19022 } 19023 /** 19024 * Initializes the fields of this object. 19025 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19026 * Only for internal use. 19027 */ 19028 19029 19030 _createClass(MissionState, null, [{ 19031 key: "initialize", 19032 value: function initialize(obj, optInStatus, entityId) { 19033 obj['optInStatus'] = optInStatus; 19034 obj['entityId'] = entityId; 19035 } 19036 /** 19037 * Constructs a <code>MissionState</code> from a plain JavaScript object, optionally creating a new instance. 19038 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19039 * @param {Object} data The plain JavaScript object bearing properties of interest. 19040 * @param {module:model/MissionState} obj Optional instance to populate. 19041 * @return {module:model/MissionState} The populated <code>MissionState</code> instance. 19042 */ 19043 19044 }, { 19045 key: "constructFromObject", 19046 value: function constructFromObject(data, obj) { 19047 if (data) { 19048 obj = obj || new MissionState(); 19049 19050 if (data.hasOwnProperty('name')) { 19051 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 19052 } 19053 19054 if (data.hasOwnProperty('optInStatus')) { 19055 obj['optInStatus'] = _OptinStatus["default"].constructFromObject(data['optInStatus']); 19056 } 19057 19058 if (data.hasOwnProperty('constraints')) { 19059 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 19060 } 19061 19062 if (data.hasOwnProperty('entityType')) { 19063 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 19064 } 19065 19066 if (data.hasOwnProperty('entityId')) { 19067 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 19068 } 19069 19070 if (data.hasOwnProperty('entityStatusCode')) { 19071 obj['entityStatusCode'] = _ApiClient["default"].convertToType(data['entityStatusCode'], 'Number'); 19072 } 19073 19074 if (data.hasOwnProperty('entityStatus')) { 19075 obj['entityStatus'] = _ApiClient["default"].convertToType(data['entityStatus'], 'String'); 19076 } 19077 19078 if (data.hasOwnProperty('includes')) { 19079 obj['includes'] = _ApiClient["default"].convertToType(data['includes'], { 19080 'String': Object 19081 }); 19082 } 19083 } 19084 19085 return obj; 19086 } 19087 }]); 19088 19089 return MissionState; 19090}(); 19091/** 19092 * @member {String} name 19093 */ 19094 19095 19096MissionState.prototype['name'] = undefined; 19097/** 19098 * @member {module:model/OptinStatus} optInStatus 19099 */ 19100 19101MissionState.prototype['optInStatus'] = undefined; 19102/** 19103 * isCompleted, etc 19104 * @member {Array.<String>} constraints 19105 */ 19106 19107MissionState.prototype['constraints'] = undefined; 19108/** 19109 * @member {String} entityType 19110 */ 19111 19112MissionState.prototype['entityType'] = undefined; 19113/** 19114 * @member {String} entityId 19115 */ 19116 19117MissionState.prototype['entityId'] = undefined; 19118/** 19119 * @member {Number} entityStatusCode 19120 */ 19121 19122MissionState.prototype['entityStatusCode'] = undefined; 19123/** 19124 * @member {String} entityStatus 19125 */ 19126 19127MissionState.prototype['entityStatus'] = undefined; 19128/** 19129 * @member {Object.<String, Object>} includes 19130 */ 19131 19132MissionState.prototype['includes'] = undefined; 19133var _default = MissionState; 19134exports["default"] = _default; 19135},{"../ApiClient":3,"./OptinStatus":129}],117:[function(require,module,exports){ 19136"use strict"; 19137 19138Object.defineProperty(exports, "__esModule", { 19139 value: true 19140}); 19141exports["default"] = void 0; 19142 19143var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19144 19145var _MissionState = _interopRequireDefault(require("./MissionState")); 19146 19147function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19148 19149function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19150 19151function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19152 19153function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19154 19155/** 19156 * The MissionStates model module. 19157 * @module model/MissionStates 19158 * @version 1.0.14 19159 */ 19160var MissionStates = /*#__PURE__*/function () { 19161 /** 19162 * Constructs a new <code>MissionStates</code>. 19163 * @alias module:model/MissionStates 19164 */ 19165 function MissionStates() { 19166 _classCallCheck(this, MissionStates); 19167 19168 MissionStates.initialize(this); 19169 } 19170 /** 19171 * Initializes the fields of this object. 19172 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19173 * Only for internal use. 19174 */ 19175 19176 19177 _createClass(MissionStates, null, [{ 19178 key: "initialize", 19179 value: function initialize(obj) {} 19180 /** 19181 * Constructs a <code>MissionStates</code> from a plain JavaScript object, optionally creating a new instance. 19182 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19183 * @param {Object} data The plain JavaScript object bearing properties of interest. 19184 * @param {module:model/MissionStates} obj Optional instance to populate. 19185 * @return {module:model/MissionStates} The populated <code>MissionStates</code> instance. 19186 */ 19187 19188 }, { 19189 key: "constructFromObject", 19190 value: function constructFromObject(data, obj) { 19191 if (data) { 19192 obj = obj || new MissionStates(); 19193 19194 if (data.hasOwnProperty('id')) { 19195 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 19196 } 19197 19198 if (data.hasOwnProperty('missionStates')) { 19199 obj['missionStates'] = _ApiClient["default"].convertToType(data['missionStates'], [_MissionState["default"]]); 19200 } 19201 } 19202 19203 return obj; 19204 } 19205 }]); 19206 19207 return MissionStates; 19208}(); 19209/** 19210 * @member {String} id 19211 */ 19212 19213 19214MissionStates.prototype['id'] = undefined; 19215/** 19216 * @member {Array.<module:model/MissionState>} missionStates 19217 */ 19218 19219MissionStates.prototype['missionStates'] = undefined; 19220var _default = MissionStates; 19221exports["default"] = _default; 19222},{"../ApiClient":3,"./MissionState":116}],118:[function(require,module,exports){ 19223"use strict"; 19224 19225Object.defineProperty(exports, "__esModule", { 19226 value: true 19227}); 19228exports["default"] = void 0; 19229 19230var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19231 19232var _RangeQuery = _interopRequireDefault(require("./RangeQuery")); 19233 19234var _TagFilter = _interopRequireDefault(require("./TagFilter")); 19235 19236function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19237 19238function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19239 19240function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19241 19242function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19243 19244/** 19245 * The MissionStatesFilter model module. 19246 * @module model/MissionStatesFilter 19247 * @version 1.0.14 19248 */ 19249var MissionStatesFilter = /*#__PURE__*/function () { 19250 /** 19251 * Constructs a new <code>MissionStatesFilter</code>. 19252 * @alias module:model/MissionStatesFilter 19253 */ 19254 function MissionStatesFilter() { 19255 _classCallCheck(this, MissionStatesFilter); 19256 19257 MissionStatesFilter.initialize(this); 19258 } 19259 /** 19260 * Initializes the fields of this object. 19261 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19262 * Only for internal use. 19263 */ 19264 19265 19266 _createClass(MissionStatesFilter, null, [{ 19267 key: "initialize", 19268 value: function initialize(obj) {} 19269 /** 19270 * Constructs a <code>MissionStatesFilter</code> from a plain JavaScript object, optionally creating a new instance. 19271 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19272 * @param {Object} data The plain JavaScript object bearing properties of interest. 19273 * @param {module:model/MissionStatesFilter} obj Optional instance to populate. 19274 * @return {module:model/MissionStatesFilter} The populated <code>MissionStatesFilter</code> instance. 19275 */ 19276 19277 }, { 19278 key: "constructFromObject", 19279 value: function constructFromObject(data, obj) { 19280 if (data) { 19281 obj = obj || new MissionStatesFilter(); 19282 19283 if (data.hasOwnProperty('ids')) { 19284 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 19285 } 19286 19287 if (data.hasOwnProperty('statusCodes')) { 19288 obj['statusCodes'] = _RangeQuery["default"].constructFromObject(data['statusCodes']); 19289 } 19290 19291 if (data.hasOwnProperty('optInStatusCodes')) { 19292 obj['optInStatusCodes'] = _RangeQuery["default"].constructFromObject(data['optInStatusCodes']); 19293 } 19294 19295 if (data.hasOwnProperty('skip')) { 19296 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 19297 } 19298 19299 if (data.hasOwnProperty('limit')) { 19300 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 19301 } 19302 19303 if (data.hasOwnProperty('constraints')) { 19304 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 19305 } 19306 19307 if (data.hasOwnProperty('tagFilters')) { 19308 obj['tagFilters'] = _ApiClient["default"].convertToType(data['tagFilters'], [_TagFilter["default"]]); 19309 } 19310 } 19311 19312 return obj; 19313 } 19314 }]); 19315 19316 return MissionStatesFilter; 19317}(); 19318/** 19319 * Optionally provide a list of identifiers for the missoion 19320 * @member {Array.<String>} ids 19321 */ 19322 19323 19324MissionStatesFilter.prototype['ids'] = undefined; 19325/** 19326 * @member {module:model/RangeQuery} statusCodes 19327 */ 19328 19329MissionStatesFilter.prototype['statusCodes'] = undefined; 19330/** 19331 * @member {module:model/RangeQuery} optInStatusCodes 19332 */ 19333 19334MissionStatesFilter.prototype['optInStatusCodes'] = undefined; 19335/** 19336 * The number of records to skip. Zero [0] is the defualt value 19337 * @member {Number} skip 19338 */ 19339 19340MissionStatesFilter.prototype['skip'] = undefined; 19341/** 19342 * Limit the results. The default and maximum is 20 19343 * @member {Number} limit 19344 */ 19345 19346MissionStatesFilter.prototype['limit'] = undefined; 19347/** 19348 * @member {Array.<String>} constraints 19349 */ 19350 19351MissionStatesFilter.prototype['constraints'] = undefined; 19352/** 19353 * @member {Array.<module:model/TagFilter>} tagFilters 19354 */ 19355 19356MissionStatesFilter.prototype['tagFilters'] = undefined; 19357var _default = MissionStatesFilter; 19358exports["default"] = _default; 19359},{"../ApiClient":3,"./RangeQuery":142,"./TagFilter":164}],119:[function(require,module,exports){ 19360"use strict"; 19361 19362Object.defineProperty(exports, "__esModule", { 19363 value: true 19364}); 19365exports["default"] = void 0; 19366 19367var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19368 19369var _MissionStatesFilter = _interopRequireDefault(require("./MissionStatesFilter")); 19370 19371function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19372 19373function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19374 19375function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19376 19377function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19378 19379/** 19380 * The MissionStatesRequest model module. 19381 * @module model/MissionStatesRequest 19382 * @version 1.0.14 19383 */ 19384var MissionStatesRequest = /*#__PURE__*/function () { 19385 /** 19386 * Constructs a new <code>MissionStatesRequest</code>. 19387 * @alias module:model/MissionStatesRequest 19388 * @param missionStatesFilter {module:model/MissionStatesFilter} 19389 */ 19390 function MissionStatesRequest(missionStatesFilter) { 19391 _classCallCheck(this, MissionStatesRequest); 19392 19393 MissionStatesRequest.initialize(this, missionStatesFilter); 19394 } 19395 /** 19396 * Initializes the fields of this object. 19397 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19398 * Only for internal use. 19399 */ 19400 19401 19402 _createClass(MissionStatesRequest, null, [{ 19403 key: "initialize", 19404 value: function initialize(obj, missionStatesFilter) { 19405 obj['missionStatesFilter'] = missionStatesFilter; 19406 } 19407 /** 19408 * Constructs a <code>MissionStatesRequest</code> from a plain JavaScript object, optionally creating a new instance. 19409 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19410 * @param {Object} data The plain JavaScript object bearing properties of interest. 19411 * @param {module:model/MissionStatesRequest} obj Optional instance to populate. 19412 * @return {module:model/MissionStatesRequest} The populated <code>MissionStatesRequest</code> instance. 19413 */ 19414 19415 }, { 19416 key: "constructFromObject", 19417 value: function constructFromObject(data, obj) { 19418 if (data) { 19419 obj = obj || new MissionStatesRequest(); 19420 19421 if (data.hasOwnProperty('missionStatesFilter')) { 19422 obj['missionStatesFilter'] = _MissionStatesFilter["default"].constructFromObject(data['missionStatesFilter']); 19423 } 19424 19425 if (data.hasOwnProperty('includes')) { 19426 obj['includes'] = _ApiClient["default"].convertToType(data['includes'], ['String']); 19427 } 19428 19429 if (data.hasOwnProperty('languageKey')) { 19430 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 19431 } 19432 } 19433 19434 return obj; 19435 } 19436 }]); 19437 19438 return MissionStatesRequest; 19439}(); 19440/** 19441 * @member {module:model/MissionStatesFilter} missionStatesFilter 19442 */ 19443 19444 19445MissionStatesRequest.prototype['missionStatesFilter'] = undefined; 19446/** 19447 * What objects to include from the entity in this response. For achievement the following can be included; description, memberTagsFilter, scheduling, and termsAndConditions, optin-status 19448 * @member {Array.<String>} includes 19449 */ 19450 19451MissionStatesRequest.prototype['includes'] = undefined; 19452/** 19453 * The language codes can be found in the settings/transalations section of the back office 19454 * @member {String} languageKey 19455 */ 19456 19457MissionStatesRequest.prototype['languageKey'] = undefined; 19458var _default = MissionStatesRequest; 19459exports["default"] = _default; 19460},{"../ApiClient":3,"./MissionStatesFilter":118}],120:[function(require,module,exports){ 19461"use strict"; 19462 19463Object.defineProperty(exports, "__esModule", { 19464 value: true 19465}); 19466exports["default"] = void 0; 19467 19468var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19469 19470var _Error = _interopRequireDefault(require("./Error")); 19471 19472var _MissionStates = _interopRequireDefault(require("./MissionStates")); 19473 19474var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 19475 19476function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19477 19478function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19479 19480function _de
19480fineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19481 19482function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19483 19484/** 19485 * The MissionStatesResponse model module. 19486 * @module model/MissionStatesResponse 19487 * @version 1.0.14 19488 */ 19489var MissionStatesResponse = /*#__PURE__*/function () { 19490 /** 19491 * Constructs a new <code>MissionStatesResponse</code>. 19492 * @alias module:model/MissionStatesResponse 19493 */ 19494 function MissionStatesResponse() { 19495 _classCallCheck(this, MissionStatesResponse); 19496 19497 MissionStatesResponse.initialize(this); 19498 } 19499 /** 19500 * Initializes the fields of this object. 19501 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19502 * Only for internal use. 19503 */ 19504 19505 19506 _createClass(MissionStatesResponse, null, [{ 19507 key: "initialize", 19508 value: function initialize(obj) {} 19509 /** 19510 * Constructs a <code>MissionStatesResponse</code> from a plain JavaScript object, optionally creating a new instance. 19511 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19512 * @param {Object} data The plain JavaScript object bearing properties of interest. 19513 * @param {module:model/MissionStatesResponse} obj Optional instance to populate. 19514 * @return {module:model/MissionStatesResponse} The populated <code>MissionStatesResponse</code> instance. 19515 */ 19516 19517 }, { 19518 key: "constructFromObject", 19519 value: function constructFromObject(data, obj) { 19520 if (data) { 19521 obj = obj || new MissionStatesResponse(); 19522 19523 if (data.hasOwnProperty('meta')) { 19524 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 19525 } 19526 19527 if (data.hasOwnProperty('data')) { 19528 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_MissionStates["default"]]); 19529 } 19530 19531 if (data.hasOwnProperty('errors')) { 19532 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 19533 } 19534 } 19535 19536 return obj; 19537 } 19538 }]); 19539 19540 return MissionStatesResponse; 19541}(); 19542/** 19543 * @member {module:model/ResponseMeta} meta 19544 */ 19545 19546 19547MissionStatesResponse.prototype['meta'] = undefined; 19548/** 19549 * @member {Array.<module:model/MissionStates>} data 19550 */ 19551 19552MissionStatesResponse.prototype['data'] = undefined; 19553/** 19554 * @member {Array.<module:model/Error>} errors 19555 */ 19556 19557MissionStatesResponse.prototype['errors'] = undefined; 19558var _default = MissionStatesResponse; 19559exports["default"] = _default; 19560},{"../ApiClient":3,"./Error":74,"./MissionStates":117,"./ResponseMeta":144}],121:[function(require,module,exports){ 19561"use strict"; 19562 19563Object.defineProperty(exports, "__esModule", { 19564 value: true 19565}); 19566exports["default"] = void 0; 19567 19568var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19569 19570function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19571 19572function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19573 19574function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19575 19576function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19577 19578/** 19579 * The ModelCountRequest model module. 19580 * @module model/ModelCountRequest 19581 * @version 1.0.14 19582 */ 19583var ModelCountRequest = /*#__PURE__*/function () { 19584 /** 19585 * Constructs a new <code>ModelCountRequest</code>. 19586 * @alias module:model/ModelCountRequest 19587 */ 19588 function ModelCountRequest() { 19589 _classCallCheck(this, ModelCountRequest); 19590 19591 ModelCountRequest.initialize(this); 19592 } 19593 /** 19594 * Initializes the fields of this object. 19595 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19596 * Only for internal use. 19597 */ 19598 19599 19600 _createClass(ModelCountRequest, null, [{ 19601 key: "initialize", 19602 value: function initialize(obj) {} 19603 /** 19604 * Constructs a <code>ModelCountRequest</code> from a plain JavaScript object, optionally creating a new instance. 19605 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19606 * @param {Object} data The plain JavaScript object bearing properties of interest. 19607 * @param {module:model/ModelCountRequest} obj Optional instance to populate. 19608 * @return {module:model/ModelCountRequest} The populated <code>ModelCountRequest</code> instance. 19609 */ 19610 19611 }, { 19612 key: "constructFromObject", 19613 value: function constructFromObject(data, obj) { 19614 if (data) { 19615 obj = obj || new ModelCountRequest(); 19616 19617 if (data.hasOwnProperty('entityId')) { 19618 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 19619 } 19620 19621 if (data.hasOwnProperty('entityType')) { 19622 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 19623 } 19624 19625 if (data.hasOwnProperty('isReferenceId')) { 19626 obj['isReferenceId'] = _ApiClient["default"].convertToType(data['isReferenceId'], 'Boolean'); 19627 } 19628 } 19629 19630 return obj; 19631 } 19632 }]); 19633 19634 return ModelCountRequest; 19635}(); 19636/** 19637 * The entity id, like the meber reference id or ziqni member id or even a product id 19638 * @member {String} entityId 19639 */ 19640 19641 19642ModelCountRequest.prototype['entityId'] = undefined; 19643/** 19644 * Product etc 19645 * @member {String} entityType 19646 */ 19647 19648ModelCountRequest.prototype['entityType'] = undefined; 19649/** 19650 * If true it is the objects reference ID otherwise it is the ZIQNI id 19651 * @member {Boolean} isReferenceId 19652 */ 19653 19654ModelCountRequest.prototype['isReferenceId'] = undefined; 19655var _default = ModelCountRequest; 19656exports["default"] = _default; 19657},{"../ApiClient":3}],122:[function(require,module,exports){ 19658"use strict"; 19659 19660Object.defineProperty(exports, "__esModule", { 19661 value: true 19662}); 19663exports["default"] = void 0; 19664 19665var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19666 19667function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19668 19669function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19670 19671function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19672 19673function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19674 19675/** 19676 * The ModelCountResponse model module. 19677 * @module model/ModelCountResponse 19678 * @version 1.0.14 19679 */ 19680var ModelCountResponse = /*#__PURE__*/function () { 19681 /** 19682 * Constructs a new <code>ModelCountResponse</code>. 19683 * @alias module:model/ModelCountResponse 19684 */ 19685 function ModelCountResponse() { 19686 _classCallCheck(this, ModelCountResponse); 19687 19688 ModelCountResponse.initialize(this); 19689 } 19690 /** 19691 * Initializes the fields of this object. 19692 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19693 * Only for internal use. 19694 */ 19695 19696 19697 _createClass(ModelCountResponse, null, [{ 19698 key: "initialize", 19699 value: function initialize(obj) {} 19700 /** 19701 * Constructs a <code>ModelCountResponse</code> from a plain JavaScript object, optionally creating a new instance. 19702 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19703 * @param {Object} data The plain JavaScript object bearing properties of interest. 19704 * @param {module:model/ModelCountResponse} obj Optional instance to populate. 19705 * @return {module:model/ModelCountResponse} The populated <code>ModelCountResponse</code> instance. 19706 */ 19707 19708 }, { 19709 key: "constructFromObject", 19710 value: function constructFromObject(data, obj) { 19711 if (data) { 19712 obj = obj || new ModelCountResponse(); 19713 19714 if (data.hasOwnProperty('modelCount')) { 19715 obj['modelCount'] = _ApiClient["default"].convertToType(data['modelCount'], { 19716 'String': 'Number' 19717 }); 19718 } 19719 } 19720 19721 return obj; 19722 } 19723 }]); 19724 19725 return ModelCountResponse; 19726}(); 19727/** 19728 * @member {Object.<String, Number>} modelCount 19729 */ 19730 19731 19732ModelCountResponse.prototype['modelCount'] = undefined; 19733var _default = ModelCountResponse; 19734exports["default"] = _default; 19735},{"../ApiClient":3}],123:[function(require,module,exports){ 19736"use strict"; 19737 19738Object.defineProperty(exports, "__esModule", { 19739 value: true 19740}); 19741exports["default"] = void 0; 19742 19743var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19744 19745function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19746 19747function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19748 19749function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19750 19751function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19752 19753/** 19754 * The ModelDefault model module. 19755 * @module model/ModelDefault 19756 * @version 1.0.14 19757 */ 19758var ModelDefault = /*#__PURE__*/function () { 19759 /** 19760 * Constructs a new <code>ModelDefault</code>. 19761 * @alias module:model/ModelDefault 19762 * @param id {String} Ziqni id of the model 19763 */ 19764 function ModelDefault(id) { 19765 _classCallCheck(this, ModelDefault); 19766 19767 ModelDefault.initialize(this, id); 19768 } 19769 /** 19770 * Initializes the fields of this object. 19771 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19772 * Only for internal use. 19773 */ 19774 19775 19776 _createClass(ModelDefault, null, [{ 19777 key: "initialize", 19778 value: function initialize(obj, id) { 19779 obj['id'] = id; 19780 } 19781 /** 19782 * Constructs a <code>ModelDefault</code> from a plain JavaScript object, optionally creating a new instance. 19783 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19784 * @param {Object} data The plain JavaScript object bearing properties of interest. 19785 * @param {module:model/ModelDefault} obj Optional instance to populate. 19786 * @return {module:model/ModelDefault} The populated <code>ModelDefault</code> instance. 19787 */ 19788 19789 }, { 19790 key: "constructFromObject", 19791 value: function constructFromObject(data, obj) { 19792 if (data) { 19793 obj = obj || new ModelDefault(); 19794 19795 if (data.hasOwnProperty('id')) { 19796 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 19797 } 19798 19799 if (data.hasOwnProperty('spaceName')) { 19800 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 19801 } 19802 19803 if (data.hasOwnProperty('created')) { 19804 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 19805 } 19806 } 19807 19808 return obj; 19809 } 19810 }]); 19811 19812 return ModelDefault; 19813}(); 19814/** 19815 * Ziqni id of the model 19816 * @member {String} id 19817 */ 19818 19819 19820ModelDefault.prototype['id'] = undefined; 19821/** 19822 * This is the space name which is linked to the account 19823 * @member {String} spaceName 19824 */ 19825 19826ModelDefault.prototype['spaceName'] = undefined; 19827/** 19828 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 19829 * @member {Date} created 19830 */ 19831 19832ModelDefault.prototype['created'] = undefined; 19833var _default = ModelDefault; 19834exports["default"] = _default; 19835},{"../ApiClient":3}],124:[function(require,module,exports){ 19836"use strict"; 19837 19838Object.defineProperty(exports, "__esModule", { 19839 value: true 19840}); 19841exports["default"] = void 0; 19842 19843var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19844 19845function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19846 19847function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19848 19849function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19850 19851function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19852 19853/** 19854 * The NumberRange model module. 19855 * @module model/NumberRange 19856 * @version 1.0.14 19857 */ 19858var NumberRange = /*#__PURE__*/function () { 19859 /** 19860 * Constructs a new <code>NumberRange</code>. 19861 * @alias module:model/NumberRange 19862 */ 19863 function NumberRange() { 19864 _classCallCheck(this, NumberRange); 19865 19866 NumberRange.initialize(this); 19867 } 19868 /** 19869 * Initializes the fields of this object. 19870 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19871 * Only for internal use. 19872 */ 19873 19874 19875 _createClass(NumberRange, null, [{ 19876 key: "initialize", 19877 value: function initialize(obj) {} 19878 /** 19879 * Constructs a <code>NumberRange</code> from a plain JavaScript object, optionally creating a new instance. 19880 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19881 * @param {Object} data The plain JavaScript object bearing properties of interest. 19882 * @param {module:model/NumberRange} obj Optional instance to populate. 19883 * @return {module:model/NumberRange} The populated <code>NumberRange</code> instance. 19884 */ 19885 19886 }, { 19887 key: "constructFromObject", 19888 value: function constructFromObject(data, obj) { 19889 if (data) { 19890 obj = obj || new NumberRange(); 19891 19892 if (data.hasOwnProperty('moreThan')) { 19893 obj['moreThan'] = _ApiClient["default"].convertToType(data['moreThan'], 'Number'); 19894 } 19895 19896 if (data.hasOwnProperty('lessThan')) { 19897 obj['lessThan'] = _ApiClient["default"].convertToType(data['lessThan'], 'Number'); 19898 } 19899 } 19900 19901 return obj; 19902 } 19903 }]); 19904 19905 return NumberRange; 19906}(); 19907/** 19908 * @member {Number} moreThan 19909 */ 19910 19911 19912NumberRange.prototype['moreThan'] = undefined; 19913/** 19914 * @member {Number} lessThan 19915 */ 19916 19917NumberRange.prototype['lessThan'] = undefined; 19918var _default = NumberRange; 19919exports["default"] = _default; 19920},{"../ApiClient":3}],125:[function(require,module,exports){ 19921"use strict"; 19922 19923Object.defineProperty(exports, "__esModule", { 19924 value: true 19925}); 19926exports["default"] = void 0; 19927 19928var _ApiClient = _interopRequireDefault(require("../ApiClient")); 19929 19930var _Error = _interopRequireDefault(require("./Error")); 19931 19932var _OptinStatus = _interopRequireDefault(require("./OptinStatus")); 19933 19934var _ResponseMeta = _interopRequireDefault(require("
19934./ResponseMeta")); 19935 19936function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 19937 19938function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 19939 19940function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 19941 19942function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 19943 19944/** 19945 * The OptInResponse model module. 19946 * @module model/OptInResponse 19947 * @version 1.0.14 19948 */ 19949var OptInResponse = /*#__PURE__*/function () { 19950 /** 19951 * Constructs a new <code>OptInResponse</code>. 19952 * @alias module:model/OptInResponse 19953 */ 19954 function OptInResponse() { 19955 _classCallCheck(this, OptInResponse); 19956 19957 OptInResponse.initialize(this); 19958 } 19959 /** 19960 * Initializes the fields of this object. 19961 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 19962 * Only for internal use. 19963 */ 19964 19965 19966 _createClass(OptInResponse, null, [{ 19967 key: "initialize", 19968 value: function initialize(obj) {} 19969 /** 19970 * Constructs a <code>OptInResponse</code> from a plain JavaScript object, optionally creating a new instance. 19971 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 19972 * @param {Object} data The plain JavaScript object bearing properties of interest. 19973 * @param {module:model/OptInResponse} obj Optional instance to populate. 19974 * @return {module:model/OptInResponse} The populated <code>OptInResponse</code> instance. 19975 */ 19976 19977 }, { 19978 key: "constructFromObject", 19979 value: function constructFromObject(data, obj) { 19980 if (data) { 19981 obj = obj || new OptInResponse(); 19982 19983 if (data.hasOwnProperty('meta')) { 19984 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 19985 } 19986 19987 if (data.hasOwnProperty('data')) { 19988 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_OptinStatus["default"]]); 19989 } 19990 19991 if (data.hasOwnProperty('errors')) { 19992 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 19993 } 19994 } 19995 19996 return obj; 19997 } 19998 }]); 19999 20000 return OptInResponse; 20001}(); 20002/** 20003 * @member {module:model/ResponseMeta} meta 20004 */ 20005 20006 20007OptInResponse.prototype['meta'] = undefined; 20008/** 20009 * @member {Array.<module:model/OptinStatus>} data 20010 */ 20011 20012OptInResponse.prototype['data'] = undefined; 20013/** 20014 * @member {Array.<module:model/Error>} errors 20015 */ 20016 20017OptInResponse.prototype['errors'] = undefined; 20018var _default = OptInResponse; 20019exports["default"] = _default; 20020},{"../ApiClient":3,"./Error":74,"./OptinStatus":129,"./ResponseMeta":144}],126:[function(require,module,exports){ 20021"use strict"; 20022 20023Object.defineProperty(exports, "__esModule", { 20024 value: true 20025}); 20026exports["default"] = void 0; 20027 20028var _ApiClient = _interopRequireDefault(require("../ApiClient")); 20029 20030var _OptinStatesFilter = _interopRequireDefault(require("./OptinStatesFilter")); 20031 20032function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 20033 20034function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 20035 20036function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 20037 20038function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 20039 20040/** 20041 * The OptInStatesRequest model module. 20042 * @module model/OptInStatesRequest 20043 * @version 1.0.14 20044 */ 20045var OptInStatesRequest = /*#__PURE__*/function () { 20046 /** 20047 * Constructs a new <code>OptInStatesRequest</code>. 20048 * @alias module:model/OptInStatesRequest 20049 * @param optinStatesFilter {module:model/OptinStatesFilter} 20050 */ 20051 function OptInStatesRequest(optinStatesFilter) { 20052 _classCallCheck(this, OptInStatesRequest); 20053 20054 OptInStatesRequest.initialize(this, optinStatesFilter); 20055 } 20056 /** 20057 * Initializes the fields of this object. 20058 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 20059 * Only for internal use. 20060 */ 20061 20062 20063 _createClass(OptInStatesRequest, null, [{ 20064 key: "initialize", 20065 value: function initialize(obj, optinStatesFilter) { 20066 obj['optinStatesFilter'] = optinStatesFilter; 20067 } 20068 /** 20069 * Constructs a <code>OptInStatesRequest</code> from a plain JavaScript object, optionally creating a new instance. 20070 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 20071 * @param {Object} data The plain JavaScript object bearing properties of interest. 20072 * @param {module:model/OptInStatesRequest} obj Optional instance to populate. 20073 * @return {module:model/OptInStatesRequest} The populated <code>OptInStatesRequest</code> instance. 20074 */ 20075 20076 }, { 20077 key: "constructFromObject", 20078 value: function constructFromObject(data, obj) { 20079 if (data) { 20080 obj = obj || new OptInStatesRequest(); 20081 20082 if (data.hasOwnProperty('optinStatesFilter')) { 20083 obj['optinStatesFilter'] = _OptinStatesFilter["default"].constructFromObject(data['optinStatesFilter']); 20084 } 20085 } 20086 20087 return obj; 20088 } 20089 }]); 20090 20091 return OptInStatesRequest; 20092}(); 20093/** 20094 * @member {module:model/OptinStatesFilter} optinStatesFilter 20095 */ 20096 20097 20098OptInStatesRequest.prototype['optinStatesFilter'] = undefined; 20099var _default = OptInStatesRequest; 20100exports["default"] = _default; 20101},{"../ApiClient":3,"./OptinStatesFilter":128}],127:[function(require,module,exports){ 20102"use strict"; 20103 20104Object.defineProperty(exports, "__esModule", { 20105 value: true 20106}); 20107exports["default"] = void 0; 20108 20109var _ApiClient = _interopRequireDefault(require("../ApiClient")); 20110 20111function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 20112 20113function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 20114 20115function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 20116 20117function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 20118 20119function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 20120 20121/** 20122* Enum class OptinAction. 20123* @enum {} 20124* @readonly 20125*/ 20126var OptinAction = /*#__PURE__*/function () { 20127 function OptinAction() { 20128 _classCallCheck(this, OptinAction); 20129 20130 _defineProperty(this, "join", "join"); 20131 20132 _defineProperty(this, "leave", "leave"); 20133 } 20134 20135 _createClass(OptinAction, null, [{ 20136 key: "constructFromObject", 20137 value: 20138 /** 20139 * Returns a <code>OptinAction</code> enum value from a Javascript object name. 20140 * @param {Object}
20140 data The plain JavaScript object containing the name of the enum value. 20141 * @return {module:model/OptinAction} The enum <code>OptinAction</code> value. 20142 */ 20143 function constructFromObject(object) { 20144 return object; 20145 } 20146 }]); 20147 20148 return OptinAction; 20149}(); 20150 20151exports["default"] = OptinAction; 20152},{"../ApiClient":3}],128:[function(require,module,exports){ 20153"use strict"; 20154 20155Object.defineProperty(exports, "__esModule", { 20156 value: true 20157}); 20158exports["default"] = void 0; 20159 20160var _ApiClient = _interopRequireDefault(require("../ApiClient")); 20161 20162var _EntityType = _interopRequireDefault(require("./EntityType")); 20163 20164var _RangeQuery = _interopRequireDefault(require("./RangeQuery")); 20165 20166function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 20167 20168function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 20169 20170function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 20171 20172function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 20173 20174/** 20175 * The OptinStatesFilter model module. 20176 * @module model/OptinStatesFilter 20177 * @version 1.0.14 20178 */ 20179var OptinStatesFilter = /*#__PURE__*/function () { 20180 /** 20181 * Constructs a new <code>OptinStatesFilter</code>. 20182 * @alias module:model/OptinStatesFilter 20183 */ 20184 function OptinStatesFilter() { 20185 _classCallCheck(this, OptinStatesFilter); 20186 20187 OptinStatesFilter.initialize(this); 20188 } 20189 /** 20190 * Initializes the fields of this object. 20191 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 20192 * Only for internal use. 20193 */ 20194 20195 20196 _createClass(OptinStatesFilter, null, [{ 20197 key: "initialize", 20198 value: function initialize(obj) {} 20199 /** 20200 * Constructs a <code>OptinStatesFilter</code> from a plain JavaScript object, optionally creating a new instance. 20201 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 20202 * @param {Object} data The plain JavaScript object bearing properties of interest. 20203 * @param {module:model/OptinStatesFilter} obj Optional instance to populate. 20204 * @return {module:model/OptinStatesFilter} The populated <code>OptinStatesFilter</code> instance. 20205 */ 20206 20207 }, { 20208 key: "constructFromObject", 20209 value: function constructFromObject(data, obj) { 20210 if (data) { 20211 obj = obj || new OptinStatesFilter(); 20212 20213 if (data.hasOwnProperty('entityTypes')) { 20214 obj['entityTypes'] = _ApiClient["default"].convertToType(data['entityTypes'], [_EntityType["default"]]); 20215 } 20216 20217 if (data.hasOwnProperty('ids')) { 20218 obj['ids'] = _ApiClient["default"].convertToType(data['ids'], ['String']); 20219 } 20220 20221 if (data.hasOwnProperty('statusCodes')) { 20222 obj['statusCodes'] = _RangeQuery["default"].constructFromObject(data['statusCodes']); 20223 } 20224 20225 if (data.hasOwnProperty('optInStatusCodes')) { 20226 obj['optInStatusCodes'] = _RangeQuery["default"].constructFromObject(data['optInStatusCodes']); 20227 } 20228 20229 if (data.hasOwnProperty('skip')) { 20230 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 20231 } 20232 20233 if (data.hasOwnProperty('limit')) { 20234 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 20235 } 20236 } 20237 20238 return obj; 20239 } 20240 }]); 20241 20242 return OptinStatesFilter; 20243}(); 20244/** 20245 * Optionally provide entity types to filer by. Valid options are Achievement, Competition, or Contest 20246 * @member {Array.<module:model/EntityType>} entityTypes 20247 */ 20248 20249 20250OptinStatesFilter.prototype['entityTypes'] = undefined; 20251/** 20252 * Optionally provide a list of identifiers for either Achievements, Competitions, or Contest 20253 * @member {Array.<String>} ids 20254 */ 20255 20256OptinStatesFilter.prototype['ids'] = undefined; 20257/** 20258 * @member {module:model/RangeQuery} statusCodes 20259 */ 20260 20261OptinStatesFilter.prototype['statusCodes'] = undefined; 20262/** 20263 * @member {module:model/RangeQuery} optInStatusCodes 20264 */ 20265 20266OptinStatesFilter.prototype['optInStatusCodes'] = undefined; 20267/** 20268 * The number of records to skip. Zero [0] is the defualt value 20269 * @member {Number} skip 20270 */ 20271 20272OptinStatesFilter.prototype['skip'] = undefined; 20273/** 20274 * Limit the results. The default is 20 if left empty 20275 * @member {Number} limit 20276 */ 20277 20278OptinStatesFilter.prototype['limit'] = undefined; 20279var _default = OptinStatesFilter; 20280exports["default"] = _default; 20281},{"../ApiClient":3,"./EntityType":73,"./RangeQuery":142}],129:[function(require,module,exports){ 20282"use strict"; 20283 20284Object.defineProperty(exports, "__esModule", { 20285 value: true 20286}); 20287exports["default"] = void 0; 20288 20289var _ApiClient = _interopRequireDefault(require("../ApiClient")); 20290 20291function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 20292 20293function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 20294 20295function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 20296 20297function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 20298 20299/** 20300 * The OptinStatus model module. 20301 * @module model/OptinStatus 20302 * @version 1.0.14 20303 */ 20304var OptinStatus = /*#__PURE__*/function () { 20305 /** 20306 * Constructs a new <code>OptinStatus</code>. 20307 * @alias module:model/OptinStatus 20308 * @param entityType {String} The type of this entity like Achievement, Competition, or Contest
20309 * @param entityId {String} The unique identifier of this entity 20310 * @param statusCode {Number} Processing = 0, NotEntered = 5, Entering = 10, Entrant = 15, Preparing = 20, Running = 25, Completing = 30, Completed = 35 20311 * @param status {String} Processing = 0, NotEntered = 5, Entering = 10, Entrant = 15,\\ \\ Preparing = 20, Running = 25, Completing = 30, Completed = 35 20312 * @param points {Number} The current points total 20313 */ 20314 function OptinStatus(entityType, entityId, statusCode, status, points) { 20315 _classCallCheck(this, OptinStatus); 20316 20317 OptinStatus.initialize(this, entityType, entityId, statusCode, status, points); 20318 } 20319 /** 20320 * Initializes the fields of this object. 20321 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 20322 * Only for internal use. 20323 */ 20324 20325 20326 _createClass(OptinStatus, null, [{ 20327 key: "initialize", 20328 value: function initialize(obj, entityType, entityId, statusCode, status, points) { 20329 obj['entityType'] = entityType; 20330 obj['entityId'] = entityId; 20331 obj['statusCode'] = statusCode; 20332 obj['status'] = status; 20333 obj['points'] = points; 20334 } 20335 /** 20336 * Constructs a <code>OptinStatus</code> from a plain JavaScript object, optionally creating a new instance. 20337 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 20338 * @param {Object} data The plain JavaScript object bearing properties of interest. 20339 * @param {module:model/OptinStatus} obj Optional instance to populate. 20340 * @return {module:model/OptinStatus} The populated <code>OptinStatus</code> instance. 20341 */ 20342 20343 }, { 20344 key: "constructFromObject", 20345 value: function constructFromObject(data, obj) { 20346 if (data) { 20347 obj = obj || new OptinStatus(); 20348 20349 if (data.hasOwnProperty('entityType')) { 20350 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 20351 } 20352 20353 if (data.hasOwnProperty('entityId')) { 20354 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 20355 } 20356 20357 if (data.hasOwnProperty('statusCode')) { 20358 obj['statusCode'] = _ApiClient["default"].convertToType(data['statusCode'], 'Number'); 20359 } 20360 20361 if (data.hasOwnProperty('status')) { 20362 obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String'); 20363 } 20364 20365 if (data.hasOwnProperty('percentageComplete')) { 20366 obj['percentageComplete'] = _ApiClient["default"].convertToType(data['percentageComplete'], 'Number'); 20367 } 20368 20369 if (data.hasOwnProperty('points')) { 20370 obj['points'] = _ApiClient["default"].convertToType(data['points'], 'Number'); 20371 } 20372 20373 if (data.hasOwnProperty('position')) { 20374 obj['position'] = _ApiClient["default"].convertToType(data['position'], 'Number'); 20375 } 20376 } 20377 20378 return obj; 20379 } 20380 }]); 20381 20382 return OptinStatus; 20383}(); 20384/** 20385 * The type of this entity like Achievement, Competition, or Contest 20386 * @member {String} entityType 20387 */ 20388 20389 20390OptinStatus.prototype['entityType'] = undefined; 20391/** 20392 * The unique identifier of this entity 20393 * @member {String} entityId 20394 */ 20395 20396OptinStatus.prototype['entityId'] = undefined; 20397/** 20398 * Processing = 0, NotEntered = 5, Entering = 10, Entrant = 15, Preparing = 20, Running = 25, Completing = 30, Completed = 35 20399 * @member {Number} statusCode 20400 */ 20401 20402OptinStatus.prototype['statusCode'] = undefined; 20403/** 20404 * Processing = 0, NotEntered = 5, Entering = 10, Entrant = 15,\\ \\ Preparing = 20, Running = 25, Completing = 30, Completed = 35 20405 * @member {String} status 20406 */ 20407 20408OptinStatus.prototype['status'] = undefined; 20409/** 20410 * What percentage has been completed so far, this is a number between 0 and 100 20411 * @member {Number} percentageComplete 20412 */ 20413 20414OptinStatus.prototype['percentageComplete'] = undefined; 20415/** 20416 * The current points total 20417 * @member {Number} points 20418 */ 20419 20420OptinStatus.prototype['points'] = undefined; 20421/** 20422 * The current position of the member 20423 * @member {Number} position 20424 */ 20425 20426OptinStatus.prototype['position'] = undefined; 20427var _default = OptinStatus; 20428exports["default"] = _default; 20429},{"../ApiClient":3}],130:[function(require,module,exports){ 20430"use strict"; 20431 20432Object.defineProperty(exports, "__esModule", { 20433 value: true 20434}); 20435exports["default"] = void 0; 20436 20437var _ApiClient = _interopRequireDefault(require("../ApiClient")); 20438 20439function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 20440 20441function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 20442 20443function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 20444 20445function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 20446 20447/** 20448 * The OptionalModelFields model module. 20449 * @module model/OptionalModelFields 20450 * @version 1.0.14 20451 */ 20452var OptionalModelFields = /*#__PURE__*/function () { 20453 /** 20454 * Constructs a new <code>OptionalModelFields</code>. 20455 * @alias module:model/OptionalModelFields 20456 */ 20457 function OptionalModelFields() { 20458 _classCallCheck(this, OptionalModelFields); 20459 20460 OptionalModelFields.initialize(this); 20461 } 20462 /** 20463 * Initializes the fields of this object. 20464 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 20465 * Only for internal use. 20466 */ 20467 20468 20469 _createClass(OptionalModelFields, null, [{ 20470 key: "initialize", 20471 value: function initialize(obj) {} 20472 /** 20473 * Constructs a <code>OptionalModelFields</code> from a plain JavaScript object, optionally creating a new instance. 20474 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 20475 * @param {Object} data The plain JavaScript object bearing properties of interest. 20476 * @param {module:model/OptionalModelFields} obj Optional instance to populate. 20477 * @return {module:model/OptionalModelFields} The populated <code>OptionalModelFields</code> instance. 20478 */ 20479 20480 }, { 20481 key: "constructFromObject", 20482 value: function constructFromObject(data, obj) { 20483 if (data) { 20484 obj = obj || new OptionalModelFields(); 20485 20486 if (data.hasOwnProperty('customFields')) { 20487 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 20488 'String': Object 20489 }); 20490 } 20491 20492 if (data.hasOwnProperty('tags')) { 20493 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 20494 } 20495 20496 if (data.hasOwnProperty('metadata')) { 20497 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 20498 'String': 'String' 20499 }); 20500 } 20501 } 20502 20503 return obj; 20504 } 20505 }]); 20506 20507 return OptionalModelFields; 20508}(); 20509/** 20510 * @member {Object.<String, Object>} customFields 20511 */ 20512 20513 20514OptionalModelFields.prototype['customFields'] = undefined; 20515/** 20516 * A list of id's used to tag models 20517 * @member {Array.<String>} tags 20518 */ 20519 20520OptionalModelFields.prototype['tags'] = undefined; 20521/** 20522 * @member {Object.<String, String>} metadata 20523 */ 20524 20525OptionalModelFields.prototype['metadata'] = undefined; 20526var _default = OptionalModelFields; 20527exports["default"] = _default; 20528},{"../ApiClient":3}],131:[function(require,module,exports){ 20529"use strict"; 20530 20531Object.defineProperty(exports, "__esModule", { 20532 value: true 20533}); 20534exports["default"] = void 0; 20535 20536var _ApiClient = _interopRequireDefault(require("../ApiClient")); 20537 20538var _ConditionalOperator = _interopRequireDefault(require("./ConditionalOperator")); 20539 20540function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 20541 20542function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 20543 20544function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 20545 20546function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 20547 20548/** 20549 * The PointsStrategy model module. 20550 * @module model/PointsStrategy 20551 * @version 1.0.14 20552 */ 20553var PointsStrategy = /*#__PURE__*/function () { 20554 /** 20555 * Constructs a new <code>PointsStrategy</code>. 20556 * The target points to achieve 20557 * @alias module:model/PointsStrategy 20558 * @param operator {module:model/ConditionalOperator} 20559 * @param context {String} The context this strategy is bound to, like: achievement 20560 * @param action {String} The action this strategy is bound to, like: achievement.points 20561 */ 20562 function PointsStrategy(operator, context, action) { 20563 _classCallCheck(this, PointsStrategy); 20564 20565 PointsStrategy.initialize(this, operator, context, action); 20566 } 20567 /** 20568 * Initializes the fields of this object. 20569 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 20570 * Only for internal use. 20571 */ 20572 20573 20574 _createClass(PointsStrategy, null, [{ 20575 key: "initialize", 20576 value: function initialize(obj, operator, context, action) { 20577 obj['operator'] = operator; 20578 obj['context'] = context; 20579 obj['action'] = action; 20580 } 20581 /** 20582 * Constructs a <code>PointsStrategy</code> from a plain JavaScript object, optionally creating a new instance. 20583 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 20584 * @param {Object} data The plain JavaScript object bearing properties of interest. 20585 * @param {module:model/PointsStrategy} obj Optional instance to populate. 20586 * @return {module:model/PointsStrategy} The populated <code>PointsStrategy</code> instance. 20587 */ 20588 20589 }, { 20590 key: "constructFromObject", 20591 value: function constructFromObject(data, obj) { 20592 if (data) { 20593 obj = obj || new PointsStrategy(); 20594 20595 if (data.hasOwnProperty('operator')) { 20596 obj['operator'] = _ConditionalOperator["default"].constructFromObject(data['operator']); 20597 } 20598 20599 if (data.hasOwnProperty('pointsValueUpper')) { 20600 obj['pointsValueUpper'] = _ApiClient["default"].convertToType(data['pointsValueUpper'], 'Number'); 20601 } 20602 20603 if (data.hasOwnProperty('pointsValue')) { 20604 obj['pointsValue'] = _ApiClient["default"].convertToType(data['pointsValue'], 'Number'); 20605 } 20606 20607 if (data.hasOwnProperty('context')) { 20608 obj['context'] = _ApiClient["default"].convertToType(data['context'], 'String'); 20609 } 20610 20611 if (data.hasOwnProperty('action')) { 20612 obj['action'] = _ApiClient["default"].convertToType(data['action'], 'String'); 20613 } 20614 } 20615 20616 return obj; 20617 } 20618 }]); 20619 20620 return PointsStrategy; 20621}(); 20622/** 20623 * @member {module:model/ConditionalOperator} operator
20624 */ 20625 20626 20627PointsStrategy.prototype['operator'] = undefined; 20628/** 20629 * The upper points to achieve. This is only used where secondary number are required like, between, or average between 20630 * @member {Number} pointsValueUpper 20631 */ 20632 20633PointsStrategy.prototype['pointsValueUpper'] = undefined; 20634/** 20635 * The points to achieve 20636 * @member {Number} pointsValue 20637 */ 20638 20639PointsStrategy.prototype['pointsValue'] = undefined; 20640/** 20641 * The context this strategy is bound to, like: achievement 20642 * @member {String} context 20643 */ 20644 20645PointsStrategy.prototype['context'] = undefined; 20646/** 20647 * The action this strategy is bound to, like: achievement.points 20648 * @member {String} action 20649 */ 20650 20651PointsStrategy.prototype['action'] = undefined; 20652var _default = PointsStrategy; 20653exports["default"] = _default; 20654},{"../ApiClient":3,"./ConditionalOperator":49}],132:[function(require,module,exports){ 20655"use strict"; 20656 20657Object.defineProperty(exports, "__esModule", { 20658 value: true 20659}); 20660exports["default"] = void 0; 20661 20662var _ApiClient = _interopRequireDefault(require("../ApiClient")); 20663 20664var _ActionTypeAdjustmentFactor = _interopRequireDefault(require("./ActionTypeAdjustmentFactor")); 20665 20666var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 20667 20668var _ProductAllOf = _interopRequireDefault(require("./ProductAllOf")); 20669 20670function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 20671 20672function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 20673 20674function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 20675 20676function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 20677 20678/** 20679 * The Product model module. 20680 * @module model/Product 20681 * @version 1.0.14 20682 */ 20683var Product = /*#__PURE__*/function () { 20684 /** 20685 * Constructs a new <code>Product</code>. 20686 * @alias module:model/Product 20687 * @implements module:model/ProductAllOf 20688 * @implements module:model/OptionalModelFields 20689 * @param id {String} A unique system generated identifier 20690 * @param spaceName {String} This is the space name which is linked to the account 20691 * @param created {Date} ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 20692 */ 20693 function Product(id, spaceName, created) { 20694 _classCallCheck(this, Product); 20695 20696 _ProductAllOf["default"].initialize(this, id, spaceName, created); 20697 20698 _OptionalModelFields["default"].initialize(this); 20699 20700 Product.initialize(this, id, spaceName, created); 20701 } 20702 /** 20703 * Initializes the fields of this object. 20704 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 20705 * Only for internal use. 20706 */ 20707 20708 20709 _createClass(Product, null, [{ 20710 key: "initialize", 20711 value: function initialize(obj, id, spaceName, created) { 20712 obj['id'] = id; 20713 obj['spaceName'] = spaceName; 20714 obj['created'] = created; 20715 } 20716 /** 20717 * Constructs a <code>Product</code> from a plain JavaScript object, optionally creating a new instance. 20718 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 20719 * @param {Object} data The plain JavaScript object bearing properties of interest. 20720 * @param {module:model/Product} obj Optional instance to populate. 20721 * @return {module:model/Product} The populated <code>Product</code> instance. 20722 */ 20723 20724 }, { 20725 key: "constructFromObject", 20726 value: function constructFromObject(data, obj) { 20727 if (data) { 20728 obj = obj || new Product(); 20729 20730 _ProductAllOf["default"].constructFromObject(data, obj); 20731 20732 _OptionalModelFields["default"].constructFromObject(data, obj); 20733 20734 if (data.hasOwnProperty('id')) { 20735 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 20736 } 20737 20738 if (data.hasOwnProperty('spaceName')) { 20739 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 20740 } 20741 20742 if (data.hasOwnProperty('created')) { 20743 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 20744 } 20745 20746 if (data.hasOwnProperty('name')) { 20747 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 20748 } 20749 20750 if (data.hasOwnProperty('description')) { 20751 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 20752 } 20753 20754 if (data.hasOwnProperty('adjustmentFactor')) { 20755 obj['adjustmentFactor'] = _ApiClient["default"].convertToType(data['adjustmentFactor'], 'Number'); 20756 } 20757 20758 if (data.hasOwnProperty('productRefId')) { 20759 obj['productRefId'] = _ApiClient["default"].convertToType(data['productRefId'], 'String'); 20760 } 20761 20762 if (data.hasOwnProperty('productType')) { 20763 obj['productType'] = _ApiClient["default"].convertToType(data['productType'], 'String'); 20764 } 20765 20766 if (data.hasOwnProperty('iconLink')) { 20767 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 20768 } 20769 20770 if (data.hasOwnProperty('bannerLink')) { 20771 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 20772 } 20773 20774 if (data.hasOwnProperty('bannerLowResolutionLink')) { 20775 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 20776 } 20777 20778 if (data.hasOwnProperty('bannerHighResolutionLink')) { 20779 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 20780 } 20781 20782 if (data.hasOwnProperty('actionTypeAdjustmentFactors')) { 20783 obj['actionTypeAdjustmentFactors'] = _ApiClient["default"].convertToType(data['actionTypeAdjustmentFactors'], [_ActionTypeAdjustmentFactor["default"]]); 20784 } 20785 20786 if (data.hasOwnProperty('customFields')) { 20787 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 20788 'String': Object 20789 }); 20790 } 20791 20792 if (data.hasOwnProperty('tags')) { 20793 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 20794 } 20795 20796 if (data.hasOwnProperty('metadata')) { 20797 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 20798 'String': 'String' 20799 }); 20800 } 20801 } 20802 20803 return obj; 20804 } 20805 }]); 20806 20807 return Product; 20808}(); 20809/** 20810 * A unique system generated identifier 20811 * @member {String} id 20812 */ 20813 20814 20815Product.prototype['id'] = undefined; 20816/** 20817 * This is the space name which is linked to the account 20818 * @member {String} spaceName 20819 */ 20820 20821Product.prototype['spaceName'] = undefined; 20822/** 20823 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 20824 * @member {Date} created 20825 */ 20826 20827Product.prototype['created'] = undefined; 20828/** 20829 * The name of the product 20830 * @member {String} name 20831 */ 20832 20833Product.prototype['name'] = undefined; 20834/** 20835 * The description of the product for your reference 20836 * @member {String} description 20837 */ 20838 20839Product.prototype['description'] = undefined; 20840/** 20841 * The multiplier to apply to source values received for this product events 20842 * @member {Number} adjustmentFactor 20843 */ 20844 20845Product.prototype['adjustmentFactor'] = undefined; 20846/** 20847 * The reference to this product in your system. The reference identifier can not be changed after the product has been created 20848 * @member {String} productRefId 20849 */ 20850 20851Product.prototype['productRefId'] = undefined; 20852/** 20853 * The type to this product in your system. 20854 * @member {String} productType 20855 */ 20856 20857Product.prototype['productType'] = undefined; 20858/** 20859 * Link to the icon 20860 * @member {String} iconLink 20861 */ 20862 20863Product.prototype['iconLink'] = undefined; 20864/** 20865 * Link to the banner 20866 * @member {String} bannerLink 20867 */ 20868 20869Product.prototype['bannerLink'] = undefined; 20870/** 20871 * Link to the bannerLowResolution 20872 * @member {String} bannerLowResolutionLink 20873 */ 20874 20875Product.prototype['bannerLowResolutionLink'] = undefined; 20876/** 20877 * Link to the bannerHighResolution 20878 * @member {String} bannerHighResolutionLink 20879 */ 20880 20881Product.prototype['bannerHighResolutionLink'] = undefined; 20882/** 20883 * @member {Array.<module:model/ActionTypeAdjustmentFactor>} actionTypeAdjustmentFactors 20884 */ 20885 20886Product.prototype['actionTypeAdjustmentFactors'] = undefined; 20887/** 20888 * @member {Object.<String, Object>} customFields 20889 */ 20890 20891Product.prototype['customFields'] = undefined; 20892/** 20893 * A list of id's used to tag models 20894 * @member {Array.<String>} tags 20895 */ 20896 20897Product.prototype['tags'] = undefined; 20898/** 20899 * @member {Object.<String, String>} metadata 20900 */ 20901 20902Product.prototype['metadata'] = undefined; // Implement ProductAllOf interface: 20903 20904/** 20905 * A unique system generated identifier 20906 * @member {String} id 20907 */ 20908 20909_ProductAllOf["default"].prototype['id'] = undefined; 20910/** 20911 * This is the space name which is linked to the account 20912 * @member {String} spaceName 20913 */ 20914 20915_ProductAllOf["default"].prototype['spaceName'] = undefined; 20916/** 20917 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 20918 * @member {Date} created 20919 */ 20920 20921_ProductAllOf["default"].prototype['created'] = undefined; 20922/** 20923 * The name of the product 20924 * @member {String} name 20925 */ 20926 20927_ProductAllOf["default"].prototype['name'] = undefined; 20928/** 20929 * The description of the product for your reference 20930 * @member {String} description 20931 */ 20932 20933_ProductAllOf["default"].prototype['description'] = undefined; 20934/** 20935 * The multiplier to apply to source values received for this product events 20936 * @member {Number} adjustmentFactor 20937 */ 20938 20939_ProductAllOf["default"].prototype['adjustmentFactor'] = undefined; 20940/** 20941 * The reference to this product in your system. The reference identifier can not be changed after the product has been created 20942 * @member {String} productRefId 20943 */ 20944 20945_ProductAllOf["default"].prototype['productRefId'] = undefined; 20946/** 20947 * The type to this product in your system. 20948 * @member {String} productType 20949 */ 20950 20951_ProductAllOf["default"].prototype['productType'] = undefined; 20952/** 20953 * Link to the icon 20954 * @member {String} iconLink 20955 */ 20956 20957_ProductAllOf["default"].prototype['iconLink'] = undefined; 20958/** 20959 * Link to the banner 20960 * @member {String} bannerLink 20961 */ 20962 20963_ProductAllOf["default"].prototype['bannerLink'] = undefined; 20964/** 20965 * Link to the bannerLowResolution 20966 * @member {String} bannerLowResolutionLink 20967 */ 20968 20969_ProductAllOf["default"].prototype['bannerLowResolutionLink'] = undefined; 20970/** 20971 * Link to the bannerHighResolution 20972 * @member {String} bannerHighResolutionLink 20973 */ 20974 20975_ProductAllOf["default"].prototype['bannerHighResolutionLink'] = undefined; 20976/** 20977 * @member {Array.<module:model/ActionTypeAdjustmentFactor>} actionTypeAdjustmentFactors 20978 */ 20979 20980_ProductAllOf["default"].prototype['actionTypeAdjustmentFactors'] = undefined; // Implement OptionalModelFields interface: 20981 20982/** 20983 * @member {Object.<String, Object>} customFields 20984 */ 20985 20986_OptionalModelFields["default"].prototype['customFields'] = undefined; 20987/** 20988 * A list of id's used to tag models 20989 * @member {Array.<String>} tags 20990 */ 20991 20992_OptionalModelFields["default"].prototype['tags'] = undefined; 20993/** 20994 * @member {Object.<String, String>} metadata 20995 */ 20996 20997_OptionalModelFields["default"].prototype['metadata'] = undefined; 20998var _default = Product; 20999exports["default"] = _default; 21000},{"../ApiClient":3,"./ActionTypeAdjustmentFactor":31,"./OptionalModelFields":130,"./ProductAllOf":133}],133:[function(require,module,exports){ 21001"use strict"; 21002 21003Object.defineProperty(exports, "__esModule", { 21004 value: true 21005}); 21006exports["default"] = void 0; 21007 21008var _ApiClient = _interopRequireDefault(require("../ApiClient")); 21009 21010var _ActionTypeAdjustmentFactor = _interopRequireDefault(require("./ActionTypeAdjustmentFactor")); 21011 21012function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 21013 21014function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 21015 21016function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 21017 21018function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 21019 21020/** 21021 * The ProductAllOf model module. 21022 * @module model/ProductAllOf 21023 * @version 1.0.14 21024 */ 21025var ProductAllOf = /*#__PURE__*/function () { 21026 /** 21027 * Constructs a new <code>ProductAllOf</code>. 21028 * @alias module:model/ProductAllOf 21029 * @param id {String} A unique system generated identifier 21030 * @param spaceName {String} This is the space name which is linked to the account 21031 * @param created {Date} ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 21032 */ 21033 function ProductAllOf(id, spaceName, created) { 21034 _classCallCheck(this, ProductAllOf); 21035 21036 ProductAllOf.initialize(this, id, spaceName, created); 21037 } 21038 /** 21039 * Initializes the fields of this object. 21040 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 21041 * Only for internal use. 21042 */ 21043 21044 21045 _createClass(ProductAllOf, null, [{ 21046 key: "initialize", 21047 value: function initialize(obj, id, spaceName, created) { 21048 obj['id'] = id; 21049 obj['spaceName'] = spaceName; 21050 obj['created'] = created; 21051 } 21052 /** 21053 * Constructs a <code>ProductAllOf</code> from a plain JavaScript object, optionally creating a new instance. 21054 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 21055 * @param {Object} data The plain JavaScript object bearing properties of interest. 21056 * @param {module:model/ProductAllOf} obj Optional instance to populate. 21057 * @return {module:model/ProductAllOf} The populated <code>ProductAllOf</code> instance. 21058 */ 21059 21060 }, { 21061 key: "constructFromObject", 21062 value: function constructFromObject(data, obj) { 21063 if (data) { 21064 obj = obj || new ProductAllOf(); 21065 21066 if (data.hasOwnProperty('id')) { 21067 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 21068 } 21069 21070 if (data.hasOwnProperty('spaceName')) { 21071 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 21072 } 21073 21074 if (data.hasOwnProperty('created')) { 21075 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 21076 } 21077 21078 if (data.hasOwnProperty('name')) { 21079 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 21080 } 21081 21082 if (data.hasOwnProperty('description')) { 21083 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 21084 } 21085 21086 if (data.hasOwnProperty('adjustmentFactor')) { 21087 obj['adjustmentFactor'] = _ApiClient["default"].convertToType(data['adjustmentFactor'], 'Number'); 21088 } 21089 21090 if (data.hasOwnProperty('productRefId')) { 21091 obj['productRefId'] = _ApiClient["default"].convertToType(data['productRefId'], 'String'); 21092 } 21093 21094 if (data.hasOwnProperty('productType')) { 21095 obj['productType'] = _ApiClient["default"].convertToType(data['productType'], 'String'); 21096 } 21097 21098 if (data.hasOwnProperty('iconLink')) { 21099 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 21100 } 21101 21102 if (data.hasOwnProperty('bannerLink')) { 21103 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 21104 } 21105 21106 if (data.hasOwnProperty('bannerLowResolutionLink')) { 21107 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data
21107['bannerLowResolutionLink'], 'String'); 21108 } 21109 21110 if (data.hasOwnProperty('bannerHighResolutionLink')) { 21111 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 21112 } 21113 21114 if (data.hasOwnProperty('actionTypeAdjustmentFactors')) { 21115 obj['actionTypeAdjustmentFactors'] = _ApiClient["default"].convertToType(data['actionTypeAdjustmentFactors'], [_ActionTypeAdjustmentFactor["default"]]); 21116 } 21117 } 21118 21119 return obj; 21120 } 21121 }]); 21122 21123 return ProductAllOf; 21124}(); 21125/** 21126 * A unique system generated identifier 21127 * @member {String} id 21128 */ 21129 21130 21131ProductAllOf.prototype['id'] = undefined; 21132/** 21133 * This is the space name which is linked to the account 21134 * @member {String} spaceName 21135 */ 21136 21137ProductAllOf.prototype['spaceName'] = undefined; 21138/** 21139 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 21140 * @member {Date} created 21141 */ 21142 21143ProductAllOf.prototype['created'] = undefined; 21144/** 21145 * The name of the product 21146 * @member {String} name 21147 */ 21148 21149ProductAllOf.prototype['name'] = undefined; 21150/** 21151 * The description of the product for your reference 21152 * @member {String} description 21153 */ 21154 21155ProductAllOf.prototype['description'] = undefined; 21156/** 21157 * The multiplier to apply to source values received for this product events 21158 * @member {Number} adjustmentFactor 21159 */ 21160 21161ProductAllOf.prototype['adjustmentFactor'] = undefined; 21162/** 21163 * The reference to this product in your system. The reference identifier can not be changed after the product has been created 21164 * @member {String} productRefId 21165 */ 21166 21167ProductAllOf.prototype['productRefId'] = undefined; 21168/** 21169 * The type to this product in your system. 21170 * @member {String} productType 21171 */ 21172 21173ProductAllOf.prototype['productType'] = undefined; 21174/** 21175 * Link to the icon 21176 * @member {String} iconLink 21177 */ 21178 21179ProductAllOf.prototype['iconLink'] = undefined; 21180/** 21181 * Link to the banner 21182 * @member {String} bannerLink 21183 */ 21184 21185ProductAllOf.prototype['bannerLink'] = undefined; 21186/** 21187 * Link to the bannerLowResolution 21188 * @member {String} bannerLowResolutionLink 21189 */ 21190 21191ProductAllOf.prototype['bannerLowResolutionLink'] = undefined; 21192/** 21193 * Link to the bannerHighResolution 21194 * @member {String} bannerHighResolutionLink 21195 */ 21196 21197ProductAllOf.prototype['bannerHighResolutionLink'] = undefined; 21198/** 21199 * @member {Array.<module:model/ActionTypeAdjustmentFactor>} actionTypeAdjustmentFactors 21200 */ 21201 21202ProductAllOf.prototype['actionTypeAdjustmentFactors'] = undefined; 21203var _default = ProductAllOf; 21204exports["default"] = _default; 21205},{"../ApiClient":3,"./ActionTypeAdjustmentFactor":31}],134:[function(require,module,exports){ 21206"use strict"; 21207 21208Object.defineProperty(exports, "__esModule", { 21209 value: true 21210}); 21211exports["default"] = void 0; 21212 21213var _ApiClient = _interopRequireDefault(require("../ApiClient")); 21214 21215var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 21216 21217function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 21218 21219function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 21220 21221function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 21222 21223function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 21224 21225/** 21226 * The ProductFilter model module. 21227 * @module model/ProductFilter 21228 * @version 1.0.14 21229 */ 21230var ProductFilter = /*#__PURE__*/function () { 21231 /** 21232 * Constructs a new <code>ProductFilter</code>. 21233 * @alias module:model/ProductFilter 21234 */ 21235 function ProductFilter() { 21236 _classCallCheck(this, ProductFilter); 21237 21238 ProductFilter.initialize(this); 21239 } 21240 /** 21241 * Initializes the fields of this object. 21242 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 21243 * Only for internal use. 21244 */ 21245 21246 21247 _createClass(ProductFilter, null, [{ 21248 key: "initialize", 21249 value: function initialize(obj) {} 21250 /** 21251 * Constructs a <code>ProductFilter</code> from a plain JavaScript object, optionally creating a new instance. 21252 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 21253 * @param {Object} data The plain JavaScript object bearing properties of interest. 21254 * @param {module:model/ProductFilter} obj Optional instance to populate. 21255 * @return {module:model/ProductFilter} The populated <code>ProductFilter</code> instance. 21256 */ 21257 21258 }, { 21259 key: "constructFromObject", 21260 value: function constructFromObject(data, obj) { 21261 if (data) { 21262 obj = obj || new ProductFilter(); 21263 21264 if (data.hasOwnProperty('sortBy')) { 21265 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 21266 } 21267 21268 if (data.hasOwnProperty('skip')) { 21269 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 21270 } 21271 21272 if (data.hasOwnProperty('limit')) { 21273 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 21274 } 21275 21276 if (data.hasOwnProperty('constraints')) { 21277 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 21278 } 21279 21280 if (data.hasOwnProperty('entityType')) { 21281 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 21282 } 21283 21284 if (data.hasOwnProperty('entityIds')) { 21285 obj['entityIds'] = _ApiClient["default"].convertToType(data['entityIds'], ['String']); 21286 } 21287 } 21288 21289 return obj; 21290 } 21291 }]); 21292 21293 return ProductFilter; 21294}(); 21295/** 21296 * Allow data to be sorted by name, description, created, etc. The default is name. Sorting is not available on translations 21297 * @member {Array.<module:model/QuerySortBy>} sortBy 21298 */ 21299 21300 21301ProductFilter.prototype['sortBy'] = undefined; 21302/** 21303 * Allows paging through the data. The default is zero. If the limit is set 20, and the skip is set to 20 then it will return the next 20 records i.e. page 2 21304 * @member {Number} skip 21305 */ 21306 21307ProductFilter.prototype['skip'] = undefined; 21308/** 21309 * Limit the result set. Default value is 20, maximum value is 50. 21310 * @member {Number} limit 21311 */ 21312 21313ProductFilter.prototype['limit'] = undefined; 21314/** 21315 * Specify the constraints that need to be applied to the filter. - empty (default) == search based on the provided criteria - productRefId == This means the entity
21315Id(s) provided are product reference identifiers - similarTo == Find product similar to the prouct ID(s) provided 21316 * @member {Array.<String>} constraints 21317 */ 21318 21319ProductFilter.prototype['constraints'] = undefined; 21320/** 21321 * This field determines the meaning of the IDs field - product (default) - competition - achievement. 21322 * @member {String} entityType 21323 */ 21324 21325ProductFilter.prototype['entityType'] = undefined; 21326/** 21327 * The entity id to search. The default is product id 21328 * @member {Array.<String>} entityIds 21329 */ 21330 21331ProductFilter.prototype['entityIds'] = undefined; 21332var _default = ProductFilter; 21333exports["default"] = _default; 21334},{"../ApiClient":3,"./QuerySortBy":141}],135:[function(require,module,exports){ 21335"use strict"; 21336 21337Object.defineProperty(exports, "__esModule", { 21338 value: true 21339}); 21340exports["default"] = void 0; 21341 21342var _ApiClient = _interopRequireDefault(require("../ApiClient")); 21343 21344var _OptionalModelFields = _interopRequireDefault(require("./OptionalModelFields")); 21345 21346var _ProductReducedAllOf = _interopRequireDefault(require("./ProductReducedAllOf")); 21347 21348function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 21349 21350function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 21351 21352function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 21353 21354function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 21355 21356/** 21357 * The ProductReduced model module. 21358 * @module model/ProductReduced 21359 * @version 1.0.14 21360 */ 21361var ProductReduced = /*#__PURE__*/function () { 21362 /** 21363 * Constructs a new <code>ProductReduced</code>. 21364 * @alias module:model/ProductReduced 21365 * @implements module:model/ProductReducedAllOf 21366 * @implements module:model/OptionalModelFields 21367 */ 21368 function ProductReduced() { 21369 _classCallCheck(this, ProductReduced); 21370 21371 _ProductReducedAllOf["default"].initialize(this); 21372 21373 _OptionalModelFields["default"].initialize(this); 21374 21375 ProductReduced.initialize(this); 21376 } 21377 /** 21378 * Initializes the fields of this object. 21379 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 21380 * Only for internal use. 21381 */ 21382 21383 21384 _createClass(ProductReduced, null, [{ 21385 key: "initialize", 21386 value: function initialize(obj) {} 21387 /** 21388 * Constructs a <code>ProductReduced</code> from a plain JavaScript object, optionally creating a new instance. 21389 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 21390 * @param {Object} data The plain JavaScript object bearing properties of interest. 21391 * @param {module:model/ProductReduced} obj Optional instance to populate. 21392 * @return {module:model/ProductReduced} The populated <code>ProductReduced</code> instance. 21393 */ 21394 21395 }, { 21396 key: "constructFromObject", 21397 value: function constructFromObject(data, obj) { 21398 if (data) { 21399 obj = obj || new ProductReduced(); 21400 21401 _ProductReducedAllOf["default"].constructFromObject(data, obj); 21402 21403 _OptionalModelFields["default"].constructFromObject(data, obj); 21404 21405 if (data.hasOwnProperty('name')) { 21406 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 21407 } 21408 21409 if (data.hasOwnProperty('productRefId')) { 21410 obj['productRefId'] = _ApiClient["default"].convertToType(data['productRefId'], 'String'); 21411 } 21412 21413 if (data.hasOwnProperty('customFields')) { 21414 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 21415 'String': Object 21416 }); 21417 } 21418 21419 if (data.hasOwnProperty('id')) { 21420 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 21421 } 21422 21423 if (data.hasOwnProperty('iconLink')) { 21424 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 21425 } 21426 21427 if (data.hasOwnProperty('bannerLink')) { 21428 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 21429 } 21430 21431 if (data.hasOwnProperty('bannerLowResolutionLink')) { 21432 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 21433 } 21434 21435 if (data.hasOwnProperty('bannerHighResolutionLink')) { 21436 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 21437 } 21438 21439 if (data.hasOwnProperty('tags')) { 21440 obj['tags'] = _ApiClient["default"].convertToType(data['tags'], ['String']); 21441 } 21442 21443 if (data.hasOwnProperty('metadata')) { 21444 obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], { 21445 'String': 'String' 21446 }); 21447 } 21448 } 21449 21450 return obj; 21451 } 21452 }]); 21453 21454 return ProductReduced; 21455}(); 21456/** 21457 * The name of the product 21458 * @member {String} name 21459 */ 21460 21461 21462ProductReduced.prototype['name'] = undefined; 21463/** 21464 * The reference to this product in your system. The reference identifier can not be changed after the product has been created 21465 * @member {String} productRefId 21466 */ 21467 21468ProductReduced.prototype['productRefId'] = undefined; 21469/** 21470 * @member {Object.<String, Object>} customFields 21471 */ 21472 21473ProductReduced.prototype['customFields'] = undefined; 21474/** 21475 * Unique system identifier of a Main Rule 21476 * @member {String} id 21477 */ 21478 21479ProductReduced.prototype['id'] = undefined; 21480/** 21481 * Link to the icon 21482 * @member {String} iconLink 21483 */ 21484 21485ProductReduced.prototype['iconLink'] = undefined; 21486/** 21487 * Link to the banner 21488 * @member {String} bannerLink 21489 */ 21490 21491ProductReduced.prototype['bannerLink'] = undefined; 21492/** 21493 * Link to the bannerLowResolution 21494 * @member {String} bannerLowResolutionLink 21495 */ 21496 21497ProductReduced.prototype['bannerLowResolutionLink'] = undefined; 21498/** 21499 * Link to the bannerHighResolution 21500 * @member {String} bannerHighResolutionLink 21501 */ 21502 21503ProductReduced.prototype['bannerHighResolutionLink'] = undefined; 21504/** 21505 * A list of id's used to tag models 21506 * @member {Array.<String>} tags 21507 */ 21508 21509ProductReduced.prototype['tags'] = undefined; 21510/** 21511 * @member {Object.<String, String>} metadata 21512 */ 21513 21514ProductReduced.prototype['metadata'] = undefined; // Implement ProductReducedAllOf interface: 21515 21516/** 21517 * The name of the product 21518 * @member {String} name 21519 */ 21520 21521_ProductReducedAllOf["default"].prototype['name'] = undefined; 21522/** 21523 * The reference to this product in your system. The reference identifier can not be changed after the product has been created 21524 * @member {String} productRefId 21525 */ 21526 21527_ProductReducedAllOf["default"].prototype['productRefId'] = undefined; 21528/** 21529 * @member {Object.<String, Object>} customFields 21530 */ 21531 21532_ProductReducedAllOf["default"].prototype['customFields'] = undefined; 21533/** 21534 * Unique system identifier of a Main Rule 21535 * @member {String} id 21536 */ 21537 21538_ProductReducedAllOf["default"].prototype['id'] = undefined; 21539/** 21540 * Link to the icon 21541 * @member {String} iconLink 21542 */ 21543 21544_ProductReducedAllOf["default"].prototype['iconLink'] = undefined; 21545/** 21546 * Link to the banner 21547 * @member {String} bannerLink 21548 */ 21549 21550_ProductReducedAllOf["default"].prototype['bannerLink'] = undefined; 21551/** 21552 * Link to the bannerLowResolution 21553 * @member {String} bannerLowResolutionLink 21554 */ 21555 21556_ProductReducedAllOf["default"].prototype['bannerLowResolutionLink'] = undefined; 21557/** 21558 * Link to the bannerHighResolution 21559 * @member {String} bannerHighResolutionLink 21560 */ 21561 21562_ProductReducedAllOf["default"].prototype['bannerHighResolutionLink'] = undefined; // Implement OptionalModelFields interface: 21563 21564/** 21565 * @member {Object.<String, Object>} customFields 21566 */ 21567 21568_OptionalModelFields["default"].prototype['customFields'] = undefined; 21569/** 21570 * A list of id's used to tag models 21571 * @member {Array.<String>} tags 21572 */ 21573 21574_OptionalModelFields["default"].prototype['tags'] = undefined; 21575/** 21576 * @member {Object.<String, String>} metadata 21577 */ 21578 21579_OptionalModelFields["default"].prototype['metadata'] = undefined; 21580var _default = ProductReduced; 21581exports["default"] = _default; 21582},{"../ApiClient":3,"./OptionalModelFields":130,"./ProductReducedAllOf":136}],136:[function(require,module,exports){ 21583"use strict"; 21584 21585Object.defineProperty(exports, "__esModule", { 21586 value: true 21587}); 21588exports["default"] = void 0; 21589 21590var _ApiClient = _interopRequireDefault(require("../ApiClient")); 21591 21592function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 21593 21594function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 21595 21596function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 21597 21598function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 21599 21600/** 21601 * The ProductReducedAllOf model module. 21602 * @module model/ProductReducedAllOf 21603 * @version 1.0.14 21604 */ 21605var ProductReducedAllOf = /*#__PURE__*/function () { 21606 /** 21607 * Constructs a new <code>ProductReducedAllOf</code>. 21608 * @alias module:model/ProductReducedAllOf 21609 */ 21610 function ProductReducedAllOf() { 21611 _classCallCheck(this, ProductReducedAllOf); 21612 21613 ProductReducedAllOf.initialize(this); 21614 } 21615 /** 21616 * Initializes the fields of this object. 21617 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 21618 * Only for internal use. 21619 */ 21620 21621 21622 _createClass(ProductReducedAllOf, null, [{ 21623 key: "initialize", 21624 value: function initialize(obj) {} 21625 /** 21626 * Constructs a <code>ProductReducedAllOf</code> from a plain JavaScript object, optionally creating a new instance. 21627 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 21628 * @param {Object} data The plain JavaScript object bearing properties of interest. 21629 * @param {module:model/ProductReducedAllOf} obj Optional instance to populate. 21630 * @return {module:model/ProductReducedAllOf} The populated <code>ProductReducedAllOf</code> instance. 21631 */ 21632 21633 }, { 21634 key: "constructFromObject", 21635 value: function constructFromObject(data, obj) { 21636 if (data) { 21637 obj = obj || new ProductReducedAllOf(); 21638 21639 if (data.hasOwnProperty('name')) { 21640 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 21641 } 21642 21643 if (data.hasOwnProperty('productRefId')) { 21644 obj['productRefId'] = _ApiClient["default"].convertToType(data['productRefId'], 'String'); 21645 } 21646 21647 if (data.hasOwnProperty('customFields')) { 21648 obj['customFields'] = _ApiClient["default"].convertToType(data['customFields'], { 21649 'String': Object 21650 }); 21651 } 21652 21653 if (data.hasOwnProperty('id')) { 21654 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 21655 } 21656 21657 if (data.hasOwnProperty('iconLink')) { 21658 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 21659 } 21660 21661 if (data.hasOwnProperty('bannerLink')) { 21662 obj['bannerLink'] = _ApiClient["default"].convertToType(data['bannerLink'], 'String'); 21663 } 21664 21665 if (data.hasOwnProperty('bannerLowResolutionLink')) { 21666 obj['bannerLowResolutionLink'] = _ApiClient["default"].convertToType(data['bannerLowResolutionLink'], 'String'); 21667 } 21668 21669 if (data.hasOwnProperty('bannerHighResolutionLink')) { 21670 obj['bannerHighResolutionLink'] = _ApiClient["default"].convertToType(data['bannerHighResolutionLink'], 'String'); 21671 } 21672 } 21673 21674 return obj; 21675 } 21676 }]); 21677 21678 return ProductReducedAllOf; 21679}(); 21680/** 21681 * The name of the product 21682 * @member {String} name 21683 */ 21684 21685 21686ProductReducedAllOf.prototype['name'] = undefined; 21687/** 21688 * The reference to this product in your system. The reference identifier can not be changed after the product has been created 21689 * @member {String} productRefId 21690 */ 21691 21692ProductReducedAllOf.prototype['productRefId'] = undefined; 21693/** 21694 * @member {Object.<String, Object>} customFields 21695 */ 21696 21697ProductReducedAllOf.prototype['customFields'] = undefined; 21698/** 21699 * Unique system identifier of a Main Rule 21700 * @member {String} id 21701 */ 21702 21703ProductReducedAllOf.prototype['id'] = undefined; 21704/** 21705 * Link to the icon 21706 * @member {String} iconLink 21707 */ 21708 21709ProductReducedAllOf.prototype['iconLink'] = undefined; 21710/** 21711 * Link to the banner 21712 * @member {String} bannerLink 21713 */ 21714 21715ProductReducedAllOf.prototype['bannerLink'] = undefined; 21716/** 21717 * Link to the bannerLowResolution 21718 * @member {String} bannerLowResolutionLink 21719 */ 21720 21721ProductReducedAllOf.prototype['bannerLowResolutionLink'] = undefined; 21722/** 21723 * Link to the bannerHighResolution 21724 * @member {String} bannerHighResolutionLink 21725 */ 21726 21727ProductReducedAllOf.prototype['bannerHighResolutionLink'] = undefined; 21728var _default = ProductReducedAllOf; 21729exports["default"] = _default; 21730},{"../ApiClient":3}],137:[function(require,module,exports){ 21731"use strict"; 21732 21733Object.defineProperty(exports, "__esModule", { 21734 value: true 21735}); 21736exports["default"] = void 0; 21737 21738var _ApiClient = _interopRequireDefault(require("../ApiClient")); 21739 21740var _ProductFilter = _interopRequireDefault(require("./ProductFilter")); 21741 21742function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 21743 21744function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 21745 21746function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 21747 21748function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 21749 21750/** 21751 * The ProductRequest model module. 21752 * @module model/ProductRequest 21753 * @version 1.0.14 21754 */ 21755var ProductRequest = /*#__PURE__*/function () { 21756 /** 21757 * Constructs a new <code>ProductRequest</code>. 21758 * @alias module:model/ProductRequest 21759 */ 21760 function ProductRequest() { 21761 _classCallCheck(this, ProductRequest); 21762 21763 ProductRequest.initialize(this); 21764 } 21765 /** 21766 * Initializes the fields of this object. 21767 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 21768 * Only for internal use. 21769 */ 21770 21771 21772 _createClass(ProductRequest, null, [{ 21773 key: "initialize", 21774 value: function initialize(obj) {} 21775 /** 21776 * Constructs a <code>ProductRequest</code> from a plain JavaScript object, optionally creating a new instance. 21777 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 21778 * @param {Object} data The plain JavaScript object bearing properties of interest. 21779 * @param {module:model/ProductRequest} obj Optional instance to populate. 21780 * @return {module:model/ProductRequest} The populated <code>ProductRequest</code> instance. 21781 */ 21782 21783 }, { 21784 key: "constructFromObject", 21785 value: function constructFromObject(data, obj) { 21786 if (data) { 21787 obj = obj || new ProductRequest(); 21788 21789 if (data.hasOwnProperty('languageKey')) { 21790 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 21791 } 21792 21793 if (data.hasOwnProperty('productFilter')) { 21794 obj['productFilter'] = _ProductFilter["default
21794"].constructFromObject(data['productFilter']); 21795 } 21796 } 21797 21798 return obj; 21799 } 21800 }]); 21801 21802 return ProductRequest; 21803}(); 21804/** 21805 * The language codes can be found in the settings/transalations section of the back office 21806 * @member {String} languageKey 21807 */ 21808 21809 21810ProductRequest.prototype['languageKey'] = undefined; 21811/** 21812 * @member {module:model/ProductFilter} productFilter 21813 */ 21814 21815ProductRequest.prototype['productFilter'] = undefined; 21816var _default = ProductRequest; 21817exports["default"] = _default; 21818},{"../ApiClient":3,"./ProductFilter":134}],138:[function(require,module,exports){ 21819"use strict"; 21820 21821Object.defineProperty(exports, "__esModule", { 21822 value: true 21823}); 21824exports["default"] = void 0; 21825 21826var _ApiClient = _interopRequireDefault(require("../ApiClient")); 21827 21828var _Error = _interopRequireDefault(require("./Error")); 21829 21830var _Product = _interopRequireDefault(require("./Product")); 21831 21832var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 21833 21834function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 21835 21836function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 21837 21838function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 21839 21840function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 21841 21842/** 21843 * The ProductResponse model module. 21844 * @module model/ProductResponse 21845 * @version 1.0.14 21846 */ 21847var ProductResponse = /*#__PURE__*/function () { 21848 /** 21849 * Constructs a new <code>ProductResponse</code>. 21850 * This is a Contest Response 21851 * @alias module:model/ProductResponse 21852 */ 21853 function ProductResponse() { 21854 _classCallCheck(this, ProductResponse); 21855 21856 ProductResponse.initialize(this); 21857 } 21858 /** 21859 * Initializes the fields of this object. 21860 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 21861 * Only for internal use. 21862 */ 21863 21864 21865 _createClass(ProductResponse, null, [{ 21866 key: "initialize", 21867 value: function initialize(obj) {} 21868 /** 21869 * Constructs a <code>ProductResponse</code> from a plain JavaScript object, optionally creating a new instance. 21870 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 21871 * @param {Object} data The plain JavaScript object bearing properties of interest. 21872 * @param {module:model/ProductResponse} obj Optional instance to populate. 21873 * @return {module:model/ProductResponse} The populated <code>ProductResponse</code> instance. 21874 */ 21875 21876 }, { 21877 key: "constructFromObject", 21878 value: function constructFromObject(data, obj) { 21879 if (data) { 21880 obj = obj || new ProductResponse(); 21881 21882 if (data.hasOwnProperty('meta')) { 21883 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 21884 } 21885 21886 if (data.hasOwnProperty('data')) { 21887 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Product["default"]]); 21888 } 21889 21890 if (data.hasOwnProperty('errors')) { 21891 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 21892 } 21893 } 21894 21895 return obj; 21896 } 21897 }]); 21898 21899 return ProductResponse; 21900}(); 21901/** 21902 * @member {module:model/ResponseMeta} meta 21903 */ 21904 21905 21906ProductResponse.prototype['meta'] = undefined; 21907/** 21908 * @member {Array.<module:model/Product>} data 21909 */ 21910 21911ProductResponse.prototype['data'] = undefined; 21912/** 21913 * @member {Array.<module:model/Error>} errors 21914 */ 21915 21916ProductResponse.prototype['errors'] = undefined; 21917var _default = ProductResponse; 21918exports["default"] = _default; 21919},{"../ApiClient":3,"./Error":74,"./Product":132,"./ResponseMeta":144}],139:[function(require,module,exports){ 21920"use strict"; 21921 21922Object.defineProperty(exports, "__esModule", { 21923 value: true 21924}); 21925exports["default"] = void 0; 21926 21927var _ApiClient = _interopRequireDefault(require("../ApiClient")); 21928 21929var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 21930 21931function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 21932 21933function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 21934 21935function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 21936 21937function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 21938 21939/** 21940 * The ProxyMessage model module. 21941 * @module model/ProxyMessage 21942 * @version 1.0.14 21943 */ 21944var ProxyMessage = /*#__PURE__*/function () { 21945 /** 21946 * Constructs a new <code>ProxyMessage</code>. 21947 * @alias module:model/ProxyMessage 21948 */ 21949 function ProxyMessage() { 21950 _classCallCheck(this, ProxyMessage); 21951 21952 ProxyMessage.initialize(this); 21953 } 21954 /** 21955 * Initializes the fields of this object. 21956 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 21957 * Only for internal use. 21958 */ 21959 21960 21961 _createClass(ProxyMessage, null, [{ 21962 key: "initialize", 21963 value: function initialize(obj) {} 21964 /** 21965 * Constructs a <code>ProxyMessage</code> from a plain JavaScript object, optionally creating a new instance. 21966 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 21967 * @param {Object} data The plain JavaScript object bearing properties of interest. 21968 * @param {module:model/ProxyMessage} obj Optional instance to populate. 21969 * @return {module:model/ProxyMessage} The populated <code>ProxyMessage</code> instance. 21970 */ 21971 21972 }, { 21973 key: "constructFromObject", 21974 value: function constructFromObject(data, obj) { 21975 if (data) { 21976 obj = obj || new ProxyMessage(); 21977 21978 if (data.hasOwnProperty('meta')) { 21979 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 21980 } 21981 21982 if (data.hasOwnProperty('data')) { 21983 obj['data'] = _ApiClient["default"].convertToType(data['data'], Object); 21984 } 21985 } 21986 21987 return obj; 21988 } 21989 }]); 21990 21991 return ProxyMessage; 21992}(); 21993/** 21994 * @member {module:model/ResponseMeta} meta 21995 */ 21996 21997 21998ProxyMessage.prototype['meta'] = undefined; 21999/** 22000 * @member {Object} data 22001 */ 22002 22003ProxyMessage.prototype['data'] = undefined; 22004var _default = ProxyMessage; 22005exports["default"] = _default; 22006},{"../ApiClient":3,"./ResponseMeta":144}],140:[function(require,module,exports){ 22007"use strict"; 22008 22009Object.defineProperty(exports, "__esModule", { 22010 value: true 22011}); 22012exports["default"] = void 0; 22013 22014var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22015 22016function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22017 22018function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22019 22020function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22021 22022function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22023 22024/** 22025 * The QueryMultipleFields model module. 22026 * @module model/QueryMultipleFields 22027 * @version 1.0.14 22028 */ 22029var QueryMultipleFields = /*#__PURE__*/function () { 22030 /** 22031 * Constructs a new <code>QueryMultipleFields</code>. 22032 * @alias module:model/QueryMultipleFields 22033 */ 22034 function QueryMultipleFields() { 22035 _classCallCheck(this, QueryMultipleFields); 22036 22037 QueryMultipleFields.initialize(this); 22038 } 22039 /** 22040 * Initializes the fields of this object. 22041 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22042 * Only for internal use. 22043 */ 22044 22045 22046 _createClass(QueryMultipleFields, null, [{ 22047 key: "initialize", 22048 value: function initialize(obj) {} 22049 /** 22050 * Constructs a <code>QueryMultipleFields</code> from a plain JavaScript object, optionally creating a new instance. 22051 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22052 * @param {Object} data The plain JavaScript object bearing properties of interest. 22053 * @param {module:model/QueryMultipleFields} obj Optional instance to populate. 22054 * @return {module:model/QueryMultipleFields} The populated <code>QueryMultipleFields</code> instance. 22055 */ 22056 22057 }, { 22058 key: "constructFromObject", 22059 value: function constructFromObject(data, obj) { 22060 if (data) { 22061 obj = obj || new QueryMultipleFields(); 22062 22063 if (data.hasOwnProperty('queryFields')) { 22064 obj['queryFields'] = _ApiClient["default"].convertToType(data['queryFields'], ['String']); 22065 } 22066 22067 if (data.hasOwnProperty('queryValue')) { 22068 obj['queryValue'] = _ApiClient["default"].convertToType(data['queryValue'], 'String'); 22069 } 22070 } 22071 22072 return obj; 22073 } 22074 }]); 22075 22076 return QueryMultipleFields; 22077}(); 22078/** 22079 * Multiple fields to be included in search for the given value. 22080 * @member {Array.<String>} queryFields 22081 */ 22082 22083 22084QueryMultipleFields.prototype['queryFields'] = undefined; 22085/** 22086 * The value to search for across given fields. 22087 * @member {String} queryValue 22088 */ 22089 22090QueryMultipleFields.prototype['queryValue'] = undefined; 22091var _default = QueryMultipleFields; 22092exports["default"] = _default; 22093},{"../ApiClient":3}],141:[function(require,module,exports){ 22094"use strict"; 22095 22096Object.defineProperty(exports, "__esModule", { 22097 value: true 22098}); 22099exports["default"] = void 0; 22100 22101var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22102 22103var _SortOrder = _interopRequireDefault(require("./SortOrder")); 22104 22105function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22106 22107function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22108 22109function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22110 22111function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22112 22113/** 22114 * The QuerySortBy model module. 22115 * @module model/QuerySortBy 22116 * @version 1.0.14 22117 */ 22118var QuerySortBy = /*#__PURE__*/function () { 22119 /** 22120 * Constructs a new <code>QuerySortBy</code>. 22121 * @alias module:model/QuerySortBy 22122 * @param queryField {String} The key of the parameter that is being searched 22123 * @param order {module:model/SortOrder} 22124 */ 22125 function QuerySortBy(queryField, order) { 22126 _classCallCheck(this, QuerySortBy); 22127 22128 QuerySortBy.initialize(this, queryField, order); 22129 } 22130 /** 22131 * Initializes the fields of this object. 22132 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22133 * Only for internal use. 22134 */ 22135 22136 22137 _createClass(QuerySortBy, null, [{ 22138 key: "initialize", 22139 value: function initialize(obj, queryField, order) { 22140 obj['queryField'] = queryField; 22141 obj['order'] = order; 22142 } 22143 /** 22144 * Constructs a <code>QuerySortBy</code> from a plain JavaScript object, optionally creating a new instance. 22145 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22146 * @param {Object} data The plain JavaScript object bearing properties of interest. 22147 * @param {module:model/QuerySortBy} obj Optional instance to populate. 22148 * @return {module:model/QuerySortBy} The populated <code>QuerySortBy</code> instance. 22149 */ 22150 22151 }, { 22152 key: "constructFromObject", 22153 value: function constructFromObject(data, obj) { 22154 if (data) { 22155 obj = obj || new QuerySortBy(); 22156 22157 if (data.hasOwnProperty('queryField')) { 22158 obj['queryField'] = _ApiClient["default"].convertToType(data['queryField'], 'String'); 22159 } 22160 22161 if (data.hasOwnProperty('order')) { 22162 obj['order'] = _SortOrder["default"].constructFromObject(data['order']); 22163 } 22164 } 22165 22166 return obj; 22167 } 22168 }]); 22169 22170 return QuerySortBy; 22171}(); 22172/** 22173 * The key of the parameter that is being searched 22174 * @member {String} queryField 22175 */ 22176 22177 22178QuerySortBy.prototype['queryField'] = undefined; 22179/** 22180 * @member {module:model/SortOrder} order 22181 */ 22182 22183QuerySortBy.prototype['order'] = undefined; 22184var _default = QuerySortBy; 22185exports["default"] = _default; 22186},{"../ApiClient":3,"./SortOrder":161}],142:[function(require,module,exports){ 22187"use strict"; 22188 22189Object.defineProperty(exports, "__esModule", { 22190 value: true 22191}); 22192exports["default"] = void 0; 22193 22194var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22195 22196function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22197 22198function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22199 22200function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22201 22202function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22203 22204/** 22205 * The RangeQuery model module. 22206 * @module model/RangeQuery 22207 * @version 1.0.14 22208 */ 22209var RangeQuery = /*#__PURE__*/function () { 22210 /** 22211 * Constructs a new <code>RangeQuery</code>. 22212 * @alias module:model/RangeQuery 22213 */ 22214 function RangeQuery() { 22215 _classCallCheck(this, RangeQuery); 22216 22217 RangeQuery.initialize(this); 22218 } 22219 /** 22220 * Initializes the fields of this object. 22221 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22222 * Only for internal use. 22223 */ 22224 22225 22226 _createClass(RangeQuery, null, [{ 22227 key: "initialize", 22228 value: function initialize(obj) {} 22229 /** 22230 * Constructs a <code>RangeQuery</code> from a plain JavaScript object, optionally creating a new instance. 22231 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22232 * @param {Object} data The plain JavaScript object bearing properties of interest. 22233 * @param {module:model/RangeQuery} obj Optional instance to populate. 22234 * @return {module:model/RangeQuery} The populated <code>RangeQuery</code> instance. 22235 */ 22236 22237 }, { 22238 key: "constructFromObject", 22239 value: function constructFromObject(data, obj) { 22240 if (data) { 22241 obj = obj || new RangeQuery(); 22242 22243 if (data.hasOwnProperty('gt')) { 22244 obj['gt'] = _ApiClient["default"].convertToType(data['gt'], 'String'); 22245
22245 } 22246 22247 if (data.hasOwnProperty('lt')) { 22248 obj['lt'] = _ApiClient["default"].convertToType(data['lt'], 'String'); 22249 } 22250 22251 if (data.hasOwnProperty('constraints')) { 22252 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 22253 } 22254 } 22255 22256 return obj; 22257 } 22258 }]); 22259 22260 return RangeQuery; 22261}(); 22262/** 22263 * Greater than value 22264 * @member {String} gt 22265 */ 22266 22267 22268RangeQuery.prototype['gt'] = undefined; 22269/** 22270 * Less than value 22271 * @member {String} lt 22272 */ 22273 22274RangeQuery.prototype['lt'] = undefined; 22275/** 22276 * Additional constraints 22277 * @member {Array.<String>} constraints 22278 */ 22279 22280RangeQuery.prototype['constraints'] = undefined; 22281var _default = RangeQuery; 22282exports["default"] = _default; 22283},{"../ApiClient":3}],143:[function(require,module,exports){ 22284"use strict"; 22285 22286Object.defineProperty(exports, "__esModule", { 22287 value: true 22288}); 22289exports["default"] = void 0; 22290 22291var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22292 22293function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22294 22295function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22296 22297function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22298 22299function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22300 22301/** 22302 * The RankingStrategy model module. 22303 * @module model/RankingStrategy 22304 * @version 1.0.14 22305 */ 22306var RankingStrategy = /*#__PURE__*/function () { 22307 /** 22308 * Constructs a new <code>RankingStrategy</code>. 22309 * @alias module:model/RankingStrategy 22310 */ 22311 function RankingStrategy() { 22312 _classCallCheck(this, RankingStrategy); 22313 22314 RankingStrategy.initialize(this); 22315 } 22316 /** 22317 * Initializes the fields of this object. 22318 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22319 * Only for internal use. 22320 */ 22321 22322 22323 _createClass(RankingStrategy, null, [{ 22324 key: "initialize", 22325 value: function initialize(obj) {} 22326 /** 22327 * Constructs a <code>RankingStrategy</code> from a plain JavaScript object, optionally creating a new instance. 22328 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22329 * @param {Object} data The plain JavaScript object bearing properties of interest. 22330 * @param {module:model/RankingStrategy} obj Optional instance to populate. 22331 * @return {module:model/RankingStrategy} The populated <code>RankingStrategy</code> instance. 22332 */ 22333 22334 }, { 22335 key: "constructFromObject", 22336 value: function constructFromObject(data, obj) { 22337 if (data) { 22338 obj = obj || new RankingStrategy(); 22339 22340 if (data.hasOwnProperty('constraints')) { 22341 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 22342 } 22343 } 22344 22345 return obj; 22346 } 22347 }]); 22348 22349 return RankingStrategy; 22350}(); 22351/** 22352 * scoreDesc - The Ranking that can be Ascending or Descending based on timeDesc. timeDesc - The Ranking that can be Ascending or Descending based on scoreDesc. scoreFirst - The Ranking that can be score first or time first ignoreTime - The Ranking when time is ignored ignoreScore - The Ranking when score is ignored 22353 * @member {Array.<String>} constraints 22354 */ 22355 22356 22357RankingStrategy.prototype['constraints'] = undefined; 22358var _default = RankingStrategy; 22359exports["default"] = _default; 22360},{"../ApiClient":3}],144:[function(require,module,exports){ 22361"use strict"; 22362 22363Object.defineProperty(exports, "__esModule", { 22364 value: true 22365}); 22366exports["default"] = void 0; 22367 22368var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22369 22370function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22371 22372function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22373 22374function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22375 22376function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22377 22378/** 22379 * The ResponseMeta model module. 22380 * @module model/ResponseMeta 22381 * @version 1.0.14 22382 */ 22383var ResponseMeta = /*#__PURE__*/function () { 22384 /** 22385 * Constructs a new <code>ResponseMeta</code>. 22386 * Response metadata 22387 * @alias module:model/ResponseMeta 22388 * @param totalRecordsFound {Number} 22389 * @param skip {Number} 22390 * @param limit {Number} 22391 */ 22392 function ResponseMeta(totalRecordsFound, skip, limit) { 22393 _classCallCheck(this, ResponseMeta); 22394 22395 ResponseMeta.initialize(this, totalRecordsFound, skip, limit); 22396 } 22397 /** 22398 * Initializes the fields of this object. 22399 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22400 * Only for internal use. 22401 */ 22402 22403 22404 _createClass(ResponseMeta, null, [{ 22405 key: "initialize", 22406 value: function initialize(obj, totalRecordsFound, skip, limit) { 22407 obj['totalRecordsFound'] = totalRecordsFound; 22408 obj['skip'] = skip; 22409 obj['limit'] = limit; 22410 } 22411 /** 22412 * Constructs a <code>ResponseMeta</code> from a plain JavaScript object, optionally creating a new instance. 22413 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22414 * @param {Object} data The plain JavaScript object bearing properties of interest. 22415 * @param {module:model/ResponseMeta} obj Optional instance to populate. 22416 * @return {module:model/ResponseMeta} The populated <code>ResponseMeta</code> instance. 22417 */ 22418 22419 }, { 22420 key: "constructFromObject", 22421 value: function constructFromObject(data, obj) { 22422 if (data) { 22423 obj = obj || new ResponseMeta(); 22424 22425 if (data.hasOwnProperty('totalRecordsFound')) { 22426 obj['totalRecordsFound'] = _ApiClient["default"].convertToType(data['totalRecordsFound'], 'Number'); 22427 } 22428 22429 if (data.hasOwnProperty('skip')) { 22430 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 22431 } 22432 22433 if (data.hasOwnProperty('limit')) { 22434 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 22435 } 22436 22437 if (data.hasOwnProperty('objectType')) { 22438 obj['objectType'] = _ApiClient["default"].convertToType(data['objectType'], 'String'); 22439 } 22440 22441 if (data.hasOwnProperty('resultCount')) { 22442 obj['resultCount'] = _ApiClient["default"].convertToType(data['resultCount'], 'Number'); 22443 } 22444 } 22445 22446 return obj; 22447 } 22448 }]); 22449 22450 return ResponseMeta; 22451}(); 22452/** 22453 * @member {Number} totalRecordsFound 22454 */ 22455 22456 22457ResponseMeta.prototype['totalRecordsFound'] = undefined; 22458/** 22459 * @member {Number} skip 22460 */ 22461 22462ResponseMeta.prototype['skip'] = undefined; 22463/** 22464 * @member {Number} limit 22465 */ 22466 22467ResponseMeta.prototype['limit'] = undefined; 22468/** 22469 * @member {String} objectType 22470 */ 22471 22472ResponseMeta.prototype['objectType'] = undefined; 22473/** 22474 * @member {Number} resultCount 22475 */ 22476 22477ResponseMeta.prototype['resultCount'] = undefined; 22478var _default = ResponseMeta;
22479exports["default"] = _default; 22480},{"../ApiClient":3}],145:[function(require,module,exports){ 22481"use strict"; 22482 22483Object.defineProperty(exports, "__esModule", { 22484 value: true 22485}); 22486exports["default"] = void 0; 22487 22488var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22489 22490var _EntityType = _interopRequireDefault(require("./EntityType")); 22491 22492var _RewardTypeReduced = _interopRequireDefault(require("./RewardTypeReduced")); 22493 22494function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22495 22496function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22497 22498function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22499 22500function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22501 22502/** 22503 * The Reward model module. 22504 * @module model/Reward 22505 * @version 1.0.14 22506 */ 22507var Reward = /*#__PURE__*/function () { 22508 /** 22509 * Constructs a new <code>Reward</code>. 22510 * @alias module:model/Reward 22511 */ 22512 function Reward() { 22513 _classCallCheck(this, Reward); 22514 22515 Reward.initialize(this); 22516 } 22517 /** 22518 * Initializes the fields of this object. 22519 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22520 * Only for internal use. 22521 */ 22522 22523 22524 _createClass(Reward, null, [{ 22525 key: "initialize", 22526 value: function initialize(obj) {} 22527 /** 22528 * Constructs a <code>Reward</code> from a plain JavaScript object, optionally creating a new instance. 22529 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22530 * @param {Object} data The plain JavaScript object bearing properties of interest. 22531 * @param {module:model/Reward} obj Optional instance to populate. 22532 * @return {module:model/Reward} The populated <code>Reward</code> instance. 22533 */ 22534 22535 }, { 22536 key: "constructFromObject", 22537 value: function constructFromObject(data, obj) { 22538 if (data) { 22539 obj = obj || new Reward(); 22540 22541 if (data.hasOwnProperty('probability')) { 22542 obj['probability'] = _ApiClient["default"].convertToType(data['probability'], 'Number'); 22543 } 22544 22545 if (data.hasOwnProperty('entityType')) { 22546 obj['entityType'] = _EntityType["default"].constructFromObject(data['entityType']); 22547 } 22548 22549 if (data.hasOwnProperty('entityId')) { 22550 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 22551 } 22552 22553 if (data.hasOwnProperty('name')) { 22554 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 22555 } 22556 22557 if (data.hasOwnProperty('description')) { 22558 obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String'); 22559 } 22560 22561 if (data.hasOwnProperty('rewardRank')) { 22562 obj['rewardRank'] = _ApiClient["default"].convertToType(data['rewardRank'], 'String'); 22563 } 22564 22565 if (data.hasOwnProperty('rewardValue')) { 22566 obj['rewardValue'] = _ApiClient["default"].convertToType(data['rewardValue'], 'Number'); 22567 } 22568 22569 if (data.hasOwnProperty('rewardType')) { 22570 obj['rewardType'] = _RewardTypeReduced["default"].constructFromObject(data['rewardType']); 22571 } 22572 22573 if (data.hasOwnProperty('iconLink')) { 22574 obj['iconLink'] = _ApiClient["default"].convertToType(data['iconLink'], 'String'); 22575 } 22576 22577 if (data.hasOwnProperty('icon')) { 22578 obj['icon'] = _ApiClient["default"].convertToType(data['icon'], 'String'); 22579 } 22580 22581 if (data.hasOwnProperty('spaceName')) { 22582 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 22583 } 22584 22585 if (data.hasOwnProperty('issueLimit')) { 22586 obj['issueLimit'] = _ApiClient["default"].convertToType(data['issueLimit'], 'Number'); 22587 } 22588 22589 if (data.hasOwnProperty('delay')) { 22590 obj['delay'] = _ApiClient["default"].convertToType(data['delay'], 'Number'); 22591 } 22592 22593 if (data.hasOwnProperty('pointInTime')) { 22594 obj['pointInTime'] = _ApiClient["default"].convertToType(data['pointInTime'], 'Date'); 22595 } 22596 22597 if (data.hasOwnProperty('period')) { 22598 obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Number'); 22599 } 22600 22601 if (data.hasOwnProperty('id')) { 22602 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 22603 } 22604 22605 if (data.hasOwnProperty('constraints')) { 22606 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 22607 } 22608 } 22609 22610 return obj; 22611 } 22612 }]); 22613 22614 return Reward; 22615}(); 22616/** 22617 * What is the probability of winning this reward 22618 * @member {Number} probability 22619 */ 22620 22621 22622Reward.prototype['probability'] = undefined; 22623/** 22624 * @member {module:model/EntityType} entityType 22625 */ 22626 22627Reward.prototype['entityType'] = undefined; 22628/** 22629 * A unique identifier of an achievement or contest. Dependant on entityType 22630 * @member {String} entityId 22631 */ 22632 22633Reward.prototype['entityId'] = undefined; 22634/** 22635 * The name of a reward 22636 * @member {String} name 22637 */ 22638 22639Reward.prototype['name'] = undefined; 22640/** 22641 * The description of a Reward 22642 * @member {String} description 22643 */ 22644 22645Reward.prototype['description'] = undefined; 22646/** 22647 * If used in the context of contest this will associate with the rank of the leaderboard 22648 * @member {String} rewardRank 22649 */ 22650 22651Reward.prototype['rewardRank'] = undefined; 22652/** 22653 * Numerical value of the reward that will be issued based on the reward type 22654 * @member {Number} rewardValue 22655 */ 22656 22657Reward.prototype['rewardValue'] = undefined; 22658/** 22659 * @member {module:model/RewardTypeReduced} rewardType 22660 */ 22661 22662Reward.prototype['rewardType'] = undefined; 22663/** 22664 * Link to the icon 22665 * @member {String} iconLink 22666 */ 22667 22668Reward.prototype['iconLink'] = undefined; 22669/** 22670 * id the icon 22671 * @member {String} icon 22672 */ 22673 22674Reward.prototype['icon'] = undefined; 22675/** 22676 * spaceName 22677 * @member {String} spaceName 22678 */ 22679 22680Reward.prototype['spaceName'] = undefined; 22681/** 22682 * how many of thsese rewards are 22683 * @member {Number} issueLimit 22684 */ 22685 22686Reward.prototype['issueLimit'] = undefined; 22687/** 22688 * Delay of issuing a reward in minutes 22689 * @member {Number} delay 22690 */ 22691 22692Reward.prototype['delay'] = undefined; 22693/** 22694 * ISO8601 timestamp for when a Reward is available until a specific point in t
22694ime. All records are stored in UTC time zone 22695 * @member {Date} pointInTime 22696 */ 22697 22698Reward.prototype['pointInTime'] = undefined; 22699/** 22700 * Reward available for a period of time from issuing in minutes 22701 * @member {Number} period 22702 */ 22703 22704Reward.prototype['period'] = undefined; 22705/** 22706 * Unique system identifier of a Main Rule 22707 * @member {String} id 22708 */ 22709 22710Reward.prototype['id'] = undefined; 22711/** 22712 * Additional constraints 22713 * @member {Array.<String>} constraints 22714 */ 22715 22716Reward.prototype['constraints'] = undefined; 22717var _default = Reward; 22718exports["default"] = _default; 22719},{"../ApiClient":3,"./EntityType":73,"./RewardTypeReduced":150}],146:[function(require,module,exports){ 22720"use strict"; 22721 22722Object.defineProperty(exports, "__esModule", { 22723 value: true 22724}); 22725exports["default"] = void 0; 22726 22727var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22728 22729var _ModelDefault = _interopRequireDefault(require("./ModelDefault")); 22730 22731var _RewardReducedAllOf = _interopRequireDefault(require("./RewardReducedAllOf")); 22732 22733function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22734 22735function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22736 22737function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22738 22739function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22740 22741/** 22742 * The RewardReduced model module. 22743 * @module model/RewardReduced 22744 * @version 1.0.14 22745 */ 22746var RewardReduced = /*#__PURE__*/function () { 22747 /** 22748 * Constructs a new <code>RewardReduced</code>. 22749 * @alias module:model/RewardReduced 22750 * @implements module:model/RewardReducedAllOf 22751 * @implements module:model/ModelDefault 22752 * @param id {String} Ziqni id of the model 22753 */ 22754 function RewardReduced(id) { 22755 _classCallCheck(this, RewardReduced); 22756 22757 _RewardReducedAllOf["default"].initialize(this); 22758 22759 _ModelDefault["default"].initialize(this, id); 22760 22761 RewardReduced.initialize(this, id); 22762 } 22763 /** 22764 * Initializes the fields of this object. 22765 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22766 * Only for internal use. 22767 */ 22768 22769 22770 _createClass(RewardReduced, null, [{ 22771 key: "initialize", 22772 value: function initialize(obj, id) { 22773 obj['id'] = id; 22774 } 22775 /** 22776 * Constructs a <code>RewardReduced</code> from a plain JavaScript object, optionally creating a new instance. 22777 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22778 * @param {Object} data The plain JavaScript object bearing properties of interest. 22779 * @param {module:model/RewardReduced} obj Optional instance to populate. 22780 * @return {module:model/RewardReduced} The populated <code>RewardReduced</code> instance. 22781 */ 22782 22783 }, { 22784 key: "constructFromObject", 22785 value: function constructFromObject(data, obj) { 22786 if (data) { 22787 obj = obj || new RewardReduced(); 22788 22789 _RewardReducedAllOf["default"].constructFromObject(data, obj); 22790 22791 _ModelDefault["default"].constructFromObject(data, obj); 22792 22793 if (data.hasOwnProperty('rewardRank')) { 22794 obj['rewardRank'] = _ApiClient["default"].convertToType(data['rewardRank'], 'String'); 22795 } 22796 22797 if (data.hasOwnProperty('name')) { 22798 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 22799 } 22800 22801 if (data.hasOwnProperty('rewardValue')) { 22802 obj['rewardValue'] = _ApiClient["default"].convertToType(data['rewardValue'], 'Number'); 22803 } 22804 22805 if (data.hasOwnProperty('rewardType')) { 22806 obj['rewardType'] = _ApiClient["default"].convertToType(data['rewardType'], 'String'); 22807 } 22808 22809 if (data.hasOwnProperty('rewardTypeId')) { 22810 obj['rewardTypeId'] = _ApiClient["default"].convertToType(data['rewardTypeId'], 'String'); 22811 } 22812 22813 if (data.hasOwnProperty('id')) { 22814 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 22815 } 22816 22817 if (data.hasOwnProperty('spaceName')) { 22818 obj['spaceName'] = _ApiClient["default"].convertToType(data['spaceName'], 'String'); 22819 } 22820 22821 if (data.hasOwnProperty('created')) { 22822 obj['created'] = _ApiClient["default"].convertToType(data['created'], 'Date'); 22823 } 22824 } 22825 22826 return obj; 22827 } 22828 }]); 22829 22830 return RewardReduced; 22831}(); 22832/** 22833 * If used in the context of contest this will associate with the rank of the leaderboard 22834 * @member {String} rewardRank 22835 */ 22836 22837 22838RewardReduced.prototype['rewardRank'] = undefined; 22839/** 22840 * The name of a reward 22841 * @member {String} name 22842 */ 22843 22844RewardReduced.prototype['name'] = undefined; 22845/** 22846 * Numerical value of the reward that will be issued based on the reward type 22847 * @member {Number} rewardValue 22848 */ 22849 22850RewardReduced.prototype['rewardValue'] = undefined; 22851/** 22852 * Reward Type key 22853 * @member {String} rewardType 22854 */ 22855 22856RewardReduced.prototype['rewardType'] = undefined; 22857/** 22858 * A unique id of the Reward Type 22859 * @member {String} rewardTypeId 22860 */ 22861 22862RewardReduced.prototype['rewardTypeId'] = undefined; 22863/** 22864 * Ziqni id of the model 22865 * @member {String} id 22866 */ 22867 22868RewardReduced.prototype['id'] = undefined; 22869/** 22870 * This is the space name which is linked to the account 22871 * @member {String} spaceName 22872 */ 22873 22874RewardReduced.prototype['spaceName'] = undefined; 22875/** 22876 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 22877 * @member {Date} created 22878 */ 22879 22880RewardReduced.prototype['created'] = undefined; // Implement RewardReducedAllOf interface: 22881 22882/** 22883 * If used in the context of contest this will associate with the rank of the leaderboard 22884 * @member {String} rewardRank 22885 */ 22886 22887_RewardReducedAllOf["default"].prototype['rewardRank'] = undefined; 22888/** 22889 * The name of a reward 22890 * @member {String} name 22891 */ 22892 22893_RewardReducedAllOf["default"].prototype['name'] = undefined; 22894/** 22895 * Numerical value of the reward that will be issued based on the reward type 22896 * @member {Number} rewardValue 22897 */ 22898 22899_RewardReducedAllOf["default"].prototype['rewardValue'] = undefined; 22900/** 22901 * Reward Type key 22902 * @member {String} rewardType 22903 */ 22904 22905_RewardReducedAllOf["default"].prototype['rewardType'] = undefined; 22906/** 22907 * A unique id of the Reward Type 22908 * @member {String} rewardTypeId 22909 */ 22910 22911_RewardReducedAllOf["default"].prototype['rewardTypeId'] = undefined; // Implement ModelDefault interface: 22912 22913/** 22914 * Ziqni id of the model 22915 * @member {String} id 22916 */ 22917 22918_ModelDefault["default"].prototype['id'] = undefined; 22919/** 22920 * This is the space name which is linked to the account 22921 * @member {String} spaceName 22922 */ 22923 22924_ModelDefault["default"].prototype['spaceName'] = undefined; 22925/** 22926 * ISO8601 timestamp for when a Model was created. All records are stored in UTC time zone 22927 * @member {Date} created 22928 */ 22929 22930_ModelDefault["default"].prototype['created'] = undefined; 22931var _default = RewardReduced; 22932exports["default"] = _default; 22933},{"../ApiClient":3,"./ModelDefault":123,"./RewardReducedAllOf":147}],147:[function(require,module,exports){ 22934"use strict"; 22935 22936Object.defineProperty(exports, "__esModule", { 22937 value: true 22938}); 22939exports["default"] = void 0; 22940 22941var _ApiClient = _interopRequireDefault(require("../ApiClient")); 22942 22943function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 22944 22945function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 22946 22947function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 22948 22949function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 22950 22951/** 22952 * The RewardReducedAllOf model module. 22953 * @module model/RewardReducedAllOf 22954 * @version 1.0.14 22955 */ 22956var RewardReducedAllOf = /*#__PURE__*/function () { 22957 /** 22958 * Constructs a new <code>RewardReducedAllOf</code>. 22959 * @alias module:model/RewardReducedAllOf 22960 */ 22961 function RewardReducedAllOf() { 22962 _classCallCheck(this, RewardReducedAllOf); 22963 22964 RewardReducedAllOf.initialize(this); 22965 } 22966 /** 22967 * Initializes the fields of this object. 22968 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 22969 * Only for internal use. 22970 */ 22971 22972 22973 _createClass(RewardReducedAllOf, null, [{ 22974 key: "initialize", 22975 value: function initialize(obj) {} 22976 /** 22977 * Constructs a <code>RewardReducedAllOf</code> from a plain JavaScript object, optionally creating a new instance. 22978 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 22979 * @param {Object} data The plain JavaScript object bearing properties of interest. 22980 * @param {module:model/RewardReducedAllOf} obj Optional instance to populate. 22981 * @return {module:model/RewardReducedAllOf} The populated <code>RewardReducedAllOf</code> instance. 22982 */ 22983 22984 }, { 22985 key: "constructFromObject", 22986 value: function constructFromObject(data, obj) { 22987 if (data) { 22988 obj = obj || new RewardReducedAllOf(); 22989 22990 if (data.hasOwnProperty('rewardRank')) { 22991 obj['rewardRank'] = _ApiClient["default"].convertToType(data['rewardRank'], 'String'); 22992 } 22993 22994 if (data.hasOwnProperty('name')) { 22995 obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String'); 22996 } 22997 22998 if (data.hasOwnProperty('rewardValue')) { 22999 obj['rewardValue'] = _ApiClient["default"].convertToType(data['rewardValue'], 'Number'); 23000 } 23001 23002 if (data.hasOwnProperty('rewardType')) { 23003 obj['rewardType'] = _ApiClient["default"].convertToType(data['rewardType'], 'String'); 23004 } 23005 23006 if (data.hasOwnProperty('rewardTypeId')) { 23007 obj['rewardTypeId'] = _ApiClient["default"].convertToType(data['rewardTypeId'], 'String'); 23008 } 23009 } 23010 23011 return obj; 23012 } 23013 }]); 23014 23015 return RewardReducedAllOf; 23016}(); 23017/** 23018 * If used in the context of contest this will associate with the rank of the leaderboard 23019 * @member {String} rewardRank 23020 */ 23021 23022 23023RewardReducedAllOf.prototype['rewardRank'] = undefined; 23024/** 23025 * The name of a reward 23026 * @member {String} name 23027 */ 23028 23029RewardReducedAllOf.prototype['name'] = undefined; 23030/** 23031 * Numerical value of the reward that will be issued based on the reward type 23032 * @member {Number} rewardValue 23033 */ 23034 23035RewardReducedAllOf.prototype['rewardValue'] = undefined; 23036/** 23037 * Reward Type key 23038 * @member {String} rewardType 23039 */ 23040 23041RewardReducedAllOf.prototype['rewardType'] = undefined; 23042/** 23043 * A unique id of the Reward Type 23044 * @member {String} rewardTypeId 23045 */ 23046 23047RewardReducedAllOf.prototype['rewardTypeId'] = undefined; 23048var _default = RewardReducedAllOf; 23049exports["default"] = _default; 23050},{"../ApiClient":3}],148:[function(require,module,exports){ 23051"use strict"; 23052 23053Object.defineProperty(exports, "__esModule", { 23054 value: true 23055}); 23056exports["default"] = void 0; 23057 23058var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23059 23060var _EntityFilter = _interopRequireDefault(require("./EntityFilter")); 23061 23062var _QuerySortBy = _interopRequireDefault(require("./QuerySortBy")); 23063 23064function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23065 23066function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23067 23068function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23069 23070function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23071 23072/** 23073 * The RewardRequest model module. 23074 * @module model/RewardRequest 23075 * @version 1.0.14 23076 */ 23077var RewardRequest = /*#__PURE__*/function () { 23078 /** 23079 * Constructs a new <code>RewardRequest</code>. 23080 * @alias module:model/RewardRequest 23081 */ 23082 function RewardRequest() { 23083 _classCallCheck(this, RewardRequest); 23084 23085 RewardRequest.initialize(this); 23086 } 23087 /** 23088 * Initializes the fields of this object. 23089 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23090 * Only for internal use. 23091 */ 23092 23093 23094 _createClass(RewardRequest, null, [{ 23095 key: "initialize", 23096 value: function initialize(obj) {} 23097 /** 23098 * Constructs a <code>RewardRequest</code> from a plain JavaScript object, optionally creating a new instance. 23099 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23100 * @param {Object} data The plain JavaScript object bearing properties of interest. 23101 * @param {module:model/RewardRequest} obj Optional instance to populate. 23102 * @return {module:model/RewardRequest} The populated <code>RewardRequest</code> instance. 23103 */ 23104 23105 }, { 23106 key: "constructFromObject", 23107 value: function constructFromObject(data, obj) { 23108 if (data) { 23109 obj = obj || new RewardRequest(); 23110 23111 if (data.hasOwnProperty('entityFilter')) { 23112 obj['entityFilter'] = _ApiClient["default"].convertToType(data['entityFilter'], [_EntityFilter["default"]]); 23113 } 23114 23115 if (data.hasOwnProperty('languageKey')) { 23116 obj['languageKey'] = _ApiClient["default"].convertToType(data['languageKey'], 'String'); 23117 } 23118 23119 if (data.hasOwnProperty('sortBy')) { 23120 obj['sortBy'] = _ApiClient["default"].convertToType(data['sortBy'], [_QuerySortBy["default"]]); 23121 } 23122 23123 if (data.hasOwnProperty('currencyKey')) { 23124 obj['currencyKey'] = _ApiClient["default"].convertToType(data['currencyKey'], 'String'); 23125 } 23126 23127 if (data.hasOwnProperty('skip')) { 23128 obj['skip'] = _ApiClient["default"].convertToType(data['skip'], 'Number'); 23129 } 23130 23131 if (data.hasOwnProperty('limit')) { 23132 obj['limit'] = _ApiClient["default"].convertToType(data['limit'], 'Number'); 23133 } 23134 } 23135 23136 return obj; 23137 } 23138 }]); 23139 23140 return RewardRequest; 23141}(); 23142/** 23143 * @member {Array.<module:model/EntityFilter>} entityFilter 23144 */ 23145 23146 23147RewardRequest.prototype['entityFilter'] = undefined; 23148/** 23149 * The language codes can be found in the settings/transalations section of the back office 23150 * @member {String} languageKey 23151 */ 23152 23153RewardRequest.prototype['languageKey'] = undefined; 23154/** 23155 * @member {Array.<module:model/QuerySortBy>} sortBy 23156 */ 23157 23158RewardRequest.prototype['sortBy'] = undefined; 23159/** 23160 * The UoM currency key to normalise the value to for presentation. Example; If the reward is in EUR and this value is set to USD then the value will be multiplied by 1.09387699997429 23161 * @member {String} currencyKey 23162 */ 23163 23164RewardRequest.prototype['currencyKey'] = undefined; 23165/** 23166 * @member {Number} skip 23167 */ 23168 23169RewardRequest.prototype['skip'] = undefined; 23170/** 23171 * @member {Number} limit 23172 */ 23173 23174RewardRequest.prototype['limit'] = undefined; 23175var _default = RewardRequest; 23176exports["default"] = _default; 23177},{"../ApiClient":3,"./EntityFilter":62,"./QuerySortBy":141}],149:[function(require,module,exports){ 23178"use strict"; 23179 23180Object.defineProperty(exports, "__esModule", { 23181 value: true 23182}); 23183exports["default"] = void 0; 23184 23185var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23186 23187var _Error = _interopRequireDefault(require("./Error")); 23188 23189var _ResponseMeta = _in
23189teropRequireDefault(require("./ResponseMeta")); 23190 23191var _Reward = _interopRequireDefault(require("./Reward")); 23192 23193function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23194 23195function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23196 23197function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23198 23199function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23200 23201/** 23202 * The RewardResponse model module. 23203 * @module model/RewardResponse 23204 * @version 1.0.14 23205 */ 23206var RewardResponse = /*#__PURE__*/function () { 23207 /** 23208 * Constructs a new <code>RewardResponse</code>. 23209 * @alias module:model/RewardResponse 23210 */ 23211 function RewardResponse() { 23212 _classCallCheck(this, RewardResponse); 23213 23214 RewardResponse.initialize(this); 23215 } 23216 /** 23217 * Initializes the fields of this object. 23218 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23219 * Only for internal use. 23220 */ 23221 23222 23223 _createClass(RewardResponse, null, [{ 23224 key: "initialize", 23225 value: function initialize(obj) {} 23226 /** 23227 * Constructs a <code>RewardResponse</code> from a plain JavaScript object, optionally creating a new instance. 23228 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23229 * @param {Object} data The plain JavaScript object bearing properties of interest. 23230 * @param {module:model/RewardResponse} obj Optional instance to populate. 23231 * @return {module:model/RewardResponse} The populated <code>RewardResponse</code> instance. 23232 */ 23233 23234 }, { 23235 key: "constructFromObject", 23236 value: function constructFromObject(data, obj) { 23237 if (data) { 23238 obj = obj || new RewardResponse(); 23239 23240 if (data.hasOwnProperty('meta')) { 23241 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 23242 } 23243 23244 if (data.hasOwnProperty('data')) { 23245 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Reward["default"]]); 23246 } 23247 23248 if (data.hasOwnProperty('errors')) { 23249 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 23250 } 23251 } 23252 23253 return obj; 23254 } 23255 }]); 23256 23257 return RewardResponse; 23258}(); 23259/** 23260 * @member {module:model/ResponseMeta} meta 23261 */ 23262 23263 23264RewardResponse.prototype['meta'] = undefined; 23265/** 23266 * @member {Array.<module:model/Reward>} data 23267 */ 23268 23269RewardResponse.prototype['data'] = undefined; 23270/** 23271 * @member {Array.<module:model/Error>} errors 23272 */ 23273 23274RewardResponse.prototype['errors'] = undefined; 23275var _default = RewardResponse; 23276exports["default"] = _default; 23277},{"../ApiClient":3,"./Error":74,"./ResponseMeta":144,"./Reward":145}],150:[function(require,module,exports){ 23278"use strict"; 23279 23280Object.defineProperty(exports, "__esModule", { 23281 value: true 23282}); 23283exports["default"] = void 0; 23284 23285var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23286 23287function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23288 23289function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23290 23291function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23292 23293function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23294 23295/** 23296 * The RewardTypeReduced model module. 23297 * @module model/RewardTypeReduced 23298 * @version 1.0.14 23299 */ 23300var RewardTypeReduced = /*#__PURE__*/function () { 23301 /** 23302 * Constructs a new <code>RewardTypeReduced</code>. 23303 * @alias module:model/RewardTypeReduced 23304 */ 23305 function RewardTypeReduced() { 23306 _classCallCheck(this, RewardTypeReduced); 23307 23308 RewardTypeReduced.initialize(this); 23309 } 23310 /** 23311 * Initializes the fields of this object. 23312 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23313 * Only for internal use. 23314 */ 23315 23316 23317 _createClass(RewardTypeReduced, null, [{ 23318 key: "initialize", 23319 value: function initialize(obj) {} 23320 /** 23321 * Constructs a <code>RewardTypeReduced</code> from a plain JavaScript object, optionally creating a new instance. 23322 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23323 * @param {Object} data The plain JavaScript object bearing properties of interest. 23324 * @param {module:model/RewardTypeReduced} obj Optional instance to populate. 23325 * @return {module:model/RewardTypeReduced} The populated <code>RewardTypeReduced</code> instance. 23326 */ 23327 23328 }, { 23329 key: "constructFromObject", 23330 value: function constructFromObject(data, obj) { 23331 if (data) { 23332 obj = obj || new RewardTypeReduced(); 23333 23334 if (data.hasOwnProperty('key')) { 23335 obj['key'] = _ApiClient["default"].convertToType(data['key'], 'String'); 23336 } 23337 23338 if (data.hasOwnProperty('uom')) { 23339 obj['uom'] = _ApiClient["default"].convertToType(data['uom'], 'String'); 23340 } 23341 23342 if (data.hasOwnProperty('uomIsoCode')) { 23343 obj['uomIsoCode'] = _ApiClient["default"].convertToType(data['uomIsoCode'], 'String'); 23344 } 23345 23346 if (data.hasOwnProperty('uomSymbol')) { 23347 obj['uomSymbol'] = _ApiClient["default"].convertToType(data['uomSymbol'], 'String'); 23348 } 23349 23350 if (data.hasOwnProperty('uomType')) { 23351 obj['uomType'] = _ApiClient["default"].convertToType(data['uomType'], 'String'); 23352 } 23353 } 23354 23355 return obj; 23356 } 23357 }]); 23358 23359 return RewardTypeReduced; 23360}(); 23361/** 23362 * A unique key that represents the reward type 23363 * @member {String} key 23364 */ 23365 23366 23367RewardTypeReduced.prototype['key'] = undefined; 23368/** 23369 * The key assigned to the unit of measure 23370 * @member {String} uom 23371 */ 23372 23373RewardTypeReduced.prototype['uom'] = undefined; 23374/** 23375 * The ISO code assigned to the unit of measure 23376 * @member {String} uomIsoCode 23377 */ 23378 23379RewardTypeReduced.prototype['uomIsoCode'] = undefined; 23380/** 23381 * The symbol assigned to the unit of measure 23382 * @member {String} uomSymbol 23383 */ 23384 23385RewardTypeReduced.prototype['uomSymbol'] = undefined; 23386/** 23387 * The type of UOM, either Other Currency Mass Time Temperature ElectricCurrent AmountOfSubstance LuminousIntensity Distance 23388 * @member {String} uomType 23389 */ 23390 23391RewardTypeReduced.prototype['uomType'] = undefined; 23392var _default = RewardTypeReduced; 23393exports["default"] = _default; 23394},{"../ApiClient":3}],151:[function(require,module,exports){ 23395"use strict"; 23396 23397Object.defineProperty(exports, "__esModule", { 23398 value: true 23399}); 23400exports["default"] = void 0; 23401 23402var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23403 23404function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23405 23406function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23407 23408function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23409 23410function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23411 23412function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 23413 23414/** 23415* Enum class RoundType. 23416* @enum {} 23417* @readonly 23418*/ 23419var RoundType = /*#__PURE__*/function () { 23420 function RoundType() { 23421 _classCallCheck(this, RoundType); 23422 23423 _defineProperty(this, "TimeBound", "TimeBound"); 23424 23425 _defineProperty(this, "TargetBased", "TargetBased"); 23426 } 23427 23428 _createClass(RoundType, null, [{ 23429 key: "constructFromObject", 23430 value: 23431 /** 23432 * Returns a <code>RoundType</code> enum value from a Javascript object name. 23433 * @param {Object}
23433 data The plain JavaScript object containing the name of the enum value. 23434 * @return {module:model/RoundType} The enum <code>RoundType</code> value. 23435 */ 23436 function constructFromObject(object) { 23437 return object; 23438 } 23439 }]); 23440 23441 return RoundType; 23442}(); 23443 23444exports["default"] = RoundType; 23445},{"../ApiClient":3}],152:[function(require,module,exports){ 23446"use strict"; 23447 23448Object.defineProperty(exports, "__esModule", { 23449 value: true 23450}); 23451exports["default"] = void 0; 23452 23453var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23454 23455var _RuleExpression = _interopRequireDefault(require("./RuleExpression")); 23456 23457function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23458 23459function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23460 23461function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23462 23463function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23464 23465/** 23466 * The Rule model module. 23467 * @module model/Rule 23468 * @version 1.0.14 23469 */ 23470var Rule = /*#__PURE__*/function () { 23471 /** 23472 * Constructs a new <code>Rule</code>. 23473 * @alias module:model/Rule 23474 */ 23475 function Rule() { 23476 _classCallCheck(this, Rule); 23477 23478 Rule.initialize(this); 23479 } 23480 /** 23481 * Initializes the fields of this object. 23482 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23483 * Only for internal use. 23484 */ 23485 23486 23487 _createClass(Rule, null, [{ 23488 key: "initialize", 23489 value: function initialize(obj) {} 23490 /** 23491 * Constructs a <code>Rule</code> from a plain JavaScript object, optionally creating a new instance. 23492 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23493 * @param {Object} data The plain JavaScript object bearing properties of interest. 23494 * @param {module:model/Rule} obj Optional instance to populate. 23495 * @return {module:model/Rule} The populated <code>Rule</code> instance. 23496 */ 23497 23498 }, { 23499 key: "constructFromObject", 23500 value: function constructFromObject(data, obj) { 23501 if (data) { 23502 obj = obj || new Rule(); 23503 23504 if (data.hasOwnProperty('entityId')) { 23505 obj['entityId'] = _ApiClient["default"].convertToType(data['entityId'], 'String'); 23506 } 23507 23508 if (data.hasOwnProperty('action')) { 23509 obj['action'] = _ApiClient["default"].convertToType(data['action'], 'String'); 23510 } 23511 23512 if (data.hasOwnProperty('context')) { 23513 obj['context'] = _ApiClient["default"].convertToType(data['context'], 'String'); 23514 } 23515 23516 if (data.hasOwnProperty('rules')) { 23517 obj['rules'] = _RuleExpression["default"].constructFromObject(data['rules']); 23518 } 23519 23520 if (data.hasOwnProperty('id')) { 23521 obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String'); 23522 } 23523 23524 if (data.hasOwnProperty('entityType')) { 23525 obj['entityType'] = _ApiClient["default"].convertToType(data['entityType'], 'String'); 23526 } 23527 } 23528 23529 return obj; 23530 } 23531 }]); 23532 23533 return Rule; 23534}(); 23535/** 23536 * The id of the context object this rule refers to 23537 * @member {String} entityId 23538 */ 23539 23540 23541Rule.prototype['entityId'] = undefined; 23542/** 23543 * The action this rule describes, like start.contest, or points.awarded 23544 * @member {String} action 23545 */ 23546 23547Rule.prototype['action'] = undefined; 23548/** 23549 * The context of this rule like achievement, competition, or contest 23550 * @member {String} context 23551 */ 23552 23553Rule.prototype['context'] = undefined; 23554/** 23555 * @member {module:model/RuleExpression} rules 23556 */ 23557 23558Rule.prototype['rules'] = undefined; 23559/** 23560 * Unique system identifier of a Main Rule 23561 * @member {String} id 23562 */ 23563 23564Rule.prototype['id'] = undefined; 23565/** 23566 * @member {String} entityType 23567 */ 23568 23569Rule.prototype['entityType'] = undefined; 23570var _default = Rule; 23571exports["default"] = _default; 23572},{"../ApiClient":3,"./RuleExpression":154}],153:[function(require,module,exports){ 23573"use strict"; 23574 23575Object.defineProperty(exports, "__esModule", { 23576 value: true 23577}); 23578exports["default"] = void 0; 23579 23580var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23581 23582function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23583 23584function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23585 23586function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23587 23588function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23589 23590/** 23591 * The RuleArgument model module. 23592 * @module model/RuleArgument 23593 * @version 1.0.14 23594 */ 23595var RuleArgument = /*#__PURE__*/function () { 23596 /** 23597 * Constructs a new <code>RuleArgument</code>. 23598 * @alias module:model/RuleArgument 23599 * @param argument {String} 23600 */ 23601 function RuleArgument(argument) { 23602 _classCallCheck(this, RuleArgument); 23603 23604 RuleArgument.initialize(this, argument); 23605 } 23606 /** 23607 * Initializes the fields of this object. 23608 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23609 * Only for internal use. 23610 */ 23611 23612 23613 _createClass(RuleArgument, null, [{ 23614 key: "initialize", 23615 value: function initialize(obj, argument) { 23616 obj['argument'] = argument; 23617 } 23618 /** 23619 * Constructs a <code>RuleArgument</code> from a plain JavaScript object, optionally creating a new instance. 23620 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23621 * @param {Object} data The plain JavaScript object bearing properties of interest. 23622 * @param {module:model/RuleArgument} obj Optional instance to populate. 23623 * @return {module:model/RuleArgument} The populated <code>RuleArgument</code> instance. 23624 */ 23625 23626 }, { 23627 key: "constructFromObject", 23628 value: function constructFromObject(data, obj) { 23629 if (data) { 23630 obj = obj || new RuleArgument(); 23631 23632 if (data.hasOwnProperty('argument')) { 23633 obj['argument'] = _ApiClient["default"].convertToType(data['argument'], 'String'); 23634 } 23635 23636 if (data.hasOwnProperty('value')) { 23637 obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String'); 23638 } 23639 23640 if (data.hasOwnProperty('type')) { 23641 obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); 23642 } 23643 23644 if (data.hasOwnProperty('order')) { 23645 obj['order'] = _ApiClient["default"].convertToType(data['order'], 'Number'); 23646 } 23647 } 23648 23649 return obj; 23650 } 23651 }]); 23652 23653 return RuleArgument; 23654}(); 23655/** 23656 * @member {String} argument 23657 */ 23658 23659 23660RuleArgument.prototype['argument'] = undefined; 23661/** 23662 * @member {String} value 23663 */ 23664 23665RuleArgument.prototype['value'] = undefined; 23666/** 23667 * @member {String} type 23668 */ 23669 23670RuleArgument.prototype['type'] = undefined; 23671/** 23672 * @member {Number} order 23673 */ 23674 23675RuleArgument.prototype['order'] = undefined; 23676var _default = RuleArgument; 23677exports["default"] = _default; 23678},{"../ApiClient":3}],154:[function(require,module,exports){ 23679"use strict"; 23680 23681Object.defineProperty(exports, "__esModule", { 23682 value: true 23683}); 23684exports["default"] = void 0; 23685 23686var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23687 23688var _RuleRoutine = _interopRequireDefault(require("./RuleRoutine")); 23689 23690function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23691 23692function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23693 23694function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23695 23696function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23697 23698/** 23699 * The RuleExpression model module. 23700 * @module model/RuleExpression 23701 * @version 1.0.14 23702 */
23703var RuleExpression = /*#__PURE__*/function () { 23704 /** 23705 * Constructs a new <code>RuleExpression</code>. 23706 * A conditional expressions is an element that declares either a rule expression, condition or routine to be evaluated or executed 23707 * @alias module:model/RuleExpression 23708 * @param type {String} condition or expression or routine 23709 */ 23710 function RuleExpression(type) { 23711 _classCallCheck(this, RuleExpression); 23712 23713 RuleExpression.initialize(this, type); 23714 } 23715 /** 23716 * Initializes the fields of this object. 23717 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23718 * Only for internal use. 23719 */ 23720 23721 23722 _createClass(RuleExpression, null, [{ 23723 key: "initialize", 23724 value: function initialize(obj, type) { 23725 obj['type'] = type; 23726 } 23727 /** 23728 * Constructs a <code>RuleExpression</code> from a plain JavaScript object, optionally creating a new instance. 23729 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23730 * @param {Object} data The plain JavaScript object bearing properties of interest. 23731 * @param {module:model/RuleExpression} obj Optional instance to populate. 23732 * @return {module:model/RuleExpression} The populated <code>RuleExpression</code> instance. 23733 */ 23734 23735 }, { 23736 key: "constructFromObject", 23737 value: function constructFromObject(data, obj) { 23738 if (data) { 23739 obj = obj || new RuleExpression(); 23740 23741 if (data.hasOwnProperty('type')) { 23742 obj['type'] = _ApiClient["default"].convertToType(data['type'], 'String'); 23743 } 23744 23745 if (data.hasOwnProperty('mustMatchAll')) { 23746 obj['mustMatchAll'] = _ApiClient["default"].convertToType(data['mustMatchAll'], 'Boolean'); 23747 } 23748 23749 if (data.hasOwnProperty('mustEvaluateTo')) { 23750 obj['mustEvaluateTo'] = _ApiClient["default"].convertToType(data['mustEvaluateTo'], 'Boolean'); 23751 } 23752 23753 if (data.hasOwnProperty('scope')) { 23754 obj['scope'] = _ApiClient["default"].convertToType(data['scope'], 'String'); 23755 } 23756 23757 if (data.hasOwnProperty('operand')) { 23758 obj['operand'] = _ApiClient["default"].convertToType(data['operand'], 'String'); 23759 } 23760 23761 if (data.hasOwnProperty('operator')) { 23762 obj['operator'] = _ApiClient["default"].convertToType(data['operator'], 'String'); 23763 } 23764 23765 if (data.hasOwnProperty('value')) { 23766 obj['value'] = _ApiClient["default"].convertToType(data['value'], 'String'); 23767 } 23768 23769 if (data.hasOwnProperty('rules')) { 23770 obj['rules'] = _ApiClient["default"].convertToType(data['rules'], [RuleExpression]); 23771 } 23772 23773 if (data.hasOwnProperty('then')) { 23774 obj['then'] = _ApiClient["default"].convertToType(data['then'], [_RuleRoutine["default"]]); 23775 } 23776 23777 if (data.hasOwnProperty('lineNumber')) { 23778 obj['lineNumber'] = _ApiClient["default"].convertToType(data['lineNumber'], 'Number'); 23779 } 23780 } 23781 23782 return obj; 23783 } 23784 }]); 23785 23786 return RuleExpression; 23787}(); 23788/** 23789 * condition or expression or routine 23790 * @member {String} type 23791 */ 23792 23793 23794RuleExpression.prototype['type'] = undefined; 23795/** 23796 * All expressions in the condition must either evaluate to TRUE or FALSE if set to TRUE 23797 * @member {Boolean} mustMatchAll 23798 */ 23799 23800RuleExpression.prototype['mustMatchAll'] = undefined; 23801/** 23802 * All the expressions of this condition must either evaluate to TRUE or FALSE 23803 * @member {Boolean} mustEvaluateTo 23804 */ 23805 23806RuleExpression.prototype['mustEvaluateTo'] = undefined; 23807/** 23808 * The scope of the operand used in the expression 23809 * @member {String} scope 23810 */ 23811 23812RuleExpression.prototype['scope'] = undefined; 23813/** 23814 * The order the rules have to be executed in. 23815 * @member {String} operand 23816 */ 23817 23818RuleExpression.prototype['operand'] = undefined; 23819/** 23820 * [ *.* ] or [ .* ] or [ == ] or [ > ] or [ >= ] or [ <=] or [ < ] or [ <> ] 23821 * @member {String} operator 23822 */ 23823 23824RuleExpression.prototype['operator'] = undefined; 23825/** 23826 * The value associated with the expression 23827 * @member {String} value 23828 */ 23829 23830RuleExpression.prototype['value'] = undefined; 23831/** 23832 * @member {Array.<module:model/RuleExpression>} rules 23833 */ 23834 23835RuleExpression.prototype['rules'] = undefined; 23836/** 23837 * @member {Array.<module:model/RuleRoutine>} then 23838 */ 23839 23840RuleExpression.prototype['then'] = undefined; 23841/** 23842 * @member {Number} lineNumber 23843 */ 23844 23845RuleExpression.prototype['lineNumber'] = undefined; 23846var _default = RuleExpression; 23847exports["default"] = _default; 23848},{"../ApiClient":3,"./RuleRoutine":157}],155:[function(require,module,exports){ 23849"use strict"; 23850 23851Object.defineProperty(exports, "__esModule", { 23852 value: true 23853}); 23854exports["default"] = void 0; 23855 23856var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23857 23858function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23859 23860function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23861 23862function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23863 23864function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23865 23866/** 23867 * The RuleRequest model module. 23868 * @module model/RuleRequest 23869 * @version 1.0.14 23870 */ 23871var RuleRequest = /*#__PURE__*/function () { 23872 /** 23873 * Constructs a new <code>RuleRequest</code>. 23874 * @alias module:model/RuleRequest
23875 * @param entityIds {Array.<String>} 23876 */ 23877 function RuleRequest(entityIds) { 23878 _classCallCheck(this, RuleRequest); 23879 23880 RuleRequest.initialize(this, entityIds); 23881 } 23882 /** 23883 * Initializes the fields of this object. 23884 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23885 * Only for internal use. 23886 */ 23887 23888 23889 _createClass(RuleRequest, null, [{ 23890 key: "initialize", 23891 value: function initialize(obj, entityIds) { 23892 obj['entityIds'] = entityIds; 23893 } 23894 /** 23895 * Constructs a <code>RuleRequest</code> from a plain JavaScript object, optionally creating a new instance. 23896 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23897 * @param {Object} data The plain JavaScript object bearing properties of interest. 23898 * @param {module:model/RuleRequest} obj Optional instance to populate. 23899 * @return {module:model/RuleRequest} The populated <code>RuleRequest</code> instance. 23900 */ 23901 23902 }, { 23903 key: "constructFromObject", 23904 value: function constructFromObject(data, obj) { 23905 if (data) { 23906 obj = obj || new RuleRequest(); 23907 23908 if (data.hasOwnProperty('entityIds')) { 23909 obj['entityIds'] = _ApiClient["default"].convertToType(data['entityIds'], ['String']); 23910 } 23911 } 23912 23913 return obj; 23914 } 23915 }]); 23916 23917 return RuleRequest; 23918}(); 23919/** 23920 * @member {Array.<String>} entityIds 23921 */ 23922 23923 23924RuleRequest.prototype['entityIds'] = undefined; 23925var _default = RuleRequest; 23926exports["default"] = _default; 23927},{"../ApiClient":3}],156:[function(require,module,exports){ 23928"use strict"; 23929 23930Object.defineProperty(exports, "__esModule", { 23931 value: true 23932}); 23933exports["default"] = void 0; 23934 23935var _ApiClient = _interopRequireDefault(require("../ApiClient")); 23936 23937var _Error = _interopRequireDefault(require("./Error")); 23938 23939var _ResponseMeta = _interopRequireDefault(require("./ResponseMeta")); 23940 23941var _Rule = _interopRequireDefault(require("./Rule")); 23942 23943function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 23944 23945function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 23946 23947function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 23948 23949function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 23950 23951/** 23952 * The RuleResponse model module. 23953 * @module model/RuleResponse 23954 * @version 1.0.14 23955 */ 23956var RuleResponse = /*#__PURE__*/function () { 23957 /** 23958 * Constructs a new <code>RuleResponse</code>. 23959 * @alias module:model/RuleResponse 23960 */ 23961 function RuleResponse() { 23962 _classCallCheck(this, RuleResponse); 23963 23964 RuleResponse.initialize(this); 23965 } 23966 /** 23967 * Initializes the fields of this object. 23968 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 23969 * Only for internal use. 23970 */ 23971 23972 23973 _createClass(RuleResponse, null, [{ 23974 key: "initialize", 23975 value: function initialize(obj) {} 23976 /** 23977 * Constructs a <code>RuleResponse</code> from a plain JavaScript object, optionally creating a new instance. 23978 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 23979 * @param {Object} data The plain JavaScript object bearing properties of interest. 23980 * @param {module:model/RuleResponse} obj Optional instance to populate. 23981 * @return {module:model/RuleResponse} The populated <code>RuleResponse</code> instance. 23982 */ 23983 23984 }, { 23985 key: "constructFromObject", 23986 value: function constructFromObject(data, obj) { 23987 if (data) { 23988 obj = obj || new RuleResponse(); 23989 23990 if (data.hasOwnProperty('meta')) { 23991 obj['meta'] = _ResponseMeta["default"].constructFromObject(data['meta']); 23992 } 23993 23994 if (data.hasOwnProperty('data')) { 23995 obj['data'] = _ApiClient["default"].convertToType(data['data'], [_Rule["default"]]); 23996 } 23997 23998 if (data.hasOwnProperty('errors')) { 23999 obj['errors'] = _ApiClient["default"].convertToType(data['errors'], [_Error["default"]]); 24000 } 24001 } 24002 24003 return obj; 24004 } 24005 }]); 24006 24007 return RuleResponse; 24008}(); 24009/** 24010 * @member {module:model/ResponseMeta} meta 24011 */ 24012 24013 24014RuleResponse.prototype['meta'] = undefined; 24015/** 24016 * @member {Array.<module:model/Rule>} data 24017 */ 24018 24019RuleResponse.prototype['data'] = undefined; 24020/** 24021 * @member {Array.<module:model/Error>} errors 24022 */ 24023 24024RuleResponse.prototype['errors'] = undefined; 24025var _default = RuleResponse; 24026exports["default"] = _default; 24027},{"../ApiClient":3,"./Error":74,"./ResponseMeta":144,"./Rule":152}],157:[function(require,module,exports){ 24028"use strict"; 24029 24030Object.defineProperty(exports, "__esModule", { 24031 value: true 24032}); 24033exports["default"] = void 0; 24034 24035var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24036 24037var _RuleArgument = _interopRequireDefault(require("./RuleArgument")); 24038 24039function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24040 24041function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24042 24043function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24044 24045function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24046 24047/** 24048 * The RuleRoutine model module. 24049 * @module model/RuleRoutine 24050 * @version 1.0.14 24051 */ 24052var RuleRoutine = /*#__PURE__*/function () { 24053 /** 24054 * Constructs a new <code>RuleRoutine</code>. 24055 * @alias module:model/RuleRoutine 24056 */ 24057 function RuleRoutine() { 24058 _classCallCheck(this, RuleRoutine); 24059 24060 RuleRoutine.initialize(this); 24061 } 24062 /** 24063 * Initializes the fields of this object. 24064 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 24065 * Only for internal use. 24066 */ 24067 24068 24069 _createClass(RuleRoutine, null, [{ 24070 key: "initialize", 24071 value: function initialize(obj) {} 24072 /** 24073 * Constructs a <code>RuleRoutine</code> from a plain JavaScript object, optionally creating a new instance. 24074 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 24075 * @param {Object} data The plain JavaScript object bearing properties of interest. 24076 * @param {module:model/RuleRoutine} obj Optional instance to populate. 24077 * @return {module:model/RuleRoutine} The populated <code>RuleRoutine</code> instance. 24078 */ 24079 24080 }, { 24081 key: "constructFromObject", 24082 value: function constructFromObject(data, obj) { 24083 if (data) { 24084 obj = obj || new RuleRoutine(); 24085 24086 if (data.hasOwnProperty('routine')) { 24087 obj['routine'] = _ApiClient["default"].convertToType(data['routine'], 'String'); 24088 } 24089 24090 if (data.hasOwnProperty('arguments')) { 24091 obj['arguments'] = _ApiClient["default"].convertToType(data['arguments'], [_RuleArgument["default"]]); 24092 } 24093 24094 if (data.hasOwnProperty('lineNumber')) { 24095 obj['lineNumber'] = _ApiClient["default"].convertToType(data['lineNumber'], 'Number'); 24096 } 24097 } 24098 24099 return obj; 24100 } 24101 }]); 24102 24103 return RuleRoutine; 24104}(); 24105/** 24106 * A routine to execute if the conditional expressions in the matching group evaluted to true 24107 * @member {String} routine 24108 */ 24109 24110
24111RuleRoutine.prototype['routine'] = undefined; 24112/** 24113 * The arguments of the routine. 24114 * @member {Array.<module:model/RuleArgument>} arguments 24115 */ 24116 24117RuleRoutine.prototype['arguments'] = undefined; 24118/** 24119 * @member {Number} lineNumber 24120 */ 24121 24122RuleRoutine.prototype['lineNumber'] = undefined; 24123var _default = RuleRoutine; 24124exports["default"] = _default; 24125},{"../ApiClient":3,"./RuleArgument":153}],158:[function(require,module,exports){ 24126"use strict"; 24127 24128Object.defineProperty(exports, "__esModule", { 24129 value: true 24130}); 24131exports["default"] = void 0; 24132 24133var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24134 24135function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24136 24137function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24138 24139function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24140 24141function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24142 24143function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 24144 24145/** 24146* Enum class ScheduleType. 24147* @enum {} 24148* @readonly 24149*/ 24150var ScheduleType = /*#__PURE__*/function () { 24151 function ScheduleType() { 24152 _classCallCheck(this, ScheduleType); 24153 24154 _defineProperty(this, "Once", "Once"); 24155 24156 _defineProperty(this, "Repeatedly", "Repeatedly"); 24157 24158 _defineProperty(this, "Daily", "Daily"); 24159 24160 _defineProperty(this, "Weekly", "Weekly"); 24161 24162 _defineProperty(this, "Monthly", "Monthly"); 24163 } 24164 24165 _createClass(ScheduleType, null, [{ 24166 key: "constructFromObject", 24167 value: 24168 /** 24169 * Returns a <code>ScheduleType</code> enum value from a Javascript object name. 24170 * @param {Object} data The plain JavaScript object containing the name of the enum value. 24171 * @return {module:model/ScheduleType} The enum <code>ScheduleType</code> value. 24172 */ 24173 function constructFromObject(object) { 24174 return object; 24175 } 24176 }]); 24177 24178 return ScheduleType; 24179}(); 24180 24181exports["default"] = ScheduleType; 24182},{"../ApiClient":3}],159:[function(require,module,exports){ 24183"use strict"; 24184 24185Object.defineProperty(exports, "__esModule", { 24186 value: true 24187}); 24188exports["default"] = void 0; 24189 24190var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24191 24192var _ScheduleType = _interopRequireDefault(require("./ScheduleType")); 24193 24194function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24195 24196function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24197 24198function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24199 24200function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24201 24202/** 24203 * The Scheduling model module. 24204 * @module model/Scheduling 24205 * @version 1.0.14 24206 */ 24207var Scheduling = /*#__PURE__*/function () { 24208 /** 24209 * Constructs a new <code>Scheduling</code>. 24210 * @alias module:model/Scheduling 24211 * @param scheduleType {module:model/ScheduleType} 24212 * @param scheduleOccurrencesLimit {Number} A value indicating how many times it will be issued 24213 * @param every {Array.<Number>} 24214 * @param startDate {Date} The start date and time of a schedule. ISO8601 timestamp 24215 * @param constraints {Array.<String>} Additional constraints 24216 */ 24217 function Scheduling(scheduleType, scheduleOccurrencesLimit, every, startDate, constraints) { 24218 _classCallCheck(this, Scheduling); 24219 24220 Scheduling.initialize(this, scheduleType, scheduleOccurrencesLimit, every, startDate, constraints); 24221 } 24222 /** 24223 * Initializes the fields of this object. 24224 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 24225 * Only for internal use. 24226 */ 24227 24228 24229 _createClass(Scheduling, null, [{ 24230 key: "initialize", 24231 value: function initialize(obj, scheduleType, scheduleOccurrencesLimit, every, startDate, constraints) { 24232 obj['scheduleType'] = scheduleType; 24233 obj['scheduleOccurrencesLimit'] = scheduleOccurrencesLimit; 24234 obj['every'] = every; 24235 obj['startDate'] = startDate; 24236 obj['constraints'] = constraints; 24237 } 24238 /** 24239 * Constructs a <code>Scheduling</code> from a plain JavaScript object, optionally creating a new instance. 24240 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 24241 * @param {Object} data The plain JavaScript object bearing properties of interest. 24242 * @param {module:model/Scheduling} obj Optional instance to populate. 24243 * @return {module:model/Scheduling} The populated <code>Scheduling</code> instance. 24244 */ 24245 24246 }, { 24247 key: "constructFromObject", 24248 value: function constructFromObject(data, obj) { 24249 if (data) { 24250 obj = obj || new Scheduling(); 24251 24252 if (data.hasOwnProperty('scheduleType')) { 24253 obj['scheduleType'] = _ScheduleType["default"].constructFromObject(data['scheduleType']); 24254 } 24255 24256 if (data.hasOwnProperty('scheduleOccurrencesLimit')) { 24257 obj['scheduleOccurrencesLimit'] = _ApiClient["default"].convertToType(data['scheduleOccurrencesLimit'], 'Number'); 24258 } 24259 24260 if (data.hasOwnProperty('every')) { 24261 obj['every'] = _ApiClient["default"].convertToType(data['every'], ['Number']); 24262 } 24263 24264 if (data.hasOwnProperty('startDate')) { 24265 obj['startDate'] = _ApiClient["default"].convertToType(data['startDate'], 'Date'); 24266 } 24267 24268 if (data.hasOwnProperty('endDate')) { 24269 obj['endDate'] = _ApiClient["default"].convertToType(data['endDate'], 'Date'); 24270 } 24271 24272 if (data.hasOwnProperty('constraints')) { 24273 obj['constraints'] = _ApiClient["default"].convertToType(data['constraints'], ['String']); 24274 } 24275 } 24276 24277 return obj; 24278 } 24279 }]); 24280 24281 return Scheduling; 24282}(); 24283/** 24284 * @member {module:model/ScheduleType} scheduleType 24285 */ 24286 24287 24288Scheduling.prototype['scheduleType'] = undefined; 24289/** 24290 * A value indicating how many times it will be issued 24291 * @member {Number} scheduleOccurrencesLimit 24292 */ 24293 24294Scheduling.prototype['scheduleOccurrencesLimit'] = undefined; 24295/** 24296 * @member {Array.<Number>} every 24297 */ 24298 24299Scheduling.prototype['every'] = undefined; 24300/** 24301 * The start date and time of a schedule. ISO8601 timestamp 24302 * @member {Date} startDate 24303 */ 24304 24305Scheduling.prototype['startDate'] = undefined; 24306/** 24307 * The end date and time of a schedule. ISO8601 timestamp 24308 * @member {Date} endDate 24309 */ 24310 24311Scheduling.prototype['endDate'] = undefined; 24312/** 24313 * Additional constraints 24314 * @member {Array.<String>} constraints 24315 */ 24316 24317Scheduling.prototype['constraints'] = undefined; 24318var _default = Scheduling; 24319exports["default"] = _default; 24320},{"../ApiClient":3,"./ScheduleType":158}],160:[function(require,module,exports){ 24321"use strict"; 24322 24323Object.defineProperty(exports, "__esModule", { 24324 value: true 24325}); 24326exports["default"] = void 0; 24327 24328var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24329 24330function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24331 24332function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24333 24334function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24335 24336function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24337 24338/** 24339 * The ScoringStrategy model module. 24340 * @module model/ScoringStrategy 24341 * @version 1.0.14 24342 */ 24343var ScoringStrategy = /*#__PURE__*/function () { 24344 /** 24345 * Constructs a new <code>ScoringStrategy</code>. 24346 * @alias module:model/ScoringStrategy 24347 */ 24348 function ScoringStrategy() { 24349 _classCallCheck(this, ScoringStrategy); 24350 24351 ScoringStrategy.initialize(this); 24352 } 24353 /** 24354 * Initializes the fields of this object. 24355 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 24356 * Only for internal use. 24357 */ 24358 24359 24360 _createClass(ScoringStrategy, null, [{ 24361 key: "initialize", 24362 value: function initialize(obj) {} 24363 /** 24364 * Constructs a <code>ScoringStrategy</code> from a plain JavaScript object, optionally creating a new instance. 24365 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 24366 * @param {Object} data The plain JavaScript object bearing properties of interest. 24367 * @param {module:model/ScoringStrategy} obj Optional instance to populate. 24368 * @return {module:model/ScoringStrategy} The populated <code>ScoringStrategy</code> instance. 24369 */ 24370 24371 }, { 24372 key: "constructFromObject", 24373 value: function constructFromObject(data, obj) { 24374 if (data) { 24375 obj = obj || new ScoringStrategy(); 24376 24377 if (data.hasOwnProperty('limitUpdatesTo')) { 24378 obj['limitUpdatesTo'] = _ApiClient["default"].convertToType(data['limitUpdatesTo'], 'Number'); 24379 } 24380 24381 if (data.hasOwnProperty('sumBestXOf')) { 24382 obj['sumBestXOf'] = _ApiClient["default"].convertToType(data['sumBestXOf'], 'Number'); 24383 } 24384 24385 if (data.hasOwnProperty('lastUpdateTimeStamp')) { 24386 obj['lastUpdateTimeStamp'] = _ApiClient["default"].convertToType(data['lastUpdateTimeStamp'], 'Number'); 24387 } 24388 24389 if (data.hasOwnProperty('recordTimeWhenSumReaches')) { 24390 obj['recordTimeWhenSumReaches'] = _ApiClient["default"].convertToType(data['recordTimeWhenSumReaches'], 'Number'); 24391 } 24392 } 24393 24394 return obj; 24395 } 24396 }]); 24397 24398 return ScoringStrategy; 24399}(); 24400/** 24401 * The scoring strategies types \"SumBest\" value 24402 * @member {Number} limitUpdatesTo 24403 */ 24404 24405 24406ScoringStrategy.prototype['limitUpdatesTo'] = undefined; 24407/** 24408 * The scoring strategies types \"LimitedTo\" value 24409 * @member {Number} sumBestXOf 24410 */ 24411 24412ScoringStrategy.prototype['sumBestXOf'] = undefined; 24413/** 24414 * The scoring strategies types \"FirstTo\" value 24415 * @member {Number} lastUpdateTimeStamp 24416 */ 24417 24418ScoringStrategy.prototype['lastUpdateTimeStamp'] = undefined; 24419/** 24420 * Not supported at the moment 24421 * @member {Number} recordTimeWhenSumReaches 24422 */ 24423 24424ScoringStrategy.prototype['recordTimeWhenSumReaches'] = undefined; 24425var _default = ScoringStrategy; 24426exports["default"] = _default; 24427},{"../ApiClient":3}],161:[function(require,module,exports){ 24428"use strict"; 24429 24430Object.defineProperty(exports, "__esModule", { 24431 value: true 24432}); 24433exports["default"] = void 0; 24434 24435var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24436 24437function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24438 24439function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24440 24441function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24442 24443function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24444 24445function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 24446 24447/** 24448* Enum class SortOrder. 24449* @enum {} 24450* @readonly 24451*/ 24452var SortOrder = /*#__PURE__*/function () { 24453 function SortOrder() { 24454 _classCallCheck(this, SortOrder); 24455 24456 _defineProperty(this, "Asc", "Asc"); 24457 24458 _defineProperty(this, "Desc", "Desc"); 24459 } 24460 24461 _createClass(SortOrder, null, [{ 24462 key: "constructFromObject", 24463 value: 24464 /** 24465 * Returns a <code>SortOrder</code> enum value from a Javascript object name. 24466 * @param {Object}
24466 data The plain JavaScript object containing the name of the enum value. 24467 * @return {module:model/SortOrder} The enum <code>SortOrder</code> value. 24468 */ 24469 function constructFromObject(object) { 24470 return object; 24471 } 24472 }]); 24473 24474 return SortOrder; 24475}(); 24476 24477exports["default"] = SortOrder; 24478},{"../ApiClient":3}],162:[function(require,module,exports){ 24479"use strict"; 24480 24481Object.defineProperty(exports, "__esModule", { 24482 value: true 24483}); 24484exports["default"] = void 0; 24485 24486var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24487 24488var _RankingStrategy = _interopRequireDefault(require("./RankingStrategy")); 24489 24490var _ScoringStrategy = _interopRequireDefault(require("./ScoringStrategy")); 24491 24492var _StrategyType = _interopRequireDefault(require("./StrategyType")); 24493 24494function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24495 24496function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24497 24498function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24499 24500function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24501 24502/** 24503 * The Strategy model module. 24504 * @module model/Strategy 24505 * @version 1.0.14 24506 */ 24507var Strategy = /*#__PURE__*/function () { 24508 /** 24509 * Constructs a new <code>Strategy</code>. 24510 * @alias module:model/Strategy 24511 */ 24512 function Strategy() { 24513 _classCallCheck(this, Strategy); 24514 24515 Strategy.initialize(this); 24516 } 24517 /** 24518 * Initializes the fields of this object. 24519 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 24520 * Only for internal use. 24521 */ 24522 24523 24524 _createClass(Strategy, null, [{ 24525 key: "initialize", 24526 value: function initialize(obj) {} 24527 /** 24528 * Constructs a <code>Strategy</code> from a plain JavaScript object, optionally creating a new instance. 24529 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 24530 * @param {Object} data The plain JavaScript object bearing properties of interest. 24531 * @param {module:model/Strategy} obj Optional instance to populate. 24532 * @return {module:model/Strategy} The populated <code>Strategy</code> instance. 24533 */ 24534 24535 }, { 24536 key: "constructFromObject", 24537 value: function constructFromObject(data, obj) { 24538 if (data) { 24539 obj = obj || new Strategy(); 24540 24541 if (data.hasOwnProperty('strategyType')) { 24542 obj['strategyType'] = _StrategyType["default"].constructFromObject(data['strategyType']); 24543 } 24544 24545 if (data.hasOwnProperty('rankingStrategy')) { 24546 obj['rankingStrategy'] = _RankingStrategy["default"].constructFromObject(data['rankingStrategy']); 24547 } 24548 24549 if (data.hasOwnProperty('scoringStrategy')) { 24550 obj['scoringStrategy'] = _ScoringStrategy["default"].constructFromObject(data['scoringStrategy']); 24551 } 24552 } 24553 24554 return obj; 24555 } 24556 }]); 24557 24558 return Strategy; 24559}(); 24560/** 24561 * @member {module:model/StrategyType} strategyType 24562 */ 24563 24564 24565Strategy.prototype['strategyType'] = undefined; 24566/** 24567 * @member {module:model/RankingStrategy} rankingStrategy 24568 */ 24569 24570Strategy.prototype['rankingStrategy'] = undefined; 24571/** 24572 * @member {module:model/ScoringStrategy} scoringStrategy 24573 */ 24574 24575Strategy.prototype['scoringStrategy'] = undefined; 24576var _default = Strategy; 24577exports["default"] = _default; 24578},{"../ApiClient":3,"./RankingStrategy":143,"./ScoringStrategy":160,"./StrategyType":163}],163:[function(require,module,exports){ 24579"use strict"; 24580 24581Object.defineProperty(exports, "__esModule", { 24582 value: true 24583}); 24584exports["default"] = void 0; 24585 24586var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24587 24588function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24589 24590function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24591 24592function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24593 24594function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24595 24596function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 24597 24598/** 24599* Enum class StrategyType. 24600* @enum {} 24601* @readonly 24602*/ 24603var StrategyType = /*#__PURE__*/function () { 24604 function StrategyType() { 24605 _classCallCheck(this, StrategyType); 24606 24607 _defineProperty(this, "TotalCumulative", "TotalCumulative"); 24608 24609 _defineProperty(this, "SumBest", "SumBest"); 24610 24611 _defineProperty(this, "LimitedTo", "LimitedTo"); 24612 24613 _defineProperty(this, "FirstTo", "FirstTo"); 24614 } 24615 24616 _createClass(StrategyType, null, [{ 24617 key: "constructFromObject", 24618 value: 24619 /** 24620 * Returns a <code>StrategyType</code> enum value from a Javascript object name. 24621 * @param {Object}
24621 data The plain JavaScript object containing the name of the enum value. 24622 * @return {module:model/StrategyType} The enum <code>StrategyType</code> value. 24623 */ 24624 function constructFromObject(object) { 24625 return object; 24626 } 24627 }]); 24628 24629 return StrategyType; 24630}(); 24631 24632exports["default"] = StrategyType; 24633},{"../ApiClient":3}],164:[function(require,module,exports){ 24634"use strict"; 24635 24636Object.defineProperty(exports, "__esModule", { 24637 value: true 24638}); 24639exports["default"] = void 0; 24640 24641var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24642 24643function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24644 24645function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24646 24647function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24648 24649function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24650 24651/** 24652 * The TagFilter model module. 24653 * @module model/TagFilter 24654 * @version 1.0.14 24655 */ 24656var TagFilter = /*#__PURE__*/function () { 24657 /** 24658 * Constructs a new <code>TagFilter</code>. 24659 * @alias module:model/TagFilter 24660 * @param tag {String} 24661 * @param operand {String} must or mustNot 24662 */ 24663 function TagFilter(tag, operand) { 24664 _classCallCheck(this, TagFilter); 24665 24666 TagFilter.initialize(this, tag, operand); 24667 } 24668 /** 24669 * Initializes the fields of this object. 24670 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 24671 * Only for internal use. 24672 */ 24673 24674 24675 _createClass(TagFilter, null, [{ 24676 key: "initialize", 24677 value: function initialize(obj, tag, operand) { 24678 obj['tag'] = tag; 24679 obj['operand'] = operand; 24680 } 24681 /** 24682 * Constructs a <code>TagFilter</code> from a plain JavaScript object, optionally creating a new instance. 24683 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 24684 * @param {Object} data The plain JavaScript object bearing properties of interest. 24685 * @param {module:model/TagFilter} obj Optional instance to populate. 24686 * @return {module:model/TagFilter} The populated <code>TagFilter</code> instance. 24687 */ 24688 24689 }, { 24690 key: "constructFromObject", 24691 value: function constructFromObject(data, obj) { 24692 if (data) { 24693 obj = obj || new TagFilter(); 24694 24695 if (data.hasOwnProperty('tag')) { 24696 obj['tag'] = _ApiClient["default"].convertToType(data['tag'], 'String'); 24697 } 24698 24699 if (data.hasOwnProperty('operand')) { 24700 obj['operand'] = _ApiClient["default"].convertToType(data['operand'], 'String'); 24701 } 24702 } 24703 24704 return obj; 24705 } 24706 }]); 24707 24708 return TagFilter; 24709}(); 24710/** 24711 * @member {String} tag 24712 */ 24713 24714 24715TagFilter.prototype['tag'] = undefined; 24716/** 24717 * must or mustNot 24718 * @member {String} operand 24719 */ 24720 24721TagFilter.prototype['operand'] = undefined; 24722var _default = TagFilter; 24723exports["default"] = _default; 24724},{"../ApiClient":3}],165:[function(require,module,exports){ 24725"use strict"; 24726 24727Object.defineProperty(exports, "__esModule", { 24728 value: true 24729}); 24730exports["default"] = void 0; 24731 24732var _ApiClient = _interopRequireDefault(require("../ApiClient")); 24733 24734function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } 24735 24736function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 24737 24738function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 24739 24740function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } 24741 24742/** 24743 * The UnsubscribeRequest model module. 24744 * @module model/UnsubscribeRequest 24745 * @version 1.0.14 24746 */ 24747var UnsubscribeRequest = /*#__PURE__*/function () { 24748 /** 24749 * Constructs a new <code>UnsubscribeRequest</code>. 24750 * @alias module:model/UnsubscribeRequest 24751 * @param sunscriptionId {String} 24752 */ 24753 function UnsubscribeRequest(sunscriptionId) { 24754 _classCallCheck(this, UnsubscribeRequest); 24755 24756 UnsubscribeRequest.initialize(this, sunscriptionId); 24757 } 24758 /** 24759 * Initializes the fields of this object. 24760 * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 24761 * Only for internal use. 24762 */ 24763 24764 24765 _createClass(UnsubscribeRequest, null, [{ 24766 key: "initialize", 24767 value: function initialize(obj, sunscriptionId) { 24768 obj['sunscriptionId'] = sunscriptionId; 24769 } 24770 /** 24771 * Constructs a <code>UnsubscribeRequest</code> from a plain JavaScript object, optionally creating a new instance. 24772 * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. 24773 * @param {Object} data The plain JavaScript object bearing properties of interest. 24774 * @param {module:model/UnsubscribeRequest} obj Optional instance to populate. 24775 * @return {module:model/UnsubscribeRequest} The populated <code>UnsubscribeRequest</code> instance. 24776 */ 24777 24778 }, { 24779 key: "constructFromObject", 24780 value: function constructFromObject(data, obj) { 24781 if (data) { 24782 obj = obj || new UnsubscribeRequest(); 24783 24784 if (data.hasOwnProperty('sunscriptionId')) { 24785 obj['sunscriptionId'] = _ApiClient["default"].convertToType(data['sunscriptionId'], 'String'); 24786 } 24787 } 24788 24789 return obj; 24790 } 24791 }]); 24792 24793 return UnsubscribeRequest; 24794}(); 24795/** 24796 * @member {String} sunscriptionId 24797 */ 24798 24799 24800UnsubscribeRequest.prototype['sunscriptionId'] = undefined; 24801var _default = UnsubscribeRequest; 24802exports["default"] = _default; 24803},{"../ApiClient":3}],166:[function(require,module,exports){ 24804'use strict' 24805 24806exports.byteLength = byteLength 24807exports.toByteArray = toByteArray 24808exports.fromByteArray = fromByteArray 24809 24810var lookup = [] 24811var revLookup = [] 24812var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array 24813 24814var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 3,759 bytes, lines 24814-24960
24814+/' 24815for (var i = 0, len = code.length; i < len; ++i) { 24816 lookup[i] = code[i] 24817 revLookup[code.charCodeAt(i)] = i 24818} 24819 24820// Support decoding URL-safe base64 strings, as Node.js does. 24821// See: https://en.wikipedia.org/wiki/Base64#URL_applications 24822revLookup['-'.charCodeAt(0)] = 62 24823revLookup['_'.charCodeAt(0)] = 63 24824 24825function getLens (b64) { 24826 var len = b64.length 24827 24828 if (len % 4 > 0) { 24829 throw new Error('Invalid string. Length must be a multiple of 4') 24830 } 24831 24832 // Trim off extra bytes after placeholder bytes are found 24833 // See: https://github.com/beatgammit/base64-js/issues/42 24834 var validLen = b64.indexOf('=') 24835 if (validLen === -1) validLen = len 24836 24837 var placeHoldersLen = validLen === len 24838 ? 0 24839 : 4 - (validLen % 4) 24840 24841 return [validLen, placeHoldersLen] 24842} 24843 24844// base64 is 4/3 + up to two characters of the original data 24845function byteLength (b64) { 24846 var lens = getLens(b64) 24847 var validLen = lens[0] 24848 var placeHoldersLen = lens[1] 24849 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen 24850} 24851 24852function _byteLength (b64, validLen, placeHoldersLen) { 24853 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen 24854} 24855 24856function toByteArray (b64) { 24857 var tmp 24858 var lens = getLens(b64) 24859 var validLen = lens[0] 24860 var placeHoldersLen = lens[1] 24861 24862 var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) 24863 24864 var curByte = 0 24865 24866 // if there are placeholders, only get up to the last complete 4 chars 24867 var len = placeHoldersLen > 0 24868 ? validLen - 4 24869 : validLen 24870 24871 var i 24872 for (i = 0; i < len; i += 4) { 24873 tmp = 24874 (revLookup[b64.charCodeAt(i)] << 18) | 24875 (revLookup[b64.charCodeAt(i + 1)] << 12) | 24876 (revLookup[b64.charCodeAt(i + 2)] << 6) | 24877 revLookup[b64.charCodeAt(i + 3)] 24878 arr[curByte++] = (tmp >> 16) & 0xFF 24879 arr[curByte++] = (tmp >> 8) & 0xFF 24880 arr[curByte++] = tmp & 0xFF 24881 } 24882 24883 if (placeHoldersLen === 2) { 24884 tmp = 24885 (revLookup[b64.charCodeAt(i)] << 2) | 24886 (revLookup[b64.charCodeAt(i + 1)] >> 4) 24887 arr[curByte++] = tmp & 0xFF 24888 } 24889 24890 if (placeHoldersLen === 1) { 24891 tmp = 24892 (revLookup[b64.charCodeAt(i)] << 10) | 24893 (revLookup[b64.charCodeAt(i + 1)] << 4) | 24894 (revLookup[b64.charCodeAt(i + 2)] >> 2) 24895 arr[curByte++] = (tmp >> 8) & 0xFF 24896 arr[curByte++] = tmp & 0xFF 24897 } 24898 24899 return arr 24900} 24901 24902function tripletToBase64 (num) { 24903 return lookup[num >> 18 & 0x3F] + 24904 lookup[num >> 12 & 0x3F] + 24905 lookup[num >> 6 & 0x3F] + 24906 lookup[num & 0x3F] 24907} 24908 24909function encodeChunk (uint8, start, end) { 24910 var tmp 24911 var output = [] 24912 for (var i = start; i < end; i += 3) { 24913 tmp = 24914 ((uint8[i] << 16) & 0xFF0000) + 24915 ((uint8[i + 1] << 8) & 0xFF00) + 24916 (uint8[i + 2] & 0xFF) 24917 output.push(tripletToBase64(tmp)) 24918 } 24919 return output.join('') 24920} 24921 24922function fromByteArray (uint8) { 24923 var tmp 24924 var len = uint8.length 24925 var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes 24926 var parts = [] 24927 var maxChunkLength = 16383 // must be multiple of 3 24928 24929 // go through the array every three bytes, we'll deal with trailing stuff later 24930 for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { 24931 parts.push(encodeChunk( 24932 uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) 24933 )) 24934 } 24935 24936 // pad the end with zeros, but make sure to not forget the extra bytes 24937 if (extraBytes === 1) { 24938 tmp = uint8[len - 1] 24939 parts.push( 24940 lookup[tmp >> 2] + 24941 lookup[(tmp << 4) & 0x3F] + 24942 '==' 24943 ) 24944 } else if (extraBytes === 2) { 24945 tmp = (uint8[len - 2] << 8) + uint8[len - 1] 24946 parts.push( 24947 lookup[tmp >> 10] + 24948 lookup[(tmp >> 4) & 0x3F] + 24949 lookup[(tmp << 2) & 0x3F] + 24950 '=' 24951 ) 24952 } 24953 24954 return parts.join('') 24955} 24956 24957},{}],167:[function(require,module,exports){ 24958 24959},{}],168:[function(require,module,exports){ 24960(function (Buffer
vendor: 4,818 bytes, lines 24960-25126
24960){ 24961/*! 24962 * The buffer module from node.js, for the browser. 24963 * 24964 * @author Feross Aboukhadijeh <https://feross.org> 24965 * @license MIT 24966 */ 24967/* eslint-disable no-proto */ 24968 24969'use strict' 24970 24971var base64 = require('base64-js') 24972var ieee754 = require('ieee754') 24973 24974exports.Buffer = Buffer 24975exports.SlowBuffer = SlowBuffer 24976exports.INSPECT_MAX_BYTES = 50 24977 24978var K_MAX_LENGTH = 0x7fffffff 24979exports.kMaxLength = K_MAX_LENGTH 24980 24981/** 24982 * If `Buffer.TYPED_ARRAY_SUPPORT`: 24983 * === true Use Uint8Array implementation (fastest) 24984 * === false Print warning and recommend using `buffer` v4.x which has an Object 24985 * implementation (most compatible, even IE6) 24986 * 24987 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, 24988 * Opera 11.6+, iOS 4.2+. 24989 * 24990 * We report that the browser does not support typed arrays if the are not subclassable 24991 * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` 24992 * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support 24993 * for __proto__ and has a buggy typed array implementation. 24994 */ 24995Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() 24996 24997if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && 24998 typeof console.error === 'function') { 24999 console.error( 25000 'This browser lacks typed array (Uint8Array) support which is required by ' + 25001 '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' 25002 ) 25003} 25004 25005function typedArraySupport () { 25006 // Can typed array instances can be augmented? 25007 try { 25008 var arr = new Uint8Array(1) 25009 arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } 25010 return arr.foo() === 42 25011 } catch (e) { 25012 return false 25013 } 25014} 25015 25016Object.defineProperty(Buffer.prototype, 'parent', { 25017 enumerable: true, 25018 get: function () { 25019 if (!Buffer.isBuffer(this)) return undefined 25020 return this.buffer 25021 } 25022}) 25023 25024Object.defineProperty(Buffer.prototype, 'offset', { 25025 enumerable: true, 25026 get: function () { 25027 if (!Buffer.isBuffer(this)) return undefined 25028 return this.byteOffset 25029 } 25030}) 25031 25032function createBuffer (length) { 25033 if (length > K_MAX_LENGTH) { 25034 throw new RangeError('The value "' + length + '" is invalid for option "size"') 25035 } 25036 // Return an augmented `Uint8Array` instance 25037 var buf = new Uint8Array(length) 25038 buf.__proto__ = Buffer.prototype 25039 return buf 25040} 25041 25042/** 25043 * The Buffer constructor returns instances of `Uint8Array` that have their 25044 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of 25045 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods 25046 * and the `Uint8Array` methods. Square bracket notation works as expected -- it 25047 * returns a single octet. 25048 * 25049 * The `Uint8Array` prototype remains unmodified. 25050 */ 25051 25052function Buffer (arg, encodingOrOffset, length) { 25053 // Common case. 25054 if (typeof arg === 'number') { 25055 if (typeof encodingOrOffset === 'string') { 25056 throw new TypeError( 25057 'The "string" argument must be of type string. Received type number' 25058 ) 25059 } 25060 return allocUnsafe(arg) 25061 } 25062 return from(arg, encodingOrOffset, length) 25063} 25064 25065// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 25066if (typeof Symbol !== 'undefined' && Symbol.species != null && 25067 Buffer[Symbol.species] === Buffer) { 25068 Object.defineProperty(Buffer, Symbol.species, { 25069 value: null, 25070 configurable: true, 25071 enumerable: false, 25072 writable: false 25073 }) 25074} 25075 25076Buffer.poolSize = 8192 // not used by this implementation 25077 25078function from (value, encodingOrOffset, length) { 25079 if (typeof value === 'string') { 25080 return fromString(value, encodingOrOffset) 25081 } 25082 25083 if (ArrayBuffer.isView(value)) { 25084 return fromArrayLike(value) 25085 } 25086 25087 if (value == null) { 25088 throw TypeError( 25089 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 25090 'or Array-like Object. Received type ' + (typeof value) 25091 ) 25092 } 25093 25094 if (isInstance(value, ArrayBuffer) || 25095 (value && isInstance(value.buffer, ArrayBuffer))) { 25096 return fromArrayBuffer(value, encodingOrOffset, length) 25097 } 25098 25099 if (typeof value === 'number') { 25100 throw new TypeError( 25101 'The "value" argument must not be of type number. Received type number' 25102 ) 25103 } 25104 25105 var valueOf = value.valueOf && value.valueOf() 25106 if (valueOf != null && valueOf !== value) { 25107 return Buffer.from(valueOf, encodingOrOffset, length) 25108 } 25109 25110 var b = fromObject(value) 25111 if (b) return b 25112 25113 if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && 25114 typeof value[Symbol.toPrimitive] === 'function') { 25115 return Buffer.from( 25116 value[Symbol.toPrimitive]('string'), encodingOrOffset, length 25117 ) 25118 } 25119 25120 throw new TypeError( 25121 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 25122 'or Array-like Object. Received type ' + (typeof value) 25123 ) 25124} 25125 25126/**
vendor: 43,959 bytes, lines 25127-26739
25127 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError 25128 * if value is a number. 25129 * Buffer.from(str[, encoding]) 25130 * Buffer.from(array) 25131 * Buffer.from(buffer) 25132 * Buffer.from(arrayBuffer[, byteOffset[, length]]) 25133 **/ 25134Buffer.from = function (value, encodingOrOffset, length) { 25135 return from(value, encodingOrOffset, length) 25136} 25137 25138// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: 25139// https://github.com/feross/buffer/pull/148 25140Buffer.prototype.__proto__ = Uint8Array.prototype 25141Buffer.__proto__ = Uint8Array 25142 25143function assertSize (size) { 25144 if (typeof size !== 'number') { 25145 throw new TypeError('"size" argument must be of type number') 25146 } else if (size < 0) { 25147 throw new RangeError('The value "' + size + '" is invalid for option "size"') 25148 } 25149} 25150 25151function alloc (size, fill, encoding) { 25152 assertSize(size) 25153 if (size <= 0) { 25154 return createBuffer(size) 25155 } 25156 if (fill !== undefined) { 25157 // Only pay attention to encoding if it's a string. This 25158 // prevents accidentally sending in a number that would 25159 // be interpretted as a start offset. 25160 return typeof encoding === 'string' 25161 ? createBuffer(size).fill(fill, encoding) 25162 : createBuffer(size).fill(fill) 25163 } 25164 return createBuffer(size) 25165} 25166 25167/** 25168 * Creates a new filled Buffer instance. 25169 * alloc(size[, fill[, encoding]]) 25170 **/ 25171Buffer.alloc = function (size, fill, encoding) { 25172 return alloc(size, fill, encoding) 25173} 25174 25175function allocUnsafe (size) { 25176 assertSize(size) 25177 return createBuffer(size < 0 ? 0 : checked(size) | 0) 25178} 25179 25180/** 25181 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. 25182 * */ 25183Buffer.allocUnsafe = function (size) { 25184 return allocUnsafe(size) 25185} 25186/** 25187 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. 25188 */ 25189Buffer.allocUnsafeSlow = function (size) { 25190 return allocUnsafe(size) 25191} 25192 25193function fromString (string, encoding) { 25194 if (typeof encoding !== 'string' || encoding === '') { 25195 encoding = 'utf8' 25196 } 25197 25198 if (!Buffer.isEncoding(encoding)) { 25199 throw new TypeError('Unknown encoding: ' + encoding) 25200 } 25201 25202 var length = byteLength(string, encoding) | 0 25203 var buf = createBuffer(length) 25204 25205 var actual = buf.write(string, encoding) 25206 25207 if (actual !== length) { 25208 // Writing a hex string, for example, that contains invalid characters will 25209 // cause everything after the first invalid character to be ignored. (e.g. 25210 // 'abxxcd' will be treated as 'ab') 25211 buf = buf.slice(0, actual) 25212 } 25213 25214 return buf 25215} 25216 25217function fromArrayLike (array) { 25218 var length = array.length < 0 ? 0 : checked(array.length) | 0 25219 var buf = createBuffer(length) 25220 for (var i = 0; i < length; i += 1) { 25221 buf[i] = array[i] & 255 25222 } 25223 return buf 25224} 25225 25226function fromArrayBuffer (array, byteOffset, length) { 25227 if (byteOffset < 0 || array.byteLength < byteOffset) { 25228 throw new RangeError('"offset" is outside of buffer bounds') 25229 } 25230 25231 if (array.byteLength < byteOffset + (length || 0)) { 25232 throw new RangeError('"length" is outside of buffer bounds') 25233 } 25234 25235 var buf 25236 if (byteOffset === undefined && length === undefined) { 25237 buf = new Uint8Array(array) 25238 } else if (length === undefined) { 25239 buf = new Uint8Array(array, byteOffset) 25240 } else { 25241 buf = new Uint8Array(array, byteOffset, length) 25242 } 25243 25244 // Return an augmented `Uint8Array` instance 25245 buf.__proto__ = Buffer.prototype 25246 return buf 25247} 25248 25249function fromObject (obj) { 25250 if (Buffer.isBuffer(obj)) { 25251 var len = checked(obj.length) | 0 25252 var buf = createBuffer(len) 25253 25254 if (buf.length === 0) { 25255 return buf 25256 } 25257 25258 obj.copy(buf, 0, 0, len) 25259 return buf 25260 } 25261 25262 if (obj.length !== undefined) { 25263 if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { 25264 return createBuffer(0) 25265 } 25266 return fromArrayLike(obj) 25267 } 25268 25269 if (obj.type === 'Buffer' && Array.isArray(obj.data)) { 25270 return fromArrayLike(obj.data) 25271 } 25272} 25273 25274function checked (length) { 25275 // Note: cannot use `length < K_MAX_LENGTH` here because that fails when 25276 // length is NaN (which is otherwise coerced to zero.) 25277 if (length >= K_MAX_LENGTH) { 25278 throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 25279 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') 25280 } 25281 return length | 0 25282} 25283 25284function SlowBuffer (length) { 25285 if (+length != length) { // eslint-disable-line eqeqeq 25286 length = 0 25287 } 25288 return Buffer.alloc(+length) 25289} 25290 25291Buffer.isBuffer = function isBuffer (b) { 25292 return b != null && b._isBuffer === true && 25293 b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false 25294} 25295 25296Buffer.compare = function compare (a, b) { 25297 if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) 25298 if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) 25299 if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { 25300 throw new TypeError( 25301 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' 25302 ) 25303 } 25304 25305 if (a === b) return 0 25306 25307 var x = a.length 25308 var y = b.length 25309 25310 for (var i = 0, len = Math.min(x, y); i < len; ++i) { 25311 if (a[i] !== b[i]) { 25312 x = a[i] 25313 y = b[i] 25314 break 25315 } 25316 } 25317 25318 if (x < y) return -1 25319 if (y < x) return 1 25320 return 0 25321} 25322 25323Buffer.isEncoding = function isEncoding (encoding) { 25324 switch (String(encoding).toLowerCase()) { 25325 case 'hex': 25326 case 'utf8': 25327 case 'utf-8': 25328 case 'ascii': 25329 case 'latin1': 25330 case 'binary': 25331 case 'base64': 25332 case 'ucs2': 25333 case 'ucs-2': 25334 case 'utf16le': 25335 case 'utf-16le': 25336 return true 25337 default: 25338 return false 25339 } 25340} 25341 25342Buffer.concat = function concat (list, length) { 25343 if (!Array.isArray(list)) { 25344 throw new TypeError('"list" argument must be an Array of Buffers') 25345 } 25346 25347 if (list.length === 0) { 25348 return Buffer.alloc(0) 25349 } 25350 25351 var i 25352 if (length === undefined) { 25353 length = 0 25354 for (i = 0; i < list.length; ++i) { 25355 length += list[i].length 25356 } 25357 } 25358 25359 var buffer = Buffer.allocUnsafe(length) 25360 var pos = 0 25361 for (i = 0; i < list.length; ++i) { 25362 var buf = list[i] 25363 if (isInstance(buf, Uint8Array)) { 25364 buf = Buffer.from(buf) 25365 } 25366 if (!Buffer.isBuffer(buf)) { 25367 throw new TypeError('"list" argument must be an Array of Buffers') 25368 } 25369 buf.copy(buffer, pos) 25370 pos += buf.length 25371 } 25372 return buffer 25373} 25374 25375function byteLength (string, encoding) { 25376 if (Buffer.isBuffer(string)) { 25377 return string.length 25378 } 25379 if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { 25380 return string.byteLength 25381 } 25382 if (typeof string !== 'string') { 25383 throw new TypeError( 25384 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 25385 'Received type ' + typeof string 25386 ) 25387 } 25388 25389 var len = string.length 25390 var mustMatch = (arguments.length > 2 && arguments[2] === true) 25391 if (!mustMatch && len === 0) return 0 25392 25393 // Use a for loop to avoid recursion 25394 var loweredCase = false 25395 for (;;) { 25396 switch (encoding) { 25397 case 'ascii': 25398 case 'latin1': 25399 case 'binary': 25400 return len 25401 case 'utf8': 25402 case 'utf-8': 25403 return utf8ToBytes(string).length 25404 case 'ucs2': 25405 case 'ucs-2': 25406 case 'utf16le': 25407 case 'utf-16le': 25408 return len * 2 25409 case 'hex': 25410 return len >>> 1 25411 case 'base64': 25412 return base64ToBytes(string).length 25413 default: 25414 if (loweredCase) { 25415 return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 25416 } 25417 encoding = ('' + encoding).toLowerCase() 25418 loweredCase = true 25419 } 25420 } 25421} 25422Buffer.byteLength = byteLength 25423 25424function slowToString (encoding, start, end) { 25425 var loweredCase = false 25426 25427 // No need to verify that "this.length <= MAX_UINT32" since it's a read-only 25428 // property of a typed array. 25429 25430 // This behaves neither like String nor Uint8Array in that we set start/end 25431 // to their upper/lower bounds if the value passed is out of range. 25432 // undefined is handled specially as per ECMA-262 6th Edition, 25433 // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. 25434 if (start === undefined || start < 0) { 25435 start = 0 25436 } 25437 // Return early if start > this.length. Done here to prevent potential uint32 25438 // coercion fail below. 25439 if (start > this.length) { 25440 return '' 25441 } 25442 25443 if (end === undefined || end > this.length) { 25444 end = this.length 25445 } 25446 25447 if (end <= 0) { 25448 return '' 25449 } 25450 25451 // Force coersion to uint32. This will also coerce falsey/NaN values to 0. 25452 end >>>= 0 25453 start >>>= 0 25454 25455 if (end <= start) { 25456 return '' 25457 } 25458 25459 if (!encoding) encoding = 'utf8' 25460 25461 while (true) { 25462 switch (encoding) { 25463 case 'hex': 25464 return hexSlice(this, start, end) 25465 25466 case 'utf8': 25467 case 'utf-8': 25468 return utf8Slice(this, start, end) 25469 25470 case 'ascii': 25471 return asciiSlice(this, start, end) 25472 25473 case 'latin1': 25474 case 'binary': 25475 return latin1Slice(this, start, end) 25476 25477 case 'base64': 25478 return base64Slice(this, start, end) 25479 25480 case 'ucs2': 25481 case 'ucs-2': 25482 case 'utf16le': 25483 case 'utf-16le': 25484 return utf16leSlice(this, start, end) 25485 25486 default: 25487 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) 25488 encoding = (encoding + '').toLowerCase() 25489 loweredCase = true 25490 } 25491 } 25492} 25493 25494// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) 25495// to detect a Buffer instance. It's not possible to use `instanceof Buffer` 25496// reliably in a browserify context because there could be multiple different 25497// copies of the 'buffer' package in use. This method works even for Buffer 25498// instances that were created from another copy of the `buffer` package. 25499// See: https://github.com/feross/buffer/issues/154 25500Buffer.prototype._isBuffer = true 25501 25502function swap (b, n, m) { 25503 var i = b[n] 25504 b[n] = b[m] 25505 b[m] = i 25506} 25507 25508Buffer.prototype.swap16 = function swap16 () { 25509 var len = this.length 25510 if (len % 2 !== 0) { 25511 throw new RangeError('Buffer size must be a multiple of 16-bits') 25512 } 25513 for (var i = 0; i < len; i += 2) { 25514 swap(this, i, i + 1) 25515 } 25516 return this 25517} 25518 25519Buffer.prototype.swap32 = function swap32 () { 25520 var len = this.length 25521 if (len % 4 !== 0) { 25522 throw new RangeError('Buffer size must be a multiple of 32-bits') 25523 } 25524 for (var i = 0; i < len; i += 4) { 25525 swap(this, i, i + 3) 25526 swap(this, i + 1, i + 2) 25527 } 25528 return this 25529} 25530 25531Buffer.prototype.swap64 = function swap64 () { 25532 var len = this.length 25533 if (len % 8 !== 0) { 25534 throw new RangeError('Buffer size must be a multiple of 64-bits') 25535 } 25536 for (var i = 0; i < len; i += 8) { 25537 swap(this, i, i + 7) 25538 swap(this, i + 1, i + 6) 25539 swap(this, i + 2, i + 5) 25540 swap(this, i + 3, i + 4) 25541 } 25542 return this 25543} 25544 25545Buffer.prototype.toString = function toString () { 25546 var length = this.length 25547 if (length === 0) return '' 25548 if (arguments.length === 0) return utf8Slice(this, 0, length) 25549 return slowToString.apply(this, arguments) 25550} 25551 25552Buffer.prototype.toLocaleString = Buffer.prototype.toString 25553 25554Buffer.prototype.equals = function equals (b) { 25555 if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') 25556 if (this === b) return true 25557 return Buffer.compare(this, b) === 0 25558} 25559 25560Buffer.prototype.inspect = function inspect () { 25561 var str = '' 25562 var max = exports.INSPECT_MAX_BYTES 25563 str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() 25564 if (this.length > max) str += ' ... ' 25565 return '<Buffer ' + str + '>' 25566} 25567 25568Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { 25569 if (isInstance(target, Uint8Array)) { 25570 target = Buffer.from(target, target.offset, target.byteLength) 25571 } 25572 if (!Buffer.isBuffer(target)) { 25573 throw new TypeError( 25574 'The "target" argument must be one of type Buffer or Uint8Array. ' + 25575 'Received type ' + (typeof target) 25576 ) 25577 } 25578 25579 if (start === undefined) { 25580 start = 0 25581 } 25582 if (end === undefined) { 25583 end = target ? target.length : 0 25584 } 25585 if (thisStart === undefined) { 25586 thisStart = 0 25587 } 25588 if (thisEnd === undefined) { 25589 thisEnd = this.length 25590 } 25591 25592 if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { 25593 throw new RangeError('out of range index') 25594 } 25595 25596 if (thisStart >= thisEnd && start >= end) { 25597 return 0 25598 } 25599 if (thisStart >= thisEnd) { 25600 return -1 25601 } 25602 if (start >= end) { 25603 return 1 25604 } 25605 25606 start >>>= 0 25607 end >>>= 0 25608 thisStart >>>= 0 25609 thisEnd >>>= 0 25610 25611 if (this === target) return 0 25612 25613 var x = thisEnd - thisStart 25614 var y = end - start 25615 var len = Math.min(x, y) 25616 25617 var thisCopy = this.slice(thisStart, thisEnd) 25618 var targetCopy = target.slice(start, end) 25619 25620 for (var i = 0; i < len; ++i) { 25621 if (thisCopy[i] !== targetCopy[i]) { 25622 x = thisCopy[i] 25623 y = targetCopy[i] 25624 break 25625 } 25626 } 25627 25628 if (x < y) return -1 25629 if (y < x) return 1 25630 return 0 25631} 25632 25633// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, 25634// OR the last index of `val` in `buffer` at offset <= `byteOffset`. 25635// 25636// Arguments: 25637// - buffer - a Buffer to search 25638// - val - a string, Buffer, or number 25639// - byteOffset - an index into `buffer`; will be clamped to an int32 25640// - encoding - an optional encoding, relevant is val is a string 25641// - dir - true for indexOf, false for lastIndexOf 25642function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { 25643 // Empty buffer means no match 25644 if (buffer.length === 0) return -1 25645 25646 // Normalize byteOffset 25647 if (typeof byteOffset === 'string') { 25648 encoding = byteOffset 25649 byteOffset = 0 25650 } else if (byteOffset > 0x7fffffff) { 25651 byteOffset = 0x7fffffff 25652 } else if (byteOffset < -0x80000000) { 25653 byteOffset = -0x80000000 25654 } 25655 byteOffset = +byteOffset // Coerce to Number. 25656 if (numberIsNaN(byteOffset)) { 25657 // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer 25658 byteOffset = dir ? 0 : (buffer.length - 1) 25659 } 25660 25661 // Normalize byteOffset: negative offsets start from the end of the buffer 25662 if (byteOffset < 0) byteOffset = buffer.length + byteOffset 25663 if (byteOffset >= buffer.length) { 25664 if (dir) return -1 25665 else byteOffset = buffer.length - 1 25666 } else if (byteOffset < 0) { 25667 if (dir) byteOffset = 0 25668 else return -1 25669 } 25670 25671 // Normalize val 25672 if (typeof val === 'string') { 25673 val = Buffer.from(val, encoding) 25674 } 25675 25676 // Finally, search either indexOf (if dir is true) or lastIndexOf 25677 if (Buffer.isBuffer(val)) { 25678 // Special case: looking for empty string/buffer always fails 25679 if (val.length === 0) { 25680 return -1 25681 } 25682 return arrayIndexOf(buffer, val, byteOffset, encoding, dir) 25683 } else if (typeof val === 'number') { 25684 val = val & 0xFF // Search for a byte value [0-255] 25685 if (typeof Uint8Array.prototype.indexOf === 'function') { 25686 if (dir) { 25687 return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) 25688 } else { 25689 return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) 25690 } 25691 } 25692 return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) 25693 } 25694 25695 throw new TypeError('val must be string, number or Buffer') 25696} 25697 25698function arrayIndexOf (arr, val, byteOffset, encoding, dir) { 25699 var indexSize = 1 25700 var arrLength = arr.length 25701 var valLength = val.length 25702 25703 if (encoding !== undefined) { 25704 encoding = String(encoding).toLowerCase() 25705 if (encoding === 'ucs2' || encoding === 'ucs-2' || 25706 encoding === 'utf16le' || encoding === 'utf-16le') { 25707 if (arr.length < 2 || val.length < 2) { 25708 return -1 25709 } 25710 indexSize = 2 25711 arrLength /= 2 25712 valLength /= 2 25713 byteOffset /= 2 25714 } 25715 } 25716 25717 function read (buf, i) { 25718 if (indexSize === 1) { 25719 return buf[i] 25720 } else { 25721 return buf.readUInt16BE(i * indexSize) 25722 } 25723 } 25724 25725 var i 25726 if (dir) { 25727 var foundIndex = -1 25728 for (i = byteOffset; i < arrLength; i++) { 25729 if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { 25730 if (foundIndex === -1) foundIndex = i 25731 if (i - foundIndex + 1 === valLength) return foundIndex * indexSize 25732 } else { 25733 if (foundIndex !== -1) i -= i - foundIndex 25734 foundIndex = -1 25735 } 25736 } 25737 } else { 25738 if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength 25739 for (i = byteOffset; i >= 0; i--) { 25740 var found = true 25741 for (var j = 0; j < valLength; j++) { 25742 if (read(arr, i + j) !== read(val, j)) { 25743 found = false 25744 break 25745 } 25746 } 25747 if (found) return i 25748 } 25749 } 25750 25751 return -1 25752} 25753 25754Buffer.prototype.includes = function includes (val, byteOffset, encoding) { 25755 return this.indexOf(val, byteOffset, encoding) !== -1 25756} 25757 25758Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { 25759 return bidirectionalIndexOf(this, val, byteOffset, encoding, true) 25760} 25761 25762Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { 25763 return bidirectionalIndexOf(this, val, byteOffset, encoding, false) 25764} 25765 25766function hexWrite (buf, string, offset, length) { 25767 offset = Number(offset) || 0 25768 var remaining = buf.length - offset 25769 if (!length) { 25770 length = remaining 25771 } else { 25772 length = Number(length) 25773 if (length > remaining) { 25774 length = remaining 25775 } 25776 } 25777 25778 var strLen = string.length 25779 25780 if (length > strLen / 2) { 25781 length = strLen / 2 25782 } 25783 for (var i = 0; i < length; ++i) { 25784 var parsed = parseInt(string.substr(i * 2, 2), 16) 25785 if (numberIsNaN(parsed)) return i 25786 buf[offset + i] = parsed 25787 } 25788 return i 25789} 25790 25791function utf8Write (buf, string, offset, length) { 25792 return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) 25793} 25794 25795function asciiWrite (buf, string, offset, length) { 25796 return blitBuffer(asciiToBytes(string), buf, offset, length) 25797} 25798 25799function latin1Write (buf, string, offset, length) { 25800 return asciiWrite(buf, string, offset, length) 25801} 25802 25803function base64Write (buf, string, offset, length) { 25804 return blitBuffer(base64ToBytes(string), buf, offset, length) 25805} 25806 25807function ucs2Write (buf, string, offset, length) { 25808 return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) 25809} 25810 25811Buffer.prototype.write = function write (string, offset, length, encoding) { 25812 // Buffer#write(string) 25813 if (offset === undefined) { 25814 encoding = 'utf8' 25815 length = this.length 25816 offset = 0 25817 // Buffer#write(string, encoding) 25818 } else if (length === undefined && typeof offset === 'string') { 25819 encoding = offset 25820 length = this.length 25821 offset = 0 25822 // Buffer#write(string, offset[, length][, encoding]) 25823 } else if (isFinite(offset)) { 25824 offset = offset >>> 0 25825 if (isFinite(length)) { 25826 length = length >>> 0 25827 if (encoding === undefined) encoding = 'utf8' 25828 } else { 25829 encoding = length 25830 length = undefined 25831 } 25832 } else { 25833 throw new Error( 25834 'Buffer.write(string, encoding, offset[, length]) is no longer supported' 25835 ) 25836 } 25837 25838 var remaining = this.length - offset 25839 if (length === undefined || length > remaining) length = remaining 25840 25841 if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { 25842 throw new RangeError('Attempt to write outside buffer bounds') 25843 } 25844 25845 if (!encoding) encoding = 'utf8' 25846 25847 var loweredCase = false 25848 for (;;) { 25849 switch (encoding) { 25850 case 'hex': 25851 return hexWrite(this, string, offset, length) 25852 25853 case 'utf8': 25854 case 'utf-8': 25855 return utf8Write(this, string, offset, length) 25856 25857 case 'ascii': 25858 return asciiWrite(this, string, offset, length) 25859 25860 case 'latin1': 25861 case 'binary': 25862 return latin1Write(this, string, offset, length) 25863 25864 case 'base64': 25865 // Warning: maxLength not taken into account in base64Write 25866 return base64Write(this, string, offset, length) 25867 25868 case 'ucs2': 25869 case 'ucs-2': 25870 case 'utf16le': 25871 case 'utf-16le': 25872 return ucs2Write(this, string, offset, length) 25873 25874 default: 25875 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) 25876 encoding = ('' + encoding).toLowerCase() 25877 loweredCase = true 25878 } 25879 } 25880} 25881 25882Buffer.prototype.toJSON = function toJSON () { 25883 return { 25884 type: 'Buffer', 25885 data: Array.prototype.slice.call(this._arr || this, 0) 25886 } 25887} 25888 25889function base64Slice (buf, start, end) { 25890 if (start === 0 && end === buf.length) { 25891 return base64.fromByteArray(buf) 25892 } else { 25893 return base64.fromByteArray(buf.slice(start, end)) 25894 } 25895} 25896 25897function utf8Slice (buf, start, end) { 25898 end = Math.min(buf.length, end) 25899 var res = [] 25900 25901 var i = start 25902 while (i < end) { 25903 var firstByte = buf[i] 25904 var codePoint = null 25905 var bytesPerSequence = (firstByte > 0xEF) ? 4 25906 : (firstByte > 0xDF) ? 3 25907 : (firstByte > 0xBF) ? 2 25908 : 1 25909 25910 if (i + bytesPerSequence <= end) { 25911 var secondByte, thirdByte, fourthByte, tempCodePoint 25912 25913 switch (bytesPerSequence) { 25914 case 1: 25915 if (firstByte < 0x80) { 25916 codePoint = firstByte 25917 } 25918 break 25919 case 2: 25920 secondByte = buf[i + 1] 25921 if ((secondByte & 0xC0) === 0x80) { 25922 tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) 25923 if (tempCodePoint > 0x7F) { 25924 codePoint = tempCodePoint 25925 } 25926 } 25927 break 25928 case 3: 25929 secondByte = buf[i + 1] 25930 thirdByte = buf[i + 2] 25931 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { 25932 tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) 25933 if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { 25934 codePoint = tempCodePoint 25935 } 25936 } 25937 break 25938 case 4: 25939 secondByte = buf[i + 1] 25940 thirdByte = buf[i + 2] 25941 fourthByte = buf[i + 3] 25942 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { 25943 tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) 25944 if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { 25945 codePoint = tempCodePoint 25946 } 25947 } 25948 } 25949 } 25950 25951 if (codePoint === null) { 25952 // we did not generate a valid codePoint so insert a 25953 // replacement char (U+FFFD) and advance only 1 byte 25954 codePoint = 0xFFFD 25955 bytesPerSequence = 1 25956 } else if (codePoint > 0xFFFF) { 25957 // encode to utf16 (surrogate pair dance) 25958 codePoint -= 0x10000 25959 res.push(codePoint >>> 10 & 0x3FF | 0xD800) 25960 codePoint = 0xDC00 | codePoint & 0x3FF 25961 } 25962 25963 res.push(codePoint) 25964 i += bytesPerSequence 25965 } 25966 25967 return decodeCodePointsArray(res) 25968} 25969 25970// Based on http://stackoverflow.com/a/22747272/680742, the browser with 25971// the lowest limit is Chrome, with 0x10000 args. 25972// We go 1 magnitude less, for safety 25973var MAX_ARGUMENTS_LENGTH = 0x1000 25974 25975function decodeCodePointsArray (codePoints) { 25976 var len = codePoints.length 25977 if (len <= MAX_ARGUMENTS_LENGTH) { 25978 return String.fromCharCode.apply(String, codePoints) // avoid extra slice() 25979 } 25980 25981 // Decode in chunks to avoid "call stack size exceeded". 25982 var res = '' 25983 var i = 0 25984 while (i < len) { 25985 res += String.fromCharCode.apply( 25986 String, 25987 codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) 25988 ) 25989 } 25990 return res 25991} 25992 25993function asciiSlice (buf, start, end) { 25994 var ret = '' 25995 end = Math.min(buf.length, end) 25996 25997 for (var i = start; i < end; ++i) { 25998 ret += String.fromCharCode(buf[i] & 0x7F) 25999 } 26000 return ret 26001} 26002 26003function latin1Slice (buf, start, end) { 26004 var ret = '' 26005 end = Math.min(buf.length, end) 26006 26007 for (var i = start; i < end; ++i) { 26008 ret += String.fromCharCode(buf[i]) 26009 } 26010 return ret 26011} 26012 26013function hexSlice (buf, start, end) { 26014 var len = buf.length 26015 26016 if (!start || start < 0) start = 0 26017 if (!end || end < 0 || end > len) end = len 26018 26019 var out = '' 26020 for (var i = start; i < end; ++i) { 26021 out += toHex(buf[i]) 26022 } 26023 return out 26024} 26025 26026function utf16leSlice (buf, start, end) { 26027 var bytes = buf.slice(start, end) 26028 var res = '' 26029 for (var i = 0; i < bytes.length; i += 2) { 26030 res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) 26031 } 26032 return res 26033} 26034 26035Buffer.prototype.slice = function slice (start, end) { 26036 var len = this.length 26037 start = ~~start 26038 end = end === undefined ? len : ~~end 26039 26040 if (start < 0) { 26041 start += len 26042 if (start < 0) start = 0 26043 } else if (start > len) { 26044 start = len 26045 } 26046 26047 if (end < 0) { 26048 end += len 26049 if (end < 0) end = 0 26050 } else if (end > len) { 26051 end = len 26052 } 26053 26054 if (end < start) end = start 26055 26056 var newBuf = this.subarray(start, end) 26057 // Return an augmented `Uint8Array` instance 26058 newBuf.__proto__ = Buffer.prototype 26059 return newBuf 26060} 26061 26062/* 26063 * Need to make sure that buffer isn't trying to write out of bounds. 26064 */ 26065function checkOffset (offset, ext, length) { 26066 if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') 26067 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') 26068} 26069 26070Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { 26071 offset = offset >>> 0 26072 byteLength = byteLength >>> 0 26073 if (!noAssert) checkOffset(offset, byteLength, this.length) 26074 26075 var val = this[offset] 26076 var mul = 1 26077 var i = 0 26078 while (++i < byteLength && (mul *= 0x100)) { 26079 val += this[offset + i] * mul 26080 } 26081 26082 return val 26083} 26084 26085Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { 26086 offset = offset >>> 0 26087 byteLength = byteLength >>> 0 26088 if (!noAssert) { 26089 checkOffset(offset, byteLength, this.length) 26090 } 26091 26092 var val = this[offset + --byteLength] 26093 var mul = 1 26094 while (byteLength > 0 && (mul *= 0x100)) { 26095 val += this[offset + --byteLength] * mul 26096 } 26097 26098 return val 26099} 26100 26101Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { 26102 offset = offset >>> 0 26103 if (!noAssert) checkOffset(offset, 1, this.length) 26104 return this[offset] 26105} 26106 26107Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { 26108 offset = offset >>> 0 26109 if (!noAssert) checkOffset(offset, 2, this.length) 26110 return this[offset] | (this[offset + 1] << 8) 26111} 26112 26113Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { 26114 offset = offset >>> 0 26115 if (!noAssert) checkOffset(offset, 2, this.length) 26116 return (this[offset] << 8) | this[offset + 1] 26117} 26118 26119Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { 26120 offset = offset >>> 0 26121 if (!noAssert) checkOffset(offset, 4, this.length) 26122 26123 return ((this[offset]) | 26124 (this[offset + 1] << 8) | 26125 (this[offset + 2] << 16)) + 26126 (this[offset + 3] * 0x1000000) 26127} 26128 26129Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { 26130 offset = offset >>> 0 26131 if (!noAssert) checkOffset(offset, 4, this.length) 26132 26133 return (this[offset] * 0x1000000) + 26134 ((this[offset + 1] << 16) | 26135 (this[offset + 2] << 8) | 26136 this[offset + 3]) 26137} 26138 26139Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { 26140 offset = offset >>> 0 26141 byteLength = byteLength >>> 0 26142 if (!noAssert) checkOffset(offset, byteLength, this.length) 26143 26144 var val = this[offset] 26145 var mul = 1 26146 var i = 0 26147 while (++i < byteLength && (mul *= 0x100)) { 26148 val += this[offset + i] * mul 26149 } 26150 mul *= 0x80 26151 26152 if (val >= mul) val -= Math.pow(2, 8 * byteLength) 26153 26154 return val 26155} 26156 26157Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { 26158 offset = offset >>> 0 26159 byteLength = byteLength >>> 0 26160 if (!noAssert) checkOffset(offset, byteLength, this.length) 26161 26162 var i = byteLength 26163 var mul = 1 26164 var val = this[offset + --i] 26165 while (i > 0 && (mul *= 0x100)) { 26166 val += this[offset + --i] * mul 26167 } 26168 mul *= 0x80 26169 26170 if (val >= mul) val -= Math.pow(2, 8 * byteLength) 26171 26172 return val 26173} 26174 26175Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { 26176 offset = offset >>> 0 26177 if (!noAssert) checkOffset(offset, 1, this.length) 26178 if (!(this[offset] & 0x80)) return (this[offset]) 26179 return ((0xff - this[offset] + 1) * -1) 26180} 26181 26182Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { 26183 offset = offset >>> 0 26184 if (!noAssert) checkOffset(offset, 2, this.length) 26185 var val = this[offset] | (this[offset + 1] << 8) 26186 return (val & 0x8000) ? val | 0xFFFF0000 : val 26187} 26188 26189Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { 26190 offset = offset >>> 0 26191 if (!noAssert) checkOffset(offset, 2, this.length) 26192 var val = this[offset + 1] | (this[offset] << 8) 26193 return (val & 0x8000) ? val | 0xFFFF0000 : val 26194} 26195 26196Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { 26197 offset = offset >>> 0 26198 if (!noAssert) checkOffset(offset, 4, this.length) 26199 26200 return (this[offset]) | 26201 (this[offset + 1] << 8) | 26202 (this[offset + 2] << 16) | 26203 (this[offset + 3] << 24) 26204} 26205 26206Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { 26207 offset = offset >>> 0 26208 if (!noAssert) checkOffset(offset, 4, this.length) 26209 26210 return (this[offset] << 24) | 26211 (this[offset + 1] << 16) | 26212 (this[offset + 2] << 8) | 26213 (this[offset + 3]) 26214} 26215 26216Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { 26217 offset = offset >>> 0 26218 if (!noAssert) checkOffset(offset, 4, this.length) 26219 return ieee754.read(this, offset, true, 23, 4) 26220} 26221 26222Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { 26223 offset = offset >>> 0 26224 if (!noAssert) checkOffset(offset, 4, this.length) 26225 return ieee754.read(this, offset, false, 23, 4) 26226} 26227 26228Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { 26229 offset = offset >>> 0 26230 if (!noAssert) checkOffset(offset, 8, this.length) 26231 return ieee754.read(this, offset, true, 52, 8) 26232} 26233 26234Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { 26235 offset = offset >>> 0 26236 if (!noAssert) checkOffset(offset, 8, this.length) 26237 return ieee754.read(this, offset, false, 52, 8) 26238} 26239 26240function checkInt (buf, value, offset, ext, max, min) { 26241 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') 26242 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') 26243 if (offset + ext > buf.length) throw new RangeError('Index out of range') 26244} 26245 26246Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { 26247 value = +value 26248 offset = offset >>> 0 26249 byteLength = byteLength >>> 0 26250 if (!noAssert) { 26251 var maxBytes = Math.pow(2, 8 * byteLength) - 1 26252 checkInt(this, value, offset, byteLength, maxBytes, 0) 26253 } 26254 26255 var mul = 1 26256 var i = 0 26257 this[offset] = value & 0xFF 26258 while (++i < byteLength && (mul *= 0x100)) { 26259 this[offset + i] = (value / mul) & 0xFF 26260 } 26261 26262 return offset + byteLength 26263} 26264 26265Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { 26266 value = +value 26267 offset = offset >>> 0 26268 byteLength = byteLength >>> 0 26269 if (!noAssert) { 26270 var maxBytes = Math.pow(2, 8 * byteLength) - 1 26271 checkInt(this, value, offset, byteLength, maxBytes, 0) 26272 } 26273 26274 var i = byteLength - 1 26275 var mul = 1 26276 this[offset + i] = value & 0xFF 26277 while (--i >= 0 && (mul *= 0x100)) { 26278 this[offset + i] = (value / mul) & 0xFF 26279 } 26280 26281 return offset + byteLength 26282} 26283 26284Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { 26285 value = +value 26286 offset = offset >>> 0 26287 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) 26288 this[offset] = (value & 0xff) 26289 return offset + 1 26290} 26291 26292Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { 26293 value = +value 26294 offset = offset >>> 0 26295 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) 26296 this[offset] = (value & 0xff) 26297 this[offset + 1] = (value >>> 8) 26298 return offset + 2 26299} 26300 26301Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { 26302 value = +value 26303 offset = offset >>> 0 26304 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) 26305 this[offset] = (value >>> 8) 26306 this[offset + 1] = (value & 0xff) 26307 return offset + 2 26308} 26309 26310Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { 26311 value = +value 26312 offset = offset >>> 0 26313 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) 26314 this[offset + 3] = (value >>> 24) 26315 this[offset + 2] = (value >>> 16) 26316 this[offset + 1] = (value >>> 8) 26317 this[offset] = (value & 0xff) 26318 return offset + 4 26319} 26320 26321Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { 26322 value = +value 26323 offset = offset >>> 0 26324 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) 26325 this[offset] = (value >>> 24) 26326 this[offset + 1] = (value >>> 16) 26327 this[offset + 2] = (value >>> 8) 26328 this[offset + 3] = (value & 0xff) 26329 return offset + 4 26330} 26331 26332Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { 26333 value = +value 26334 offset = offset >>> 0 26335 if (!noAssert) { 26336 var limit = Math.pow(2, (8 * byteLength) - 1) 26337 26338 checkInt(this, value, offset, byteLength, limit - 1, -limit) 26339 } 26340 26341 var i = 0 26342 var mul = 1 26343 var sub = 0 26344 this[offset] = value & 0xFF 26345 while (++i < byteLength && (mul *= 0x100)) { 26346 if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { 26347 sub = 1 26348 } 26349 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF 26350 } 26351 26352 return offset + byteLength 26353} 26354 26355Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { 26356 value = +value 26357 offset = offset >>> 0 26358 if (!noAssert) { 26359 var limit = Math.pow(2, (8 * byteLength) - 1) 26360 26361 checkInt(this, value, offset, byteLength, limit - 1, -limit) 26362 } 26363 26364 var i = byteLength - 1 26365 var mul = 1 26366 var sub = 0 26367 this[offset + i] = value & 0xFF 26368 while (--i >= 0 && (mul *= 0x100)) { 26369 if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { 26370 sub = 1 26371 } 26372 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF 26373 } 26374 26375 return offset + byteLength 26376} 26377 26378Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { 26379 value = +value 26380 offset = offset >>> 0 26381 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) 26382 if (value < 0) value = 0xff + value + 1 26383 this[offset] = (value & 0xff) 26384 return offset + 1 26385} 26386 26387Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { 26388 value = +value 26389 offset = offset >>> 0 26390 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) 26391 this[offset] = (value & 0xff) 26392 this[offset + 1] = (value >>> 8) 26393 return offset + 2 26394} 26395 26396Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { 26397 value = +value 26398 offset = offset >>> 0 26399 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) 26400 this[offset] = (value >>> 8) 26401 this[offset + 1] = (value & 0xff) 26402 return offset + 2 26403} 26404 26405Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { 26406 value = +value 26407 offset = offset >>> 0 26408 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) 26409 this[offset] = (value & 0xff) 26410 this[offset + 1] = (value >>> 8) 26411 this[offset + 2] = (value >>> 16) 26412 this[offset + 3] = (value >>> 24) 26413 return offset + 4 26414} 26415 26416Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { 26417 value = +value 26418 offset = offset >>> 0 26419 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) 26420 if (value < 0) value = 0xffffffff + value + 1 26421 this[offset] = (value >>> 24) 26422 this[offset + 1] = (value >>> 16) 26423 this[offset + 2] = (value >>> 8) 26424 this[offset + 3] = (value & 0xff) 26425 return offset + 4 26426} 26427 26428function checkIEEE754 (buf, value, offset, ext, max, min) { 26429 if (offset + ext > buf.length) throw new RangeError('Index out of range') 26430 if (offset < 0) throw new RangeError('Index out of range') 26431} 26432 26433function writeFloat (buf, value, offset, littleEndian, noAssert) { 26434 value = +value 26435 offset = offset >>> 0 26436 if (!noAssert) { 26437 checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) 26438 } 26439 ieee754.write(buf, value, offset, littleEndian, 23, 4) 26440 return offset + 4 26441} 26442 26443Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { 26444 return writeFloat(this, value, offset, true, noAssert) 26445} 26446 26447Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { 26448 return writeFloat(this, value, offset, false, noAssert) 26449} 26450 26451function writeDouble (buf, value, offset, littleEndian, noAssert) { 26452 value = +value 26453 offset = offset >>> 0 26454 if (!noAssert) { 26455 checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) 26456 } 26457 ieee754.write(buf, value, offset, littleEndian, 52, 8) 26458 return offset + 8 26459} 26460 26461Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { 26462 return writeDouble(this, value, offset, true, noAssert) 26463} 26464 26465Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { 26466 return writeDouble(this, value, offset, false, noAssert) 26467} 26468 26469// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) 26470Buffer.prototype.copy = function copy (target, targetStart, start, end) { 26471 if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') 26472 if (!start) start = 0 26473 if (!end && end !== 0) end = this.length 26474 if (targetStart >= target.length) targetStart = target.length 26475 if (!targetStart) targetStart = 0 26476 if (end > 0 && end < start) end = start 26477 26478 // Copy 0 bytes; we're done 26479 if (end === start) return 0 26480 if (target.length === 0 || this.length === 0) return 0 26481 26482 // Fatal error conditions 26483 if (targetStart < 0) { 26484 throw new RangeError('targetStart out of bounds') 26485 } 26486 if (start < 0 || start >= this.length) throw new RangeError('Index out of range') 26487 if (end < 0) throw new RangeError('sourceEnd out of bounds') 26488 26489 // Are we oob? 26490 if (end > this.length) end = this.length 26491 if (target.length - targetStart < end - start) { 26492 end = target.length - targetStart + start 26493 } 26494 26495 var len = end - start 26496 26497 if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { 26498 // Use built-in when available, missing from IE11 26499 this.copyWithin(targetStart, start, end) 26500 } else if (this === target && start < targetStart && targetStart < end) { 26501 // descending copy from end 26502 for (var i = len - 1; i >= 0; --i) { 26503 target[i + targetStart] = this[i + start] 26504 } 26505 } else { 26506 Uint8Array.prototype.set.call( 26507 target, 26508 this.subarray(start, end), 26509 targetStart 26510 ) 26511 } 26512 26513 return len 26514} 26515 26516// Usage: 26517// buffer.fill(number[, offset[, end]]) 26518// buffer.fill(buffer[, offset[, end]]) 26519// buffer.fill(string[, offset[, end]][, encoding]) 26520Buffer.prototype.fill = function fill (val, start, end, encoding) { 26521 // Handle string cases: 26522 if (typeof val === 'string') { 26523 if (typeof start === 'string') { 26524 encoding = start 26525 start = 0 26526 end = this.length 26527 } else if (typeof end === 'string') { 26528 encoding = end 26529 end = this.length 26530 } 26531 if (encoding !== undefined && typeof encoding !== 'string') { 26532 throw new TypeError('encoding must be a string') 26533 } 26534 if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { 26535 throw new TypeError('Unknown encoding: ' + encoding) 26536 } 26537 if (val.length === 1) { 26538 var code = val.charCodeAt(0) 26539 if ((encoding === 'utf8' && code < 128) || 26540 encoding === 'latin1') { 26541 // Fast path: If `val` fits into a single byte, use that numeric value. 26542 val = code 26543 } 26544 } 26545 } else if (typeof val === 'number') { 26546 val = val & 255 26547 } 26548 26549 // Invalid ranges are not set to a default, so can range check early. 26550 if (start < 0 || this.length < start || this.length < end) { 26551 throw new RangeError('Out of range index') 26552 } 26553 26554 if (end <= start) { 26555 return this 26556 } 26557 26558 start = start >>> 0 26559 end = end === undefined ? this.length : end >>> 0 26560 26561 if (!val) val = 0 26562 26563 var i 26564 if (typeof val === 'number') { 26565 for (i = start; i < end; ++i) { 26566 this[i] = val 26567 } 26568 } else { 26569 var bytes = Buffer.isBuffer(val) 26570 ? val 26571 : Buffer.from(val, encoding) 26572 var len = bytes.length 26573 if (len === 0) { 26574 throw new TypeError('The value "' + val + 26575 '" is invalid for argument "value"') 26576 } 26577 for (i = 0; i < end - start; ++i) { 26578 this[i + start] = bytes[i % len] 26579 } 26580 } 26581 26582 return this 26583} 26584 26585// HELPER FUNCTIONS 26586// ================ 26587 26588var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g 26589 26590function base64clean (str) { 26591 // Node takes equal signs as end of the Base64 encoding 26592 str = str.split('=')[0] 26593 // Node strips out invalid characters like \n and \t from the string, base64-js does not 26594 str = str.trim().replace(INVALID_BASE64_RE, '') 26595 // Node converts strings with length < 2 to '' 26596 if (str.length < 2) return '' 26597 // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not 26598 while (str.length % 4 !== 0) { 26599 str = str + '=' 26600 } 26601 return str 26602} 26603 26604function toHex (n) { 26605 if (n < 16) return '0' + n.toString(16) 26606 return n.toString(16) 26607} 26608 26609function utf8ToBytes (string, units) { 26610 units = units || Infinity 26611 var codePoint 26612 var length = string.length 26613 var leadSurrogate = null 26614 var bytes = [] 26615 26616 for (var i = 0; i < length; ++i) { 26617 codePoint = string.charCodeAt(i) 26618 26619 // is surrogate component 26620 if (codePoint > 0xD7FF && codePoint < 0xE000) { 26621 // last char was a lead 26622 if (!leadSurrogate) { 26623 // no lead yet 26624 if (codePoint > 0xDBFF) { 26625 // unexpected trail 26626 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 26627 continue 26628 } else if (i + 1 === length) { 26629 // unpaired lead 26630 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 26631 continue 26632 } 26633 26634 // valid lead 26635 leadSurrogate = codePoint 26636 26637 continue 26638 } 26639 26640 // 2 leads in a row 26641 if (codePoint < 0xDC00) { 26642 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 26643 leadSurrogate = codePoint 26644 continue 26645 } 26646 26647 // valid surrogate pair 26648 codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 26649 } else if (leadSurrogate) { 26650 // valid bmp char, but last char was a lead 26651 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) 26652 } 26653 26654 leadSurrogate = null 26655 26656 // encode utf8 26657 if (codePoint < 0x80) { 26658 if ((units -= 1) < 0) break 26659 bytes.push(codePoint) 26660 } else if (codePoint < 0x800) { 26661 if ((units -= 2) < 0) break 26662 bytes.push( 26663 codePoint >> 0x6 | 0xC0, 26664 codePoint & 0x3F | 0x80 26665 ) 26666 } else if (codePoint < 0x10000) { 26667 if ((units -= 3) < 0) break 26668 bytes.push( 26669 codePoint >> 0xC | 0xE0, 26670 codePoint >> 0x6 & 0x3F | 0x80, 26671 codePoint & 0x3F | 0x80 26672 ) 26673 } else if (codePoint < 0x110000) { 26674 if ((units -= 4) < 0) break 26675 bytes.push( 26676 codePoint >> 0x12 | 0xF0, 26677 codePoint >> 0xC & 0x3F | 0x80, 26678 codePoint >> 0x6 & 0x3F | 0x80, 26679 codePoint & 0x3F | 0x80 26680 ) 26681 } else { 26682 throw new Error('Invalid code point') 26683 } 26684 } 26685 26686 return bytes 26687} 26688 26689function asciiToBytes (str) { 26690 var byteArray = [] 26691 for (var i = 0; i < str.length; ++i) { 26692 // Node's code seems to be doing this and not & 0x7F.. 26693 byteArray.push(str.charCodeAt(i) & 0xFF) 26694 } 26695 return byteArray 26696} 26697 26698function utf16leToBytes (str, units) { 26699 var c, hi, lo 26700 var byteArray = [] 26701 for (var i = 0; i < str.length; ++i) { 26702 if ((units -= 2) < 0) break 26703 26704 c = str.charCodeAt(i) 26705 hi = c >> 8 26706 lo = c % 256 26707 byteArray.push(lo) 26708 byteArray.push(hi) 26709 } 26710 26711 return byteArray 26712} 26713 26714function base64ToBytes (str) { 26715 return base64.toByteArray(base64clean(str)) 26716} 26717 26718function blitBuffer (src, dst, offset, length) { 26719 for (var i = 0; i < length; ++i) { 26720 if ((i + offset >= dst.length) || (i >= src.length)) break 26721 dst[i + offset] = src[i] 26722 } 26723 return i 26724} 26725 26726// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass 26727// the `instanceof` check but they should be treated as of that type. 26728// See: https://github.com/feross/buffer/issues/166 26729function isInstance (obj, type) { 26730 return obj instanceof type || 26731 (obj != null && obj.constructor != null && obj.constructor.name != null && 26732 obj.constructor.name === type.name) 26733} 26734function numberIsNaN (obj) { 26735 // For IE11 support 26736 return obj !== obj // eslint-disable-line no-self-compare 26737} 26738 26739}).call(this
26739,require("buffer").Buffer) 26740},{"base64-js":166,"buffer":168,"ieee754":171}],169:[function(require,module,exports){ 26741 26742/** 26743 * Expose `Emitter`. 26744 */ 26745 26746if (typeof module !== 'undefined') { 26747 module.exports = Emitter; 26748} 26749 26750/** 26751 * Initialize a new `Emitter`. 26752 * 26753 * @api public 26754 */ 26755 26756function Emitter(obj) { 26757 if (obj) return mixin(obj); 26758}; 26759 26760/** 26761 * Mixin the emitter properties. 26762 * 26763 * @param {Object} obj 26764 * @return {Object} 26765 * @api private 26766 */ 26767 26768function mixin(obj) { 26769 for (var key in Emitter.prototype) { 26770 obj[key] = Emitter.prototype[key]; 26771 } 26772 return obj; 26773} 26774 26775/** 26776 * Listen on the given `event` with `fn`. 26777 * 26778 * @param {String} event 26779 * @param {Function} fn 26780 * @return {Emitter} 26781 * @api public 26782 */ 26783 26784Emitter.prototype.on = 26785Emitter.prototype.addEventListener = function(event, fn){ 26786 this._callbacks = this._callbacks || {}; 26787 (this._callbacks['$' + event] = this._callbacks['$' + event] || []) 26788 .push(fn); 26789 return this; 26790}; 26791 26792/** 26793 * Adds an `event` listener that will be invoked a single 26794 * time then automatically removed. 26795 * 26796 * @param {String} event 26797 * @param {Function} fn 26798 * @return {Emitter} 26799 * @api public 26800 */ 26801 26802Emitter.prototype.once = function(event, fn){ 26803 function on() { 26804 this.off(event, on); 26805 fn.apply(this, arguments); 26806 } 26807 26808 on.fn = fn; 26809 this.on(event, on); 26810 return this; 26811}; 26812 26813/** 26814 * Remove the given callback for `event` or all 26815 * registered callbacks. 26816 * 26817 * @param {String} event 26818 * @param {Function} fn 26819 * @return {Emitter} 26820 * @api public 26821 */ 26822 26823Emitter.prototype.off = 26824Emitter.prototype.removeListener = 26825Emitter.prototype.removeAllListeners = 26826Emitter.prototype.removeEventListener = function(event, fn){ 26827 this._callbacks = this._callbacks || {}; 26828 26829 // all 26830 if (0 == arguments.length) { 26831 this._callbacks = {}; 26832 return this; 26833 } 26834 26835 // specific event 26836 var callbacks = this._callbacks['$' + event]; 26837 if (!callbacks) return this; 26838 26839 // remove all handlers 26840 if (1 == arguments.length) { 26841 delete this._callbacks['$' + event]; 26842 return this; 26843 } 26844 26845 // remove specific handler 26846 var cb; 26847 for (var i = 0; i < callbacks.length; i++) { 26848 cb = callbacks[i]; 26849 if (cb === fn || cb.fn === fn) { 26850 callbacks.splice(i, 1); 26851 break; 26852 } 26853 } 26854 26855 // Remove event specific arrays for event types that no 26856 // one is subscribed for to avoid memory leak. 26857 if (callbacks.length === 0) { 26858 delete this._callbacks['$' + event]; 26859 } 26860 26861 return this; 26862}; 26863 26864/** 26865 * Emit `event` with the given args. 26866 * 26867 * @param {String} event 26868 * @param {Mixed} ... 26869 * @return {Emitter} 26870 */ 26871 26872Emitter.prototype.emit = function(event){ 26873 this._callbacks = this._callbacks || {}; 26874 26875 var args = new Array(arguments.length - 1) 26876 , callbacks = this._callbacks['$' + event]; 26877 26878 for (var i = 1; i < arguments.length; i++) { 26879 args[i - 1] = arguments[i]; 26880 } 26881 26882 if (callbacks) { 26883 callbacks = callbacks.slice(0); 26884 for (var i = 0, len = callbacks.length; i < len; ++i) { 26885 callbacks[i].apply(this, args); 26886 } 26887 } 26888 26889 return this; 26890}; 26891 26892/** 26893 * Return array of callbacks for `event`. 26894 * 26895 * @param {String} event 26896 * @return {Array} 26897 * @api public 26898 */ 26899 26900Emitter.prototype.listeners = function(event){ 26901 this._callbacks = this._callbacks || {}; 26902 return this._callbacks['$' + event] || []; 26903}; 26904 26905/** 26906 * Check if this emitter has `event` handlers. 26907 * 26908 * @param {String} event 26909 * @return {Boolean} 26910 * @api public 26911 */ 26912 26913Emitter.prototype.hasListeners = function(event){ 26914 return !! this.listeners(event).length; 26915}; 26916 26917},{}],170:[function(require,module,exports){ 26918module.exports = stringify 26919stringify.default = stringify 26920stringify.stable = deterministicStringify 26921stringify.stableStringify = deterministicStringify 26922 26923var arr = [] 26924var replacerStack = [] 26925 26926// Regular stringify 26927function stringify (obj, replacer, spacer) { 26928 decirc(obj, '', [], undefined) 26929 var res 26930 if (replacerStack.length === 0) { 26931 res = JSON.stringify(obj, replacer, spacer) 26932 } else { 26933 res = JSON.stringify(obj, replaceGetterValues(replacer), spacer) 26934 } 26935 while (arr.length !== 0) { 26936 var part = arr.pop() 26937 if (part.length === 4) { 26938 Object.defineProperty(part[0], part[1], part[3]) 26939 } else { 26940 part[0][part[1]] = part[2] 26941 } 26942 } 26943 return res 26944} 26945function decirc (val, k, stack, parent) { 26946 var i 26947 if (typeof val === 'object' && val !== null) { 26948 for (i = 0; i < stack.length; i++) { 26949 if (stack[i] === val) { 26950 var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) 26951 if (propertyDescriptor.get !== undefined) { 26952 if (propertyDescriptor.configurable) { 26953 Object.defineProperty(parent, k, { value: '[Circular]' }) 26954 arr.push([parent, k, val, propertyDescriptor]) 26955 } else { 26956 replacerStack.push([val, k]) 26957 } 26958 } else { 26959 parent[k] = '[Circular]' 26960 arr.push([parent, k, val]) 26961 } 26962 return 26963 } 26964 } 26965 stack.push(val) 26966 // Optimize for Arrays. Big arrays could kill the performance otherwise! 26967 if (Array.isArray(val)) { 26968 for (i = 0; i < val.length; i++) {
26969 decirc(val[i], i, stack, val) 26970 } 26971 } else { 26972 var keys = Object.keys(val) 26973 for (i = 0; i < keys.length; i++) { 26974 var key = keys[i] 26975 decirc(val[key], key, stack, val) 26976 } 26977 } 26978 stack.pop() 26979 } 26980} 26981 26982// Stable-stringify 26983function compareFunction (a, b) { 26984 if (a < b) { 26985 return -1 26986 } 26987 if (a > b) { 26988 return 1 26989 } 26990 return 0 26991} 26992 26993function deterministicStringify (obj, replacer, spacer) { 26994 var tmp = deterministicDecirc(obj, '', [], undefined) || obj 26995 var res 26996 if (replacerStack.length === 0) { 26997 res = JSON.stringify(tmp, replacer, spacer) 26998 } else { 26999 res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer) 27000 } 27001 while (arr.length !== 0) { 27002 var part = arr.pop() 27003 if (part.length === 4) { 27004 Object.defineProperty(part[0], part[1], part[3]) 27005 } else { 27006 part[0][part[1]] = part[2] 27007 } 27008 } 27009 return res 27010} 27011 27012function deterministicDecirc (val, k, stack, parent) { 27013 var i 27014 if (typeof val === 'object' && val !== null) { 27015 for (i = 0; i < stack.length; i++) { 27016 if (stack[i] === val) { 27017 var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) 27018 if (propertyDescriptor.get !== undefined) { 27019 if (propertyDescriptor.configurable) { 27020 Object.defineProperty(parent, k, { value: '[Circular]' }) 27021 arr.push([parent, k, val, propertyDescriptor]) 27022 } else { 27023 replacerStack.push([val, k]) 27024 } 27025 } else { 27026 parent[k] = '[Circular]' 27027 arr.push([parent, k, val]) 27028 } 27029 return 27030 } 27031 } 27032 if (typeof val.toJSON === 'function') { 27033 return 27034 } 27035 stack.push(val) 27036 // Optimize for Arrays. Big arrays could kill the performance otherwise! 27037 if (Array.isArray(val)) { 27038 for (i = 0; i < val.length; i++) { 27039 deterministicDecirc(val[i], i, stack, val) 27040 } 27041 } else { 27042 // Create a temporary object in the required way 27043 var tmp = {} 27044 var keys = Object.keys(val).sort(compareFunction) 27045 for (i = 0; i < keys.length; i++) { 27046 var key = keys[i] 27047 deterministicDecirc(val[key], key, stack, val) 27048 tmp[key] = val[key] 27049 } 27050 if (parent !== undefined) { 27051 arr.push([parent, k, val]) 27052 parent[k] = tmp 27053 } else { 27054 return tmp 27055 } 27056 } 27057 stack.pop() 27058 } 27059} 27060 27061// wraps replacer function to handle values we couldn't replace 27062// and mark them as [Circular] 27063function replaceGetterValues (replacer) { 27064 replacer = replacer !== undefined ? replacer : function (k, v) { return v } 27065 return function (key, val) { 27066 if (replacerStack.length > 0) { 27067 for (var i = 0; i < replacerStack.length; i++) { 27068 var part = replacerStack[i] 27069 if (part[1] === key && part[0] === val) { 27070 val = '[Circular]' 27071 replacerStack.splice(i, 1) 27072 break 27073 } 27074 } 27075 } 27076 return replacer.call(this, key, val) 27077 } 27078} 27079 27080},{}],171:[function(require,module,exports){ 27081/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ 27082exports.read = function (buffer, offset, isLE, mLen, nBytes) { 27083 var e, m 27084 var eLen = (nBytes * 8) - mLen - 1 27085 var eMax = (1 << eLen) - 1 27086 var eBias = eMax >> 1 27087 var nBits = -7 27088 var i = isLE ? (nBytes - 1) : 0 27089 var d = isLE ? -1 : 1 27090 var s = buffer[offset + i] 27091 27092 i += d 27093 27094 e = s & ((1 << (-nBits)) - 1) 27095 s >>= (-nBits) 27096 nBits += eLen 27097 for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} 27098 27099 m = e & ((1 << (-nBits)) - 1) 27100 e >>= (-nBits) 27101 nBits += mLen 27102 for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} 27103 27104 if (e === 0) { 27105 e = 1 - eBias 27106 } else if (e === eMax) { 27107 return m ? NaN : ((s ? -1 : 1) * Infinity) 27108 } else { 27109 m = m + Math.pow(2, mLen) 27110 e = e - eBias 27111 } 27112 return (s ? -1 : 1) * m * Math.pow(2, e - mLen) 27113} 27114 27115exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { 27116 var e, m, c 27117 var eLen = (nBytes * 8) - mLen - 1 27118 var eMax = (1 << eLen) - 1 27119 var eBias = eMax >> 1 27120 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) 27121 var i = isLE ? 0 : (nBytes - 1) 27122 var d = isLE ? 1 : -1 27123 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 27124 27125 value = Math.abs(value) 27126 27127 if (isNaN(value) || value === Infinity) { 27128 m = isNaN(value) ? 1 : 0 27129 e = eMax 27130 } else { 27131 e = Math.floor(Math.log(value) / Math.LN2) 27132 if (value * (c = Math.pow(2, -e)) < 1) { 27133 e-- 27134 c *= 2 27135 } 27136 if (e + eBias >= 1) { 27137 value += rt / c 27138 } else { 27139 value += rt * Math.pow(2, 1 - eBias) 27140 } 27141 if (value * c >= 2) { 27142 e++ 27143 c /= 2 27144 } 27145 27146 if (e + eBias >= eMax) { 27147 m = 0 27148 e = eMax 27149 } else if (e + eBias >= 1) { 27150 m = ((value * c) - 1) * Math.pow(2, mLen) 27151 e = e + eBias 27152 } else { 27153 m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) 27154 e = 0 27155 } 27156 } 27157 27158 for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} 27159 27160 e = (e << mLen) | m 27161 eLen += mLen 27162 for (; eLen > 0;
vendor: 4,242 bytes, lines 27162-27287
27162 buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} 27163 27164 buffer[offset + i - d] |= s * 128 27165} 27166 27167},{}],172:[function(require,module,exports){ 27168if (typeof Object.create === 'function') { 27169 // implementation from standard node.js 'util' module 27170 module.exports = function inherits(ctor, superCtor) { 27171 if (superCtor) { 27172 ctor.super_ = superCtor 27173 ctor.prototype = Object.create(superCtor.prototype, { 27174 constructor: { 27175 value: ctor, 27176 enumerable: false, 27177 writable: true, 27178 configurable: true 27179 } 27180 }) 27181 } 27182 }; 27183} else { 27184 // old school shim for old browsers 27185 module.exports = function inherits(ctor, superCtor) { 27186 if (superCtor) { 27187 ctor.super_ = superCtor 27188 var TempCtor = function () {} 27189 TempCtor.prototype = superCtor.prototype 27190 ctor.prototype = new TempCtor() 27191 ctor.prototype.constructor = ctor 27192 } 27193 } 27194} 27195 27196},{}],173:[function(require,module,exports){ 27197// shim for using process in browser 27198var process = module.exports = {}; 27199 27200// cached from whatever global is present so that test runners that stub it 27201// don't break things. But we need to wrap it in a try catch in case it is 27202// wrapped in strict mode code which doesn't define any globals. It's inside a 27203// function because try/catches deoptimize in certain engines. 27204 27205var cachedSetTimeout; 27206var cachedClearTimeout; 27207 27208function defaultSetTimout() { 27209 throw new Error('setTimeout has not been defined'); 27210} 27211function defaultClearTimeout () { 27212 throw new Error('clearTimeout has not been defined'); 27213} 27214(function () { 27215 try { 27216 if (typeof setTimeout === 'function') { 27217 cachedSetTimeout = setTimeout; 27218 } else { 27219 cachedSetTimeout = defaultSetTimout; 27220 } 27221 } catch (e) { 27222 cachedSetTimeout = defaultSetTimout; 27223 } 27224 try { 27225 if (typeof clearTimeout === 'function') { 27226 cachedClearTimeout = clearTimeout; 27227 } else { 27228 cachedClearTimeout = defaultClearTimeout; 27229 } 27230 } catch (e) { 27231 cachedClearTimeout = defaultClearTimeout; 27232 } 27233} ()) 27234function runTimeout(fun) { 27235 if (cachedSetTimeout === setTimeout) { 27236 //normal enviroments in sane situations 27237 return setTimeout(fun, 0); 27238 } 27239 // if setTimeout wasn't available but was latter defined 27240 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { 27241 cachedSetTimeout = setTimeout; 27242 return setTimeout(fun, 0); 27243 } 27244 try { 27245 // when when somebody has screwed with setTimeout but no I.E. maddness 27246 return cachedSetTimeout(fun, 0); 27247 } catch(e){ 27248 try { 27249 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 27250 return cachedSetTimeout.call(null, fun, 0); 27251 } catch(e){ 27252 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error 27253 return cachedSetTimeout.call(this, fun, 0); 27254 } 27255 } 27256 27257 27258} 27259function runClearTimeout(marker) { 27260 if (cachedClearTimeout === clearTimeout) { 27261 //normal enviroments in sane situations 27262 return clearTimeout(marker); 27263 } 27264 // if clearTimeout wasn't available but was latter defined 27265 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { 27266 cachedClearTimeout = clearTimeout; 27267 return clearTimeout(marker); 27268 } 27269 try { 27270 // when when somebody has screwed with setTimeout but no I.E. maddness 27271 return cachedClearTimeout(marker); 27272 } catch (e){ 27273 try { 27274 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 27275 return cachedClearTimeout.call(null, marker); 27276 } catch (e){ 27277 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. 27278 // Some versions of I.E. have different rules for clearTimeout vs setTimeout 27279 return cachedClearTimeout.call(this, marker); 27280 } 27281 } 27282 27283 27284 27285} 27286var queue = []; 27287var draining = false;
vendor: 8,794 bytes, lines 27288-27620
27288var currentQueue; 27289var queueIndex = -1; 27290 27291function cleanUpNextTick() { 27292 if (!draining || !currentQueue) { 27293 return; 27294 } 27295 draining = false; 27296 if (currentQueue.length) { 27297 queue = currentQueue.concat(queue); 27298 } else { 27299 queueIndex = -1; 27300 } 27301 if (queue.length) { 27302 drainQueue(); 27303 } 27304} 27305 27306function drainQueue() { 27307 if (draining) { 27308 return; 27309 } 27310 var timeout = runTimeout(cleanUpNextTick); 27311 draining = true; 27312 27313 var len = queue.length; 27314 while(len) { 27315 currentQueue = queue; 27316 queue = []; 27317 while (++queueIndex < len) { 27318 if (currentQueue) { 27319 currentQueue[queueIndex].run(); 27320 } 27321 } 27322 queueIndex = -1; 27323 len = queue.length; 27324 } 27325 currentQueue = null; 27326 draining = false; 27327 runClearTimeout(timeout); 27328} 27329 27330process.nextTick = function (fun) { 27331 var args = new Array(arguments.length - 1); 27332 if (arguments.length > 1) { 27333 for (var i = 1; i < arguments.length; i++) { 27334 args[i - 1] = arguments[i]; 27335 } 27336 } 27337 queue.push(new Item(fun, args)); 27338 if (queue.length === 1 && !draining) { 27339 runTimeout(drainQueue); 27340 } 27341}; 27342 27343// v8 likes predictible objects 27344function Item(fun, array) { 27345 this.fun = fun; 27346 this.array = array; 27347} 27348Item.prototype.run = function () { 27349 this.fun.apply(null, this.array); 27350}; 27351process.title = 'browser'; 27352process.browser = true; 27353process.env = {}; 27354process.argv = []; 27355process.version = ''; // empty string to avoid regexp issues 27356process.versions = {}; 27357 27358function noop() {} 27359 27360process.on = noop; 27361process.addListener = noop; 27362process.once = noop; 27363process.off = noop; 27364process.removeListener = noop; 27365process.removeAllListeners = noop; 27366process.emit = noop; 27367process.prependListener = noop; 27368process.prependOnceListener = noop; 27369 27370process.listeners = function (name) { return [] } 27371 27372process.binding = function (name) { 27373 throw new Error('process.binding is not supported'); 27374}; 27375 27376process.cwd = function () { return '/' }; 27377process.chdir = function (dir) { 27378 throw new Error('process.chdir is not supported'); 27379}; 27380process.umask = function() { return 0; }; 27381 27382},{}],174:[function(require,module,exports){ 27383// Copyright Joyent, Inc. and other Node contributors. 27384// 27385// Permission is hereby granted, free of charge, to any person obtaining a 27386// copy of this software and associated documentation files (the 27387// "Software"), to deal in the Software without restriction, including 27388// without limitation the rights to use, copy, modify, merge, publish, 27389// distribute, sublicense, and/or sell copies of the Software, and to permit 27390// persons to whom the Software is furnished to do so, subject to the 27391// following conditions: 27392// 27393// The above copyright notice and this permission notice shall be included 27394// in all copies or substantial portions of the Software. 27395// 27396// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 27397// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27398// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 27399// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 27400// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 27401// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 27402// USE OR OTHER DEALINGS IN THE SOFTWARE. 27403 27404'use strict'; 27405 27406// If obj.hasOwnProperty has been overridden, then calling 27407// obj.hasOwnProperty(prop) will break. 27408// See: https://github.com/joyent/node/issues/1707 27409function hasOwnProperty(obj, prop) { 27410 return Object.prototype.hasOwnProperty.call(obj, prop); 27411} 27412 27413module.exports = function(qs, sep, eq, options) { 27414 sep = sep || '&'; 27415 eq = eq || '='; 27416 var obj = {}; 27417 27418 if (typeof qs !== 'string' || qs.length === 0) { 27419 return obj; 27420 } 27421 27422 var regexp = /\+/g; 27423 qs = qs.split(sep); 27424 27425 var maxKeys = 1000; 27426 if (options && typeof options.maxKeys === 'number') { 27427 maxKeys = options.maxKeys; 27428 } 27429 27430 var len = qs.length; 27431 // maxKeys <= 0 means that we should not limit keys count 27432 if (maxKeys > 0 && len > maxKeys) { 27433 len = maxKeys; 27434 } 27435 27436 for (var i = 0; i < len; ++i) { 27437 var x = qs[i].replace(regexp, '%20'), 27438 idx = x.indexOf(eq), 27439 kstr, vstr, k, v; 27440 27441 if (idx >= 0) { 27442 kstr = x.substr(0, idx); 27443 vstr = x.substr(idx + 1); 27444 } else { 27445 kstr = x; 27446 vstr = ''; 27447 } 27448 27449 k = decodeURIComponent(kstr); 27450 v = decodeURIComponent(vstr); 27451 27452 if (!hasOwnProperty(obj, k)) { 27453 obj[k] = v; 27454 } else if (isArray(obj[k])) { 27455 obj[k].push(v); 27456 } else { 27457 obj[k] = [obj[k], v]; 27458 } 27459 } 27460 27461 return obj; 27462}; 27463 27464var isArray = Array.isArray || function (xs) { 27465 return Object.prototype.toString.call(xs) === '[object Array]'; 27466}; 27467 27468},{}],175:[function(require,module,exports){ 27469// Copyright Joyent, Inc. and other Node contributors. 27470// 27471// Permission is hereby granted, free of charge, to any person obtaining a 27472// copy of this software and associated documentation files (the 27473// "Software"), to deal in the Software without restriction, including 27474// without limitation the rights to use, copy, modify, merge, publish, 27475// distribute, sublicense, and/or sell copies of the Software, and to permit 27476// persons to whom the Software is furnished to do so, subject to the 27477// following conditions: 27478// 27479// The above copyright notice and this permission notice shall be included 27480// in all copies or substantial portions of the Software. 27481// 27482// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 27483// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 27484// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 27485// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 27486// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 27487// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 27488// USE OR OTHER DEALINGS IN THE SOFTWARE. 27489 27490'use strict'; 27491 27492var stringifyPrimitive = function(v) { 27493 switch (typeof v) { 27494 case 'string': 27495 return v; 27496 27497 case 'boolean': 27498 return v ? 'true' : 'false'; 27499 27500 case 'number': 27501 return isFinite(v) ? v : ''; 27502 27503 default: 27504 return ''; 27505 } 27506}; 27507 27508module.exports = function(obj, sep, eq, name) { 27509 sep = sep || '&'; 27510 eq = eq || '='; 27511 if (obj === null) { 27512 obj = undefined; 27513 } 27514 27515 if (typeof obj === 'object') { 27516 return map(objectKeys(obj), function(k) { 27517 var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; 27518 if (isArray(obj[k])) { 27519 return map(obj[k], function(v) { 27520 return ks + encodeURIComponent(stringifyPrimitive(v)); 27521 }).join(sep); 27522 } else { 27523 return ks + encodeURIComponent(stringifyPrimitive(obj[k])); 27524 } 27525 }).join(sep); 27526 27527 } 27528 27529 if (!name) return ''; 27530 return encodeURIComponent(stringifyPrimitive(name)) + eq + 27531 encodeURIComponent(stringifyPrimitive(obj)); 27532}; 27533 27534var isArray = Array.isArray || function (xs) { 27535 return Object.prototype.toString.call(xs) === '[object Array]'; 27536}; 27537 27538function map (xs, f) { 27539 if (xs.map) return xs.map(f); 27540 var res = []; 27541 for (var i = 0; i < xs.length; i++) { 27542 res.push(f(xs[i], i)); 27543 } 27544 return res; 27545} 27546 27547var objectKeys = Object.keys || function (obj) { 27548 var res = []; 27549 for (var key in obj) { 27550 if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); 27551 } 27552 return res; 27553}; 27554 27555},{}],176:[function(require,module,exports){ 27556'use strict'; 27557 27558exports.decode = exports.parse = require('./decode'); 27559exports.encode = exports.stringify = require('./encode'); 27560 27561},{"./decode":174,"./encode":175}],177:[function(require,module,exports){ 27562'use strict'; 27563 27564var has = Object.prototype.hasOwnProperty 27565 , undef; 27566 27567/** 27568 * Decode a URI encoded string. 27569 * 27570 * @param {String} input The URI encoded string. 27571 * @returns {String|Null} The decoded string. 27572 * @api private 27573 */ 27574function decode(input) { 27575 try { 27576 return decodeURIComponent(input.replace(/\+/g, ' ')); 27577 } catch (e) { 27578 return null; 27579 } 27580} 27581 27582/** 27583 * Attempts to encode a given input. 27584 * 27585 * @param {String} input The string that needs to be encoded. 27586 * @returns {String|Null} The encoded string. 27587 * @api private 27588 */ 27589function encode(input) { 27590 try { 27591 return encodeURIComponent(input); 27592 } catch (e) { 27593 return null; 27594 } 27595} 27596 27597/** 27598 * Simple query string parser. 27599 * 27600 * @param {String} query The query string that needs to be parsed. 27601 * @returns {Object} 27602 * @api public 27603 */ 27604function querystring(query) { 27605 var parser = /([^=?#&]+)=?([^&]*)/g 27606 , result = {} 27607 , part; 27608 27609 while (part = parser.exec(query)) { 27610 var key = decode(part[1]) 27611 , value = decode(part[2]); 27612 27613 // 27614 // Prevent overriding of existing properties. This ensures that build-in 27615 // methods like `toString` or __proto__ are not overriden by malicious 27616 // querystrings. 27617 // 27618 // In the case if failed decoding, we want to omit the key/value pairs 27619 // from the result. 27620 //
vendor: 17,883 bytes, lines 27621-28317
27621 if (key === null || value === null || key in result) continue; 27622 result[key] = value; 27623 } 27624 27625 return result; 27626} 27627 27628/** 27629 * Transform a query string to an object. 27630 * 27631 * @param {Object} obj Object that should be transformed. 27632 * @param {String} prefix Optional prefix. 27633 * @returns {String} 27634 * @api public 27635 */ 27636function querystringify(obj, prefix) { 27637 prefix = prefix || ''; 27638 27639 var pairs = [] 27640 , value 27641 , key; 27642 27643 // 27644 // Optionally prefix with a '?' if needed 27645 // 27646 if ('string' !== typeof prefix) prefix = '?'; 27647 27648 for (key in obj) { 27649 if (has.call(obj, key)) { 27650 value = obj[key]; 27651 27652 // 27653 // Edge cases where we actually want to encode the value to an empty 27654 // string instead of the stringified value. 27655 // 27656 if (!value && (value === null || value === undef || isNaN(value))) { 27657 value = ''; 27658 } 27659 27660 key = encode(key); 27661 value = encode(value); 27662 27663 // 27664 // If we failed to encode the strings, we should bail out as we don't 27665 // want to add invalid strings to the query. 27666 // 27667 if (key === null || value === null) continue; 27668 pairs.push(key +'='+ value); 27669 } 27670 } 27671 27672 return pairs.length ? prefix + pairs.join('&') : ''; 27673} 27674 27675// 27676// Expose the module. 27677// 27678exports.stringify = querystringify; 27679exports.parse = querystring; 27680 27681},{}],178:[function(require,module,exports){ 27682'use strict'; 27683 27684/** 27685 * Check if we're required to add a port number. 27686 * 27687 * @see https://url.spec.whatwg.org/#default-port 27688 * @param {Number|String} port Port number we need to check 27689 * @param {String} protocol Protocol we need to check against. 27690 * @returns {Boolean} Is it a default port for the given protocol 27691 * @api private 27692 */ 27693module.exports = function required(port, protocol) { 27694 protocol = protocol.split(':')[0]; 27695 port = +port; 27696 27697 if (!port) return false; 27698 27699 switch (protocol) { 27700 case 'http': 27701 case 'ws': 27702 return port !== 80; 27703 27704 case 'https': 27705 case 'wss': 27706 return port !== 443; 27707 27708 case 'ftp': 27709 return port !== 21; 27710 27711 case 'gopher': 27712 return port !== 70; 27713 27714 case 'file': 27715 return false; 27716 } 27717 27718 return port !== 0; 27719}; 27720 27721},{}],179:[function(require,module,exports){ 27722(function (global){ 27723'use strict'; 27724 27725var transportList = require('./transport-list'); 27726 27727module.exports = require('./main')(transportList); 27728 27729// TODO can't get rid of this until all servers do 27730if ('_sockjs_onload' in global) { 27731 setTimeout(global._sockjs_onload, 1); 27732} 27733 27734}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 27735},{"./main":192,"./transport-list":194}],180:[function(require,module,exports){ 27736'use strict'; 27737 27738var inherits = require('inherits') 27739 , Event = require('./event') 27740 ; 27741 27742function CloseEvent() { 27743 Event.call(this); 27744 this.initEvent('close', false, false); 27745 this.wasClean = false; 27746 this.code = 0; 27747 this.reason = ''; 27748} 27749 27750inherits(CloseEvent, Event); 27751 27752module.exports = CloseEvent; 27753 27754},{"./event":182,"inherits":172}],181:[function(require,module,exports){ 27755'use strict'; 27756 27757var inherits = require('inherits') 27758 , EventTarget = require('./eventtarget') 27759 ; 27760 27761function EventEmitter() { 27762 EventTarget.call(this); 27763} 27764 27765inherits(EventEmitter, EventTarget); 27766 27767EventEmitter.prototype.removeAllListeners = function(type) { 27768 if (type) { 27769 delete this._listeners[type]; 27770 } else { 27771 this._listeners = {}; 27772 } 27773}; 27774 27775EventEmitter.prototype.once = function(type, listener) { 27776 var self = this 27777 , fired = false; 27778 27779 function g() { 27780 self.removeListener(type, g); 27781 27782 if (!fired) { 27783 fired = true; 27784 listener.apply(this, arguments); 27785 } 27786 } 27787 27788 this.on(type, g); 27789}; 27790 27791EventEmitter.prototype.emit = function() { 27792 var type = arguments[0]; 27793 var listeners = this._listeners[type]; 27794 if (!listeners) { 27795 return; 27796 } 27797 // equivalent of Array.prototype.slice.call(arguments, 1); 27798 var l = arguments.length; 27799 var args = new Array(l - 1); 27800 for (var ai = 1; ai < l; ai++) { 27801 args[ai - 1] = arguments[ai]; 27802 } 27803 for (var i = 0; i < listeners.length; i++) { 27804 listeners[i].apply(this, args); 27805 } 27806}; 27807 27808EventEmitter.prototype.on = EventEmitter.prototype.addListener = EventTarget.prototype.addEventListener; 27809EventEmitter.prototype.removeListener = EventTarget.prototype.removeEventListener; 27810 27811module.exports.EventEmitter = EventEmitter; 27812 27813},{"./eventtarget":183,"inherits":172}],182:[function(require,module,exports){ 27814'use strict'; 27815 27816function Event(eventType) { 27817 this.type = eventType; 27818} 27819 27820Event.prototype.initEvent = function(eventType, canBubble, cancelable) { 27821 this.type = eventType; 27822 this.bubbles = canBubble; 27823 this.cancelable = cancelable; 27824 this.timeStamp = +new Date(); 27825 return this; 27826}; 27827 27828Event.prototype.stopPropagation = function() {}; 27829Event.prototype.preventDefault = function() {}; 27830 27831Event.CAPTURING_PHASE = 1; 27832Event.AT_TARGET = 2; 27833Event.BUBBLING_PHASE = 3; 27834 27835module.exports = Event; 27836 27837},{}],183:[function(require,module,exports){ 27838'use strict'; 27839 27840/* Simplified implementation of DOM2 EventTarget. 27841 * http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget 27842 */ 27843 27844function EventTarget() { 27845 this._listeners = {}; 27846} 27847 27848EventTarget.prototype.addEventListener = function(eventType, listener) { 27849 if (!(eventType in this._listeners)) { 27850 this._listeners[eventType] = []; 27851 } 27852 var arr = this._listeners[eventType]; 27853 // #4 27854 if (arr.indexOf(listener) === -1) { 27855 // Make a copy so as not to interfere with a current dispatchEvent. 27856 arr = arr.concat([listener]); 27857 } 27858 this._listeners[eventType] = arr; 27859}; 27860 27861EventTarget.prototype.removeEventListener = function(eventType, listener) { 27862 var arr = this._listeners[eventType]; 27863 if (!arr) { 27864 return; 27865 } 27866 var idx = arr.indexOf(listener); 27867 if (idx !== -1) { 27868 if (arr.length > 1) { 27869 // Make a copy so as not to interfere with a current dispatchEvent. 27870 this._listeners[eventType] = arr.slice(0, idx).concat(arr.slice(idx + 1)); 27871 } else { 27872 delete this._listeners[eventType]; 27873 } 27874 return; 27875 } 27876}; 27877 27878EventTarget.prototype.dispatchEvent = function() { 27879 var event = arguments[0]; 27880 var t = event.type; 27881 // equivalent of Array.prototype.slice.call(arguments, 0); 27882 var args = arguments.length === 1 ? [event] : Array.apply(null, arguments); 27883 // TODO: This doesn't match the real behavior; per spec, onfoo get 27884 // their place in line from the /first/ time they're set from 27885 // non-null. Although WebKit bumps it to the end every time it's 27886 // set. 27887 if (this['on' + t]) { 27888 this['on' + t].apply(this, args); 27889 } 27890 if (t in this._listeners) { 27891 // Grab a reference to the listeners list. removeEventListener may alter the list. 27892 var listeners = this._listeners[t]; 27893 for (var i = 0; i < listeners.length; i++) { 27894 listeners[i].apply(this, args); 27895 } 27896 } 27897}; 27898 27899module.exports = EventTarget; 27900 27901},{}],184:[function(require,module,exports){ 27902'use strict'; 27903 27904var inherits = require('inherits') 27905 , Event = require('./event') 27906 ; 27907 27908function TransportMessageEvent(data) { 27909 Event.call(this); 27910 this.initEvent('message', false, false); 27911 this.data = data; 27912} 27913 27914inherits(TransportMessageEvent, Event); 27915 27916module.exports = TransportMessageEvent; 27917 27918},{"./event":182,"inherits":172}],185:[function(require,module,exports){ 27919'use strict'; 27920 27921var iframeUtils = require('./utils/iframe') 27922 ; 27923 27924function FacadeJS(transport) { 27925 this._transport = transport; 27926 transport.on('message', this._transportMessage.bind(this)); 27927 transport.on('close', this._transportClose.bind(this)); 27928} 27929 27930FacadeJS.prototype._transportClose = function(code, reason) { 27931 iframeUtils.postMessage('c', JSON.stringify([code, reason])); 27932}; 27933FacadeJS.prototype._transportMessage = function(frame) { 27934 iframeUtils.postMessage('t', frame); 27935}; 27936FacadeJS.prototype._send = function(data) { 27937 this._transport.send(data); 27938}; 27939FacadeJS.prototype._close = function() { 27940 this._transport.close(); 27941 this._transport.removeAllListeners(); 27942}; 27943 27944module.exports = FacadeJS; 27945 27946},{"./utils/iframe":225}],186:[function(require,module,exports){ 27947(function (process){ 27948'use strict'; 27949 27950var urlUtils = require('./utils/url') 27951 , eventUtils = require('./utils/event') 27952 , FacadeJS = require('./facade') 27953 , InfoIframeReceiver = require('./info-iframe-receiver') 27954 , iframeUtils = require('./utils/iframe') 27955 , loc = require('./location') 27956 ; 27957 27958var debug = function() {}; 27959if (process.env.NODE_ENV !== 'production') { 27960 debug = require('debug')('sockjs-client:iframe-bootstrap'); 27961} 27962 27963module.exports = function(SockJS, availableTransports) { 27964 var transportMap = {}; 27965 availableTransports.forEach(function(at) { 27966 if (at.facadeTransport) { 27967 transportMap[at.facadeTransport.transportName] = at.facadeTransport; 27968 } 27969 }); 27970 27971 // hard-coded for the info iframe 27972 // TODO see if we can make this more dynamic 27973 transportMap[InfoIframeReceiver.transportName] = InfoIframeReceiver; 27974 var parentOrigin; 27975 27976 /* eslint-disable camelcase */ 27977 SockJS.bootstrap_iframe = function() { 27978 /* eslint-enable camelcase */ 27979 var facade; 27980 iframeUtils.currentWindowId = loc.hash.slice(1); 27981 var onMessage = function(e) { 27982 if (e.source !== parent) { 27983 return; 27984 } 27985 if (typeof parentOrigin === 'undefined') { 27986 parentOrigin = e.origin; 27987 } 27988 if (e.origin !== parentOrigin) { 27989 return; 27990 } 27991 27992 var iframeMessage; 27993 try { 27994 iframeMessage = JSON.parse(e.data); 27995 } catch (ignored) { 27996 debug('bad json', e.data); 27997 return; 27998 } 27999 28000 if (iframeMessage.windowId !== iframeUtils.currentWindowId) { 28001 return; 28002 } 28003 switch (iframeMessage.type) { 28004 case 's': 28005 var p; 28006 try { 28007 p = JSON.parse(iframeMessage.data); 28008 } catch (ignored) { 28009 debug('bad json', iframeMessage.data); 28010 break; 28011 } 28012 var version = p[0]; 28013 var transport = p[1]; 28014 var transUrl = p[2]; 28015 var baseUrl = p[3]; 28016 debug(version, transport, transUrl, baseUrl); 28017 // change this to semver logic 28018 if (version !== SockJS.version) { 28019 throw new Error('Incompatible SockJS! Main site uses:' + 28020 ' "' + version + '", the iframe:' + 28021 ' "' + SockJS.version + '".'); 28022 } 28023 28024 if (!urlUtils.isOriginEqual(transUrl, loc.href) || 28025 !urlUtils.isOriginEqual(baseUrl, loc.href)) { 28026 throw new Error('Can\'t connect to different domain from within an ' + 28027 'iframe. (' + loc.href + ', ' + transUrl + ', ' + baseUrl + ')'); 28028 } 28029 facade = new FacadeJS(new transportMap[transport](transUrl, baseUrl)); 28030 break; 28031 case 'm': 28032 facade._send(iframeMessage.data); 28033 break; 28034 case 'c': 28035 if (facade) { 28036 facade._close(); 28037 } 28038 facade = null; 28039 break; 28040 } 28041 }; 28042 28043 eventUtils.attachEvent('message', onMessage); 28044 28045 // Start 28046 iframeUtils.postMessage('s'); 28047 }; 28048}; 28049 28050}).call(this,require('_process')) 28051},{"./facade":185,"./info-iframe-receiver":188,"./location":191,"./utils/event":224,"./utils/iframe":225,"./utils/url":230,"_process":173,"debug":232}],187:[function(require,module,exports){ 28052(function (process){ 28053'use strict'; 28054 28055var EventEmitter = require('events').EventEmitter 28056 , inherits = require('inherits') 28057 , objectUtils = require('./utils/object') 28058 ; 28059 28060var debug = function() {}; 28061if (process.env.NODE_ENV !== 'production') { 28062 debug = require('debug')('sockjs-client:info-ajax'); 28063} 28064 28065function InfoAjax(url, AjaxObject) { 28066 EventEmitter.call(this); 28067 28068 var self = this; 28069 var t0 = +new Date(); 28070 this.xo = new AjaxObject('GET', url); 28071 28072 this.xo.once('finish', function(status, text) { 28073 var info, rtt; 28074 if (status === 200) { 28075 rtt = (+new Date()) - t0; 28076 if (text) { 28077 try { 28078 info = JSON.parse(text); 28079 } catch (e) { 28080 debug('bad json', text); 28081 } 28082 } 28083 28084 if (!objectUtils.isObject(info)) { 28085 info = {}; 28086 } 28087 } 28088 self.emit('finish', info, rtt); 28089 self.removeAllListeners(); 28090 }); 28091} 28092 28093inherits(InfoAjax, EventEmitter); 28094 28095InfoAjax.prototype.close = function() { 28096 this.removeAllListeners(); 28097 this.xo.close(); 28098}; 28099 28100module.exports = InfoAjax; 28101 28102}).call(this,require('_process')) 28103},{"./utils/object":227,"_process":173,"debug":232,"events":181,"inherits":172}],188:[function(require,module,exports){ 28104'use strict'; 28105 28106var inherits = require('inherits') 28107 , EventEmitter = require('events').EventEmitter 28108 , XHRLocalObject = require('./transport/sender/xhr-local') 28109 , InfoAjax = require('./info-ajax') 28110 ; 28111 28112function InfoReceiverIframe(transUrl) { 28113 var self = this; 28114 EventEmitter.call(this); 28115 28116 this.ir = new InfoAjax(transUrl, XHRLocalObject); 28117 this.ir.once('finish', function(info, rtt) { 28118 self.ir = null; 28119 self.emit('message', JSON.stringify([info, rtt])); 28120 }); 28121} 28122 28123inherits(InfoReceiverIframe, EventEmitter); 28124 28125InfoReceiverIframe.transportName = 'iframe-info-receiver'; 28126 28127InfoReceiverIframe.prototype.close = function() { 28128 if (this.ir) { 28129 this.ir.close(); 28130 this.ir = null; 28131 } 28132 this.removeAllListeners(); 28133}; 28134 28135module.exports = InfoReceiverIframe; 28136 28137},{"./info-ajax":187,"./transport/sender/xhr-local":215,"events":181,"inherits":172}],189:[function(require,module,exports){ 28138(function (process,global){ 28139'use strict'; 28140 28141var EventEmitter = require('events').EventEmitter 28142 , inherits = require('inherits') 28143 , utils = require('./utils/event') 28144 , IframeTransport = require('./transport/iframe') 28145 , InfoReceiverIframe = require('./info-iframe-receiver') 28146 ; 28147 28148var debug = function() {}; 28149if (process.env.NODE_ENV !== 'production') { 28150 debug = require('debug')('sockjs-client:info-iframe'); 28151} 28152 28153function InfoIframe(baseUrl, url) { 28154 var self = this; 28155 EventEmitter.call(this); 28156 28157 var go = function() { 28158 var ifr = self.ifr = new IframeTransport(InfoReceiverIframe.transportName, url, baseUrl); 28159 28160 ifr.once('message', function(msg) { 28161 if (msg) { 28162 var d; 28163 try { 28164 d = JSON.parse(msg); 28165 } catch (e) { 28166 debug('bad json', msg); 28167 self.emit('finish'); 28168 self.close(); 28169 return; 28170 } 28171 28172 var info = d[0], rtt = d[1]; 28173 self.emit('finish', info, rtt); 28174 } 28175 self.close(); 28176 }); 28177 28178 ifr.once('close', function() { 28179 self.emit('finish'); 28180 self.close(); 28181 }); 28182 }; 28183 28184 // TODO this seems the same as the 'needBody' from transports 28185 if (!global.document.body) { 28186 utils.attachEvent('load', go); 28187 } else { 28188 go(); 28189 } 28190} 28191 28192inherits(InfoIframe, EventEmitter); 28193 28194InfoIframe.enabled = function() { 28195 return IframeTransport.enabled(); 28196}; 28197 28198InfoIframe.prototype.close = function() { 28199 if (this.ifr) { 28200 this.ifr.close(); 28201 } 28202 this.removeAllListeners(); 28203 this.ifr = null; 28204}; 28205 28206module.exports = InfoIframe; 28207 28208}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 28209},{"./info-iframe-receiver":188,"./transport/iframe":200,"./utils/event":224,"_process":173,"debug":232,"events":181,"inherits":172}],190:[function(require,module,exports){ 28210(function (process){ 28211'use strict'; 28212 28213var EventEmitter = require('events').EventEmitter 28214 , inherits = require('inherits') 28215 , urlUtils = require('./utils/url') 28216 , XDR = require('./transport/sender/xdr') 28217 , XHRCors = require('./transport/sender/xhr-cors') 28218 , XHRLocal = require('./transport/sender/xhr-local') 28219 , XHRFake = require('./transport/sender/xhr-fake') 28220 , InfoIframe = require('./info-iframe') 28221 , InfoAjax = require('./info-ajax') 28222 ; 28223 28224var debug = function() {}; 28225if (process.env.NODE_ENV !== 'production') { 28226 debug = require('debug')('sockjs-client:info-receiver'); 28227} 28228 28229function InfoReceiver(baseUrl, urlInfo) { 28230 debug(baseUrl); 28231 var self = this; 28232 EventEmitter.call(this); 28233 28234 setTimeout(function() { 28235 self.doXhr(baseUrl, urlInfo); 28236 }, 0); 28237} 28238 28239inherits(InfoReceiver, EventEmitter); 28240 28241// TODO this is currently ignoring the list of available transports and the whitelist 28242 28243InfoReceiver._getReceiver = function(baseUrl, url, urlInfo) { 28244 // determine method of CORS support (if needed) 28245 if (urlInfo.sameOrigin) { 28246 return new InfoAjax(url, XHRLocal); 28247 } 28248 if (XHRCors.enabled) { 28249 return new InfoAjax(url, XHRCors); 28250 } 28251 if (XDR.enabled && urlInfo.sameScheme) { 28252 return new InfoAjax(url, XDR); 28253 } 28254 if (InfoIframe.enabled()) { 28255 return new InfoIframe(baseUrl, url); 28256 } 28257 return new InfoAjax(url, XHRFake); 28258}; 28259 28260InfoReceiver.prototype.doXhr = function(baseUrl, urlInfo) { 28261 var self = this 28262 , url = urlUtils.addPath(baseUrl, '/info') 28263 ; 28264 debug('doXhr', url); 28265 28266 this.xo = InfoReceiver._getReceiver(baseUrl, url, urlInfo); 28267 28268 this.timeoutRef = setTimeout(function() { 28269 debug('timeout'); 28270 self._cleanup(false); 28271 self.emit('finish'); 28272 }, InfoReceiver.timeout); 28273 28274 this.xo.once('finish', function(info, rtt) { 28275 debug('finish', info, rtt); 28276 self._cleanup(true); 28277 self.emit('finish', info, rtt); 28278 }); 28279}; 28280 28281InfoReceiver.prototype._cleanup = function(wasClean) { 28282 debug('_cleanup'); 28283 clearTimeout(this.timeoutRef); 28284 this.timeoutRef = null; 28285 if (!wasClean && this.xo) { 28286 this.xo.close(); 28287 } 28288 this.xo = null; 28289}; 28290 28291InfoReceiver.prototype.close = function() { 28292 debug('close'); 28293 this.removeAllListeners(); 28294 this._cleanup(false); 28295}; 28296 28297InfoReceiver.timeout = 8000; 28298 28299module.exports = InfoReceiver; 28300 28301}).call(this,require('_process')) 28302},{"./info-ajax":187,"./info-iframe":189,"./transport/sender/xdr":212,"./transport/sender/xhr-cors":213,"./transport/sender/xhr-fake":214,"./transport/sender/xhr-local":215,"./utils/url":230,"_process":173,"debug":232,"events":181,"inherits":172}],191:[function(require,module,exports){ 28303(function (global){ 28304'use strict'; 28305 28306module.exports = global.location || { 28307 origin: 'http://localhost:80' 28308, protocol: 'http:' 28309, host: 'localhost' 28310, port: 80 28311, href: 'http://localhost/' 28312, hash: '' 28313}; 28314 28315}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 28316},{}],192:[function(require,module,exports){ 28317(function (process,global
vendor: 12,160 bytes, lines 28317-28707
28317){ 28318'use strict'; 28319 28320require('./shims'); 28321 28322var URL = require('url-parse') 28323 , inherits = require('inherits') 28324 , random = require('./utils/random') 28325 , escape = require('./utils/escape') 28326 , urlUtils = require('./utils/url') 28327 , eventUtils = require('./utils/event') 28328 , transport = require('./utils/transport') 28329 , objectUtils = require('./utils/object') 28330 , browser = require('./utils/browser') 28331 , log = require('./utils/log') 28332 , Event = require('./event/event') 28333 , EventTarget = require('./event/eventtarget') 28334 , loc = require('./location') 28335 , CloseEvent = require('./event/close') 28336 , TransportMessageEvent = require('./event/trans-message') 28337 , InfoReceiver = require('./info-receiver') 28338 ; 28339 28340var debug = function() {}; 28341if (process.env.NODE_ENV !== 'production') { 28342 debug = require('debug')('sockjs-client:main'); 28343} 28344 28345var transports; 28346 28347// follow constructor steps defined at http://dev.w3.org/html5/websockets/#the-websocket-interface 28348function SockJS(url, protocols, options) { 28349 if (!(this instanceof SockJS)) { 28350 return new SockJS(url, protocols, options); 28351 } 28352 if (arguments.length < 1) { 28353 throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present"); 28354 } 28355 EventTarget.call(this); 28356 28357 this.readyState = SockJS.CONNECTING; 28358 this.extensions = ''; 28359 this.protocol = ''; 28360 28361 // non-standard extension 28362 options = options || {}; 28363 if (options.protocols_whitelist) { 28364 log.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."); 28365 } 28366 this._transportsWhitelist = options.transports; 28367 this._transportOptions = options.transportOptions || {}; 28368 this._timeout = options.timeout || 0; 28369 28370 var sessionId = options.sessionId || 8; 28371 if (typeof sessionId === 'function') { 28372 this._generateSessionId = sessionId; 28373 } else if (typeof sessionId === 'number') { 28374 this._generateSessionId = function() { 28375 return random.string(sessionId); 28376 }; 28377 } else { 28378 throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.'); 28379 } 28380 28381 this._server = options.server || random.numberString(1000); 28382 28383 // Step 1 of WS spec - parse and validate the url. Issue #8 28384 var parsedUrl = new URL(url); 28385 if (!parsedUrl.host || !parsedUrl.protocol) { 28386 throw new SyntaxError("The URL '" + url + "' is invalid"); 28387 } else if (parsedUrl.hash) { 28388 throw new SyntaxError('The URL must not contain a fragment'); 28389 } else if (parsedUrl.protocol !== 'http:' && parsedUrl.protocol !== 'https:') { 28390 throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '" + parsedUrl.protocol + "' is not allowed."); 28391 } 28392 28393 var secure = parsedUrl.protocol === 'https:'; 28394 // Step 2 - don't allow secure origin with an insecure protocol 28395 if (loc.protocol === 'https:' && !secure) { 28396 // exception is 127.0.0.0/8 and ::1 urls 28397 if (!urlUtils.isLoopbackAddr(parsedUrl.hostname)) { 28398 throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS'); 28399 } 28400 } 28401 28402 // Step 3 - check port access - no need here 28403 // Step 4 - parse protocols argument 28404 if (!protocols) { 28405 protocols = []; 28406 } else if (!Array.isArray(protocols)) { 28407 protocols = [protocols]; 28408 } 28409 28410 // Step 5 - check protocols argument 28411 var sortedProtocols = protocols.sort(); 28412 sortedProtocols.forEach(function(proto, i) { 28413 if (!proto) { 28414 throw new SyntaxError("The protocols entry '" + proto + "' is invalid."); 28415 } 28416 if (i < (sortedProtocols.length - 1) && proto === sortedProtocols[i + 1]) { 28417 throw new SyntaxError("The protocols entry '" + proto + "' is duplicated."); 28418 } 28419 }); 28420 28421 // Step 6 - convert origin 28422 var o = urlUtils.getOrigin(loc.href); 28423 this._origin = o ? o.toLowerCase() : null; 28424 28425 // remove the trailing slash 28426 parsedUrl.set('pathname', parsedUrl.pathname.replace(/\/+$/, '')); 28427 28428 // store the sanitized url 28429 this.url = parsedUrl.href; 28430 debug('using url', this.url); 28431 28432 // Step 7 - start connection in background 28433 // obtain server info 28434 // http://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html#section-26 28435 this._urlInfo = { 28436 nullOrigin: !browser.hasDomain() 28437 , sameOrigin: urlUtils.isOriginEqual(this.url, loc.href) 28438 , sameScheme: urlUtils.isSchemeEqual(this.url, loc.href) 28439 }; 28440 28441 this._ir = new InfoReceiver(this.url, this._urlInfo); 28442 this._ir.once('finish', this._receiveInfo.bind(this)); 28443} 28444 28445inherits(SockJS, EventTarget); 28446 28447function userSetCode(code) { 28448 return code === 1000 || (code >= 3000 && code <= 4999); 28449} 28450 28451SockJS.prototype.close = function(code, reason) { 28452 // Step 1 28453 if (code && !userSetCode(code)) { 28454 throw new Error('InvalidAccessError: Invalid code'); 28455 } 28456 // Step 2.4 states the max is 123 bytes, but we are just checking length 28457 if (reason && reason.length > 123) { 28458 throw new SyntaxError('reason argument has an invalid length'); 28459 } 28460 28461 // Step 3.1 28462 if (this.readyState === SockJS.CLOSING || this.readyState === SockJS.CLOSED) { 28463 return; 28464 } 28465 28466 // TODO look at docs to determine how to set this 28467 var wasClean = true; 28468 this._close(code || 1000, reason || 'Normal closure', wasClean); 28469}; 28470 28471SockJS.prototype.send = function(data) { 28472 // #13 - convert anything non-string to string 28473 // TODO this currently turns objects into [object Object] 28474 if (typeof data !== 'string') { 28475 data = '' + data; 28476 } 28477 if (this.readyState === SockJS.CONNECTING) { 28478 throw new Error('InvalidStateError: The connection has not been established yet'); 28479 } 28480 if (this.readyState !== SockJS.OPEN) { 28481 return; 28482 } 28483 this._transport.send(escape.quote(data)); 28484}; 28485 28486SockJS.version = require('./version'); 28487 28488SockJS.CONNECTING = 0; 28489SockJS.OPEN = 1; 28490SockJS.CLOSING = 2; 28491SockJS.CLOSED = 3; 28492 28493SockJS.prototype._receiveInfo = function(info, rtt) { 28494 debug('_receiveInfo', rtt); 28495 this._ir = null; 28496 if (!info) { 28497 this._close(1002, 'Cannot connect to server'); 28498 return; 28499 } 28500 28501 // establish a round-trip timeout (RTO) based on the 28502 // round-trip time (RTT) 28503 this._rto = this.countRTO(rtt); 28504 // allow server to override url used for the actual transport 28505 this._transUrl = info.base_url ? info.base_url : this.url; 28506 info = objectUtils.extend(info, this._urlInfo); 28507 debug('info', info); 28508 // determine list of desired and supported transports 28509 var enabledTransports = transports.filterToEnabled(this._transportsWhitelist, info); 28510 this._transports = enabledTransports.main; 28511 debug(this._transports.length + ' enabled transports'); 28512 28513 this._connect(); 28514}; 28515 28516SockJS.prototype._connect = function() { 28517 for (var Transport = this._transports.shift(); Transport; Transport = this._transports.shift()) { 28518 debug('attempt', Transport.transportName); 28519 if (Transport.needBody) { 28520 if (!global.document.body || 28521 (typeof global.document.readyState !== 'undefined' && 28522 global.document.readyState !== 'complete' && 28523 global.document.readyState !== 'interactive')) { 28524 debug('waiting for body'); 28525 this._transports.unshift(Transport); 28526 eventUtils.attachEvent('load', this._connect.bind(this)); 28527 return; 28528 } 28529 } 28530 28531 // calculate timeout based on RTO and round trips. Default to 5s 28532 var timeoutMs = Math.max(this._timeout, (this._rto * Transport.roundTrips) || 5000); 28533 this._transportTimeoutId = setTimeout(this._transportTimeout.bind(this), timeoutMs); 28534 debug('using timeout', timeoutMs); 28535 28536 var transportUrl = urlUtils.addPath(this._transUrl, '/' + this._server + '/' + this._generateSessionId()); 28537 var options = this._transportOptions[Transport.transportName]; 28538 debug('transport url', transportUrl); 28539 var transportObj = new Transport(transportUrl, this._transUrl, options); 28540 transportObj.on('message', this._transportMessage.bind(this)); 28541 transportObj.once('close', this._transportClose.bind(this)); 28542 transportObj.transportName = Transport.transportName; 28543 this._transport = transportObj; 28544 28545 return; 28546 } 28547 this._close(2000, 'All transports failed', false); 28548}; 28549 28550SockJS.prototype._transportTimeout = function() { 28551 debug('_transportTimeout'); 28552 if (this.readyState === SockJS.CONNECTING) { 28553 if (this._transport) { 28554 this._transport.close(); 28555 } 28556 28557 this._transportClose(2007, 'Transport timed out'); 28558 } 28559}; 28560 28561SockJS.prototype._transportMessage = function(msg) { 28562 debug('_transportMessage', msg); 28563 var self = this 28564 , type = msg.slice(0, 1) 28565 , content = msg.slice(1) 28566 , payload 28567 ; 28568 28569 // first check for messages that don't need a payload 28570 switch (type) { 28571 case 'o': 28572 this._open(); 28573 return; 28574 case 'h': 28575 this.dispatchEvent(new Event('heartbeat')); 28576 debug('heartbeat', this.transport); 28577 return; 28578 } 28579 28580 if (content) { 28581 try { 28582 payload = JSON.parse(content); 28583 } catch (e) { 28584 debug('bad json', content); 28585 } 28586 } 28587 28588 if (typeof payload === 'undefined') { 28589 debug('empty payload', content); 28590 return; 28591 } 28592 28593 switch (type) { 28594 case 'a': 28595 if (Array.isArray(payload)) { 28596 payload.forEach(function(p) { 28597 debug('message', self.transport, p); 28598 self.dispatchEvent(new TransportMessageEvent(p)); 28599 }); 28600 } 28601 break; 28602 case 'm': 28603 debug('message', this.transport, payload); 28604 this.dispatchEvent(new TransportMessageEvent(payload)); 28605 break; 28606 case 'c': 28607 if (Array.isArray(payload) && payload.length === 2) { 28608 this._close(payload[0], payload[1], true); 28609 } 28610 break; 28611 } 28612}; 28613 28614SockJS.prototype._transportClose = function(code, reason) { 28615 debug('_transportClose', this.transport, code, reason); 28616 if (this._transport) { 28617 this._transport.removeAllListeners(); 28618 this._transport = null; 28619 this.transport = null; 28620 } 28621 28622 if (!userSetCode(code) && code !== 2000 && this.readyState === SockJS.CONNECTING) { 28623 this._connect(); 28624 return; 28625 } 28626 28627 this._close(code, reason); 28628}; 28629 28630SockJS.prototype._open = function() { 28631 debug('_open', this._transport && this._transport.transportName, this.readyState); 28632 if (this.readyState === SockJS.CONNECTING) { 28633 if (this._transportTimeoutId) { 28634 clearTimeout(this._transportTimeoutId); 28635 this._transportTimeoutId = null; 28636 } 28637 this.readyState = SockJS.OPEN; 28638 this.transport = this._transport.transportName; 28639 this.dispatchEvent(new Event('open')); 28640 debug('connected', this.transport); 28641 } else { 28642 // The server might have been restarted, and lost track of our 28643 // connection. 28644 this._close(1006, 'Server lost session'); 28645 } 28646}; 28647 28648SockJS.prototype._close = function(code, reason, wasClean) { 28649 debug('_close', this.transport, code, reason, wasClean, this.readyState); 28650 var forceFail = false; 28651 28652 if (this._ir) { 28653 forceFail = true; 28654 this._ir.close(); 28655 this._ir = null; 28656 } 28657 if (this._transport) { 28658 this._transport.close(); 28659 this._transport = null; 28660 this.transport = null; 28661 } 28662 28663 if (this.readyState === SockJS.CLOSED) { 28664 throw new Error('InvalidStateError: SockJS has already been closed'); 28665 } 28666 28667 this.readyState = SockJS.CLOSING; 28668 setTimeout(function() { 28669 this.readyState = SockJS.CLOSED; 28670 28671 if (forceFail) { 28672 this.dispatchEvent(new Event('error')); 28673 } 28674 28675 var e = new CloseEvent('close'); 28676 e.wasClean = wasClean || false; 28677 e.code = code || 1000; 28678 e.reason = reason; 28679 28680 this.dispatchEvent(e); 28681 this.onmessage = this.onclose = this.onerror = null; 28682 debug('disconnected'); 28683 }.bind(this), 0); 28684}; 28685 28686// See: http://www.erg.abdn.ac.uk/~gerrit/dccp/notes/ccid2/rto_estimator/ 28687// and RFC 2988. 28688SockJS.prototype.countRTO = function(rtt) { 28689 // In a local environment, when using IE8/9 and the `jsonp-polling` 28690 // transport the time needed to establish a connection (the time that pass 28691 // from the opening of the transport to the call of `_dispatchOpen`) is 28692 // around 200msec (the lower bound used in the article above) and this 28693 // causes spurious timeouts. For this reason we calculate a value slightly 28694 // larger than that used in the article. 28695 if (rtt > 100) { 28696 return 4 * rtt; // rto > 400msec 28697 } 28698 return 300 + rtt; // 300msec < rto <= 400msec 28699}; 28700 28701module.exports = function(availableTransports) { 28702 transports = transport(availableTransports); 28703 require('./iframe-bootstrap')(SockJS, availableTransports); 28704 return SockJS; 28705}; 28706 28707}).call(this
28707,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 28708},{"./event/close":180,"./event/event":182,"./event/eventtarget":183,"./event/trans-message":184,"./iframe-bootstrap":186,"./info-receiver":190,"./location":191,"./shims":193,"./utils/browser":222,"./utils/escape":223,"./utils/event":224,"./utils/log":226,"./utils/object":227,"./utils/random":228,"./utils/transport":229,"./utils/url":230,"./version":231,"_process":173,"debug":232,"inherits":172,"url-parse":241}],193
vendor: 17,248 bytes, lines 28708-29162
28708:[function(require,module,exports){ 28709/* eslint-disable */ 28710/* jscs: disable */ 28711'use strict'; 28712 28713// pulled specific shims from https://github.com/es-shims/es5-shim 28714 28715var ArrayPrototype = Array.prototype; 28716var ObjectPrototype = Object.prototype; 28717var FunctionPrototype = Function.prototype; 28718var StringPrototype = String.prototype; 28719var array_slice = ArrayPrototype.slice; 28720 28721var _toString = ObjectPrototype.toString; 28722var isFunction = function (val) { 28723 return ObjectPrototype.toString.call(val) === '[object Function]'; 28724}; 28725var isArray = function isArray(obj) { 28726 return _toString.call(obj) === '[object Array]'; 28727}; 28728var isString = function isString(obj) { 28729 return _toString.call(obj) === '[object String]'; 28730}; 28731 28732var supportsDescriptors = Object.defineProperty && (function () { 28733 try { 28734 Object.defineProperty({}, 'x', {}); 28735 return true; 28736 } catch (e) { /* this is ES3 */ 28737 return false; 28738 } 28739}()); 28740 28741// Define configurable, writable and non-enumerable props 28742// if they don't exist. 28743var defineProperty; 28744if (supportsDescriptors) { 28745 defineProperty = function (object, name, method, forceAssign) { 28746 if (!forceAssign && (name in object)) { return; } 28747 Object.defineProperty(object, name, { 28748 configurable: true, 28749 enumerable: false, 28750 writable: true, 28751 value: method 28752 }); 28753 }; 28754} else { 28755 defineProperty = function (object, name, method, forceAssign) { 28756 if (!forceAssign && (name in object)) { return; } 28757 object[name] = method; 28758 }; 28759} 28760var defineProperties = function (object, map, forceAssign) { 28761 for (var name in map) { 28762 if (ObjectPrototype.hasOwnProperty.call(map, name)) { 28763 defineProperty(object, name, map[name], forceAssign); 28764 } 28765 } 28766}; 28767 28768var toObject = function (o) { 28769 if (o == null) { // this matches both null and undefined 28770 throw new TypeError("can't convert " + o + ' to object'); 28771 } 28772 return Object(o); 28773}; 28774 28775// 28776// Util 28777// ====== 28778// 28779 28780// ES5 9.4 28781// http://es5.github.com/#x9.4 28782// http://jsperf.com/to-integer 28783 28784function toInteger(num) { 28785 var n = +num; 28786 if (n !== n) { // isNaN 28787 n = 0; 28788 } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { 28789 n = (n > 0 || -1) * Math.floor(Math.abs(n)); 28790 } 28791 return n; 28792} 28793 28794function ToUint32(x) { 28795 return x >>> 0; 28796} 28797 28798// 28799// Function 28800// ======== 28801// 28802 28803// ES-5 15.3.4.5 28804// http://es5.github.com/#x15.3.4.5 28805 28806function Empty() {} 28807 28808defineProperties(FunctionPrototype, { 28809 bind: function bind(that) { // .length is 1 28810 // 1. Let Target be the this value. 28811 var target = this; 28812 // 2. If IsCallable(Target) is false, throw a TypeError exception. 28813 if (!isFunction(target)) { 28814 throw new TypeError('Function.prototype.bind called on incompatible ' + target); 28815 } 28816 // 3. Let A be a new (possibly empty) internal list of all of the 28817 // argument values provided after thisArg (arg1, arg2 etc), in order. 28818 // XXX slicedArgs will stand in for "A" if used 28819 var args = array_slice.call(arguments, 1); // for normal call 28820 // 4. Let F be a new native ECMAScript object. 28821 // 11. Set the [[Prototype]] internal property of F to the standard 28822 // built-in Function prototype object as specified in 15.3.3.1. 28823 // 12. Set the [[Call]] internal property of F as described in 28824 // 15.3.4.5.1. 28825 // 13. Set the [[Construct]] internal property of F as described in 28826 // 15.3.4.5.2. 28827 // 14. Set the [[HasInstance]] internal property of F as described in 28828 // 15.3.4.5.3. 28829 var binder = function () { 28830 28831 if (this instanceof bound) { 28832 // 15.3.4.5.2 [[Construct]] 28833 // When the [[Construct]] internal method of a function object, 28834 // F that was created using the bind function is called with a 28835 // list of arguments ExtraArgs, the following steps are taken: 28836 // 1. Let target be the value of F's [[TargetFunction]] 28837 // internal property. 28838 // 2. If target has no [[Construct]] internal method, a 28839 // TypeError exception is thrown. 28840 // 3. Let boundArgs be the value of F's [[BoundArgs]] internal 28841 // property. 28842 // 4. Let args be a new list containing the same values as the 28843 // list boundArgs in the same order followed by the same 28844 // values as the list ExtraArgs in the same order. 28845 // 5. Return the result of calling the [[Construct]] internal 28846 // method of target providing args as the arguments. 28847 28848 var result = target.apply( 28849 this, 28850 args.concat(array_slice.call(arguments)) 28851 ); 28852 if (Object(result) === result) { 28853 return result; 28854 } 28855 return this; 28856 28857 } else { 28858 // 15.3.4.5.1 [[Call]] 28859 // When the [[Call]] internal method of a function object, F, 28860 // which was created using the bind function is called with a 28861 // this value and a list of arguments ExtraArgs, the following 28862 // steps are taken: 28863 // 1. Let boundArgs be the value of F's [[BoundArgs]] internal 28864 // property. 28865 // 2. Let boundThis be the value of F's [[BoundThis]] internal 28866 // property. 28867 // 3. Let target be the value of F's [[TargetFunction]] internal 28868 // property. 28869 // 4. Let args be a new list containing the same values as the 28870 // list boundArgs in the same order followed by the same 28871 // values as the list ExtraArgs in the same order. 28872 // 5. Return the result of calling the [[Call]] internal method 28873 // of target providing boundThis as the this value and 28874 // providing args as the arguments. 28875 28876 // equiv: target.call(this, ...boundArgs, ...args) 28877 return target.apply( 28878 that, 28879 args.concat(array_slice.call(arguments)) 28880 ); 28881 28882 } 28883 28884 }; 28885 28886 // 15. If the [[Class]] internal property of Target is "Function", then 28887 // a. Let L be the length property of Target minus the length of A. 28888 // b. Set the length own property of F to either 0 or L, whichever is 28889 // larger. 28890 // 16. Else set the length own property of F to 0. 28891 28892 var boundLength = Math.max(0, target.length - args.length); 28893 28894 // 17. Set the attributes of the length own property of F to the values 28895 // specified in 15.3.5.1. 28896 var boundArgs = []; 28897 for (var i = 0; i < boundLength; i++) { 28898 boundArgs.push('$' + i); 28899 } 28900 28901 // XXX Build a dynamic function with desired amount of arguments is the only 28902 // way to set the length property of a function. 28903 // In environments where Content Security Policies enabled (Chrome extensions, 28904 // for ex.) all use of eval or Function costructor throws an exception. 28905 // However in all of these environments Function.prototype.bind exists 28906 // and so this code will never be executed. 28907 var bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder); 28908 28909 if (target.prototype) { 28910 Empty.prototype = target.prototype; 28911 bound.prototype = new Empty(); 28912 // Clean up dangling references. 28913 Empty.prototype = null; 28914 } 28915 28916 // TODO 28917 // 18. Set the [[Extensible]] internal property of F to true. 28918 28919 // TODO 28920 // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). 28921 // 20. Call the [[DefineOwnProperty]] internal method of F with 28922 // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: 28923 // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and 28924 // false. 28925 // 21. Call the [[DefineOwnProperty]] internal method of F with 28926 // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, 28927 // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, 28928 // and false. 28929 28930 // TODO 28931 // NOTE Function objects created using Function.prototype.bind do not 28932 // have a prototype property or the [[Code]], [[FormalParameters]], and 28933 // [[Scope]] internal properties. 28934 // XXX can't delete prototype in pure-js. 28935 28936 // 22. Return F. 28937 return bound; 28938 } 28939}); 28940 28941// 28942// Array 28943// ===== 28944// 28945 28946// ES5 15.4.3.2 28947// http://es5.github.com/#x15.4.3.2 28948// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray 28949defineProperties(Array, { isArray: isArray }); 28950 28951 28952var boxedString = Object('a'); 28953var splitString = boxedString[0] !== 'a' || !(0 in boxedString); 28954 28955var properlyBoxesContext = function properlyBoxed(method) { 28956 // Check node 0.6.21 bug where third parameter is not boxed 28957 var properlyBoxesNonStrict = true; 28958 var properlyBoxesStrict = true; 28959 if (method) { 28960 method.call('foo', function (_, __, context) { 28961 if (typeof context !== 'object') { properlyBoxesNonStrict = false; } 28962 }); 28963 28964 method.call([1], function () { 28965 'use strict'; 28966 properlyBoxesStrict = typeof this === 'string'; 28967 }, 'x'); 28968 } 28969 return !!method && properlyBoxesNonStrict && properlyBoxesStrict; 28970}; 28971 28972defineProperties(ArrayPrototype, { 28973 forEach: function forEach(fun /*, thisp*/) { 28974 var object = toObject(this), 28975 self = splitString && isString(this) ? this.split('') : object, 28976 thisp = arguments[1], 28977 i = -1, 28978 length = self.length >>> 0; 28979 28980 // If no callback function or if callback is not a callable function 28981 if (!isFunction(fun)) { 28982 throw new TypeError(); // TODO message 28983 } 28984 28985 while (++i < length) { 28986 if (i in self) { 28987 // Invoke the callback function with call, passing arguments: 28988 // context, property value, property key, thisArg object 28989 // context 28990 fun.call(thisp, self[i], i, object); 28991 } 28992 } 28993 } 28994}, !properlyBoxesContext(ArrayPrototype.forEach)); 28995 28996// ES5 15.4.4.14 28997// http://es5.github.com/#x15.4.4.14 28998// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf 28999var hasFirefox2IndexOfBug = Array.prototype.indexOf && [0, 1].indexOf(1, 2) !== -1; 29000defineProperties(ArrayPrototype, { 29001 indexOf: function indexOf(sought /*, fromIndex */ ) { 29002 var self = splitString && isString(this) ? this.split('') : toObject(this), 29003 length = self.length >>> 0; 29004 29005 if (!length) { 29006 return -1; 29007 } 29008 29009 var i = 0; 29010 if (arguments.length > 1) { 29011 i = toInteger(arguments[1]); 29012 } 29013 29014 // handle negative indices 29015 i = i >= 0 ? i : Math.max(0, length + i); 29016 for (; i < length; i++) { 29017 if (i in self && self[i] === sought) { 29018 return i; 29019 } 29020 } 29021 return -1; 29022 } 29023}, hasFirefox2IndexOfBug); 29024 29025// 29026// String 29027// ====== 29028// 29029 29030// ES5 15.5.4.14 29031// http://es5.github.com/#x15.5.4.14 29032 29033// [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] 29034// Many browsers do not split properly with regular expressions or they 29035// do not perform the split correctly under obscure conditions. 29036// See http://blog.stevenlevithan.com/archives/cross-browser-split 29037// I've tested in many browsers and this seems to cover the deviant ones: 29038// 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] 29039// '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] 29040// 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not 29041// [undefined, "t", undefined, "e", ...] 29042// ''.split(/.?/) should be [], not [""] 29043// '.'.split(/()()/) should be ["."], not ["", "", "."] 29044 29045var string_split = StringPrototype.split; 29046if ( 29047 'ab'.split(/(?:ab)*/).length !== 2 || 29048 '.'.split(/(.?)(.?)/).length !== 4 || 29049 'tesst'.split(/(s)*/)[1] === 't' || 29050 'test'.split(/(?:)/, -1).length !== 4 || 29051 ''.split(/.?/).length || 29052 '.'.split(/()()/).length > 1 29053) { 29054 (function () { 29055 var compliantExecNpcg = /()??/.exec('')[1] === void 0; // NPCG: nonparticipating capturing group 29056 29057 StringPrototype.split = function (separator, limit) { 29058 var string = this; 29059 if (separator === void 0 && limit === 0) { 29060 return []; 29061 } 29062 29063 // If `separator` is not a regex, use native split 29064 if (_toString.call(separator) !== '[object RegExp]') { 29065 return string_split.call(this, separator, limit); 29066 } 29067 29068 var output = [], 29069 flags = (separator.ignoreCase ? 'i' : '') + 29070 (separator.multiline ? 'm' : '') + 29071 (separator.extended ? 'x' : '') + // Proposed for ES6 29072 (separator.sticky ? 'y' : ''), // Firefox 3+ 29073 lastLastIndex = 0, 29074 // Make `global` and avoid `lastIndex` issues by working with a copy 29075 separator2, match, lastIndex, lastLength; 29076 separator = new RegExp(separator.source, flags + 'g'); 29077 string += ''; // Type-convert 29078 if (!compliantExecNpcg) { 29079 // Doesn't need flags gy, but they don't hurt 29080 separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags); 29081 } 29082 /* Values for `limit`, per the spec: 29083 * If undefined: 4294967295 // Math.pow(2, 32) - 1 29084 * If 0, Infinity, or NaN: 0 29085 * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; 29086 * If negative number: 4294967296 - Math.floor(Math.abs(limit)) 29087 * If other: Type-convert, then use the above rules 29088 */ 29089 limit = limit === void 0 ? 29090 -1 >>> 0 : // Math.pow(2, 32) - 1 29091 ToUint32(limit); 29092 while (match = separator.exec(string)) { 29093 // `separator.lastIndex` is not reliable cross-browser 29094 lastIndex = match.index + match[0].length; 29095 if (lastIndex > lastLastIndex) { 29096 output.push(string.slice(lastLastIndex, match.index)); 29097 // Fix browsers whose `exec` methods don't consistently return `undefined` for 29098 // nonparticipating capturing groups 29099 if (!compliantExecNpcg && match.length > 1) { 29100 match[0].replace(separator2, function () { 29101 for (var i = 1; i < arguments.length - 2; i++) { 29102 if (arguments[i] === void 0) { 29103 match[i] = void 0; 29104 } 29105 } 29106 }); 29107 } 29108 if (match.length > 1 && match.index < string.length) { 29109 ArrayPrototype.push.apply(output, match.slice(1)); 29110 } 29111 lastLength = match[0].length; 29112 lastLastIndex = lastIndex; 29113 if (output.length >= limit) { 29114 break; 29115 } 29116 } 29117 if (separator.lastIndex === match.index) { 29118 separator.lastIndex++; // Avoid an infinite loop 29119 } 29120 } 29121 if (lastLastIndex === string.length) { 29122 if (lastLength || !separator.test('')) { 29123 output.push(''); 29124 } 29125 } else { 29126 output.push(string.slice(lastLastIndex)); 29127 } 29128 return output.length > limit ? output.slice(0, limit) : output; 29129 }; 29130 }()); 29131 29132// [bugfix, chrome] 29133// If separator is undefined, then the result array contains just one String, 29134// which is the this value (converted to a String). If limit is not undefined, 29135// then the output array is truncated so that it contains no more than limit 29136// elements. 29137// "0".split(undefined, 0) -> [] 29138} else if ('0'.split(void 0, 0).length) { 29139 StringPrototype.split = function split(separator, limit) { 29140 if (separator === void 0 && limit === 0) { return []; } 29141 return string_split.call(this, separator, limit); 29142 }; 29143} 29144 29145// ECMA-262, 3rd B.2.3 29146// Not an ECMAScript standard, although ECMAScript 3rd Edition has a 29147// non-normative section suggesting uniform semantics and it should be 29148// normalized across all browsers 29149// [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE 29150var string_substr = StringPrototype.substr; 29151var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; 29152defineProperties(StringPrototype, { 29153 substr: function substr(start, length) { 29154 return string_substr.call( 29155 this, 29156 start < 0 ? ((start = this.length + start) < 0 ? 0 : start) : start, 29157 length 29158 ); 29159 } 29160}, hasNegativeSubstrBug); 29161 29162},{}],1
vendor: 40,900 bytes, lines 29162-30619
2916294:[function(require,module,exports){ 29163'use strict'; 29164 29165module.exports = [ 29166 // streaming transports 29167 require('./transport/websocket') 29168, require('./transport/xhr-streaming') 29169, require('./transport/xdr-streaming') 29170, require('./transport/eventsource') 29171, require('./transport/lib/iframe-wrap')(require('./transport/eventsource')) 29172 29173 // polling transports 29174, require('./transport/htmlfile') 29175, require('./transport/lib/iframe-wrap')(require('./transport/htmlfile')) 29176, require('./transport/xhr-polling') 29177, require('./transport/xdr-polling') 29178, require('./transport/lib/iframe-wrap')(require('./transport/xhr-polling')) 29179, require('./transport/jsonp-polling') 29180]; 29181 29182},{"./transport/eventsource":198,"./transport/htmlfile":199,"./transport/jsonp-polling":201,"./transport/lib/iframe-wrap":204,"./transport/websocket":216,"./transport/xdr-polling":217,"./transport/xdr-streaming":218,"./transport/xhr-polling":219,"./transport/xhr-streaming":220}],195:[function(require,module,exports){ 29183(function (process,global){ 29184'use strict'; 29185 29186var EventEmitter = require('events').EventEmitter 29187 , inherits = require('inherits') 29188 , utils = require('../../utils/event') 29189 , urlUtils = require('../../utils/url') 29190 , XHR = global.XMLHttpRequest 29191 ; 29192 29193var debug = function() {}; 29194if (process.env.NODE_ENV !== 'production') { 29195 debug = require('debug')('sockjs-client:browser:xhr'); 29196} 29197 29198function AbstractXHRObject(method, url, payload, opts) { 29199 debug(method, url); 29200 var self = this; 29201 EventEmitter.call(this); 29202 29203 setTimeout(function () { 29204 self._start(method, url, payload, opts); 29205 }, 0); 29206} 29207 29208inherits(AbstractXHRObject, EventEmitter); 29209 29210AbstractXHRObject.prototype._start = function(method, url, payload, opts) { 29211 var self = this; 29212 29213 try { 29214 this.xhr = new XHR(); 29215 } catch (x) { 29216 // intentionally empty 29217 } 29218 29219 if (!this.xhr) { 29220 debug('no xhr'); 29221 this.emit('finish', 0, 'no xhr support'); 29222 this._cleanup(); 29223 return; 29224 } 29225 29226 // several browsers cache POSTs 29227 url = urlUtils.addQuery(url, 't=' + (+new Date())); 29228 29229 // Explorer tends to keep connection open, even after the 29230 // tab gets closed: http://bugs.jquery.com/ticket/5280 29231 this.unloadRef = utils.unloadAdd(function() { 29232 debug('unload cleanup'); 29233 self._cleanup(true); 29234 }); 29235 try { 29236 this.xhr.open(method, url, true); 29237 if (this.timeout && 'timeout' in this.xhr) { 29238 this.xhr.timeout = this.timeout; 29239 this.xhr.ontimeout = function() { 29240 debug('xhr timeout'); 29241 self.emit('finish', 0, ''); 29242 self._cleanup(false); 29243 }; 29244 } 29245 } catch (e) { 29246 debug('exception', e); 29247 // IE raises an exception on wrong port. 29248 this.emit('finish', 0, ''); 29249 this._cleanup(false); 29250 return; 29251 } 29252 29253 if ((!opts || !opts.noCredentials) && AbstractXHRObject.supportsCORS) { 29254 debug('withCredentials'); 29255 // Mozilla docs says https://developer.mozilla.org/en/XMLHttpRequest : 29256 // "This never affects same-site requests." 29257 29258 this.xhr.withCredentials = true; 29259 } 29260 if (opts && opts.headers) { 29261 for (var key in opts.headers) { 29262 this.xhr.setRequestHeader(key, opts.headers[key]); 29263 } 29264 } 29265 29266 this.xhr.onreadystatechange = function() { 29267 if (self.xhr) { 29268 var x = self.xhr; 29269 var text, status; 29270 debug('readyState', x.readyState); 29271 switch (x.readyState) { 29272 case 3: 29273 // IE doesn't like peeking into responseText or status 29274 // on Microsoft.XMLHTTP and readystate=3 29275 try { 29276 status = x.status; 29277 text = x.responseText; 29278 } catch (e) { 29279 // intentionally empty 29280 } 29281 debug('status', status); 29282 // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450 29283 if (status === 1223) { 29284 status = 204; 29285 } 29286 29287 // IE does return readystate == 3 for 404 answers. 29288 if (status === 200 && text && text.length > 0) { 29289 debug('chunk'); 29290 self.emit('chunk', status, text); 29291 } 29292 break; 29293 case 4: 29294 status = x.status; 29295 debug('status', status); 29296 // IE returns 1223 for 204: http://bugs.jquery.com/ticket/1450 29297 if (status === 1223) { 29298 status = 204; 29299 } 29300 // IE returns this for a bad port 29301 // http://msdn.microsoft.com/en-us/library/windows/desktop/aa383770(v=vs.85).aspx 29302 if (status === 12005 || status === 12029) { 29303 status = 0; 29304 } 29305 29306 debug('finish', status, x.responseText); 29307 self.emit('finish', status, x.responseText); 29308 self._cleanup(false); 29309 break; 29310 } 29311 } 29312 }; 29313 29314 try { 29315 self.xhr.send(payload); 29316 } catch (e) { 29317 self.emit('finish', 0, ''); 29318 self._cleanup(false); 29319 } 29320}; 29321 29322AbstractXHRObject.prototype._cleanup = function(abort) { 29323 debug('cleanup'); 29324 if (!this.xhr) { 29325 return; 29326 } 29327 this.removeAllListeners(); 29328 utils.unloadDel(this.unloadRef); 29329 29330 // IE needs this field to be a function 29331 this.xhr.onreadystatechange = function() {}; 29332 if (this.xhr.ontimeout) { 29333 this.xhr.ontimeout = null; 29334 } 29335 29336 if (abort) { 29337 try { 29338 this.xhr.abort(); 29339 } catch (x) { 29340 // intentionally empty 29341 } 29342 } 29343 this.unloadRef = this.xhr = null; 29344}; 29345 29346AbstractXHRObject.prototype.close = function() { 29347 debug('close'); 29348 this._cleanup(true); 29349}; 29350 29351AbstractXHRObject.enabled = !!XHR; 29352// override XMLHttpRequest for IE6/7 29353// obfuscate to avoid firewalls 29354var axo = ['Active'].concat('Object').join('X'); 29355if (!AbstractXHRObject.enabled && (axo in global)) { 29356 debug('overriding xmlhttprequest'); 29357 XHR = function() { 29358 try { 29359 return new global[axo]('Microsoft.XMLHTTP'); 29360 } catch (e) { 29361 return null; 29362 } 29363 }; 29364 AbstractXHRObject.enabled = !!new XHR(); 29365} 29366 29367var cors = false; 29368try { 29369 cors = 'withCredentials' in new XHR(); 29370} catch (ignored) { 29371 // intentionally empty 29372} 29373 29374AbstractXHRObject.supportsCORS = cors; 29375 29376module.exports = AbstractXHRObject; 29377 29378}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 29379},{"../../utils/event":224,"../../utils/url":230,"_process":173,"debug":232,"events":181,"inherits":172}],196:[function(require,module,exports){ 29380(function (global){ 29381module.exports = global.EventSource; 29382 29383}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 29384},{}],197:[function(require,module,exports){ 29385(function (global){ 29386'use strict'; 29387 29388var Driver = global.WebSocket || global.MozWebSocket; 29389if (Driver) { 29390 module.exports = function WebSocketBrowserDriver(url) { 29391 return new Driver(url); 29392 }; 29393} else { 29394 module.exports = undefined; 29395} 29396 29397}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 29398},{}],198:[function(require,module,exports){ 29399'use strict'; 29400 29401var inherits = require('inherits') 29402 , AjaxBasedTransport = require('./lib/ajax-based') 29403 , EventSourceReceiver = require('./receiver/eventsource') 29404 , XHRCorsObject = require('./sender/xhr-cors') 29405 , EventSourceDriver = require('eventsource') 29406 ; 29407 29408function EventSourceTransport(transUrl) { 29409 if (!EventSourceTransport.enabled()) { 29410 throw new Error('Transport created when disabled'); 29411 } 29412 29413 AjaxBasedTransport.call(this, transUrl, '/eventsource', EventSourceReceiver, XHRCorsObject); 29414} 29415 29416inherits(EventSourceTransport, AjaxBasedTransport); 29417 29418EventSourceTransport.enabled = function() { 29419 return !!EventSourceDriver; 29420}; 29421 29422EventSourceTransport.transportName = 'eventsource'; 29423EventSourceTransport.roundTrips = 2; 29424 29425module.exports = EventSourceTransport; 29426 29427},{"./lib/ajax-based":202,"./receiver/eventsource":207,"./sender/xhr-cors":213,"eventsource":196,"inherits":172}],199:[function(require,module,exports){ 29428'use strict'; 29429 29430var inherits = require('inherits') 29431 , HtmlfileReceiver = require('./receiver/htmlfile') 29432 , XHRLocalObject = require('./sender/xhr-local') 29433 , AjaxBasedTransport = require('./lib/ajax-based') 29434 ; 29435 29436function HtmlFileTransport(transUrl) { 29437 if (!HtmlfileReceiver.enabled) { 29438 throw new Error('Transport created when disabled'); 29439 } 29440 AjaxBasedTransport.call(this, transUrl, '/htmlfile', HtmlfileReceiver, XHRLocalObject); 29441} 29442 29443inherits(HtmlFileTransport, AjaxBasedTransport); 29444 29445HtmlFileTransport.enabled = function(info) { 29446 return HtmlfileReceiver.enabled && info.sameOrigin; 29447}; 29448 29449HtmlFileTransport.transportName = 'htmlfile'; 29450HtmlFileTransport.roundTrips = 2; 29451 29452module.exports = HtmlFileTransport; 29453 29454},{"./lib/ajax-based":202,"./receiver/htmlfile":208,"./sender/xhr-local":215,"inherits":172}],200:[function(require,module,exports){ 29455(function (process){ 29456'use strict'; 29457 29458// Few cool transports do work only for same-origin. In order to make 29459// them work cross-domain we shall use iframe, served from the 29460// remote domain. New browsers have capabilities to communicate with 29461// cross domain iframe using postMessage(). In IE it was implemented 29462// from IE 8+, but of course, IE got some details wrong: 29463// http://msdn.microsoft.com/en-us/library/cc197015(v=VS.85).aspx 29464// http://stevesouders.com/misc/test-postmessage.php 29465 29466var inherits = require('inherits') 29467 , EventEmitter = require('events').EventEmitter 29468 , version = require('../version') 29469 , urlUtils = require('../utils/url') 29470 , iframeUtils = require('../utils/iframe') 29471 , eventUtils = require('../utils/event') 29472 , random = require('../utils/random') 29473 ; 29474 29475var debug = function() {}; 29476if (process.env.NODE_ENV !== 'production') { 29477 debug = require('debug')('sockjs-client:transport:iframe'); 29478} 29479 29480function IframeTransport(transport, transUrl, baseUrl) { 29481 if (!IframeTransport.enabled()) { 29482 throw new Error('Transport created when disabled'); 29483 } 29484 EventEmitter.call(this); 29485 29486 var self = this; 29487 this.origin = urlUtils.getOrigin(baseUrl); 29488 this.baseUrl = baseUrl; 29489 this.transUrl = transUrl; 29490 this.transport = transport; 29491 this.windowId = random.string(8); 29492 29493 var iframeUrl = urlUtils.addPath(baseUrl, '/iframe.html') + '#' + this.windowId; 29494 debug(transport, transUrl, iframeUrl); 29495 29496 this.iframeObj = iframeUtils.createIframe(iframeUrl, function(r) { 29497 debug('err callback'); 29498 self.emit('close', 1006, 'Unable to load an iframe (' + r + ')'); 29499 self.close(); 29500 }); 29501 29502 this.onmessageCallback = this._message.bind(this); 29503 eventUtils.attachEvent('message', this.onmessageCallback); 29504} 29505 29506inherits(IframeTransport, EventEmitter); 29507 29508IframeTransport.prototype.close = function() { 29509 debug('close'); 29510 this.removeAllListeners(); 29511 if (this.iframeObj) { 29512 eventUtils.detachEvent('message', this.onmessageCallback); 29513 try { 29514 // When the iframe is not loaded, IE raises an exception 29515 // on 'contentWindow'. 29516 this.postMessage('c'); 29517 } catch (x) { 29518 // intentionally empty 29519 } 29520 this.iframeObj.cleanup(); 29521 this.iframeObj = null; 29522 this.onmessageCallback = this.iframeObj = null; 29523 } 29524}; 29525 29526IframeTransport.prototype._message = function(e) { 29527 debug('message', e.data); 29528 if (!urlUtils.isOriginEqual(e.origin, this.origin)) { 29529 debug('not same origin', e.origin, this.origin); 29530 return; 29531 } 29532 29533 var iframeMessage; 29534 try { 29535 iframeMessage = JSON.parse(e.data); 29536 } catch (ignored) { 29537 debug('bad json', e.data); 29538 return; 29539 } 29540 29541 if (iframeMessage.windowId !== this.windowId) { 29542 debug('mismatched window id', iframeMessage.windowId, this.windowId); 29543 return; 29544 } 29545 29546 switch (iframeMessage.type) { 29547 case 's': 29548 this.iframeObj.loaded(); 29549 // window global dependency 29550 this.postMessage('s', JSON.stringify([ 29551 version 29552 , this.transport 29553 , this.transUrl 29554 , this.baseUrl 29555 ])); 29556 break; 29557 case 't': 29558 this.emit('message', iframeMessage.data); 29559 break; 29560 case 'c': 29561 var cdata; 29562 try { 29563 cdata = JSON.parse(iframeMessage.data); 29564 } catch (ignored) { 29565 debug('bad json', iframeMessage.data); 29566 return; 29567 } 29568 this.emit('close', cdata[0], cdata[1]); 29569 this.close(); 29570 break; 29571 } 29572}; 29573 29574IframeTransport.prototype.postMessage = function(type, data) { 29575 debug('postMessage', type, data); 29576 this.iframeObj.post(JSON.stringify({ 29577 windowId: this.windowId 29578 , type: type 29579 , data: data || '' 29580 }), this.origin); 29581}; 29582 29583IframeTransport.prototype.send = function(message) { 29584 debug('send', message); 29585 this.postMessage('m', message); 29586}; 29587 29588IframeTransport.enabled = function() { 29589 return iframeUtils.iframeEnabled; 29590}; 29591 29592IframeTransport.transportName = 'iframe'; 29593IframeTransport.roundTrips = 2; 29594 29595module.exports = IframeTransport; 29596 29597}).call(this,require('_process')) 29598},{"../utils/event":224,"../utils/iframe":225,"../utils/random":228,"../utils/url":230,"../version":231,"_process":173,"debug":232,"events":181,"inherits":172}],201:[function(require,module,exports){ 29599(function (global){ 29600'use strict'; 29601 29602// The simplest and most robust transport, using the well-know cross 29603// domain hack - JSONP. This transport is quite inefficient - one 29604// message could use up to one http request. But at least it works almost 29605// everywhere. 29606// Known limitations: 29607// o you will get a spinning cursor 29608// o for Konqueror a dumb timer is needed to detect errors 29609 29610var inherits = require('inherits') 29611 , SenderReceiver = require('./lib/sender-receiver') 29612 , JsonpReceiver = require('./receiver/jsonp') 29613 , jsonpSender = require('./sender/jsonp') 29614 ; 29615 29616function JsonPTransport(transUrl) { 29617 if (!JsonPTransport.enabled()) { 29618 throw new Error('Transport created when disabled'); 29619 } 29620 SenderReceiver.call(this, transUrl, '/jsonp', jsonpSender, JsonpReceiver); 29621} 29622 29623inherits(JsonPTransport, SenderReceiver); 29624 29625JsonPTransport.enabled = function() { 29626 return !!global.document; 29627}; 29628 29629JsonPTransport.transportName = 'jsonp-polling'; 29630JsonPTransport.roundTrips = 1; 29631JsonPTransport.needBody = true; 29632 29633module.exports = JsonPTransport; 29634 29635}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 29636},{"./lib/sender-receiver":206,"./receiver/jsonp":209,"./sender/jsonp":211,"inherits":172}],202:[function(require,module,exports){ 29637(function (process){ 29638'use strict'; 29639 29640var inherits = require('inherits') 29641 , urlUtils = require('../../utils/url') 29642 , SenderReceiver = require('./sender-receiver') 29643 ; 29644 29645var debug = function() {}; 29646if (process.env.NODE_ENV !== 'production') { 29647 debug = require('debug')('sockjs-client:ajax-based'); 29648} 29649 29650function createAjaxSender(AjaxObject) { 29651 return function(url, payload, callback) { 29652 debug('create ajax sender', url, payload); 29653 var opt = {}; 29654 if (typeof payload === 'string') { 29655 opt.headers = {'Content-type': 'text/plain'}; 29656 } 29657 var ajaxUrl = urlUtils.addPath(url, '/xhr_send'); 29658 var xo = new AjaxObject('POST', ajaxUrl, payload, opt); 29659 xo.once('finish', function(status) { 29660 debug('finish', status); 29661 xo = null; 29662 29663 if (status !== 200 && status !== 204) { 29664 return callback(new Error('http status ' + status)); 29665 } 29666 callback(); 29667 }); 29668 return function() { 29669 debug('abort'); 29670 xo.close(); 29671 xo = null; 29672 29673 var err = new Error('Aborted'); 29674 err.code = 1000; 29675 callback(err); 29676 }; 29677 }; 29678} 29679 29680function AjaxBasedTransport(transUrl, urlSuffix, Receiver, AjaxObject) { 29681 SenderReceiver.call(this, transUrl, urlSuffix, createAjaxSender(AjaxObject), Receiver, AjaxObject); 29682} 29683 29684inherits(AjaxBasedTransport, SenderReceiver); 29685 29686module.exports = AjaxBasedTransport; 29687 29688}).call(this,require('_process')) 29689},{"../../utils/url":230,"./sender-receiver":206,"_process":173,"debug":232,"inherits":172}],203:[function(require,module,exports){ 29690(function (process){ 29691'use strict'; 29692 29693var inherits = require('inherits') 29694 , EventEmitter = require('events').EventEmitter 29695 ; 29696 29697var debug = function() {}; 29698if (process.env.NODE_ENV !== 'production') { 29699 debug = require('debug')('sockjs-client:buffered-sender'); 29700} 29701 29702function BufferedSender(url, sender) { 29703 debug(url); 29704 EventEmitter.call(this); 29705 this.sendBuffer = []; 29706 this.sender = sender; 29707 this.url = url; 29708} 29709 29710inherits(BufferedSender, EventEmitter); 29711 29712BufferedSender.prototype.send = function(message) { 29713 debug('send', message); 29714 this.sendBuffer.push(message); 29715 if (!this.sendStop) { 29716 this.sendSchedule(); 29717 } 29718}; 29719 29720// For polling transports in a situation when in the message callback, 29721// new message is being send. If the sending connection was started 29722// before receiving one, it is possible to saturate the network and 29723// timeout due to the lack of receiving socket. To avoid that we delay 29724// sending messages by some small time, in order to let receiving 29725// connection be started beforehand. This is only a halfmeasure and 29726// does not fix the big problem, but it does make the tests go more 29727// stable on slow networks. 29728BufferedSender.prototype.sendScheduleWait = function() { 29729 debug('sendScheduleWait'); 29730 var self = this; 29731 var tref; 29732 this.sendStop = function() { 29733 debug('sendStop'); 29734 self.sendStop = null; 29735 clearTimeout(tref); 29736 }; 29737 tref = setTimeout(function() { 29738 debug('timeout'); 29739 self.sendStop = null; 29740 self.sendSchedule(); 29741 }, 25); 29742}; 29743 29744BufferedSender.prototype.sendSchedule = function() { 29745 debug('sendSchedule', this.sendBuffer.length); 29746 var self = this; 29747 if (this.sendBuffer.length > 0) { 29748 var payload = '[' + this.sendBuffer.join(',') + ']'; 29749 this.sendStop = this.sender(this.url, payload, function(err) { 29750 self.sendStop = null; 29751 if (err) { 29752 debug('error', err); 29753 self.emit('close', err.code || 1006, 'Sending error: ' + err); 29754 self.close(); 29755 } else { 29756 self.sendScheduleWait(); 29757 } 29758 }); 29759 this.sendBuffer = []; 29760 } 29761}; 29762 29763BufferedSender.prototype._cleanup = function() { 29764 debug('_cleanup'); 29765 this.removeAllListeners(); 29766}; 29767 29768BufferedSender.prototype.close = function() { 29769 debug('close'); 29770 this._cleanup(); 29771 if (this.sendStop) { 29772 this.sendStop(); 29773 this.sendStop = null; 29774 } 29775}; 29776 29777module.exports = BufferedSender; 29778 29779}).call(this,require('_process')) 29780},{"_process":173,"debug":232,"events":181,"inherits":172}],204:[function(require,module,exports){ 29781(function (global){ 29782'use strict'; 29783 29784var inherits = require('inherits') 29785 , IframeTransport = require('../iframe') 29786 , objectUtils = require('../../utils/object') 29787 ; 29788 29789module.exports = function(transport) { 29790 29791 function IframeWrapTransport(transUrl, baseUrl) { 29792 IframeTransport.call(this, transport.transportName, transUrl, baseUrl); 29793 } 29794 29795 inherits(IframeWrapTransport, IframeTransport); 29796 29797 IframeWrapTransport.enabled = function(url, info) { 29798 if (!global.document) { 29799 return false; 29800 } 29801 29802 var iframeInfo = objectUtils.extend({}, info); 29803 iframeInfo.sameOrigin = true; 29804 return transport.enabled(iframeInfo) && IframeTransport.enabled(); 29805 }; 29806 29807 IframeWrapTransport.transportName = 'iframe-' + transport.transportName; 29808 IframeWrapTransport.needBody = true; 29809 IframeWrapTransport.roundTrips = IframeTransport.roundTrips + transport.roundTrips - 1; // html, javascript (2) + transport - no CORS (1) 29810 29811 IframeWrapTransport.facadeTransport = transport; 29812 29813 return IframeWrapTransport; 29814}; 29815 29816}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 29817},{"../../utils/object":227,"../iframe":200,"inherits":172}],205:[function(require,module,exports){ 29818(function (process){ 29819'use strict'; 29820 29821var inherits = require('inherits') 29822 , EventEmitter = require('events').EventEmitter 29823 ; 29824 29825var debug = function() {}; 29826if (process.env.NODE_ENV !== 'production') { 29827 debug = require('debug')('sockjs-client:polling'); 29828} 29829 29830function Polling(Receiver, receiveUrl, AjaxObject) { 29831 debug(receiveUrl); 29832 EventEmitter.call(this); 29833 this.Receiver = Receiver; 29834 this.receiveUrl = receiveUrl; 29835 this.AjaxObject = AjaxObject; 29836 this._scheduleReceiver(); 29837} 29838 29839inherits(Polling, EventEmitter); 29840 29841Polling.prototype._scheduleReceiver = function() { 29842 debug('_scheduleReceiver'); 29843 var self = this; 29844 var poll = this.poll = new this.Receiver(this.receiveUrl, this.AjaxObject); 29845 29846 poll.on('message', function(msg) { 29847 debug('message', msg); 29848 self.emit('message', msg); 29849 }); 29850 29851 poll.once('close', function(code, reason) { 29852 debug('close', code, reason, self.pollIsClosing); 29853 self.poll = poll = null; 29854 29855 if (!self.pollIsClosing) { 29856 if (reason === 'network') { 29857 self._scheduleReceiver(); 29858 } else { 29859 self.emit('close', code || 1006, reason); 29860 self.removeAllListeners(); 29861 } 29862 } 29863 }); 29864}; 29865 29866Polling.prototype.abort = function() { 29867 debug('abort'); 29868 this.removeAllListeners(); 29869 this.pollIsClosing = true; 29870 if (this.poll) { 29871 this.poll.abort(); 29872 } 29873}; 29874 29875module.exports = Polling; 29876 29877}).call(this,require('_process')) 29878},{"_process":173,"debug":232,"events":181,"inherits":172}],206:[function(require,module,exports){ 29879(function (process){ 29880'use strict'; 29881 29882var inherits = require('inherits') 29883 , urlUtils = require('../../utils/url') 29884 , BufferedSender = require('./buffered-sender') 29885 , Polling = require('./polling') 29886 ; 29887 29888var debug = function() {}; 29889if (process.env.NODE_ENV !== 'production') { 29890 debug = require('debug')('sockjs-client:sender-receiver'); 29891} 29892 29893function SenderReceiver(transUrl, urlSuffix, senderFunc, Receiver, AjaxObject) { 29894 var pollUrl = urlUtils.addPath(transUrl, urlSuffix); 29895 debug(pollUrl); 29896 var self = this; 29897 BufferedSender.call(this, transUrl, senderFunc); 29898 29899 this.poll = new Polling(Receiver, pollUrl, AjaxObject); 29900 this.poll.on('message', function(msg) { 29901 debug('poll message', msg); 29902 self.emit('message', msg); 29903 }); 29904 this.poll.once('close', function(code, reason) { 29905 debug('poll close', code, reason); 29906 self.poll = null; 29907 self.emit('close', code, reason); 29908 self.close(); 29909 }); 29910} 29911 29912inherits(SenderReceiver, BufferedSender); 29913 29914SenderReceiver.prototype.close = function() { 29915 BufferedSender.prototype.close.call(this); 29916 debug('close'); 29917 this.removeAllListeners(); 29918 if (this.poll) { 29919 this.poll.abort(); 29920 this.poll = null; 29921 } 29922}; 29923 29924module.exports = SenderReceiver; 29925 29926}).call(this,require('_process')) 29927},{"../../utils/url":230,"./buffered-sender":203,"./polling":205,"_process":173,"debug":232,"inherits":172}],207:[function(require,module,exports){ 29928(function (process){ 29929'use strict'; 29930 29931var inherits = require('inherits') 29932 , EventEmitter = require('events').EventEmitter 29933 , EventSourceDriver = require('eventsource') 29934 ; 29935 29936var debug = function() {}; 29937if (process.env.NODE_ENV !== 'production') { 29938 debug = require('debug')('sockjs-client:receiver:eventsource'); 29939} 29940 29941function EventSourceReceiver(url) { 29942 debug(url); 29943 EventEmitter.call(this); 29944 29945 var self = this; 29946 var es = this.es = new EventSourceDriver(url); 29947 es.onmessage = function(e) { 29948 debug('message', e.data); 29949 self.emit('message', decodeURI(e.data)); 29950 }; 29951 es.onerror = function(e) { 29952 debug('error', es.readyState, e); 29953 // ES on reconnection has readyState = 0 or 1. 29954 // on network error it's CLOSED = 2 29955 var reason = (es.readyState !== 2 ? 'network' : 'permanent'); 29956 self._cleanup(); 29957 self._close(reason); 29958 }; 29959} 29960 29961inherits(EventSourceReceiver, EventEmitter); 29962 29963EventSourceReceiver.prototype.abort = function() { 29964 debug('abort'); 29965 this._cleanup(); 29966 this._close('user'); 29967}; 29968 29969EventSourceReceiver.prototype._cleanup = function() { 29970 debug('cleanup'); 29971 var es = this.es; 29972 if (es) { 29973 es.onmessage = es.onerror = null; 29974 es.close(); 29975 this.es = null; 29976 } 29977}; 29978 29979EventSourceReceiver.prototype._close = function(reason) { 29980 debug('close', reason); 29981 var self = this; 29982 // Safari and chrome < 15 crash if we close window before 29983 // waiting for ES cleanup. See: 29984 // https://code.google.com/p/chromium/issues/detail?id=89155 29985 setTimeout(function() { 29986 self.emit('close', null, reason); 29987 self.removeAllListeners(); 29988 }, 200); 29989}; 29990 29991module.exports = EventSourceReceiver; 29992 29993}).call(this,require('_process')) 29994},{"_process":173,"debug":232,"events":181,"eventsource":196,"inherits":172}],208:[function(require,module,exports){ 29995(function (process,global){ 29996'use strict'; 29997 29998var inherits = require('inherits') 29999 , iframeUtils = require('../../utils/iframe') 30000 , urlUtils = require('../../utils/url') 30001 , EventEmitter = require('events').EventEmitter 30002 , random = require('../../utils/random') 30003 ; 30004 30005var debug = function() {}; 30006if (process.env.NODE_ENV !== 'production') { 30007 debug = require('debug')('sockjs-client:receiver:htmlfile'); 30008} 30009 30010function HtmlfileReceiver(url) { 30011 debug(url); 30012 EventEmitter.call(this); 30013 var self = this; 30014 iframeUtils.polluteGlobalNamespace(); 30015 30016 this.id = 'a' + random.string(6); 30017 url = urlUtils.addQuery(url, 'c=' + decodeURIComponent(iframeUtils.WPrefix + '.' + this.id)); 30018 30019 debug('using htmlfile', HtmlfileReceiver.htmlfileEnabled); 30020 var constructFunc = HtmlfileReceiver.htmlfileEnabled ? 30021 iframeUtils.createHtmlfile : iframeUtils.createIframe; 30022 30023 global[iframeUtils.WPrefix][this.id] = { 30024 start: function() { 30025 debug('start'); 30026 self.iframeObj.loaded(); 30027 } 30028 , message: function(data) { 30029 debug('message', data); 30030 self.emit('message', data); 30031 } 30032 , stop: function() { 30033 debug('stop'); 30034 self._cleanup(); 30035 self._close('network'); 30036 } 30037 }; 30038 this.iframeObj = constructFunc(url, function() { 30039 debug('callback'); 30040 self._cleanup(); 30041 self._close('permanent'); 30042 }); 30043} 30044 30045inherits(HtmlfileReceiver, EventEmitter); 30046 30047HtmlfileReceiver.prototype.abort = function() { 30048 debug('abort'); 30049 this._cleanup(); 30050 this._close('user'); 30051}; 30052 30053HtmlfileReceiver.prototype._cleanup = function() { 30054 debug('_cleanup'); 30055 if (this.iframeObj) { 30056 this.iframeObj.cleanup(); 30057 this.iframeObj = null; 30058 } 30059 delete global[iframeUtils.WPrefix][this.id]; 30060}; 30061 30062HtmlfileReceiver.prototype._close = function(reason) { 30063 debug('_close', reason); 30064 this.emit('close', null, reason); 30065 this.removeAllListeners(); 30066}; 30067 30068HtmlfileReceiver.htmlfileEnabled = false; 30069 30070// obfuscate to avoid firewalls 30071var axo = ['Active'].concat('Object').join('X'); 30072if (axo in global) { 30073 try { 30074 HtmlfileReceiver.htmlfileEnabled = !!new global[axo]('htmlfile'); 30075 } catch (x) { 30076 // intentionally empty 30077 } 30078} 30079 30080HtmlfileReceiver.enabled = HtmlfileReceiver.htmlfileEnabled || iframeUtils.iframeEnabled; 30081 30082module.exports = HtmlfileReceiver; 30083 30084}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 30085},{"../../utils/iframe":225,"../../utils/random":228,"../../utils/url":230,"_process":173,"debug":232,"events":181,"inherits":172}],209:[function(require,module,exports){ 30086(function (process,global){ 30087'use strict'; 30088 30089var utils = require('../../utils/iframe') 30090 , random = require('../../utils/random') 30091 , browser = require('../../utils/browser') 30092 , urlUtils = require('../../utils/url') 30093 , inherits = require('inherits') 30094 , EventEmitter = require('events').EventEmitter 30095 ; 30096 30097var debug = function() {}; 30098if (process.env.NODE_ENV !== 'production') { 30099 debug = require('debug')('sockjs-client:receiver:jsonp'); 30100} 30101 30102function JsonpReceiver(url) { 30103 debug(url); 30104 var self = this; 30105 EventEmitter.call(this); 30106 30107 utils.polluteGlobalNamespace(); 30108 30109 this.id = 'a' + random.string(6); 30110 var urlWithId = urlUtils.addQuery(url, 'c=' + encodeURIComponent(utils.WPrefix + '.' + this.id)); 30111 30112 global[utils.WPrefix][this.id] = this._callback.bind(this); 30113 this._createScript(urlWithId); 30114 30115 // Fallback mostly for Konqueror - stupid timer, 35 seconds shall be plenty. 30116 this.timeoutId = setTimeout(function() { 30117 debug('timeout'); 30118 self._abort(new Error('JSONP script loaded abnormally (timeout)')); 30119 }, JsonpReceiver.timeout); 30120} 30121 30122inherits(JsonpReceiver, EventEmitter); 30123 30124JsonpReceiver.prototype.abort = function() { 30125 debug('abort'); 30126 if (global[utils.WPrefix][this.id]) { 30127 var err = new Error('JSONP user aborted read'); 30128 err.code = 1000; 30129 this._abort(err); 30130 } 30131}; 30132 30133JsonpReceiver.timeout = 35000; 30134JsonpReceiver.scriptErrorTimeout = 1000; 30135 30136JsonpReceiver.prototype._callback = function(data) { 30137 debug('_callback', data); 30138 this._cleanup(); 30139 30140 if (this.aborting) { 30141 return; 30142 } 30143 30144 if (data) { 30145 debug('message', data); 30146 this.emit('message', data); 30147 } 30148 this.emit('close', null, 'network'); 30149 this.removeAllListeners(); 30150}; 30151 30152JsonpReceiver.prototype._abort = function(err) { 30153 debug('_abort', err); 30154 this._cleanup(); 30155 this.aborting = true; 30156 this.emit('close', err.code, err.message); 30157 this.removeAllListeners(); 30158}; 30159 30160JsonpReceiver.prototype._cleanup = function() { 30161 debug('_cleanup'); 30162 clearTimeout(this.timeoutId); 30163 if (this.script2) { 30164 this.script2.parentNode.removeChild(this.script2); 30165 this.script2 = null; 30166 } 30167 if (this.script) { 30168 var script = this.script; 30169 // Unfortunately, you can't really abort script loading of 30170 // the script. 30171 script.parentNode.removeChild(script); 30172 script.onreadystatechange = script.onerror = 30173 script.onload = script.onclick = null; 30174 this.script = null; 30175 } 30176 delete global[utils.WPrefix][this.id]; 30177}; 30178 30179JsonpReceiver.prototype._scriptError = function() { 30180 debug('_scriptError'); 30181 var self = this; 30182 if (this.errorTimer) { 30183 return; 30184 } 30185 30186 this.errorTimer = setTimeout(function() { 30187 if (!self.loadedOkay) { 30188 self._abort(new Error('JSONP script loaded abnormally (onerror)')); 30189 } 30190 }, JsonpReceiver.scriptErrorTimeout); 30191}; 30192 30193JsonpReceiver.prototype._createScript = function(url) { 30194 debug('_createScript', url); 30195 var self = this; 30196 var script = this.script = global.document.createElement('script'); 30197 var script2; // Opera synchronous load trick. 30198 30199 script.id = 'a' + random.string(8); 30200 script.src = url; 30201 script.type = 'text/javascript'; 30202 script.charset = 'UTF-8'; 30203 script.onerror = this._scriptError.bind(this); 30204 script.onload = function() { 30205 debug('onload'); 30206 self._abort(new Error('JSONP script loaded abnormally (onload)')); 30207 }; 30208 30209 // IE9 fires 'error' event after onreadystatechange or before, in random order. 30210 // Use loadedOkay to determine if actually errored 30211 script.onreadystatechange = function() { 30212 debug('onreadystatechange', script.readyState); 30213 if (/loaded|closed/.test(script.readyState)) { 30214 if (script && script.htmlFor && script.onclick) { 30215 self.loadedOkay = true; 30216 try { 30217 // In IE, actually execute the script. 30218 script.onclick(); 30219 } catch (x) { 30220 // intentionally empty 30221 } 30222 } 30223 if (script) { 30224 self._abort(new Error('JSONP script loaded abnormally (onreadystatechange)')); 30225 } 30226 } 30227 }; 30228 // IE: event/htmlFor/onclick trick. 30229 // One can't rely on proper order for onreadystatechange. In order to 30230 // make sure, set a 'htmlFor' and 'event' properties, so that 30231 // script code will be installed as 'onclick' handler for the 30232 // script object. Later, onreadystatechange, manually execute this 30233 // code. FF and Chrome doesn't work with 'event' and 'htmlFor' 30234 // set. For reference see: 30235 // http://jaubourg.net/2010/07/loading-script-as-onclick-handler-of.html 30236 // Also, read on that about script ordering: 30237 // http://wiki.whatwg.org/wiki/Dynamic_Script_Execution_Order 30238 if (typeof script.async === 'undefined' && global.document.attachEvent) { 30239 // According to mozilla docs, in recent browsers script.async defaults 30240 // to 'true', so we may use it to detect a good browser: 30241 // https://developer.mozilla.org/en/HTML/Element/script 30242 if (!browser.isOpera()) { 30243 // Naively assume we're in IE 30244 try { 30245 script.htmlFor = script.id; 30246 script.event = 'onclick'; 30247 } catch (x) { 30248 // intentionally empty 30249 } 30250 script.async = true; 30251 } else { 30252 // Opera, second sync script hack 30253 script2 = this.script2 = global.document.createElement('script'); 30254 script2.text = "try{var a = document.getElementById('" + script.id + "'); if(a)a.onerror();}catch(x){};"; 30255 script.async = script2.async = false; 30256 } 30257 } 30258 if (typeof script.async !== 'undefined') { 30259 script.async = true; 30260 } 30261 30262 var head = global.document.getElementsByTagName('head')[0]; 30263 head.insertBefore(script, head.firstChild); 30264 if (script2) { 30265 head.insertBefore(script2, head.firstChild); 30266 } 30267}; 30268 30269module.exports = JsonpReceiver; 30270 30271}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 30272},{"../../utils/browser":222,"../../utils/iframe":225,"../../utils/random":228,"../../utils/url":230,"_process":173,"debug":232,"events":181,"inherits":172}],210:[function(require,module,exports){ 30273(function (process){ 30274'use strict'; 30275 30276var inherits = require('inherits') 30277 , EventEmitter = require('events').EventEmitter 30278 ; 30279 30280var debug = function() {}; 30281if (process.env.NODE_ENV !== 'production') { 30282 debug = require('debug')('sockjs-client:receiver:xhr'); 30283} 30284 30285function XhrReceiver(url, AjaxObject) { 30286 debug(url); 30287 EventEmitter.call(this); 30288 var self = this; 30289 30290 this.bufferPosition = 0; 30291 30292 this.xo = new AjaxObject('POST', url, null); 30293 this.xo.on('chunk', this._chunkHandler.bind(this)); 30294 this.xo.once('finish', function(status, text) { 30295 debug('finish', status, text); 30296 self._chunkHandler(status, text); 30297 self.xo = null; 30298 var reason = status === 200 ? 'network' : 'permanent'; 30299 debug('close', reason); 30300 self.emit('close', null, reason); 30301 self._cleanup(); 30302 }); 30303} 30304 30305inherits(XhrReceiver, EventEmitter); 30306 30307XhrReceiver.prototype._chunkHandler = function(status, text) { 30308 debug('_chunkHandler', status); 30309 if (status !== 200 || !text) { 30310 return; 30311 } 30312 30313 for (var idx = -1; ; this.bufferPosition += idx + 1) { 30314 var buf = text.slice(this.bufferPosition); 30315 idx = buf.indexOf('\n'); 30316 if (idx === -1) { 30317 break; 30318 } 30319 var msg = buf.slice(0, idx); 30320 if (msg) { 30321 debug('message', msg); 30322 this.emit('message', msg); 30323 } 30324 } 30325}; 30326 30327XhrReceiver.prototype._cleanup = function() { 30328 debug('_cleanup'); 30329 this.removeAllListeners(); 30330}; 30331 30332XhrReceiver.prototype.abort = function() { 30333 debug('abort'); 30334 if (this.xo) { 30335 this.xo.close(); 30336 debug('close'); 30337 this.emit('close', null, 'user'); 30338 this.xo = null; 30339 } 30340 this._cleanup(); 30341}; 30342 30343module.exports = XhrReceiver; 30344 30345}).call(this,require('_process')) 30346},{"_process":173,"debug":232,"events":181,"inherits":172}],211:[function(require,module,exports){ 30347(function (process,global){ 30348'use strict'; 30349 30350var random = require('../../utils/random') 30351 , urlUtils = require('../../utils/url') 30352 ; 30353 30354var debug = function() {}; 30355if (process.env.NODE_ENV !== 'production') { 30356 debug = require('debug')('sockjs-client:sender:jsonp'); 30357} 30358 30359var form, area; 30360 30361function createIframe(id) { 30362 debug('createIframe', id); 30363 try { 30364 // ie6 dynamic iframes with target="" support (thanks Chris Lambacher) 30365 return global.document.createElement('<iframe name="' + id + '">'); 30366 } catch (x) { 30367 var iframe = global.document.createElement('iframe'); 30368 iframe.name = id; 30369 return iframe; 30370 } 30371} 30372 30373function createForm() { 30374 debug('createForm'); 30375 form = global.document.createElement('form'); 30376 form.style.display = 'none'; 30377 form.style.position = 'absolute'; 30378 form.method = 'POST'; 30379 form.enctype = 'application/x-www-form-urlencoded'; 30380 form.acceptCharset = 'UTF-8'; 30381 30382 area = global.document.createElement('textarea'); 30383 area.name = 'd'; 30384 form.appendChild(area); 30385 30386 global.document.body.appendChild(form); 30387} 30388 30389module.exports = function(url, payload, callback) { 30390 debug(url, payload); 30391 if (!form) { 30392 createForm(); 30393 } 30394 var id = 'a' + random.string(8); 30395 form.target = id; 30396 form.action = urlUtils.addQuery(urlUtils.addPath(url, '/jsonp_send'), 'i=' + id); 30397 30398 var iframe = createIframe(id); 30399 iframe.id = id; 30400 iframe.style.display = 'none'; 30401 form.appendChild(iframe); 30402 30403 try { 30404 area.value = payload; 30405 } catch (e) { 30406 // seriously broken browsers get here 30407 } 30408 form.submit(); 30409 30410 var completed = function(err) { 30411 debug('completed', id, err); 30412 if (!iframe.onerror) { 30413 return; 30414 } 30415 iframe.onreadystatechange = iframe.onerror = iframe.onload = null; 30416 // Opera mini doesn't like if we GC iframe 30417 // immediately, thus this timeout. 30418 setTimeout(function() { 30419 debug('cleaning up', id); 30420 iframe.parentNode.removeChild(iframe); 30421 iframe = null; 30422 }, 500); 30423 area.value = ''; 30424 // It is not possible to detect if the iframe succeeded or 30425 // failed to submit our form. 30426 callback(err); 30427 }; 30428 iframe.onerror = function() { 30429 debug('onerror', id); 30430 completed(); 30431 }; 30432 iframe.onload = function() { 30433 debug('onload', id); 30434 completed(); 30435 }; 30436 iframe.onreadystatechange = function(e) { 30437 debug('onreadystatechange', id, iframe.readyState, e); 30438 if (iframe.readyState === 'complete') { 30439 completed(); 30440 } 30441 }; 30442 return function() { 30443 debug('aborted', id); 30444 completed(new Error('Aborted')); 30445 }; 30446}; 30447 30448}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 30449},{"../../utils/random":228,"../../utils/url":230,"_process":173,"debug":232}],212:[function(require,module,exports){ 30450(function (process,global){ 30451'use strict'; 30452 30453var EventEmitter = require('events').EventEmitter 30454 , inherits = require('inherits') 30455 , eventUtils = require('../../utils/event') 30456 , browser = require('../../utils/browser') 30457 , urlUtils = require('../../utils/url') 30458 ; 30459 30460var debug = function() {}; 30461if (process.env.NODE_ENV !== 'production') { 30462 debug = require('debug')('sockjs-client:sender:xdr'); 30463} 30464 30465// References: 30466// http://ajaxian.com/archives/100-line-ajax-wrapper 30467// http://msdn.microsoft.com/en-us/library/cc288060(v=VS.85).aspx 30468 30469function XDRObject(method, url, payload) { 30470 debug(method, url); 30471 var self = this; 30472 EventEmitter.call(this); 30473 30474 setTimeout(function() { 30475 self._start(method, url, payload); 30476 }, 0); 30477} 30478 30479inherits(XDRObject, EventEmitter); 30480 30481XDRObject.prototype._start = function(method, url, payload) { 30482 debug('_start'); 30483 var self = this; 30484 var xdr = new global.XDomainRequest(); 30485 // IE caches even POSTs 30486 url = urlUtils.addQuery(url, 't=' + (+new Date())); 30487 30488 xdr.onerror = function() { 30489 debug('onerror'); 30490 self._error(); 30491 }; 30492 xdr.ontimeout = function() { 30493 debug('ontimeout'); 30494 self._error(); 30495 }; 30496 xdr.onprogress = function() { 30497 debug('progress', xdr.responseText); 30498 self.emit('chunk', 200, xdr.responseText); 30499 }; 30500 xdr.onload = function() { 30501 debug('load'); 30502 self.emit('finish', 200, xdr.responseText); 30503 self._cleanup(false); 30504 }; 30505 this.xdr = xdr; 30506 this.unloadRef = eventUtils.unloadAdd(function() { 30507 self._cleanup(true); 30508 }); 30509 try { 30510 // Fails with AccessDenied if port number is bogus 30511 this.xdr.open(method, url); 30512 if (this.timeout) { 30513 this.xdr.timeout = this.timeout; 30514 } 30515 this.xdr.send(payload); 30516 } catch (x) { 30517 this._error(); 30518 } 30519}; 30520 30521XDRObject.prototype._error = function() { 30522 this.emit('finish', 0, ''); 30523 this._cleanup(false); 30524}; 30525 30526XDRObject.prototype._cleanup = function(abort) { 30527 debug('cleanup', abort); 30528 if (!this.xdr) { 30529 return; 30530 } 30531 this.removeAllListeners(); 30532 eventUtils.unloadDel(this.unloadRef); 30533 30534 this.xdr.ontimeout = this.xdr.onerror = this.xdr.onprogress = this.xdr.onload = null; 30535 if (abort) { 30536 try { 30537 this.xdr.abort(); 30538 } catch (x) { 30539 // intentionally empty 30540 } 30541 } 30542 this.unloadRef = this.xdr = null; 30543}; 30544 30545XDRObject.prototype.close = function() { 30546 debug('close'); 30547 this._cleanup(true); 30548}; 30549 30550// IE 8/9 if the request target uses the same scheme - #79 30551XDRObject.enabled = !!(global.XDomainRequest && browser.hasDomain()); 30552 30553module.exports = XDRObject; 30554 30555}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 30556},{"../../utils/browser":222,"../../utils/event":224,"../../utils/url":230,"_process":173,"debug":232,"events":181,"inherits":172}],213:[function(require,module,exports){ 30557'use strict'; 30558 30559var inherits = require('inherits') 30560 , XhrDriver = require('../driver/xhr') 30561 ; 30562 30563function XHRCorsObject(method, url, payload, opts) { 30564 XhrDriver.call(this, method, url, payload, opts); 30565} 30566 30567inherits(XHRCorsObject, XhrDriver); 30568 30569XHRCorsObject.enabled = XhrDriver.enabled && XhrDriver.supportsCORS; 30570 30571module.exports = XHRCorsObject; 30572 30573},{"../driver/xhr":195,"inherits":172}],214:[function(require,module,exports){ 30574'use strict'; 30575 30576var EventEmitter = require('events').EventEmitter 30577 , inherits = require('inherits') 30578 ; 30579 30580function XHRFake(/* method, url, payload, opts */) { 30581 var self = this; 30582 EventEmitter.call(this); 30583 30584 this.to = setTimeout(function() { 30585 self.emit('finish', 200, '{}'); 30586 }, XHRFake.timeout); 30587} 30588 30589inherits(XHRFake, EventEmitter); 30590 30591XHRFake.prototype.close = function() { 30592 clearTimeout(this.to); 30593}; 30594 30595XHRFake.timeout = 2000; 30596 30597module.exports = XHRFake; 30598 30599},{"events":181,"inherits":172}],215:[function(require,module,exports){ 30600'use strict'; 30601 30602var inherits = require('inherits') 30603 , XhrDriver = require('../driver/xhr') 30604 ; 30605 30606function XHRLocalObject(method, url, payload /*, opts */) { 30607 XhrDriver.call(this, method, url, payload, { 30608 noCredentials: true 30609 }); 30610} 30611 30612inherits(XHRLocalObject, XhrDriver); 30613 30614XHRLocalObject.enabled = XhrDriver.enabled; 30615 30616module.exports = XHRLocalObject; 30617 30618},{"../driver/xhr":195,"inherits":172}],216:[function(require,module,exports){ 30619(function (process
vendor: 2,739 bytes, lines 30619-30720
30619){ 30620'use strict'; 30621 30622var utils = require('../utils/event') 30623 , urlUtils = require('../utils/url') 30624 , inherits = require('inherits') 30625 , EventEmitter = require('events').EventEmitter 30626 , WebsocketDriver = require('./driver/websocket') 30627 ; 30628 30629var debug = function() {}; 30630if (process.env.NODE_ENV !== 'production') { 30631 debug = require('debug')('sockjs-client:websocket'); 30632} 30633 30634function WebSocketTransport(transUrl, ignore, options) { 30635 if (!WebSocketTransport.enabled()) { 30636 throw new Error('Transport created when disabled'); 30637 } 30638 30639 EventEmitter.call(this); 30640 debug('constructor', transUrl); 30641 30642 var self = this; 30643 var url = urlUtils.addPath(transUrl, '/websocket'); 30644 if (url.slice(0, 5) === 'https') { 30645 url = 'wss' + url.slice(5); 30646 } else { 30647 url = 'ws' + url.slice(4); 30648 } 30649 this.url = url; 30650 30651 this.ws = new WebsocketDriver(this.url, [], options); 30652 this.ws.onmessage = function(e) { 30653 debug('message event', e.data); 30654 self.emit('message', e.data); 30655 }; 30656 // Firefox has an interesting bug. If a websocket connection is 30657 // created after onunload, it stays alive even when user 30658 // navigates away from the page. In such situation let's lie - 30659 // let's not open the ws connection at all. See: 30660 // https://github.com/sockjs/sockjs-client/issues/28 30661 // https://bugzilla.mozilla.org/show_bug.cgi?id=696085 30662 this.unloadRef = utils.unloadAdd(function() { 30663 debug('unload'); 30664 self.ws.close(); 30665 }); 30666 this.ws.onclose = function(e) { 30667 debug('close event', e.code, e.reason); 30668 self.emit('close', e.code, e.reason); 30669 self._cleanup(); 30670 }; 30671 this.ws.onerror = function(e) { 30672 debug('error event', e); 30673 self.emit('close', 1006, 'WebSocket connection broken'); 30674 self._cleanup(); 30675 }; 30676} 30677 30678inherits(WebSocketTransport, EventEmitter); 30679 30680WebSocketTransport.prototype.send = function(data) { 30681 var msg = '[' + data + ']'; 30682 debug('send', msg); 30683 this.ws.send(msg); 30684}; 30685 30686WebSocketTransport.prototype.close = function() { 30687 debug('close'); 30688 var ws = this.ws; 30689 this._cleanup(); 30690 if (ws) { 30691 ws.close(); 30692 } 30693}; 30694 30695WebSocketTransport.prototype._cleanup = function() { 30696 debug('_cleanup'); 30697 var ws = this.ws; 30698 if (ws) { 30699 ws.onmessage = ws.onclose = ws.onerror = null; 30700 } 30701 utils.unloadDel(this.unloadRef); 30702 this.unloadRef = this.ws = null; 30703 this.removeAllListeners(); 30704}; 30705 30706WebSocketTransport.enabled = function() { 30707 debug('enabled'); 30708 return !!WebsocketDriver; 30709}; 30710WebSocketTransport.transportName = 'websocket'; 30711 30712// In theory, ws should require 1 round trip. But in chrome, this is 30713// not very stable over SSL. Most likely a ws connection requires a 30714// separate SSL connection, in which case 2 round trips are an 30715// absolute minumum. 30716WebSocketTransport.roundTrips = 2; 30717 30718module.exports = WebSocketTransport; 30719 30720}).call(this
vendor: 17,708 bytes, lines 30720-31289
30720,require('_process')) 30721},{"../utils/event":224,"../utils/url":230,"./driver/websocket":197,"_process":173,"debug":232,"events":181,"inherits":172}],217:[function(require,module,exports){ 30722'use strict'; 30723 30724var inherits = require('inherits') 30725 , AjaxBasedTransport = require('./lib/ajax-based') 30726 , XdrStreamingTransport = require('./xdr-streaming') 30727 , XhrReceiver = require('./receiver/xhr') 30728 , XDRObject = require('./sender/xdr') 30729 ; 30730 30731function XdrPollingTransport(transUrl) { 30732 if (!XDRObject.enabled) { 30733 throw new Error('Transport created when disabled'); 30734 } 30735 AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject); 30736} 30737 30738inherits(XdrPollingTransport, AjaxBasedTransport); 30739 30740XdrPollingTransport.enabled = XdrStreamingTransport.enabled; 30741XdrPollingTransport.transportName = 'xdr-polling'; 30742XdrPollingTransport.roundTrips = 2; // preflight, ajax 30743 30744module.exports = XdrPollingTransport; 30745 30746},{"./lib/ajax-based":202,"./receiver/xhr":210,"./sender/xdr":212,"./xdr-streaming":218,"inherits":172}],218:[function(require,module,exports){ 30747'use strict'; 30748 30749var inherits = require('inherits') 30750 , AjaxBasedTransport = require('./lib/ajax-based') 30751 , XhrReceiver = require('./receiver/xhr') 30752 , XDRObject = require('./sender/xdr') 30753 ; 30754 30755// According to: 30756// http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests 30757// http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/ 30758 30759function XdrStreamingTransport(transUrl) { 30760 if (!XDRObject.enabled) { 30761 throw new Error('Transport created when disabled'); 30762 } 30763 AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject); 30764} 30765 30766inherits(XdrStreamingTransport, AjaxBasedTransport); 30767 30768XdrStreamingTransport.enabled = function(info) { 30769 if (info.cookie_needed || info.nullOrigin) { 30770 return false; 30771 } 30772 return XDRObject.enabled && info.sameScheme; 30773}; 30774 30775XdrStreamingTransport.transportName = 'xdr-streaming'; 30776XdrStreamingTransport.roundTrips = 2; // preflight, ajax 30777 30778module.exports = XdrStreamingTransport; 30779 30780},{"./lib/ajax-based":202,"./receiver/xhr":210,"./sender/xdr":212,"inherits":172}],219:[function(require,module,exports){ 30781'use strict'; 30782 30783var inherits = require('inherits') 30784 , AjaxBasedTransport = require('./lib/ajax-based') 30785 , XhrReceiver = require('./receiver/xhr') 30786 , XHRCorsObject = require('./sender/xhr-cors') 30787 , XHRLocalObject = require('./sender/xhr-local') 30788 ; 30789 30790function XhrPollingTransport(transUrl) { 30791 if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) { 30792 throw new Error('Transport created when disabled'); 30793 } 30794 AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject); 30795} 30796 30797inherits(XhrPollingTransport, AjaxBasedTransport); 30798 30799XhrPollingTransport.enabled = function(info) { 30800 if (info.nullOrigin) { 30801 return false; 30802 } 30803 30804 if (XHRLocalObject.enabled && info.sameOrigin) { 30805 return true; 30806 } 30807 return XHRCorsObject.enabled; 30808}; 30809 30810XhrPollingTransport.transportName = 'xhr-polling'; 30811XhrPollingTransport.roundTrips = 2; // preflight, ajax 30812 30813module.exports = XhrPollingTransport; 30814 30815},{"./lib/ajax-based":202,"./receiver/xhr":210,"./sender/xhr-cors":213,"./sender/xhr-local":215,"inherits":172}],220:[function(require,module,exports){ 30816(function (global){ 30817'use strict'; 30818 30819var inherits = require('inherits') 30820 , AjaxBasedTransport = require('./lib/ajax-based') 30821 , XhrReceiver = require('./receiver/xhr') 30822 , XHRCorsObject = require('./sender/xhr-cors') 30823 , XHRLocalObject = require('./sender/xhr-local') 30824 , browser = require('../utils/browser') 30825 ; 30826 30827function XhrStreamingTransport(transUrl) { 30828 if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) { 30829 throw new Error('Transport created when disabled'); 30830 } 30831 AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XHRCorsObject); 30832} 30833 30834inherits(XhrStreamingTransport, AjaxBasedTransport); 30835 30836XhrStreamingTransport.enabled = function(info) { 30837 if (info.nullOrigin) { 30838 return false; 30839 } 30840 // Opera doesn't support xhr-streaming #60 30841 // But it might be able to #92 30842 if (browser.isOpera()) { 30843 return false; 30844 } 30845 30846 return XHRCorsObject.enabled; 30847}; 30848 30849XhrStreamingTransport.transportName = 'xhr-streaming'; 30850XhrStreamingTransport.roundTrips = 2; // preflight, ajax 30851 30852// Safari gets confused when a streaming ajax request is started 30853// before onload. This causes the load indicator to spin indefinetely. 30854// Only require body when used in a browser 30855XhrStreamingTransport.needBody = !!global.document; 30856 30857module.exports = XhrStreamingTransport; 30858 30859}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 30860},{"../utils/browser":222,"./lib/ajax-based":202,"./receiver/xhr":210,"./sender/xhr-cors":213,"./sender/xhr-local":215,"inherits":172}],221:[function(require,module,exports){ 30861(function (global){ 30862'use strict'; 30863 30864if (global.crypto && global.crypto.getRandomValues) { 30865 module.exports.randomBytes = function(length) { 30866 var bytes = new Uint8Array(length); 30867 global.crypto.getRandomValues(bytes); 30868 return bytes; 30869 }; 30870} else { 30871 module.exports.randomBytes = function(length) { 30872 var bytes = new Array(length); 30873 for (var i = 0; i < length; i++) { 30874 bytes[i] = Math.floor(Math.random() * 256); 30875 } 30876 return bytes; 30877 }; 30878} 30879 30880}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 30881},{}],222:[function(require,module,exports){ 30882(function (global){ 30883'use strict'; 30884 30885module.exports = { 30886 isOpera: function() { 30887 return global.navigator && 30888 /opera/i.test(global.navigator.userAgent); 30889 } 30890 30891, isKonqueror: function() { 30892 return global.navigator && 30893 /konqueror/i.test(global.navigator.userAgent); 30894 } 30895 30896 // #187 wrap document.domain in try/catch because of WP8 from file:/// 30897, hasDomain: function () { 30898 // non-browser client always has a domain 30899 if (!global.document) { 30900 return true; 30901 } 30902 30903 try { 30904 return !!global.document.domain; 30905 } catch (e) { 30906 return false; 30907 } 30908 } 30909}; 30910 30911}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 30912},{}],223:[function(require,module,exports){ 30913'use strict'; 30914 30915// Some extra characters that Chrome gets wrong, and substitutes with 30916// something else on the wire. 30917// eslint-disable-next-line no-control-regex, no-misleading-character-class 30918var extraEscapable = /[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g 30919 , extraLookup; 30920 30921// This may be quite slow, so let's delay until user actually uses bad 30922// characters. 30923var unrollLookup = function(escapable) { 30924 var i; 30925 var unrolled = {}; 30926 var c = []; 30927 for (i = 0; i < 65536; i++) { 30928 c.push( String.fromCharCode(i) ); 30929 } 30930 escapable.lastIndex = 0; 30931 c.join('').replace(escapable, function(a) { 30932 unrolled[ a ] = '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); 30933 return ''; 30934 }); 30935 escapable.lastIndex = 0; 30936 return unrolled; 30937}; 30938 30939// Quote string, also taking care of unicode characters that browsers 30940// often break. Especially, take care of unicode surrogates: 30941// http://en.wikipedia.org/wiki/Mapping_of_Unicode_characters#Surrogates 30942module.exports = { 30943 quote: function(string) { 30944 var quoted = JSON.stringify(string); 30945 30946 // In most cases this should be very fast and good enough. 30947 extraEscapable.lastIndex = 0; 30948 if (!extraEscapable.test(quoted)) { 30949 return quoted; 30950 } 30951 30952 if (!extraLookup) { 30953 extraLookup = unrollLookup(extraEscapable); 30954 } 30955 30956 return quoted.replace(extraEscapable, function(a) { 30957 return extraLookup[a]; 30958 }); 30959 } 30960}; 30961 30962},{}],224:[function(require,module,exports){ 30963(function (global){ 30964'use strict'; 30965 30966var random = require('./random'); 30967 30968var onUnload = {} 30969 , afterUnload = false 30970 // detect google chrome packaged apps because they don't allow the 'unload' event 30971 , isChromePackagedApp = global.chrome && global.chrome.app && global.chrome.app.runtime 30972 ; 30973 30974module.exports = { 30975 attachEvent: function(event, listener) { 30976 if (typeof global.addEventListener !== 'undefined') { 30977 global.addEventListener(event, listener, false); 30978 } else if (global.document && global.attachEvent) { 30979 // IE quirks. 30980 // According to: http://stevesouders.com/misc/test-postmessage.php 30981 // the message gets delivered only to 'document', not 'window'. 30982 global.document.attachEvent('on' + event, listener); 30983 // I get 'window' for ie8. 30984 global.attachEvent('on' + event, listener); 30985 } 30986 } 30987 30988, detachEvent: function(event, listener) { 30989 if (typeof global.addEventListener !== 'undefined') { 30990 global.removeEventListener(event, listener, false); 30991 } else if (global.document && global.detachEvent) { 30992 global.document.detachEvent('on' + event, listener); 30993 global.detachEvent('on' + event, listener); 30994 } 30995 } 30996 30997, unloadAdd: function(listener) { 30998 if (isChromePackagedApp) { 30999 return null; 31000 } 31001 31002 var ref = random.string(8); 31003 onUnload[ref] = listener; 31004 if (afterUnload) { 31005 setTimeout(this.triggerUnloadCallbacks, 0); 31006 } 31007 return ref; 31008 } 31009 31010, unloadDel: function(ref) { 31011 if (ref in onUnload) { 31012 delete onUnload[ref]; 31013 } 31014 } 31015 31016, triggerUnloadCallbacks: function() { 31017 for (var ref in onUnload) { 31018 onUnload[ref](); 31019 delete onUnload[ref]; 31020 } 31021 } 31022}; 31023 31024var unloadTriggered = function() { 31025 if (afterUnload) { 31026 return; 31027 } 31028 afterUnload = true; 31029 module.exports.triggerUnloadCallbacks(); 31030}; 31031 31032// 'unload' alone is not reliable in opera within an iframe, but we 31033// can't use `beforeunload` as IE fires it on javascript: links. 31034if (!isChromePackagedApp) { 31035 module.exports.attachEvent('unload', unloadTriggered); 31036} 31037 31038}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 31039},{"./random":228}],225:[function(require,module,exports){ 31040(function (process,global){ 31041'use strict'; 31042 31043var eventUtils = require('./event') 31044 , browser = require('./browser') 31045 ; 31046 31047var debug = function() {}; 31048if (process.env.NODE_ENV !== 'production') { 31049 debug = require('debug')('sockjs-client:utils:iframe'); 31050} 31051 31052module.exports = { 31053 WPrefix: '_jp' 31054, currentWindowId: null 31055 31056, polluteGlobalNamespace: function() { 31057 if (!(module.exports.WPrefix in global)) { 31058 global[module.exports.WPrefix] = {}; 31059 } 31060 } 31061 31062, postMessage: function(type, data) { 31063 if (global.parent !== global) { 31064 global.parent.postMessage(JSON.stringify({ 31065 windowId: module.exports.currentWindowId 31066 , type: type 31067 , data: data || '' 31068 }), '*'); 31069 } else { 31070 debug('Cannot postMessage, no parent window.', type, data); 31071 } 31072 } 31073 31074, createIframe: function(iframeUrl, errorCallback) { 31075 var iframe = global.document.createElement('iframe'); 31076 var tref, unloadRef; 31077 var unattach = function() { 31078 debug('unattach'); 31079 clearTimeout(tref); 31080 // Explorer had problems with that. 31081 try { 31082 iframe.onload = null; 31083 } catch (x) { 31084 // intentionally empty 31085 } 31086 iframe.onerror = null; 31087 }; 31088 var cleanup = function() { 31089 debug('cleanup'); 31090 if (iframe) { 31091 unattach(); 31092 // This timeout makes chrome fire onbeforeunload event 31093 // within iframe. Without the timeout it goes straight to 31094 // onunload. 31095 setTimeout(function() { 31096 if (iframe) { 31097 iframe.parentNode.removeChild(iframe); 31098 } 31099 iframe = null; 31100 }, 0); 31101 eventUtils.unloadDel(unloadRef); 31102 } 31103 }; 31104 var onerror = function(err) { 31105 debug('onerror', err); 31106 if (iframe) { 31107 cleanup(); 31108 errorCallback(err); 31109 } 31110 }; 31111 var post = function(msg, origin) { 31112 debug('post', msg, origin); 31113 setTimeout(function() { 31114 try { 31115 // When the iframe is not loaded, IE raises an exception 31116 // on 'contentWindow'. 31117 if (iframe && iframe.contentWindow) { 31118 iframe.contentWindow.postMessage(msg, origin); 31119 } 31120 } catch (x) { 31121 // intentionally empty 31122 } 31123 }, 0); 31124 }; 31125 31126 iframe.src = iframeUrl; 31127 iframe.style.display = 'none'; 31128 iframe.style.position = 'absolute'; 31129 iframe.onerror = function() { 31130 onerror('onerror'); 31131 }; 31132 iframe.onload = function() { 31133 debug('onload'); 31134 // `onload` is triggered before scripts on the iframe are 31135 // executed. Give it few seconds to actually load stuff. 31136 clearTimeout(tref); 31137 tref = setTimeout(function() { 31138 onerror('onload timeout'); 31139 }, 2000); 31140 }; 31141 global.document.body.appendChild(iframe); 31142 tref = setTimeout(function() { 31143 onerror('timeout'); 31144 }, 15000); 31145 unloadRef = eventUtils.unloadAdd(cleanup); 31146 return { 31147 post: post 31148 , cleanup: cleanup 31149 , loaded: unattach 31150 }; 31151 } 31152 31153/* eslint no-undef: "off", new-cap: "off" */ 31154, createHtmlfile: function(iframeUrl, errorCallback) { 31155 var axo = ['Active'].concat('Object').join('X'); 31156 var doc = new global[axo]('htmlfile'); 31157 var tref, unloadRef; 31158 var iframe; 31159 var unattach = function() { 31160 clearTimeout(tref); 31161 iframe.onerror = null; 31162 }; 31163 var cleanup = function() { 31164 if (doc) { 31165 unattach(); 31166 eventUtils.unloadDel(unloadRef); 31167 iframe.parentNode.removeChild(iframe); 31168 iframe = doc = null; 31169 CollectGarbage(); 31170 } 31171 }; 31172 var onerror = function(r) { 31173 debug('onerror', r); 31174 if (doc) { 31175 cleanup(); 31176 errorCallback(r); 31177 } 31178 }; 31179 var post = function(msg, origin) { 31180 try { 31181 // When the iframe is not loaded, IE raises an exception 31182 // on 'contentWindow'. 31183 setTimeout(function() { 31184 if (iframe && iframe.contentWindow) { 31185 iframe.contentWindow.postMessage(msg, origin); 31186 } 31187 }, 0); 31188 } catch (x) { 31189 // intentionally empty 31190 } 31191 }; 31192 31193 doc.open(); 31194 doc.write('<html><s' + 'cript>' + 31195 'document.domain="' + global.document.domain + '";' + 31196 '</s' + 'cript></html>'); 31197 doc.close(); 31198 doc.parentWindow[module.exports.WPrefix] = global[module.exports.WPrefix]; 31199 var c = doc.createElement('div'); 31200 doc.body.appendChild(c); 31201 iframe = doc.createElement('iframe'); 31202 c.appendChild(iframe); 31203 iframe.src = iframeUrl; 31204 iframe.onerror = function() { 31205 onerror('onerror'); 31206 }; 31207 tref = setTimeout(function() { 31208 onerror('timeout'); 31209 }, 15000); 31210 unloadRef = eventUtils.unloadAdd(cleanup); 31211 return { 31212 post: post 31213 , cleanup: cleanup 31214 , loaded: unattach 31215 }; 31216 } 31217}; 31218 31219module.exports.iframeEnabled = false; 31220if (global.document) { 31221 // postMessage misbehaves in konqueror 4.6.5 - the messages are delivered with 31222 // huge delay, or not at all. 31223 module.exports.iframeEnabled = (typeof global.postMessage === 'function' || 31224 typeof global.postMessage === 'object') && (!browser.isKonqueror()); 31225} 31226 31227}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 31228},{"./browser":222,"./event":224,"_process":173,"debug":232}],226:[function(require,module,exports){ 31229(function (global){ 31230'use strict'; 31231 31232var logObject = {}; 31233['log', 'debug', 'warn'].forEach(function (level) { 31234 var levelExists; 31235 31236 try { 31237 levelExists = global.console && global.console[level] && global.console[level].apply; 31238 } catch(e) { 31239 // do nothing 31240 } 31241 31242 logObject[level] = levelExists ? function () { 31243 return global.console[level].apply(global.console, arguments); 31244 } : (level === 'log' ? function () {} : logObject.log); 31245}); 31246 31247module.exports = logObject; 31248 31249}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 31250},{}],227:[function(require,module,exports){ 31251'use strict'; 31252 31253module.exports = { 31254 isObject: function(obj) { 31255 var type = typeof obj; 31256 return type === 'function' || type === 'object' && !!obj; 31257 } 31258 31259, extend: function(obj) { 31260 if (!this.isObject(obj)) { 31261 return obj; 31262 } 31263 var source, prop; 31264 for (var i = 1, length = arguments.length; i < length; i++) { 31265 source = arguments[i]; 31266 for (prop in source) { 31267 if (Object.prototype.hasOwnProperty.call(source, prop)) { 31268 obj[prop] = source[prop]; 31269 } 31270 } 31271 } 31272 return obj; 31273 } 31274}; 31275 31276},{}],228:[function(require,module,exports){ 31277'use strict'; 31278 31279var crypto = require('crypto'); 31280 31281// This string has length 32, a power of 2, so the modulus doesn't introduce a 31282// bias. 31283var _randomStringChars = 'abcdefghijklmnopqrstuvwxyz012345'; 31284module.exports = { 31285 string: function(length) { 31286 var max = _randomStringChars.length; 31287 var bytes = crypto.randomBytes(length); 31288 var ret = []; 31289 for (var i = 0; i < length; i++) {
31290 ret.push(_randomStringChars.substr(bytes[i] % max, 1)); 31291 } 31292 return ret.join(''); 31293 } 31294 31295, number: function(max) { 31296 return Math.floor(Math.random() * max); 31297 } 31298 31299, numberString: function(max) { 31300 var t = ('' + (max - 1)).length; 31301 var p = new Array(t + 1).join('0'); 31302 return (p + this.number(max)).slice(-t); 31303 } 31304}; 31305 31306},{"crypto":221}],229:[function(require,module,exports){ 31307(function (process){ 31308'use strict'; 31309 31310var debug = function() {}; 31311if (process.env.NODE_ENV !== 'production') { 31312 debug = require('debug')('sockjs-client:utils:transport'); 31313} 31314 31315module.exports = function(availableTransports) { 31316 return { 31317 filterToEnabled: function(transportsWhitelist, info) { 31318 var transports = { 31319 main: [] 31320 , facade: [] 31321 }; 31322 if (!transportsWhitelist) { 31323 transportsWhitelist = []; 31324 } else if (typeof transportsWhitelist === 'string') { 31325 transportsWhitelist = [transportsWhitelist]; 31326 } 31327 31328 availableTransports.forEach(function(trans) { 31329 if (!trans) { 31330 return; 31331 } 31332 31333 if (trans.transportName === 'websocket' && info.websocket === false) { 31334 debug('disabled from server', 'websocket'); 31335 return; 31336 } 31337 31338 if (transportsWhitelist.length && 31339 transportsWhitelist.indexOf(trans.transportName) === -1) { 31340 debug('not in whitelist', trans.transportName); 31341 return; 31342 } 31343 31344 if (trans.enabled(info)) { 31345 debug('enabled', trans.transportName); 31346 transports.main.push(trans); 31347 if (trans.facadeTransport) { 31348 transports.facade.push(trans.facadeTransport); 31349 } 31350 } else { 31351 debug('disabled', trans.transportName); 31352 } 31353 }); 31354 return transports; 31355 } 31356 }; 31357}; 31358 31359}).call(this,require('_process')) 31360},{"_process":173,"debug":232}],230:[function(require,module,exports){ 31361(function (process){ 31362'use strict'; 31363 31364var URL = require('url-parse'); 31365 31366var debug = function() {}; 31367if (process.env.NODE_ENV !== 'production') { 31368 debug = require('debug')('sockjs-client:utils:url'); 31369} 31370 31371module.exports = { 31372 getOrigin: function(url) { 31373 if (!url) { 31374 return null; 31375 } 31376 31377 var p = new URL(url); 31378 if (p.protocol === 'file:') { 31379 return null; 31380 } 31381 31382 var port = p.port; 31383 if (!port) { 31384 port = (p.protocol === 'https:') ? '443' : '80'; 31385 } 31386 31387 return p.protocol + '//' + p.hostname + ':' + port; 31388 } 31389 31390, isOriginEqual: function(a, b) { 31391 var res = this.getOrigin(a) === this.getOrigin(b); 31392 debug('same', a, b, res); 31393 return res; 31394 } 31395 31396, isSchemeEqual: function(a, b) { 31397 return (a.split(':')[0] === b.split(':')[0]); 31398 } 31399 31400, addPath: function (url, path) { 31401 var qs = url.split('?'); 31402 return qs[0] + path + (qs[1] ? '?' + qs[1] : ''); 31403 } 31404 31405, addQuery: function (url, q) { 31406 return url + (url.indexOf('?') === -1 ? ('?' + q) : ('&' + q)); 31407 } 31408 31409, isLoopbackAddr: function (addr) { 31410 return /^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr) || /^\[::1\]$/.test(addr); 31411 } 31412}; 31413 31414}).call(this,require('_process')) 31415},{"_process":173,"debug":232,"url-parse":241}],231:[function(require,module,exports){ 31416module.exports = '1.6.1'; 31417 31418},{}],232:[function(require,module,exports){ 31419(function (process){ 31420"use strict"; 31421 31422function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 31423 31424/* eslint-env browser */ 31425 31426/** 31427 * This is the web browser implementation of `debug()`. 31428 */ 31429exports.log = log; 31430exports.formatArgs = formatArgs; 31431exports.save = save; 31432exports.load = load; 31433exports.useColors = useColors; 31434exports.storage = localstorage(); 31435/** 31436 * Colors. 31437 */ 31438 31439exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00
vendor: 5,131 bytes, lines 31439-31601
31439FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33']; 31440/** 31441 * Currently only WebKit-based Web Inspectors, Firefox >= v31, 31442 * and the Firebug extension (any Firefox version) are known 31443 * to support "%c" CSS customizations. 31444 * 31445 * TODO: add a `localStorage` variable to explicitly enable/disable colors 31446 */ 31447// eslint-disable-next-line complexity 31448 31449function useColors() { 31450 // NB: In an Electron preload script, document will be defined but not fully 31451 // initialized. Since we know we're in Chrome, we'll just detect this case 31452 // explicitly 31453 if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { 31454 return true; 31455 } // Internet Explorer and Edge do not support colors. 31456 31457 31458 if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { 31459 return false; 31460 } // Is webkit? http://stackoverflow.com/a/16459606/376773 31461 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 31462 31463 31464 return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773 31465 typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31? 31466 // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages 31467 typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker 31468 typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); 31469} 31470/** 31471 * Colorize log arguments if enabled. 31472 * 31473 * @api public 31474 */ 31475 31476 31477function formatArgs(args) { 31478 args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff); 31479 31480 if (!this.useColors) { 31481 return; 31482 } 31483 31484 var c = 'color: ' + this.color; 31485 args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other 31486 // arguments passed either before or after the %c, so we need to 31487 // figure out the correct index to insert the CSS into 31488 31489 var index = 0; 31490 var lastC = 0; 31491 args[0].replace(/%[a-zA-Z%]/g, function (match) { 31492 if (match === '%%') { 31493 return; 31494 } 31495 31496 index++; 31497 31498 if (match === '%c') { 31499 // We only are interested in the *last* %c 31500 // (the user may have provided their own) 31501 lastC = index; 31502 } 31503 }); 31504 args.splice(lastC, 0, c); 31505} 31506/** 31507 * Invokes `console.log()` when available. 31508 * No-op when `console.log` is not a "function". 31509 * 31510 * @api public 31511 */ 31512 31513 31514function log() { 31515 var _console; 31516 31517 // This hackery is required for IE8/9, where 31518 // the `console.log` function doesn't have 'apply' 31519 return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments); 31520} 31521/** 31522 * Save `namespaces`. 31523 * 31524 * @param {String} namespaces 31525 * @api private 31526 */ 31527 31528 31529function save(namespaces) { 31530 try { 31531 if (namespaces) { 31532 exports.storage.setItem('debug', namespaces); 31533 } else { 31534 exports.storage.removeItem('debug'); 31535 } 31536 } catch (error) {// Swallow 31537 // XXX (@Qix-) should we be logging these? 31538 } 31539} 31540/** 31541 * Load `namespaces`. 31542 * 31543 * @return {String} returns the previously persisted debug modes 31544 * @api private 31545 */ 31546 31547 31548function load() { 31549 var r; 31550 31551 try { 31552 r = exports.storage.getItem('debug'); 31553 } catch (error) {} // Swallow 31554 // XXX (@Qix-) should we be logging these? 31555 // If debug isn't set in LS, and we're in Electron, try to load $DEBUG 31556 31557 31558 if (!r && typeof process !== 'undefined' && 'env' in process) { 31559 r = process.env.DEBUG; 31560 } 31561 31562 return r; 31563} 31564/** 31565 * Localstorage attempts to return the localstorage. 31566 * 31567 * This is necessary because safari throws 31568 * when a user disables cookies/localstorage 31569 * and you attempt to access it. 31570 * 31571 * @return {LocalStorage} 31572 * @api private 31573 */ 31574 31575 31576function localstorage() { 31577 try { 31578 // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context 31579 // The Browser also has localStorage in the global context. 31580 return localStorage; 31581 } catch (error) {// Swallow 31582 // XXX (@Qix-) should we be logging these? 31583 } 31584} 31585 31586module.exports = require('./common')(exports); 31587var formatters = module.exports.formatters; 31588/** 31589 * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. 31590 */ 31591 31592formatters.j = function (v) { 31593 try { 31594 return JSON.stringify(v); 31595 } catch (error) { 31596 return '[UnexpectedJSONParseError]: ' + error.message; 31597 } 31598}; 31599 31600 31601}
vendor: 5,543 bytes, lines 31601-31817
31601).call(this,require('_process')) 31602},{"./common":233,"_process":173}],233:[function(require,module,exports){ 31603"use strict"; 31604 31605/** 31606 * This is the common logic for both the Node.js and web browser 31607 * implementations of `debug()`. 31608 */ 31609function setup(env) { 31610 createDebug.debug = createDebug; 31611 createDebug.default = createDebug; 31612 createDebug.coerce = coerce; 31613 createDebug.disable = disable; 31614 createDebug.enable = enable; 31615 createDebug.enabled = enabled; 31616 createDebug.humanize = require('ms'); 31617 Object.keys(env).forEach(function (key) { 31618 createDebug[key] = env[key]; 31619 }); 31620 /** 31621 * Active `debug` instances. 31622 */ 31623 31624 createDebug.instances = []; 31625 /** 31626 * The currently active debug mode names, and names to skip. 31627 */ 31628 31629 createDebug.names = []; 31630 createDebug.skips = []; 31631 /** 31632 * Map of special "%n" handling functions, for the debug "format" argument. 31633 * 31634 * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". 31635 */ 31636 31637 createDebug.formatters = {}; 31638 /** 31639 * Selects a color for a debug namespace 31640 * @param {String} namespace The namespace string for the for the debug instance to be colored 31641 * @return {Number|String} An ANSI color code for the given namespace 31642 * @api private 31643 */ 31644 31645 function selectColor(namespace) { 31646 var hash = 0; 31647 31648 for (var i = 0; i < namespace.length; i++) { 31649 hash = (hash << 5) - hash + namespace.charCodeAt(i); 31650 hash |= 0; // Convert to 32bit integer 31651 } 31652 31653 return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; 31654 } 31655 31656 createDebug.selectColor = selectColor; 31657 /** 31658 * Create a debugger with the given `namespace`. 31659 * 31660 * @param {String} namespace 31661 * @return {Function} 31662 * @api public 31663 */ 31664 31665 function createDebug(namespace) { 31666 var prevTime; 31667 31668 function debug() { 31669 // Disabled? 31670 if (!debug.enabled) { 31671 return; 31672 } 31673 31674 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 31675 args[_key] = arguments[_key]; 31676 } 31677 31678 var self = debug; // Set `diff` timestamp 31679 31680 var curr = Number(new Date()); 31681 var ms = curr - (prevTime || curr); 31682 self.diff = ms; 31683 self.prev = prevTime; 31684 self.curr = curr; 31685 prevTime = curr; 31686 args[0] = createDebug.coerce(args[0]); 31687 31688 if (typeof args[0] !== 'string') { 31689 // Anything else let's inspect with %O 31690 args.unshift('%O'); 31691 } // Apply any `formatters` transformations 31692 31693 31694 var index = 0; 31695 args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) { 31696 // If we encounter an escaped % then don't increase the array index 31697 if (match === '%%') { 31698 return match; 31699 } 31700 31701 index++; 31702 var formatter = createDebug.formatters[format]; 31703 31704 if (typeof formatter === 'function') { 31705 var val = args[index]; 31706 match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format` 31707 31708 args.splice(index, 1); 31709 index--; 31710 } 31711 31712 return match; 31713 }); // Apply env-specific formatting (colors, etc.) 31714 31715 createDebug.formatArgs.call(self, args); 31716 var logFn = self.log || createDebug.log; 31717 logFn.apply(self, args); 31718 } 31719 31720 debug.namespace = namespace; 31721 debug.enabled = createDebug.enabled(namespace); 31722 debug.useColors = createDebug.useColors(); 31723 debug.color = selectColor(namespace); 31724 debug.destroy = destroy; 31725 debug.extend = extend; // Debug.formatArgs = formatArgs; 31726 // debug.rawLog = rawLog; 31727 // env-specific initialization logic for debug instances 31728 31729 if (typeof createDebug.init === 'function') { 31730 createDebug.init(debug); 31731 } 31732 31733 createDebug.instances.push(debug); 31734 return debug; 31735 } 31736 31737 function destroy() { 31738 var index = createDebug.instances.indexOf(this); 31739 31740 if (index !== -1) { 31741 createDebug.instances.splice(index, 1); 31742 return true; 31743 } 31744 31745 return false; 31746 } 31747 31748 function extend(namespace, delimiter) { 31749 return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); 31750 } 31751 /** 31752 * Enables a debug mode by namespaces. This can include modes 31753 * separated by a colon and wildcards. 31754 * 31755 * @param {String} namespaces 31756 * @api public 31757 */ 31758 31759 31760 function enable(namespaces) { 31761 createDebug.save(namespaces); 31762 createDebug.names = []; 31763 createDebug.skips = []; 31764 var i; 31765 var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); 31766 var len = split.length; 31767 31768 for (i = 0; i < len; i++) { 31769 if (!split[i]) { 31770 // ignore empty strings 31771 continue; 31772 } 31773 31774 namespaces = split[i].replace(/\*/g, '.*?'); 31775 31776 if (namespaces[0] === '-') { 31777 createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); 31778 } else { 31779 createDebug.names.push(new RegExp('^' + namespaces + '$')); 31780 } 31781 } 31782 31783 for (i = 0; i < createDebug.instances.length; i++) { 31784 var instance = createDebug.instances[i]; 31785 instance.enabled = createDebug.enabled(instance.namespace); 31786 } 31787 } 31788 /** 31789 * Disable debug output. 31790 * 31791 * @api public 31792 */ 31793 31794 31795 function disable() { 31796 createDebug.enable(''); 31797 } 31798 /** 31799 * Returns true if the given mode name is enabled, false otherwise. 31800 * 31801 * @param {String} name 31802 * @return {Boolean} 31803 * @api public 31804 */ 31805 31806 31807 function enabled(name) { 31808 if (name[name.length - 1] === '*') { 31809 return true; 31810 } 31811 31812 var i; 31813 var len; 31814 31815 for (i = 0, len = createDebug.skips.length; i < len; i++) { 31816 if (createDebug.skips[i].test(name)) { 31817 return false;
vendor: 10,567 bytes, lines 31818-32291
31818 } 31819 } 31820 31821 for (i = 0, len = createDebug.names.length; i < len; i++) { 31822 if (createDebug.names[i].test(name)) { 31823 return true; 31824 } 31825 } 31826 31827 return false; 31828 } 31829 /** 31830 * Coerce `val`. 31831 * 31832 * @param {Mixed} val 31833 * @return {Mixed} 31834 * @api private 31835 */ 31836 31837 31838 function coerce(val) { 31839 if (val instanceof Error) { 31840 return val.stack || val.message; 31841 } 31842 31843 return val; 31844 } 31845 31846 createDebug.enable(createDebug.load()); 31847 return createDebug; 31848} 31849 31850module.exports = setup; 31851 31852 31853},{"ms":234}],234:[function(require,module,exports){ 31854/** 31855 * Helpers. 31856 */ 31857 31858var s = 1000; 31859var m = s * 60; 31860var h = m * 60; 31861var d = h * 24; 31862var w = d * 7; 31863var y = d * 365.25; 31864 31865/** 31866 * Parse or format the given `val`. 31867 * 31868 * Options: 31869 * 31870 * - `long` verbose formatting [false] 31871 * 31872 * @param {String|Number} val 31873 * @param {Object} [options] 31874 * @throws {Error} throw an error if val is not a non-empty string or a number 31875 * @return {String|Number} 31876 * @api public 31877 */ 31878 31879module.exports = function (val, options) { 31880 options = options || {}; 31881 var type = typeof val; 31882 if (type === 'string' && val.length > 0) { 31883 return parse(val); 31884 } else if (type === 'number' && isFinite(val)) { 31885 return options.long ? fmtLong(val) : fmtShort(val); 31886 } 31887 throw new Error( 31888 'val is not a non-empty string or a valid number. val=' + 31889 JSON.stringify(val) 31890 ); 31891}; 31892 31893/** 31894 * Parse the given `str` and return milliseconds. 31895 * 31896 * @param {String} str 31897 * @return {Number} 31898 * @api private 31899 */ 31900 31901function parse(str) { 31902 str = String(str); 31903 if (str.length > 100) { 31904 return; 31905 } 31906 var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( 31907 str 31908 ); 31909 if (!match) { 31910 return; 31911 } 31912 var n = parseFloat(match[1]); 31913 var type = (match[2] || 'ms').toLowerCase(); 31914 switch (type) { 31915 case 'years': 31916 case 'year': 31917 case 'yrs': 31918 case 'yr': 31919 case 'y': 31920 return n * y; 31921 case 'weeks': 31922 case 'week': 31923 case 'w': 31924 return n * w; 31925 case 'days': 31926 case 'day': 31927 case 'd': 31928 return n * d; 31929 case 'hours': 31930 case 'hour': 31931 case 'hrs': 31932 case 'hr': 31933 case 'h': 31934 return n * h; 31935 case 'minutes': 31936 case 'minute': 31937 case 'mins': 31938 case 'min': 31939 case 'm': 31940 return n * m; 31941 case 'seconds': 31942 case 'second': 31943 case 'secs': 31944 case 'sec': 31945 case 's': 31946 return n * s; 31947 case 'milliseconds': 31948 case 'millisecond': 31949 case 'msecs': 31950 case 'msec': 31951 case 'ms': 31952 return n; 31953 default: 31954 return undefined; 31955 } 31956} 31957 31958/** 31959 * Short format for `ms`. 31960 * 31961 * @param {Number} ms 31962 * @return {String} 31963 * @api private 31964 */ 31965 31966function fmtShort(ms) { 31967 var msAbs = Math.abs(ms); 31968 if (msAbs >= d) { 31969 return Math.round(ms / d) + 'd'; 31970 } 31971 if (msAbs >= h) { 31972 return Math.round(ms / h) + 'h'; 31973 } 31974 if (msAbs >= m) { 31975 return Math.round(ms / m) + 'm'; 31976 } 31977 if (msAbs >= s) { 31978 return Math.round(ms / s) + 's'; 31979 } 31980 return ms + 'ms'; 31981} 31982 31983/** 31984 * Long format for `ms`. 31985 * 31986 * @param {Number} ms 31987 * @return {String} 31988 * @api private 31989 */ 31990 31991function fmtLong(ms) { 31992 var msAbs = Math.abs(ms); 31993 if (msAbs >= d) { 31994 return plural(ms, msAbs, d, 'day'); 31995 } 31996 if (msAbs >= h) { 31997 return plural(ms, msAbs, h, 'hour'); 31998 } 31999 if (msAbs >= m) { 32000 return plural(ms, msAbs, m, 'minute'); 32001 } 32002 if (msAbs >= s) { 32003 return plural(ms, msAbs, s, 'second'); 32004 } 32005 return ms + ' ms'; 32006} 32007 32008/** 32009 * Pluralization helper. 32010 */ 32011 32012function plural(ms, msAbs, n, name) { 32013 var isPlural = msAbs >= n * 1.5; 32014 return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); 32015} 32016 32017},{}],235:[function(require,module,exports){ 32018"use strict"; 32019 32020function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 32021 32022function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 32023 32024function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 32025 32026function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } 32027 32028function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 32029 32030function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } 32031 32032function Agent() { 32033 this._defaults = []; 32034} 32035 32036['use', 'on', 'once', 'set', 'query', 'type', 'accept', 'auth', 'withCredentials', 'sortQuery', 'retry', 'ok', 'redirects', 'timeout', 'buffer', 'serialize', 'parse', 'ca', 'key', 'pfx', 'cert', 'disableTLSCerts'].forEach(function (fn) { 32037 // Default setting for all requests from this agent 32038 Agent.prototype[fn] = function () { 32039 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 32040 args[_key] = arguments[_key]; 32041 } 32042 32043 this._defaults.push({ 32044 fn: fn, 32045 args: args 32046 }); 32047 32048 return this; 32049 }; 32050}); 32051 32052Agent.prototype._setDefaults = function (req) { 32053 this._defaults.forEach(function (def) { 32054 req[def.fn].apply(req, _toConsumableArray(def.args)); 32055 }); 32056}; 32057 32058module.exports = Agent; 32059 32060},{}],236:[function(require,module,exports){ 32061"use strict"; 32062 32063function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 32064 32065/** 32066 * Root reference for iframes. 32067 */ 32068var root; 32069 32070if (typeof window !== 'undefined') { 32071 // Browser window 32072 root = window; 32073} else if (typeof self === 'undefined') { 32074 // Other environments 32075 console.warn('Using browser-only version of superagent in non-browser environment'); 32076 root = void 0; 32077} else { 32078 // Web Worker 32079 root = self; 32080} 32081 32082var Emitter = require('component-emitter'); 32083 32084var safeStringify = require('fast-safe-stringify'); 32085 32086var RequestBase = require('./request-base'); 32087 32088var isObject = require('./is-object'); 32089 32090var ResponseBase = require('./response-base'); 32091 32092var Agent = require('./agent-base'); 32093/** 32094 * Noop. 32095 */ 32096 32097 32098function noop() {} 32099/** 32100 * Expose `request`. 32101 */ 32102 32103 32104module.exports = function (method, url) { 32105 // callback 32106 if (typeof url === 'function') { 32107 return new exports.Request('GET', method).end(url); 32108 } // url first 32109 32110 32111 if (arguments.length === 1) { 32112 return new exports.Request('GET', method); 32113 } 32114 32115 return new exports.Request(method, url); 32116}; 32117 32118exports = module.exports; 32119var request = exports; 32120exports.Request = Request; 32121/** 32122 * Determine XHR. 32123 */ 32124 32125request.getXHR = function () { 32126 if (root.XMLHttpRequest && (!root.location || root.location.protocol !== 'file:' || !root.ActiveXObject)) { 32127 return new XMLHttpRequest(); 32128 } 32129 32130 try { 32131 return new ActiveXObject('Microsoft.XMLHTTP'); 32132 } catch (_unused) {} 32133 32134 try { 32135 return new ActiveXObject('Msxml2.XMLHTTP.6.0'); 32136 } catch (_unused2) {} 32137 32138 try { 32139 return new ActiveXObject('Msxml2.XMLHTTP.3.0'); 32140 } catch (_unused3) {} 32141 32142 try { 32143 return new ActiveXObject('Msxml2.XMLHTTP'); 32144 } catch (_unused4) {} 32145 32146 throw new Error('Browser-only version of superagent could not find XHR'); 32147}; 32148/** 32149 * Removes leading and trailing whitespace, added to support IE. 32150 * 32151 * @param {String} s 32152 * @return {String} 32153 * @api private 32154 */ 32155 32156 32157var trim = ''.trim ? function (s) { 32158 return s.trim(); 32159} : function (s) { 32160 return s.replace(/(^\s*|\s*$)/g, ''); 32161}; 32162/** 32163 * Serialize the given `obj`. 32164 * 32165 * @param {Object} obj 32166 * @return {String} 32167 * @api private 32168 */ 32169 32170function serialize(obj) { 32171 if (!isObject(obj)) return obj; 32172 var pairs = []; 32173 32174 for (var key in obj) { 32175 if (Object.prototype.hasOwnProperty.call(obj, key)) pushEncodedKeyValuePair(pairs, key, obj[key]); 32176 } 32177 32178 return pairs.join('&'); 32179} 32180/** 32181 * Helps 'serialize' with serializing arrays. 32182 * Mutates the pairs array. 32183 * 32184 * @param {Array} pairs 32185 * @param {String} key 32186 * @param {Mixed} val 32187 */ 32188 32189 32190function pushEncodedKeyValuePair(pairs, key, val) { 32191 if (val === undefined) return; 32192 32193 if (val === null) { 32194 pairs.push(encodeURI(key)); 32195 return; 32196 } 32197 32198 if (Array.isArray(val)) { 32199 val.forEach(function (v) { 32200 pushEncodedKeyValuePair(pairs, key, v); 32201 }); 32202 } else if (isObject(val)) { 32203 for (var subkey in val) { 32204 if (Object.prototype.hasOwnProperty.call(val, subkey)) pushEncodedKeyValuePair(pairs, "".concat(key, "[").concat(subkey, "]"), val[subkey]); 32205 } 32206 } else { 32207 pairs.push(encodeURI(key) + '=' + encodeURIComponent(val)); 32208 } 32209} 32210/** 32211 * Expose serialization method. 32212 */ 32213 32214 32215request.serializeObject = serialize; 32216/** 32217 * Parse the given x-www-form-urlencoded `str`. 32218 * 32219 * @param {String} str 32220 * @return {Object} 32221 * @api private 32222 */ 32223 32224function parseString(str) { 32225 var obj = {}; 32226 var pairs = str.split('&'); 32227 var pair; 32228 var pos; 32229 32230 for (var i = 0, len = pairs.length; i < len; ++i) { 32231 pair = pairs[i]; 32232 pos = pair.indexOf('='); 32233 32234 if (pos === -1) { 32235 obj[decodeURIComponent(pair)] = ''; 32236 } else { 32237 obj[decodeURIComponent(pair.slice(0, pos))] = decodeURIComponent(pair.slice(pos + 1)); 32238 } 32239 } 32240 32241 return obj; 32242} 32243/** 32244 * Expose parser. 32245 */ 32246 32247 32248request.parseString = parseString; 32249/** 32250 * Default MIME type map. 32251 * 32252 * superagent.types.xml = 'application/xml'; 32253 * 32254 */ 32255 32256request.types = { 32257 html: 'text/html', 32258 json: 'application/json', 32259 xml: 'text/xml', 32260 urlencoded: 'application/x-www-form-urlencoded', 32261 form: 'application/x-www-form-urlencoded', 32262 'form-data': 'application/x-www-form-urlencoded' 32263}; 32264/** 32265 * Default serialization map. 32266 * 32267 * superagent.serialize['application/xml'] = function(obj){ 32268 * return 'generated xml here'; 32269 * }; 32270 * 32271 */ 32272 32273request.serialize = { 32274 'application/x-www-form-urlencoded': serialize, 32275 'application/json': safeStringify 32276}; 32277/** 32278 * Default parsers. 32279 * 32280 * superagent.parse['application/xml'] = function(str){ 32281 * return { object parsed from str }; 32282 * }; 32283 * 32284 */ 32285 32286request.parse = { 32287 'application/x-www-form-urlencoded': parseString, 32288 'application/json': JSON.parse 32289}; 32290/** 32291 * Parse the given header `str` into
vendor: 3,944 bytes, lines 32292-32452
32292 * an object containing the mapped fields. 32293 * 32294 * @param {String} str 32295 * @return {Object} 32296 * @api private 32297 */ 32298 32299function parseHeader(str) { 32300 var lines = str.split(/\r?\n/); 32301 var fields = {}; 32302 var index; 32303 var line; 32304 var field; 32305 var val; 32306 32307 for (var i = 0, len = lines.length; i < len; ++i) { 32308 line = lines[i]; 32309 index = line.indexOf(':'); 32310 32311 if (index === -1) { 32312 // could be empty line, just skip it 32313 continue; 32314 } 32315 32316 field = line.slice(0, index).toLowerCase(); 32317 val = trim(line.slice(index + 1)); 32318 fields[field] = val; 32319 } 32320 32321 return fields; 32322} 32323/** 32324 * Check if `mime` is json or has +json structured syntax suffix. 32325 * 32326 * @param {String} mime 32327 * @return {Boolean} 32328 * @api private 32329 */ 32330 32331 32332function isJSON(mime) { 32333 // should match /json or +json 32334 // but not /json-seq 32335 return /[/+]json($|[^-\w])/.test(mime); 32336} 32337/** 32338 * Initialize a new `Response` with the given `xhr`. 32339 * 32340 * - set flags (.ok, .error, etc) 32341 * - parse header 32342 * 32343 * Examples: 32344 * 32345 * Aliasing `superagent` as `request` is nice: 32346 * 32347 * request = superagent; 32348 * 32349 * We can use the promise-like API, or pass callbacks: 32350 * 32351 * request.get('/').end(function(res){}); 32352 * request.get('/', function(res){}); 32353 * 32354 * Sending data can be chained: 32355 * 32356 * request 32357 * .post('/user') 32358 * .send({ name: 'tj' }) 32359 * .end(function(res){}); 32360 * 32361 * Or passed to `.send()`: 32362 * 32363 * request 32364 * .post('/user') 32365 * .send({ name: 'tj' }, function(res){}); 32366 * 32367 * Or passed to `.post()`: 32368 * 32369 * request 32370 * .post('/user', { name: 'tj' }) 32371 * .end(function(res){}); 32372 * 32373 * Or further reduced to a single call for simple cases: 32374 * 32375 * request 32376 * .post('/user', { name: 'tj' }, function(res){}); 32377 * 32378 * @param {XMLHTTPRequest} xhr 32379 * @param {Object} options 32380 * @api private 32381 */ 32382 32383 32384function Response(req) { 32385 this.req = req; 32386 this.xhr = this.req.xhr; // responseText is accessible only if responseType is '' or 'text' and on older browsers 32387 32388 this.text = this.req.method !== 'HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text') || typeof this.xhr.responseType === 'undefined' ? this.xhr.responseText : null; 32389 this.statusText = this.req.xhr.statusText; 32390 var status = this.xhr.status; // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request 32391 32392 if (status === 1223) { 32393 status = 204; 32394 } 32395 32396 this._setStatusProperties(status); 32397 32398 this.headers = parseHeader(this.xhr.getAllResponseHeaders()); 32399 this.header = this.headers; // getAllResponseHeaders sometimes falsely returns "" for CORS requests, but 32400 // getResponseHeader still works. so we get content-type even if getting 32401 // other headers fails. 32402 32403 this.header['content-type'] = this.xhr.getResponseHeader('content-type'); 32404 32405 this._setHeaderProperties(this.header); 32406 32407 if (this.text === null && req._responseType) { 32408 this.body = this.xhr.response; 32409 } else { 32410 this.body = this.req.method === 'HEAD' ? null : this._parseBody(this.text ? this.text : this.xhr.response); 32411 } 32412} // eslint-disable-next-line new-cap 32413 32414 32415ResponseBase(Response.prototype); 32416/** 32417 * Parse the given body `str`. 32418 * 32419 * Used for auto-parsing of bodies. Parsers 32420 * are defined on the `superagent.parse` object. 32421 * 32422 * @param {String} str 32423 * @return {Mixed} 32424 * @api private 32425 */ 32426 32427Response.prototype._parseBody = function (str) { 32428 var parse = request.parse[this.type]; 32429 32430 if (this.req._parser) { 32431 return this.req._parser(this, str); 32432 } 32433 32434 if (!parse && isJSON(this.type)) { 32435 parse = request.parse['application/json']; 32436 } 32437 32438 return parse && str && (str.length > 0 || str instanceof Object) ? parse(str) : null; 32439}; 32440/** 32441 * Return an `Error` representative of this response. 32442 * 32443 * @return {Error} 32444 * @api public 32445 */ 32446 32447 32448Response.prototype.toError = function () { 32449 var req = this.req; 32450 var method = req.method; 32451 var url = req.url; 32452 var msg = "cannot ".concat(method, " ").concat(url, " (").concat(
vendor: 14,537 bytes, lines 32452-33080
32452this.status, ")"); 32453 var err = new Error(msg); 32454 err.status = this.status; 32455 err.method = method; 32456 err.url = url; 32457 return err; 32458}; 32459/** 32460 * Expose `Response`. 32461 */ 32462 32463 32464request.Response = Response; 32465/** 32466 * Initialize a new `Request` with the given `method` and `url`. 32467 * 32468 * @param {String} method 32469 * @param {String} url 32470 * @api public 32471 */ 32472 32473function Request(method, url) { 32474 var self = this; 32475 this._query = this._query || []; 32476 this.method = method; 32477 this.url = url; 32478 this.header = {}; // preserves header name case 32479 32480 this._header = {}; // coerces header names to lowercase 32481 32482 this.on('end', function () { 32483 var err = null; 32484 var res = null; 32485 32486 try { 32487 res = new Response(self); 32488 } catch (err_) { 32489 err = new Error('Parser is unable to parse the response'); 32490 err.parse = true; 32491 err.original = err_; // issue #675: return the raw response if the response parsing fails 32492 32493 if (self.xhr) { 32494 // ie9 doesn't have 'response' property 32495 err.rawResponse = typeof self.xhr.responseType === 'undefined' ? self.xhr.responseText : self.xhr.response; // issue #876: return the http status code if the response parsing fails 32496 32497 err.status = self.xhr.status ? self.xhr.status : null; 32498 err.statusCode = err.status; // backwards-compat only 32499 } else { 32500 err.rawResponse = null; 32501 err.status = null; 32502 } 32503 32504 return self.callback(err); 32505 } 32506 32507 self.emit('response', res); 32508 var new_err; 32509 32510 try { 32511 if (!self._isResponseOK(res)) { 32512 new_err = new Error(res.statusText || res.text || 'Unsuccessful HTTP response'); 32513 } 32514 } catch (err_) { 32515 new_err = err_; // ok() callback can throw 32516 } // #1000 don't catch errors from the callback to avoid double calling it 32517 32518 32519 if (new_err) { 32520 new_err.original = err; 32521 new_err.response = res; 32522 new_err.status = res.status; 32523 self.callback(new_err, res); 32524 } else { 32525 self.callback(null, res); 32526 } 32527 }); 32528} 32529/** 32530 * Mixin `Emitter` and `RequestBase`. 32531 */ 32532// eslint-disable-next-line new-cap 32533 32534 32535Emitter(Request.prototype); // eslint-disable-next-line new-cap 32536 32537RequestBase(Request.prototype); 32538/** 32539 * Set Content-Type to `type`, mapping values from `request.types`. 32540 * 32541 * Examples: 32542 * 32543 * superagent.types.xml = 'application/xml'; 32544 * 32545 * request.post('/') 32546 * .type('xml') 32547 * .send(xmlstring) 32548 * .end(callback); 32549 * 32550 * request.post('/') 32551 * .type('application/xml') 32552 * .send(xmlstring) 32553 * .end(callback); 32554 * 32555 * @param {String} type 32556 * @return {Request} for chaining 32557 * @api public 32558 */ 32559 32560Request.prototype.type = function (type) { 32561 this.set('Content-Type', request.types[type] || type); 32562 return this; 32563}; 32564/** 32565 * Set Accept to `type`, mapping values from `request.types`. 32566 * 32567 * Examples: 32568 * 32569 * superagent.types.json = 'application/json'; 32570 * 32571 * request.get('/agent') 32572 * .accept('json') 32573 * .end(callback); 32574 * 32575 * request.get('/agent') 32576 * .accept('application/json') 32577 * .end(callback); 32578 * 32579 * @param {String} accept 32580 * @return {Request} for chaining 32581 * @api public 32582 */ 32583 32584 32585Request.prototype.accept = function (type) { 32586 this.set('Accept', request.types[type] || type); 32587 return this; 32588}; 32589/** 32590 * Set Authorization field value with `user` and `pass`. 32591 * 32592 * @param {String} user 32593 * @param {String} [pass] optional in case of using 'bearer' as type 32594 * @param {Object} options with 'type' property 'auto', 'basic' or 'bearer' (default 'basic') 32595 * @return {Request} for chaining 32596 * @api public 32597 */ 32598 32599 32600Request.prototype.auth = function (user, pass, options) { 32601 if (arguments.length === 1) pass = ''; 32602 32603 if (_typeof(pass) === 'object' && pass !== null) { 32604 // pass is optional and can be replaced with options 32605 options = pass; 32606 pass = ''; 32607 } 32608 32609 if (!options) { 32610 options = { 32611 type: typeof btoa === 'function' ? 'basic' : 'auto' 32612 }; 32613 } 32614 32615 var encoder = function encoder(string) { 32616 if (typeof btoa === 'function') { 32617 return btoa(string); 32618 } 32619 32620 throw new Error('Cannot use basic auth, btoa is not a function'); 32621 }; 32622 32623 return this._auth(user, pass, options, encoder); 32624}; 32625/** 32626 * Add query-string `val`. 32627 * 32628 * Examples: 32629 * 32630 * request.get('/shoes') 32631 * .query('size=10') 32632 * .query({ color: 'blue' }) 32633 * 32634 * @param {Object|String} val 32635 * @return {Request} for chaining 32636 * @api public 32637 */ 32638 32639 32640Request.prototype.query = function (val) { 32641 if (typeof val !== 'string') val = serialize(val); 32642 if (val) this._query.push(val); 32643 return this; 32644}; 32645/** 32646 * Queue the given `file` as an attachment to the specified `field`, 32647 * with optional `options` (or filename). 32648 * 32649 * ``` js 32650 * request.post('/upload') 32651 * .attach('content', new Blob(['<a id="a"><b id="b">hey!</b></a>'], { type: "text/html"})) 32652 * .end(callback); 32653 * ``` 32654 * 32655 * @param {String} field 32656 * @param {Blob|File} file 32657 * @param {String|Object} options 32658 * @return {Request} for chaining 32659 * @api public 32660 */ 32661 32662 32663Request.prototype.attach = function (field, file, options) { 32664 if (file) { 32665 if (this._data) { 32666 throw new Error("superagent can't mix .send() and .attach()"); 32667 } 32668 32669 this._getFormData().append(field, file, options || file.name); 32670 } 32671 32672 return this; 32673}; 32674 32675Request.prototype._getFormData = function () { 32676 if (!this._formData) { 32677 this._formData = new root.FormData(); 32678 } 32679 32680 return this._formData; 32681}; 32682/** 32683 * Invoke the callback with `err` and `res` 32684 * and handle arity check. 32685 * 32686 * @param {Error} err 32687 * @param {Response} res 32688 * @api private 32689 */ 32690 32691 32692Request.prototype.callback = function (err, res) { 32693 if (this._shouldRetry(err, res)) { 32694 return this._retry(); 32695 } 32696 32697 var fn = this._callback; 32698 this.clearTimeout(); 32699 32700 if (err) { 32701 if (this._maxRetries) err.retries = this._retries - 1; 32702 this.emit('error', err); 32703 } 32704 32705 fn(err, res); 32706}; 32707/** 32708 * Invoke callback with x-domain error. 32709 * 32710 * @api private 32711 */ 32712 32713 32714Request.prototype.crossDomainError = function () { 32715 var err = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.'); 32716 err.crossDomain = true; 32717 err.status = this.status; 32718 err.method = this.method; 32719 err.url = this.url; 32720 this.callback(err); 32721}; // This only warns, because the request is still likely to work 32722 32723 32724Request.prototype.agent = function () { 32725 console.warn('This is not supported in browser version of superagent'); 32726 return this; 32727}; 32728 32729Request.prototype.ca = Request.prototype.agent; 32730Request.prototype.buffer = Request.prototype.ca; // This throws, because it can't send/receive data as expected 32731 32732Request.prototype.write = function () { 32733 throw new Error('Streaming is not supported in browser version of superagent'); 32734}; 32735 32736Request.prototype.pipe = Request.prototype.write; 32737/** 32738 * Check if `obj` is a host object, 32739 * we don't want to serialize these :) 32740 * 32741 * @param {Object} obj host object 32742 * @return {Boolean} is a host object 32743 * @api private 32744 */ 32745 32746Request.prototype._isHost = function (obj) { 32747 // Native objects stringify to [object File], [object Blob], [object FormData], etc. 32748 return obj && _typeof(obj) === 'object' && !Array.isArray(obj) && Object.prototype.toString.call(obj) !== '[object Object]'; 32749}; 32750/** 32751 * Initiate request, invoking callback `fn(res)` 32752 * with an instanceof `Response`. 32753 * 32754 * @param {Function} fn 32755 * @return {Request} for chaining 32756 * @api public 32757 */ 32758 32759 32760Request.prototype.end = function (fn) { 32761 if (this._endCalled) { 32762 console.warn('Warning: .end() was called twice. This is not supported in superagent'); 32763 } 32764 32765 this._endCalled = true; // store callback 32766 32767 this._callback = fn || noop; // querystring 32768 32769 this._finalizeQueryString(); 32770 32771 this._end(); 32772}; 32773 32774Request.prototype._setUploadTimeout = function () { 32775 var self = this; // upload timeout it's wokrs only if deadline timeout is off 32776 32777 if (this._uploadTimeout && !this._uploadTimeoutTimer) { 32778 this._uploadTimeoutTimer = setTimeout(function () { 32779 self._timeoutError('Upload timeout of ', self._uploadTimeout, 'ETIMEDOUT'); 32780 }, this._uploadTimeout); 32781 } 32782}; // eslint-disable-next-line complexity 32783 32784 32785Request.prototype._end = function () { 32786 if (this._aborted) return this.callback(new Error('The request has been aborted even before .end() was called')); 32787 var self = this; 32788 this.xhr = request.getXHR(); 32789 var xhr = this.xhr; 32790 var data = this._formData || this._data; 32791 32792 this._setTimeouts(); // state change 32793 32794 32795 xhr.onreadystatechange = function () { 32796 var readyState = xhr.readyState; 32797 32798 if (readyState >= 2 && self._responseTimeoutTimer) { 32799 clearTimeout(self._responseTimeoutTimer); 32800 } 32801 32802 if (readyState !== 4) { 32803 return; 32804 } // In IE9, reads to any property (e.g. status) off of an aborted XHR will 32805 // result in the error "Could not complete the operation due to error c00c023f" 32806 32807 32808 var status; 32809 32810 try { 32811 status = xhr.status; 32812 } catch (_unused5) { 32813 status = 0; 32814 } 32815 32816 if (!status) { 32817 if (self.timedout || self._aborted) return; 32818 return self.crossDomainError(); 32819 } 32820 32821 self.emit('end'); 32822 }; // progress 32823 32824 32825 var handleProgress = function handleProgress(direction, e) { 32826 if (e.total > 0) { 32827 e.percent = e.loaded / e.total * 100; 32828 32829 if (e.percent === 100) { 32830 clearTimeout(self._uploadTimeoutTimer); 32831 } 32832 } 32833 32834 e.direction = direction; 32835 self.emit('progress', e); 32836 }; 32837 32838 if (this.hasListeners('progress')) { 32839 try { 32840 xhr.addEventListener('progress', handleProgress.bind(null, 'download')); 32841 32842 if (xhr.upload) { 32843 xhr.upload.addEventListener('progress', handleProgress.bind(null, 'upload')); 32844 } 32845 } catch (_unused6) {// Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist. 32846 // Reported here: 32847 // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context 32848 } 32849 } 32850 32851 if (xhr.upload) { 32852 this._setUploadTimeout(); 32853 } // initiate request 32854 32855 32856 try { 32857 if (this.username && this.password) { 32858 xhr.open(this.method, this.url, true, this.username, this.password); 32859 } else { 32860 xhr.open(this.method, this.url, true); 32861 } 32862 } catch (err) { 32863 // see #1149 32864 return this.callback(err); 32865 } // CORS 32866 32867 32868 if (this._withCredentials) xhr.withCredentials = true; // body 32869 32870 if (!this._formData && this.method !== 'GET' && this.method !== 'HEAD' && typeof data !== 'string' && !this._isHost(data)) { 32871 // serialize stuff 32872 var contentType = this._header['content-type']; 32873 32874 var _serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : '']; 32875 32876 if (!_serialize && isJSON(contentType)) { 32877 _serialize = request.serialize['application/json']; 32878 } 32879 32880 if (_serialize) data = _serialize(data); 32881 } // set header fields 32882 32883 32884 for (var field in this.header) { 32885 if (this.header[field] === null) continue; 32886 if (Object.prototype.hasOwnProperty.call(this.header, field)) xhr.setRequestHeader(field, this.header[field]); 32887 } 32888 32889 if (this._responseType) { 32890 xhr.responseType = this._responseType; 32891 } // send stuff 32892 32893 32894 this.emit('request', this); // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing) 32895 // We need null here if data is undefined 32896 32897 xhr.send(typeof data === 'undefined' ? null : data); 32898}; 32899 32900request.agent = function () { 32901 return new Agent(); 32902}; 32903 32904['GET', 'POST', 'OPTIONS', 'PATCH', 'PUT', 'DELETE'].forEach(function (method) { 32905 Agent.prototype[method.toLowerCase()] = function (url, fn) { 32906 var req = new request.Request(method, url); 32907 32908 this._setDefaults(req); 32909 32910 if (fn) { 32911 req.end(fn); 32912 } 32913 32914 return req; 32915 }; 32916}); 32917Agent.prototype.del = Agent.prototype.delete; 32918/** 32919 * GET `url` with optional callback `fn(res)`. 32920 * 32921 * @param {String} url 32922 * @param {Mixed|Function} [data] or fn 32923 * @param {Function} [fn] 32924 * @return {Request} 32925 * @api public 32926 */ 32927 32928request.get = function (url, data, fn) { 32929 var req = request('GET', url); 32930 32931 if (typeof data === 'function') { 32932 fn = data; 32933 data = null; 32934 } 32935 32936 if (data) req.query(data); 32937 if (fn) req.end(fn); 32938 return req; 32939}; 32940/** 32941 * HEAD `url` with optional callback `fn(res)`. 32942 * 32943 * @param {String} url 32944 * @param {Mixed|Function} [data] or fn 32945 * @param {Function} [fn] 32946 * @return {Request} 32947 * @api public 32948 */ 32949 32950 32951request.head = function (url, data, fn) { 32952 var req = request('HEAD', url); 32953 32954 if (typeof data === 'function') { 32955 fn = data; 32956 data = null; 32957 } 32958 32959 if (data) req.query(data); 32960 if (fn) req.end(fn); 32961 return req; 32962}; 32963/** 32964 * OPTIONS query to `url` with optional callback `fn(res)`. 32965 * 32966 * @param {String} url 32967 * @param {Mixed|Function} [data] or fn 32968 * @param {Function} [fn] 32969 * @return {Request} 32970 * @api public 32971 */ 32972 32973 32974request.options = function (url, data, fn) { 32975 var req = request('OPTIONS', url); 32976 32977 if (typeof data === 'function') { 32978 fn = data; 32979 data = null; 32980 } 32981 32982 if (data) req.send(data); 32983 if (fn) req.end(fn); 32984 return req; 32985}; 32986/** 32987 * DELETE `url` with optional `data` and callback `fn(res)`. 32988 * 32989 * @param {String} url 32990 * @param {Mixed} [data] 32991 * @param {Function} [fn] 32992 * @return {Request} 32993 * @api public 32994 */ 32995 32996 32997function del(url, data, fn) { 32998 var req = request('DELETE', url); 32999 33000 if (typeof data === 'function') { 33001 fn = data; 33002 data = null; 33003 } 33004 33005 if (data) req.send(data); 33006 if (fn) req.end(fn); 33007 return req; 33008} 33009 33010request.del = del; 33011request.delete = del; 33012/** 33013 * PATCH `url` with optional `data` and callback `fn(res)`. 33014 * 33015 * @param {String} url 33016 * @param {Mixed} [data] 33017 * @param {Function} [fn] 33018 * @return {Request} 33019 * @api public 33020 */ 33021 33022request.patch = function (url, data, fn) { 33023 var req = request('PATCH', url); 33024 33025 if (typeof data === 'function') { 33026 fn = data; 33027 data = null; 33028 } 33029 33030 if (data) req.send(data); 33031 if (fn) req.end(fn); 33032 return req; 33033}; 33034/** 33035 * POST `url` with optional `data` and callback `fn(res)`. 33036 * 33037 * @param {String} url 33038 * @param {Mixed} [data] 33039 * @param {Function} [fn] 33040 * @return {Request} 33041 * @api public 33042 */ 33043 33044 33045request.post = function (url, data, fn) { 33046 var req = request('POST', url); 33047 33048 if (typeof data === 'function') { 33049 fn = data; 33050 data = null; 33051 } 33052 33053 if (data) req.send(data); 33054 if (fn) req.end(fn); 33055 return req; 33056}; 33057/** 33058 * PUT `url` with optional `data` and callback `fn(res)`. 33059 * 33060 * @param {String} url 33061 * @param {Mixed|Function} [data] or fn 33062 * @param {Function} [fn] 33063 * @return {Request} 33064 * @api public 33065 */ 33066 33067 33068request.put = function (url, data, fn) { 33069 var req = request('PUT', url); 33070 33071 if (typeof data === 'function') { 33072 fn = data; 33073 data = null; 33074 } 33075 33076 if (data) req.send(data); 33077 if (fn) req.end(fn); 33078 return req; 33079}; 33080
vendor: 11,541 bytes, lines 33081-33567
33081},{"./agent-base":235,"./is-object":237,"./request-base":238,"./response-base":239,"component-emitter":169,"fast-safe-stringify":170}],237:[function(require,module,exports){ 33082"use strict"; 33083 33084function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 33085 33086/** 33087 * Check if `obj` is an object. 33088 * 33089 * @param {Object} obj 33090 * @return {Boolean} 33091 * @api private 33092 */ 33093function isObject(obj) { 33094 return obj !== null && _typeof(obj) === 'object'; 33095} 33096 33097module.exports = isObject; 33098 33099},{}],238:[function(require,module,exports){ 33100"use strict"; 33101 33102function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 33103 33104/** 33105 * Module of mixed-in functions shared between node and client code 33106 */ 33107var isObject = require('./is-object'); 33108/** 33109 * Expose `RequestBase`. 33110 */ 33111 33112 33113module.exports = RequestBase; 33114/** 33115 * Initialize a new `RequestBase`. 33116 * 33117 * @api public 33118 */ 33119 33120function RequestBase(obj) { 33121 if (obj) return mixin(obj); 33122} 33123/** 33124 * Mixin the prototype properties. 33125 * 33126 * @param {Object} obj 33127 * @return {Object} 33128 * @api private 33129 */ 33130 33131 33132function mixin(obj) { 33133 for (var key in RequestBase.prototype) { 33134 if (Object.prototype.hasOwnProperty.call(RequestBase.prototype, key)) obj[key] = RequestBase.prototype[key]; 33135 } 33136 33137 return obj; 33138} 33139/** 33140 * Clear previous timeout. 33141 * 33142 * @return {Request} for chaining 33143 * @api public 33144 */ 33145 33146 33147RequestBase.prototype.clearTimeout = function () { 33148 clearTimeout(this._timer); 33149 clearTimeout(this._responseTimeoutTimer); 33150 clearTimeout(this._uploadTimeoutTimer); 33151 delete this._timer; 33152 delete this._responseTimeoutTimer; 33153 delete this._uploadTimeoutTimer; 33154 return this; 33155}; 33156/** 33157 * Override default response body parser 33158 * 33159 * This function will be called to convert incoming data into request.body 33160 * 33161 * @param {Function} 33162 * @api public 33163 */ 33164 33165 33166RequestBase.prototype.parse = function (fn) { 33167 this._parser = fn; 33168 return this; 33169}; 33170/** 33171 * Set format of binary response body. 33172 * In browser valid formats are 'blob' and 'arraybuffer', 33173 * which return Blob and ArrayBuffer, respectively. 33174 * 33175 * In Node all values result in Buffer. 33176 * 33177 * Examples: 33178 * 33179 * req.get('/') 33180 * .responseType('blob') 33181 * .end(callback); 33182 * 33183 * @param {String} val 33184 * @return {Request} for chaining 33185 * @api public 33186 */ 33187 33188 33189RequestBase.prototype.responseType = function (val) { 33190 this._responseType = val; 33191 return this; 33192}; 33193/** 33194 * Override default request body serializer 33195 * 33196 * This function will be called to convert data set via .send or .attach into payload to send 33197 * 33198 * @param {Function} 33199 * @api public 33200 */ 33201 33202 33203RequestBase.prototype.serialize = function (fn) { 33204 this._serializer = fn; 33205 return this; 33206}; 33207/** 33208 * Set timeouts. 33209 * 33210 * - response timeout is time between sending request and receiving the first byte of the response. Includes DNS and connection time. 33211 * - deadline is the time from start of the request to receiving response body in full. If the deadline is too short large files may not load at all on slow connections. 33212 * - upload is the time since last bit of data was sent or received. This timeout works only if deadline timeout is off 33213 * 33214 * Value of 0 or false means no timeout. 33215 * 33216 * @param {Number|Object} ms or {response, deadline} 33217 * @return {Request} for chaining 33218 * @api public 33219 */ 33220 33221 33222RequestBase.prototype.timeout = function (options) { 33223 if (!options || _typeof(options) !== 'object') { 33224 this._timeout = options; 33225 this._responseTimeout = 0; 33226 this._uploadTimeout = 0; 33227 return this; 33228 } 33229 33230 for (var option in options) { 33231 if (Object.prototype.hasOwnProperty.call(options, option)) { 33232 switch (option) { 33233 case 'deadline': 33234 this._timeout = options.deadline; 33235 break; 33236 33237 case 'response': 33238 this._responseTimeout = options.response; 33239 break; 33240 33241 case 'upload': 33242 this._uploadTimeout = options.upload; 33243 break; 33244 33245 default: 33246 console.warn('Unknown timeout option', option); 33247 } 33248 } 33249 } 33250 33251 return this; 33252}; 33253/** 33254 * Set number of retry attempts on error. 33255 * 33256 * Failed requests will be retried 'count' times if timeout or err.code >= 500. 33257 * 33258 * @param {Number} count 33259 * @param {Function} [fn] 33260 * @return {Request} for chaining 33261 * @api public 33262 */ 33263 33264 33265RequestBase.prototype.retry = function (count, fn) { 33266 // Default to 1 if no count passed or true 33267 if (arguments.length === 0 || count === true) count = 1; 33268 if (count <= 0) count = 0; 33269 this._maxRetries = count; 33270 this._retries = 0; 33271 this._retryCallback = fn; 33272 return this; 33273}; 33274 33275var ERROR_CODES = ['ECONNRESET', 'ETIMEDOUT', 'EADDRINFO', 'ESOCKETTIMEDOUT']; 33276/** 33277 * Determine if a request should be retried. 33278 * (Borrowed from segmentio/superagent-retry) 33279 * 33280 * @param {Error} err an error 33281 * @param {Response} [res] response 33282 * @returns {Boolean} if segment should be retried 33283 */ 33284 33285RequestBase.prototype._shouldRetry = function (err, res) { 33286 if (!this._maxRetries || this._retries++ >= this._maxRetries) { 33287 return false; 33288 } 33289 33290 if (this._retryCallback) { 33291 try { 33292 var override = this._retryCallback(err, res); 33293 33294 if (override === true) return true; 33295 if (override === false) return false; // undefined falls back to defaults 33296 } catch (err_) { 33297 console.error(err_); 33298 } 33299 } 33300 33301 if (res && res.status && res.status >= 500 && res.status !== 501) return true; 33302 33303 if (err) { 33304 if (err.code && ERROR_CODES.includes(err.code)) return true; // Superagent timeout 33305 33306 if (err.timeout && err.code === 'ECONNABORTED') return true; 33307 if (err.crossDomain) return true; 33308 } 33309 33310 return false; 33311}; 33312/** 33313 * Retry request 33314 * 33315 * @return {Request} for chaining 33316 * @api private 33317 */ 33318 33319 33320RequestBase.prototype._retry = function () { 33321 this.clearTimeout(); // node 33322 33323 if (this.req) { 33324 this.req = null; 33325 this.req = this.request(); 33326 } 33327 33328 this._aborted = false; 33329 this.timedout = false; 33330 this.timedoutError = null; 33331 return this._end(); 33332}; 33333/** 33334 * Promise support 33335 * 33336 * @param {Function} resolve 33337 * @param {Function} [reject] 33338 * @return {Request} 33339 */ 33340 33341 33342RequestBase.prototype.then = function (resolve, reject) { 33343 var _this = this; 33344 33345 if (!this._fullfilledPromise) { 33346 var self = this; 33347 33348 if (this._endCalled) { 33349 console.warn('Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises'); 33350 } 33351 33352 this._fullfilledPromise = new Promise(function (resolve, reject) { 33353 self.on('abort', function () { 33354 if (_this._maxRetries && _this._maxRetries > _this._retries) { 33355 return; 33356 } 33357 33358 if (_this.timedout && _this.timedoutError) { 33359 reject(_this.timedoutError); 33360 return; 33361 } 33362 33363 var err = new Error('Aborted'); 33364 err.code = 'ABORTED'; 33365 err.status = _this.status; 33366 err.method = _this.method; 33367 err.url = _this.url; 33368 reject(err); 33369 }); 33370 self.end(function (err, res) { 33371 if (err) reject(err);else resolve(res); 33372 }); 33373 }); 33374 } 33375 33376 return this._fullfilledPromise.then(resolve, reject); 33377}; 33378 33379RequestBase.prototype.catch = function (cb) { 33380 return this.then(undefined, cb); 33381}; 33382/** 33383 * Allow for extension 33384 */ 33385 33386 33387RequestBase.prototype.use = function (fn) { 33388 fn(this); 33389 return this; 33390}; 33391 33392RequestBase.prototype.ok = function (cb) { 33393 if (typeof cb !== 'function') throw new Error('Callback required'); 33394 this._okCallback = cb; 33395 return this; 33396}; 33397 33398RequestBase.prototype._isResponseOK = function (res) { 33399 if (!res) { 33400 return false; 33401 } 33402 33403 if (this._okCallback) { 33404 return this._okCallback(res); 33405 } 33406 33407 return res.status >= 200 && res.status < 300; 33408}; 33409/** 33410 * Get request header `field`. 33411 * Case-insensitive. 33412 * 33413 * @param {String} field 33414 * @return {String} 33415 * @api public 33416 */ 33417 33418 33419RequestBase.prototype.get = function (field) { 33420 return this._header[field.toLowerCase()]; 33421}; 33422/** 33423 * Get case-insensitive header `field` value. 33424 * This is a deprecated internal API. Use `.get(field)` instead. 33425 * 33426 * (getHeader is no longer used internally by the superagent code base) 33427 * 33428 * @param {String} field 33429 * @return {String} 33430 * @api private 33431 * @deprecated 33432 */ 33433 33434 33435RequestBase.prototype.getHeader = RequestBase.prototype.get; 33436/** 33437 * Set header `field` to `val`, or multiple fields with one object. 33438 * Case-insensitive. 33439 * 33440 * Examples: 33441 * 33442 * req.get('/') 33443 * .set('Accept', 'application/json') 33444 * .set('X-API-Key', 'foobar') 33445 * .end(callback); 33446 * 33447 * req.get('/') 33448 * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' }) 33449 * .end(callback); 33450 * 33451 * @param {String|Object} field 33452 * @param {String} val 33453 * @return {Request} for chaining 33454 * @api public 33455 */ 33456 33457RequestBase.prototype.set = function (field, val) { 33458 if (isObject(field)) { 33459 for (var key in field) { 33460 if (Object.prototype.hasOwnProperty.call(field, key)) this.set(key, field[key]); 33461 } 33462 33463 return this; 33464 } 33465 33466 this._header[field.toLowerCase()] = val; 33467 this.header[field] = val; 33468 return this; 33469}; 33470/** 33471 * Remove header `field`. 33472 * Case-insensitive. 33473 * 33474 * Example: 33475 * 33476 * req.get('/') 33477 * .unset('User-Agent') 33478 * .end(callback); 33479 * 33480 * @param {String} field field name 33481 */ 33482 33483 33484RequestBase.prototype.unset = function (field) { 33485 delete this._header[field.toLowerCase()]; 33486 delete this.header[field]; 33487 return this; 33488}; 33489/** 33490 * Write the field `name` and `val`, or multiple fields with one object 33491 * for "multipart/form-data" request bodies. 33492 * 33493 * ``` js 33494 * request.post('/upload') 33495 * .field('foo', 'bar') 33496 * .end(callback); 33497 * 33498 * request.post('/upload') 33499 * .field({ foo: 'bar', baz: 'qux' }) 33500 * .end(callback); 33501 * ``` 33502 * 33503 * @param {String|Object} name name of field 33504 * @param {String|Blob|File|Buffer|fs.ReadStream} val value of field 33505 * @return {Request} for chaining 33506 * @api public 33507 */ 33508 33509 33510RequestBase.prototype.field = function (name, val) { 33511 // name should be either a string or an object. 33512 if (name === null || undefined === name) { 33513 throw new Error('.field(name, val) name can not be empty'); 33514 } 33515 33516 if (this._data) { 33517 throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"); 33518 } 33519 33520 if (isObject(name)) { 33521 for (var key in name) { 33522 if (Object.prototype.hasOwnProperty.call(name, key)) this.field(key, name[key]); 33523 } 33524 33525 return this; 33526 } 33527 33528 if (Array.isArray(val)) { 33529 for (var i in val) { 33530 if (Object.prototype.hasOwnProperty.call(val, i)) this.field(name, val[i]); 33531 } 33532 33533 return this; 33534 } // val should be defined now 33535 33536 33537 if (val === null || undefined === val) { 33538 throw new Error('.field(name, val) val can not be empty'); 33539 } 33540 33541 if (typeof val === 'boolean') { 33542 val = String(val); 33543 } 33544 33545 this._getFormData().append(name, val); 33546 33547 return this; 33548}; 33549/** 33550 * Abort the request, and clear potential timeout. 33551 * 33552 * @return {Request} request 33553 * @api public 33554 */ 33555 33556 33557RequestBase.prototype.abort = function () { 33558 if (this._aborted) { 33559 return this; 33560 } 33561 33562 this._aborted = true; 33563 if (this.xhr) this.xhr.abort(); // browser 33564 33565 if (this.req) this.req.abort(); // node 33566 33567 this.clearTimeout();
vendor: 8,815 bytes, lines 33568-33950
33568 this.emit('abort'); 33569 return this; 33570}; 33571 33572RequestBase.prototype._auth = function (user, pass, options, base64Encoder) { 33573 switch (options.type) { 33574 case 'basic': 33575 this.set('Authorization', "Basic ".concat(base64Encoder("".concat(user, ":").concat(pass)))); 33576 break; 33577 33578 case 'auto': 33579 this.username = user; 33580 this.password = pass; 33581 break; 33582 33583 case 'bearer': 33584 // usage would be .auth(accessToken, { type: 'bearer' }) 33585 this.set('Authorization', "Bearer ".concat(user)); 33586 break; 33587 33588 default: 33589 break; 33590 } 33591 33592 return this; 33593}; 33594/** 33595 * Enable transmission of cookies with x-domain requests. 33596 * 33597 * Note that for this to work the origin must not be 33598 * using "Access-Control-Allow-Origin" with a wildcard, 33599 * and also must set "Access-Control-Allow-Credentials" 33600 * to "true". 33601 * 33602 * @api public 33603 */ 33604 33605 33606RequestBase.prototype.withCredentials = function (on) { 33607 // This is browser-only functionality. Node side is no-op. 33608 if (on === undefined) on = true; 33609 this._withCredentials = on; 33610 return this; 33611}; 33612/** 33613 * Set the max redirects to `n`. Does nothing in browser XHR implementation. 33614 * 33615 * @param {Number} n 33616 * @return {Request} for chaining 33617 * @api public 33618 */ 33619 33620 33621RequestBase.prototype.redirects = function (n) { 33622 this._maxRedirects = n; 33623 return this; 33624}; 33625/** 33626 * Maximum size of buffered response body, in bytes. Counts uncompressed size. 33627 * Default 200MB. 33628 * 33629 * @param {Number} n number of bytes 33630 * @return {Request} for chaining 33631 */ 33632 33633 33634RequestBase.prototype.maxResponseSize = function (n) { 33635 if (typeof n !== 'number') { 33636 throw new TypeError('Invalid argument'); 33637 } 33638 33639 this._maxResponseSize = n; 33640 return this; 33641}; 33642/** 33643 * Convert to a plain javascript object (not JSON string) of scalar properties. 33644 * Note as this method is designed to return a useful non-this value, 33645 * it cannot be chained. 33646 * 33647 * @return {Object} describing method, url, and data of this request 33648 * @api public 33649 */ 33650 33651 33652RequestBase.prototype.toJSON = function () { 33653 return { 33654 method: this.method, 33655 url: this.url, 33656 data: this._data, 33657 headers: this._header 33658 }; 33659}; 33660/** 33661 * Send `data` as the request body, defaulting the `.type()` to "json" when 33662 * an object is given. 33663 * 33664 * Examples: 33665 * 33666 * // manual json 33667 * request.post('/user') 33668 * .type('json') 33669 * .send('{"name":"tj"}') 33670 * .end(callback) 33671 * 33672 * // auto json 33673 * request.post('/user') 33674 * .send({ name: 'tj' }) 33675 * .end(callback) 33676 * 33677 * // manual x-www-form-urlencoded 33678 * request.post('/user') 33679 * .type('form') 33680 * .send('name=tj') 33681 * .end(callback) 33682 * 33683 * // auto x-www-form-urlencoded 33684 * request.post('/user') 33685 * .type('form') 33686 * .send({ name: 'tj' }) 33687 * .end(callback) 33688 * 33689 * // defaults to x-www-form-urlencoded 33690 * request.post('/user') 33691 * .send('name=tobi') 33692 * .send('species=ferret') 33693 * .end(callback) 33694 * 33695 * @param {String|Object} data 33696 * @return {Request} for chaining 33697 * @api public 33698 */ 33699// eslint-disable-next-line complexity 33700 33701 33702RequestBase.prototype.send = function (data) { 33703 var isObj = isObject(data); 33704 var type = this._header['content-type']; 33705 33706 if (this._formData) { 33707 throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"); 33708 } 33709 33710 if (isObj && !this._data) { 33711 if (Array.isArray(data)) { 33712 this._data = []; 33713 } else if (!this._isHost(data)) { 33714 this._data = {}; 33715 } 33716 } else if (data && this._data && this._isHost(this._data)) { 33717 throw new Error("Can't merge these send calls"); 33718 } // merge 33719 33720 33721 if (isObj && isObject(this._data)) { 33722 for (var key in data) { 33723 if (Object.prototype.hasOwnProperty.call(data, key)) this._data[key] = data[key]; 33724 } 33725 } else if (typeof data === 'string') { 33726 // default to x-www-form-urlencoded 33727 if (!type) this.type('form'); 33728 type = this._header['content-type']; 33729 33730 if (type === 'application/x-www-form-urlencoded') { 33731 this._data = this._data ? "".concat(this._data, "&").concat(data) : data; 33732 } else { 33733 this._data = (this._data || '') + data; 33734 } 33735 } else { 33736 this._data = data; 33737 } 33738 33739 if (!isObj || this._isHost(data)) { 33740 return this; 33741 } // default to json 33742 33743 33744 if (!type) this.type('json'); 33745 return this; 33746}; 33747/** 33748 * Sort `querystring` by the sort function 33749 * 33750 * 33751 * Examples: 33752 * 33753 * // default order 33754 * request.get('/user') 33755 * .query('name=Nick') 33756 * .query('search=Manny') 33757 * .sortQuery() 33758 * .end(callback) 33759 * 33760 * // customized sort function 33761 * request.get('/user') 33762 * .query('name=Nick') 33763 * .query('search=Manny') 33764 * .sortQuery(function(a, b){ 33765 * return a.length - b.length; 33766 * }) 33767 * .end(callback) 33768 * 33769 * 33770 * @param {Function} sort 33771 * @return {Request} for chaining 33772 * @api public 33773 */ 33774 33775 33776RequestBase.prototype.sortQuery = function (sort) { 33777 // _sort default to true but otherwise can be a function or boolean 33778 this._sort = typeof sort === 'undefined' ? true : sort; 33779 return this; 33780}; 33781/** 33782 * Compose querystring to append to req.url 33783 * 33784 * @api private 33785 */ 33786 33787 33788RequestBase.prototype._finalizeQueryString = function () { 33789 var query = this._query.join('&'); 33790 33791 if (query) { 33792 this.url += (this.url.includes('?') ? '&' : '?') + query; 33793 } 33794 33795 this._query.length = 0; // Makes the call idempotent 33796 33797 if (this._sort) { 33798 var index = this.url.indexOf('?'); 33799 33800 if (index >= 0) { 33801 var queryArr = this.url.slice(index + 1).split('&'); 33802 33803 if (typeof this._sort === 'function') { 33804 queryArr.sort(this._sort); 33805 } else { 33806 queryArr.sort(); 33807 } 33808 33809 this.url = this.url.slice(0, index) + '?' + queryArr.join('&'); 33810 } 33811 } 33812}; // For backwards compat only 33813 33814 33815RequestBase.prototype._appendQueryString = function () { 33816 console.warn('Unsupported'); 33817}; 33818/** 33819 * Invoke callback with timeout error. 33820 * 33821 * @api private 33822 */ 33823 33824 33825RequestBase.prototype._timeoutError = function (reason, timeout, errno) { 33826 if (this._aborted) { 33827 return; 33828 } 33829 33830 var err = new Error("".concat(reason + timeout, "ms exceeded")); 33831 err.timeout = timeout; 33832 err.code = 'ECONNABORTED'; 33833 err.errno = errno; 33834 this.timedout = true; 33835 this.timedoutError = err; 33836 this.abort(); 33837 this.callback(err); 33838}; 33839 33840RequestBase.prototype._setTimeouts = function () { 33841 var self = this; // deadline 33842 33843 if (this._timeout && !this._timer) { 33844 this._timer = setTimeout(function () { 33845 self._timeoutError('Timeout of ', self._timeout, 'ETIME'); 33846 }, this._timeout); 33847 } // response timeout 33848 33849 33850 if (this._responseTimeout && !this._responseTimeoutTimer) { 33851 this._responseTimeoutTimer = setTimeout(function () { 33852 self._timeoutError('Response timeout of ', self._responseTimeout, 'ETIMEDOUT'); 33853 }, this._responseTimeout); 33854 } 33855}; 33856 33857},{"./is-object":237}],239:[function(require,module,exports){ 33858"use strict"; 33859 33860/** 33861 * Module dependencies. 33862 */ 33863var utils = require('./utils'); 33864/** 33865 * Expose `ResponseBase`. 33866 */ 33867 33868 33869module.exports = ResponseBase; 33870/** 33871 * Initialize a new `ResponseBase`. 33872 * 33873 * @api public 33874 */ 33875 33876function ResponseBase(obj) { 33877 if (obj) return mixin(obj); 33878} 33879/** 33880 * Mixin the prototype properties. 33881 * 33882 * @param {Object} obj 33883 * @return {Object} 33884 * @api private 33885 */ 33886 33887 33888function mixin(obj) { 33889 for (var key in ResponseBase.prototype) { 33890 if (Object.prototype.hasOwnProperty.call(ResponseBase.prototype, key)) obj[key] = ResponseBase.prototype[key]; 33891 } 33892 33893 return obj; 33894} 33895/** 33896 * Get case-insensitive `field` value. 33897 * 33898 * @param {String} field 33899 * @return {String} 33900 * @api public 33901 */ 33902 33903 33904ResponseBase.prototype.get = function (field) { 33905 return this.header[field.toLowerCase()]; 33906}; 33907/** 33908 * Set header related properties: 33909 * 33910 * - `.type` the content type without params 33911 * 33912 * A response of "Content-Type: text/plain; charset=utf-8" 33913 * will provide you with a `.type` of "text/plain". 33914 * 33915 * @param {Object} header 33916 * @api private 33917 */ 33918 33919 33920ResponseBase.prototype._setHeaderProperties = function (header) { 33921 // TODO: moar! 33922 // TODO: make this a util 33923 // content-type 33924 var ct = header['content-type'] || ''; 33925 this.type = utils.type(ct); // params 33926 33927 var params = utils.params(ct); 33928 33929 for (var key in params) { 33930 if (Object.prototype.hasOwnProperty.call(params, key)) this[key] = params[key]; 33931 } 33932 33933 this.links = {}; // links 33934 33935 try { 33936 if (header.link) { 33937 this.links = utils.parseLinks(header.link); 33938 } 33939 } catch (_unused) {// ignore 33940 } 33941}; 33942/** 33943 * Set flags such as `.ok` based on `status`. 33944 * 33945 * For example a 2xx response will give you a `.ok` of __true__ 33946 * whereas 5xx will be __false__ and `.error` will be __true__. The 33947 * `.clientError` and `.serverError` are also available to be more 33948 * specific, and `.statusType` is the class of error ranging from 1..5 33949 * sometimes useful for mapping respond colors etc. 33950 *
33951 * "sugar" properties are also defined for common cases. Currently providing: 33952 * 33953 * - .noContent 33954 * - .badRequest 33955 * - .unauthorized 33956 * - .notAcceptable 33957 * - .notFound 33958 * 33959 * @param {Number} status 33960 * @api private 33961 */ 33962 33963 33964ResponseBase.prototype._setStatusProperties = function (status) { 33965 var type = status / 100 | 0; // status / class 33966 33967 this.statusCode = status; 33968 this.status = this.statusCode; 33969 this.statusType = type; // basics 33970 33971 this.info = type === 1; 33972 this.ok = type === 2; 33973 this.redirect = type === 3; 33974 this.clientError = type === 4; 33975 this.serverError = type === 5; 33976 this.error = type === 4 || type === 5 ? this.toError() : false; // sugar 33977 33978 this.created = status === 201; 33979 this.accepted = status === 202; 33980 this.noContent = status === 204; 33981 this.badRequest = status === 400; 33982 this.unauthorized = status === 401; 33983 this.notAcceptable = status === 406; 33984 this.forbidden = status === 403; 33985 this.notFound = status === 404; 33986 this.unprocessableEntity = status === 422; 33987}; 33988 33989},{"./utils":240}],240:[function(require,module,exports){ 33990"use strict"; 33991 33992/** 33993 * Return the mime type for the given `str`. 33994 * 33995 * @param {String} str 33996 * @return {String} 33997 * @api private 33998 */ 33999exports.type = function (str) { 34000 return str.split(/ *; */).shift(); 34001}; 34002/** 34003 * Return header field parameters. 34004 * 34005 * @param {String} str 34006 * @return {Object} 34007 * @api private 34008 */ 34009 34010 34011exports.params = function (str) { 34012 return str.split(/ *; */).reduce(function (obj, str) { 34013 var parts = str.split(/ *= */); 34014 var key = parts.shift(); 34015 var val = parts.shift(); 34016 if (key && val) obj[key] = val; 34017 return obj; 34018 }, {}); 34019}; 34020/** 34021 * Parse Link header fields. 34022 * 34023 * @param {String} str 34024 * @return {Object} 34025 * @api private 34026 */ 34027 34028 34029exports.parseLinks = function (str) { 34030 return str.split(/ *, */).reduce(function (obj, str) { 34031 var parts = str.split(/ *; */); 34032 var url = parts[0].slice(1, -1); 34033 var rel = parts[1].split(/ *= */)[1].slice(1, -1); 34034 obj[rel] = url; 34035 return obj; 34036 }, {}); 34037}; 34038/** 34039 * Strip content related fields from `header`. 34040 * 34041 * @param {Object} header 34042 * @return {Object} header 34043 * @api private 34044 */ 34045 34046 34047exports.cleanHeader = function (header, changesOrigin) { 34048 delete header['content-type']; 34049 delete header['content-length']; 34050 delete header['transfer-encoding']; 34051 delete header.host; // secuirty 34052 34053 if (changesOrigin) { 34054 delete header.authorization; 34055 delete header.cookie; 34056 } 34057 34058 return header; 34059}; 34060 34061},{}],241:[function(require,module,exports){ 34062(function (global
vendor: 6,727 bytes, lines 34062-34290
34062){ 34063'use strict'; 34064 34065var required = require('requires-port') 34066 , qs = require('querystringify') 34067 , controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/ 34068 , CRHTLF = /[\n\r\t]/g 34069 , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\// 34070 , port = /:\d+$/ 34071 , protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i 34072 , windowsDriveLetter = /^[a-zA-Z]:/; 34073 34074/** 34075 * Remove control characters and whitespace from the beginning of a string. 34076 * 34077 * @param {Object|String} str String to trim. 34078 * @returns {String} A new string representing `str` stripped of control 34079 * characters and whitespace from its beginning. 34080 * @public 34081 */ 34082function trimLeft(str) { 34083 return (str ? str : '').toString().replace(controlOrWhitespace, ''); 34084} 34085 34086/** 34087 * These are the parse rules for the URL parser, it informs the parser 34088 * about: 34089 * 34090 * 0. The char it Needs to parse, if it's a string it should be done using 34091 * indexOf, RegExp using exec and NaN means set as current value. 34092 * 1. The property we should set when parsing this value. 34093 * 2. Indication if it's backwards or forward parsing, when set as number it's 34094 * the value of extra chars that should be split off. 34095 * 3. Inherit from location if non existing in the parser. 34096 * 4. `toLowerCase` the resulting value. 34097 */ 34098var rules = [ 34099 ['#', 'hash'], // Extract from the back. 34100 ['?', 'query'], // Extract from the back. 34101 function sanitize(address, url) { // Sanitize what is left of the address 34102 return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address; 34103 }, 34104 ['/', 'pathname'], // Extract from the back. 34105 ['@', 'auth', 1], // Extract from the front. 34106 [NaN, 'host', undefined, 1, 1], // Set left over value. 34107 [/:(\d*)$/, 'port', undefined, 1], // RegExp the back. 34108 [NaN, 'hostname', undefined, 1, 1] // Set left over. 34109]; 34110 34111/** 34112 * These properties should not be copied or inherited from. This is only needed 34113 * for all non blob URL's as a blob URL does not include a hash, only the 34114 * origin. 34115 * 34116 * @type {Object} 34117 * @private 34118 */ 34119var ignore = { hash: 1, query: 1 }; 34120 34121/** 34122 * The location object differs when your code is loaded through a normal page, 34123 * Worker or through a worker using a blob. And with the blobble begins the 34124 * trouble as the location object will contain the URL of the blob, not the 34125 * location of the page where our code is loaded in. The actual origin is 34126 * encoded in the `pathname` so we can thankfully generate a good "default" 34127 * location from it so we can generate proper relative URL's again. 34128 * 34129 * @param {Object|String} loc Optional default location object. 34130 * @returns {Object} lolcation object. 34131 * @public 34132 */ 34133function lolcation(loc) { 34134 var globalVar; 34135 34136 if (typeof window !== 'undefined') globalVar = window; 34137 else if (typeof global !== 'undefined') globalVar = global; 34138 else if (typeof self !== 'undefined') globalVar = self; 34139 else globalVar = {}; 34140 34141 var location = globalVar.location || {}; 34142 loc = loc || location; 34143 34144 var finaldestination = {} 34145 , type = typeof loc 34146 , key; 34147 34148 if ('blob:' === loc.protocol) { 34149 finaldestination = new Url(unescape(loc.pathname), {}); 34150 } else if ('string' === type) { 34151 finaldestination = new Url(loc, {}); 34152 for (key in ignore) delete finaldestination[key]; 34153 } else if ('object' === type) { 34154 for (key in loc) { 34155 if (key in ignore) continue; 34156 finaldestination[key] = loc[key]; 34157 } 34158 34159 if (finaldestination.slashes === undefined) { 34160 finaldestination.slashes = slashes.test(loc.href); 34161 } 34162 } 34163 34164 return finaldestination; 34165} 34166 34167/** 34168 * Check whether a protocol scheme is special. 34169 * 34170 * @param {String} The protocol scheme of the URL 34171 * @return {Boolean} `true` if the protocol scheme is special, else `false` 34172 * @private 34173 */ 34174function isSpecial(scheme) { 34175 return ( 34176 scheme === 'file:' || 34177 scheme === 'ftp:' || 34178 scheme === 'http:' || 34179 scheme === 'https:' || 34180 scheme === 'ws:' || 34181 scheme === 'wss:' 34182 ); 34183} 34184 34185/** 34186 * @typedef ProtocolExtract 34187 * @type Object 34188 * @property {String} protocol Protocol matched in the URL, in lowercase. 34189 * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`. 34190 * @property {String} rest Rest of the URL that is not part of the protocol. 34191 */ 34192 34193/** 34194 * Extract protocol information from a URL with/without double slash ("//"). 34195 * 34196 * @param {String} address URL we want to extract from. 34197 * @param {Object} location 34198 * @return {ProtocolExtract} Extracted information. 34199 * @private 34200 */ 34201function extractProtocol(address, location) { 34202 address = trimLeft(address); 34203 address = address.replace(CRHTLF, ''); 34204 location = location || {}; 34205 34206 var match = protocolre.exec(address); 34207 var protocol = match[1] ? match[1].toLowerCase() : ''; 34208 var forwardSlashes = !!match[2]; 34209 var otherSlashes = !!match[3]; 34210 var slashesCount = 0; 34211 var rest; 34212 34213 if (forwardSlashes) { 34214 if (otherSlashes) { 34215 rest = match[2] + match[3] + match[4]; 34216 slashesCount = match[2].length + match[3].length; 34217 } else { 34218 rest = match[2] + match[4]; 34219 slashesCount = match[2].length; 34220 } 34221 } else { 34222 if (otherSlashes) { 34223 rest = match[3] + match[4]; 34224 slashesCount = match[3].length; 34225 } else { 34226 rest = match[4] 34227 } 34228 } 34229 34230 if (protocol === 'file:') { 34231 if (slashesCount >= 2) { 34232 rest = rest.slice(2); 34233 } 34234 } else if (isSpecial(protocol)) { 34235 rest = match[4]; 34236 } else if (protocol) { 34237 if (forwardSlashes) { 34238 rest = rest.slice(2); 34239 } 34240 } else if (slashesCount >= 2 && isSpecial(location.protocol)) { 34241 rest = match[4]; 34242 } 34243 34244 return { 34245 protocol: protocol, 34246 slashes: forwardSlashes || isSpecial(protocol), 34247 slashesCount: slashesCount, 34248 rest: rest 34249 }; 34250} 34251 34252/** 34253 * Resolve a relative URL pathname against a base URL pathname. 34254 * 34255 * @param {String} relative Pathname of the relative URL. 34256 * @param {String} base Pathname of the base URL. 34257 * @return {String} Resolved pathname. 34258 * @private 34259 */ 34260function resolve(relative, base) { 34261 if (relative === '') return base; 34262 34263 var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/')) 34264 , i = path.length 34265 , last = path[i - 1] 34266 , unshift = false 34267 , up = 0; 34268 34269 while (i--) { 34270 if (path[i] === '.') { 34271 path.splice(i, 1); 34272 } else if (path[i] === '..') { 34273 path.splice(i, 1); 34274 up++; 34275 } else if (up) { 34276 if (i === 0) unshift = true; 34277 path.splice(i, 1); 34278 up--; 34279 } 34280 } 34281 34282 if (unshift) path.unshift(''); 34283 if (last === '.' || last === '..') path.push(''); 34284 34285 return path.join('/'); 34286} 34287 34288/** 34289 * The actual URL instance. Instead of returning an object we've opted-in to 34290 * create an actual constructor as it's much more memory efficie
vendor: 9,911 bytes, lines 34290-34653
34290nt and 34291 * faster and it pleases my OCD. 34292 * 34293 * It is worth noting that we should not use `URL` as class name to prevent 34294 * clashes with the global URL instance that got introduced in browsers. 34295 * 34296 * @constructor 34297 * @param {String} address URL we want to parse. 34298 * @param {Object|String} [location] Location defaults for relative paths. 34299 * @param {Boolean|Function} [parser] Parser for the query string. 34300 * @private 34301 */ 34302function Url(address, location, parser) { 34303 address = trimLeft(address); 34304 address = address.replace(CRHTLF, ''); 34305 34306 if (!(this instanceof Url)) { 34307 return new Url(address, location, parser); 34308 } 34309 34310 var relative, extracted, parse, instruction, index, key 34311 , instructions = rules.slice() 34312 , type = typeof location 34313 , url = this 34314 , i = 0; 34315 34316 // 34317 // The following if statements allows this module two have compatibility with 34318 // 2 different API: 34319 // 34320 // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments 34321 // where the boolean indicates that the query string should also be parsed. 34322 // 34323 // 2. The `URL` interface of the browser which accepts a URL, object as 34324 // arguments. The supplied object will be used as default values / fall-back 34325 // for relative paths. 34326 // 34327 if ('object' !== type && 'string' !== type) { 34328 parser = location; 34329 location = null; 34330 } 34331 34332 if (parser && 'function' !== typeof parser) parser = qs.parse; 34333 34334 location = lolcation(location); 34335 34336 // 34337 // Extract protocol information before running the instructions. 34338 // 34339 extracted = extractProtocol(address || '', location); 34340 relative = !extracted.protocol && !extracted.slashes; 34341 url.slashes = extracted.slashes || relative && location.slashes; 34342 url.protocol = extracted.protocol || location.protocol || ''; 34343 address = extracted.rest; 34344 34345 // 34346 // When the authority component is absent the URL starts with a path 34347 // component. 34348 // 34349 if ( 34350 extracted.protocol === 'file:' && ( 34351 extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) || 34352 (!extracted.slashes && 34353 (extracted.protocol || 34354 extracted.slashesCount < 2 || 34355 !isSpecial(url.protocol))) 34356 ) { 34357 instructions[3] = [/(.*)/, 'pathname']; 34358 } 34359 34360 for (; i < instructions.length; i++) { 34361 instruction = instructions[i]; 34362 34363 if (typeof instruction === 'function') { 34364 address = instruction(address, url); 34365 continue; 34366 } 34367 34368 parse = instruction[0]; 34369 key = instruction[1]; 34370 34371 if (parse !== parse) { 34372 url[key] = address; 34373 } else if ('string' === typeof parse) { 34374 index = parse === '@' 34375 ? address.lastIndexOf(parse) 34376 : address.indexOf(parse); 34377 34378 if (~index) { 34379 if ('number' === typeof instruction[2]) { 34380 url[key] = address.slice(0, index); 34381 address = address.slice(index + instruction[2]); 34382 } else { 34383 url[key] = address.slice(index); 34384 address = address.slice(0, index); 34385 } 34386 } 34387 } else if ((index = parse.exec(address))) { 34388 url[key] = index[1]; 34389 address = address.slice(0, index.index); 34390 } 34391 34392 url[key] = url[key] || ( 34393 relative && instruction[3] ? location[key] || '' : '' 34394 ); 34395 34396 // 34397 // Hostname, host and protocol should be lowercased so they can be used to 34398 // create a proper `origin`. 34399 // 34400 if (instruction[4]) url[key] = url[key].toLowerCase(); 34401 } 34402 34403 // 34404 // Also parse the supplied query string in to an object. If we're supplied 34405 // with a custom parser as function use that instead of the default build-in 34406 // parser. 34407 // 34408 if (parser) url.query = parser(url.query); 34409 34410 // 34411 // If the URL is relative, resolve the pathname against the base URL. 34412 // 34413 if ( 34414 relative 34415 && location.slashes 34416 && url.pathname.charAt(0) !== '/' 34417 && (url.pathname !== '' || location.pathname !== '') 34418 ) { 34419 url.pathname = resolve(url.pathname, location.pathname); 34420 } 34421 34422 // 34423 // Default to a / for pathname if none exists. This normalizes the URL 34424 // to always have a / 34425 // 34426 if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) { 34427 url.pathname = '/' + url.pathname; 34428 } 34429 34430 // 34431 // We should not add port numbers if they are already the default port number 34432 // for a given protocol. As the host also contains the port number we're going 34433 // override it with the hostname which contains no port number. 34434 // 34435 if (!required(url.port, url.protocol)) { 34436 url.host = url.hostname; 34437 url.port = ''; 34438 } 34439 34440 // 34441 // Parse down the `auth` for the username and password. 34442 // 34443 url.username = url.password = ''; 34444 34445 if (url.auth) { 34446 index = url.auth.indexOf(':'); 34447 34448 if (~index) { 34449 url.username = url.auth.slice(0, index); 34450 url.username = encodeURIComponent(decodeURIComponent(url.username)); 34451 34452 url.password = url.auth.slice(index + 1); 34453 url.password = encodeURIComponent(decodeURIComponent(url.password)) 34454 } else { 34455 url.username = encodeURIComponent(decodeURIComponent(url.auth)); 34456 } 34457 34458 url.auth = url.password ? url.username +':'+ url.password : url.username; 34459 } 34460 34461 url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host 34462 ? url.protocol +'//'+ url.host 34463 : 'null'; 34464 34465 // 34466 // The href is just the compiled result. 34467 // 34468 url.href = url.toString(); 34469} 34470 34471/** 34472 * This is convenience method for changing properties in the URL instance to 34473 * insure that they all propagate correctly. 34474 * 34475 * @param {String} part Property we need to adjust. 34476 * @param {Mixed} value The newly assigned value. 34477 * @param {Boolean|Function} fn When setting the query, it will be the function 34478 * used to parse the query. 34479 * When setting the protocol, double slash will be 34480 * removed from the final url if it is true. 34481 * @returns {URL} URL instance for chaining. 34482 * @public 34483 */ 34484function set(part, value, fn) { 34485 var url = this; 34486 34487 switch (part) { 34488 case 'query': 34489 if ('string' === typeof value && value.length) { 34490 value = (fn || qs.parse)(value); 34491 } 34492 34493 url[part] = value; 34494 break; 34495 34496 case 'port': 34497 url[part] = value; 34498 34499 if (!required(value, url.protocol)) { 34500 url.host = url.hostname; 34501 url[part] = ''; 34502 } else if (value) { 34503 url.host = url.hostname +':'+ value; 34504 } 34505 34506 break; 34507 34508 case 'hostname': 34509 url[part] = value; 34510 34511 if (url.port) value += ':'+ url.port; 34512 url.host = value; 34513 break; 34514 34515 case 'host': 34516 url[part] = value; 34517 34518 if (port.test(value)) { 34519 value = value.split(':'); 34520 url.port = value.pop(); 34521 url.hostname = value.join(':'); 34522 } else { 34523 url.hostname = value; 34524 url.port = ''; 34525 } 34526 34527 break; 34528 34529 case 'protocol': 34530 url.protocol = value.toLowerCase(); 34531 url.slashes = !fn; 34532 break; 34533 34534 case 'pathname': 34535 case 'hash': 34536 if (value) { 34537 var char = part === 'pathname' ? '/' : '#'; 34538 url[part] = value.charAt(0) !== char ? char + value : value; 34539 } else { 34540 url[part] = value; 34541 } 34542 break; 34543 34544 case 'username': 34545 case 'password': 34546 url[part] = encodeURIComponent(value); 34547 break; 34548 34549 case 'auth': 34550 var index = value.indexOf(':'); 34551 34552 if (~index) { 34553 url.username = value.slice(0, index); 34554 url.username = encodeURIComponent(decodeURIComponent(url.username)); 34555 34556 url.password = value.slice(index + 1); 34557 url.password = encodeURIComponent(decodeURIComponent(url.password)); 34558 } else { 34559 url.username = encodeURIComponent(decodeURIComponent(value)); 34560 } 34561 } 34562 34563 for (var i = 0; i < rules.length; i++) { 34564 var ins = rules[i]; 34565 34566 if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase(); 34567 } 34568 34569 url.auth = url.password ? url.username +':'+ url.password : url.username; 34570 34571 url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host 34572 ? url.protocol +'//'+ url.host 34573 : 'null'; 34574 34575 url.href = url.toString(); 34576 34577 return url; 34578} 34579 34580/** 34581 * Transform the properties back in to a valid and full URL string. 34582 * 34583 * @param {Function} stringify Optional query stringify function. 34584 * @returns {String} Compiled version of the URL. 34585 * @public 34586 */ 34587function toString(stringify) { 34588 if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify; 34589 34590 var query 34591 , url = this 34592 , host = url.host 34593 , protocol = url.protocol; 34594 34595 if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':'; 34596 34597 var result = 34598 protocol + 34599 ((url.protocol && url.slashes) || isSpecial(url.protocol) ? '//' : ''); 34600 34601 if (url.username) { 34602 result += url.username; 34603 if (url.password) result += ':'+ url.password; 34604 result += '@'; 34605 } else if (url.password) { 34606 result += ':'+ url.password; 34607 result += '@'; 34608 } else if ( 34609 url.protocol !== 'file:' && 34610 isSpecial(url.protocol) && 34611 !host && 34612 url.pathname !== '/' 34613 ) { 34614 // 34615 // Add back the empty userinfo, otherwise the original invalid URL 34616 // might be transformed into a valid one with `url.pathname` as host. 34617 // 34618 result += '@'; 34619 } 34620 34621 // 34622 // Trailing colon is removed from `url.host` when it is parsed. If it still 34623 // ends with a colon, then add back the trailing colon that was removed. This 34624 // prevents an invalid URL from being transformed into a valid one. 34625 // 34626 if (host[host.length - 1] === ':' || (port.test(url.hostname) && !url.port)) { 34627 host += ':'; 34628 } 34629 34630 result += host + url.pathname; 34631 34632 query = 'object' === typeof url.query ? stringify(url.query) : url.query; 34633 if (query) result += '?' !== query.charAt(0) ? '?'+ query : query; 34634 34635 if (url.hash) result += url.hash; 34636 34637 return result; 34638} 34639 34640Url.prototype = { set: set, toString: toString }; 34641 34642// 34643// Expose the URL parser and some additional properties that might be useful for 34644// others or testing. 34645// 34646Url.extractProtocol = extractProtocol; 34647Url.location = lolcation; 34648Url.trimLeft = trimLeft; 34649Url.qs = qs; 34650 34651module.exports = Url; 34652 34653}).call(this
34653,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 34654},{"querystringify":177,"requires-port":178}]},{},[1]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.