├── .gitignore ├── LICENSE ├── frontend ├── package.json ├── public │ └── index.html └── src │ ├── App.js │ ├── ResultsRow.js │ ├── ResultsTable.js │ ├── index.js │ ├── logo.png │ ├── sideEffects.js │ └── styles.css ├── package.json ├── process.yml ├── serve.sh ├── server ├── package.json └── src │ └── index.js ├── worker ├── __schemas__ │ ├── v2_account.json │ ├── v2_account_achievements.json │ ├── v2_account_bank.json │ ├── v2_account_dungeons.json │ ├── v2_account_dyes.json │ ├── v2_account_finishers.json │ ├── v2_account_gliders.json │ ├── v2_account_home_cats.json │ ├── v2_account_home_nodes.json │ ├── v2_account_inventory.json │ ├── v2_account_mailcarriers.json │ ├── v2_account_masteries.json │ ├── v2_account_mastery_points.json │ ├── v2_account_materials.json │ ├── v2_account_minis.json │ ├── v2_account_outfits.json │ ├── v2_account_pvp_heroes.json │ ├── v2_account_raids.json │ ├── v2_account_recipes.json │ ├── v2_account_skins.json │ ├── v2_account_titles.json │ ├── v2_account_wallet.json │ ├── v2_achievements.json │ ├── v2_achievements_categories.json │ ├── v2_achievements_groups.json │ ├── v2_backstory_answers.json │ ├── v2_backstory_questions.json │ ├── v2_build.json │ ├── v2_cats.json │ ├── v2_characters.json │ ├── v2_characters_ID_backstory.json │ ├── v2_characters_ID_core.json │ ├── v2_characters_ID_crafting.json │ ├── v2_characters_ID_equipment.json │ ├── v2_characters_ID_heropoints.json │ ├── v2_characters_ID_inventory.json │ ├── v2_characters_ID_recipes.json │ ├── v2_characters_ID_sab.json │ ├── v2_characters_ID_training.json │ ├── v2_colors.json │ ├── v2_commerce_delivery.json │ ├── v2_commerce_exchange_coins.json │ ├── v2_commerce_exchange_gems.json │ ├── v2_commerce_listings.json │ ├── v2_commerce_prices.json │ ├── v2_commerce_transactions_current_buys.json │ ├── v2_commerce_transactions_current_sells.json │ ├── v2_commerce_transactions_history_buys.json │ ├── v2_commerce_transactions_history_sells.json │ ├── v2_continents.json │ ├── v2_currencies.json │ ├── v2_dungeons.json │ ├── v2_emblem_backgrounds.json │ ├── v2_emblem_foregrounds.json │ ├── v2_files.json │ ├── v2_finishers.json │ ├── v2_gliders.json │ ├── v2_guild_ID.json │ ├── v2_guild_ID_log.json │ ├── v2_guild_ID_members.json │ ├── v2_guild_ID_ranks.json │ ├── v2_guild_ID_stash.json │ ├── v2_guild_ID_storage.json │ ├── v2_guild_ID_teams.json │ ├── v2_guild_ID_treasury.json │ ├── v2_guild_ID_upgrades.json │ ├── v2_guild_permissions.json │ ├── v2_guild_search.json │ ├── v2_guild_upgrades.json │ ├── v2_items.json │ ├── v2_itemstats.json │ ├── v2_legends.json │ ├── v2_mailcarriers.json │ ├── v2_maps.json │ ├── v2_masteries.json │ ├── v2_materials.json │ ├── v2_minis.json │ ├── v2_nodes.json │ ├── v2_outfits.json │ ├── v2_pets.json │ ├── v2_professions.json │ ├── v2_pvp_amulets.json │ ├── v2_pvp_games.json │ ├── v2_pvp_heroes.json │ ├── v2_pvp_ranks.json │ ├── v2_pvp_seasons.json │ ├── v2_pvp_seasons_ID_leaderboards_guild_eu.json │ ├── v2_pvp_seasons_ID_leaderboards_guild_na.json │ ├── v2_pvp_seasons_ID_leaderboards_legendary_eu.json │ ├── v2_pvp_seasons_ID_leaderboards_legendary_na.json │ ├── v2_pvp_standings.json │ ├── v2_pvp_stats.json │ ├── v2_quaggans.json │ ├── v2_races.json │ ├── v2_raids.json │ ├── v2_recipes.json │ ├── v2_recipes_search_INPUT.json │ ├── v2_recipes_search_OUTPUT.json │ ├── v2_skills.json │ ├── v2_skins.json │ ├── v2_specializations.json │ ├── v2_stories.json │ ├── v2_stories_seasons.json │ ├── v2_titles.json │ ├── v2_tokeninfo.json │ ├── v2_traits.json │ ├── v2_worlds.json │ ├── v2_wvw_abilities.json │ ├── v2_wvw_matches.json │ ├── v2_wvw_matches_overview.json │ ├── v2_wvw_matches_scores.json │ ├── v2_wvw_matches_stats.json │ ├── v2_wvw_matches_stats_ID_teams_blue_top_kdr.json │ ├── v2_wvw_matches_stats_ID_teams_blue_top_kills.json │ ├── v2_wvw_objectives.json │ ├── v2_wvw_ranks.json │ └── v2_wvw_upgrades.json ├── package.json └── src │ ├── endpoints.js │ ├── generateUrl.js │ ├── index.js │ ├── matchSchema.js │ ├── requestApi.js │ ├── runTests.js │ ├── testEndpoint.js │ └── toFileName.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .idea/ 3 | frontend/build/ 4 | worker/latest.json 5 | .history/ 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 queicherius 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api-snapshot-testing-frontend", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "start": "react-scripts start", 6 | "build": "react-scripts build", 7 | "format": "prettier --print-width 120 --no-semi --single-quote --no-bracket-spacing --write 'src/**/*.js' && standard --fix 'src/**/*.js'" 8 | }, 9 | "dependencies": { 10 | "preact": "^8.2.5" 11 | }, 12 | "devDependencies": { 13 | "@just-boris/preact-scripts": "1.0.7", 14 | "prettier": "^1.7.2", 15 | "standard": "^10.0.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | GW2 API STATUS 7 | 8 | 9 | 10 | 11 | 14 |
15 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import {h, Component} from 'preact' 2 | import ResultsTable from './ResultsTable' 3 | import {getLatestTest} from './sideEffects' 4 | import logo from './logo.png' 5 | 6 | class App extends Component { 7 | constructor (props) { 8 | super(props) 9 | 10 | this.state = {results: null} 11 | } 12 | 13 | async componentDidMount () { 14 | getLatestTest().then(x => this.setState({results: x})) 15 | 16 | setInterval(() => { 17 | getLatestTest().then(x => this.setState({results: x})) 18 | }, 60 * 1000) 19 | } 20 | 21 | render () { 22 | return ( 23 |
24 |
25 |
26 | GW2 API STATUS 27 |
28 | 29 | {!this.state.results &&
Loading...
} 30 | {this.state.results && } 31 | 32 |
33 | Contribute on GitHub 34 |
35 |
36 |
37 | ) 38 | } 39 | } 40 | 41 | export default App 42 | -------------------------------------------------------------------------------- /frontend/src/ResultsRow.js: -------------------------------------------------------------------------------- 1 | import {h, Component} from 'preact' 2 | 3 | class ResultsRow extends Component { 4 | render () { 5 | const {data, className, onClick} = this.props 6 | 7 | return ( 8 | 9 | 10 | 11 | {data.name} 12 | 13 | 14 | 15 | {data.status < 400 && } 16 | 17 | {data.status >= 400 && ( 18 |
19 | 20 |
{data.status}
21 |
{data.error || 'Unknown error'}
22 |
23 | )} 24 | 25 | 26 | {data.schemaValid === undefined && '—'} 27 | 28 | {data.schemaValid !== undefined && data.schemaValid && } 29 | 30 | {data.schemaValid !== undefined && 31 | !data.schemaValid && ( 32 |
33 | 34 |
35 |
{data.schemaChanges}
36 |
37 |
38 | )} 39 | 40 | 41 |
42 | {data.duration <= 10000 && } 43 | 44 | {data.duration > 10000 && data.duration <= 30000 && } 45 | 46 | {data.duration > 30000 && } 47 | 48 |
{data.duration !== 0 ? `${data.duration.toLocaleString()} ms` : ''}
49 |
50 | 51 | 52 | ) 53 | } 54 | } 55 | 56 | ResultsRow.defaultProps = { 57 | className: 'result-row' 58 | } 59 | 60 | export default ResultsRow 61 | -------------------------------------------------------------------------------- /frontend/src/ResultsTable.js: -------------------------------------------------------------------------------- 1 | import {h, Component} from 'preact' 2 | import ResultsRow from './ResultsRow' 3 | 4 | class ResultsTable extends Component { 5 | constructor (props, context) { 6 | super(props, context) 7 | 8 | this.state = { 9 | expanded: false 10 | } 11 | } 12 | 13 | render () { 14 | const results = this.props.results 15 | const {expanded} = this.state 16 | 17 | return ( 18 |
19 |
Last checked {results.updated_at.toLocaleString()}
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {results.data.filter(x => x.severity > 0).map(x => )} 33 | {this.renderSummaryRow(results)} 34 | {expanded && results.data.filter(x => x.severity === 0).map(x => )} 35 | 36 |
EndpointOnlineSchemaTime
37 |
38 |
39 | ) 40 | } 41 | 42 | renderSummaryRow (results) { 43 | const workingResults = results.data.filter(x => x.severity === 0) 44 | const workingCount = workingResults.length 45 | 46 | if (workingCount === 0) { 47 | return null 48 | } 49 | 50 | const prefix = this.state.expanded ? '▼' : '▶' 51 | const count = workingCount === results.data.length ? 'All' : workingCount 52 | const text = `${prefix} ${count} endpoints fully operational 🎉` 53 | 54 | const averageDuration = Math.round(average(workingResults.map(x => x.duration))) 55 | 56 | const data = { 57 | name: text, 58 | status: 200, 59 | schemaValid: true, 60 | duration: averageDuration 61 | } 62 | 63 | return ( 64 | this.setState({expanded: !this.state.expanded})} 67 | className='result-row--summary' 68 | /> 69 | ) 70 | } 71 | } 72 | 73 | function average (array) { 74 | const sum = array.reduce((sum, elem) => sum + elem, 0) 75 | return sum / array.length 76 | } 77 | 78 | export default ResultsTable 79 | -------------------------------------------------------------------------------- /frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import {h, render} from 'preact' 2 | import App from './App' 3 | import './styles.css' 4 | 5 | render(, document.getElementById('root')) 6 | -------------------------------------------------------------------------------- /frontend/src/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gw2efficiency/api-status/e7eae67cd5beb35ea5b1dbb8986cc5e1740eaa5c/frontend/src/logo.png -------------------------------------------------------------------------------- /frontend/src/sideEffects.js: -------------------------------------------------------------------------------- 1 | const url = process.env.NODE_ENV === 'production' ? '/api' : `http://${window.location.hostname}:3123/api` 2 | 3 | export async function getLatestTest () { 4 | const response = await window.fetch(url) 5 | const result = await response.json() 6 | 7 | result.data = result.data.map(endpoint => { 8 | endpoint.severity = calculateSeverity(endpoint) 9 | return endpoint 10 | }) 11 | 12 | result.data.sort((a, b) => b.duration - a.duration) 13 | result.data.sort((a, b) => b.severity - a.severity) 14 | 15 | result.updated_at = new Date(result.updated_at) 16 | 17 | return result 18 | } 19 | 20 | function calculateSeverity (endpoint) { 21 | if (endpoint.status >= 400) { 22 | return 3 23 | } 24 | 25 | if (endpoint.schemaValid === false) { 26 | return 2 27 | } 28 | 29 | if (endpoint.duration > 30000) { 30 | return 1 31 | } 32 | 33 | if (endpoint.duration > 10000) { 34 | return 0.5 35 | } 36 | 37 | return 0 38 | } 39 | -------------------------------------------------------------------------------- /frontend/src/styles.css: -------------------------------------------------------------------------------- 1 | .has-tooltip { 2 | position: relative; 3 | } 4 | 5 | .has-tooltip:hover .status-tooltip { 6 | opacity: 1; 7 | } 8 | 9 | .status-tooltip { 10 | opacity: 0; 11 | transition: opacity ease .3s; 12 | pointer-events: none; 13 | position: absolute; 14 | left: 7px; 15 | top: -7px; 16 | transform: translate(-50%, -100%); 17 | background: black; 18 | border-radius: 3px; 19 | white-space: nowrap; 20 | color: #fff; 21 | padding: 3px 10px; 22 | font-size: 12px; 23 | } 24 | 25 | .status-tooltip pre { 26 | color: #fff; 27 | margin-bottom: 0; 28 | } 29 | 30 | .status-tooltip:after { 31 | content: ''; 32 | display: block; 33 | border: solid; 34 | border-width: 6px 6px 0 6px; 35 | border-color: black transparent; 36 | position: absolute; 37 | left: 50%; 38 | margin-left: -6px; 39 | bottom: -6px; 40 | } 41 | 42 | .result-table { 43 | border: 1px solid #e9ecef; 44 | } 45 | 46 | .result-row--summary:hover { 47 | cursor: pointer; 48 | background: rgba(0,0,0,.075); 49 | } 50 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "workspaces": [ 4 | "frontend", 5 | "server", 6 | "worker" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /process.yml: -------------------------------------------------------------------------------- 1 | apps: 2 | - name: snapshot-server 3 | script: server/src/index.js 4 | env: 5 | PORT: 3123 6 | - name: snapshot-worker 7 | script : worker/src/index.js 8 | -------------------------------------------------------------------------------- /serve.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # - Setup NGINX reverse proxy 4 | # https://github.com/queicherius/braindump/blob/master/docs/https-and-caching-for-nodejs.md 5 | # - Run manually: 6 | # npm install -g pm2@2.7.1 7 | # pm2 startup 8 | 9 | echo "Pulling changes..." 10 | git pull 11 | 12 | echo "Installing dependencies..." 13 | yarn 14 | 15 | echo "Bundling frontend..." 16 | cd frontend && npm run build && cd .. 17 | 18 | echo "Starting servers..." 19 | pm2 start process.yml 20 | pm2 dump 21 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api-snapshot-testing-server", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "start": "node src/index.js", 6 | "format": "prettier --print-width 120 --no-semi --single-quote --no-bracket-spacing --write 'src/**/*.js' && standard --fix 'src/**/*.js'" 7 | }, 8 | "dependencies": { 9 | "compression": "^1.7.1", 10 | "cors": "^2.8.4", 11 | "express": "^4.16.0", 12 | "morgan": "^1.9.0" 13 | }, 14 | "devDependencies": { 15 | "prettier": "^1.7.2", 16 | "standard": "^10.0.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /server/src/index.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const express = require('express') 3 | const compression = require('compression') 4 | const cors = require('cors') 5 | const logging = require('morgan') 6 | 7 | const app = express() 8 | 9 | app.use(compression()) 10 | app.use(cors()) 11 | app.use(logging('tiny')) 12 | 13 | const root = path.join(__dirname, '../../') 14 | 15 | app.use('/', express.static(path.join(root, '/frontend/build'))) 16 | 17 | app.get('/api', function (req, res) { 18 | res.sendFile(path.join(root, '/worker/latest.json')) 19 | }) 20 | 21 | const port = process.env.PORT || 3123 22 | app.listen(port, function () { 23 | console.log(`Server listening on port ${port}`) 24 | }) 25 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "id": { 6 | "type": "string", 7 | "required": true 8 | }, 9 | "name": { 10 | "type": "string", 11 | "required": true 12 | }, 13 | "age": { 14 | "type": "number", 15 | "required": true 16 | }, 17 | "last_modified": { 18 | "type": "string", 19 | "required": true, 20 | "format": "date-time" 21 | }, 22 | "world": { 23 | "type": "number", 24 | "required": true 25 | }, 26 | "guilds": { 27 | "type": "array", 28 | "items": { 29 | "type": "string" 30 | }, 31 | "required": true 32 | }, 33 | "guild_leader": { 34 | "type": "array", 35 | "items": { 36 | "type": "string" 37 | }, 38 | "required": true 39 | }, 40 | "created": { 41 | "type": "string", 42 | "required": true, 43 | "format": "date-time" 44 | }, 45 | "access": { 46 | "type": "array", 47 | "items": { 48 | "type": "string" 49 | }, 50 | "required": true 51 | }, 52 | "commander": { 53 | "type": "boolean", 54 | "required": true 55 | }, 56 | "wvw": { 57 | "type": "object", 58 | "properties": { 59 | "team_id": { 60 | "type": "number", 61 | "required": true 62 | }, 63 | "rank": { 64 | "type": "number", 65 | "required": true 66 | } 67 | }, 68 | "additionalProperties": false, 69 | "required": true 70 | }, 71 | "fractal_level": { 72 | "type": "number", 73 | "required": true 74 | }, 75 | "daily_ap": { 76 | "type": "number", 77 | "required": true 78 | }, 79 | "monthly_ap": { 80 | "type": "number", 81 | "required": true 82 | }, 83 | "build_storage_slots": { 84 | "type": "number", 85 | "required": true 86 | } 87 | }, 88 | "additionalProperties": false 89 | } 90 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_achievements.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "current": { 11 | "type": "number" 12 | }, 13 | "max": { 14 | "type": "number" 15 | }, 16 | "done": { 17 | "type": "boolean" 18 | }, 19 | "bits": { 20 | "type": "array", 21 | "items": { 22 | "type": "number" 23 | } 24 | } 25 | }, 26 | "required": ["id", "current", "max", "done"] 27 | }, 28 | "properties": {}, 29 | "additionalProperties": false 30 | } 31 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_bank.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "oneOf": [ 6 | { 7 | "type": "null" 8 | }, 9 | { 10 | "properties": { 11 | "id": { 12 | "type": "number" 13 | }, 14 | "count": { 15 | "type": "number" 16 | }, 17 | "binding": { 18 | "type": "string" 19 | }, 20 | "bound_to": { 21 | "type": "string" 22 | }, 23 | "dyes": { 24 | "type": "array", 25 | "items": { 26 | "type": "number" 27 | } 28 | } 29 | }, 30 | "type": "object" 31 | } 32 | ] 33 | }, 34 | "properties": {}, 35 | "additionalProperties": false 36 | } 37 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_dungeons.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_dyes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_finishers.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "permanent": { 11 | "type": "boolean" 12 | } 13 | } 14 | }, 15 | "properties": {}, 16 | "additionalProperties": false 17 | } 18 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_gliders.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_home_cats.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_home_nodes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_inventory.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_mailcarriers.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_masteries.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_mastery_points.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "totals": { 6 | "type": "array", 7 | "items": { 8 | "type": "object", 9 | "properties": { 10 | "region": { 11 | "type": "string" 12 | }, 13 | "spent": { 14 | "type": "number" 15 | }, 16 | "earned": { 17 | "type": "number" 18 | } 19 | } 20 | }, 21 | "required": true 22 | }, 23 | "unlocked": { 24 | "type": "array", 25 | "items": {}, 26 | "required": true 27 | } 28 | }, 29 | "additionalProperties": false 30 | } 31 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_materials.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "category": { 11 | "type": "number" 12 | }, 13 | "count": { 14 | "type": "number" 15 | } 16 | }, 17 | "required": ["id", "category", "count"] 18 | }, 19 | "properties": {}, 20 | "additionalProperties": false 21 | } 22 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_minis.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_outfits.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_pvp_heroes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_raids.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_recipes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_skins.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_titles.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_account_wallet.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "value": { 11 | "type": "number" 12 | } 13 | }, 14 | "required": ["id", "value"] 15 | }, 16 | "properties": {}, 17 | "additionalProperties": false 18 | } 19 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_achievements.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "icon": { 11 | "type": "string" 12 | }, 13 | "name": { 14 | "type": "string" 15 | }, 16 | "description": { 17 | "type": "string" 18 | }, 19 | "requirement": { 20 | "type": "string" 21 | }, 22 | "locked_text": { 23 | "type": "string" 24 | }, 25 | "type": { 26 | "type": "string" 27 | }, 28 | "flags": { 29 | "type": "array", 30 | "items": { 31 | "type": "string" 32 | } 33 | }, 34 | "bits": { 35 | "type": "array", 36 | "items": { 37 | "type": "object", 38 | "properties": { 39 | "type": { 40 | "type": "string" 41 | }, 42 | "text": { 43 | "type": "string" 44 | }, 45 | "id": { 46 | "type": "number" 47 | } 48 | }, 49 | "required": ["type"] 50 | } 51 | }, 52 | "tiers": { 53 | "type": "array", 54 | "items": { 55 | "type": "object", 56 | "properties": { 57 | "count": { 58 | "type": "number" 59 | }, 60 | "points": { 61 | "type": "number" 62 | } 63 | } 64 | } 65 | }, 66 | "rewards": { 67 | "type": "array", 68 | "items": { 69 | "type": "object", 70 | "properties": { 71 | "type": { 72 | "type": "string" 73 | }, 74 | "id": { 75 | "type": "number" 76 | }, 77 | "count": { 78 | "type": "number" 79 | } 80 | } 81 | } 82 | } 83 | }, 84 | "required": ["id", "name", "description", "requirement", "locked_text", "type", "flags", "tiers"] 85 | }, 86 | "properties": {}, 87 | "additionalProperties": false 88 | } 89 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_achievements_categories.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "order": { 17 | "type": "number" 18 | }, 19 | "icon": { 20 | "type": "string" 21 | }, 22 | "achievements": { 23 | "type": "array", 24 | "items": { 25 | "type": "object", 26 | "properties": { 27 | "id": { 28 | "type": "number" 29 | } 30 | } 31 | } 32 | } 33 | }, 34 | "required": ["id", "name", "description", "order", "icon", "achievements"] 35 | }, 36 | "properties": {}, 37 | "additionalProperties": false 38 | } 39 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_achievements_groups.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "order": { 17 | "type": "number" 18 | }, 19 | "categories": { 20 | "type": "array", 21 | "items": { 22 | "type": "number" 23 | } 24 | } 25 | }, 26 | "required": ["id", "name", "description", "order", "categories"] 27 | }, 28 | "properties": {}, 29 | "additionalProperties": false 30 | } 31 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_backstory_answers.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "title": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "journal": { 17 | "type": "string" 18 | }, 19 | "question": { 20 | "type": "number" 21 | }, 22 | "races": { 23 | "type": "array", 24 | "items": { 25 | "type": "string" 26 | } 27 | }, 28 | "professions": { 29 | "type": "array", 30 | "items": { 31 | "type": "string" 32 | } 33 | } 34 | }, 35 | "required": ["id", "title", "description", "journal", "question"] 36 | }, 37 | "properties": {}, 38 | "additionalProperties": false 39 | } 40 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_backstory_questions.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "title": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "answers": { 17 | "type": "array", 18 | "items": { 19 | "type": "string" 20 | } 21 | }, 22 | "order": { 23 | "type": "number" 24 | }, 25 | "professions": { 26 | "type": "array", 27 | "items": { 28 | "type": "string" 29 | } 30 | }, 31 | "races": { 32 | "type": "array", 33 | "items": { 34 | "type": "string" 35 | } 36 | } 37 | }, 38 | "required": ["id", "title", "description", "answers", "order"] 39 | }, 40 | "properties": {}, 41 | "additionalProperties": false 42 | } 43 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_build.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "id": { 6 | "type": "number", 7 | "minimum": 115267, 8 | "exclusiveMinimum": true 9 | } 10 | }, 11 | "required": ["id"], 12 | "additionalProperties": false 13 | } 14 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_cats.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "hint": { 8 | "type": "string" 9 | }, 10 | "id": { 11 | "type": "number" 12 | } 13 | }, 14 | "required": ["hint", "id"] 15 | }, 16 | "properties": {}, 17 | "additionalProperties": false 18 | } 19 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "race": { 11 | "type": "string" 12 | }, 13 | "gender": { 14 | "type": "string" 15 | }, 16 | "flags": { 17 | "type": "array", 18 | "items": {} 19 | }, 20 | "profession": { 21 | "type": "string" 22 | }, 23 | "level": { 24 | "type": "number" 25 | }, 26 | "guild": { 27 | "oneOf": [ 28 | { 29 | "type": "null" 30 | }, 31 | { 32 | "type": "string" 33 | } 34 | ] 35 | }, 36 | "age": { 37 | "type": "number" 38 | }, 39 | "last_modified": { 40 | "type": "string" 41 | }, 42 | "created": { 43 | "type": "string" 44 | }, 45 | "deaths": { 46 | "type": "number" 47 | }, 48 | "crafting": { 49 | "type": "array", 50 | "items": { 51 | "type": "object", 52 | "properties": { 53 | "discipline": { 54 | "type": "string" 55 | }, 56 | "rating": { 57 | "type": "number" 58 | }, 59 | "active": { 60 | "type": "boolean" 61 | } 62 | }, 63 | "required": ["discipline", "rating", "active"] 64 | } 65 | }, 66 | "backstory": { 67 | "type": "array", 68 | "items": { 69 | "type": "string" 70 | } 71 | }, 72 | "wvw_abilities": { 73 | "type": "array", 74 | "items": {} 75 | }, 76 | "build_tabs_unlocked": { 77 | "type": "number" 78 | }, 79 | "active_build_tab": { 80 | "type": "number" 81 | }, 82 | "build_tabs": { 83 | "type": "array", 84 | "items": { 85 | "type": "object", 86 | "properties": { 87 | "tab": { 88 | "type": "number" 89 | }, 90 | "is_active": { 91 | "type": "boolean" 92 | }, 93 | "build": { 94 | "type": "object", 95 | "properties": { 96 | "name": { 97 | "type": "string" 98 | }, 99 | "profession": { 100 | "type": "string" 101 | }, 102 | "specializations": { 103 | "type": "array", 104 | "items": { 105 | "type": "object", 106 | "properties": { 107 | "id": { 108 | "oneOf": [{"type": "number"}, {"type": "null"}] 109 | }, 110 | "traits": { 111 | "type": "array", 112 | "items": { 113 | "oneOf": [{"type": "number"}, {"type": "null"}] 114 | } 115 | } 116 | }, 117 | "required": ["id", "traits"] 118 | } 119 | }, 120 | "skills": { 121 | "type": "object", 122 | "properties": { 123 | "heal": { 124 | "oneOf": [{"type": "number"}, {"type": "null"}] 125 | }, 126 | "utilities": { 127 | "type": "array", 128 | "items": { 129 | "oneOf": [{"type": "number"}, {"type": "null"}] 130 | } 131 | }, 132 | "elite": { 133 | "oneOf": [{"type": "number"}, {"type": "null"}] 134 | } 135 | }, 136 | "required": ["heal", "utilities", "elite"] 137 | }, 138 | "aquatic_skills": { 139 | "type": "object", 140 | "properties": { 141 | "heal": { 142 | "anyOf": [{"type": "number"}, {"type": "null"}] 143 | }, 144 | "utilities": { 145 | "type": "array", 146 | "items": { 147 | "anyOf": [{"type": "number"}, {"type": "null"}] 148 | } 149 | }, 150 | "elite": { 151 | "anyOf": [{"type": "number"}, {"type": "null"}] 152 | } 153 | }, 154 | "required": ["heal", "utilities", "elite"] 155 | } 156 | }, 157 | "required": ["name", "profession", "specializations", "skills", "aquatic_skills"] 158 | } 159 | }, 160 | "required": ["tab", "is_active", "build"] 161 | } 162 | }, 163 | "equipment_tabs_unlocked": { 164 | "type": "number" 165 | }, 166 | "active_equipment_tab": { 167 | "type": "number" 168 | }, 169 | "equipment": { 170 | "type": "array", 171 | "items": { 172 | "type": "object", 173 | "properties": { 174 | "id": { 175 | "type": "number" 176 | }, 177 | "slot": { 178 | "type": "string" 179 | }, 180 | "binding": { 181 | "type": "string" 182 | }, 183 | "bound_to": { 184 | "type": "string" 185 | }, 186 | "location": { 187 | "type": "string" 188 | }, 189 | "tabs": { 190 | "type": "array", 191 | "items": [ 192 | { 193 | "type": "number" 194 | } 195 | ] 196 | } 197 | }, 198 | "required": ["id", "slot", "location"] 199 | } 200 | }, 201 | "equipment_tabs": { 202 | "type": "array", 203 | "items": { 204 | "type": "object", 205 | "properties": { 206 | "tab": { 207 | "type": "number" 208 | }, 209 | "name": { 210 | "type": "string" 211 | }, 212 | "is_active": { 213 | "type": "boolean" 214 | }, 215 | "equipment": { 216 | "type": "array", 217 | "items": { 218 | "type": "object", 219 | "properties": { 220 | "id": { 221 | "type": "number" 222 | }, 223 | "slot": { 224 | "type": "string" 225 | }, 226 | "location": { 227 | "type": "string" 228 | } 229 | }, 230 | "required": ["id", "slot", "location"] 231 | } 232 | }, 233 | "equipment_pvp": { 234 | "type": "object", 235 | "properties": { 236 | "amulet": { 237 | "type": "number" 238 | }, 239 | "rune": { 240 | "type": "number" 241 | }, 242 | "sigils": { 243 | "type": "array", 244 | "items": { 245 | "oneOf": [{"type": "number"}, {"type": "null"}] 246 | } 247 | } 248 | }, 249 | "required": ["amulet", "rune", "sigils"] 250 | } 251 | }, 252 | "required": ["tab", "name", "is_active", "equipment", "equipment_pvp"] 253 | } 254 | }, 255 | "recipes": { 256 | "type": "array", 257 | "items": { 258 | "type": "number" 259 | } 260 | }, 261 | "training": { 262 | "type": "array", 263 | "items": [ 264 | { 265 | "type": "object", 266 | "properties": { 267 | "id": { 268 | "type": "number" 269 | }, 270 | "spent": { 271 | "type": "number" 272 | }, 273 | "done": { 274 | "type": "boolean" 275 | } 276 | }, 277 | "required": ["id", "spent", "done"] 278 | } 279 | ] 280 | }, 281 | "bags": { 282 | "type": "array", 283 | "items": { 284 | "type": "object", 285 | "properties": { 286 | "id": { 287 | "type": "number" 288 | }, 289 | "size": { 290 | "type": "number" 291 | }, 292 | "inventory": { 293 | "type": "array", 294 | "items": { 295 | "oneOf": [ 296 | { 297 | "type": "object", 298 | "properties": { 299 | "id": { 300 | "type": "number" 301 | }, 302 | "count": { 303 | "type": "number" 304 | } 305 | }, 306 | "required": ["id", "count"] 307 | }, 308 | { 309 | "type": "null" 310 | } 311 | ] 312 | } 313 | } 314 | }, 315 | "required": ["id", "size", "inventory"] 316 | } 317 | } 318 | }, 319 | "required": [ 320 | "name", 321 | "race", 322 | "gender", 323 | "flags", 324 | "profession", 325 | "level", 326 | "guild", 327 | "age", 328 | "last_modified", 329 | "created", 330 | "deaths", 331 | "crafting", 332 | "backstory", 333 | "wvw_abilities", 334 | "build_tabs_unlocked", 335 | "active_build_tab", 336 | "build_tabs", 337 | "equipment_tabs_unlocked", 338 | "active_equipment_tab", 339 | "equipment", 340 | "equipment_tabs", 341 | "recipes", 342 | "training", 343 | "bags" 344 | ] 345 | } 346 | } 347 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_backstory.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "backstory": { 6 | "type": "array", 7 | "items": { 8 | "type": "string" 9 | }, 10 | "required": true 11 | } 12 | }, 13 | "additionalProperties": false 14 | } 15 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_core.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "name": { 6 | "type": "string", 7 | "required": true 8 | }, 9 | "race": { 10 | "type": "string", 11 | "required": true 12 | }, 13 | "gender": { 14 | "type": "string", 15 | "required": true 16 | }, 17 | "profession": { 18 | "type": "string", 19 | "required": true 20 | }, 21 | "level": { 22 | "type": "number", 23 | "required": true 24 | }, 25 | "guild": { 26 | "type": "null", 27 | "required": true 28 | }, 29 | "age": { 30 | "type": "number", 31 | "required": true 32 | }, 33 | "last_modified": { 34 | "type": "string", 35 | "required": true, 36 | "format": "date-time" 37 | }, 38 | "created": { 39 | "type": "string", 40 | "required": true, 41 | "format": "date-time" 42 | }, 43 | "deaths": { 44 | "type": "number", 45 | "required": true 46 | } 47 | }, 48 | "additionalProperties": false 49 | } 50 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_crafting.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "crafting": { 6 | "type": "array", 7 | "items": {}, 8 | "required": true 9 | } 10 | }, 11 | "additionalProperties": false 12 | } 13 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_equipment.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "equipment": { 6 | "type": "array", 7 | "items": { 8 | "type": "object", 9 | "properties": { 10 | "id": { 11 | "type": "number" 12 | }, 13 | "slot": { 14 | "type": "string" 15 | }, 16 | "binding": { 17 | "type": "string" 18 | }, 19 | "bound_to": { 20 | "type": "string" 21 | }, 22 | "dyes": { 23 | "type": "array", 24 | "items": { 25 | "oneOf": [ 26 | { 27 | "type": "number" 28 | }, 29 | { 30 | "type": "null" 31 | } 32 | ] 33 | } 34 | }, 35 | "upgrades": { 36 | "type": "array", 37 | "items": { 38 | "type": "number" 39 | } 40 | }, 41 | "charges": { 42 | "type": "number" 43 | } 44 | }, 45 | "required": ["id", "slot"] 46 | }, 47 | "required": true 48 | } 49 | }, 50 | "additionalProperties": false 51 | } 52 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_heropoints.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "string" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_inventory.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "bags": { 6 | "type": "array", 7 | "items": { 8 | "type": "object", 9 | "properties": { 10 | "id": { 11 | "type": "number" 12 | }, 13 | "size": { 14 | "type": "number" 15 | }, 16 | "inventory": { 17 | "type": "array", 18 | "items": { 19 | "oneOf": [ 20 | { 21 | "type": "object", 22 | "properties": { 23 | "id": { 24 | "type": "number" 25 | }, 26 | "count": { 27 | "type": "number" 28 | } 29 | }, 30 | "required": ["id", "count"] 31 | }, 32 | { 33 | "type": "null" 34 | } 35 | ] 36 | } 37 | } 38 | }, 39 | "required": ["id", "size", "inventory"] 40 | }, 41 | "required": true 42 | } 43 | }, 44 | "additionalProperties": false 45 | } 46 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_recipes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "recipes": { 6 | "type": "array", 7 | "items": {}, 8 | "required": true 9 | } 10 | }, 11 | "additionalProperties": false 12 | } 13 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_sab.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "zones": { 6 | "type": "array", 7 | "items": {}, 8 | "required": true 9 | }, 10 | "unlocks": { 11 | "type": "array", 12 | "items": {}, 13 | "required": true 14 | }, 15 | "songs": { 16 | "type": "array", 17 | "items": {}, 18 | "required": true 19 | } 20 | }, 21 | "additionalProperties": false 22 | } 23 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_characters_ID_training.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "training": { 6 | "type": "array", 7 | "items": { 8 | "type": "object", 9 | "properties": { 10 | "id": { 11 | "type": "number" 12 | }, 13 | "spent": { 14 | "type": "number" 15 | }, 16 | "done": { 17 | "type": "boolean" 18 | } 19 | }, 20 | "required": ["id", "spent", "done"] 21 | }, 22 | "required": true 23 | } 24 | }, 25 | "additionalProperties": false 26 | } 27 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_colors.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_delivery.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "coins": { 6 | "type": "number", 7 | "required": true 8 | }, 9 | "items": { 10 | "type": "array", 11 | "items": { 12 | "type": "object", 13 | "properties": { 14 | "id": { 15 | "type": "number" 16 | }, 17 | "count": { 18 | "type": "number" 19 | } 20 | } 21 | }, 22 | "required": true 23 | } 24 | }, 25 | "additionalProperties": false 26 | } 27 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_exchange_coins.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "coins_per_gem": { 6 | "type": "number", 7 | "required": true 8 | }, 9 | "quantity": { 10 | "type": "number", 11 | "required": true 12 | } 13 | }, 14 | "additionalProperties": false 15 | } 16 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_exchange_gems.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "coins_per_gem": { 6 | "type": "number", 7 | "required": true 8 | }, 9 | "quantity": { 10 | "type": "number", 11 | "required": true 12 | } 13 | }, 14 | "additionalProperties": false 15 | } 16 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_listings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "buys": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "listings": { 16 | "type": "number" 17 | }, 18 | "unit_price": { 19 | "type": "number" 20 | }, 21 | "quantity": { 22 | "type": "number" 23 | } 24 | }, 25 | "required": ["listings", "unit_price", "quantity"] 26 | } 27 | }, 28 | "sells": { 29 | "type": "array", 30 | "items": { 31 | "type": "object", 32 | "properties": { 33 | "listings": { 34 | "type": "number" 35 | }, 36 | "unit_price": { 37 | "type": "number" 38 | }, 39 | "quantity": { 40 | "type": "number" 41 | } 42 | }, 43 | "required": ["listings", "unit_price", "quantity"] 44 | } 45 | } 46 | }, 47 | "required": ["id", "buys", "sells"] 48 | }, 49 | "properties": {}, 50 | "additionalProperties": false 51 | } 52 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_prices.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "whitelisted": { 11 | "type": "boolean" 12 | }, 13 | "buys": { 14 | "type": "object", 15 | "properties": { 16 | "quantity": { 17 | "type": "number" 18 | }, 19 | "unit_price": { 20 | "type": "number" 21 | } 22 | } 23 | }, 24 | "sells": { 25 | "type": "object", 26 | "properties": { 27 | "quantity": { 28 | "type": "number" 29 | }, 30 | "unit_price": { 31 | "type": "number" 32 | } 33 | } 34 | } 35 | }, 36 | "required": ["id", "whitelisted", "buys", "sells"] 37 | }, 38 | "properties": {}, 39 | "additionalProperties": false 40 | } 41 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_transactions_current_buys.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "item_id": { 11 | "type": "number" 12 | }, 13 | "price": { 14 | "type": "number" 15 | }, 16 | "quantity": { 17 | "type": "number" 18 | }, 19 | "created": { 20 | "type": "string" 21 | } 22 | } 23 | }, 24 | "properties": {}, 25 | "additionalProperties": false 26 | } 27 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_transactions_current_sells.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "item_id": { 11 | "type": "number" 12 | }, 13 | "price": { 14 | "type": "number" 15 | }, 16 | "quantity": { 17 | "type": "number" 18 | }, 19 | "created": { 20 | "type": "string" 21 | } 22 | } 23 | }, 24 | "properties": {}, 25 | "additionalProperties": false 26 | } 27 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_transactions_history_buys.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "item_id": { 11 | "type": "number" 12 | }, 13 | "price": { 14 | "type": "number" 15 | }, 16 | "quantity": { 17 | "type": "number" 18 | }, 19 | "created": { 20 | "type": "string" 21 | }, 22 | "purchased": { 23 | "type": "string" 24 | } 25 | }, 26 | "required": ["id", "item_id", "price", "quantity", "created", "purchased"] 27 | }, 28 | "properties": {}, 29 | "additionalProperties": false 30 | } 31 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_commerce_transactions_history_sells.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "item_id": { 11 | "type": "number" 12 | }, 13 | "price": { 14 | "type": "number" 15 | }, 16 | "quantity": { 17 | "type": "number" 18 | }, 19 | "created": { 20 | "type": "string" 21 | }, 22 | "purchased": { 23 | "type": "string" 24 | } 25 | }, 26 | "required": ["id", "item_id", "price", "quantity", "created", "purchased"] 27 | }, 28 | "properties": {}, 29 | "additionalProperties": false 30 | } 31 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_continents.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "continent_dims": { 11 | "type": "array", 12 | "items": { 13 | "type": "number" 14 | } 15 | }, 16 | "min_zoom": { 17 | "type": "number" 18 | }, 19 | "max_zoom": { 20 | "type": "number" 21 | }, 22 | "floors": { 23 | "type": "array", 24 | "items": { 25 | "type": "number" 26 | } 27 | }, 28 | "id": { 29 | "type": "number" 30 | } 31 | }, 32 | "required": ["name", "continent_dims", "min_zoom", "max_zoom", "floors", "id"] 33 | }, 34 | "properties": {}, 35 | "additionalProperties": false 36 | } 37 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_currencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "order": { 17 | "type": "number" 18 | }, 19 | "icon": { 20 | "type": "string" 21 | } 22 | }, 23 | "required": ["id", "name", "description", "order", "icon"] 24 | }, 25 | "properties": {}, 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_dungeons.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "paths": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "id": { 16 | "type": "string" 17 | }, 18 | "type": { 19 | "type": "string" 20 | } 21 | }, 22 | "required": ["id", "type"] 23 | } 24 | } 25 | }, 26 | "required": ["id", "paths"] 27 | }, 28 | "properties": {}, 29 | "additionalProperties": false 30 | } 31 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_emblem_backgrounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "layers": { 11 | "type": "array", 12 | "items": { 13 | "type": "string" 14 | } 15 | } 16 | }, 17 | "required": ["id", "layers"] 18 | }, 19 | "properties": {}, 20 | "additionalProperties": false 21 | } 22 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_emblem_foregrounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "layers": { 11 | "type": "array", 12 | "items": { 13 | "type": "string" 14 | } 15 | } 16 | }, 17 | "required": ["id", "layers"] 18 | }, 19 | "properties": {}, 20 | "additionalProperties": false 21 | } 22 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_files.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "icon": { 11 | "type": "string" 12 | } 13 | }, 14 | "required": ["id", "icon"] 15 | }, 16 | "properties": {}, 17 | "additionalProperties": false 18 | } 19 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_finishers.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "unlock_details": { 11 | "type": "string" 12 | }, 13 | "unlock_items": { 14 | "type": "array", 15 | "items": { 16 | "type": "number" 17 | } 18 | }, 19 | "order": { 20 | "type": "number" 21 | }, 22 | "icon": { 23 | "type": "string" 24 | }, 25 | "name": { 26 | "type": "string" 27 | } 28 | }, 29 | "required": ["id", "unlock_details", "unlock_items", "order", "icon", "name"] 30 | }, 31 | "properties": {}, 32 | "additionalProperties": false 33 | } 34 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_gliders.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "unlock_items": { 11 | "type": "array", 12 | "items": { 13 | "type": "number" 14 | } 15 | }, 16 | "order": { 17 | "type": "number" 18 | }, 19 | "icon": { 20 | "type": "string" 21 | }, 22 | "name": { 23 | "type": "string" 24 | }, 25 | "description": { 26 | "type": "string" 27 | }, 28 | "default_dyes": { 29 | "type": "array", 30 | "items": {} 31 | } 32 | }, 33 | "required": ["id", "order", "icon", "name", "description", "default_dyes"] 34 | }, 35 | "properties": {}, 36 | "additionalProperties": false 37 | } 38 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "level": { 6 | "type": "number", 7 | "required": true 8 | }, 9 | "motd": { 10 | "type": "string", 11 | "required": true 12 | }, 13 | "influence": { 14 | "type": "number", 15 | "required": true 16 | }, 17 | "aetherium": { 18 | "type": "number", 19 | "required": true 20 | }, 21 | "resonance": { 22 | "type": "number", 23 | "required": true 24 | }, 25 | "favor": { 26 | "type": "number", 27 | "required": true 28 | }, 29 | "member_count": { 30 | "type": "number", 31 | "required": true 32 | }, 33 | "member_capacity": { 34 | "type": "number", 35 | "required": true 36 | }, 37 | "id": { 38 | "type": "string", 39 | "required": true 40 | }, 41 | "name": { 42 | "type": "string", 43 | "required": true 44 | }, 45 | "tag": { 46 | "type": "string", 47 | "required": true 48 | }, 49 | "emblem": { 50 | "type": "object", 51 | "properties": { 52 | "background": { 53 | "type": "object", 54 | "properties": { 55 | "id": { 56 | "type": "number", 57 | "required": true 58 | }, 59 | "colors": { 60 | "type": "array", 61 | "items": { 62 | "type": "number" 63 | }, 64 | "required": true 65 | } 66 | }, 67 | "additionalProperties": false, 68 | "required": true 69 | }, 70 | "foreground": { 71 | "type": "object", 72 | "properties": { 73 | "id": { 74 | "type": "number", 75 | "required": true 76 | }, 77 | "colors": { 78 | "type": "array", 79 | "items": { 80 | "type": "number" 81 | }, 82 | "required": true 83 | } 84 | }, 85 | "additionalProperties": false, 86 | "required": true 87 | }, 88 | "flags": { 89 | "type": "array", 90 | "items": {}, 91 | "required": true 92 | } 93 | }, 94 | "additionalProperties": false, 95 | "required": true 96 | } 97 | }, 98 | "additionalProperties": false 99 | } 100 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_log.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "time": { 11 | "type": "string" 12 | }, 13 | "type": { 14 | "type": "string" 15 | }, 16 | "user": { 17 | "type": "string" 18 | }, 19 | "motd": { 20 | "type": "string" 21 | }, 22 | "old_rank": { 23 | "type": "string" 24 | }, 25 | "new_rank": { 26 | "type": "string" 27 | } 28 | }, 29 | "required": ["id", "time", "type", "user"] 30 | }, 31 | "properties": {}, 32 | "additionalProperties": false 33 | } 34 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_members.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "rank": { 11 | "type": "string" 12 | }, 13 | "joined": { 14 | "type": "string" 15 | } 16 | } 17 | }, 18 | "properties": {}, 19 | "additionalProperties": false 20 | } 21 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_ranks.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "order": { 11 | "type": "number" 12 | }, 13 | "permissions": { 14 | "type": "array", 15 | "items": { 16 | "type": "string" 17 | } 18 | }, 19 | "icon": { 20 | "type": "string" 21 | } 22 | }, 23 | "required": ["id", "order", "permissions", "icon"] 24 | }, 25 | "properties": {}, 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_stash.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_storage.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_teams.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "members": { 11 | "type": "array", 12 | "items": {} 13 | }, 14 | "name": { 15 | "type": "string" 16 | }, 17 | "state": { 18 | "type": "string" 19 | }, 20 | "aggregate": { 21 | "type": "object", 22 | "properties": { 23 | "wins": { 24 | "type": "number" 25 | }, 26 | "losses": { 27 | "type": "number" 28 | }, 29 | "desertions": { 30 | "type": "number" 31 | }, 32 | "byes": { 33 | "type": "number" 34 | }, 35 | "forfeits": { 36 | "type": "number" 37 | } 38 | } 39 | }, 40 | "ladders": { 41 | "type": "object", 42 | "properties": {} 43 | }, 44 | "games": { 45 | "type": "array", 46 | "items": {} 47 | } 48 | }, 49 | "required": ["id", "members", "name", "state", "aggregate", "ladders", "games"] 50 | }, 51 | "properties": {}, 52 | "additionalProperties": false 53 | } 54 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_treasury.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_ID_upgrades.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_permissions.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | } 16 | }, 17 | "required": ["id", "name", "description"] 18 | }, 19 | "properties": {}, 20 | "additionalProperties": false 21 | } 22 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_search.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "string" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_guild_upgrades.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "build_time": { 17 | "type": "number" 18 | }, 19 | "icon": { 20 | "type": "string" 21 | }, 22 | "type": { 23 | "type": "string" 24 | }, 25 | "required_level": { 26 | "type": "number" 27 | }, 28 | "experience": { 29 | "type": "number" 30 | }, 31 | "prerequisites": { 32 | "type": "array", 33 | "items": {} 34 | }, 35 | "costs": { 36 | "type": "array", 37 | "items": { 38 | "type": "object", 39 | "properties": { 40 | "type": { 41 | "type": "string" 42 | }, 43 | "count": { 44 | "type": "number" 45 | }, 46 | "name": { 47 | "type": "string" 48 | }, 49 | "item_id": { 50 | "type": "number" 51 | } 52 | } 53 | } 54 | } 55 | }, 56 | "required": [ 57 | "id", 58 | "name", 59 | "description", 60 | "build_time", 61 | "icon", 62 | "type", 63 | "required_level", 64 | "experience", 65 | "prerequisites", 66 | "costs" 67 | ] 68 | }, 69 | "properties": {}, 70 | "additionalProperties": false 71 | } 72 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_items.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "description": { 11 | "type": "string" 12 | }, 13 | "type": { 14 | "type": "string" 15 | }, 16 | "level": { 17 | "type": "number" 18 | }, 19 | "rarity": { 20 | "type": "string" 21 | }, 22 | "vendor_value": { 23 | "type": "number" 24 | }, 25 | "default_skin": { 26 | "type": "number" 27 | }, 28 | "game_types": { 29 | "type": "array", 30 | "items": { 31 | "type": "string" 32 | } 33 | }, 34 | "flags": { 35 | "type": "array", 36 | "items": { 37 | "type": "string" 38 | } 39 | }, 40 | "restrictions": { 41 | "type": "array", 42 | "items": {} 43 | }, 44 | "id": { 45 | "type": "number" 46 | }, 47 | "chat_link": { 48 | "type": "string" 49 | }, 50 | "icon": { 51 | "type": "string" 52 | }, 53 | "details": { 54 | "type": "object", 55 | "properties": { 56 | "type": { 57 | "type": "string" 58 | }, 59 | "damage_type": { 60 | "type": "string" 61 | }, 62 | "min_power": { 63 | "type": "number" 64 | }, 65 | "max_power": { 66 | "type": "number" 67 | }, 68 | "defense": { 69 | "type": "number" 70 | }, 71 | "infusion_slots": { 72 | "type": "array", 73 | "items": {} 74 | }, 75 | "secondary_suffix_item_id": { 76 | "type": "string" 77 | }, 78 | "stat_choices": { 79 | "type": "array", 80 | "items": { 81 | "type": "number" 82 | } 83 | } 84 | } 85 | } 86 | }, 87 | "required": [ 88 | "name", 89 | "type", 90 | "level", 91 | "rarity", 92 | "vendor_value", 93 | "default_skin", 94 | "game_types", 95 | "flags", 96 | "restrictions", 97 | "id", 98 | "chat_link", 99 | "icon", 100 | "details" 101 | ] 102 | }, 103 | "properties": {}, 104 | "additionalProperties": false 105 | } 106 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_itemstats.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "attributes": { 14 | "type": "object", 15 | "properties": { 16 | "Power": { 17 | "type": "number" 18 | }, 19 | "Precision": { 20 | "type": "number" 21 | }, 22 | "ConditionDamage": { 23 | "type": "number" 24 | } 25 | } 26 | } 27 | }, 28 | "required": ["id", "name", "attributes"] 29 | }, 30 | "properties": {}, 31 | "additionalProperties": false 32 | } 33 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_legends.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "code": { 11 | "type": "number" 12 | }, 13 | "swap": { 14 | "type": "number" 15 | }, 16 | "heal": { 17 | "type": "number" 18 | }, 19 | "elite": { 20 | "type": "number" 21 | }, 22 | "utilities": { 23 | "type": "array", 24 | "items": { 25 | "type": "number" 26 | } 27 | } 28 | }, 29 | "required": ["id", "code", "swap", "heal", "elite", "utilities"] 30 | }, 31 | "properties": {}, 32 | "additionalProperties": false 33 | } 34 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_mailcarriers.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "unlock_items": { 11 | "type": "array", 12 | "items": { 13 | "type": "number" 14 | } 15 | }, 16 | "order": { 17 | "type": "number" 18 | }, 19 | "icon": { 20 | "type": "string" 21 | }, 22 | "name": { 23 | "type": "string" 24 | }, 25 | "flags": { 26 | "type": "array", 27 | "items": {} 28 | } 29 | }, 30 | "required": ["id", "unlock_items", "order", "icon", "name", "flags"] 31 | }, 32 | "properties": {}, 33 | "additionalProperties": false 34 | } 35 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_maps.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "min_level": { 14 | "type": "number" 15 | }, 16 | "max_level": { 17 | "type": "number" 18 | }, 19 | "default_floor": { 20 | "type": "number" 21 | }, 22 | "type": { 23 | "type": "string" 24 | }, 25 | "floors": { 26 | "type": "array", 27 | "items": { 28 | "type": "number" 29 | } 30 | }, 31 | "region_id": { 32 | "type": "number" 33 | }, 34 | "region_name": { 35 | "type": "string" 36 | }, 37 | "continent_id": { 38 | "type": "number" 39 | }, 40 | "continent_name": { 41 | "type": "string" 42 | }, 43 | "map_rect": { 44 | "type": "array", 45 | "items": { 46 | "type": "array" 47 | } 48 | }, 49 | "continent_rect": { 50 | "type": "array", 51 | "items": { 52 | "type": "array" 53 | } 54 | } 55 | }, 56 | "required": [ 57 | "id", 58 | "name", 59 | "min_level", 60 | "max_level", 61 | "default_floor", 62 | "type", 63 | "floors", 64 | "region_id", 65 | "region_name", 66 | "continent_id", 67 | "continent_name", 68 | "map_rect", 69 | "continent_rect" 70 | ] 71 | }, 72 | "properties": {}, 73 | "additionalProperties": false 74 | } 75 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_masteries.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "requirement": { 14 | "type": "string" 15 | }, 16 | "order": { 17 | "type": "number" 18 | }, 19 | "background": { 20 | "type": "string" 21 | }, 22 | "region": { 23 | "type": "string" 24 | }, 25 | "levels": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "name": { 31 | "type": "string" 32 | }, 33 | "description": { 34 | "type": "string" 35 | }, 36 | "instruction": { 37 | "type": "string" 38 | }, 39 | "icon": { 40 | "type": "string" 41 | }, 42 | "point_cost": { 43 | "type": "number" 44 | }, 45 | "exp_cost": { 46 | "type": "number" 47 | } 48 | }, 49 | "required": ["name", "description", "instruction", "icon", "point_cost", "exp_cost"] 50 | } 51 | } 52 | }, 53 | "required": ["id", "name", "requirement", "order", "background", "region", "levels"] 54 | }, 55 | "properties": {}, 56 | "additionalProperties": false 57 | } 58 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_materials.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "items": { 14 | "type": "array", 15 | "items": { 16 | "type": "number" 17 | } 18 | }, 19 | "order": { 20 | "type": "number" 21 | } 22 | }, 23 | "required": ["id", "name", "items", "order"] 24 | }, 25 | "properties": {}, 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_minis.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "icon": { 14 | "type": "string" 15 | }, 16 | "order": { 17 | "type": "number" 18 | }, 19 | "item_id": { 20 | "type": "number" 21 | } 22 | }, 23 | "required": ["id", "name", "icon", "order", "item_id"] 24 | }, 25 | "properties": {}, 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_nodes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | } 10 | }, 11 | "required": ["id"] 12 | }, 13 | "properties": {}, 14 | "additionalProperties": false 15 | } 16 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_outfits.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "icon": { 14 | "type": "string" 15 | }, 16 | "unlock_items": { 17 | "type": "array", 18 | "items": { 19 | "type": "number" 20 | } 21 | } 22 | }, 23 | "required": ["id", "name", "icon", "unlock_items"] 24 | }, 25 | "properties": {}, 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pets.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "icon": { 17 | "type": "string" 18 | }, 19 | "skills": { 20 | "type": "array", 21 | "items": { 22 | "type": "object", 23 | "properties": { 24 | "id": { 25 | "type": "number" 26 | } 27 | }, 28 | "required": ["id"] 29 | } 30 | } 31 | }, 32 | "required": ["id", "name", "description", "icon", "skills"] 33 | }, 34 | "properties": {}, 35 | "additionalProperties": false 36 | } 37 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_professions.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "icon": { 14 | "type": "string" 15 | }, 16 | "icon_big": { 17 | "type": "string" 18 | }, 19 | "specializations": { 20 | "type": "array", 21 | "items": { 22 | "type": "number" 23 | } 24 | }, 25 | "weapons": { 26 | "type": "object", 27 | "properties": { 28 | "Dagger": { 29 | "type": "object", 30 | "properties": { 31 | "flags": { 32 | "type": "array", 33 | "items": { 34 | "type": "string" 35 | } 36 | }, 37 | "skills": { 38 | "type": "array", 39 | "items": { 40 | "type": "object", 41 | "properties": { 42 | "id": { 43 | "type": "number" 44 | }, 45 | "slot": { 46 | "type": "string" 47 | }, 48 | "offhand": { 49 | "type": "string" 50 | } 51 | }, 52 | "required": ["id", "slot"] 53 | } 54 | } 55 | } 56 | }, 57 | "Spear": { 58 | "type": "object", 59 | "properties": { 60 | "flags": { 61 | "type": "array", 62 | "items": { 63 | "type": "string" 64 | } 65 | }, 66 | "skills": { 67 | "type": "array", 68 | "items": { 69 | "type": "object", 70 | "properties": { 71 | "id": { 72 | "type": "number" 73 | }, 74 | "slot": { 75 | "type": "string" 76 | } 77 | }, 78 | "required": ["id", "slot"] 79 | } 80 | } 81 | } 82 | }, 83 | "Pistol": { 84 | "type": "object", 85 | "properties": { 86 | "flags": { 87 | "type": "array", 88 | "items": { 89 | "type": "string" 90 | } 91 | }, 92 | "skills": { 93 | "type": "array", 94 | "items": { 95 | "type": "object", 96 | "properties": { 97 | "id": { 98 | "type": "number" 99 | }, 100 | "slot": { 101 | "type": "string" 102 | }, 103 | "offhand": { 104 | "type": "string" 105 | } 106 | }, 107 | "required": ["id", "slot"] 108 | } 109 | } 110 | } 111 | }, 112 | "Rifle": { 113 | "type": "object", 114 | "properties": { 115 | "specialization": { 116 | "type": "number" 117 | }, 118 | "flags": { 119 | "type": "array", 120 | "items": { 121 | "type": "string" 122 | } 123 | }, 124 | "skills": { 125 | "type": "array", 126 | "items": { 127 | "type": "object", 128 | "properties": { 129 | "id": { 130 | "type": "number" 131 | }, 132 | "slot": { 133 | "type": "string" 134 | } 135 | }, 136 | "required": ["id", "slot"] 137 | } 138 | } 139 | } 140 | }, 141 | "Shortbow": { 142 | "type": "object", 143 | "properties": { 144 | "flags": { 145 | "type": "array", 146 | "items": { 147 | "type": "string" 148 | } 149 | }, 150 | "skills": { 151 | "type": "array", 152 | "items": { 153 | "type": "object", 154 | "properties": { 155 | "id": { 156 | "type": "number" 157 | }, 158 | "slot": { 159 | "type": "string" 160 | } 161 | }, 162 | "required": ["id", "slot"] 163 | } 164 | } 165 | } 166 | }, 167 | "Speargun": { 168 | "type": "object", 169 | "properties": { 170 | "flags": { 171 | "type": "array", 172 | "items": { 173 | "type": "string" 174 | } 175 | }, 176 | "skills": { 177 | "type": "array", 178 | "items": { 179 | "type": "object", 180 | "properties": { 181 | "id": { 182 | "type": "number" 183 | }, 184 | "slot": { 185 | "type": "string" 186 | } 187 | }, 188 | "required": ["id", "slot"] 189 | } 190 | } 191 | } 192 | }, 193 | "Staff": { 194 | "type": "object", 195 | "properties": { 196 | "specialization": { 197 | "type": "number" 198 | }, 199 | "flags": { 200 | "type": "array", 201 | "items": { 202 | "type": "string" 203 | } 204 | }, 205 | "skills": { 206 | "type": "array", 207 | "items": { 208 | "type": "object", 209 | "properties": { 210 | "id": { 211 | "type": "number" 212 | }, 213 | "slot": { 214 | "type": "string" 215 | } 216 | }, 217 | "required": ["id", "slot"] 218 | } 219 | } 220 | } 221 | }, 222 | "Sword": { 223 | "type": "object", 224 | "properties": { 225 | "flags": { 226 | "type": "array", 227 | "items": { 228 | "type": "string" 229 | } 230 | }, 231 | "skills": { 232 | "type": "array", 233 | "items": { 234 | "type": "object", 235 | "properties": { 236 | "id": { 237 | "type": "number" 238 | }, 239 | "slot": { 240 | "type": "string" 241 | }, 242 | "offhand": { 243 | "type": "string" 244 | } 245 | }, 246 | "required": ["id", "slot"] 247 | } 248 | } 249 | } 250 | } 251 | } 252 | }, 253 | "flags": { 254 | "type": "array", 255 | "items": {} 256 | }, 257 | "skills": { 258 | "type": "array", 259 | "items": { 260 | "type": "object", 261 | "properties": { 262 | "id": { 263 | "type": "number" 264 | }, 265 | "slot": { 266 | "type": "string" 267 | }, 268 | "type": { 269 | "type": "string" 270 | }, 271 | "source": { 272 | "type": "string" 273 | } 274 | }, 275 | "required": ["id", "slot", "type"] 276 | } 277 | }, 278 | "training": { 279 | "type": "array", 280 | "items": { 281 | "type": "object", 282 | "properties": { 283 | "id": { 284 | "type": "number" 285 | }, 286 | "category": { 287 | "type": "string" 288 | }, 289 | "name": { 290 | "type": "string" 291 | }, 292 | "track": { 293 | "type": "array", 294 | "items": { 295 | "type": "object", 296 | "properties": { 297 | "cost": { 298 | "type": "number" 299 | }, 300 | "type": { 301 | "type": "string" 302 | }, 303 | "trait_id": { 304 | "type": "number" 305 | }, 306 | "skill_id": { 307 | "type": "number" 308 | } 309 | }, 310 | "required": ["cost", "type"] 311 | } 312 | } 313 | }, 314 | "required": ["id", "category", "name", "track"] 315 | } 316 | } 317 | }, 318 | "required": ["id", "name", "icon", "icon_big", "specializations", "weapons", "flags", "skills", "training"] 319 | }, 320 | "properties": {}, 321 | "additionalProperties": false 322 | } 323 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_amulets.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "icon": { 14 | "type": "string" 15 | }, 16 | "attributes": { 17 | "type": "object", 18 | "properties": { 19 | "Toughness": { 20 | "type": "number" 21 | }, 22 | "Power": { 23 | "type": "number" 24 | }, 25 | "CritDamage": { 26 | "type": "number" 27 | } 28 | } 29 | } 30 | }, 31 | "required": ["id", "name", "icon", "attributes"] 32 | }, 33 | "properties": {}, 34 | "additionalProperties": false 35 | } 36 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_games.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "map_id": { 11 | "type": "number" 12 | }, 13 | "started": { 14 | "type": "string" 15 | }, 16 | "ended": { 17 | "type": "string" 18 | }, 19 | "result": { 20 | "type": "string" 21 | }, 22 | "team": { 23 | "type": "string" 24 | }, 25 | "profession": { 26 | "type": "string" 27 | }, 28 | "rating_type": { 29 | "type": "string" 30 | }, 31 | "scores": { 32 | "type": "object", 33 | "properties": { 34 | "red": { 35 | "type": "number" 36 | }, 37 | "blue": { 38 | "type": "number" 39 | } 40 | } 41 | } 42 | }, 43 | "required": ["id", "map_id", "started", "ended", "result", "team", "profession", "rating_type", "scores"] 44 | }, 45 | "properties": {}, 46 | "additionalProperties": false 47 | } 48 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_heroes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "type": { 17 | "type": "string" 18 | }, 19 | "stats": { 20 | "type": "object", 21 | "properties": { 22 | "offense": { 23 | "type": "number" 24 | }, 25 | "defense": { 26 | "type": "number" 27 | }, 28 | "speed": { 29 | "type": "number" 30 | } 31 | } 32 | }, 33 | "overlay": { 34 | "type": "string" 35 | }, 36 | "underlay": { 37 | "type": "string" 38 | }, 39 | "skins": { 40 | "type": "array", 41 | "items": { 42 | "type": "object", 43 | "properties": { 44 | "id": { 45 | "type": "number" 46 | }, 47 | "name": { 48 | "type": "string" 49 | }, 50 | "icon": { 51 | "type": "string" 52 | }, 53 | "default": { 54 | "type": "boolean" 55 | }, 56 | "unlock_items": { 57 | "type": "array", 58 | "items": { 59 | "type": "number" 60 | } 61 | } 62 | }, 63 | "required": ["id", "name", "icon", "default", "unlock_items"] 64 | } 65 | } 66 | }, 67 | "required": ["id", "name", "description", "type", "stats", "overlay", "underlay", "skins"] 68 | }, 69 | "properties": {}, 70 | "additionalProperties": false 71 | } 72 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_ranks.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "finisher_id": { 11 | "type": "number" 12 | }, 13 | "name": { 14 | "type": "string" 15 | }, 16 | "icon": { 17 | "type": "string" 18 | }, 19 | "min_rank": { 20 | "type": "number" 21 | }, 22 | "max_rank": { 23 | "type": "number" 24 | }, 25 | "levels": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "min_rank": { 31 | "type": "number" 32 | }, 33 | "max_rank": { 34 | "type": "number" 35 | }, 36 | "points": { 37 | "type": "number" 38 | } 39 | }, 40 | "required": ["min_rank", "max_rank", "points"] 41 | } 42 | } 43 | }, 44 | "required": ["id", "finisher_id", "name", "icon", "min_rank", "max_rank", "levels"] 45 | }, 46 | "properties": {}, 47 | "additionalProperties": false 48 | } 49 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_seasons.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "start": { 14 | "type": "string" 15 | }, 16 | "end": { 17 | "type": "string" 18 | }, 19 | "active": { 20 | "type": "boolean" 21 | }, 22 | "divisions": { 23 | "type": "array", 24 | "items": { 25 | "type": "object", 26 | "properties": { 27 | "name": { 28 | "type": "string" 29 | }, 30 | "flags": { 31 | "type": "array", 32 | "items": { 33 | "type": "string" 34 | } 35 | }, 36 | "large_icon": { 37 | "type": "string" 38 | }, 39 | "small_icon": { 40 | "type": "string" 41 | }, 42 | "pip_icon": { 43 | "type": "string" 44 | }, 45 | "tiers": { 46 | "type": "array", 47 | "items": { 48 | "type": "object", 49 | "properties": { 50 | "points": { 51 | "type": "number" 52 | } 53 | }, 54 | "required": ["points"] 55 | } 56 | } 57 | }, 58 | "required": ["name", "flags", "large_icon", "small_icon", "pip_icon", "tiers"] 59 | } 60 | }, 61 | "leaderboards": { 62 | "type": "object", 63 | "properties": { 64 | "legendary": { 65 | "type": "object", 66 | "properties": { 67 | "settings": { 68 | "type": "object", 69 | "properties": { 70 | "name": { 71 | "type": "string" 72 | }, 73 | "duration": { 74 | "type": "null" 75 | }, 76 | "scoring": { 77 | "type": "string" 78 | }, 79 | "tiers": { 80 | "type": "array", 81 | "items": { 82 | "type": "object", 83 | "properties": { 84 | "range": { 85 | "type": "array", 86 | "items": { 87 | "type": "number" 88 | } 89 | } 90 | }, 91 | "required": ["range"] 92 | } 93 | } 94 | } 95 | }, 96 | "scorings": { 97 | "type": "array", 98 | "items": { 99 | "type": "object", 100 | "properties": { 101 | "id": { 102 | "type": "string" 103 | }, 104 | "type": { 105 | "type": "string" 106 | }, 107 | "description": { 108 | "type": "string" 109 | }, 110 | "name": { 111 | "type": "string" 112 | }, 113 | "ordering": { 114 | "type": "string" 115 | } 116 | } 117 | } 118 | } 119 | } 120 | }, 121 | "guild": { 122 | "type": "object", 123 | "properties": { 124 | "settings": { 125 | "type": "object", 126 | "properties": { 127 | "name": { 128 | "type": "string" 129 | }, 130 | "duration": { 131 | "type": "null" 132 | }, 133 | "scoring": { 134 | "type": "string" 135 | }, 136 | "tiers": { 137 | "type": "array", 138 | "items": { 139 | "type": "object", 140 | "properties": { 141 | "color": { 142 | "type": "string" 143 | }, 144 | "type": { 145 | "type": "string" 146 | }, 147 | "name": { 148 | "type": "string" 149 | }, 150 | "range": { 151 | "type": "array", 152 | "items": { 153 | "type": "number" 154 | } 155 | } 156 | }, 157 | "required": ["color", "type", "name", "range"] 158 | } 159 | } 160 | } 161 | }, 162 | "scorings": { 163 | "type": "array", 164 | "items": { 165 | "type": "object", 166 | "properties": { 167 | "id": { 168 | "type": "string" 169 | }, 170 | "type": { 171 | "type": "string" 172 | }, 173 | "description": { 174 | "type": "string" 175 | }, 176 | "name": { 177 | "type": "string" 178 | }, 179 | "ordering": { 180 | "type": "string" 181 | } 182 | }, 183 | "required": ["id", "type", "description", "name", "ordering"] 184 | } 185 | } 186 | } 187 | } 188 | } 189 | }, 190 | "ranks": { 191 | "type": "array", 192 | "items": { 193 | "type": "object", 194 | "properties": { 195 | "name": { 196 | "type": "string" 197 | }, 198 | "description": { 199 | "type": "string" 200 | }, 201 | "icon": { 202 | "type": "string" 203 | }, 204 | "overlay": { 205 | "type": "string" 206 | }, 207 | "overlay_small": { 208 | "type": "string" 209 | }, 210 | "tiers": { 211 | "type": "array", 212 | "items": { 213 | "type": "object", 214 | "properties": { 215 | "rating": { 216 | "type": "number" 217 | } 218 | }, 219 | "required": ["rating"] 220 | } 221 | } 222 | }, 223 | "required": ["name", "description", "icon", "overlay", "overlay_small", "tiers"] 224 | } 225 | } 226 | }, 227 | "required": ["id", "name", "start", "end", "active", "divisions", "leaderboards"] 228 | }, 229 | "properties": {}, 230 | "additionalProperties": false 231 | } 232 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_seasons_ID_leaderboards_guild_eu.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "id": { 11 | "type": "string" 12 | }, 13 | "team": { 14 | "type": "string" 15 | }, 16 | "team_id": { 17 | "type": "number" 18 | }, 19 | "rank": { 20 | "type": "number" 21 | }, 22 | "date": { 23 | "type": "string" 24 | }, 25 | "scores": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "id": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "number" 35 | } 36 | }, 37 | "required": ["id", "value"] 38 | } 39 | } 40 | }, 41 | "required": ["name", "id", "rank", "date", "scores"] 42 | }, 43 | "properties": {}, 44 | "additionalProperties": false 45 | } 46 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_seasons_ID_leaderboards_guild_na.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "id": { 11 | "type": "string" 12 | }, 13 | "team": { 14 | "type": "string" 15 | }, 16 | "team_id": { 17 | "type": "number" 18 | }, 19 | "rank": { 20 | "type": "number" 21 | }, 22 | "date": { 23 | "type": "string" 24 | }, 25 | "scores": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "id": { 31 | "type": "string" 32 | }, 33 | "value": { 34 | "type": "number" 35 | } 36 | }, 37 | "required": ["id", "value"] 38 | } 39 | } 40 | }, 41 | "required": ["name", "id", "rank", "date", "scores"] 42 | }, 43 | "properties": {}, 44 | "additionalProperties": false 45 | } 46 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_seasons_ID_leaderboards_legendary_eu.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "rank": { 11 | "type": "number" 12 | }, 13 | "date": { 14 | "type": "string" 15 | }, 16 | "scores": { 17 | "type": "array", 18 | "items": { 19 | "type": "object", 20 | "properties": { 21 | "id": { 22 | "type": "string" 23 | }, 24 | "value": { 25 | "type": "number" 26 | } 27 | } 28 | } 29 | } 30 | }, 31 | "required": ["name", "rank", "date", "scores"] 32 | }, 33 | "properties": {}, 34 | "additionalProperties": false 35 | } 36 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_seasons_ID_leaderboards_legendary_na.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "rank": { 11 | "type": "number" 12 | }, 13 | "date": { 14 | "type": "string" 15 | }, 16 | "scores": { 17 | "type": "array", 18 | "items": { 19 | "type": "object", 20 | "properties": { 21 | "id": { 22 | "type": "string" 23 | }, 24 | "value": { 25 | "type": "number" 26 | } 27 | } 28 | } 29 | } 30 | }, 31 | "required": ["name", "rank", "date", "scores"] 32 | }, 33 | "properties": {}, 34 | "additionalProperties": false 35 | } 36 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_standings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_pvp_stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "pvp_rank": { 6 | "type": "number", 7 | "required": true 8 | }, 9 | "pvp_rank_points": { 10 | "type": "number", 11 | "required": true 12 | }, 13 | "pvp_rank_rollovers": { 14 | "type": "number", 15 | "required": true 16 | }, 17 | "aggregate": { 18 | "type": "object", 19 | "properties": { 20 | "wins": { 21 | "type": "number", 22 | "required": true 23 | }, 24 | "losses": { 25 | "type": "number", 26 | "required": true 27 | }, 28 | "desertions": { 29 | "type": "number", 30 | "required": true 31 | }, 32 | "byes": { 33 | "type": "number", 34 | "required": true 35 | }, 36 | "forfeits": { 37 | "type": "number", 38 | "required": true 39 | } 40 | }, 41 | "additionalProperties": false, 42 | "required": true 43 | }, 44 | "professions": { 45 | "type": "object", 46 | "properties": { 47 | "elementalist": { 48 | "type": "object", 49 | "properties": { 50 | "wins": { 51 | "type": "number", 52 | "required": true 53 | }, 54 | "losses": { 55 | "type": "number", 56 | "required": true 57 | }, 58 | "desertions": { 59 | "type": "number", 60 | "required": true 61 | }, 62 | "byes": { 63 | "type": "number", 64 | "required": true 65 | }, 66 | "forfeits": { 67 | "type": "number", 68 | "required": true 69 | } 70 | }, 71 | "additionalProperties": false, 72 | "required": true 73 | }, 74 | "warrior": { 75 | "type": "object", 76 | "properties": { 77 | "wins": { 78 | "type": "number", 79 | "required": true 80 | }, 81 | "losses": { 82 | "type": "number", 83 | "required": true 84 | }, 85 | "desertions": { 86 | "type": "number", 87 | "required": true 88 | }, 89 | "byes": { 90 | "type": "number", 91 | "required": true 92 | }, 93 | "forfeits": { 94 | "type": "number", 95 | "required": true 96 | } 97 | }, 98 | "additionalProperties": false, 99 | "required": true 100 | } 101 | }, 102 | "additionalProperties": false, 103 | "required": true 104 | }, 105 | "ladders": { 106 | "type": "object", 107 | "properties": { 108 | "ranked": { 109 | "type": "object", 110 | "properties": { 111 | "wins": { 112 | "type": "number", 113 | "required": true 114 | }, 115 | "losses": { 116 | "type": "number", 117 | "required": true 118 | }, 119 | "desertions": { 120 | "type": "number", 121 | "required": true 122 | }, 123 | "byes": { 124 | "type": "number", 125 | "required": true 126 | }, 127 | "forfeits": { 128 | "type": "number", 129 | "required": true 130 | } 131 | }, 132 | "additionalProperties": false, 133 | "required": true 134 | }, 135 | "unranked": { 136 | "type": "object", 137 | "properties": { 138 | "wins": { 139 | "type": "number", 140 | "required": true 141 | }, 142 | "losses": { 143 | "type": "number", 144 | "required": true 145 | }, 146 | "desertions": { 147 | "type": "number", 148 | "required": true 149 | }, 150 | "byes": { 151 | "type": "number", 152 | "required": true 153 | }, 154 | "forfeits": { 155 | "type": "number", 156 | "required": true 157 | } 158 | }, 159 | "additionalProperties": false, 160 | "required": true 161 | } 162 | }, 163 | "additionalProperties": false, 164 | "required": true 165 | } 166 | }, 167 | "additionalProperties": false 168 | } 169 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_quaggans.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "url": { 11 | "type": "string" 12 | } 13 | }, 14 | "required": ["id", "url"] 15 | }, 16 | "properties": {}, 17 | "additionalProperties": false 18 | } 19 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_races.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "skills": { 14 | "type": "array", 15 | "items": { 16 | "type": "number" 17 | } 18 | } 19 | }, 20 | "required": ["id", "name", "skills"] 21 | }, 22 | "properties": {}, 23 | "additionalProperties": false 24 | } 25 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_raids.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "wings": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "id": { 16 | "type": "string" 17 | }, 18 | "events": { 19 | "type": "array", 20 | "items": { 21 | "type": "object", 22 | "properties": { 23 | "id": { 24 | "type": "string" 25 | }, 26 | "type": { 27 | "type": "string" 28 | } 29 | }, 30 | "required": ["id", "type"] 31 | } 32 | } 33 | }, 34 | "required": ["id", "events"] 35 | } 36 | } 37 | }, 38 | "required": ["id", "wings"] 39 | }, 40 | "properties": {}, 41 | "additionalProperties": false 42 | } 43 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_recipes.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "type": { 11 | "type": "string" 12 | }, 13 | "output_item_id": { 14 | "type": "number" 15 | }, 16 | "output_item_count": { 17 | "type": "number" 18 | }, 19 | "time_to_craft_ms": { 20 | "type": "number" 21 | }, 22 | "disciplines": { 23 | "type": "array", 24 | "items": { 25 | "type": "string" 26 | } 27 | }, 28 | "min_rating": { 29 | "type": "number" 30 | }, 31 | "flags": { 32 | "type": "array", 33 | "items": { 34 | "type": "string" 35 | } 36 | }, 37 | "ingredients": { 38 | "type": "array", 39 | "items": { 40 | "type": "object", 41 | "properties": { 42 | "type": { 43 | "type": "string" 44 | }, 45 | "id": { 46 | "type": "number" 47 | }, 48 | "count": { 49 | "type": "number" 50 | } 51 | }, 52 | "required": ["type", "id", "count"] 53 | } 54 | }, 55 | "chat_link": { 56 | "type": "string" 57 | } 58 | }, 59 | "required": [ 60 | "id", 61 | "type", 62 | "output_item_id", 63 | "output_item_count", 64 | "time_to_craft_ms", 65 | "disciplines", 66 | "min_rating", 67 | "flags", 68 | "ingredients", 69 | "chat_link" 70 | ] 71 | }, 72 | "properties": {}, 73 | "additionalProperties": false 74 | } 75 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_recipes_search_INPUT.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_recipes_search_OUTPUT.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "number" 6 | }, 7 | "properties": {}, 8 | "additionalProperties": false 9 | } 10 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_skills.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "facts": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "text": { 16 | "type": "string" 17 | }, 18 | "type": { 19 | "type": "string" 20 | }, 21 | "icon": { 22 | "type": "string" 23 | }, 24 | "value": { 25 | "type": "number" 26 | }, 27 | "hit_count": { 28 | "type": "number" 29 | }, 30 | "dmg_multiplier": { 31 | "type": "number" 32 | } 33 | }, 34 | "required": ["text", "type", "icon"] 35 | } 36 | }, 37 | "description": { 38 | "type": "string" 39 | }, 40 | "icon": { 41 | "type": "string" 42 | }, 43 | "flags": { 44 | "type": "array", 45 | "items": { 46 | "type": "string" 47 | } 48 | }, 49 | "id": { 50 | "type": "number" 51 | }, 52 | "chat_link": { 53 | "type": "string" 54 | }, 55 | "type": { 56 | "type": "string" 57 | }, 58 | "weapon_type": { 59 | "type": "string" 60 | }, 61 | "professions": { 62 | "type": "array", 63 | "items": { 64 | "type": "string" 65 | } 66 | }, 67 | "slot": { 68 | "type": "string" 69 | }, 70 | "flip_skill": { 71 | "type": "number" 72 | }, 73 | "traited_facts": { 74 | "type": "array", 75 | "items": { 76 | "type": "object", 77 | "properties": { 78 | "text": { 79 | "type": "string" 80 | }, 81 | "type": { 82 | "type": "string" 83 | }, 84 | "icon": { 85 | "type": "string" 86 | }, 87 | "duration": { 88 | "type": "number" 89 | }, 90 | "status": { 91 | "type": "string" 92 | }, 93 | "description": { 94 | "type": "string" 95 | }, 96 | "apply_count": { 97 | "type": "number" 98 | }, 99 | "requires_trait": { 100 | "type": "number" 101 | } 102 | } 103 | } 104 | } 105 | }, 106 | "required": ["name", "facts", "description", "icon", "flags", "id", "chat_link"] 107 | }, 108 | "properties": {}, 109 | "additionalProperties": false 110 | } 111 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_skins.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string" 9 | }, 10 | "type": { 11 | "type": "string" 12 | }, 13 | "flags": { 14 | "type": "array", 15 | "items": { 16 | "type": "string" 17 | } 18 | }, 19 | "restrictions": { 20 | "type": "array", 21 | "items": {} 22 | }, 23 | "rarity": { 24 | "type": "string" 25 | }, 26 | "id": { 27 | "type": "number" 28 | }, 29 | "icon": { 30 | "type": "string" 31 | }, 32 | "details": { 33 | "type": "object", 34 | "properties": { 35 | "type": { 36 | "type": "string" 37 | }, 38 | "weight_class": { 39 | "type": "string" 40 | }, 41 | "dye_slots": { 42 | "type": "object", 43 | "properties": { 44 | "default": { 45 | "type": "array", 46 | "items": { 47 | "oneOf": [ 48 | { 49 | "type": "object", 50 | "properties": { 51 | "color_id": { 52 | "type": "number" 53 | }, 54 | "material": { 55 | "type": "string" 56 | } 57 | } 58 | }, 59 | { 60 | "type": "null" 61 | } 62 | ] 63 | } 64 | }, 65 | "overrides": { 66 | "type": "object", 67 | "properties": {} 68 | } 69 | } 70 | } 71 | } 72 | } 73 | }, 74 | "required": ["name", "type", "flags", "restrictions", "rarity", "id", "icon"] 75 | }, 76 | "properties": {}, 77 | "additionalProperties": false 78 | } 79 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_specializations.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "profession": { 14 | "type": "string" 15 | }, 16 | "elite": { 17 | "type": "boolean" 18 | }, 19 | "minor_traits": { 20 | "type": "array", 21 | "items": { 22 | "type": "number" 23 | } 24 | }, 25 | "major_traits": { 26 | "type": "array", 27 | "items": { 28 | "type": "number" 29 | } 30 | }, 31 | "icon": { 32 | "type": "string" 33 | }, 34 | "background": { 35 | "type": "string" 36 | }, 37 | "weapon_trait": { 38 | "type": "number" 39 | }, 40 | "profession_icon_big": { 41 | "type": "string" 42 | }, 43 | "profession_icon": { 44 | "type": "string" 45 | } 46 | }, 47 | "required": ["id", "name", "profession", "elite", "minor_traits", "major_traits", "icon", "background"] 48 | }, 49 | "properties": {}, 50 | "additionalProperties": false 51 | } 52 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_stories.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "season": { 11 | "type": "string" 12 | }, 13 | "name": { 14 | "type": "string" 15 | }, 16 | "description": { 17 | "type": "string" 18 | }, 19 | "timeline": { 20 | "type": "string" 21 | }, 22 | "level": { 23 | "type": "number" 24 | }, 25 | "order": { 26 | "type": "number" 27 | }, 28 | "chapters": { 29 | "type": "array", 30 | "items": {} 31 | } 32 | }, 33 | "required": ["id", "season", "name", "description", "timeline", "level", "order", "chapters"] 34 | }, 35 | "properties": {}, 36 | "additionalProperties": false 37 | } 38 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_stories_seasons.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "order": { 14 | "type": "number" 15 | }, 16 | "stories": { 17 | "type": "array", 18 | "items": { 19 | "type": "number" 20 | } 21 | } 22 | }, 23 | "required": ["id", "name", "order", "stories"] 24 | }, 25 | "properties": {}, 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_titles.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "achievement": { 14 | "type": "number" 15 | }, 16 | "achievements": { 17 | "type": "array", 18 | "items": { 19 | "type": "number" 20 | } 21 | } 22 | }, 23 | "required": ["id", "name", "achievement", "achievements"] 24 | }, 25 | "properties": {}, 26 | "additionalProperties": false 27 | } 28 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_tokeninfo.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "id": { 6 | "type": "string", 7 | "required": true 8 | }, 9 | "name": { 10 | "type": "string", 11 | "required": true 12 | }, 13 | "permissions": { 14 | "type": "array", 15 | "items": { 16 | "type": "string" 17 | }, 18 | "required": true 19 | }, 20 | "type": { 21 | "type": "string", 22 | "required": true 23 | } 24 | }, 25 | "additionalProperties": false 26 | } 27 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_traits.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "tier": { 11 | "type": "number" 12 | }, 13 | "order": { 14 | "type": "number" 15 | }, 16 | "name": { 17 | "type": "string" 18 | }, 19 | "description": { 20 | "type": "string" 21 | }, 22 | "slot": { 23 | "type": "string" 24 | }, 25 | "facts": { 26 | "type": "array", 27 | "items": { 28 | "type": "object", 29 | "properties": { 30 | "text": { 31 | "type": "string" 32 | }, 33 | "type": { 34 | "type": "string" 35 | }, 36 | "icon": { 37 | "type": "string" 38 | }, 39 | "duration": { 40 | "type": "number" 41 | }, 42 | "status": { 43 | "type": "string" 44 | }, 45 | "description": { 46 | "type": "string" 47 | }, 48 | "apply_count": { 49 | "type": "number" 50 | }, 51 | "percent": { 52 | "type": "number" 53 | } 54 | }, 55 | "required": ["text", "type", "icon"] 56 | } 57 | }, 58 | "skills": { 59 | "type": "array", 60 | "items": { 61 | "type": "object", 62 | "properties": { 63 | "name": { 64 | "type": "string" 65 | }, 66 | "facts": { 67 | "type": "array", 68 | "items": { 69 | "type": "object", 70 | "properties": { 71 | "text": { 72 | "type": "string" 73 | }, 74 | "type": { 75 | "type": "string" 76 | }, 77 | "icon": { 78 | "type": "string" 79 | }, 80 | "distance": { 81 | "type": "number" 82 | }, 83 | "value": { 84 | "type": "number" 85 | }, 86 | "hit_count": { 87 | "type": "number" 88 | }, 89 | "dmg_multiplier": { 90 | "type": "number" 91 | }, 92 | "duration": { 93 | "type": "number" 94 | } 95 | }, 96 | "required": ["text", "type", "icon"] 97 | } 98 | }, 99 | "description": { 100 | "type": "string" 101 | }, 102 | "icon": { 103 | "type": "string" 104 | }, 105 | "flags": { 106 | "type": "array", 107 | "items": {} 108 | }, 109 | "id": { 110 | "type": "number" 111 | }, 112 | "chat_link": { 113 | "type": "string" 114 | }, 115 | "traited_facts": { 116 | "type": "array", 117 | "items": { 118 | "type": "object", 119 | "properties": { 120 | "text": { 121 | "type": "string" 122 | }, 123 | "type": { 124 | "type": "string" 125 | }, 126 | "icon": { 127 | "type": "string" 128 | }, 129 | "duration": { 130 | "type": "number" 131 | }, 132 | "status": { 133 | "type": "string" 134 | }, 135 | "description": { 136 | "type": "string" 137 | }, 138 | "apply_count": { 139 | "type": "number" 140 | }, 141 | "requires_trait": { 142 | "type": "number" 143 | } 144 | } 145 | } 146 | } 147 | } 148 | } 149 | }, 150 | "specialization": { 151 | "type": "number" 152 | }, 153 | "icon": { 154 | "type": "string" 155 | } 156 | }, 157 | "required": ["id", "tier", "order", "name", "description", "slot", "facts", "specialization", "icon"] 158 | }, 159 | "properties": {}, 160 | "additionalProperties": false 161 | } 162 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_worlds.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "population": { 14 | "type": "string" 15 | } 16 | }, 17 | "required": ["id", "name", "population"] 18 | }, 19 | "properties": {}, 20 | "additionalProperties": false 21 | } 22 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_abilities.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "description": { 14 | "type": "string" 15 | }, 16 | "icon": { 17 | "type": "string" 18 | }, 19 | "ranks": { 20 | "type": "array", 21 | "items": { 22 | "type": "object", 23 | "properties": { 24 | "cost": { 25 | "type": "number" 26 | }, 27 | "effect": { 28 | "type": "string" 29 | } 30 | }, 31 | "required": ["cost", "effect"] 32 | } 33 | } 34 | }, 35 | "required": ["id", "name", "description", "icon", "ranks"] 36 | }, 37 | "properties": {}, 38 | "additionalProperties": false 39 | } 40 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_matches.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "start_time": { 11 | "type": "string" 12 | }, 13 | "end_time": { 14 | "type": "string" 15 | }, 16 | "scores": { 17 | "type": "object", 18 | "properties": { 19 | "red": { 20 | "type": "number" 21 | }, 22 | "blue": { 23 | "type": "number" 24 | }, 25 | "green": { 26 | "type": "number" 27 | } 28 | } 29 | }, 30 | "worlds": { 31 | "type": "object", 32 | "properties": { 33 | "red": { 34 | "type": "number" 35 | }, 36 | "blue": { 37 | "type": "number" 38 | }, 39 | "green": { 40 | "type": "number" 41 | } 42 | } 43 | }, 44 | "all_worlds": { 45 | "type": "object", 46 | "properties": { 47 | "red": { 48 | "type": "array", 49 | "items": { 50 | "type": "number" 51 | } 52 | }, 53 | "blue": { 54 | "type": "array", 55 | "items": { 56 | "type": "number" 57 | } 58 | }, 59 | "green": { 60 | "type": "array", 61 | "items": { 62 | "type": "number" 63 | } 64 | } 65 | } 66 | }, 67 | "deaths": { 68 | "type": "object", 69 | "properties": { 70 | "red": { 71 | "type": "number" 72 | }, 73 | "blue": { 74 | "type": "number" 75 | }, 76 | "green": { 77 | "type": "number" 78 | } 79 | } 80 | }, 81 | "kills": { 82 | "type": "object", 83 | "properties": { 84 | "red": { 85 | "type": "number" 86 | }, 87 | "blue": { 88 | "type": "number" 89 | }, 90 | "green": { 91 | "type": "number" 92 | } 93 | } 94 | }, 95 | "victory_points": { 96 | "type": "object", 97 | "properties": { 98 | "red": { 99 | "type": "number" 100 | }, 101 | "blue": { 102 | "type": "number" 103 | }, 104 | "green": { 105 | "type": "number" 106 | } 107 | } 108 | }, 109 | "skirmishes": { 110 | "type": "array", 111 | "items": { 112 | "type": "object", 113 | "properties": { 114 | "id": { 115 | "type": "number" 116 | }, 117 | "scores": { 118 | "type": "object", 119 | "properties": { 120 | "red": { 121 | "type": "number" 122 | }, 123 | "blue": { 124 | "type": "number" 125 | }, 126 | "green": { 127 | "type": "number" 128 | } 129 | } 130 | }, 131 | "map_scores": { 132 | "type": "array", 133 | "items": { 134 | "type": "object", 135 | "properties": { 136 | "type": { 137 | "type": "string" 138 | }, 139 | "scores": { 140 | "type": "object", 141 | "properties": { 142 | "red": { 143 | "type": "number" 144 | }, 145 | "blue": { 146 | "type": "number" 147 | }, 148 | "green": { 149 | "type": "number" 150 | } 151 | } 152 | } 153 | }, 154 | "required": ["type", "scores"] 155 | } 156 | } 157 | } 158 | } 159 | }, 160 | "maps": { 161 | "type": "array", 162 | "items": { 163 | "type": "object", 164 | "properties": { 165 | "id": { 166 | "type": "number" 167 | }, 168 | "type": { 169 | "type": "string" 170 | }, 171 | "scores": { 172 | "type": "object", 173 | "properties": { 174 | "red": { 175 | "type": "number" 176 | }, 177 | "blue": { 178 | "type": "number" 179 | }, 180 | "green": { 181 | "type": "number" 182 | } 183 | } 184 | }, 185 | "bonuses": { 186 | "type": "array", 187 | "items": { 188 | "type": "object", 189 | "properties": { 190 | "type": { 191 | "type": "string" 192 | }, 193 | "owner": { 194 | "type": "string" 195 | } 196 | } 197 | } 198 | }, 199 | "objectives": { 200 | "type": "array", 201 | "items": { 202 | "type": "object", 203 | "properties": { 204 | "id": { 205 | "type": "string" 206 | }, 207 | "type": { 208 | "type": "string" 209 | }, 210 | "owner": { 211 | "type": "string" 212 | }, 213 | "last_flipped": { 214 | "type": "string" 215 | }, 216 | "claimed_by": { 217 | "oneOf": [ 218 | { 219 | "type": "string" 220 | }, 221 | { 222 | "type": "null" 223 | } 224 | ] 225 | }, 226 | "claimed_at": { 227 | "oneOf": [ 228 | { 229 | "type": "string" 230 | }, 231 | { 232 | "type": "null" 233 | } 234 | ] 235 | }, 236 | "points_tick": { 237 | "type": "number" 238 | }, 239 | "points_capture": { 240 | "type": "number" 241 | }, 242 | "yaks_delivered": { 243 | "type": "number" 244 | }, 245 | "guild_upgrades": { 246 | "type": "array", 247 | "items": {} 248 | } 249 | }, 250 | "required": ["id", "type", "owner", "last_flipped", "points_tick", "points_capture"] 251 | } 252 | }, 253 | "deaths": { 254 | "type": "object", 255 | "properties": { 256 | "red": { 257 | "type": "number" 258 | }, 259 | "blue": { 260 | "type": "number" 261 | }, 262 | "green": { 263 | "type": "number" 264 | } 265 | } 266 | }, 267 | "kills": { 268 | "type": "object", 269 | "properties": { 270 | "red": { 271 | "type": "number" 272 | }, 273 | "blue": { 274 | "type": "number" 275 | }, 276 | "green": { 277 | "type": "number" 278 | } 279 | } 280 | } 281 | }, 282 | "required": ["id", "type", "scores", "bonuses", "objectives", "deaths", "kills"] 283 | } 284 | } 285 | }, 286 | "required": [ 287 | "id", 288 | "start_time", 289 | "end_time", 290 | "scores", 291 | "worlds", 292 | "all_worlds", 293 | "deaths", 294 | "kills", 295 | "victory_points", 296 | "skirmishes", 297 | "maps" 298 | ] 299 | }, 300 | "properties": {}, 301 | "additionalProperties": false 302 | } 303 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_matches_overview.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "worlds": { 11 | "type": "object", 12 | "properties": { 13 | "red": { 14 | "type": "number" 15 | }, 16 | "blue": { 17 | "type": "number" 18 | }, 19 | "green": { 20 | "type": "number" 21 | } 22 | } 23 | }, 24 | "all_worlds": { 25 | "type": "object", 26 | "properties": { 27 | "red": { 28 | "type": "array", 29 | "items": { 30 | "type": "number" 31 | } 32 | }, 33 | "blue": { 34 | "type": "array", 35 | "items": { 36 | "type": "number" 37 | } 38 | }, 39 | "green": { 40 | "type": "array", 41 | "items": { 42 | "type": "number" 43 | } 44 | } 45 | } 46 | }, 47 | "start_time": { 48 | "type": "string" 49 | }, 50 | "end_time": { 51 | "type": "string" 52 | } 53 | }, 54 | "required": ["id", "worlds", "all_worlds", "start_time", "end_time"] 55 | }, 56 | "properties": {}, 57 | "additionalProperties": false 58 | } 59 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_matches_scores.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "scores": { 11 | "type": "object", 12 | "properties": { 13 | "red": { 14 | "type": "number" 15 | }, 16 | "blue": { 17 | "type": "number" 18 | }, 19 | "green": { 20 | "type": "number" 21 | } 22 | } 23 | }, 24 | "victory_points": { 25 | "type": "object", 26 | "properties": { 27 | "red": { 28 | "type": "number" 29 | }, 30 | "blue": { 31 | "type": "number" 32 | }, 33 | "green": { 34 | "type": "number" 35 | } 36 | } 37 | }, 38 | "skirmishes": { 39 | "type": "array", 40 | "items": { 41 | "type": "object", 42 | "properties": { 43 | "id": { 44 | "type": "number" 45 | }, 46 | "scores": { 47 | "type": "object", 48 | "properties": { 49 | "red": { 50 | "type": "number" 51 | }, 52 | "blue": { 53 | "type": "number" 54 | }, 55 | "green": { 56 | "type": "number" 57 | } 58 | } 59 | }, 60 | "map_scores": { 61 | "type": "array", 62 | "items": { 63 | "type": "object", 64 | "properties": { 65 | "type": { 66 | "type": "string" 67 | }, 68 | "scores": { 69 | "type": "object", 70 | "properties": { 71 | "red": { 72 | "type": "number" 73 | }, 74 | "blue": { 75 | "type": "number" 76 | }, 77 | "green": { 78 | "type": "number" 79 | } 80 | } 81 | } 82 | }, 83 | "required": ["type", "scores"] 84 | } 85 | } 86 | }, 87 | "required": ["id", "scores", "map_scores"] 88 | } 89 | }, 90 | "maps": { 91 | "type": "array", 92 | "items": { 93 | "type": "object", 94 | "properties": { 95 | "id": { 96 | "type": "number" 97 | }, 98 | "type": { 99 | "type": "string" 100 | }, 101 | "scores": { 102 | "type": "object", 103 | "properties": { 104 | "red": { 105 | "type": "number" 106 | }, 107 | "blue": { 108 | "type": "number" 109 | }, 110 | "green": { 111 | "type": "number" 112 | } 113 | } 114 | } 115 | }, 116 | "required": ["id", "type", "scores"] 117 | } 118 | } 119 | }, 120 | "required": ["id", "scores", "victory_points", "skirmishes", "maps"] 121 | }, 122 | "properties": {}, 123 | "additionalProperties": false 124 | } 125 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_matches_stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "deaths": { 11 | "type": "object", 12 | "properties": { 13 | "red": { 14 | "type": "number" 15 | }, 16 | "blue": { 17 | "type": "number" 18 | }, 19 | "green": { 20 | "type": "number" 21 | } 22 | } 23 | }, 24 | "kills": { 25 | "type": "object", 26 | "properties": { 27 | "red": { 28 | "type": "number" 29 | }, 30 | "blue": { 31 | "type": "number" 32 | }, 33 | "green": { 34 | "type": "number" 35 | } 36 | } 37 | }, 38 | "maps": { 39 | "type": "array", 40 | "items": { 41 | "type": "object", 42 | "properties": { 43 | "id": { 44 | "type": "number" 45 | }, 46 | "type": { 47 | "type": "string" 48 | }, 49 | "deaths": { 50 | "type": "object", 51 | "properties": { 52 | "red": { 53 | "type": "number" 54 | }, 55 | "blue": { 56 | "type": "number" 57 | }, 58 | "green": { 59 | "type": "number" 60 | } 61 | } 62 | }, 63 | "kills": { 64 | "type": "object", 65 | "properties": { 66 | "red": { 67 | "type": "number" 68 | }, 69 | "blue": { 70 | "type": "number" 71 | }, 72 | "green": { 73 | "type": "number" 74 | } 75 | } 76 | } 77 | }, 78 | "required": ["id", "type", "deaths", "kills"] 79 | } 80 | } 81 | }, 82 | "required": ["id", "deaths", "kills", "maps"] 83 | }, 84 | "properties": {}, 85 | "additionalProperties": false 86 | } 87 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_matches_stats_ID_teams_blue_top_kdr.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_matches_stats_ID_teams_blue_top_kills.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": {}, 5 | "properties": {}, 6 | "additionalProperties": false 7 | } 8 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_objectives.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "string" 9 | }, 10 | "name": { 11 | "type": "string" 12 | }, 13 | "sector_id": { 14 | "type": "number" 15 | }, 16 | "type": { 17 | "type": "string" 18 | }, 19 | "map_type": { 20 | "type": "string" 21 | }, 22 | "map_id": { 23 | "type": "number" 24 | }, 25 | "upgrade_id": { 26 | "type": "number" 27 | }, 28 | "marker": { 29 | "type": "string" 30 | }, 31 | "chat_link": { 32 | "type": "string" 33 | }, 34 | "coord": { 35 | "type": "array", 36 | "items": { 37 | "type": "number" 38 | } 39 | }, 40 | "label_coord": { 41 | "type": "array", 42 | "items": { 43 | "type": "number" 44 | } 45 | } 46 | }, 47 | "required": ["id", "name", "sector_id", "type", "map_type", "map_id", "marker", "chat_link"] 48 | }, 49 | "properties": {}, 50 | "additionalProperties": false 51 | } 52 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_ranks.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "title": { 11 | "type": "string" 12 | }, 13 | "min_rank": { 14 | "type": "number" 15 | } 16 | }, 17 | "required": ["id", "title", "min_rank"] 18 | }, 19 | "properties": {}, 20 | "additionalProperties": false 21 | } 22 | -------------------------------------------------------------------------------- /worker/__schemas__/v2_wvw_upgrades.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "array", 4 | "items": { 5 | "type": "object", 6 | "properties": { 7 | "id": { 8 | "type": "number" 9 | }, 10 | "tiers": { 11 | "type": "array", 12 | "items": { 13 | "type": "object", 14 | "properties": { 15 | "name": { 16 | "type": "string" 17 | }, 18 | "yaks_required": { 19 | "type": "number" 20 | }, 21 | "upgrades": { 22 | "type": "array", 23 | "items": { 24 | "type": "object", 25 | "properties": { 26 | "name": { 27 | "type": "string" 28 | }, 29 | "description": { 30 | "type": "string" 31 | }, 32 | "icon": { 33 | "type": "string" 34 | } 35 | }, 36 | "required": ["name", "description", "icon"] 37 | } 38 | } 39 | }, 40 | "required": ["name", "yaks_required", "upgrades"] 41 | } 42 | } 43 | }, 44 | "required": ["id", "tiers"] 45 | }, 46 | "properties": {}, 47 | "additionalProperties": false 48 | } 49 | -------------------------------------------------------------------------------- /worker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api-snapshot-testing-worker", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "start": "node src/index.js", 6 | "format": "prettier --print-width 120 --no-semi --single-quote --no-bracket-spacing --write 'src/**/*.js' && standard --fix 'src/**/*.js'", 7 | "format:schemas": "prettier --print-width 120 --no-semi --single-quote --no-bracket-spacing --write '__schemas__/**/*.json'" 8 | }, 9 | "dependencies": { 10 | "json-diff": "^0.5.2", 11 | "node-fetch": "^1.7.3", 12 | "qs": "^6.5.1", 13 | "validate-by-example": "^1.5.0" 14 | }, 15 | "devDependencies": { 16 | "prettier": "^1.7.2", 17 | "standard": "^10.0.3" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /worker/src/endpoints.js: -------------------------------------------------------------------------------- 1 | const CHARACTER = 'Eff Testing Ele' 2 | 3 | const endpoints = [ 4 | { 5 | name: '/v2/account', 6 | url: '/v2/account', 7 | matchSchema: true 8 | }, 9 | { 10 | name: '/v2/account/achievements', 11 | url: '/v2/account/achievements', 12 | matchSchema: true 13 | }, 14 | { 15 | name: '/v2/account/bank', 16 | url: '/v2/account/bank', 17 | matchSchema: true 18 | }, 19 | { 20 | name: '/v2/account/dungeons', 21 | url: '/v2/account/dungeons', 22 | matchSchema: true 23 | }, 24 | { 25 | name: '/v2/account/dyes', 26 | url: '/v2/account/dyes', 27 | matchSchema: true 28 | }, 29 | { 30 | name: '/v2/account/finishers', 31 | url: '/v2/account/finishers', 32 | matchSchema: true 33 | }, 34 | { 35 | name: '/v2/account/gliders', 36 | url: '/v2/account/gliders', 37 | matchSchema: true 38 | }, 39 | { 40 | name: '/v2/account/home/cats', 41 | url: '/v2/account/home/cats', 42 | matchSchema: true 43 | }, 44 | { 45 | name: '/v2/account/home/nodes', 46 | url: '/v2/account/home/nodes', 47 | matchSchema: true 48 | }, 49 | { 50 | name: '/v2/account/inventory', 51 | url: '/v2/account/inventory', 52 | matchSchema: true 53 | }, 54 | { 55 | name: '/v2/account/mailcarriers', 56 | url: '/v2/account/mailcarriers', 57 | matchSchema: true 58 | }, 59 | { 60 | name: '/v2/account/masteries', 61 | url: '/v2/account/masteries', 62 | matchSchema: true 63 | }, 64 | { 65 | name: '/v2/account/mastery/points', 66 | url: '/v2/account/mastery/points', 67 | matchSchema: true 68 | }, 69 | { 70 | name: '/v2/account/materials', 71 | url: '/v2/account/materials', 72 | matchSchema: true 73 | }, 74 | { 75 | name: '/v2/account/minis', 76 | url: '/v2/account/minis', 77 | matchSchema: true 78 | }, 79 | { 80 | name: '/v2/account/outfits', 81 | url: '/v2/account/outfits', 82 | matchSchema: true 83 | }, 84 | { 85 | name: '/v2/account/pvp/heroes', 86 | url: '/v2/account/pvp/heroes', 87 | matchSchema: true 88 | }, 89 | { 90 | name: '/v2/account/raids', 91 | url: '/v2/account/raids', 92 | matchSchema: true 93 | }, 94 | { 95 | name: '/v2/account/recipes', 96 | url: '/v2/account/recipes', 97 | matchSchema: true 98 | }, 99 | { 100 | name: '/v2/account/skins', 101 | url: '/v2/account/skins', 102 | matchSchema: true 103 | }, 104 | { 105 | name: '/v2/account/titles', 106 | url: '/v2/account/titles', 107 | matchSchema: true 108 | }, 109 | { 110 | name: '/v2/account/wallet', 111 | url: '/v2/account/wallet', 112 | matchSchema: true 113 | }, 114 | { 115 | name: '/v2/achievements', 116 | url: '/v2/achievements?ids=3487,2933,1573', 117 | matchSchema: true 118 | }, 119 | { 120 | name: '/v2/achievements/categories', 121 | url: '/v2/achievements/categories?ids=36,43,57', 122 | matchSchema: true 123 | }, 124 | { 125 | name: '/v2/achievements/groups', 126 | url: 127 | '/v2/achievements/groups?ids=BE8B9954-5B55-4FCB-9022-B871AD00EAAB,65B4B678-607E-4D97-B458-076C3E96A810,B42E2379-9599-46CA-9D4A-40A27E192BBE', 128 | matchSchema: true 129 | }, 130 | { 131 | name: '/v2/backstory/answers', 132 | url: '/v2/backstory/answers?ids=22-109,188-189,32-142', 133 | matchSchema: true 134 | }, 135 | { 136 | name: '/v2/backstory/questions', 137 | url: '/v2/backstory/questions?ids=183,17,30', 138 | matchSchema: true 139 | }, 140 | { 141 | name: '/v2/build', 142 | url: '/v2/build', 143 | matchSchema: true 144 | }, 145 | { 146 | name: '/v2/cats', 147 | url: '/v2/cats?ids=19,16,4', 148 | matchSchema: true 149 | }, 150 | { 151 | name: '/v2/characters', 152 | url: '/v2/characters?page=0&page_size=200', 153 | matchSchema: true 154 | }, 155 | { 156 | name: '/v2/characters/ID/backstory', 157 | url: `/v2/characters/${CHARACTER}/backstory`, 158 | matchSchema: true 159 | }, 160 | { 161 | name: '/v2/characters/ID/core', 162 | url: `/v2/characters/${CHARACTER}/core`, 163 | matchSchema: true 164 | }, 165 | { 166 | name: '/v2/characters/ID/crafting', 167 | url: `/v2/characters/${CHARACTER}/crafting`, 168 | matchSchema: true 169 | }, 170 | { 171 | name: '/v2/characters/ID/equipment', 172 | url: `/v2/characters/${CHARACTER}/equipment`, 173 | matchSchema: true 174 | }, 175 | { 176 | name: '/v2/characters/ID/heropoints', 177 | url: `/v2/characters/${CHARACTER}/heropoints`, 178 | matchSchema: true 179 | }, 180 | { 181 | name: '/v2/characters/ID/inventory', 182 | url: `/v2/characters/${CHARACTER}/inventory`, 183 | matchSchema: true 184 | }, 185 | { 186 | name: '/v2/characters/ID/recipes', 187 | url: `/v2/characters/${CHARACTER}/recipes`, 188 | matchSchema: true 189 | }, 190 | { 191 | name: '/v2/characters/ID/sab', 192 | url: `/v2/characters/${CHARACTER}/sab`, 193 | matchSchema: true 194 | }, 195 | { 196 | name: '/v2/characters/ID/training', 197 | url: `/v2/characters/${CHARACTER}/training`, 198 | matchSchema: true 199 | }, 200 | { 201 | name: '/v2/characters/ID/quests', 202 | url: `/v2/characters/${CHARACTER}/quests`, 203 | matchSchema: true 204 | }, 205 | { 206 | name: '/v2/colors', 207 | url: '/v2/colors', 208 | matchSchema: true 209 | }, 210 | { 211 | name: '/v2/commerce/delivery', 212 | url: '/v2/commerce/delivery', 213 | matchSchema: true 214 | }, 215 | { 216 | name: '/v2/commerce/exchange/coins', 217 | url: '/v2/commerce/exchange/coins?quantity=12332', 218 | matchSchema: true 219 | }, 220 | { 221 | name: '/v2/commerce/exchange/gems', 222 | url: '/v2/commerce/exchange/gems?quantity=12332', 223 | matchSchema: true 224 | }, 225 | { 226 | name: '/v2/commerce/listings', 227 | url: '/v2/commerce/listings?ids=33867,25413,38289', 228 | matchSchema: true 229 | }, 230 | { 231 | name: '/v2/commerce/prices', 232 | url: '/v2/commerce/prices?ids=9039,11991,77655', 233 | matchSchema: true 234 | }, 235 | { 236 | name: '/v2/commerce/transactions/current/buys', 237 | url: '/v2/commerce/transactions/current/buys', 238 | matchSchema: true 239 | }, 240 | { 241 | name: '/v2/commerce/transactions/current/sells', 242 | url: '/v2/commerce/transactions/current/sells', 243 | matchSchema: true 244 | }, 245 | { 246 | name: '/v2/commerce/transactions/history/buys', 247 | url: '/v2/commerce/transactions/history/buys', 248 | matchSchema: true 249 | }, 250 | { 251 | name: '/v2/commerce/transactions/history/sells', 252 | url: '/v2/commerce/transactions/history/sells', 253 | matchSchema: true 254 | }, 255 | { 256 | name: '/v2/continents', 257 | url: '/v2/continents?ids=1,2', 258 | matchSchema: true 259 | }, 260 | { 261 | name: '/v2/currencies', 262 | url: '/v2/currencies?ids=31,32,26', 263 | matchSchema: true 264 | }, 265 | { 266 | name: '/v2/dungeons', 267 | url: '/v2/dungeons?ids=citadel_of_flame,twilight_arbor,crucible_of_eternity', 268 | matchSchema: true 269 | }, 270 | { 271 | name: '/v2/emblem/foregrounds', 272 | url: '/v2/emblem/foregrounds?ids=187,107,235', 273 | matchSchema: true 274 | }, 275 | { 276 | name: '/v2/emblem/backgrounds', 277 | url: '/v2/emblem/backgrounds?ids=27,15,7', 278 | matchSchema: true 279 | }, 280 | { 281 | name: '/v2/files', 282 | url: '/v2/files?ids=ui_major_trait_mask,map_crafting_artificer,map_poi', 283 | matchSchema: true 284 | }, 285 | { 286 | name: '/v2/finishers', 287 | url: '/v2/finishers?ids=55,41,69', 288 | matchSchema: true 289 | }, 290 | { 291 | name: '/v2/gliders', 292 | url: '/v2/gliders?ids=17,37,22', 293 | matchSchema: true 294 | }, 295 | { 296 | name: '/v2/guild/ID', 297 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44', 298 | matchSchema: true 299 | }, 300 | { 301 | name: '/v2/guild/ID/log', 302 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/log', 303 | matchSchema: true 304 | }, 305 | { 306 | name: '/v2/guild/ID/members', 307 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/members', 308 | matchSchema: true 309 | }, 310 | { 311 | name: '/v2/guild/ID/ranks', 312 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/ranks', 313 | matchSchema: true 314 | }, 315 | { 316 | name: '/v2/guild/ID/stash', 317 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/stash', 318 | matchSchema: true 319 | }, 320 | { 321 | name: '/v2/guild/ID/storage', 322 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/storage', 323 | matchSchema: true 324 | }, 325 | { 326 | name: '/v2/guild/ID/teams', 327 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/teams', 328 | matchSchema: true 329 | }, 330 | { 331 | name: '/v2/guild/ID/treasury', 332 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/treasury', 333 | matchSchema: true 334 | }, 335 | { 336 | name: '/v2/guild/ID/upgrades', 337 | url: '/v2/guild/14762DCE-C2A4-E711-80D5-441EA14F1E44/upgrades', 338 | matchSchema: true 339 | }, 340 | { 341 | name: '/v2/guild/permissions', 342 | url: '/v2/guild/permissions?ids=ClaimableActivate,EditRoles,SetGuildHall', 343 | matchSchema: true 344 | }, 345 | { 346 | name: '/v2/guild/search', 347 | url: '/v2/guild/search?name=Lqibzzexgvkikpydotxsvijehyhexd', 348 | matchSchema: true 349 | }, 350 | { 351 | name: '/v2/guild/upgrades', 352 | url: '/v2/guild/upgrades?ids=100,572,86', 353 | matchSchema: true 354 | }, 355 | { 356 | name: '/v2/items', 357 | url: '/v2/items?ids=80118,70120,14639', 358 | matchSchema: true 359 | }, 360 | { 361 | name: '/v2/itemstats', 362 | url: '/v2/itemstats?ids=1087,501,1078', 363 | matchSchema: true 364 | }, 365 | { 366 | name: '/v2/legends', 367 | url: '/v2/legends?ids=Legend5,Legend2,Legend1', 368 | matchSchema: true 369 | }, 370 | { 371 | name: '/v2/mailcarriers', 372 | url: '/v2/mailcarriers?ids=16,13,3', 373 | matchSchema: true 374 | }, 375 | { 376 | name: '/v2/maps', 377 | url: '/v2/maps?ids=416,20,474', 378 | matchSchema: true 379 | }, 380 | { 381 | name: '/v2/masteries', 382 | url: '/v2/masteries?ids=1,2,4', 383 | matchSchema: true 384 | }, 385 | { 386 | name: '/v2/materials', 387 | url: '/v2/materials?ids=5,29,6', 388 | matchSchema: true 389 | }, 390 | { 391 | name: '/v2/minis', 392 | url: '/v2/minis?ids=183,530,292', 393 | matchSchema: true 394 | }, 395 | { 396 | name: '/v2/nodes', 397 | url: '/v2/nodes?ids=enchanted_treasure_chest,quartz_node,orichalcum_ore_node', 398 | matchSchema: true 399 | }, 400 | { 401 | name: '/v2/outfits', 402 | url: '/v2/outfits?ids=24,31,42', 403 | matchSchema: true 404 | }, 405 | { 406 | name: '/v2/pets', 407 | url: '/v2/pets?ids=36,42,20', 408 | matchSchema: true 409 | }, 410 | { 411 | name: '/v2/professions', 412 | url: '/v2/professions?ids=Engineer,Warrior,Thief', 413 | matchSchema: true 414 | }, 415 | { 416 | name: '/v2/pvp/amulets', 417 | url: '/v2/pvp/amulets?ids=30,13,5', 418 | matchSchema: true 419 | }, 420 | { 421 | name: '/v2/pvp/games', 422 | url: '/v2/pvp/games?ids=A3DC3860-73BB-4B6B-A99B-F5F47A76E470,C27A2C25-4BA8-48A4-8597-791A4071B165', 423 | matchSchema: true 424 | }, 425 | { 426 | name: '/v2/pvp/heroes', 427 | url: 428 | '/v2/pvp/heroes?ids=BEA79596-CA8B-4D46-9B9C-EA1B606BCF42,B7EA9889-5F16-4636-9705-4FCAF8B39ECD,CF977AE5-C605-4586-A802-3E25F0F35772', 429 | matchSchema: true 430 | }, 431 | { 432 | name: '/v2/pvp/ranks', 433 | url: '/v2/pvp/ranks?ids=4,7,1', 434 | matchSchema: true 435 | }, 436 | { 437 | name: '/v2/pvp/seasons', 438 | url: 439 | '/v2/pvp/seasons?ids=D1777261-555B-4B72-A27E-BDC96EC393D5,A54849B7-7DBD-4958-91EF-72E18CD659BA,2B2E80D3-0A74-424F-B0EA-E221500B323C', 440 | matchSchema: true 441 | }, 442 | { 443 | name: '/v2/pvp/seasons/ID/leaderboards/legendary/eu', 444 | url: '/v2/pvp/seasons/D1777261-555B-4B72-A27E-BDC96EC393D5/leaderboards/legendary/eu', 445 | matchSchema: true 446 | }, 447 | { 448 | name: '/v2/pvp/seasons/ID/leaderboards/legendary/na', 449 | url: '/v2/pvp/seasons/D1777261-555B-4B72-A27E-BDC96EC393D5/leaderboards/legendary/na', 450 | matchSchema: true 451 | }, 452 | { 453 | name: '/v2/pvp/seasons/ID/leaderboards/guild/eu', 454 | url: '/v2/pvp/seasons/D1777261-555B-4B72-A27E-BDC96EC393D5/leaderboards/guild/eu', 455 | matchSchema: true 456 | }, 457 | { 458 | name: '/v2/pvp/seasons/ID/leaderboards/guild/na', 459 | url: '/v2/pvp/seasons/D1777261-555B-4B72-A27E-BDC96EC393D5/leaderboards/guild/na', 460 | matchSchema: true 461 | }, 462 | { 463 | name: '/v2/pvp/standings', 464 | url: '/v2/pvp/standings', 465 | matchSchema: true 466 | }, 467 | { 468 | name: '/v2/pvp/stats', 469 | url: '/v2/pvp/stats', 470 | matchSchema: true 471 | }, 472 | { 473 | name: '/v2/quaggans', 474 | url: '/v2/quaggans?ids=coffee,aloha,bear', 475 | matchSchema: true 476 | }, 477 | { 478 | name: '/v2/races', 479 | url: '/v2/races?ids=Asura,Human,Sylvari', 480 | matchSchema: true 481 | }, 482 | { 483 | name: '/v2/raids', 484 | url: '/v2/raids?ids=bastion_of_the_penitent,forsaken_thicket', 485 | matchSchema: true 486 | }, 487 | { 488 | name: '/v2/recipes', 489 | url: '/v2/recipes?ids=4023,11231,10947', 490 | matchSchema: true 491 | }, 492 | { 493 | name: '/v2/recipes/search/OUTPUT', 494 | url: '/v2/recipes/search?output=12312', 495 | matchSchema: true 496 | }, 497 | { 498 | name: '/v2/recipes/search/INPUT', 499 | url: '/v2/recipes/search?input=12543', 500 | matchSchema: true 501 | }, 502 | { 503 | name: '/v2/skills', 504 | url: '/v2/skills?ids=39895,37929,10219', 505 | matchSchema: true 506 | }, 507 | { 508 | name: '/v2/skins', 509 | url: '/v2/skins?ids=5259,5508,1273', 510 | matchSchema: true 511 | }, 512 | { 513 | name: '/v2/specializations', 514 | url: '/v2/specializations?ids=39,55,36', 515 | matchSchema: true 516 | }, 517 | { 518 | name: '/v2/stories', 519 | url: '/v2/stories?ids=82,31,27', 520 | matchSchema: true 521 | }, 522 | { 523 | name: '/v2/stories/seasons', 524 | url: 525 | '/v2/stories/seasons?ids=EAB597C0-C484-4FD3-9430-31433BAC81B6,215AAA0F-CDAC-4F93-86DA-C155A99B5784,09766A86-D88D-4DF2-9385-259E9A8CA583', 526 | matchSchema: true 527 | }, 528 | { 529 | name: '/v2/titles', 530 | url: '/v2/titles?ids=176,206,70', 531 | matchSchema: true 532 | }, 533 | { 534 | name: '/v2/tokeninfo', 535 | url: '/v2/tokeninfo', 536 | matchSchema: true 537 | }, 538 | { 539 | name: '/v2/traits', 540 | url: '/v2/traits?ids=1832,1859,674', 541 | matchSchema: true 542 | }, 543 | { 544 | name: '/v2/worlds', 545 | url: '/v2/worlds?ids=1021,1023,2012', 546 | matchSchema: true 547 | }, 548 | { 549 | name: '/v2/wvw/abilities', 550 | url: '/v2/wvw/abilities?ids=9,10,19', 551 | matchSchema: true 552 | }, 553 | { 554 | name: '/v2/wvw/matches', 555 | url: '/v2/wvw/matches?ids=2-3,2-2,2-1', 556 | matchSchema: true 557 | }, 558 | { 559 | name: '/v2/wvw/matches/overview', 560 | url: '/v2/wvw/matches/overview?ids=2-4,2-1,2-2', 561 | matchSchema: true 562 | }, 563 | { 564 | name: '/v2/wvw/matches/scores', 565 | url: '/v2/wvw/matches/scores?ids=2-2,2-3,2-5', 566 | matchSchema: true 567 | }, 568 | { 569 | name: '/v2/wvw/matches/stats', 570 | url: '/v2/wvw/matches/stats?ids=2-5,2-1,2-3', 571 | matchSchema: true 572 | }, 573 | { 574 | name: '/v2/wvw/matches/stats/ID/teams/blue/top/kdr', 575 | url: '/v2/wvw/matches/stats/2-2/teams/blue/top/kdr', 576 | matchSchema: true 577 | }, 578 | { 579 | name: '/v2/wvw/matches/stats/ID/teams/blue/top/kills', 580 | url: '/v2/wvw/matches/stats/2-2/teams/blue/top/kills', 581 | matchSchema: true 582 | }, 583 | { 584 | name: '/v2/wvw/objectives', 585 | url: '/v2/wvw/objectives?ids=1102-104,968-77,968-97', 586 | matchSchema: true 587 | }, 588 | { 589 | name: '/v2/wvw/ranks', 590 | url: '/v2/wvw/ranks?ids=51,77,97', 591 | matchSchema: true 592 | }, 593 | { 594 | name: '/v2/wvw/upgrades', 595 | url: '/v2/wvw/upgrades?ids=27,7,19', 596 | matchSchema: true 597 | } 598 | ] 599 | 600 | module.exports = endpoints 601 | -------------------------------------------------------------------------------- /worker/src/generateUrl.js: -------------------------------------------------------------------------------- 1 | const qs = require('qs') 2 | 3 | const API_KEY = '564F181A-F0FC-114A-A55D-3C1DCD45F3767AF3848F-AB29-4EBF-9594-F91E6A75E015' 4 | 5 | function generateUrl (url) { 6 | const splitUrl = url.split('?') 7 | url = splitUrl[0] 8 | 9 | const query = Object.assign(qs.parse(splitUrl[1] || ''), { 10 | v: 'latest', 11 | access_token: API_KEY, 12 | lang: 'en' 13 | }) 14 | 15 | return `https://api.guildwars2.com${url}?${qs.stringify(query)}` 16 | } 17 | 18 | module.exports = generateUrl 19 | -------------------------------------------------------------------------------- /worker/src/index.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const runTests = require('./runTests') 4 | 5 | async function runScheduledTests () { 6 | const results = await runTests() 7 | 8 | const content = { 9 | updated_at: new Date(), 10 | data: results 11 | } 12 | 13 | const file = path.join(__dirname, '/../latest.json') 14 | fs.writeFileSync(file, JSON.stringify(content), 'utf-8') 15 | } 16 | 17 | runScheduledTests() 18 | 19 | if (!process.env.TRAIN && !process.env.TRAIN_MISSING) { 20 | setInterval(() => { 21 | runScheduledTests() 22 | }, 60 * 1000) 23 | } 24 | -------------------------------------------------------------------------------- /worker/src/matchSchema.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const {train, validate} = require('validate-by-example') 4 | const toFileName = require('./toFileName') 5 | 6 | function matchSchema (endpoint, content) { 7 | const filename = path.join(__dirname, '/../__schemas__/' + toFileName(endpoint.name)) 8 | 9 | if (process.env.TRAIN || (process.env.TRAIN_MISSING && !fs.existsSync(filename))) { 10 | const schema = train(content) 11 | 12 | // Validate that the schema works 13 | const result = validate(schema, content) 14 | if (!result.valid) { 15 | console.log('Failed automatically training schema for ' + endpoint.name) 16 | return {} 17 | } 18 | 19 | fs.writeFileSync(filename, JSON.stringify(schema, null, 2), 'utf-8') 20 | return {schemaValid: true} 21 | } 22 | 23 | if (!fs.existsSync(filename)) { 24 | console.log(`/WARN\\ Missing schema for ${endpoint.name}`) 25 | return {} 26 | } 27 | 28 | const schema = JSON.parse(fs.readFileSync(filename, 'utf-8')) 29 | const result = validate(schema, content) 30 | 31 | if (result.valid) { 32 | return {schemaValid: true} 33 | } 34 | 35 | return { 36 | schemaValid: false, 37 | schemaChanges: formatErrors(result.errors) 38 | } 39 | } 40 | 41 | function formatErrors (errors) { 42 | return errors.map(error => `'${error.field}' ${error.message}`).join('\n') 43 | } 44 | 45 | module.exports = matchSchema 46 | -------------------------------------------------------------------------------- /worker/src/requestApi.js: -------------------------------------------------------------------------------- 1 | const fetch = require('node-fetch') 2 | 3 | async function requestApi (url) { 4 | const start = new Date().getTime() 5 | let response = null 6 | 7 | try { 8 | response = await fetch(url) 9 | } catch (err) {} 10 | 11 | const end = new Date().getTime() 12 | 13 | if (!response) { 14 | return { 15 | duration: end - start, 16 | response: { 17 | status: 599, 18 | content: '' 19 | } 20 | } 21 | } 22 | 23 | const content = await response.text() 24 | let json = null 25 | 26 | try { 27 | json = JSON.parse(content) 28 | } catch (err) {} 29 | 30 | return { 31 | duration: end - start, 32 | response: { 33 | status: response.status, 34 | content: json || content 35 | } 36 | } 37 | } 38 | 39 | module.exports = requestApi 40 | -------------------------------------------------------------------------------- /worker/src/runTests.js: -------------------------------------------------------------------------------- 1 | const testEndpoint = require('./testEndpoint') 2 | const endpoints = require('./endpoints') 3 | 4 | async function runTests () { 5 | console.log('='.repeat(50)) 6 | console.log(`> Testing ${endpoints.length} API endpoints (${new Date().toISOString()})`) 7 | 8 | let results = [] 9 | 10 | for (let i = 0; i !== endpoints.length; i++) { 11 | results.push(await testEndpoint(endpoints[i])) 12 | } 13 | 14 | let possiblyBroken = results.filter(x => x.schemaValid === false) 15 | let definitelyBroken = results.filter(x => x.status >= 400) 16 | 17 | if (definitelyBroken.length > 0) { 18 | console.log(`❗ ERROR: ${definitelyBroken.length} API endpoint(s)`) 19 | } 20 | 21 | if (possiblyBroken.length > 0) { 22 | console.log(`⚠️ WARNING: ${possiblyBroken.length} API endpoint(s)`) 23 | } 24 | 25 | console.log(`✔️ OK: ${results.length - possiblyBroken.length - definitelyBroken.length} API endpoint(s)`) 26 | console.log('='.repeat(50)) 27 | console.log() 28 | 29 | return results 30 | } 31 | 32 | module.exports = runTests 33 | -------------------------------------------------------------------------------- /worker/src/testEndpoint.js: -------------------------------------------------------------------------------- 1 | const generateUrl = require('./generateUrl') 2 | const requestApi = require('./requestApi') 3 | const matchSchema = require('./matchSchema') 4 | 5 | async function testEndpoint (endpoint) { 6 | const url = generateUrl(endpoint.url) 7 | const {duration, response} = await requestApi(url) 8 | 9 | const error = response.status >= 400 && response.content && response.content.text 10 | 11 | let result = { 12 | url, 13 | name: endpoint.name, 14 | status: response.status, 15 | duration, 16 | error 17 | } 18 | 19 | if (result.status !== 200) { 20 | return result 21 | } 22 | 23 | return Object.assign(result, endpoint.matchSchema ? matchSchema(endpoint, response.content) : {}) 24 | } 25 | 26 | module.exports = testEndpoint 27 | -------------------------------------------------------------------------------- /worker/src/toFileName.js: -------------------------------------------------------------------------------- 1 | function toFileName (url) { 2 | return url.replace(/^\//, '').replace(/[/ ]/g, '_') + '.json' 3 | } 4 | 5 | module.exports = toFileName 6 | --------------------------------------------------------------------------------